stellarium icon indicating copy to clipboard operation
stellarium copied to clipboard

Artifacts on very short total eclipses (ShowMySky)

Open Atque opened this issue 10 months ago • 7 comments

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)

Atque avatar Apr 27 '24 20:04 Atque

Hello @Atque!

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

github-actions[bot] avatar Apr 27 '24 20:04 github-actions[bot]

Indeed, for this eclipse it looks even worse.

gzotti avatar Apr 27 '24 20:04 gzotti

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)?

10110111 avatar Apr 27 '24 20:04 10110111

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.

gzotti avatar Apr 27 '24 20:04 gzotti

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

Atque avatar Apr 27 '24 20:04 Atque

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

10110111 avatar Apr 27 '24 20:04 10110111

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

Atque avatar Apr 27 '24 20:04 Atque

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 avatar Jun 08 '24 22:06 10110111

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.

10110111 avatar Jun 09 '24 06:06 10110111

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?

Atque avatar Jun 09 '24 07:06 Atque

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).

gzotti avatar Jun 09 '24 07:06 gzotti

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

Atque avatar Jun 09 '24 07:06 Atque

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 avatar Jun 09 '24 07:06 10110111

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.

10110111 avatar Jun 09 '24 07:06 10110111

The patch is perfect for me

alex-w avatar Jun 09 '24 08:06 alex-w

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.

gzotti avatar Jun 09 '24 10:06 gzotti

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

Are you on NVIDIA?

10110111 avatar Jun 09 '24 10:06 10110111

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.

Atque avatar Jun 09 '24 10:06 Atque

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?

gzotti avatar Jun 09 '24 10:06 gzotti

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 avatar Jun 09 '24 10:06 10110111

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

10110111 avatar Jun 09 '24 11:06 10110111

Yes, that solved it, thanks!

gzotti avatar Jun 09 '24 13:06 gzotti

Hello @Atque!

Please check the fresh version (development snapshot) of Stellarium: https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

github-actions[bot] avatar Jun 09 '24 18:06 github-actions[bot]

Hello @Atque!

Please check the latest stable version of Stellarium: https://github.com/Stellarium/stellarium/releases/latest

github-actions[bot] avatar Jun 23 '24 12:06 github-actions[bot]