HDR exposure Topic is solved

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


jwwalker
Goblin
Posts: 247
Joined: Thu Aug 12, 2021 10:06 pm
Location: San Diego, CA, USA
x 18

HDR exposure

Post by jwwalker »

In Sample_HDR, in the HdrGameState.cpp source file, there are comments talking about how a sunny day should have an exposure value of 14 to 16, but the "Bright, sunny day" preset configuration uses an exposure value of 0. I see that it also says "Exposure values were adjusted by hand based on observation", but does that mean that there is not really any relationship between the "exposure" parameter and EV?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5433
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1341

Re: HDR exposure

Post by dark_sylinc »

The exposure values are offsets (I don't know why I didn't think of naming it offset back then. I guess it's because cameras name it "exposure" too) from the autocalculated exposure value in the shaders (see DownScale01_SumLumStart, DownScale02_SumLumIterative_ps and DownScale03_SumLumEnd_ps).

You can see it in your phone's camera by entering the exposure setting and it usually goes from -2 to 2; regardless of whether you're indoors or outdoors; day or night*.

That's what the HDR effect is mimicking (note our method is a bit crude. There has been more advanced techniques became popular to apply tonemapping since I wrote the HDR effect).


*Unless you enter the "Pro" mode (not all cameras have it, only high end ones) where you set the exposure by selecting both the ISO and shutter speed instead of EVs.

Update: In a real camera what affects the exposure are two things: the sensor's sensibility to light (set by the ISO) and how long it is exposed to light (shutter speed).
In CGI, there is no shutter speed as we generate a single image (unless we want to render at +1000 fps and then blend down and tonemap to 60 fps or whatever framerate the user wants to select; e.g. 24 fps for movies).