Cycles Spectral Rendering

Make no mistake, it is a deadly clever approach. The demon is in the details I believe.

Before saying any more, the moment I read “Photoshop” is the moment that the alarm bells ring. This is largely due to all of the arcane ways that Photoshop mangles up data.

So to start, use a multilayer EXR to store your samplings. I am guessing you are using 5-10nm intervals on your linear FCurve?

From there, you should be able to use a standard lookup to generate the XYZ values once you have your distilled wavelength result. Use the proper CIE chart to go from wavelength to XYZ. The NVidia optimized curves work quite against the CIE 1931 samples as well. Lindbloom’s ASTM illuminants, so they will vary in result to say, canonized references such as 0.3127 0.3290 for D65, for example. Perhaps take a few moments to do the calculations yourself to generate the matrices to get to and from various colour spaces.

There are also some nodes that are out of bounds as they have some hard coded rubbish. Blackbody, Wavelength, SKy Texture, to name a few.

Once you have that multilayer EXR, then load it and generate a node to multiply the various results etc., the results should at least be a little more trustworthy.

Manuka uses a variable number of samples, with some amount of metadata I suspect. That is, for many instances, one could render out a few samples, while upping the samples for more complex surfaces that require spectral results. In theory, you could probably generate different FCurve profiles to speed up some materials more than others, setting some to zero?

Ignore the other gibberish for now and look at the Hero Wavelength approach.

Skip all the junk and cut it down to the bare minimum, all of which data you require are in the original Colour Matching Functions from 1931. If you were really keen, you could use the 2012 set.

Again, Photoshop is pure piss at just about everything, so avoid it like the plague. You need a fully scene referred math setup, and that typically means avoiding garbage software that has an historic display referred pipeline. I gave you the means to calculate the proper transforms above. The default chromatic adaptation matrix used is Bradford, which is more than sufficient. Not all of the options are hooked up either, so see if you can figure out which aren’t going to work. :wink:

I wonder if a robust colour library exists

Everything is spectral, so I am not sure where you are going with this. Your light source would be defined spectrally.

Not really, no.

See: Garbage.

Anyways, much rubbish in the thread. Start simple. Start fresh. Use EXR. Avoid Photoshop. Use the experiment data. Learn how to chromatically adapt. Then, to save time, simply extend Cycles to be an n-channel renderer. :wink:

ACES AP0 in an EXR wrapper would be reasonably suitable for archival purposes.

A terrific test to see if everything is working would be a metameric wheel test.

3 Likes