With plenty of time on my hands, I've been updating and reworking a few bits on my path tracer project, as well ass adding a few new features.
The under-the-hood stuff for the path tracer operates in linear RGB HDR (high dynamic range) space (it's not spectral yet, but that's a HUGE rewrite). At some point, for display on regular display devices or saving to non-HDR file formats, the HDR image needs to be transformed (tone mapped) to LDR (low dynamic range). This can be quite a tricky process as you have to try and preserve image detail in dark areas as well as excessively bright areas, and then somehow map those extreme colour intensities in to a [0,1] range (or [0,255]) RGB.
TLDR; take the rendered image from the software and make it displayable on HDR and regular display devices by dicking around with the colour range.
This is done through a process called tone mapping. In the past, I used a naïve Reinhard Luminance tone mapper (or simply cut any values off that fell out of the [0,1] range. This didn't produce the best results. So, I decided to pick a few different tone mappers and implement them.
Implemented ACES (which gives a nice punchy look), AgX (which is more realistic and probably the best one for use in a render + vfx + post-production workflow), and in improved Reinhard.
Probably not the best 3D scene to show the differences, although they can be observed in the image below.
I also decided to rework my post-process bloom effect as I wasn't happy with my old version. It's a lot quicker now, and produces much better results. It is not physically realistic (far too expensive for a real time renderer) but it does the job and is user-controllable.
I also added a reworked "sheen". It's based on "Practical Multiple-Scattering Sheen Using Linearly Transformed Cosines" (Zeltner, Burley, and Chiang, SIGGRAPH 2022) that introduces a method for real-time, physically-based rendering of fuzzy or dusty materials. It models sheen as a volumetric layer containing fiber-like particles (using the SGGX distribution) and approximates the resulting multiple scattering using an LTC fit, replacing expensive simulation. Good for clothing and things like velvet. Quite happy how this turned out.
In addition, I reworked my transmission code that models light passing through a surface for things like curtains, or strong sunlight shining through leaves. Good for backlighting! Here is an example of a bright light under a piece of fabric.
And a bright light shining through stained glass:
Another area to update was the coat (clearcoat) processing; this is good for adding a gloss/lacquer layer on top of an existing surface/material. For example, the lacquer layer over car paint, or even moisture/wetness on skin. Or varnish on wood. That sort of thing. I gave the McLaren in the image below a dull Papaya Orange paint layer with high roughness - which meant it appeared diffuse with no highlights - matte orange if you like. I then applied the coat on top which simulates the lacquer clear coat, and suddenly the paintwork has reflections and gloss as you would expect to find in the real world.
A woman:
A sweaty woman:
Bored yet?
