Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sky image incorrect distortion at some coordinates #359

Open
alex-w opened this issue Sep 19, 2018 · 4 comments
Open

Sky image incorrect distortion at some coordinates #359

alex-w opened this issue Sep 19, 2018 · 4 comments
Labels
bug Something likely wrong in the code community Get involved in development! importance: high Obvious error, very annoying, but no crash state: confirmed A developer can reproduce the issue subsystem: scripting The issue related to scripting engine of planetarium…

Comments

@alex-w
Copy link
Member

alex-w commented Sep 19, 2018

Original report by Sibi Antony: https://bugs.launchpad.net/stellarium/+bug/1026263

Some of the sky images are severely incorrectly distorted at some of the sky coordinates. The attachments explain everything. It may not be easy to spot the problem with a normal square nebula/planet texture. So I made a transparent image with 'Stellarium' written on it.

If the problem is not easily noticed, drag around the sky a bit, and you might chance upon that easily. Most often, I've noticed the incorrect distortion while the image is moved towards the centre of the screen, though I'm not very sure on the problem characteristic.

I also have the equatorial grid for reference. When the image is loaded with loadSkyImage() it must be distorted according to the equaotorial refernce frame.

@alex-w alex-w added bug Something likely wrong in the code state: confirmed A developer can reproduce the issue importance: medium A bit annoying, minor miscalculation, but no crash labels Sep 19, 2018
@gzotti
Copy link
Member

gzotti commented Oct 8, 2018

I have modified this texture with a grid pattern.

stellarium-025 klein

The distortion is nothing but weird, but the problem is neither in scripting nor in projections per se. It is in StelSkyImageTile. Is this just a misapplication with a far too large quad?

Script:

// Script to identify a problem with StelSkyImageTile
// See original from https://bugs.launchpad.net/stellarium/+bug/1026263
// GZ has changed the square texture with a grid which better shows the effects
LandscapeMgr.setFlagAtmosphere(false);

//core.loadSkyImage("image1", "tests/stellarium.png", 
//		120, 5, // ra=8h, dec=5d centre
//		4500, 0, // angSize, rotation
//		15, 10, // minRes, maxBright
//		true, "EqDate");

// Alternative loading with 4 corners.
// Interesting: Corners and edges are OK, the central area gets strangely distorted. 

core.loadSkyImage("image1", "tests/stellarium.png", 
		150, -30, 
		90, -30, 
		90, 30, 
		150, 30,
		15, 10, // minRes, maxBright
		true, "EqDate");
core.wait(30);
core.removeSkyImage("image1"); 

Here is the image:

stellarium

After loading, move the view to see variable distortion. Also change projections.

@gzotti
Copy link
Member

gzotti commented Oct 8, 2018

I am afraid I am stuck with this. @guillaumechereau , @xalioth any insight what is happening here? Or even a fix?

The edges are great circles, this is technically OK even though they don't follow the declination arcs (which are small circles). But what happens in the inner area? Where is the odd tessellation happening?

@gzotti gzotti added this to the 0.18.3 milestone Oct 8, 2018
@xalioth
Copy link
Member

xalioth commented Oct 9, 2018

Is this a regression?

@gzotti
Copy link
Member

gzotti commented Oct 9, 2018

Not really. The original report on Launchpad is from 2012, but the OP's screenshot did not even show the total amount of distortion. I tried several times to dive into the StelSkyImageTile / MultiLevelJsonBase classes, but get easily lost. (I still have not found the critical class or architecture documentation, also for all these metadata in the JSON files which could apparently be handled with that class.) I do not know how what the user configures as textured rectangle with 4 vertices becomes tessellated into such very bad coordinates. Probably the usual application of these classes is just small DSO images, so it never appeared so bad. But there can be some demo applications where an image, neatly embedded into the sky, can be valuable, so I hope one of you remembers, can have a look and fix that.

@alex-w alex-w modified the milestones: 0.18.3, 0.19.0 Dec 22, 2018
@alex-w alex-w modified the milestones: 0.19.0, 0.19.1 Mar 20, 2019
@alex-w alex-w removed this from the 0.19.1 milestone Jun 11, 2019
@gzotti gzotti added the community Get involved in development! label Mar 7, 2020
@gzotti gzotti added importance: high Obvious error, very annoying, but no crash and removed importance: medium A bit annoying, minor miscalculation, but no crash labels Oct 20, 2023
@alex-w alex-w added the subsystem: scripting The issue related to scripting engine of planetarium… label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something likely wrong in the code community Get involved in development! importance: high Obvious error, very annoying, but no crash state: confirmed A developer can reproduce the issue subsystem: scripting The issue related to scripting engine of planetarium…
Development

No branches or pull requests

3 participants