Jump to content
Mattline1

Render/save environment probes into HDR formats when HDR is enabled

Recommended Posts

As in the title, my suggestion is to save and render environment probes into an HDR format whilst the HDR option is checked. The reasoning is below:

 

I have been trying to take advantage of the HDR feature by implementing filmic tonemapping, but have been having issues with artefacts. The issue seems to be that environment probes store values in a low dynamic range.

 

Because of this, when light values become >1 they begin to clip. For very small values the precision is low and causes banding and distortion issues. (see image)

 

LDRissues.png

In the above, the left image is close to black before tone-mapping is applied, whilst the right image is nearly completely white. If an ambient term is used rather than image based lighting, then no artefacts are present. this suggests the issue is with the precision of the probes not the HDR diffuse image passed to the tone-mapping post process.

 

To note, these issues only become apparent when probes + HDR + custom tone-mapping is used. which is likely an edge case for most Leadwerks users. That said we are unable to fully take advantage of HDR whilst elements of the lighting pipeline (probes) do not support it.

 

Cheers.

Share this post


Link to post

I cannot tell what is happening in the second image.

 

In the first image it looks like there's definitely some compression of the color. Will need to experiment with this.

Share this post


Link to post

In the second image I had modified the sky shader to push values above 1.0. The brighter sky isn't reflected in the probe however.

The same happens for any surface where brightness becomes >1, it appears clipped in the probes (often as grey as iris adjustment brings the clipped value down from 1.0, like in the image).

 

The Sponza scene is here (pretty big, because of the textures :/). I had to do a quick convert back from PBR so the specular is a little shiny on most materials.

 

The sponza is a worst case scenario, there is very little direct light so the probes have to do the heavy lifting.

I've set the postprocessing to do gamma correction rather than full tonemapping as it's a simpler algorithm and therefore easier to discount as the cause. The artefacts are still visible. the tone-mapping shader is included as well.

 

One last note, increasing the ambient term and rendering environment probes with that higher ambient can alleviate the problem. Though this feels like a workaround, as it ends up in washed out dark areas and means the probes can't be used on their own for nice GI.

 

Hope that all helps.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...