Name
Pass

9. Lights, cameras and variables

8. Characters | | 10. Monitors

Just like in the movies you need lights and cameras to get your work on 'film'. As with most things LD4DStudio does not limit the number of lights and cameras you may use. This way you can create very complex animations with tens of light sources and use multiple cameras to capture the action from a vast array of angles.

Lights

Lights are a very important part of any animation because without them you won't be able to see anything. LD4DStudio gives you control over four different kinds of light sources. Of three of these kinds you can add as many you like to the scene. But of the '>Ambient global light' type there can always be exactly one.

Ambient global light

This light is used to control the global background lighting of a scene, it is used to simulate light whom has been scattered from many directions and therefor lits everything to a degree.

Like I said there is always exactly one of the kind of light, you'll find it in as the first sub object below the 'Lights' object.

Main only contains the 'Init to rest values' property, it has the same purpose as the one in the character object. The sequences chapter will explain more about them. The object has three groups of properties, namely: 'main', 'active' and 'color'.

Second group of properties is the 'Active', this is an binary animation element you can use to control the on/off state of the light.

Last is the color group, it consists of three analog animation elements whom together control the color of the light. There are three elements because all light can be 'mixed' from those three colors (Red, Green and Blue). Each value can be set using a percentage (0..100). By default it's very soft white (all three components at 15%).

In most animations you won't have to change the global ambiance but it's sure nice you can if you want. But beware it's not a good idea to set the color level to near white (100%) because you will loose the shading effect in the previews, meaning everything red is exactly the same grade of red resulting in loss of perspective. In general you should keep it below 30% for best results.

Directional lights

Directional lights are light sources like the sun, their rays are parallel so it will lit everything in the scene from a certain angle (see below picture).

directional light overview

By default every new animation automatically gets a directional light you'll find it as "Light 1" under the "Directional lights" subbranch of the "Lights" object. The object has six major property groups, namely: 'Main', 'Active', 'POV-Ray', 'Position', 'Point at' and 'color'.

The main group contains 'name', 'init to rest values', 'Render in preview' and 'Render in POV-Ray' properties. Name should clear, 'Init to rest values' has the same purpose as in the 'character' and 'global ambiance light' objects.

'Render in preview' lets you specify if preview renderings should include this light. This is handy for animation with many lights which may cause the rendering become to slow. Also some light might be POV-Ray specific (more on this in the export chapter). 'Render in preview' does much same it controls if a light will be included in the POV-Ray export.

Next group is are 'POV-Ray' properties, this lets you set an area of POV-Ray specific characteristics for this light. Please note this will not be noticeable in the previews. The preciouse meaning of all properties will be handled in the export chapter.

Just like the 'global ambient light' object you can control it's activity by using the binary animation element accessible from the 'active' property group.

Directional lights use 'position' and 'point at' coordinates to place them in a scene. These can be set with using the identical named property groups encapsulating six analog animation elements. One thing to keep in mind while placing directional lights is to make sure there position is outside your scenes boundary box. This means it should be further away then the most distant model on screen. Doing so will prevent unexpected results in POV-Ray exports.

Last in the list is the 'color' property group. This off course controls the light color for the light source. It uses the previously discussed three analog animation elements for the red, green and blue sub components of a light color.

Point lights

Point lights are like floating light bulbs the spread light from their position into every direction (see below picture). Point lights are usually used to simulate artificial light sources like, guess what, a light bulb on the ceiling of a room.

point light overview

You can temporary create a point light for inspection during this chapter by right clicking the 'Point lights' branch under the 'lights' object, and clicking 'new'.

The available property groups are very similar to the 'directional light' object except for a missing 'point at' group. This is because like said the light spreads in all directions starting from the lights position.

I don't think it necessary to repeat their meaning, because their behavior is identical to those of the 'directional' light object.

Don't forget to delete the point light if you created one.

Spot lights

Spot lights are very much like point lights except instead of spreading their light in every direction they act asif part of it has been blocked. All what remains is a infinite widening cone of light in a specific direction.

A 'spot light' object has the same property groups as the 'directional light' plus one additional one, namely 'radius'. As with the point light I will not repeat myself by explaining their meaning again.

This 'radius' property group is used to define an analog animation element which controls the radius of the 'light cone' for this spot light. This is controlled in degrees, see below picture.

spotlight overview

Like before you can temporary create a spot light to inspect it's contents during reading these texts, but don't forget deleting it afterwards if you are working alongside on the excavator project.

Light overview dialog

When you use a lot of lights in your animation it is easy to loose sight of what light must be rendered and or are active. For this their is a little overview dialog you can open from the 'Lights' object by clicking it's only button (the one with two little light bulbs). Doing so will open the below dialog

lights overview dialog

