When i loaded some specific .ies files the lights didn't illuminate, as if their intensity had gone to zero and the rendered image was black.
I found out that the problem was that the shader was assigned to area light with the transform node scaled on all three dimensions, which is quite common in mental ray, and that with many other shaders doesn't give any kind of problem (see mia_portal_light or physical_light).
Mia_photometric_light itself is not affected by the transformations until a photometric file is associated.
To solve the problem just set the scale Z value of the light to 1, while keeping scale x and scale y as desired.
It is assumed that you are working with bidimensional shape area lights: rectangle or disc.
ATTENTION: scaling the area lights over values of 1.0 results in the distribution of light being blurred proportionally to the resizing that the light underwent.
The correct procedure to set the area lights with ies profiles is the following:
- create an area light with "create > lights > area light";
- in the "mental ray > area light" tab of its shape, select "use light shape", then "rectangle" or "disc" depending on the shape that you want;
- position and scale the light where desired;
- set scale Z at 1.0;
- in the "custom shader" tab select "suppress all maya shaders";
- click on the texture icon on light shader and select "mia_photometric_light" from the window that appears.
The controls of this shader aren't very intuitive but they aren't impossible to manage either.
Attributes of mia_photometric_light node in mental ray
The most important to comprehend the way it works are:
-
intensity mode: manages the way the intensity of the light is emitted.
0.0 = the intensity is managed by "manual peak intensity cd" and is measured in candles;
1.0 = the intensity id managed by "manual flux intensity lm" and is measured in lumen;
2.0 = the intensity is managed automatically by the ies profile that will be loaded, -
distribution mode: manages the way in which the light will be distributed and the shape of its projection cone.
0.0 = the distribution is like a point light, in all directions;
1.0 = the distribution is like a spot light;
2.0 = the distribution is managed by the ies profile loaded, - units to meter scale: the relationship between the default unit of measurement of the shader (default = 1 meter) and the one of our scene. if it is in centimetres the value to be inserted is 100.
- cm2factor: has to the same as the cm2factor of the mia_exposure_photographic, if it is used. Wheter used or not i suggest to set it always at 1.0.
For the use we want to make of this shader we are going to set both the intensity mode and the distribution mode to 2.
- load the color profile by clicking on the texture button on the side of the "profile" slot;
- a mentalrayLightProfile node is created. load on it the desired profile inserting the file path under file name;
- set a resolution that is going to make a nice details of the shape of the light.
And that's it, the area light correctly projects its cone of light depending on the profile selected.
Example of area light with photometric profiles