This is the documentation for Enlighten.
Light animator service
Overview
The Light Animator service allows you to author simple animations, without the need for a complicated authoring path. To author more complex demonstrations, there are additional XML and Lua scripting systems in GeoRadiosity, but these are primarily intended for internal rather than customer use. For more information, contact support@geomerics.com.
When you select the Light Animator visualisation service, the Light Animator tab is enabled. This tab provides simple authoring and playback controls for looping animations of point, spot, and directional lights.
You can animate environment and area lights in Enlighten; however, you cannot author these animations in GeoRadiosity.
Basic animation concepts
- To create a light animation, you first need to create and save a lighting configuration (as an XML
.lights
file) in the Lighting tab. This configuration represents the first frame in your animation. Then click the Light Animator tab to adjust this initial frame. - After you have created your animation, you can still edit your initial lighting configuration. For example, if your animation makes the intensity of a particular light pulsate, you can increase the overall intensity in the Lighting tab with the effect that all the animation becomes brighter.
- Animation is limited to a single looping animation per-light source. The animation transport controls (play/pause, rewind) affect all light animations; however, each light can have its own animation playback speed.
- The animation data is stored with each light; if you delete a light in the Lighting tab its animation data will also be removed.
Light animator tab
In the Light Animator tab, the lights are drawn in wireframe:
Most animation controls operate on animations associated with a particular light; therefore, the menu is limited until you select a light to edit.
Play | Light animation playback. |
Rewind to start | Rewind the animation to the beginning. |
Clear all animation | Deletes all animation for all lights. Cannot be undone; save your light configuration first. |
Playback speed slider | A playback speed multiplier. 1.0 (the default) leaves the animation speed unmodified. |
Adjust anim loop duration slider | Adjusts the end time of the looping animation. The animations for the current light eventually loop back to the start. This end point can be modified after you have recorded animation keyframes, but you cannot reduce it prior to the time the latest key was recorded (or until you delete it). It is recommended that you author your animation with the smallest animation loop duration you need, as it is easier to extend your animation or rescale it (via the playback speed control), but harder to shorten. |
Editing key tracks (Position, Rotation, Colour, Intensity, Near/Far) | These checkboxes control which types of keyframes you wish to edit. The behaviour of the Add Key, Delete Key, and Snap To Prev Key buttons are all affected by the status of these checkboxes. Animation playback and load/save are unaffected. When a keyframe for a particular keytrack has been previously recorded but is then disabled, the keys are drawn in outline in the graphical timeline. |
Colour space radio buttons | Display either the RGB sliders or the Hue/Sat/Lum sliders (see below). |
RGB and Hue/Sat/Lum sliders | These sliders edit the animation of the light colour. The values of these sliders centre around 0 because the animation is authored as changes to the initial lighting configuration, rather than absolute values. Similarly to the Lighting tab, light colour is authored separately to light intensity. Dragging the sliders has an immediate effect on the light onscreen, providing the animation is paused. |
Light intensity slider | Modifies the intensity of the light relative to its current intensity. |
Shadow near plane and Light cutoff distance sliders | Modify the near/far plane for the light source. For most light sources, you do not need to edit this; however, you can sometimes improve shadow quality and rendering speed by animating these values over time. |
Add Key | Records a key for each enabled key track at the current time. You can record keys while playing the animation, but in general you will wish to pause the animation and use the time slider to specify the location for your keys. If you add a key while the time slider is on top of an existing key (which you can see in the graphical timeline), you will update the current key rather than add a new one. |
Clear Selection | Deselects the current light.This helps to de-clutter the screen. |
Snap To Prev Key | Moves the time slider to the first key found earlier than the current time, or 0. Snap will only snap to keys you currently have enabled. This can be helpful when you wish to update or delete a specific key. |
Delete Key | Enabled only when you are over a key in an enabled key track. Deletes the keys at the current time in the enabled key tracks. |
Delete Key Track | Deletes all keys from the currently enabled key tracks. Delete Key Track cannot be undone. |
Time slider | Drag to change the current time. It is easier to do this when the animation is paused. |
Graphical timeline | The graphical timeline below the menu shows a simple representation of the keys you have recorded for the current light. While the animation plays, a vertical bar moves from left to right, denoting the current time.
|
Example animation
To see an example animation, load the Arches scene in the SDK and play it. It contains a very simple animating sun, intended to be an example of the animation system rather than a full demonstration of Enlighten's lighting technology.
The following walk-through demonstrates how to recreate a similar time-of-day sun:
- Load the Arches scene with its default light config (a single sunlight and simple environment light) and precompute the scene if necessary.
- Click the Rendering tab and select the Light Animator service. The Light Animator tab is displayed.
- Click the Light Animator tab and select Clear All Animation to ensure that any previous data is cleared.
- Select the directional light. The full Light Animator menu is displayed.
- Set Adjust anim loop duration to 10 or more seconds. (The default is 1 second, which is too short for the purpose of this example.)
- With the Time slider at 0, rotate the sunlight so it is nearly horizontal and move the Light Intensity slider to turn the light off.
- Click Add Key to record your starting key frame. If you play the animation now, you will not see much movement. Therefore you need to add a second key before you see any animation.
- Move the Time slider to half way through the animation, and adjust the sun and intensity back to a more mid-day position and intensity.
- Click Add Key to add a second key. If you play the animation now, you should see the sun 'ping pong' between these two key frames.
- Pause the animation and move the Time slider to the end of the animation.
- Adjust the rotation of the sun so it is nearly horizontal but pointing in the opposite direction to its starting point.
- Adjust the light intensity to zero if necessary, and record a key frame by clicking Add Key.
- If you now scrub the time line, or simply click Play, you should see a very basic animating sun. To modify your animation, use the Snap To Prev Key to move on top of recorded keys and Add/Delete Key to update or remove them. The other keytracks (position, colour, etc) are authored in the same manner as rotation and light intensity.
- To save the light configuration and your animation data, click the Lighting tab and then click Save Light Config. While the Lighting tab is selected, the animation continues playing. You can edit the light (for example, change the sun's rotation to alter the angle at which it strikes the scene) in this tab; the animation continues to operate on the modified light. In this way, you can author simple animations such as flickering or spinning lights, but continue to manipulate them as if their animation did not exist.
There is no functionality to copy animations between lights, but you can achieve this by carefully editing the corresponding XML .lights
file. It is a simple and fairly obvious format to edit, but this is not a supported authoring route and mistakes during editing may cause instability.