Better balance for stellar visibility in twilight and moonlight#4839
Better balance for stellar visibility in twilight and moonlight#4839Atque wants to merge 2 commits intoStellarium:masterfrom
Conversation
|
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
| const float bortleIntensity = 1.f+(15.5f-2*nelm)*atmFadeIntensity; // smoothed Bortle index moderated by atmosphere fader. | ||
|
|
||
| const float lum = drawer->surfaceBrightnessToLuminance(12.f+0.15f*bortleIntensity); // was 11.5; Source? How to calibrate the new texture? | ||
| const float lum = drawer->surfaceBrightnessToLuminance(14.f+0.15f*bortleIntensity); // was 11.5; Source? How to calibrate the new texture? |
There was a problem hiding this comment.
This comment first appeared in 282e148. Did you check the look in the moonlight?
There was a problem hiding this comment.
Only briefly after that commit. Does it look bad to you?
There was a problem hiding this comment.
I haven't tried this change at all, just looked through the code. I don't have much clear and unpolluted skies here to observe stars in twilight, so I can't check how well this change corresponds to reality.
There was a problem hiding this comment.
This is not really meant to be fully physically correct, only a better solution than what Stellarium currently provides.
|
Thanks for also taking this up. The so far latest act of balancing was needed urgently and maybe rushed when SMS came just for V1.0 in 2022 and showed different sky brightness values (and IIRC therefore different star appearance) compared to the Preetham/Schaefer sky. This is still an unsolved mystery. Unfortunately my last week under pristine skies was in 2017. It is also always difficult to model "remembered view" against "photographic record" when the latter can just show so much more than you may have seen with imperfect eyes. Also, while there is a bright belt of twilight over the solar azimuth, how many stars do you see 60° above when the eye is not blinded? For a really long-lasting fix we should (and this is why I have not taken this up yet) step a bit further back and re-investigate actual computed sky brightness values according to our "classical" Schaefer implementation, SMS, and sky/twilight brightness values from the literature. (This has also be requested as extension of the mouse cursor plugin, see #1404.) Then don't forget the effects of different settings for light pollution and extinction. Most users still think in "Bortle Scale", which we have officially declared deprecated but still support in the GUI for convenience, as it is a nice and simple site descriptor. It would be great to have an artificial "Sky Quality Meter" estimate computed from our sky models that could give an equivalent reading to the physical device. |
|
Yes indeed, a better solution would of course be per-pixel luminance values, and draw stars and the Milky Way/Zodiacal light according to that. But I was bothered enough, as a resident of 58° N, by midsummer night skies showing just as many stars as December nights, that I thought a "quick fix" could at least be a start. Looking directly into the twilight arc still draws fewer stars than looking at zenith. |
Description
A long lasting problem with Stellarium is unrealistic appearance of stars during early twilight and moonlight. This fix brings better balancing and (to my layman eyes) more realistic stellar appearance, but it's purely empirical and does not bring any better physical model. All stars become fully visible at about -18 degrees solar altitude, instead of the current -8, which I find "reasonably good". See the screenshots below and notice the difference.
Although not many lines have changed (most of the new lines are just comments), do test it thoroughly. I might have missed some special-case where we might need calibration. I've tested for different moon phases, solar eclipse and of course different twilight steps, and it seems fine.
It should work equally well for ShowMySky and Preetham.
Opinions are most welcome, but bear in mind that this is chiefly a visual fix, to better estimate stellar visibility during early twilight stages and full moon.
Fixes #4291
Screenshots:
Both screenshots below are at the end of nautical twilight (Sun at -12 degrees).
This branch (greatly reduced stellar visibility):

masterbranch (full stellar visibility!):Type of change
Test Configuration:
Ubuntu 24.04.4 LTS
Qt 6.4.2
Checklist: