I'm really excited about the mentalRay features, among which is the possibility to (since v3.1) enable photometric accurate lighting profiles based on vendor IES / EULUMDAT lighting data.
I've used the excellent (and free!) DIALux software to calculate light distribution in scenes, and although the current RC 3 supports POVRay raytracing, it's still somewhat (to say the least) lacking in both modeling and rendering aspects. So, I'd like to take advantage of Maya's modeling and rendering capabilities to produce (hopefully) accurately lit scenes simliar to Lightscape.
I understand that mentalRay makes use of IES Light Profiles through a special light shader that attenuates its light color by the profile's directional attenuation specification in order to perform physically correct inverse-square distance falloff. The mentalRay reference manual that comes along with the Maya 5 documentation explains this briefly, and also includes an example of a "mi_lightprofile_sample" shader interface function and a scene example that calls on a shader using IES light profiles.
To be honest I can barely grasp the underlying principles of this, and I don't really want to get into C++ shader programming, but I see some hope in that mentalRay supports a text-only integration of custom mental ray shaders within Maya using the 'Custom Text Editor', which allows for creation of special-purpose Maya nodes that hold customized mental images (mi) text.
Is it possible to create a mentalRay light shader using photometric IES light profiles through the 'Custom Text Editor'? Could anyone make an example of this?
Here I include some clippings from the mentalRay reference manual explaining these matters inprinciple:
mental ray 3.1 also supports light profiles, such as IES or Eulumdat light profiles , that are supplied by physical lamp vendors. This requires a special light shader that attenuates its light color (which is not provided by the profile) by the profile's directional attenuation specification. This is done by the mi_lightprofile_sample3.1 shader interface function, which requires a profile argument that is taken from a shader parameter:
typedef struct {
miColor color; /* color of light source */
miTag profile; /* tag of ies profile to use */
} photometric_light_t;
DLLEXPORT int photometric_light_version(void) {return(1);}
DLLEXPORT miBoolean photometric_light(
miColor *result,
miState *state,
photometric_light_t *paras)
{
miTag lp_tag = *mi_eval_tag(