HDR: High Dynamic Range illumination

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 3 months

Re: HDR: High Dynamic Range illumination

Post #21by dirkpitt » 29.03.2008, 02:32

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. :wink:

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 :wink: 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!

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 11 months

Re: HDR: High Dynamic Range illumination

Post #22by ElChristou » 30.03.2008, 11:57

Just build a new osX HDR version Tx to Dirkpitt!

Feedback: apparently my slowdowns are just a config problem, HDR is not for 32Mo cards!
- Got very low FPS when using Highres map (2k dds or more (with normals etc)
- Full screen don't work (is this only osx?)
- Got some illogic behavior like the above:

1) no stars, normal
2) stars, not normal
3) no stars, not really normal
4) stars only late when mars cover almost all the window (not normal)

Image
Image

duds26
Posts: 328
Joined: 05.02.2007
Age: 35
With us: 17 years 11 months
Location: Europe

Re: HDR: High Dynamic Range illumination

Post #23by duds26 » 30.03.2008, 18:05

There are a little bit too few stars visible in the screenshots with Mars.
In the lower two, there should be more stars and brighter visible than in the two highest pictures.
The celengine is not calculating the brightness correctly.


Exposure not gamma corrected
,

This is a big issue because everything will look different on a Mac than on a PC!!
8O :!: Celestia should always give everything the same with adding gamma correction values (to the graphic card), please fix this.


Implementing HDR is a wonderful thing, but all these unexpected effects and bugs.
And the 1.5.1 isn't even out yet, please get this out first.
Last edited by duds26 on 15.04.2018, 21:05, edited 1 time in total.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 10 months
Location: Hamburg, Germany

Re: HDR: High Dynamic Range illumination

Post #24by t00fri » 30.03.2008, 20:12

Friends,

looking at these nice HDR shots, I still don't feel entirely happy.

Let's compare the two backlit images of Titans atmosphere:

1) The new HDR image (<= cartrite)

Image

2) My original one without any HDR effects:
Image

I don't see all that much difference due to HDR here, while there should be: the sun on that HDR image is NOT at all an overly bright source of light. It's rather a somewhat dull yellow patch...

See what worries me?

F.
Image

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 11 months

Re: HDR: High Dynamic Range illumination

Post #25by ElChristou » 30.03.2008, 20:26

t00fri wrote:...the sun on that HDR image is NOT at all an overly bright source of light. It's rather a somewhat dull yellow patch...

Before working on the stars rendering at close range I think there is lot to fix for the fading background and DW must be working on this. Now it's true that in this pict the sun should be white with a glare much bigger...

(BTW, during a few seconds I was wondering where was the sun in those pict because of the savage cut done by the PHP engine...)
Image

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 4 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Re: HDR: High Dynamic Range illumination

Post #26by cartrite » 30.03.2008, 23:44

Fridger,
The OGL2 is a little bright if you have a specmap.
This is a known bug.
Actually, it not only has a problem with a specmap in OGL2 being too bright but also the newer atmosphere rendering in OGL2 being too bright.
This is why I posted the image. So people will have an idea of what to expect. This is disabled by default. A sign that it is no where near finished.
cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 23 years
Location: Seattle, Washington, USA

Re: HDR: High Dynamic Range illumination

Post #27by chris » 31.03.2008, 16:40

t00fri wrote:Friends,

looking at these nice HDR shots, I still don't feel entirely happy.

Let's compare the two backlit images of Titans atmosphere:

I don't see all that much difference due to HDR here, while there should be: the sun on that HDR image is NOT at all an overly bright source of light. It's rather a somewhat dull yellow patch...

See what worries me?

So, given the apparent brightness of Titan's atmosphere, you're expecting the glare from the Sun to cover a larger area of the screen?

The current HDR technique uses standard 8-bit color components, so there's a limit to what dynamic range can be represented, and thus to how bright any element can appear. The advantage of it is that it works with nearly any graphics card. There are many fewer limitations with 16-bit floating point color components, but these require GeForce 6 series or Radeon 1xxx/2xxx series graphics cards. Quite a bit of DW's code is relevant for both 8-bit and floating point frame buffers. Even the dynamic range compression will still be useful, as 16-bit floating point value (commonly referred to as a 'half float') can still only represent a range of intensities smaller than what may be encountered in astronomy.

The atmospheric scattering calculations need to be adapted for HDR, too. The Mie phase function produces values that are outside the [0,1] range represented in a low dynamic range frame buffer. In the present implementation, scaling factors are applied to keep pixels in roughly in the representable range.

--Chris


Return to “Development”