Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.54k stars 811 forks source link

Don't draw stellar halos if the star is obscured #1924

Open Atque opened 2 years ago

Atque commented 2 years ago

Now that annual aberration is implemented and we have very accurate lunar positions in relation to stars, it might be advisable to hide an occulted star's halo completely when the Moon or whatever obscures it. The screenshot below shows an occultation of 19 Piscium by the Moon, and the star's halo is still visible, despite the star actually being hidden behind the lunar disc.

stellarium-112

I think this has been up for discussion earlier, but there is no formal report of it.

The same might be wished for when a planet disk is completely hidden behind the Moon or another planet.

gzotti commented 2 years ago

Sure this "would be nice". Just that there is no test for stellar obscuration, we just plot the stars and then overdraw the Moon. It may be possible to hide planet halos by testing ~200 solar system objects, but please understand that testing every single star against obscuration by the Moon before we plot it is simply (almost certainly -- correct me by sending a PR that proves otherwise!) not advisable in an interactive application.

Atque commented 2 years ago

Ah, it is more complicated and demanding than I tought. Maybe it is possible to circumnavigate that in some way,

github-actions[bot] commented 2 years ago

Hello @Atque! Thank you for this suggestion.

gzotti commented 2 years ago

I tried with a simple test. However, the Moon is rendered as tessellated sphere (i.e. its geometry is like a multi-faceted "disco ball") and therefore can be some arcseconds smaller than it should be. (BTW, this also means occultation times cannot be super-accurate!) In this case stars vanish a few arcseconds besides the Moon. This is also bad, although the first such star I observed turned out to be a close double. Yes, the effect is great! But we need a better test. See #1959.

guillaumechereau commented 2 years ago

Thinking about it, an other issue here is that the halo of a star very close to the Moon edge should be seen in front of the Moon I think. See the fake screenshot attached. Is that correct?

image

Atque commented 2 years ago

@guillaumechereau Yes, technically they should be drawn in front of planets etc (at least until its center is covered). The star texture represents its glare, which is not physical but an optical illusion.

gzotti commented 2 years ago

Yes, indeed. This would be even better.