KT to TMI?

   607   3   2
User Avatar
Member
55 posts
Joined: 9月 2019
Offline
I'm used to being able to easily dial in a color temperature in Kelvins in C4D, but I don't see a way to do that in Houdini. I can take a Kelvin temperature and read the TMI values in C4D, but TMI values are far from intuitive. The current situation is that I've got a set of planes set to various Kelvins that I'm trying to set up as lights in the Stage, with a single material for the emission. As I've already discovered, I can't just use a geomprop VOP to grab the Kelvin from the @name and plug that into emissive color, because it needs to be translated. I pulled a table of Kelvin to RGB values from here [andi-siess.de], saved that as a CSV and imported it with a Table Import SOP, and I've been TRYING to create a dictionary with K as the key and the RGB vector as the value, but I haven't worked out a way to pull that off. Does anyone have any insight into how I could pull this off? Or am I better just grabbing the RGB values straight from the chart and manually applying them according to Kelvin temperature?
User Avatar
Member
105 posts
Joined: 7月 2019
Offline
If you'd like to use just kelvins without luminance, you can apply them using Color Picker.

If you have Kelvins + Luminance Chart [physicallybased.info], you can make a VEX wrangle to convert Temperature + Luminance to XYZ universal color space and then to linear sRGB;
int temperature = chi("Temperature");
int luminance = chi("luminance");
vector blackbody = blackbody(temperature, luminance);
vector rgb = xyztorgb(blackbody);
@Cd = rgb;

Attachments:
temp_color_picker.png (113.4 KB)
blackbody.png (751.5 KB)

User Avatar
Member
8833 posts
Joined: 7月 2007
Offline
Have you tried MtlX Blackbody? [www.sidefx.com]
Edited by tamte - 2024年11月27日 09:45:42
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
55 posts
Joined: 9月 2019
Offline
Thanks for the suggestions, and I'm sure they'll come in handy later. What I ended up doing was naming the various objects the RGB values, then converting those names to Cd values (and dividing by 255, because I forgot that EVERYTHING is normalized in Houdini), then plugging Cd as a geompropvalue into emission color.
  • Quick Links