Tonemapping / Exposure for LPEs (Light Path Expression)
Because of an example render I made for another thread (and was not really happy with it) I started to experiment with LPEs (got unclear results from the default canvases so thought LPEs could be a better choice for compositing).
I noticed that the output EXRs contained very high values.
Solution was the Exposure Value in tonemapping: It should be set to 1 I think.
Most tutorials only mention the following to get a linear output:
- Burn Highlights: 1.0
- Crush Blacks: 0.0
- White point: 1.0, 1.0, 1.0
- Vignetting: 0.0
- Saturation: 1.0
- Gamma: 1.0"
Examples:
Exposure value set to 7: The ICC matching in 32 bit panel of Affinity Photo does not give correct results. I would have to reduce the exposure which indicates that the tonal values in the exr are to high for the default 0-1 range in Affinity Photo:
Exposure value set to 1: Everything ok:
Tonemapping off: Similar to exposure 1 (differences are caused by the lower rendering time = more noise I assume):
Tonemapping off plus Exposure 7: Even if tonemapping = off the exposure has an effect:
Crosscheck with Davinci Resolve:
Exposure 1:
Exposure 7:
I am not sure if my assumptions are correct, so, I will test more with LPEs and linear EXRs.
Comments
LPEs won't make a difference to the lighting, compared to the standard canvases available in DS, which convert the choices made in checkboxes to LPEs to be sent to Iray, as they don't allow for levels adjustments. They can be useful for separating out light on objects, reflected light, etc. The exposure value in Tone Mapping is irrelevant. All it does is change the exposure of your viewport and standard JPG or PNG or TIFF render. You can adjust exposure in Affinity Photo, Ps, GIMP, Nuke, etc. There's no advantage to making exposure adjustments in Daz Studio or the Affinity Photo Tone Mapping persona either, for example. It's all just exposure.
Compositing with Light Path Expressions - iray dev blog (irayrender.com)
Do as you wish, of course, but this is based off my experience with many dozens of renders using canvases and trying all that stuff. I do all my editing in 32-bit, so I'm not overly concerned about what the graphs show.
Thanks for your input. I am testing to separate e.g. caustics from the rest and it requires to use LPEs as DS does not offer a pre build canvas for that. Also it does not offer to separate sss / transmitted light from the spec. glossy, diffuse component. I had the idea to get the translucent part of the candles to edit it individually. That also requires LPEs. But in general I agree with you.
Yeah, I also did a lot of testing years ago with LPE's, and ultimately decided they're not worth the hassle. The best source I've found is the Iray Programmer's Manual:
https://raytracing-docs.nvidia.com/iray/manual/index.html#reference#light-path-expressions
But there's some challenges...some of the LPE's that are described don't seem to work in DAZ Studio. And that raises the rabbit hole of whether DAZ hasn't followed the updates, or has only implemented a subset of the functionality, and so on.
And for the most part the ones that work seem to be the same functionality as the preset canvases. And some of the online references show LPE's that may or may not work, which implies that different software implements them differently. Frustrating.
So at the end of the day, I've found that the included canvases, especially the Light Group canvases where you can adjust light contributions, are really where it's at. All I do is, when necessary, bring them into Nuke or Blender, add an Exposure node to drop them by about -13.6 stops, and I'm all set. Material ID can be useful (when it works...), Depth can be useful, and some others (like selecting Nodes to isolate objects), but as far as LPE's I've pretty much given up on them. Heck, you can't even get a decent shadow pass from Iray.