abramson wrote:1. Appearance and dissappearance of stars is a little too sudden. In fact appearance is gradual (but fast), while dissappearance seems completely abrupt.
2. Appearance and dissappearance of stars does nor work the same when the sun is eclipsed behind a planet, and when you move it out of the screen. In the first case, I see stars appearing when the disk of the sun is half way eclipsed. In the second, stars appear only when the last pixel of the star (or illuminated planet, you get the idea) is noved out of the window.
Thanks for the feedback, I'm the author of the HDR patch.
In general, I would tend to agree with your points.
Regarding (1), the equation I used is the same as the one modeling Temporal luminance adaptation in this paper:
Code: Select all
exposure = exposurePrev + (exposureNow - exposurePrev) * (1.f - exp(-1.f/(15.f * EXPOSURE_HALFLIFE)));
EXPOSURE_HALFLIFE is 0.4 seconds, or about 0.4 seconds for exposure to halve. In real life, the human eye can take up to minutes to adapt in darkness. 15 is the framerate I get on my machine with bloom turned on (slowww!), this ought to be the real framerate but for simplicity it is hardcoded for now.
What should be done to improve Celestia's implementation I think is, when the scene brightness changes from dark->very bright, use a short half life (e.g., 0.4 sec), but when brightness changes from bright -> dark (e.g., rotating away from the sun), use a longer half life (e.g., 10 sec or more).
As for (2), unfortunately the eclipse calculation currently assumes the sun is a point. This is a very convenient simplification but unfortunately the results are less than satisfactory. Also, everyone is mentioning this all the time, but the exposure adaptation does not handle gracefully the transition where stars go from discs to points. Don't worry, it's a known bug and is being worked on!