Hi,
We updated the cycles integration in our application from a state of more than two years ago.
We encounter that the render results are now given as ccl:half values. There is a function ccl:half_to_float.
The values of those floats seems to may have any value. We would like to have values between 0..255.
How should this be done as we do not know a upper limit on such result values?
I’m not the expert here but until someone more knowledgeable comes along:
Cycles does it’s calculations in an open ended linear domain. There is no maximum brightness a light can have. This is how the physical world behaves as well.
The result of the cycles render represents the amount of light in each pixel. To convert the linear open domain colorspace cycles produces to a closed domain color space to display on a monitor in the 0-255 range you need to do a colorspace transform (tonemapping).
In blender these transforms are the settings in render -> color management -> view . These are postprocessing steps not done by cycles. The default AgX colortransform tries to emulate the way photographic film reacts to the linear light, by desaturating very bright lights among other things.
So TLDR: you need a postprocessing step to go from ‘linear open ended domain’ to 'gamma corrected closed domain` . As far as I know blender uses OpenColorIO (OCIO) to do these color transforms, so you would probably need to use that was well.
edit:
As far as I know cycles was open domain 2 years ago as well. So if you ignored that back then and just clamped things you could maybe do the same now and just clamp to the 0.0 - 1.0 range? But as said, I’m no expert on cycles at all , can just give a general overview of the topic.
Also see Color Management - Blender 5.1 Manual
2 Likes