|
Please note that This document is no longer up-to-date. (Though it is still valid.)
Please note that a more up-to-date document is available. A paper has been published that
covers the topic in a more comprehensive way. It proposes besides the Damper nodes also the
group of Chaser nodes that are usefull in cases where the Dampers fail.
To the paper: Linear Filters - Animating Objects in a Flexible and Pleasing Way
If you decide to continue reading this document, please keep in mind that now some fields on
the Damper nodes have
changed their name.
|
The PositionDamper node alows to smoothly move objects
around in the scene. It is used to animate fields of the SFVec3f type.
See the Damper PROTOs page for a general description of the Damper nodes.
EXTERNPROTO PositionDamper
[
eventIn SFVec3f set_input
field SFVec3f initial_input # 0 0 0
eventOut SFVec3f output_changed
field SFVec3f initial_output # 0 0 0
eventIn SFVec3f set_output
exposedField SFFloat tau # 1
field SFInt32 order # 1
field SFFloat eps # .001
eventOut SFBool isActive
eventOut SFBool isLoaded
]
"Dampers.wrlPositionDamper"
|
|
|
Explanation of the fields:
See the page about all Damper PROTOs.
It contains a general description of the fields to which there is nothing to
add to here.
The Demo:
The page demonstrates the PositionDamper as well as the
OrientationDamper node. It shows the effect of different
values of the order field with the same value of the
tau field.
There are six object in the scene, each inside a Transform
node. A Script node sets the
translation and rotation
field for the left most object to a random value every one or up to two seconds. Therefore the first
object jumps around on the screen.
These SFVec3f and
SFRotation events are also ROUTEd to
the set_input
eventIns of five PositionDamper
nodes, each of which has its order
field set to a different value ranging from 1 to 5. But their
tau fields all are set to the same value 0.4 .
The output_changed
eventOut of each such PositionDamper drives
the translation field of
one object, with the order
value increasing from left to the right.
The same scheme applies to the SFRotation
events that are ROUTEd through OrientationDamper
nodes to the rotation fields of the objects
Transform node.
Therefore each object shows the effects of a different value for the
order field. The left most object
can be said to have an order value
of 0 because there is no PositionDamper
between the Script and the objects
Transform node. This object immediately jumps
to the position the Script
emits. The next object has an order value
of 1 and its movements are smooth animations that follow the movements of the left most
object. Each time the left most object changes its position, this object immediately
assumes a new direction of movement to reach its new destination.
The next object is driven by a PositionDamper
with an order value of 2. This is equivalent
to having two PositionDamper nodes
between the Script and the objects
Transform node. The objects movements are
somewhat more smooth than the movements of the object with
order set to 1.
When the left most object changes its position, this object does not immediately, but
very quickly assume a new direction of movement. This effect increases towards the
right most object which performs very smooth movements. If it would have enough time,
the right most object would eventually reach the position of the left most one.
There are some Viewpoints defined that
you can try out.
__.-.__ end of document
|