Re: blackbody and daylight functions


Brecht Van Lommel
 

I think there is something that needs to be improved in OSL regarding blackbody() and color spaces. However I'm not sure how you'd use blackbody() (or D65) to compute a blue sky color, so it may be unrelated to this specific question.

The renderer needs to set a rendering color space, to define the XYZ to RGB transform for blackbody(). However only fixed set of color space are supported. There is no ACEScg for example, so if a renderer uses that the colors would be off.

A solution could be to support setting an arbitrary 3x3 XYZ to RGB matrix instead. At least that matrix is what I already have available in my renderer, and I wouldn't mind implementing this.


On Sat, Jan 9, 2021 at 1:32 PM <chrisbrejon@...> wrote:
Hi everyone,

first time posting here. First of all, best wishes for 2021. ;-)
I am a lighting lead at illumination mac guff and our developers are currently implementing OSL
in our proprietary render engine, which is awesome. ;-)

I had a question about the blackbody function if that's okay with you. I have recently been explained that
for higher temperatures we might want daylight and not black body values.Think of it as being the delta between
a pure black body and the fact that in reality we have the sun + atmosphere filtering the light.
so for Displays we tend to match the daylight locus and most colour spaces are daylight whitepoints.

I found this information (shared by Kevin Wheatley) quite fascinating because we have been investigating
blackbody values for the past months and we did notice that something felt "off" for high values (like blue sky).
If you're interesting, here is an article on the topic and the definition by the CIE.

So my question would be if there is any interest to implement a daylight function into OSL ?
A bit like what you did with the blackbody_rgb function and the BB_TABLE.

As you can tell, I am no developer so I apologize for any noob question or misconception I'd have. ;-)
Regards,
Chris

Join osl-dev@lists.aswf.io to automatically receive all group messages.