Looking for HDR Clarification

Started by
13 comments, last by MJP 11 years, 3 months ago

Ugh, had luminance too much on my mind in that post -_-

The correct name for the example function would be "float computeKey( float luminance )". So, I guess it is different to what you were suggesting.

Thanks,

n!

Advertisement
color.rgb *= ( 1.0f + vColor / LUM_WHITE );
color.rgb /= ( 1.0f + vColor );

The modified Reinhard equation, equation 4, use the square of the white point, doesn't it? That is, it scales with [attachment=13338:CodeCogsEqn.gif]?

Or am I missing something?

[size=2]Current project: Ephenation.
[size=2]Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

Ahh, that pdf is fantastic and looks like it's discussing everything I'm having issues with thanks! Not sure how I didn't find it with all the Reinhard googling I did over the weekend, I found a completely different tonemap.pdf that wasn't as helpful. Very useful thanks, will sit down and look through it thoroughly this evening.

I think you're correct to some degree, I can't test it too much in my lunch hour. But changing a few things makes some parts behave better and other parts behave worse, but that could be down to me just plugging it in without much thought. Certainly the document looks like it'll be very useful when I get the time later,

Thanks again,

n!

Yes, that pdf has been very useful so far thankyou. I've managed to get my scene behaving at least in a way I'm expecting, it's not perfect yet but that's mostly playing with numbers. I've switched, for now, to using the rather simple Ld(x,y) = L(x,y) / 1 + L(x,y) and I'll work my way through everything with some more tests, so that it's all clear in my head. But my scene's now remain dark when it's dark, and bright when it's bright.

A couple of sample screenshots with the modified tonemap operation (they're not so pretty unfortunately, I'm no artist), I've removed the water as the shader needs to be updated to handle HDR lighting on it.

This shot shows a scene with a bright sunlight:

yTq64Zs.jpg

And this screenshot shows the same scene with low lighting conditions:

4UJtLY0.jpg

As you can see, the dark lighting is now remaining dark. Still not sure what is wrong with the original tonemap I copied from the DX SDK, but at least I understand what this one is doing and it makes sense to me.

Thanks again,

n!

At work we just let the artists pick the value for different scenes, and they just use it as a parameter to the auto-exposure system. I've seen some algorithms for automatically estimating a key value based on a luminance histogram, but in my experience generating a histogram with the required number of buckets just wasn't worth the cost. We also allow the artists to specify min and max exposure values in order to limit the auto-exposure to a certain range, which is functionally similar to what Hodgman described. However we expose all of the exposure values in log2 space so that they're more intuitive.

This topic is closed to new replies.

Advertisement