The Creator object is a level-object construct that generates duplicate copies of its sub-objects during an animation. However, for the Creator object to work, the level that contains the Creator must have the Simulation property turned on. There are many uses for creator objects: bullets being shot from a gun, bees leaving a hive, water dripping from a faucet, just to offer a few examples. Creator objects can be animated using keyframes or paths, just like many other object types.
In this tutorial, we set up a simple simulation where a Creator object throws spheres in all directions.
Sample project file: 'tutorprojects/simulation/emitter'
Right click in the Select window and choose 'New/Creator from the popup.
Add a small analytic sphere inside the hierarchy of the Creator object.
Select the creator object and then choose 'Tools/Simulation/Define Spin' from the main menu to define a spin for the creator level. You need to enter three points through the View window to define the spin. Click once near the left center of the view. Click the second point 5 cm (2 inches) horizontally to the right. Click the third point about 5 cm vertically up from the second point. This creates a counterclockwise spin.
Select the root level and activate the Simulation property for it from the tool control bar. Now play the animation. The creator object emits spheres as it spins. However, note that only the creator object itself is spinning - the spheres it emits do not spin. Now it is time to modify some of the default values.
Select the Creator object, open the Property window's Spec tab, and examine the values of the attributes.
The Parent Level attribute specifies how many hierarchy levels above the creator the emitted objects are inserted. The default is 0, which causes objects to be inserted at the same hierarchy level that contains the Creator object.
The Creation Interval attribute defines the time interval between the creation of emitted objects; that is, it defines how rapidly the Creator emits objects. The smaller the value, the more objects are created. The time interval is specified in the current time units (defined through the Options window). So, for instance, if your time units are frames, setting the creation speed to 15 will cause a sphere to be emitted every 15 frames, or two times per second for an NTSC video system.
The Life Time attribute defines the time interval that an emitted object is active before being destroyed (i.e. its lifespan). The smaller the value, the shorter the object's life. The time interval is specified in the current time units (defined through the Options window). So, for instance, if your time units are frames, setting the Life Time to 15 means a sphere is active for 15 frames (0.5 seconds in NTSC video) before being destroyed.
The Velocity attribute defines the rate at which a sphere moves, in meters per second. Since this attribute is a vector value, you define velocities along the three axes. To get motion only along the X axis, you would enter a value such as "0.5 0 0". Velocity is defined in the Creator object's space.
The Spin attribute defines the rate at which an emitted object spins. Since this attribute is a vector value, you define the spin along the three axes.
Set the following attribute values (make sure the Time system is set to 'frames' in the Options window/animation tab):
Creation Speed = 10
Life Time = 30
Velocity = 0.75 0 0
Spin = 1 1 1
Play the animation. Not bad, but it could still use some fine-tuning. How about adding some gravity to make it more interesting.
Click the Simulation tab on the main toolbar, and activate the Distant Gravity tool. In a View window, enter two points so that you define a vertical line pointing down. You now have a Distant Gravity object in the hierarchy (it should be placed at the same level as the Creator object). Select the Distant Gravity object, open the Property window's Spec tab, and set the Strength attribute to 0.2.
Now select the sphere inside the Creator object level. Open the Property window, and on the Sim tab set Gravity = Affected. On the Phys tab, set the sphere's mass to 0.5. Finally, select the Creator object and on the Spec tab set Creation Speed = 5, Life Time = 90, and Velocity = 0.25 0 0. Play the animation.
In this tutorial we create a simple FA-18 fighter flying around and shooting.
Sample project file: 'Tutorprojects/simulation/fighter'
Model a simple fighter. Make sure all fighter parts are in one level, called 'fighter'.
Insert two Creator objects into the fighter level, one for each wing. Since we are going to use path animation to move the fighter, the guns should naturally move with the fighter.
Create a small sphere that represents a bullet, duplicate it, and move one sphere inside the hierarchy of each Creator object. Position the spheres, so they are in the barrel of a gun; one sphere on the left side left, one on the right.
Select both Creator objects and open the property window's 'Spec' tab. Set the Velocity attribute to 1.0 0 0. In other words, the "bullets" will move at 1.0 m/s (real world bullets move much faster, but this way we have a chance to see them).
You can now play the animation to make sure that the pilot shoots the bullets into the correct direction. If not, either modify the Velocity attribute (try negative values), or simply rotate the creator levels.
Create a NURBS curve to define a motion path for the fighter. Use the 'Tools/Lattice Mapping/Create Path Animation' tool to map the fighter to the path.
Select the parent level of the Creator objects, and activate the Simulation property. This makes the simulation system calculate the velocities of the bullets that are created.
Play the animation. The fighter shoots "bullets" as it flies.
Sample project file: 'tutorprojects/simulation/bubbles'
The attributes of the objects which a Creator object duplicates during animation playback can be controlled using materials. The Channel gadget below each attribute in Creator object's 'Spec' tab is used for this purpose.
The following "bubble emitter" example demonstrates how you can use this feature.
First, add a Creator object into the scene. Now create an array of nine spheres, arranged as shown in the following illustration, and place them all inside the Creator object level.
Next, select the Creator object, and drag & drop the "granite" material from the material library onto the View window. The hierarchy should look like that shown above.
With the Creator object selected, open the property window, go to the 'Spec' tab, and set the Velocity to the direction perpendicular to the sphere array (this would be '0 1 0' in the sample scene).
Select Channel = Color from the drop-down list below the Creation Interval attribute. The color defined by the Granite material will define how frequently bubbles appear from each sample sphere. The actual creation frequency is the product of the material channel value and the value set in the Creation Interval field. The latter can be used to scale the values defined by the material.
Select the Parallel Mapping object. Go to the 'Simulation' tab of the main toolbar and activate the Velocity tool. Then draw a vertical velocity line downward.
Select the parent level of the Creator object and activate the Simulation property from the tool control bar.
Play the animation. The creation frequency is different for each sample sphere. In addition, note that because the granite mapping moves, the creation frequencies also change continuously.