View Full Version : Kelvin --> rgb value conversion : Max2009/2010 Photometric Lights BUG
04-23-2009, 02:37 PM
Does anyone know how to convert an RGB value to an equivalent Kelvin value?
Autodesk in their great wisdom, have expanded the different Color presets that are available in Photometric lights under 3dsMax2009/2010. However, some of the presets that were available under 3dsMax2008 have been deleted in Max2009/2010!
The end result, is any Max2008 file you open in Max2009/2010 that has a photometric light in it, with a color preset which is not available anymore in Max2009/2010, will get its color shifted to something relatively similar but NOT the same!
The end result is you will make your render result different with Max2009/2010, compared to Max2008. For legacy Max files, this is a disaster and means I can't re-render old files with a newer version of 3dsMax!
However, if I could convert the photometric light color preset rgb value to an equivalent Kelvin value, I could write a callback script to check for this situation?
I intend to enter an Autodesk defect report for this bug!
04-23-2009, 06:13 PM
you could use a look-up table, which you can auto-generate.
-- this takes a while ;)
myLUT = #()
myLut = undefined
for i = 1000 to 20000 do (
$.kelvin = i
myLut[i] = $.color
if (keyboard.escPressed) do ( throw "Escape pressed!" )
But as far as I can tell, once the file's in 2009/2010, all the info you'd need is gone. So you would have to build the LUT, switch to Kelvin, set the Kelvin value, and then move the file over to 2009/2010.. I think?
05-23-2009, 02:58 PM
out of sheer curiosity - how'd this end up? :)
05-26-2009, 10:54 PM
A defect report call was logged and after a considerable amount of pressure by my reseller (go...BlueGFX), the final word on the street from the development team is:
"Regarding the Photometric Light preset issue:
This unfortunately is “as designed“."
Go ADSK! So the usual options are, pay Autodesk consulting to build us a plugin to handle this now "retired photometric light preset", to which the plugin will have to be built for v2009 & v2010 OR alternatively I try to think of a workaround hack to at least cover of what files we have with these presets used. At the moment, I'm thinking of running a batch scan over all our current production MAX files to see how many files we are talking about here..and then I'll make a decision from there (callback, probably..)..however at the moment, I've got a couple more burning issues to attend to...
In the next Max beta, I'll put a request in for MAXScript access to the kelvin presets in photometric lights and maybe even a function to convert RGB --> Kelvin and vice-versa, would be nice :-) (I couldn't find any math on the www which explained a reliable method of calculating these conversion values.. :-()
05-26-2009, 10:54 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.