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

Artifacts on very short total eclipses (ShowMySky) #3729

Closed
Atque opened this issue Apr 27, 2024 · 22 comments
Closed

Artifacts on very short total eclipses (ShowMySky) #3729

Atque opened this issue Apr 27, 2024 · 22 comments
Assignees
Labels
bug Something likely wrong in the code importance: medium A bit annoying, minor miscalculation, but no crash state: confirmed A developer can reproduce the issue
Milestone

Comments

@Atque
Copy link
Contributor

Atque commented Apr 27, 2024

This was briefly mentioned but not properly reported in #3720.

Very precise total solar eclipses, such as the 3rd October 1986 eclipse, show a strange dark and pixelated halo around the Sun, using eclipse simulation quality = 3. See the screenshot below:

stellarium-285

Strangely enough, it does not appear on my MacBook, despite the same settings (flag_atmosphere_dynamic_resolution = true and atmosphere_resolution_reduction = 4, otherwise mode 3 is almost unusable).

System: Windows 10 64-bit
GPU: AMD Radeon RX 5700 XT (driver 24.4.1)

@gzotti gzotti added the state: confirmed A developer can reproduce the issue label Apr 27, 2024
Copy link

Hello @Atque!

OK, developers can reproduce the issue. Thanks for the report!

@gzotti
Copy link
Member

gzotti commented Apr 27, 2024

Indeed, for this eclipse it looks even worse.

@gzotti gzotti added this to Needs triage in Atmosphere via automation Apr 27, 2024
@10110111
Copy link
Contributor

10110111 commented Apr 27, 2024

I don't reproduce on Linux/Intel.

@gzotti Are you also on an AMD GPU?

@Atque does this happen in Mesa mode (may be very slow, but I'm interested just in the fact of artifacts presence)?

@gzotti gzotti added the importance: medium A bit annoying, minor miscalculation, but no crash label Apr 27, 2024
@gzotti
Copy link
Member

gzotti commented Apr 27, 2024

No, W11 Optimus notebook with Geforce RTX 3070Ti. Driver version 546.01.
Go to central location/time, one minute back, run simulation. This ring passes through the sky. OK, I can live with it, but of course technically there should be a way around to really please the spectators.

@Atque
Copy link
Contributor Author

Atque commented Apr 27, 2024

I don't reproduce on Linux/Intel.

@gzotti Are you also on an AMD GPU?

@Atque does this happen in Mesa mode (may be very slow, but I'm interested just in the fact of artifacts presence)?

Mesa mode looks like this (weird lines across the screen, and the artifact still present):
mesamode

@10110111
Copy link
Contributor

OK, I've noticed something much more subtle on Intel, see the screenshot below. Looks like the roughly same ellipse(s), but apparently, while your systems generate NaNs at some of the broken pixels, mine just yields some very imprecise numbers. But at least I can reproduce the presence of some artifacts.

Screenshot_2024-04-28_00-44-03

@Atque
Copy link
Contributor Author

Atque commented Apr 27, 2024

Interesting. On MacOS, there appears to be no errors whatsoever:
stellarium-012

@alex-w alex-w added this to Needs triage in Visualization via automation Apr 28, 2024
@alex-w alex-w added the bug Something likely wrong in the code label Apr 28, 2024
@alex-w alex-w moved this from Needs triage to To do in Visualization Jun 8, 2024
@alex-w alex-w moved this from Needs triage to To do in Atmosphere Jun 8, 2024
@10110111
Copy link
Contributor

10110111 commented Jun 8, 2024

Does the patch in eclipse-artifacts-fix branch fix this for you? I no longer have the artifacts on Intel UHD Graphics 620 with this.

@10110111
Copy link
Contributor

10110111 commented Jun 9, 2024

Does the patch in eclipse-artifacts-fix branch fix this for you?

Note that this is applied to the default ShowMySky atmosphere, so you should be using it for testing, not some custom one. Or you can patch your custom model.

@Atque
Copy link
Contributor Author

Atque commented Jun 9, 2024

Does the patch in eclipse-artifacts-fix branch fix this for you? I no longer have the artifacts on Intel UHD Graphics 620 with this.

Yes, that appears to work for me as well. Great work!

@gzotti?

@alex-w alex-w added this to the 24.2 milestone Jun 9, 2024
@gzotti
Copy link
Member

gzotti commented Jun 9, 2024

I tried compiling last night. Some process appears to block my stellarium build (compiler cannot overwrite an "open" file stellarium.exe while "still in use"). But process explorer, OpenedFilesView and whatever other tools I tried don't see why stellarium.exe should be open. Zombies on Windows? Seems I must finally restart my system, but another longish process is still running. Hopefully in late afternoon (6hrs).

@Atque
Copy link
Contributor Author

Atque commented Jun 9, 2024

You can simply paste the .frag files in atmosphere\default, no building needed.

@10110111
Copy link
Contributor

10110111 commented Jun 9, 2024

compiler cannot overwrite an "open" file stellarium.exe while "still in use"

You might be able to rename it... Also, there are tools like Unlocker that make it possible to release files from being "in use", so you may have some success with this.

@10110111
Copy link
Contributor

10110111 commented Jun 9, 2024

You can simply paste the .frag files in atmosphere\default, no building needed

Or indeed, you can just direct Stellarium to the source path to find the updated atmosphere, without any copy-pasting anything.

@alex-w
Copy link
Member

alex-w commented Jun 9, 2024

The patch is perfect for me

@gzotti
Copy link
Member

gzotti commented Jun 9, 2024

OK. There is still some now more noisy ring artifact visible at this one eclipse, sweeping through the screen from right to left in just a few seconds. I could not detect a problem for 2017 or 2024.
stellarium-027

So, certainly an improvement worth applying, but it's not fully solved yet.

@10110111
Copy link
Contributor

10110111 commented Jun 9, 2024

There is still some now more noisy ring artifact visible at this one eclipse

Are you on NVIDIA?

@Atque
Copy link
Contributor Author

Atque commented Jun 9, 2024

There is still some now more noisy ring artifact visible at this one eclipse, sweeping through the screen from right to left in just a few seconds.

I can't detect this on AMD.

@gzotti
Copy link
Member

gzotti commented Jun 9, 2024

Yes, Geforce RTX 3070Ti Laptop GPU, drivers 546.01, Win11home 23H2. One second later:
stellarium-032

Annular 2005/10 is also OK, but this was long. The problem seems to be around the area of the shadow cone tip. I could check a very short annular. Suggestions?

@10110111
Copy link
Contributor

10110111 commented Jun 9, 2024

So yes, the look is of exactly the same kind as what I had on Intel before the fix. NVIDIA is infamous for its very aggressive optimizer, which in particular assumes that the arithmetic is associative while it's not—due to rounding. And the expression here is sensitive to the order of additions & subtractions, which is why things break.

Apparently, I'll have to hide the difference somehow to inhibit this optimization.

@10110111
Copy link
Contributor

10110111 commented Jun 9, 2024

I've pushed 634db3d, please try it. If it doesn't help, I'll have to make an uglier hack.

@gzotti
Copy link
Member

gzotti commented Jun 9, 2024

Yes, that solved it, thanks!

Atmosphere automation moved this from To do to Done Jun 9, 2024
Visualization automation moved this from To do to Done Jun 9, 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 importance: medium A bit annoying, minor miscalculation, but no crash state: confirmed A developer can reproduce the issue
Projects
Atmosphere
  
Done
Visualization
  
Done
Development

No branches or pull requests

4 participants