# /////////////////////////////////////////////////////////////////////////////////
#
# ctrl.studio, March 02 2005
#
# ctrl_geocolor
# shader plugin for softimage|XSI
#
# /////////////////////////////////////////////////////////////////////////////////
#
# revisions::
#
# (v1.1) pubblic release
# (v1.2) physical properties, object normals
# (v1.5) color per vertex support 
# (v1.6) multiple cav support 
#
# ////////////////////////////////////////////////////////////////////////////////

a shader pack to work with geometric area lights.




/////////////////////////////////////////////////////////////////////////////////
// geolight								       //
/////////////////////////////////////////////////////////////////////////////////

a geometry api shader to allow mentalray area lights to use arbitrary 
geometric objects.


*Object:: pick the object to be used as light (one object)
*Light:: the light (one light)
*ObjectSettings: pre set the obj flags as visibility, shadows and trace
*LightSetting:: local area settings.
  low.level:: area tracing level before switch to lower sampling.
  sampleUV.low:: sample values for the low sampling.



usage
-----
*model the geometry.
*put in the scene a geometry primitive.
*put in the scene a point light.

*pick the object and the light. one object one light...
*preset the object to get it ready to be a light.
*use the overwriting settings or enable area in the area light panel.





/////////////////////////////////////////////////////////////////////////////////
// geocolor								       //
/////////////////////////////////////////////////////////////////////////////////

allows a 'textured' object either by an image or multiple CAVs to influence 
color intensity shadows and falloff of the linked light.


light setup
-----------
*Color:: rgb, light color
 intensity: used to multiply the color
*Shadows:: tint: the umbra is multiplied over the img color
 tracedepth: limit shadows by reflect/refraction level
 threshold: quit for light color darker than..
*Falloff:: linear, exponential and physical attenuation
(when in physical mode falloff start and stop are not used properly
the stop is discarded and the start is a simple factor to boost the
cosine attenuation, less is more)


object normals
--------------
*objectnormals:: enable, cuts inv rays; interpolate, multiplies by dotnd;
spread, limits to this dotnd.
(limit light spreading by only considering the obj normals)


color per vertex
----------------
*Light Color:: supply light colors from the selected cav map
*Light Intensity:: the intensity cav map is multiplied by the intensity factor
*Light Shadows:: this cav is multiplied by the shadow color (set shdw to 1.0..) 
*Light Falloff:: this map is used as multiplier for the falloff Stop

(to work with CAV maps goto Property->ColorAtVertices Map where to create
the Cav maps for the selected object. Then Ctrl+W to get the brush colors
and Shift+W to start painting. to switch from a Cav to another, select the
material of the object and from VertexColorDisplayProperty select the map
you need. when using multiple CAVs you'll have to attach all of them to the 
material of the object by using a vertexRGBA node (nodes->maplookups)and for
example a simple mix8color to plug'em into, or xsi will not export them).


image
-----
*Alpha:: multiply light intensity by alpha, factor is the factor multiplier.
*Luminance:: luminance acts as a multiplier for the falloff.
(if both alpha and luminance are checked it will be the alpha influencing falloff.
to work with an image the object must be uvmapped)

(the linked object should be uvmapped and with the proj applied via rendertree,
like with an image node or a textproj).


color correction
----------------
*ColorCorrection:: standard hsv controls.
*DinamicRange:: expand range, remap luminance, exponent.
(these settings are applied to the texture.image or to the light.Color.cpv map
and perform basic colorcorrection methods)








