Graphics Programs Reference
In-Depth Information
9.9.2 Example 2: Spotlight Size
To show how the spotlight may be animated, we first need to put a spotlight into the Blender
scene. Let's start again with the default Blender scene with the cube. Change the 3D window
to show the front side view and deselect the cube with the A key. With the cursor in the 3D
window, hit number pad 1, hit Shift + the A key, then select “Add” - “Lamp” - “Spot.” You
will see some orange lines appear in the 3D window. Hit the G key (grab) then the Z key and
move the mouse up. The G key lets you grab the spotlight so you can move it and the Z key
confines the movement to the z -axis. You could also have clicked with the LMB on the blue
arrow of the 3D manipulator widget and moved the spotlight up the z -axis. You will see that
you have actually moved a cone in the screen. Hit the S key and move the cursor towards
the apex of the cone to scale the spotlight down a bit. The light is at the apex of the cone and
the circle at the bottom represents the circle of light it would generate.
Now go to the properties window and press the “Object Data” button to display all the
buttons that control the properties of the spotlight. Look for the “Spot Shape” tab and you'll
notice the button with “Size: 45” in it, which indicates that the angle of the cone is 45 de-
grees. The timeline window is again across the bottom of the screen and the green line
indicates that we are at frame number 1.
Right click on the “Spot Shape Size” button and select “Insert Keyframes” from the menu
that displays. The “Size” button will turn yellow indicating that you have inserted a key
frame in the timeline. Scrub the green line in the timeline to frame 50. The “Size” button
turns green because there is no key frame at frame 50 yet. Left click on the “Size” button
and, while holding the mouse button, move the mouse to the left, decreasing the value of
the cone angle. The angle of the cone in the 3D window will decrease accordingly. Right
click on the “Size” button and select “Insert Keyframes” again, and the button turns yellow.
We now have a key frame at frame 50. Scrub the green line in the timeline window between
frames 1 and 50 to see the angle of the cone change. You have animated the spotlight size.
Note: Many properties can be animated this way by inserting key frames and chang-
ing property values. You have lots of experimenting to do.
9.10 Keying Sets
You can add multiple properties to a group called a keying set , which allows you to ani-
mate a whole bunch of stuff at one time. You do this by first defining a keying set. We will
again look at our cube actor in the default Blender window. Let's say you want to have the
cube move along the x -axis and change color at the same time. Not too difficult—just add
a bunch of key frames. But consider if you had a lot of property changes. Adding all those
key frames one by one could become tedious. It would be nice if you could do the property
changes then hit a button to add all the key frames in one go. Let's do it.
With the cube selected in the 3D window, go to the properties window. We will consider
the movement part of the exercise first. Click on the “Object” button in the header and find
the “Transform” tab and the “Location” buttons. You will see the values X: 0.000, Y: 0.000,
 
Search WWH ::




Custom Search