Posts Tagged ‘Blackbody’

Mental Ray CIE D Illuminant and Blackbody Radiator shaders

Saturday, August 8th, 2009

Mental ray has a lot of hidden shaders that are really useful for all kinds of situations. Those shaders are not officially supported but that doesn’t mean that they don’t work! Few of those are Light Utilities shaders such as CIE D Illuminant and Blackbody Radiator. They can be used for several reasons but i find them really useful for the way they handle the light distribution. Here’s the example:

Here’s what you need to do in order to use them:

Inside your Program Files\Autodesk\3ds Max 2010\mentalray\shaders_standard\include are two files that we need: base.mi and base_max.mi. You need to edit them in order to use CIE D and Blackbody shaders.

The Light Utilities section of your base.mi file should look like this:

#——————————————– Light utils

declare shader

color “mib_cie_d” (

scalar “temperature”,

scalar “intensity”

)

version 1

apply light, texture

end declare

declare shader

color “mib_blackbody” (

scalar “temperature”,

scalar “intensity”

)

version 1

apply light, texture

end declare

#——————————————– Shadow

Then, in order for it to appear in 3dsmax 2010 you now need to open the base_max.mi file and that’s where you’ll actually unhide the cie_d & blackbody shaders. In the base_max.mi file scroll down to the GUI sections for both the cie_d & blackbody shaders and put a # in front of the word hidden. Should look like this when you’re done:

gui “gui_mib_cie_d” {

control “Global” “Global” (

# “hidden”

)

}

gui “gui_mib_blackbody” {

control “Global” “Global” (

# “hidden”

)

}

After doing that, you’ll find it’s available for use in 3ds Max 2010.

A quick studio setup with 2 mr Sky Portals/blackbody