ClipState Dialog

Track View > Global Tracks > Block Control > GlobalClip Properties > Synthesis dialog > State Tab > New State > Edit Properties > ClipState dialog

Select a Crowd helper. > Modify panel > Global Clip Controllers rollout > New > Choose GlobalClip object. > Select object in list. > Edit > Synthesis dialog > State Tab > New State > Edit Properties > Clip State dialog

Use the ClipState dialog to associate states with clips. A clip can be selected to play based various aspects of a delegate's motion: speed, acceleration, pitch, pitch velocity, and/or heading velocity. You can also define a state with a script. You can turn each state aspect on and off individually. For example, you can have speed and pitch turned on to include these parameters when the motion is synthesized. These parameters all depend upon motion trajectory information and specify whether or not a state will be active.

For each state's active aspect(s), you specify a range of values between which a state will be active. Alternatively, you can specify a single, unique motion value for when a state is active. In addition, you specify the in and out values of the parameter as it approaches and then passes through that unique value. These values are analogous to the tangents of a curve. You can pick Anything, Decreasing, Increasing, or Constant. For example, a landing animation can have a Unique speed value of 0.0, a Decreasing in value and an Anything out value. Taking off, on the other hand, would have an Increasing out value.

If no state parameters are used, the state is a default state. For example, you have clips to be randomly chosen for an object, and you don't care about what the speed or pitch is. You can create default states and the synthesis engine will randomly pick which clip is active.

Note: "ClipState" is the default name of this dialog, because it's the default name of the first state created in the Synthesis dialog > State tab. It's the dialog invoked by clicking the Edit Properties button. If you rename the state, the dialog assumes the changed name.

Automatic State Creation

A state can be created automatically if Create State is turned on in the Motion Clips tab of the Synthesis dialog. This is used if you created a creature that contains lateral motion as well as looping motion. If all the options are turned on in the Remove Local group of the MotionClips tab then a state is created that reflects the actual heading, speed and acceleration of your creature. When a delegate approaches the heading and speed contained in this state it triggers the appropriate motionclip. This method prevents sliding feet in a multi legged creature animation.

See also

Procedure

To use the Synthesis and ClipState dialogs

This procedure assumes that the global object is static and has animation that loops. For creatures with many legs you can animate lateral motion on the global object and then strip out the lateral motion in the synthesis dialog. This latter approach is to minimize foot sliding in a multi-legged creature.

  1. Animate an object.

    Create animation in one position, like a bird's beating wings. Create a variety of animation like a gliding motion, wings beating slowly, and so on.

  2. Use Shift-Move to create as many clones of the animated object as necessary.

  3. In Create > Helpers > Object Type rollout use Crowd and Delegate to create a crowd object and a delegate object.

    Create the crowd and delegate objects in the top viewport.

  4. Use Crowd's Scatter Objects to clone the delegate and distribute the clones.

    Make sure you end up with an equal number of delegates and animated object clones.

    Next, associate and link the objects to the delegates.

  5. On the Setup rollout, click the Object/Delegate Associations button.

    The Associate Bipeds With Delegates dialog appears.

  6. Add the objects and delegates into their respective columns.

  7. Click Align objects with Delegates and Link Objects with Delegates, and then click OK to exit the dialog.

    The objects align themselves with the delegates and are linked to the delegates.

    Next, animate the delegates using a behavior. See the Crowd documentation to animate the delegates using behaviors.

    At this point, when you solve the simulation, the objects follow the delegates that are guided by behaviors.

  8. Select the Crowd object. On the Modify panel > Global Clip Controllers rollout click New, and use the Select dialog to select the original animated object.

    The object appears in the Global Clip Controllers rollout list.

  9. In the list, click the original object and then click the Edit button.

    The Synthesis dialog displays.

  10. On the Motion Clips tab turn off Create State, Remove Local XYZ and Orientation.

    Use these options only if your original object has lateral motion to coordinate with footsteps.

  11. On the Motion Clips tab click New.

  12. Choose a descriptive name and a frame range for the motion clip.

    At this point you need to specify a frame range for a part of the animation. For example, frames 0 through 10 might be your glide animation.

  13. Continue to create new clips using different frame ranges. Give the clips descriptive names.

  14. Open the State tab and click New State. Give it a descriptive name. In many cases, the state can use the same name as the motion clip that's to be associated with it.

    At this stage you should have two or three motion clips. Now you need to associate a clip with this state. For example, your glide motion should be active only if acceleration is less that 0.

  15. Click Add Clip and select a clip in the Select MotionClip dialog.

  16. Click Edit Properties and activate the clip based on any combination of speed, acceleration and so on. Open the appropriate tab(s), turn on its Use ... check box, and set appropriate parameters. Click Exit to exit the dialog.

    Make sure Min settings are smaller than Max settings. For example, when using a negative range (-180 to -10), enter the number with the larger absolute value (-180) as the Min setting.

  17. On the Synthesis tab click New Master Motion Clip and add all of the cloned objects.

  18. Click Auto Blend All and then click Synthesize All. Exit the dialog.

  19. Click Play. It's not necessary to re-solve the simulation.

    The objects follow the delegates and are animated using clips that are activated according to the states you created.

    For a tutorial covering this procedure, see Using Crowd with Animated Non-Biped Objects.

Interface

Make sure Min settings are smaller than Max settings. For example, when using a negative range (-180 to -10), enter the number with the larger absolute value (-180) as the Min setting.

Speed

Use Speed: Use speed to make a clip active.

Range: Use a speed range to make a clip active.

Range Display: Displays minimum, average, and maximum clip speed.

Min: Set a minimum speed value.

Max: Set a maximum speed value.

Unique: Use a unique speed to make a clip active.

Value: Set a unique speed value.

In/Out

These conditions specify what the value of the parameter is before and after the unique value is met. It can be Increasing, Decreasing, Constant or Anything in which case in can be either of the first three. This allows you to specify under what conditions is that value occurring. For example, say the unique value is a speed of 0, and the In value is Decreasing and the Out value is Constant this means that the object has decreased it's speed to zero, and is now stationary, a perfect state to trigger a landing animation (clip).

Anything: Speed into or out of the target value is not important.

Decreasing: Speed into or out of the target value is decreasing.

Constant: Speed into or out of the target value is constant.

Increasing: Speed into or out of the target value is increasing.

Scale Playback Speed group

Scale Animation: Scale the clips animation based on speed.

As a bird flies faster its wings beat faster for example. Scaling an animation scales the keys of the animation. The closer the keys are to each other the faster the animation plays.

Percentage: Specify how much to alter the playback speed based upon the difference from the Base Speed.

For example, if an object is moving 50% faster than it's base speed, and the Scale Percentage value is 50%, then the playback speed is scaled down by 25%.

Base Speed: Specify at what speed should the animation be played back at its normal rate.

Exit: Exit the ClipState dialog.

Acceleration

Use Acceleration: Use Acceleration to make a clip active.

Range Display: Displays minimum, average, and maximum acceleration.

Range: Use an acceleration range to make a clip active

Min: Set a minimum acceleration value.

Max: Set a maximum acceleration value.

Unique: Use a unique acceleration to make a clip active.

Value: Set a unique acceleration value.

In/Out

Anything: Acceleration into or out of the target value is not important.

Decreasing: Acceleration into or out of the target value is decreasing.

Constant: Acceleration into or out of the target value is constant.

Increasing: Acceleration into or out of the target value is increasing.

Scale Playback Speed Group

Scale Animation: Scale the clips animation based on acceleration.

As a bird accelerates its wings beat faster for example.

Percentage: Specify how much to alter the playback speed based upon the difference from the Base Acceleration.

Base Acceleration: Specify at what acceleration should the animation be played back at its normal rate.

Pitch

Use Pitch: Use pitch to make a clip active.

Range Display: Displays the minimum, average, and maximum pitch of the clip.

Range: Use a pitch range to make a clip active.

Min: Set a minimum pitch.

Max: Set a maximum pitch.

Unique: Use a unique pitch value to activate a clip.

Value: Set a unique pitch value

In/Out

Anything: Pitch into or out of the target value is not important.

Decreasing: Pitch into or out of the target value is decreasing.

Constant: Pitch into or out of the target value is constant.

Increasing: Pitch into or out of the target value is increasing.

Scale Pitch Orientation

The Scale Pitch parameter lets you scale the pitch the animation is played at depending upon the pitch of the object. In the default case when the Scale Pitch is off, the object will pitch normally. If it is turned on you can select a Base Pitch for a pitch for which the animation should play at, plus a percentage to specify how much the BasePitch is modified by the true pitch of the objects direction. If the Percentage is 100 then the BasePitch will be active; anything else will scale between the BasePitch pitch and the true pitch. This is useful for when birds and other objects elevate, but don't pitch up.

Scale Pitch: Scale the clips pitch based on pitch.

Percentage: Specify how much to alter the pitch based upon the difference from the Base pitch.

Base Pitch: Specify a base pitch.

Scale Playback Speed

Scale Animation: Scale the animation based on pitch.

Percentage: Specify a percentage to scale speed.

Base Pitch: Specify at what pitch should the animation be played back at its normal rate.

Pitch Velocity

Use Pitch Velocity: Use pitch rate to make a clip active.

Range Display: Displays the minimum, average, and maximum pitch rate of the clip.

Range: Use pitch rate range to make a clip active

Min: Set a minimum pitch rate.

Max: Set a maximum pitch rate.

Unique: Use a unique pitch rate value to activate a clip.

Value: Set a unique pitch rate value.

In/Out

Anything: Pitch rate into or out of the target value is not important.

Decreasing: Pitch rate into or out of the target value is decreasing.

Constant: Pitch rate into or out of the target value is constant.

Increasing: Pitch rate into or out of the target value is increasing.

Scale Playback Speed

Scale Animation: Scale the animation based on pitch rate.

Percentage: Enter a percentage of pitch rate to scale speed.

BasePitchRate: Specify at what pitch rate should the animation be played back at its normal rate.

Heading Velocity

Use Heading Velocity: Use heading rate to activate a clip.

Range Display: Displays the minimum, average, and maximum heading rate of the clip.

Range: Use a heading rate range to activate a clip.

Min: Set a minimum heading rate value.

Max: Set a maximum heading rate value.

Unique: Use a unique heading rate value to activate the clip.

Value: Set a unique heading rate value.

In/Out

Anything: Heading rate into or out of the target value is not important.

Decreasing: Heading rate into or out of the target value is decreasing.

Constant: Heading rate into or out of the target value is constant.

Increasing: Heading rate into or out of the target value is increasing.

Scale Playback Speed

Scale Animation: Scale the animation based on heading rate.

Percentage: Enter a percentage of heading rate to scale speed.

BaseHeadingRate: Specify at what heading rate should the animation be played back at its normal rate.

Script

Allows you to create a MAXScript script that takes two parameters: node and time. The script typically tests one or more values, and then returns 1 to indicate that the state is active or 0 if it's inactive. Based upon the evaluation of this MAXScript function, the State is then determined to be active or not.

Scripts used by the clip controller are similar to those used by the cognitive controller, with the exception that a special time-related statement is required.

In the following sample script, "del" is the delegate's node, and "t" is the time. The name of the scripted function, "stoppedScript," would also need to be entered into the name field in the Script panel of the ClipState dialog. Unlike cognitive controller scripts, the statement "at time t" needs to be invoked because the animation is not running when the synthesis takes place.

fn stoppedScript del t = (

at time t

if del.pos.z < 65 then 1 else 0

)

Use Script: Turn this on to use a MAXScript script to control a clip.

Script Window: Enter the name of the function defined by the script, also found at the start of the script.

Edit Script: Edit the script.

 

 

 


Comments