|
Softimage|XSI LightsRing Script
how to animate lights intensity in circular sequences ( or other cyclic paths )
LightsRing.vbs - 7ko
Scenario
When you want to animate many lights in a coherent way, this can quickly becomes a tedious work.
With the help of scripting, this could be a lot easier.
Here we want to create a ring of lights, then animate the intensity of each light in circular patterns, and be able to play with some other parameters
like the 'hardness' of the intensity transition during rotation.
This script has two sides, one for creating such setup, the other will help us to animate it with the help of customs parameters created specificaly for this kind of animation.
Note:
This script is relativly basic in its actual state.
It only deals with the intensity of the lights, and could be enhanced to manage lights colors, shaders parameters and so on, but this kind of enhancements
would be usefull only for specific needs.
The circular path can be edited but one of possible enhancements could be to be able to 'pick' a curve at creation time.
Script Installation

First, open the 'Browser' and select the folder where the script is.

Switch from 'Toolbar Panel' to 'Palette' and 'Custom Script Panel'.

'Drag & Drop' the script file directly to the 'Custom Script Panel'. The 'Add Script Command' will open.

Edit the name you want to see in the button by editing the 'Command/Button Name' field and the command name wich will be used via scripting in the 'Command Name For Scripting' field.

The Script and its associated Button are now installed and ready to be used.
Setup Creation
Click on the Button we just add. The following panel will open:

RingName: The 'Model' name wich will be created by the script.
NbrOfLights: The number of lights that will be created on the circle path.
VisuGrid: An option that, if enable, will create a grid right behind the LightsRing wich will permit us to see the intensity effects in the OpenGL views.
light_LightBox, light_Neon, light_Point, light_Spot: The type of light you want.
Note:
Only select one type of light, if more than one are selected, the first one will be used.
Once you made your choices, click 'OK'.

Here is what you will obtain in the 'Explorer' view.
A new 'Model' ( 'LightsRing' with the default name ) has been created,
a custom parameters set named 'LightsRingControls',
the lights, the circle curve,
the visualisation grid ( if enabled )
and a basic skeleton with 1 bone wich will help us to 'see' wich light is targeted ( maximal intensity ).

Unless you want to modify the circular path shape and/or move it around, you don't have to deal directly with the created elements if you want yo animate
them.
You just have to use the specific custom panel and start animating.
Setup Animation

To open the custom control pannel, click on the orange icon aside 'LightsRingControls'.

Ring Radius: A simple proxy parameter driving the circle radius.
LightsRotation: Physicaly rotate the lights around the circular path. Does not affect the lights intensity.
LightsIntensity: Global intensity of all the lights.
IntensityRotation: Rotate the virtual light intensity around the path ( the lights themself dont move ). The bone will rotate to indicate where the maximal intensity is located.
IntensityBias_High: Adjust de distance around the 'Intensity Pointer' ( the bone's effector ) where the lights will be switched on. It's a relative distance to the 'Path' ( 0% to 100% ).
IntensityBias_Low: Affect the lower lights intensity taking into account the 'Intensity Pointer'.
Note:
For a 'full lights' effect, rise both 'IntensityBias_High' and 'IntensityBias_Low' sliders to their maximum, the 'Intensity Pointer' will have no effect anymore.
Note:
To be able to see the 8 LightsRing default lights in the OpenGL views on the 'VisuGrid', delete the default scene light.
Now you just have to animate the sliders, create some 'Actions', then use the 'Mixer'.
Any feedback, critics and suggestions are welcome.
[rev. 02/11/01 - d/m/y]
|