In this example there are four light objects in the animation. The dialog instantly shows which ones are currently active, which ones will be rendered in the OpenGL previews and which ones will be included in a POV-Ray export. You can change any of these three options clicking the check boxes on their corresponding row in the grid.

In the right bottom conner the dialog reports how many OpenGL lights are needed in the current state. This is useful information to know because most OpenGL drivers only allow for 8 hardware accelerated lights at one time.

Cameras

In the real world cameras are used to record stuff. In animation they're used to 'look' at a specific place. This is because the whole word is a recording in animation. You can play 'events' over and over again without having to do 'takes'. Basically you first 'create' the world and its events and then you decide which parts of it you want to 'see'.

There are three kinds of cameras in LD4DStudio, namely: First person, third person and advanced. Internally all cameras are actually the same (advanced to be exact), but it can be useful to be able to control their position and the thing they look at in different ways. This is where the separation comes into play.

By default a third person camera will be created for each new animation, so lets examine this kind first.

Third person camera

You could grasp the third person camera concept by imagining a rope attached to the ground with a camera attached to the other end (see picture below). While you keep the rope straight the camera always looks at the point on the ground no matter where you move the other end to.

Third person camera overview

Let examine the 'camera 1' object to get more insight. Locate the 'cameras' object in the animation branch. Expand it and it's child 'Third person cameras'. There you'll find the 'camera 1' object. This camera is automatically created for any new animation to get you started. Select it to inspect it's properties.

Like most objects there is a main property group containing the familiar name property. It also hold the 'init to rest values' property we've talked about a couple of times before. It's true meaning will become clear in the sequence chapter.

The object also has a POV-Ray property group. This can be used to configure POV-Ray specific behavior, none of these settings will be visible in the previews. The precise meaning will be discussed in the export chapter.

Next are three groups of analog animation elements, namely: 'look at', 'angles', and 'distance'. Look at lets you control the point the 'rope' is attached to the 'ground'. 'Angles' lets you move the other end of the 'rope' around. The X and Y axis determine where the 'camera floats' and the Z-axis let's you 'roll' the camera around the length of the 'rope'. 'Distance' off course lets you set the length of the 'rope'.

First person camera

With third person cameras the look at point is 'fixed' and therefore the camera position is calculated by using the angles and distance. With first person it's the reverse. The best example is by comparing your own head with a camera. By moving your neck you 'look' at stuff around you. It's the same with the first person camera. See below picture for an overview.

First person camera overview

Lets create a first person camera to examine it's object. Locate the first person camera object and create a new one. It will be called 'camera 2'. It's properties are much the same. Most important are the 'POV-Ray', 'position', 'angles' and 'distance' groups. The POV-Ray properties will be handled in the export chapter. The remaining groups are analog animation elements.

'Position' controls where the camera is located. 'Angles' controls how the camera (you're neck) is tilted. X and Y jet again control up/down and left/right and Z lets you 'roll'. Distance controls where you 'focus' but this aspect is not used in LD4DStudio at the moment, it might be in the future though.

We will not be needing a second camera at the moment so you may delete 'Camera 2' by selecting it's object and clicking the '-' button in the object inspector.

Advanced camera

Like I said, internally all cameras are 'advanced cameras' which means both position and lookat must be set manually by entering world coordinates (see below picture). This is quite complex and not very user friendly, but sometimes you do want full control of the camera. In those cases you can use the advanced camera.

Advanced camera overview

Lets temporary create a new advanced camera and examine its properties. The most important properties are 'POV-Ray', 'Position', 'Look at' and 'Roll'. 'POV-Ray', 'Position' and 'look at' should be clear from the first and third person camera explanations.

'Roll' lets you rotate the view of the camera around the line from 'position' to 'look at', much the same as with the Z axis in the angle groups of the other camera kinds.

When done looking at the advanced camera object you may delete it.

Variables

Characters, Lights, cameras they all have a number of animation elements you can use to animate stuff. But sometimes it's handy to have a virtual animation element. An element not associated with any 'real' object. For this the "variables" object is available in any animation branch.

Locate the "variables" object, you'll see it has two sub objects: "Analog" and "Binary". This is because you can create either an analog or binary animation element variable. Select the analog one and click the 'New' button in the object inspector. The new object called "Variable 1" is quite simple. It only has a few properties. The name and 'init to rest values' should be familiar by now.

The 'data' group encapsulates the variable's animation element. It can be used like any other 'real' animation element. So you can enable/disable the animation element, control it's constrains and set it's current value.

To understand the use of variables check out the 'technicCar' project in the samples folder of your installation after reading about sequences.

8. Characters | | 10. Monitors
Best viewed with Firefox 2, Seamonkey or IE 7 at 1024x768 or higher resolution.
 
LEGO is a registered trademark of the LEGO Group, which does not sponsor, endorse, or authorize this website.