Re: blackbody and daylight functions


Larry Gritz
 

Ah, I see, sorry for assuming you were poking around at the wrong thing.

The blackbody function is good for figuring out the color of something that is purely an emissive warm body, no more and no less. An incandescent filament, a glowing hot piece of metal, molten lava, etc. There's no particular reason to think this function would give you a good approximation to daylight sky, which is not a blackbody phenomenon.

If there is another function that gives the range of plausible overall daylight colors given a 1D input (which we can call "temperature", but doesn't relate quite as directly as a blackbody spectrum would), and this is useful in shaders for generating light colors, then by all means, we can add a new function to the spec. I think the implementation could probably be a lot simpler than what we've done for blackbody -- you may be able to implement it very simply in OSL itself with a couple of spline() calls with a fairly short array of values and get an adequate approximation to the desired function.

-- lg


On Jan 11, 2021, at 11:16 AM, chrisbrejon@... wrote:

Totally ! ;-)

Our studio is following the same path most studios are : we have an Hosek sky implementation since 2015 (if I recall correctly).
And we are indeed looking at Sebastien Hilaire's work for our next generation Skylight.

Sorry for repeating myself but my question was really about the temperature function for, let's say, an area light.
An artist may think : let's use a kelvin temperature of 20 000 to get a blue sky color on a rim. And because most render engines
rely on black body tables, the blue color will actually look quite purple (to me). Hence my question...

Of course, we would not want a "flat" color on a EnvLight but on an area or spot light to simulate a rim or a top light. A bit like this :
<dummyfile.0.part>

I guess my point is : in many renderer's documentation, you may read that black body temperatures above 15 000 would give you a sky blue color...
When actually it is not really a goof fit imo.

Sorry for the confusion, I don't mean to bother you guys. ;-)
Once again, your answers are much appreciated !

Chris

--
Larry Gritz




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