lesbentley opened this issue on Mar 31, 2008 ยท 137 posts
lesbentley posted Tue, 01 April 2008 at 5:34 PM
**Main Camera Fill Light.**Sometimes it can be handy to have a fill light parented to the main camera.
If you apply this file to a spotlight, it will place the light at the Main Camera (icon) and parent it to the camera. It will also set the colour of the light to white, the intensity to 15% (k 0 0.15), clear any nodes in the lights shaderTree.
{
//MainCamFill.cm2 or MainCamFill.pz2 or MainCamFill.mt5
//to work when no figure in scene, needs to be cm2 or mt5
version
{
number 5
}
actor $CURRENT
{
on
smartparent MAIN_CAMERA
channels
{
kdRed RED
{
initValue 1
keys
{
k 0 1
}
}
kdGreen GREEN
{
initValue 1
keys
{
k 0 1
}
}
kdBlue BLUE
{
initValue 1
keys
{
k 0 1
}
}
kdIntensity INTENSITY
{
initValue 0.15
keys
{
k 0 0.15
}
}
shaderNodeParm Preview_Light_0_R
{
initValue 1
keys
{
k 0 1
}
}
shaderNodeParm Preview_Light_0_G
{
initValue 1
keys
{
k 0 1
}
}
shaderNodeParm Preview_Light_0_B
{
initValue 1
keys
{
k 0 1
}
}
shaderNodeParm Preview_Light_1
{
initValue 0.15
keys
{
k 0 0.15
}
}
rotateX xrot
{
initValue 0
keys
{
k 0 0
}
}
rotateY yrot
{
initValue 0
keys
{
k 0 0
}
}
rotateZ zrot
{
initValue 0
keys
{
k 0 0
}
}
translateX xtran
{
initValue 0
keys
{
k 0 0
}
}
translateY ytran
{
initValue 0
keys
{
k 0 0
}
}
translateZ ztran
{
initValue 0.1
keys
{
k 0 0.1
}
}
}
material Preview
{
KdColor 1 1 1 1
KaColor 0 0 0 1
KsColor 1 1 1 1
TextureColor 1 1 1 1
shaderTree
{
}
}
}
figure
{
}
}
NOTES: Because this file uses "actor $CURRENT" it will only work in P5 or later versions.
'initValue' lines have been used in the channels. 'initValue' is the value that will be used when one of the 'Restore' commands from the Edit menu is used.
**Poser script provides a switch to turn a light on (or off) 'lightOn 1(0), however this switch will not work from a pose file where 'actor $CURRENT' is used to address the light. For this switch to work the light must be addressed by its name, eg "light spotLight 1".
**
In Poser script, comment lines start with "//" or "#", these lines will be ignored by Poser. It is good practice to include a comment line(s) under the opening brace of a pose file to explain which item it is meant to be applied to, and/or what it does.