FoxMcCloud
Newcomer
There's something I can't agree with regarding tone mapping: why are we doing the bright-pass before tone mapping, and why do we tone map to the range [0, 1] instead of [0, N] (N > 1)? I've been playing around with that and I think the two are closely related.
I'll be using the term "bright-pass" to refer to the rendering pass where the bright parts of the HDR framebuffer are put in a separate texture (which is usually used later for effects like bloom)
Tonemapping operators like Exponential and Hable's Filmic map to [0, 1], so a bright-pass afterwards will lose a lot of the dynamic range. A bright pass before tone mapping maintains that, but it doesn't adapt properly to the scene IMO. If I have a very dark scene with color intensities ranging from [0, 0.3], say, I'd ideally tone map to expand those values into a wide range depending on the scene's brightness, and thus if the scene consists of a moderately bright spot in complete darkness it should receive some bloom too.
I think the fact that we're used to tone-mapping to [0,1] is restrictive here. What I did (and keep in mind that's just me fooling around - I'm not saying that it's The Right Thing but I'm soliciting opinions) was to come up with some sort of non-saturating tone-mapping operator that closely matches exponential for the most part in the [0, 1] region. The formula is:
((x + 1.0)^Exposure - 1.0) * OverallScale
Here's a picture of its graph:
http://www.flickr.com/photos/59098813@N06/6324153284/
I'm using this to map from [0, FP16_MAX] to [0, N] where N is > 1. Then I perform the bright-pass *AFTER* tone mapping where each pixel in the bright-pass texture is equal to Original - 1.0. Dynamic range is preserved and this way a bright point in a very dark scene still makes it into the bright-pass texture for bloom and post-processing. Thoughts?
I'll be using the term "bright-pass" to refer to the rendering pass where the bright parts of the HDR framebuffer are put in a separate texture (which is usually used later for effects like bloom)
Tonemapping operators like Exponential and Hable's Filmic map to [0, 1], so a bright-pass afterwards will lose a lot of the dynamic range. A bright pass before tone mapping maintains that, but it doesn't adapt properly to the scene IMO. If I have a very dark scene with color intensities ranging from [0, 0.3], say, I'd ideally tone map to expand those values into a wide range depending on the scene's brightness, and thus if the scene consists of a moderately bright spot in complete darkness it should receive some bloom too.
I think the fact that we're used to tone-mapping to [0,1] is restrictive here. What I did (and keep in mind that's just me fooling around - I'm not saying that it's The Right Thing but I'm soliciting opinions) was to come up with some sort of non-saturating tone-mapping operator that closely matches exponential for the most part in the [0, 1] region. The formula is:
((x + 1.0)^Exposure - 1.0) * OverallScale
Here's a picture of its graph:
http://www.flickr.com/photos/59098813@N06/6324153284/
I'm using this to map from [0, FP16_MAX] to [0, N] where N is > 1. Then I perform the bright-pass *AFTER* tone mapping where each pixel in the bright-pass texture is equal to Original - 1.0. Dynamic range is preserved and this way a bright point in a very dark scene still makes it into the bright-pass texture for bloom and post-processing. Thoughts?
Last edited by a moderator: