Go To Rotation Test

The Go To Rotation test enables a smooth transition in the rotational component of a particle, so that the particle can gradually rotate to a specific orientation over a specific period. An example of its usage would be with falling leaves, which spin chaotically as they fall, but land on a flat side rather than an edge. The test aspect lets you direct the particle to a new event when the transition period ends.

To set a target orientation, place the Go To Rotation test before an orientation-type operator (Rotation or a Script operator if it defines the rotation channel) in the same event. In this situation, the Go To Rotation test can grab the particle rotational component before the orientation-type operator overwrites it. The Go To Rotation operator modifies the particle orientation and spinning in the post-evaluation cycle. For an example, see the procedure below.

Warning: The Go To Rotation test is not compatible with the Spin, Shape Facing, and Shape Mark operators. Do not use any of these operators in the same event with a Go To Rotation test.
Note: You can define the transition period only in terms of time. You cannot set the test to come to a specific rotation by the time of another test, such as a collision test. Also, limited control is provided over the axis of spinning when a particle comes to the final rotation.

Procedures

Example: To make falling particles land smoothly, face up:

    This procedure assumes a basic knowledge of Particle Flow usage.

  1. In the Perspective viewport, add a Particle Flow system and raise its icon about 80 units on the Z axis.
  2. In Event 01, make the following changes:
    • Birth Amount=50
    • Speed=100
    • Shape=Cube (or use Shape Instance with a custom object, such as a coin-shaped cylinder)
    • Display Type=Geometry

    This reduces the number of particles and slows them down, making it easier to see what's going on.

  3. Add a Spin operator to Event 01, and set both Spin Rate and Variation to 150.

    This gives the particles random spinning behavior as they fall.

  4. Add an Age test to the end of Event 01, and set Test Value=15.

    This allows each particle to fall and tumble for 15 frames before Go To Rotation takes effect.

  5. From the Depot, drag a Go To Rotation test to an empty area in Event Display. Set Duration=15 and keep all other default settings.
  6. Insert a Rotation operator immediately after the Go To Rotation test. Choose Random Horizontal as the orientation matrix. Keep the other default settings.

    The Go To Rotation test will use this as the final orientation for the particles.

  7. Use a Speed event to create a third event. Set Speed=0.0.

    This stops the particles at the end of the animation.

  8. In both new events, set Display Type=Geometry.
  9. Wire the Age Test in Event 01 to Event 02, and then wire the Go To Rotation test in Event 02 to Event 03.
  10. Play the animation.

    The particles tumble chaotically as they fall for about 30 frames, and then come to a smooth stop, facing up.

Interface

The user interface appears in the parameters panel, on the right side of the Particle View dialog.

Test True When group

Transition Period Ends
When on, the particles test True at the end of the specified transition period, and become eligible for redirection to the next event. When off, particles will not go to the next event, even if wired. Turn off to disable the test aspect of Go To Rotation. Default=on.

Transition By group

Determines how Particle Flow applies the specified timing, defined by the Time and Variation values. Default=Event Duration.

The possible options are:

  • Absolute Time Time refers to the overall time of the system. Each particle will reach its target orientation at the frame number specified by Time.
  • Particle Age Time refers to the time elapsed since the birth of the particle. Each particle will reach its target orientation when its age reaches the value specified by Time.
  • Event Duration Time refers to the time elapsed since the particle entered the current event. Each particle will reach its target orientation when it has been in the current for the number of frames specified by Time.
Duration
The number of frames particles should take to reach the target orientation. Default=30.
Variation
The number of frames by which Duration can vary randomly. Default=0.

To obtain the actual time to the target orientation for each particle, the system multiplies the Variation value by a random number between -1.0 and 1.0, and then adds the result to the Duration value. For example, if Duration=60 and Variation=20, then the time to target orientation for each particle would be between 40 and 80 frames.

Target Rotation group

When you use an orientation-type operator with Go To Rotation, this setting lets you determine whether the test sets the target orientation on a one-time or ongoing basis.

  • Constant (The default.) Defines that the orientation-type operator sets a constant orientation for a particle.

    For example, when using a Rotation operator set to an orientation matrix other than Speed Space Follow, the Go To Rotation operator would acquire the target orientation only once, and then use it as its goal.

  • Changing Defines that the orientation-type operator sets a changing rotation for a particle. At each frame the desirable final rotation may be different.

    For example, if you use the test with a Rotation operator set to Speed Space Follow, the test will adjust the particle rotation constantly to aim at the changing final rotation.

Target Rotation Spin group

Defines the angular velocity for each particle when it reaches the target orientation.

Match Initial Spin
Sets the angular velocity at the end of the transition period to the same as the angular velocity when particle enters the event.
Note: The axis of rotation might still be different, because it is calculated on the fly to let the particle come to the target orientation.
Spin Rate
Defines each particle's angular velocity, in degrees per second, when it reaches the target orientation. Available only when Match Initial Spin is off. Default=0.0.

For a smooth transition to the target orientation, set to 0.0.

Variation
Defines a random variation in the Spin Rate value when a particle reaches the target orientation. Default=0.0.

To obtain the final angular velocity for each particle, the system multiplies the Variation value by a random number between -1.0 and 1.0, and then adds the result to the Spin Rate value. For example, if Spin Rate=6.0 and Variation=1.0, then the final angular velocity for each particle would be between 5.0 and 7.0 degrees per second.

Ease In %
Defines a curve in achieving the final spin rate. Default=0.0

When set to 0.0, the test produces a linear interpolation between the initial and final spin rate, and when set to 100.0, the final spin rate is achieved earlier. For the smoothest approach to the target orientation, set Spin Rate and Variation to 0.0, and Ease In to 100.0.

Transition End group

Stop Spinning
When on, halts particle rotation when it reaches the target orientation. Default=on.

Even with Spin Rate spinner set to 0.0, we recommend that you keep this checkbox on to avoid slow spinning at the end, due to computational averaging and marginal errors.

Uniqueness group

The Uniqueness setting enables randomization of the Variation options.

Seed
Specifies a randomization value.
New
Calculates a new seed using a randomization formula.