Endorphin Tutorial
Endorphin Tutorial
NaturalMotion endorphin
Contents
Contents
Before you begin
8
9
11
12
14
17
18
19
19
19
21
22
23
25
25
26
26
27
28
31
33
34
34
35
37
38
41
42
43
NaturalMotion endorphin 3
TUTORIALS
44
44
45
46
49
50
51
53
55
58
58
60
61
61
62
66
70
72
73
75
80
81
81
83
83
85
87
88
88
89
90
90
92
93
94
96
99
NaturalMotion endorphin
Contents
100
100
101
102
104
105
106
106
107
108
110
111
112
112
113
114
117
119
120
121
124
126
127
127
128
129
130
132
135
NaturalMotion endorphin 5
TUTORIALS
136
136
138
139
140
140
142
143
144
145
147
148
148
149
150
151
152
154
155
156
156
157
158
159
160
160
162
163
165
167
168
168
172
174
178
NaturalMotion endorphin
Contents
179
179
179
180
182
183
185
186
187
187
188
188
191
192
193
193
196
NaturalMotion endorphin 7
TUTORIALS
TUTORIAL 1
Introduction to endorphin
Tutorial 1
Introduction to endorphin
In this tutorial, we will introduce some basic endorphin features and tools.
Starting from an empty scene, you will create animation using endorphins
adaptive behaviours.
Many commands have corresponding keyboard shortcuts. Whenever keyboard
shortcuts are described, these are the endorphin default shortcuts. You can
change keyboard shortcuts by selecting Options > Keyboard and changing
these settings using the Keyboard Options dialog.
NaturalMotion endorphin 9
TUTORIALS
Run endorphin. Each time endorphin is run, it creates a new default scene.
This scene contains a single endorphin character located at the origin in a
T-pose.
2.
Save the scene. Select File > Save Scene. The keyboard shortcut is Ctrl+S.
Alternatively, click the Save Scene button
on the Main Toolbar.
Scenes are stored as binary files with a filename extension of .ens. Once
you have saved the scene, the scene name is displayed in the System Bar.
To rotate a viewport, drag the mouse with the middle mouse button
down.
To pan a viewport, drag the mouse with the middle and right buttons
down.
To rotate a viewport, hold down the Alt key and drag the mouse with the
left mouse button down.
To pan a viewport, hold down the Alt key and drag the mouse with the
middle mouse button down.
To zoom a viewport, hold down the Alt key and drag the mouse with the
right mouse button down.
10
TUTORIAL 1
Introduction to endorphin
Press F to set the viewport type to Front View. Pressing F again toggles
between Front View and Back View.
Press L to set the viewport type to Left View. Pressing L again toggles
between Left View and Right View.
Press T to set the viewport type to Top View. Pressing T again toggles
between Top View and Bottom View.
in the Main
To reset a viewport:
If you have panned, rotated or zoomed a viewport, you can reset it back to its
default by selecting View > Reset Viewport. The keyboard shortcut is Ctrl+R.
Alternatively, right-click in the viewport and select Reset Viewport.
NaturalMotion endorphin 11
TUTORIALS
To run a simulation:
1.
2.
As the simulation runs, the character falls towards the ground, under the
influence of gravity.
3.
To replay a simulation:
1. To replay a simulation, click the Play button
on the Simulation
Toolbar. Alternatively, select Simulation > Play/Stop. The keyboard
shortcut is Spacebar.
on the Simulation Toolbar
2. To stop a replay, click the Play button
again. Alternatively, select Simulation > Play/Stop. The keyboard
shortcut is Spacebar.
You can drag the Time Slider on the Timeline Editor to manually browse
different frames of the animation. This is often called scrubbing the
timeline.
, Go To Previous Frame
, Go
To Next Frame
and Go To Last Frame
buttons in the Simulation
Toolbar. The corresponding keyboard shortcuts are Ctrl+LeftArrow,
LeftArrow, RightArrow and Ctrl+RightArrow.
12
TUTORIAL 1
Introduction to endorphin
To add a behaviour:
1.
2.
3.
Once you have added the behaviour, a new timeline marker will appear
on the Timeline Editor. This is the behaviour event marker. The orange
highlight colour indicates that the event is currently selected.
4.
With the new behaviour event selected, locate its Name property in the
Property Editor. The Name property indicates the behaviour type. Select
Stagger 3 from the dropdown list.
NaturalMotion endorphin 13
TUTORIALS
5.
6.
Test the behaviour event. Run a new simulation by clicking the Simulate
button in the Simulation Toolbar, or by pressing Ctrl+Spacebar. The
character should waver a bit and start to fall, and then move its legs to
attempt to stop the fall, and finally catch itself with its hands and elbows.
This motion is generated by the behaviour event.
14
TUTORIAL 1
Introduction to endorphin
You can compare the effect of the behaviour by enabling and disabling
the behaviour event. To disable a timeline event, turn off its Enabled
property using the Property Editor, or right-click on the corresponding
marker in the Timeline Editor and select Disable Event. When an event is
disabled it does influence simulations.
7.
2.
NaturalMotion endorphin 15
TUTORIALS
Once you have added the force, a new triangular timeline marker will
appear on the Timeline Editor. This is the force event marker. The orange
highlight colour indicates that the event is currently selected. In addition,
a force graphic appears in the viewport, indicating the magnitude and
direction of the force.
You can enter Selection mode for a force event by selecting the event,
and then clicking the [Select] hyperlink button in the Property Editor.
However, when you first create a new force event, endorphin
automatically enters Selection mode. In Selection mode, the viewport
label displays Selecting, and the cursor changes to the three-dot
selection cursor.
2.
3.
16
TUTORIAL 1
Introduction to endorphin
Select the force event marker in the Timeline Editor, or select the force
graphic in the viewport.
2.
3.
To edit the force using the force graphic, select the force, and then select
Edit > Rotate to activate the Rotate tool. The keyboard shortcut is W.
Alternatively, click the Rotate button
4.
To rotate the force direction about the X, Y or Z axes, click and drag the
red, green or blue circular manipulators.
To rotate the force direction in the screen plane, click and drag the outer
light-blue circular manipulator.
To freely rotate the force direction, click and drag the region inside the
outer circular manipulator. The inner region is displayed in light grey,
which indicates free rotation mode.
To cancel a rotation during a rotation, right-click anywhere in the
viewport.
5.
6.
For this tutorial, rotate the force so that it is directed forward towards the
head mass object. Also, set the magnitude of the force to around 3.0.
7.
NaturalMotion endorphin 17
TUTORIALS
To export animation:
1.
Specify the range of frames that you want to export. This is the Save Range.
The Save Range is displayed as a grey marker in the Timeline Editor.
18
TUTORIAL 1
Introduction to endorphin
2.
Select the character that you want to use as the exported animation data
source. The easiest way to select a character is to click the character in the
Timeline Editor. You can also use Node View to select a character. In our
example, select the Character01 timeline track.
3.
4.
The Export As dialog is displayed. Browse for a folder to export to, and specify
a new file name or select an existing file to replace it. Set the Save As Type to
specify the export file format. Click Save.
5.
The Export Options dialog is then displayed. Adjust any animation export
settings as required, then click OK to export the animation.
Some export formats allow the frame rate to be specified using the Frame
Rate setting. Other export formats do not allow the Frame Rate to be set in
this dialog. In these cases, endorphin will export using the Frame Rate
property in the Timeline Settings. A separate tutorial will deal with animation
export in greater detail.
Conclusion
In this tutorial, you have now produced animation data which can be exported
into your 3D pipeline.
This tutorial has only touched on the power that endorphin gives you. In later
tutorials, we will introduce more complex adaptive behaviours. We will pose the
character and show you how to build environment objects that characters can
interact with. We will also show how existing animation data can be imported,
modified and exported from endorphin.
NaturalMotion endorphin 19
TUTORIALS
Tutorial 2
Launch endorphin.
2.
Select File > Open Scene to browse for a scene. The keyboard shortcut
is Ctrl+O.
3.
20
TUTORIAL 2
Using multiple behaviours
earlier timeline event can cause a knock-on effect throughout the simulation.
Even small changes to earlier timeline events can have large changes as the
simulation progresses.
2.
3.
Adjust the timing of the behaviour so that it starts at Frame 0 and ends
around Frame 71. You can experiment with small changes to the start
and end frames, in order to generate slightly different animations.
For more information on adding behaviour events to characters, see
Tutorial 1: Introduction to endorphin.
You can change the Strength property of a Jump And Dive behaviour to
change the degree to which the character jumps. The default strength is
0.5. Experiment with different strength values.
Set the jump strength to 1.0. The character now jumps further. However,
if you will notice that at a strength of 1.0, the characters feet slip as the
character jumps.
Each time you change the strength or timing of the jump behaviour,
resimulate the scene to test the effect of the change. For more
information on running simulations, see Tutorial 1: Introduction to
endorphin.
NaturalMotion endorphin 21
TUTORIALS
Select the Cuboid01 collision object that the character is standing. You
can select this object by clicking in the viewport. Alternatively, you can
select this object using the Node View.
2.
3.
Resimulate the scene. You should find that the character jumps further
now that its feet do not slip on the platform.
22
TUTORIAL 2
Using multiple behaviours
2.
You can optionally specify targets for the left hand, right hand and head.
When a target has been specified for one of the hands, they will reach out
to follow the target. Similarly, when a target has been specified for the
head, the character will turn its neck to that it tracks the target object.
3.
With the new behaviour selected, click the [Select] command hotlink for
the Look At Target in the Property Editor. This places endorphin into
Selection mode. Select the Cuboid02 collision object as the look-at
target. This will make the character look at the railing during the
simulation. This behaviour works even when the both character and lookat target are in motion.
4.
Select the same Cuboid02 collision object as the Left Hand Target and
Right Hand Target. This will make the character reach out with both
arms towards the railing. Each time you add a new target object,
resimulate the scene. This lets you see the effect of each change you
make to the scene.
NaturalMotion endorphin 23
TUTORIALS
You can change the rate at which the character reaches for the target
objects. Select the Look And Reach behaviour, and change the Left Hand
Blend and Right Hand Blend properties to 0.2. If you resimulate, you will
note that the reaching movement of the arms is now slower.
You can also set different values for each arm for a slightly asymmetric
reach. This can make the reaching behaviour appear more lifelike.
By default, hands will reach for the centre of their target objects. In our
case, we would like the hands to reach for slightly different locations on
the target object. This will make the reaching behaviour appear more
lifelike.
Select the Look And Reach behaviour, and change the Left Hand
Interception Offset X and Right Hand Interception Offset X properties
to +0.3 and -0.3 respectively. These offsets are applied to the centre of the
target object. By using different offsets for each hand, they now reach out
in more plausible manner.
Resimulate the scene and note the change to the simulation with the
addition of these offsets. You can experiment with different offset values
for each hand.
2.
Adjust the Start Frame and End Frame properties of the constraint event
so that it starts at Frame 109 and ends around Frame 400.
24
TUTORIAL 2
Using multiple behaviours
2.
Constraint events have different types. In this tutorial you will use the
default Lock constraint type. This means that the constraint event will
lock to the positions and orientations of the selected mass objects over
the duration of the event.
2.
However, we would like to relax the rotation of the hands around the X
axis. This will allow the character to effectively swing around the railing.
To allow rotation about the X axis, select the constraint event, and set the
Angular Strength X property to 0.0.
3.
Run the simulation again. You should find that the character now jumps,
reaches for the railing and then catches it.
NaturalMotion endorphin 25
TUTORIALS
2.
You can also modify the Strength property of the Legs Kick behaviour.
The default strength is 0.5. Experiment with different strength values, and
run the simulation again to compare results.
Conclusion
In this tutorial, you have used multiple behaviours, along with constraint events,
to create more complex animation.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 2 - Using Multiple Behaviours\Tutorial 2 Using Multiple Behaviours - Complete.ens. This scene is an example of how
your scene should look if you have successfully followed all the steps in this
tutorial.
26
TUTORIAL 3
Posing the character
Tutorial 3
Launch endorphin.
2.
Select File > Open Scene to browse for a scene. The keyboard shortcut
is Ctrl+O.
3.
NaturalMotion endorphin 27
TUTORIALS
Before using the pose tools make sure the Time Slider is set to Frame 0.
2.
Select Edit > Pose Move and Edit > Pose Rotate to activate the Pose
Move and Pose Rotate tools respectively. The keyboard shortcuts are A
and S respectively. Alternatively, you can click the Pose Move
Pose Rotate
or
When you are using one of the pose tools, the viewport is displayed with
a red border.
3.
You can quickly toggle between the Pose Move and Pose Rotate tools by
double-clicking their corresponding manipulators in the viewports.
4.
We can edit the characters pose by dragging and rotating limbs. We can
also lock limbs in space to stop them moving once we are happy with
their orientation.
28
TUTORIAL 3
Posing the character
2.
Select the mass object you want to pose, such as the upper leg. The mass
object will be displayed in a red highlight colour to indicate that it is the
posed object. You can pose multiple mass objects at the same time.
The remainder of the character will be displayed in a light orange
highlight colour, indicating that these mass objects will be affected by
any pose operations that you perform on the selected mass object.
3.
Experiment with the Pose Move and Pose Rotate tools. Remember that
you can double-click on the pose manipulator to toggle between the
Pose Move and Pose Rotate tools.
4.
If you want to reset the character pose, select Character > Reset Pose.
on the Main Toolbar. The
Alternatively, click the Reset Pose button
Reset Pose command will place the character into its default pose. For the
standard endorphin simulation character, the default pose is a T-pose.
NaturalMotion endorphin 29
TUTORIALS
By default, the Pose Move and Pose Rotate tools use the global
coordinate axis system. However, you can also use these tools in the local
coordinate system of the mass object that you are posing. When you pose
using the local coordinate system, the pose tools work in exactly the
same manner, except that they use different X, Y and Z directions.
To toggle between global and local coordinates, select Edit > Toggle
Coordinate System. The keyboard shortcut is X. This setting affects both
the Pose Move and Pose Rotate tools. This setting is not changed if you
select a different mass object to pose.
You can dynamically pose more than one mass object at the same time.
When you do this, the relative positions of the selected mass objects are
maintained with respect to each other. In effect, you are locking the
mass objects together for the duration of the pose.
Typically, you will lock mass objects that are further down the joint
hierarchy from the posed mass object. Then, when you pose the first
mass object, the other mass objects automatically move as well, in an FK
(forward kinematics) manner.
In this scene, hold down the Ctrl key and select multiple mass objects,
such as the LeftUpperLegMass and LeftLowerLegMass mass objects.
The first mass object you select is displayed using the red highlight
colour, indicating that it is the posed mass object. Any subsequent mass
objects that you select are displayed in a dark red highlight colour. This
indicates that these mass objects are locked to the posed mass object.
30
TUTORIAL 3
Posing the character
Experiment with using the Pose Move and Pose Rotate tools in
conjunction with locked mass objects. Then click Reset Pose on the Main
Toolbar to reset the character back to its default T-pose.
Typically, you will freeze a mass object that is further up the joint
hierarchy from the posed mass object. Then, when you pose the mass
object, the frozen mass object defines the limit of mass objects that are
affected by the pose tools. That is, only joints downstream of the frozen
mass object are affected.
Experiment with locking the PelvisMass mass object and using the Pose
Move and Pose Rotate tools to pose the legs and feet of the character.
Then click Reset Pose on the Main Toolbar to reset the character back to
its default T-pose, and ensure that all the mass objects are active.
NaturalMotion endorphin 31
TUTORIALS
32
TUTORIAL 3
Posing the character
2.
3.
4.
Move the pelvis backwards and downwards until it makes contact with
the chair back and seat.
5.
Once the pelvis is in place, select the UpperSpineMass mass object, and
right-click on the PelvisMass mass object to freeze it. The PelvisMass
mass object should be displayed in the grey highlight colour, indicating
that it is frozen.
6.
Use the Pose Move tool to move the upper torso back against the chair
back. If any of the lower back parts rotate out of alignment, select them
and rotate them back using the Pose Rotate tool. You may need to lock or
freeze other mass objects to do so. Remember that you can toggle the
Pose Move and Pose Rotate tools so that they use local or global
coordinates by selecting Edit > Toggle Coordinate System, or by
pressing the X key.
NaturalMotion endorphin 33
TUTORIALS
7.
In a similar manner, use the dynamic pose tools to raise the characters
head and lower its feet towards the ground. Also, pose the arms so that
the characters hands are placed on the arm rests.
8.
You can save and re-used poses by selecting Character > Save Pose and
Character > Load Pose. You can also use these commands to load poses
into active poses. This is covered in a later tutorial.
Conclusion
In this tutorial, you have learned how to use the Pose Move and Pose Rotate
tools to pose characters using dynamic posing.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 3 Posing The Character\Tutorial 3 Posing
The Character - Complete.ens. This scene is an example of how your scene
should look if you have successfully followed all the steps in this tutorial.
34
TUTORIAL 4
Creating environments
Tutorial 4
Creating environments
In this tutorial, you will start building up the virtual world environment.
The default environment is a simple flat ground plane. However, it is easy to
build new environment objects such as buildings, walls and furniture, to provide
a richer environment for the endorphin characters to interact with.
You will also import a mesh to act as a visual guide for building the environment.
Launch endorphin.
2.
Select File > New Scene to create a new scene, and delete the default
character.
3.
4.
Click OK, then click Import in the Import Options dialog. The OBJ file is
imported and a corresponding graphical object is created.
This graphical object lets you visualise the scene that you want to create.
The next step is to fill out this mesh with collision objects so that the
endorphin characters can collide with the environment.
NaturalMotion endorphin 35
TUTORIALS
Click the Create Box Collision Object button on the Main Toolbar. This
creates a new collision object at the origin of the environment. The new
collision object is initially selected.
2.
Use the Move, Rotate and Scale tools to place this box into its correct
position at the foot of the staircase. You can also use the Property Editor
to set exact values for the position and size of each collision object.
A good technique when you are positioning collision objects is to watch
for intersections between the collision objects and the visualisation
graphical object in the viewport. Usually, your goal will be to position
collision objects as close as possible to the visualisation surface without
penetrating it.
Note You can double-click on Move, Rotate and Scale tool manipulators
to cycle through these manipulators. Alternatively, you can use the Q, W
and E keyboard shortcuts to rapidly change the active editing tool.
36
TUTORIAL 4
Creating environments
2.
3.
Use the Move and Rotate tools to position the new step in its correct
position as the second step. You should not need to use the Scale tool as
the new collision object will have the same shape and size as the original
step.
You can now select both of the steps and copy-and-paste them to create
two new collision objects.
2.
3.
You can now continue this process by selecting all four steps and
copying-and-pasting them. In a similar manner, create all the required
steps and place them all into position using the Move and Rotate tools.
NaturalMotion endorphin 37
TUTORIALS
The entire staircase is made up of two identical halves. You have already
built one half of the staircase. Select all the collision objects you have
created, and copy-and-paste this entire set.
2.
With this new set of collision objects still selected, use the Rotate tool to
rotate them into position, using the visualisation graphical object as a
guide.
Click the Create Box Collision Object button on the Main Toolbar. This
creates a new collision object at the origin.
2.
Display the Left View by right-clicking and selecting Left View. The
keyboard shortcut is L.
3.
4.
Use the Scale tool to resize the new collision object until its depth
matches the depth of the archway.
38
TUTORIAL 4
Creating environments
5.
Display the Front View by right-clicking and selecting Front View. The
keyboard shortcut is F.
6.
Use the Move, Rotate and Scale tools to position and size the collision
object so that it matches one section of the arch.
7.
Note You could also create this archway by building half the archway, and then
using the copy-and-paste and Rotate tools to position a copy of the arch into the
correct position.
NaturalMotion endorphin 39
TUTORIALS
2.
Click the Create Cylindrical Mass Object button on the Main Toolbar.
This creates a new mass object at the origin. Note that we are creating a
mass object, rather than a collision object.
Keep in mind that you can always add and remove other collision objects
to new mass objects in the Environment character. You just cannot select
or remove the implicit collision object.
3.
Use the Move, Rotate and Scale tools to position and size this mass object
so that it roughly corresponds to the position and size of one of the
vertical struts of the railing.
40
TUTORIAL 4
Creating environments
4.
Use the Pose Move tool and move the mass object so that rests exactly
on the top of the staircase. The Pose Move and Pose Rotate tools are
particularly useful when you want to align objects, because these tools
consider the effect of the collision objects on each other. In contrast, the
usual editing tools such as Move, Rotate and Scale ignore the effect of
collision objects.
5.
Copy-and-paste the new mass object, and use the Move tool to position it
so that it is aligned with its neighbouring vertical strut.
6.
Copy-and-paste the new mass object twice more, and use the Move,
Rotate and Scale tools to position these new mass objects as crossbars
sitting on top of each of the vertical struts. You can also use the Pose
Move tool to accurately sit the crossbars onto the tops of each of the
vertical struts, forming a pair of T-shapes.
7.
At this stage we have only begun the process of building the entire
railing. To complete the railing you would repeat the previous steps,
cutting-and-pasting existing mass objects and using the Move, Rotate
and Pose Move tools to accurately position these mass objects to reflect
the shape of the railing.
NaturalMotion endorphin 41
TUTORIALS
With the railing still partially built, simulate the scene. You should find
that the four mass objects that you have added topple and fall under the
influence of gravity.
You can lock the mass objects together using a constraint event.
Constraint events are useful when you want to hold together various
mass objects until a particular moment in a simulation. This is a useful
technique for mimicking the effect of objects breaking as a result of
collisions with other objects.
2.
Click on the Clear Frames button in the Simulation Toolbar to clear the
frame buffer.
3.
4.
In the viewport, box select the mass objects you have created to form
the railing. Right-click to exit Selection mode, or press the Esc key.
5.
Ensure that the constraint event starts at Frame 0. Extend the constraint
event so that its end frame is approximately at Frame 500.
6.
Simulate again. You should find that this time the mass objects making
up the railing will stay fixed in place. When the end frame of the
constraint is reached during the simulation, the railing should then
collapse under the weight of gravity.
42
TUTORIAL 4
Creating environments
Select Character > Add Character to display the Add Character dialog.
Choose the Standard Simulation Character and click OK.
2.
Select the new character and use the Move tool to position the character
at the top of the staircase.
3.
Activate the Pose Move tool. Select the character as a whole using the
Timeline Editor, or by selecting the character cube in the viewport. Pose
Move the character so that it is positioned exactly on the top step.
Add a force event to the character timeline. Ensure that the force is
applied at Frame 0. Leave the other force properties at their default
settings.
2.
3.
Simulate the scene. The character should take a few steps backwards as it
is hit by the force event. After a few steps, the character should then
collide with the railing.
4.
Stop the simulation after the character collides with the railing, and move
the Time Slider back to the frame at which the character first makes
contact with the railing.
NaturalMotion endorphin 43
TUTORIALS
5.
elect the constraint event, and adjust its end frame to the current frame.
6.
Simulate again. The character should now stagger backwards, collide with
the railing, and then fall through the collapsing railing and down to the
ground. By timing the end of the constraint with the moment of collision,
the railing appears to collapse as a result of the collision with the
character.
7.
Conclusion
In this tutorial, you have created a complex environment using mass objects and
collision objects to create static and dynamic scene objects. In addition, you have
used constraint events to combine multiple environment mass objects into
single compound objects to create the effect of collapsing scene objects.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 4 Building Environments\Tutorial 4
Building Environments - Complete.ens. This scene is an example of how your
scene should look if you have successfully followed all the steps in this tutorial.
44
TUTORIAL 5
Creating characters
Tutorial 5
Creating characters
In the first four tutorials, you have created scenes using the standard endorphin
simulation character. This character represents a typical adult male human.
However, you are not limited to creating scenes with this character only. You can
use Character Edit Mode to reshape the standard character to create your own
custom characters.
In this tutorial, you will use Character Edit Mode to create a custom character that
matches the shape and size of an external character stored in an animation data
file. You will then use dynamic motion transfer to map the motion data stored
in this external animation file onto your reshaped endorphin character.
Reference Character
A reference character is an endorphin character that has been generated by
importing a character stored in an external animation file. Reference characters
can be generated from FBX, BVH, XSI, ASF or Vicon V files that you have exported
from Maya, 3dsMax or other animation system. Reference characters have the
same joint hierarchy and naming conventions found in the original file.
You do not actually use reference characters in endorphin scenes. Rather, you will
typically reshape a simulation character to match its corresponding reference
character, and use the reshaped character in the scene.
Reference character files have the extension _ref.nmc.
Simulation Character
A simulation character is any endorphin character that has been derived from the
standard endorphin simulation character. That is, it has the same joint hierarchy
and object naming conventions as the standard simulation character.
NaturalMotion endorphin 45
TUTORIALS
Launch endorphin.
2.
Select File > New Character. This displays the New Character dialog.
46
TUTORIAL 5
Creating characters
3.
4.
Turn on the Create Reference Character Using setting, and click the
Browse button to select the file Resources\Tutorials\Tutorial 5
Creating Characters (Basic)\AM_T-pose.fbx. This ensures that the new
reference character will be created from the skeleton found in this file. It
is strongly recommended that you only create reference characters from
animation files in which the character is in its T-pose. This will make the
animation pipeline more reliable.
5.
Click OK. The Import Options dialog appears, which lets you specify
settings for use when creating the reference character. Keep all the
settings at their default values. In the node hierarchy tree, select the Hips
node. This ensures that the new reference character will be created with
its root joint based on the Hips joint in the source animation file. It is
important that you select the correct node to use as the basis for your
reference character.
6.
NaturalMotion endorphin 47
TUTORIALS
simulation character joints, although this is rarely done. Usually, you will be
snapping the simulation character to the reference character.
Snapping only works when you are moving a joint using the Move tool in its
unconstrained mode. If you are constrained dragging along any axis or in any
plane, snapping will not occur. The snap threshold depends on the apparent
relative positions of the source and target joints as they appear on the screen.
This means you do not need to worry about how close the joints are in 3D space.
As long as they appear to overlap on the screen, they can be snapped to each
other.
Keep in mind that snapping does not generate a permanent connection
between the snapped joints. If you adjust the position of a joint, you may also
affect the positions of any the joints downstream of that joint, regardless of
whether they have already been snapped to reference character joints.
Right-click in the viewport and select Skeletal View. This mode is useful
because most of the reshaping work in this tutorial involves changing
joint lengths and orientations.
2.
You should be able to identify two skeletons in the viewport. The active
character skeleton will be displayed in blue. The inactive character
skeleton will be displayed in grey. At any point in time, only one of the
characters is active. You cannot select or move the inactive character.
By default, the simulation character will be active. In Character Edit Mode,
there are two special buttons in the Main Toolbar that you use to control
which character is active.
3.
You are now ready to reshape the simulation character to match its
reference character. The viewport should now look like this:
48
TUTORIAL 5
Creating characters
4.
5.
6.
7.
Move the root joint using the purple square manipulator at the centre of
the Move tool manipulator. This is a free, unconstrained move. Drag the
joint towards is corresponding root joint on the reference character.
When you get close to this joint, the simulation character joint should
snap to the position of the reference character joint.
NaturalMotion endorphin 49
TUTORIALS
2.
If the Move tool is not active, activate it. Move this joint using the purple
square manipulator at the centre of the Move tool manipulator. This is a
free, unconstrained move. Drag the joint towards is corresponding Chest
joint on the reference character. When you get close to this joint, the
simulation character joint should snap to the position of the reference
character joint.
3.
50
TUTORIAL 5
Creating characters
Working up the spine, snap all the other joints into place up to the head
joint.
5.
Select the LeftClavicleJoint and snap it into place. In our example, this is
to the same joint that the LowerNeckJoint was snapped to. Work your
way down the arm to the LeftElbowJoint, snapping joints together.
6.
7.
8.
Continue working down the left leg until you reach the LeftAnkleJoint.
NaturalMotion endorphin 51
TUTORIALS
So far, we have only edited joints on the left-hand side of the character.
To copy these changes to the right-hand side of the character, select
Character > Mirror Left To Right. Alternatively, click the Mirror Left To
Right button
Alt+LeftArrow.
2.
After you have mirrored the character, you should find that the
simulation and reference character skeletons now match:
52
TUTORIAL 5
Creating characters
2.
3.
Use the Move tool to move this joint down along the Y-axis in the global
coordinate system, so that it is aligned with the toe joint of the reference
character.
4.
Use the Move too to snap the toe joint into place. Note that the
simulation character LeftAnkleJoint has now been rotated. It occurred
when you moved the LeftMidFootJoint down.
5.
Click the Mirror Left To Right button on the Main Toolbar to copy these
changes to the right foot.
NaturalMotion endorphin 53
TUTORIALS
2.
3.
Right-click in the viewport and select Left View. At the moment, the left
foot of the simulation character will not have full contact with the ground.
You should find that the mass object and collision objects of the heel are
currently raised off the ground.
54
TUTORIAL 5
Creating characters
4.
Activate the Rotate tool, and rotate the LeftHeelMass object down so
that the LeftHeelCollision01 and LeftHeelCollision02 objects are
aligned with the other five collision objects in the foot.
5.
The next step is to reposition all seven collision objects making up the left
foot so that they make contact with the ground. Select all of these
collision objects using box selection, or by holding down the Ctrl key and
selecting each collision object individually.
6.
Activate the Move tool and move these collision objects downwards so
that they sit exactly on the ground plane.
Note When modifying the positions of mass and collision objects in the
feet, make sure you do not inadvertently modify the positions of any
joints. Moving a joint may result in the loss of a rig node connection that
you had set up in an earlier step.
NaturalMotion endorphin 55
TUTORIALS
7.
Click the Mirror Left To Right button in the Main Toolbar to copy these
changes to the right foot.
56
TUTORIAL 5
Creating characters
corresponding mass objects on the target character. You can generate different
effects by specifying the strength with which mass objects are connected to their
rig nodes.
Usually, every rig node is connected to a mass object, but not every mass object
is connected to a rig node. This is because most characters have a lot more mass
objects than there are rig nodes. Rig nodes are placed at key locations, such as
the pelvis, shoulders, hands and feet. The motion of intermediate, unconnected
mass objects on the target character is generated based on the motion of the
connected mass objects and the effects of joint limits.
The mass objects of the standard simulation character are already connected to
rig nodes. This means that any characters you derive from the standard
simulation character are also connected. However, when you create new
reference characters, you have to manually add these connections.
If the Motion Transfer Editor is not visible, select View > Motion
Transfer Editor to display the Motion Transfer Editor. The keyboard
shortcut is M. The Motion Transfer Editor is automatically displayed when
you first enter Character Edit Mode.
The Motion Transfer Editor contains a Connections page that contains a
list of rig nodes, along with corresponding lists of mass objects for the
reference character and simulation character.
NaturalMotion endorphin 57
TUTORIALS
2.
The list of mass objects in the lower pane reflects the active character.
Where a mass object name is displayed in bold, this indicates that the
mass object is connected to a rig node.
You can change the active character by clicking the Activate Reference
Character button on the Main Toolbar to activate the reference
character, or by clicking the Activate Simulation Character button on
the Main Toolbar to activate the simulation character.
You will usually have the reference character active, since the simulation
characterand any characters derived from itare already pre-rigged.
3.
If you select a rig node in the upper pane, its corresponding mass object
(if it has one) is automatically selected in the lower pane.
Similarly, if you select a mass object in the lower pane, its corresponding
rig node (if it has one) is automatically selected in the upper pane.
2.
58
TUTORIAL 5
Creating characters
To create a new connection, select a rig node from the upper pane, and
then select a mass object from the lower pane. The selected mass object
should not already be connected to another rig node. (If the mass object
is already connected to another rig node, first click the Disconnect
button to disconnect it.) Click the Connect button to connect the
selected rig node to the selected mass object.
4.
Before exiting Character Edit Mode, ensure that the simulation character
is visible. To do so, right-click on the Simulation Character node in the
Node View and select Show All. If a character is saved in its hidden state,
it will initially be displayed in this hidden state when added to a scene,
which can be confusing.
2.
Finally, select File > Save Character As to display the Save As dialog.
You can change the current folder by clicking the Browse button. Specify
a character name, keeping in mind that you can add spaces to character
names. Do not add a file extension. For example, if you name the
character RiggingTutorial, endorphin will save the simulation character
as RiggingTutorial.nmc, and will save its reference character as
RiggingTutorial_ref.nmc. The viewport display label will update to
reflect the name of the character.
NaturalMotion endorphin 59
TUTORIALS
Launch endorphin.
2.
Select File > New Scene. Select the default character using the Timeline
Editor and delete it.
3.
Select Character > Add Character to display the Add Character dialog.
Alternatively, click the Add Character button on the Main Toolbar. Select
the RiggingTutorial character from the list of Custom Characters. You
may need to browse to change the active folder. Click OK.
2.
Select File > Import, or click the Import button in the Main Toolbar. The
keyboard shortcut is I. This displays the Select File To Import dialog.
3.
4.
5.
The node hierarchy in the Import Options dialog displays the joint
hierarchy of the character in the FBX file. Select the Hips node from this
tree. This will ensure that only motion of the Hips joint, and any of its
child joints, is imported. The motion of any other nodes in the FBX file is
ignored.
6.
60
TUTORIAL 5
Creating characters
Leave the other Import Options set to their defaults, and click OK.
Animation from the FBX file will be imported onto the reference
character, and then dynamically mapped onto the simulation character.
This process occurs automatically. The reference character is temporarily
created and destroyed without ever appearing in the scene.
Keep in mind that the import process can take some time, particularly if
there are a lot of frames in the animation file.
8.
When the animation import is complete, you will see a new animation
event added to the timeline of the simulation character. This animation
event contains the imported animation data applied to the simulation
character skeleton.
Conclusion
In this tutorial, you have learned how to create new simulation-reference
character pairs, and how to reshape simulation characters to match their
reference characters. You have learned about Character Edit Mode and its
various tools, such as the snap tool, and successfully used dynamic motion
transfer to import motion from an FBX file onto a simulation character via its
reference character.
To learn more about creating and editing characters, see Tutorial 11
Character Creation (Advanced). To learn more about dynamic motion transfer,
see Tutorial 13 Advanced Motion Transfer And Prop Interaction.
NaturalMotion endorphin 61
TUTORIALS
Tutorial 6
Creating props
In this tutorial, you are going to create more complex scene objects using
collections of mass objects and collision objects saved as three separate prop
characters.
You are then going to add instances of these prop characters to the scene that
you made in Tutorial 4 Creating Environments. You do not need to have
worked through Tutorial 4, however, as the final scene from that tutorial has
been copied as the initial setup scene for this tutorial.
Environment objects
In Tutorial 4, you created a complicated environment by adding collision
objects to the Environment character. Adding collision objects directly to the
environment is a quick way to create static, rigid structures in your scene.
You also added some mass objects to the environment, and attached collision
objects to these mass objects. Adding mass objects to the environment is a good
way to create dynamic environment entitiessuch as pieces of furniturethat
are mobile and not directly attached to the world. These dynamic objects can
gain velocity and momentum as a result of forces and collisions.
Prop characters
In this tutorial, you will use Character Edit Mode to create new prop characters.
Prop characters are collections of joints, mass objects and collision objects that
represent scene objects. A prop character might be a simple object such as a
piece of furniture, or a complex articulated object, such as a vehicle. A prop
character can even represent an animal, such as a horse. Prop characters are
stored in endorphin .nmc character files.
62
TUTORIAL 6
Creating props
One advantage of creating prop characters is that you can add them to multiple
scenes. Another advantage is that you can import animation onto prop
characters, which allows you to create much more complex settings for your
simulation characters. For example, you might create a horse prop character, add
it to a scene, and then import a gallop animation cycle onto the horse. You could
then place a simulation character on the horse and simulate the scene. During
the simulation, the galloping motion will transmit forces to the simulation
character.
2.
Select the Standard Prop Character from the Standard Characters list,
and click OK.
The Standard Prop Character contains a single joint and single mass
object, and is useful for solid prop objects. You cannot create additional
joints or mass objects in Character Edit Mode. To create more complex,
articulated characters, you need to create them by importing a skeleton
contained in an FBX, BVH, XSI, ASF or Vicon VSK file. You will create a prop
character using this approach in the next step.
NaturalMotion endorphin 63
TUTORIALS
3.
You have now created a new prop character. This character is based on
the Standard Prop Character and appears as a single spherical mass
object. There is no corresponding simulation character, and so the
reference character is permanently active when you are editing prop
characters. Note that prop characters are considered to be a type of
reference character, as they are created to represent equivalent objects in
your source animation scenes. Prop characters are saved with a _ref.nmc
file extension.
4.
Display the Node View to examine the structure of this character. You
will note that the prop character has a single root joint, a single rootMass
mass object and a single RootCollision collision object. You cannot
delete this joint or mass object. However, you can add and remove
collision objects.
2.
3.
64
TUTORIAL 6
Creating props
centre of mass of the entire object, and has a mass equivalent to the mass
of the entire object.
4.
5.
Select the graphical object, and move it until the mass object is located
roughly at the centre of mass of the chair.
6.
Select the mass object, and move it vertically so that the chair legs of the
graphical mesh make contact with the floor. Keep in mind that when you
move the mass object, the graphical object also moves. This is because
the graphical object was created as a child of the mass object.
2.
Click the Create Box Collision Object button on the Main Toolbar. This
creates a new box collision object.
3.
Use the Move, Rotate and Scale tools to adjust the size and position of
this collision object until it coincides with the chair seat.
NaturalMotion endorphin 65
TUTORIALS
4.
Add more collision objects using the same approach. Remember that
each time you create a new collision object, the parent mass object must
be preselected. After you have created each new collision object, use the
Move, Rotate and Scale tools to adjust the size and position the object
until it coincides with its corresponding feature of the graphical object.
5.
When you have finished modeling the chair, select File > Save Character.
In the Save Character dialog, name the prop character Chair and click
OK.
66
TUTORIAL 6
Creating props
2.
In the New Character dialog, turn off the Create Character Using setting,
and turn on the Create Reference Character Using setting.
You are going to create a new prop character using a character imported
from an FBX animation file, rather than using the Standard Prop Character
as the basis of the prop character. This approach is required when you
want to create prop characters with more than one joint or mass object.
This is because you cannot create new joints or mass objects in Character
Edit Mode.
3.
4.
In the Import Options dialog, select the root node in the node tree
hierarchy, and then click OK. This ensures that the new prop character
will be created with its root joint based on the root joint in the source
animation file. It is important that you select the correct node to use as
the basis for your prop character.
5.
You have now created a new prop character based on the character
imported from this FBX file. Display the Node View to examine the
structure of this character. You will notice that the root joint has three
NaturalMotion endorphin 67
TUTORIALS
child joints. These joints will form the basis of three components making
up the entire table.
6.
Select the rootMass mass Object and delete it. This mass object is not
required for the table.
2.
Select File > Import, and browse to select the HallTableBroken.obj file.
Do not modify any of the default import options. Click OK.
3.
If you examine the graphical object carefully, you will see it is made up of
three distinct parts that are joined along break lines. These indicate the
three pieces of the table after it collapses following a collision.
2.
3.
Use the Move, Rotate and Scale tools to adjust the position and size of
this mass object. The precise shape and size of this mass object does not
matter. Your main aim is to ensure that the mass object is located at the
centre of mass of the part of the table it represents, and has the right
volume to reflect the mass of that table part.
68
TUTORIAL 6
Creating props
4.
Repeat this process for the other two mass objects. You should end up
with three mass objects that are positioned roughly according to the
screenshot below:
2.
Click the Create Box Collision Object button on the Main Toolbar.
3.
Use the Move, Rotate and Scale tools to adjust the size and position of
this collision object. This collision object will form part of the table
surface.
4.
NaturalMotion endorphin 69
TUTORIALS
5.
Create collision objects to fill out the other two sections of the table
surface. You will need to create collision objects of the Table02Mass and
Table03Mass objects respectively.
When you are creating these collision objects, keep in mind that you
cannot allow collision objects belonging to different mass objects to
penetrate. If this occurs, then when the object is simulated, you will find
that the different sections of the table will rapidly spring apart as the
penetrating collision objects attempt to separate themselves.
6.
When you have finished filling out the three sections of the table, select
File > Save Character, and name it BrokenTable. Click OK.
70
TUTORIAL 6
Creating props
To create a chandelier:
1.
Select File > New Character, and select the Standard Prop Character.
Click OK.
2.
3.
4.
Select the graphical object, and use the Move tool to move it so that the
rootMass object is located roughly at the centre of mass of the
chandelier.
2.
Use the Property Editor to change its Type property to Cylinder. Also, set
its Radius property to 0.7, and its Length property to 1.5.
3.
Use the Move and Rotate tools, reposition the cylindrical mass object so
that its long axis coincides with the axis of the chandelier.
NaturalMotion endorphin 71
TUTORIALS
4.
The mass object now has a mass distribution that more closely resembles
the distribution of mass in the chandelier. However, the overall mass of
the objectwhich depends on its volume and densityis now
unrealistically large. Use the Property Editor to reduce its Density
property to from 0.9 to 0.3. This will reduce the overall mass of the
chandelier by two-thirds, which will make it more responsive to forces.
Note that when you move and rotate a mass object using the Move and Rotate
tools, any child collision graphical objects which belong to it will move and
rotate with it while maintaining their position relative to it. If you scale the parent
mass object using the Scale tool however, any child mass objects will remain
unaffected.
You may want to hide the rootMass object while you are adding collision
objects. When mass objects are large, they can sometimes obscure their
child collision objects. To hide this mass object, click on its icon in the
Node View. This method hides the specific mass object selected.
Alternatively, right-click in the viewport and turn off Mass Objects. This
method hides all mass objects in the scene using a global filter,
regardless of whether their individual visibilities are turned on or off.
When you have finished filling out the chandelier graphical object, select
File > Save Character, and save this prop character as MyChandelier.
Click OK.
72
TUTORIAL 6
Creating props
2.
3.
4.
5.
6.
Use the Move tool to move the chain character until the topmost point of
the chain coincides with the ceiling.
NaturalMotion endorphin 73
TUTORIALS
2.
3.
You should find that the MyChandelier prop character now appears in the
Add Character dialog. Select this character and click OK.
4.
Use the Move tool to move the new chandelier prop character up so that
it sits just under the chain prop.
74
TUTORIAL 6
Creating props
2.
In Selection mode, hold down the Ctrl key, and select the four end-most
mass objects of the HallChandelierChain_fbx character. This adds these
mass objects to the set of constrained mass objects.
3.
4.
5.
Use the Property Editor to set its Start Frame to Frame 0, and its End
Frame to Frame 500.
6.
2.
Use the Property Editor to set its Start Frame to Frame 0, and its End
Frame to Frame 500.
Simulate the scene. You should find that the chandelier will slightly drop
under the influence of gravity until the chain is stretched to its limit.
The chain is made up of a series of short joints. This is a useful technique
when you want to model chains, cables and other flexible entities. To test
NaturalMotion endorphin 75
TUTORIALS
the flexibility of the chain, apply a horizontal force to the chandelier to set
it swinging.
2.
3.
With the force event selected, use the Property Editor to set its Strength
to 3.0.
4.
Simulate the scene again. The chandelier should now swing as a result of
this force. You may find that the chain wobbles as it swings.
5.
You can slightly stiffen the chain by adding an active pose event to the
chain prop character. Right-click on the HallChandelierChain character,
and select Create Active Pose Event.
6.
With the active pose event selected, use the Property Editor to set its
Start Frame to Frame 0 and its End Frame to Frame 500. If you simulate
again, you should find that the chain appears slightly stiffer and the
wobbling is reduced. To enhance or reduce this effect, modify the
Strength property of the active pose event.
7.
Delete the force event. We added the force to test the flexibility of the
chain. The force is not required for the intended final scene simulation.
2.
Select this character, and use the Move tool to position it near the
staircase, under the chandelier. See the screenshot below for guidance.
76
TUTORIAL 6
Creating props
Select Character > Add Character, and select the Chair character. Click
OK.
2.
Select this character, and use the Move and Rotate tools to position it so
that it is sitting next to the table.
3.
Add a second instance of the Chair prop character, and use the Move and
Rotate tools to position it so that it is sitting on the opposite side of the
table to the first chair.
2.
Use the Rotate tool to rotate the character so that it is facing the
chandelier.
3.
Use the Move tool to move the character slightly closer to the edge of the
platform.
4.
5.
Use the Property Editor to set the behaviour event Name to Jump And
Dive. Also, set the Start Frame to Frame 0.
6.
Delete the Prop0, Prop01, Prop02 and Prop03 mass objects that make
up part of the railing in front of the character. They are not required for
this simulation.
NaturalMotion endorphin 77
TUTORIALS
7.
Simulate the scene. The character should now jump forward towards the
chandelier, and should collide with it.
Select the Jump And Dive behaviour event, and use the Property Editor
to set its End Frame to Frame 75.
2.
3.
Set the Name of this behaviour event to Hands Reach And Look At.
Also, set its Start Frame to Frame 75.
4.
5.
Simulate the scene again. When the character jumps, it should now
reach out for the chandelier with its left hand. Also, its head should point
towards the chandelier as it jumps.
78
TUTORIAL 6
Creating props
2.
Use the Time Slider to identify the frame at which the characters hand
collides with the chandelier. Set its Start Frame of the new constraint
event to match this frame.
3.
Select the constraint, and use the Property Editor to set its Type to
JoinBodies.
4.
Click the [Select] command hotlink that is found next to the Target
Objects property in the Property Editor. This places you in Selection
mode.
5.
6.
Simulate again. The character should now jump and hold on to the
chandelier, and then swing underneath it. The character remains
attached to the chandelier due to the effect of the constraint event.
When the constraint event finishes, the character falls and collides with
the table and chairs underneath the chandelier. Constraint events are
useful when you want to mimic the effect of a character holding onto an
object.
7.
To make the character writhe as it holds onto the chandelier, adjust the
End Frame property of the Hands Reach And Look At behaviour so that
it matches the Start Frame of the constraint event that connects the
characters left hand to the chandelier. Then, add a new behaviour to the
Character01 timeline, and set its Name property to Writhe.
8.
Simulate again. The character should now writhe as it dangles under the
chandelier.
NaturalMotion endorphin 79
TUTORIALS
1.
Use the Time Slider to identify the frame at which the character first
collides with the table. This should be roughly around Frame 200.
2.
3.
Adjust the Frame of the sever event so that it coincides with the
character striking the table.
4.
Locate the [Select] command hotlink associated with the Target Object
property in the Property Editor. Click this command hotlink to enter
Selection mode.
5.
In Selection mode, hold down the Ctrl key and select each of the table
sections. The corresponding mass objects are added to the sever event
Target Objects list.
6.
To exit selection mode, right-click in the viewport, or press the Esc key.
7.
Simulate again. The table will now break into three separate sections
when the character collides with it. This is because the sever event
detaches each of the parent joints of the mass objects in the Target
Objects list.
Try changing the duration of the constraint that joins the simulation
character to the chandelier.
Try adding some helper forces to the chairs at the frame in which the
simulation character collides with the table. Helper forces can help create
more dramatic action.
80
TUTORIAL 6
Creating props
Conclusion
In this tutorial, you have learned how to create more complex prop characters
using different techniques. You have also used a range of different event types to
create dynamic interaction between a simulation character and various
environment objects and prop characters.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 6 Creating Props\Tutorial 6 Creating Props Complete.ens. This scene is an example of how your scene should look if you
have successfully followed all the steps in this tutorial.
NaturalMotion endorphin 81
TUTORIALS
Tutorial 7
82
TUTORIAL 7
Importing and modifying animation
You can also set the Simulation Mode to No Simulation, Collision Only
or Collision With Momentum. These modes are all animation modes.
When a character is in one of the animation modes, it is driven by
animation keyframes, rather than by the simulation. Characters store
animation keyframes in the form of animation events on their character
track in the Timeline Editor.
NaturalMotion endorphin 83
TUTORIALS
Launch endorphin.
2.
3.
4.
2.
84
TUTORIAL 7
Importing and modifying animation
3.
In the Import Options node hierarchy tree, select the Hips node. This
ensures that only motion in the FBX file associated with the Hips joint,
and any of its child joints, is imported onto the AudioMotion2 character.
4.
Turn on the Transfer From Reference Character setting, and click the
Browse button. Select the AudioMotion2 character from the character
list. Keep the other settings at their default values, and click OK.
5.
6.
Simulate the scene. You should find that the character will now be driven
by animation data. You will notice that the character is displayed in dark
grey, rather than its usual light grey and blue colouring for mass objects
and collision objects. This colour indicates that the character is being
driven by animation data, and is not being simulated.
7.
If you continue simulating past the End Frame of the animation event, the
character will transition into Full Simulation mode, and will be displayed
using its usual simulation colours. The character will fall to the ground
under the influence of gravity.
8.
If you examine the character timeline, you will notice that in addition to
the animation event, two simulation events were automatically added at
the start and end frames of the animation event. The first simulation
event sets the simulation mode to No Simulation, and the second
simulation event sets the simulation mode to Full Simulation. These
simulation events control the frame range over which the character will
be driven by animated data.
In the Import Options dialog, you can specify whether or not to create
simulation events when you import animation.
NaturalMotion endorphin 85
TUTORIALS
9.
Move the second simulation event to an earlier frame, such as Frame 95,
and simulate again. You should find that the character will be driven by
the animation data until Frame 95, at which point the character will
become simulated, and fall. Keyframes in the animation event after
Frame 95 are ignored by the character, because it is in Full Simulation
mode again.
Move the Timeline Editor time slider so that the active frame is Frame 95.
2.
Right-click on the character timeline and select Create Force Event. This
adds a force event to the character timeline, and automatically enters
Selection mode.
3.
Hold down the Ctrl key, and select all the mass objects that form the
pelvis and spine of the character. This updates the Target Objects
property of the force in the Property Editor. To exit Selection mode, rightclick in the viewport or press the Esc key.
4.
Select the force event, and use the Property Editor to sets its Strength
property to 30.0 and its Rotation property to 3.0.
5.
Simulate the scene. You should find that the character transitions from
animation to simulation at Frame 95, and is immediately thrown some
distance by the force. You can change the strength and direction of the
force to generate different responses. You can also change the target
object set of the force. Make sure that the force is applied at the same
frameor within a few framesof the simulation event. Do not set the
force to a frame prior to the simulation event, otherwise the force will
have no effect.
86
TUTORIAL 7
Importing and modifying animation
2.
3.
4.
5.
6.
Simulate the scene. You should find the character now writhes as it
moves through the air.
2.
3.
4.
5.
6.
Simulate the scene. You should find the character now reaches out as it
approaches the ground.
NaturalMotion endorphin 87
TUTORIALS
2.
3.
4.
Simulate the scene. You should find the character now tucks itself into a
foetal position as it collides with the ground.
Further experiments
Try changing the timings and durations of the various behaviour events.
Each combination of timings will generate new motion.
Try changing the direction of the force event. Even small changes to the
direction can generate entirely different resulting motions.
Conclusion
In this tutorial, you have learned how to import animation, and how to combine
it with dynamic simulations to create more complex motion. You have also
learned about simulation modes, and how to use simulation events to control
the transitions between simulation and animation modes.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 7 Importing And Modifying Animation\Tutorial 7
Importing And Modifying Animation - Complete.ens. This scene is an example of
how your scene should look if you have successfully followed all the steps in this
tutorial.
88
TUTORIAL 8
Blending from animation to simulation
Tutorial 8
NaturalMotion endorphin 89
TUTORIALS
Launch endorphin.
2.
3.
4.
Simulate the scene. The car prop moves towards the character,
controlled by its keyframes. Between Frame 0 and Frame 48, the
simulation character is driven by its animation event. You can tell that the
character is animated, rather than simulated, by the fact that it is
displayed in the dark grey animation colour. At Frame 48, the character
and car collide, and a simulation event has been added to begin
dynamically simulating the character. The character writhes and tucks as
a result of the Writhe and Body Foetal behaviours that have been added
to it.
90
TUTORIAL 8
Blending from animation to simulation
NaturalMotion endorphin 91
TUTORIALS
this animation. In a later step we will add the transition event to blend from the
simulation into the animation.
Select Character01.
2.
3.
In the Import Dialog, select the Hips node in the joint hierarchy tree.
4.
5.
Select the new animation event in the Timeline Editor. You may want to
move the animation event marker to a new timeline track.
2.
3.
4.
5.
92
TUTORIAL 8
Blending from animation to simulation
2.
Select the animation event. When you are visualising the animation data,
you can select the green animation data skeleton or motion path as an
alternative to selecting the animation data marker in the Timeline Editor.
3.
4.
Move the time slider to Frame 97. This is the frame at which the character
first makes contact with the ground.
5.
Use the Move and Rotate tools to modify the global position and
orientation of the animation. Your goal is to ensure that the animated
character position closely matches the simulated character position.
When you use these tools, you are modifying the Animation Root Offset
property of the animation event.
NaturalMotion endorphin 93
TUTORIALS
If you use the Rotate tool, ensure that you only rotate about the global Yaxis. Do not rotate about the global X-axis or Z-axis, as this will have the
unwanted effect of moving some parts of the animation cycle off the
ground plane.
6.
You should find that the following values for the position and orientation
of the animation root offset work well:
X Orientation: +180.0.
Y Orientation: -51.9.
Z Orientation: +180.0.
X Position: 0.748.
Y Position: 0.0.
Z Position: 0.176.
94
TUTORIAL 8
Blending from animation to simulation
2.
Set the Start Frame of the new transition event to Frame 90.
3.
Set the End Frame of the new transition event to Frame 112.
4.
If you examine the Timeline Editor, you will notice that the Character01
timeline track has a gradually strengthening blue colour added to its
background over the duration of the transition event. This is the
animation mode colour, and indicates that the character is driven by
animation data rather than by the dynamic simulation.
5.
Simulate the scene. The dynamic motion of the character now blends
smoothly into the animated motion. If you use the time slider to examine
the transition event in detail, you will notice that during the course of the
transition event, the motion of the character is generated by a
combination of simulated and animated motion.
Initially, the character is entirely driven by simulated motion. Over the
course of the transition event, the animated motion has increasing
influence. By the end of the transition event, the character is entirely
driven by animated data. This transition is reflected by the colour of the
character. During the course of the transition, the character blends
towards the dark grey animated character colour.
NaturalMotion endorphin 95
TUTORIALS
Active animation does not affect the global position or orientation of the
character root. Rather, it drives the individual joint orientations of a character.
Active animation acts as a physical input during a dynamic simulation. You can
specify the relative strength of the active animation by modifying the animation
event Strength property.
Between Frames 100 and 125, the character is blended between its
simulated motion and the animation event.
Between Frames 125 and 300, the character is driven entirely by the
animation event.
2.
3.
4.
5.
Simulate the scene. You should find that between Frame 76 and Frame
90, the animation event drives the character actively. That is, the
character is still dynamically simulated, but its joints are influenced by the
Jump With Stumble animation event. The active animation helps make
the subsequent transition event between Frames 90 and 112 even
smoother and more realistic.
96
TUTORIAL 8
Blending from animation to simulation
2.
3.
In the Import Options dialog, select the Hips node from the node tree
hierarchy.
4.
5.
Select the new animation event in the Timeline Editor. You may want to
move the animation event marker to a new timeline track.
NaturalMotion endorphin 97
TUTORIALS
2.
3.
4.
5.
Simulate for at least 100 frames, and then use the time slider to set the
active frame to Frame 97.
2.
3.
Use the Move and Rotate tools to adjust the position and orientation of
the animation data so that it coincides with the position of the simulated
character at Frame 97.
4.
You should find that the following values for the position and orientation
of the animation root offset work well:
X Orientation: +180.0.
Y Orientation: -87.2.
Z Orientation: +180.0.
X Position: 0.882.
Y Position: 0.0.
98
TUTORIAL 8
Blending from animation to simulation
Z Position: 0.093.
2.
3.
4.
5.
Right-click the Jump With Stumble animation event and select Disable
Event.
6.
Simulate the scene. You should find that the character motion now
blends into the Jump Off Box animation.
7.
Now that you have created two animation events, and positioned them
both correctly, you can easily toggle between them by enabling one of
the events, and disabling the other event. In a similar manner, to can
import more animation to create more animation events for a given
character; simply ensure that only one of the animation events is enabled
at any one time.
Timeline priority
Each character has a number of timeline tracks. The topmost track has the
highest priority, followed by the next track and so on, down to the bottom track.
For any given frame, the animation event with the highest priority is used, and
any other animation event at the same frame is ignored. This means that if you
are experimenting with different animation events, you can modify their
respective priorities as an alternative to enabling and disabling them. That is, if
you want to use a particular animation event, move it so that it has the highest
priority of any of its animation events.
NaturalMotion endorphin 99
TUTORIALS
Conclusion
In this tutorial you have imported animation data to create animation events,
and visualised this data in the viewport. You have moved and rotated this
animated data to obtain a good blend between simulation and animation, and
then used transition events to actually generate the transition.
You have also experimented with active animation events to further improve
your blends. Finally, you have experimented with different animation events in
the same scene.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 8 Blending From Simulation To
Animation\Tutorial 8 Blending From Simulation To Animation Complete.ens. This scene is an example of how your scene should look if you
have successfully followed all the steps in this tutorial.
100 TUTORIAL 9
Using multiple characters
Tutorial 9
2.
3.
4.
5.
In the Import Options dialog, select the Hips node from the node
hierarchy tree.
6.
7.
Simulate the scene. The character will be driven by animation data, and
will be displayed in the dark grey animated mode colour.
2.
Using the Property Editor, set the Simulation Mode property to Collision
With Momentum.
102 TUTORIAL 9
Using multiple characters
2.
3.
Select File > Import, and browse to select the AM_Run.fbx file.
4.
5.
2.
Using the Property Editor, modify the following Animation Root Offset
properties:
3.
Y Orientation: +180.0.
X Position: -0.068.
Z Position: +3.869.
Simulate the scene again. The AudioMotion1 character should now run
directly at the AudioMotion2 character. However, the two characters will
pass through each other. This is because neither character is in the
simulation mode.
104 TUTORIAL 9
Using multiple characters
2.
Set the Frame property of this event to Frame 96. This frame is a few
frames before the impact between the two characters.
3.
Simulate the scene. The running character will now receive the full
impact of the kick.
2.
3.
4.
5.
6.
7.
8.
9.
Further experiments
Try adjusting the position of the run cycle animation event to generate
different types of collision.
Try changing the behaviour timing to change the way the running
character responds to the kick.
Conclusion
You have created a scene using multiple characters, and used the momentum
transfer technique to affect the motion of a simulated character using an
animated character.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 9 - Using Multiple Characters\Tutorial 9
Multiple Characters - Complete.ens. This scene is an example of how your
scene should look if you have successfully followed all the steps in this tutorial.
106 TUTORIAL 10
Active posing
Tutorial 10
Active posing
In the previous tutorials, you have used a range of different event types to
influence dynamic motion. In particular, you have used forces, constraints,
behaviours and sever events, as well as active animation events.
In this tutorial, you will work with another event typeactive pose events.
Active poses are conceptually similar to keyfames in a traditional animation
system. An active pose represents a desired or intended character pose that
influences the characters joints over a range of frames.
Depending on the duration and strength of the active pose, it may have a subtle
effect or a more pronounced effect on the simulation. Keep in mind that active
poses are one of many influences on the characters dynamic motion.
Launch endorphin.
2.
3.
2.
3.
4.
5.
Right-click on the active pose event marker, and select Load Pose.
6.
7.
Set the Strength property of this active pose to 4.0. The strength of an
active pose defines the relative influence of the active pose on the
simulation.
108 TUTORIAL 10
Active posing
8.
Simulate the scene. You should find that the character now moves
towards the active pose, and holds this poses until Frame 39. At Frame 39,
the influence of the active pose ends and the character relaxes.
2.
Set the Start Frame to Frame 39 and the End Frame to Frame 69.
3.
Set the Strength property to 6.0, and the Blend Period property to 0.25.
The blend period specifies the relative rate at which the character
assumes the pose.
2.
Set the Start Frame to Frame 69 and the End Frame to Frame 113.
3.
Set the Strength property to 10.0, and the Blend Period property to 0.4.
2.
Set the Start Frame to Frame 113 and the End Frame to Frame 264.
3.
Set the Strength property to 10.0, and the Blend Period property to 0.4.
4.
Simulate the scene. The effect of the four active poses is to move the
gymnasts legs up, leading to a swing that reorients the character upsidedown. The character maintains this pose until Frame 264.
Keep in mind that all the characters motion has been generated by a
combination of active poses, and the effect of those active poses on the
characters dynamics. This is a good example of how a dynamic system
like endorphin differs from a traditional keyframe animation system.
Similarly, all the motion in the ropes is secondary motion caused by the
motion of the gymnast. This realistic motion is an additional benefit of
using a dynamics-based system.
Further experiments
Try changing the Strength, Blend Period, Start Frame and End Frame
properties of the four active poses. Each combination will effect the
overall motion of the gymnast.
Try using the Pose Move and Pose Rotate tools to edit the individual
active poses themselves.
110 TUTORIAL 10
Active posing
2.
Set the Start Frame to Frame 264 and the End Frame to Frame 320.
3.
Set the Strength property to 12.0, and the Blend Period property to 0.8.
2.
Set the Start Frame to Frame 320 and the End Frame to Frame 354.
3.
Set the Strength property to 6.0, and the Blend Period property to 0.3.
2.
Set the Start Frame to Frame 354 and the End Frame to Frame 385.
3.
Set the Strength property to 5.0, and the Blend Period property to 0.4.
2.
Set the Start Frame to Frame 385 and the End Frame to Frame 600.
3.
Set the Strength property to 5.0, and the Blend Period property to 0.4.
4.
Simulate the scene. The effect of these four new active poses is to
complete the overall gymnastic motion.
Further experiments
Try changing the Strength, Blend Period, Start Frame and End Frame
properties of the four active poses. Each combination will effect the
overall motion of the gymnast. Also, try using the Pose Move and Pose
Rotate tools to edit the individual active poses themselves.
The Left Rope and Right Rope prop characters also have active poses
applied to them. Unlike the active poses applied to the Gymnast
character, the active poses on the prop characters are used to slightly
stiffen these articulated objects. Try changing the Strength property of
these stiffening active poses to make the ropes stiffer or more flexible.
Conclusion
You have used active poses to influence the motion of a simulated character,
and experimented with different active pose strength and blend periods.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 10 Active Posing\Tutorial 10 Active Posing Complete.ens. This scene is an example of how your scene should look if you
have successfully followed all the steps in this tutorial.
112 TUTORIAL 11
Creating characters (advanced)
Tutorial 11
Launch endorphin.
2.
Select File > New Character. This displays the New Character dialog.
3.
4.
Turn on the Create Reference Character Using setting, and click the
Browse button to select the file Resources\Tutorials\Tutorial 11
Creating Characters (Advanced)\MyCharacter.fbx. Click OK.
5.
In the Import Options dialog appears, select the root node from the
node hierarchy, and click OK.
6.
2.
3.
Activate the Move tool and select the root joint of the simulation
character.
4.
Snap the root joint of the simulation character with the corresponding
root joint of the reference character. When you are snapping joints using
the Move tool, ensure that you are using the purple square manipulator
of the Move tool. If you use the axial or planar manipulators of the Move
tool, joint snapping will not occur.
5.
114 TUTORIAL 11
Creating characters (advanced)
joints. For example, if you lock the shoulder and wrist joints, you can
move and rotate the elbow joint without disrupting the snapped
positions of the elbow or wrist. Of course, you can always use the Move
tool to directly move the elbow and wrist joints, which then unlocks
these joints.
2.
3.
4.
With the LeftElbowJoint still selected, rotate it about the Y axis so that
the LeftForeArmTwist joint is aligned with the forearm of the reference
character.
5.
Bypass the LeftForeArmTwist joint, and snap the wrist and finger joints
into place.
6.
Click the Mirror Left to Right button in the Main Toolbar. This mirrors the
changes you have made from the left arm to the right arm.
116 TUTORIAL 11
Creating characters (advanced)
7.
8.
Continue working down the joints of the left leg until you reach the
LeftAnkleJoint. Snap this joint to the ankle of the reference skeleton.
9.
11. Click the Mirror Left to Right button in the Main Toolbar. This mirrors the
changes you have made from the left leg to the right leg.
12. Select File > Save Character. Save the character pair as MyCharacter01.
The viewport label will update to display this new character name.
2.
Ensure that the Node View is visible. If it is not visible, select View >
Node View to display the Node View. The keyboard shortcut is N.
3.
4.
In the Node View, click the joint limit icons next to the
LeftClavicleJointLimit and LeftClavicleJointLimitOffset nodes. This
displays the corresponding joint limit graphics in the viewport. The
118 TUTORIAL 11
Creating characters (advanced)
2.
Experiment with the joint limit by adjusting some of the swing and twist
limit values and orientations using the Property Editor. Each time you
change a joint limit value in the Property Editor, you will see an update in
the corresponding joint limit graphic in the viewport. Do not save these
changes.
3.
Discard these changes by reopening the character file without saving the
changes.
4.
5.
6.
Toggle the tool coordinate system so that you are rotating in local
coordinates. To do so, select Edit > Toggle Coordinate System. The
keyboard shortcut is X.
7.
Rotate the joint limit so that the joint limit swing offset is located within
the joint swing limit. Ideally, the swing limit cone should be relatively
high in relation to the offset. That is, we want the shoulders to be able to
move up more than they can move downwhich reflects typical human
anatomy. The precise location of the offset relative to the limit depends
on the freedom of movement you want to specify for the character.
8.
Select Character > Mirror Left To Right, or click the Mirror Left To Right
button in the Main Toolbar, to mirror the changes in the left shoulder
joint limit across to the right shoulder joint limit.
120 TUTORIAL 11
Creating characters (advanced)
9.
In the Node View, hide the joint limit graphics. The easiest way to do this
is to right-click on the character node and select Hide Type > Joint
Limits.
10. Select File > Save Character, or click the Save button in the Main
Toolbar, to save the character. The keyboard shortcut is Ctrl+S.
Right-click in the viewport and select Shaded View. This will display both
the simulation and reference characters in shaded, rather than skeletal,
mode.
2.
3.
Select File > Import or click the Import button in the Main Toolbar to
import a file. The keyboard shortcut is I.
4.
5.
In the Import Options dialog, leave all the settings as default and click
OK. A new graphical object is created belonging to the reference
character.
6.
In the Node View, right-click the reference character and select Hide All.
Then, right-click on the MyCharacter graphical object in the Node View
and select Show. The reference character will be hidden, except for its
graphical object representing its skin mesh.
7.
Activate the simulation character. This will deselect the graphical object.
The graphical object will no longer be selectable in the viewport, because
it belongs to the inactive reference character. However, you can still
select the graphical object using the Node View.
122 TUTORIAL 11
Creating characters (advanced)
Right-click in the viewport and turn off Collision Objects. This will hide all
collision objects in the viewport. Also, right-click in the viewport and
select Joints and Bones. This will display joints, which is useful when
positioning mass objects.
2.
3.
Use the Move tool to move this mass object to a more central position
inside the hip region of the skin mesh. Keep in mind that when you are
positioning a mass object, you are positioning it with respect to its parent
joint.
4.
Use the Scale tool to adjust the size of this mass object so that it fits the
hip region of the skin mesh. Keep in mind that mass objects are often
heavier than you might think. Mass objects are completely solid objects,
and their overall mass is defined by their size, shape and density. In
general, you should not make mass objects too big. The Standard
Simulation Character has been designed so that the mass distribution
reflects the typical adult male human.
5.
6.
7.
Select the spherical HeadMass mass object and use the Move tool to
position it correctly at the centre of the skin mesh head region.
8.
Continue reshaping the mass objects in the left arm and left leg. When
you are reshaping mass objects in the hands and feet, do not make them
too small. Very small mass objects may be ignored by the simulation.
9.
Finally, select Character > Mirror Left To Right, or click the Mirror Left
To Right button in the Main Toolbar to mirror the reshaped mass objects
to the right-hand side of the character.
124 TUTORIAL 11
Creating characters (advanced)
Right-click in the viewport and turn on Collision Objects. Also, turn off
Joints and Bones.
2.
3.
Select the LeftLowerLegCollision object and use the Move and Scale
tools to reposition and resize this object so that it matches the shape of
calf region of the mesh. The collision object should not protrude outside
the mesh, but fit as closely inside as possible.
Note We are modeling a complex surface using relatively simple
volumes such as sphyls, so there will not be a complete match between
the mesh surface and your own collision surfaces. Using more collision
objects will result in a more accurate representation of the skin mesh, but
at the expense of slower simulation times.
4.
the selected mass object. Adjust the size, position and orientation of this
new collision object so that it fills the lower knee area of the left leg.
5.
By default, new collision objects will have their Collides With Parent,
Collides With Siblings and Collides With Ancestors settings all turned
on. You will need to turn these settings off where appropriate, in order to
allow for any required movement. To modify these settings, select the
collision object and use the Property Editor to make these changes.
6.
7.
Finally, select Character > Mirror Left To Right, or click the Mirror Left
To Right button in the Main Toolbar to mirror the reshaped collision
objects to the right-hand side of the character. This command will also
create or delete collision objects on the right-hand side of the character,
to match the collision objects on the left-hand side of the character.
126 TUTORIAL 11
Creating characters (advanced)
Conclusion
In this tutorial, you have learned more about using Character Edit Mode to create
characters. You have learned how to display and edit joint limits, and how to use
imported mesh objects as guides when reshaping mass objects and collision
objects.
Tutorial 12
2.
Select Character > Add Character or click the Add Character button
in the Main Toolbar to display the Add Character dialog.
3.
4.
The character list will be updated to reflect the characters found in the
working folder. Select the AudioMotion1 character from the list. Turn on
the Include Reference Character setting and click OK. Two characters
128 TUTORIAL 12
Using motion transfer
New characters are added at the origin of the scene, which means the
AudioMotion1 simulation and reference characters are now
superimposed. Select the AudioMotion1_ref reference character and
move it 2 metres along the X axis. Select the AudioMotion1 simulation
character and move it 2 metres along the X axis in the other direction.
2.
Select File > Import, or click the Import button on the Main Toolbar.
The keyboard shortcut is I. Select the file Resources\Tutorials\Tutorial
12 - Using Motion Transfer\AM_walk.fbx.
3.
4.
5.
2.
Adjust the Start Frame so that is starts one frame after the animation
event. When an animation event is applied to a character, the first frame it
affects is the next frame along. For example, if an animation event is
applied at frame 200, you will first notice its effect at frame 201. If you
would like a motion transfer event to be applied to the results ofan
animation event, it needs to start at least one frame after the animation
event begins.
3.
Adjust the End Frame to match the end frame of the animation event.
4.
5.
6.
130 TUTORIAL 12
Using motion transfer
2.
If you examine the feet of the reference character, you will notice that it
has two-bone feet. The toes of the reference character pass through the
ground plane during the walk cycle. You can use camera tracking to
follow the motion of the reference character feet.
3.
4.
If you examine the feet of the simulation character, you will notice that it
has three-bone feet. The extra bones are designed to improve foot-roll
motion. The toes of the simulation character do not pass through the
ground plane during the walk cycle. This clean-up happens automatically,
due to the interaction of the collision objects in the feet of the simulation
character.
5.
However, this additional joint has a corresponding mass object which has
no corresponding rig node connection. As a result, this joint rotates freely
during the walk cycle. We are going to add an active pose to the
simulation character to prevent this unwanted toe rotation.
6.
132 TUTORIAL 12
Using motion transfer
the motion transfer event. However, it will prevent free rotation on joints
that are not driven by motion transfer.
7.
Simulate the scene again. You should find that the foot now behaves
correctly, with no foot-ground slip, foot-ground penetration or toe
wobble.
Display the Motion Transfer Editor by selecting View > Motion Transfer
Editor. The keyboard shortcut is M. The Motion Transfer Editor is
automatically displayed when you enter Character Edit Mode.
2.
3.
Browse to the Strengths tab. This page displays a list of available rig
groups. You should find that the only rig group is the Standard Motion
Transfer rig group.
4.
Click the Add button to create a new rig group. Name the new rig
group Right Arm Free and click OK.
5.
Select the RightUpperArm and RightHand rig nodes. You can hold
down the Ctrl key to select multiple rig nodes.
6.
Change the rig node mode of the selected rig nodes to NoHold. This frees
the right arm so that it will not be driven by motion transfer.
2.
Use the Property Editor to change the Rig Group property of the motion
transfer event to Right Arm Free. When the scene is simulated, the
motion transfer will now use the new rig group that you have created,
and the right arm of the simulation character will not be driven by the
walk cycle.
3.
Simulate the scene. You will notice that the mass objects making up the
right arm of the simulation character are no longer displayed in red. Only
mass objects that are driven by rig nodes are displayed in red during a
motion transfer event.
Also, notice that the right arm of the simulation character attempts to
reach out to its side. This motion is due to the presence of the weak
active pose that was added in Step 4. That active pose was a T-pose, in
which the right arm was placed out to the side of the character. However,
we can change the pose used by this active pose event.
134 TUTORIAL 12
Using motion transfer
4.
5.
Right-click on the active pose event and select Load Pose. Browse to
select the Holding Shield.nma pose file. In this pose, the character has its
right arm across its chest, as though it were carrying a shield-like item.
6.
7.
Simulate the scene again. The character will now lift its arm towards its
chest and hold it there during the walk cycle. Meanwhile, the legs, torso
and left arm of the simulation character continue to be driven by the
motion transfer event.
8.
Experiment with this scene. For example, try changing the strength of
the active pose event. This will change the degree to which the active
pose affects the motion of the right arm.
Also, try adding a mass object to the scene and attaching it to the right
hand of the simulation character with a JoinBodies constraint. This mass
object represents the mass of the shield carried by the simulation
character. Note how the position of the arm is affected by the mass of this
mass object.
Conclusion
You have used motion transfer events to transfer motion from an animation
event onto a simulation character. You have also created additional motion
transfer rig groups to modify the way motion is transferred. Finally, you have
mixed motion transfer events with active pose events to control the motion of
joints that are not driven by the motion transfer.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 12 Using Motion Transfer\Tutorial 12 Using
Motion Transfer - Complete.ens. This scene is an example of how your scene
should look if you have successfully followed all the steps in this tutorial.
136 TUTORIAL 13
Advanced motion transfer and prop interaction
Tutorial 13
2.
Locate the Unit Mass property in Property Editor, and set its new value to
10.0. This property reflects the characteristic, or typical, mass in the scene.
Increasing this value is useful when you want to add larger masses to the
scene.
3.
Select Character > Add Character or click the Add Character button
in the Main Toolbar to display the Add Character dialog.
4.
5.
The character list will be updated to reflect the characters found in the
working folder. Select the AudioMotion2 character from the list. Turn on
the Include Reference Character setting and click OK. Two characters
will be added to the scenethe AudioMotion2 simulation character, and
the AudioMotion2 reference character. The simulation character is the
same shape and size as the reference character.
6.
New characters are added at the origin of the scene, which means the
AudioMotion2 simulation and reference characters are now
superimposed. Select the AudioMotion2 simulation character and move
it 2 metres along the X axis away from the origin.
138 TUTORIAL 13
Advanced motion transfer and prop interaction
2.
Select File > Import, or click the Import button on the Main Toolbar.
The keyboard shortcut is I. Select the file Resources\Tutorials\Tutorial
13 - Advanced Motion Transfer And Prop Interaction\Walk.fbx.
3.
4.
5.
6.
2.
3.
4.
140 TUTORIAL 13
Advanced motion transfer and prop interaction
2.
3.
Select the AudioMotion2 character, and then select Character > Save
Pose.
4.
Save this pose as Start.nma. This creates an endorphin .nma pose file
containing the character pose.
5.
6.
7.
Select Character > Load Pose, and browse for the Start.nma pose file.
Do not modify any of the Load Pose settings, and click OK.
8.
2.
Select Character > Add Character, or click the Add Character button
in the Main Toolbar, to display the Add Character dialog.
3.
Select the Gun Large prop character from the Prop Characters list.
4.
Use the Move and Rotate tools to reposition the Gun Large character so
that its grip is close to the left hand of the AudioMotion2 simulation
character.
5.
6.
7.
Select the RightHandMass mass object, and use the Pose Move and Pose
Rotate tools to pose the hand so that it is holding the gun.
8.
9.
Select the LeftHandMass mass object, and use the Pose Move and Pose
Rotate tools to pose the hand so that it is holding the gun.
142 TUTORIAL 13
Advanced motion transfer and prop interaction
2.
Adjust the Start Frame of the new active pose event so that it starts at
Frame 0. Adjust the End Frame of the new active pose event so that it
matches the end frame of the animation event on the AudioMotion2_ref
character timeline.
3.
4.
In the Property Editor, set its Strength property to 3.0. This is an increase
on the default active pose strength of 1.0.
5.
6.
7.
Right-click in the viewport to accept the new set of active pose target
joints.
8.
9.
Modify its Target Joints property by box-selecting the bottom half of the
AudioMotion2 simulation character.
10. By default, the two active poses will be called ActivePose01 and
ActivePose02. You can rename these events by editing their Name
properties in the Property Editor. For example, you might rename these
events ActivePoseLowerBody and ActivePoseUpperBody.
Renaming timeline events can make it easier to quickly read a timeline.
This is particularly for constraint and active pose events, since these
events display their names on their timeline markers.
Display the Motion Transfer Editor by selecting View > Motion Transfer
Editor. The keyboard shortcut is M. The Motion Transfer Editor is
automatically displayed when you enter Character Edit Mode.
2.
3.
Browse to the Strengths tab. This page displays a list of available rig
groups. You should find that the only rig group is the Standard Motion
Transfer rig group.
4.
Click the Add button to create a new rig group. Name the new rig
group Arms Free and click OK.
5.
6.
Change the rig node mode of the selected rig nodes to NoHold.
7.
8.
9.
Change the rig node strength to 100.0 for all position and angular
strengths.
2.
Use the Property Editor to change the Rig Group property of the motion
transfer event to Arms Free.
3.
Simulate the scene. You should find that the lower body of the simulation
character is driven by the motion transfer event, and the upper body of
144 TUTORIAL 13
Advanced motion transfer and prop interaction
the simulation character is driven by the active pose that you applied to
the upper body.
2.
Adjust the Start Frame of the new constraint event so that it starts at
Frame 0. Adjust the End Frame of the new constraint event so that it
matches the end frame of the animation event on the AudioMotion2_ref
character timeline.
3.
4.
5.
6.
Click on the Gun Large character to select its Prop0 mass object.
7.
Hold down the Ctrl key, and select the LeftHandMass and
RightHandMass mass objects. This adds these mass objects to the list of
target mass objects of the constraint event. Ensure that only these three
mass objects are the only mass objects in the Target Objects list.
8.
Simulate the scene. You should find that the simulation character now
holds the rifle as it walks. You can adjust the strength of the active pose to
change the degree to which its arms are driven by this active pose.
146 TUTORIAL 13
Advanced motion transfer and prop interaction
2.
3.
Display the Node View, and expand the Gun Large character node
hierarchy. The rifle is made up of a single mass object, Prop0, and a
number of collision objects defining the shape of the rifle.
4.
5.
In the Property Editor, set the Density property of the Prop0 mass object
to 5.0.
6.
To exit Edit Character In Scene mode, hit the Esc key, or right-click on the
character name in the Timeline Editor and select Exit Character Editing.
7.
Simulate the scene again. You should find that the character slumps over
under the weight of the rifle.
8.
Edit the Gun Large prop character again, and set its Density value to 10.0.
9.
Simulate the scene again. You should find that the character slumps even
more.
10. Experiment with different mass object densities. Also experiment with
different active pose strengths. Finally, experiment with different motion
transfer rig node strengths.
Conclusion
You have used motion transfer events in conjunction with active poses and
constraints in order to repurpose a basic walk cycle. You have also learned about
Edit Character In Place mode.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 13 Advanced Motion Transfer And Prop
Interaction\Tutorial 13 Advanced Motion Transfer And Prop Interaction Complete.ens. This scene is an example of how your scene should look if you
have successfully followed all the steps in this tutorial.
148 TUTORIAL 14
Active animation and motion transfer
Tutorial 14
Launch endorphin.
2.
3.
Select Character > Add Character, or click the Add Character button
in the Main Toolbar.
2.
3.
4.
5.
150 TUTORIAL 14
Active animation and motion transfer
6.
2.
3.
Select the AudioMotion1 character, and then select Character > Save
Pose.
4.
Save this pose as Start.nma. This creates an endorphin .nma pose file
containing the character pose.
5.
6.
7.
Select Character > Load Pose, and browse for the Start.nma pose file.
Do not modify any of the Load Pose settings, and click OK.
8.
Display the Motion Transfer Editor by selecting View > Motion Transfer
Editor. The keyboard shortcut is M. The Motion Transfer Editor is
automatically displayed when you enter Character Edit Mode.
2.
3.
Browse to the Strengths tab. This page displays a list of available rig
groups. You should find that the only rig group is the Standard Motion
Transfer rig group.
4.
Click the Add button to create a new rig group. Name the new rig
group Legs Only and click OK.
5.
Select all the rig nodes, and set the rig node mode to NoHold. You can
select multiple rig nodes by holding down the Ctrl key.
6.
2.
Use the Property Editor to change the Rig Group property of the motion
transfer event to Legs Only.
152 TUTORIAL 14
Active animation and motion transfer
3.
Simulate the scene. You should find that the simulation characters legs
will be driven by the motion transfer event, whereas its upper body
should be loosely flopping.
2.
Select File > Import, or click the Import button in the Main Toolbar. The
keyboard shortcut is I.
3.
4.
Select the Hips node as the import root node in the node tree.
5.
In the Import Options dialog, turn off Create Simulation Events. When
this setting is turned off, the character simulation mode is unchanged. In
our case, this means the character will remain in Full Simulation mode,
and so the animation will drive this fully-simulated character actively. In
contrast, when simulation events are added to set the simulation mode to
No Simulation, Collision Only or Collision With Momentum, the animation
drives the character passively.
6.
7.
8.
Ensure that the new animation event has its Start Frame set to Frame 0.
9.
Select the animation event and drag it upwards until it is placed on the
topmost timeline track. This ensures that this new animation event has
the highest priority in the simulation character timeline.
10. Use the Property Editor to set the Strength property of the new
animation event to 1.0.
11. Use the Property Editor to turn on the Active property of the new
animation event. This is the critical step that converts the event from a
standard, or passive, animation event, into an active animation event.
12. Simulate the scene. The same animation source file is now driving two
different sections of the simulation character using two different routes.
Each of these routes has a different effect:
154 TUTORIAL 14
Active animation and motion transfer
Select Environment > Create Sphyl Mass Object. Alternatively, click the
Create Sphyl Mass Object button in the Main Toolbar. A new sphyl mass
object is added to the Environment character.
2.
Select the new mass object. Using the Property Editor, set the mass object
Length property to 0.8. Also, set the Radius property to 0.02.
3.
Use the Move and Rotate tools to position and rotate the mass object so
that one end of the object is close to the right hand of the simulation
character. Alternatively, enter the following values directly as the Position
And Orientation properties of the mass object:
2.
Adjust the Start Frame and End Frame properties of the new constrain
event to match the range of the animation events.
3.
Use the Property Editor to set the constraint event Type to JoinBodies.
4.
5.
6.
Hold down the Ctrl key and select the RightHandMass mass object.
7.
Simulate the scene. You should find that the character now holds the
mass object during the sword swing.
2.
3.
4.
Use the Property Editor to set its Width value to 1.0. Also, set its Height
and Length values to 0.25.
4.
Use the Move and Rotate tools to position the new collision object in
front of the simulation character. Alternatively, enter the following values
directly as the Position And Orientation properties of the collision object:
156 TUTORIAL 14
Active animation and motion transfer
2.
3.
Simulate the scene. You should see the right arm of the simulation
character swing more slowly than its corresponding source animation
data. This is due to the inertia of the heavier mass object.
4.
2.
3.
Simulate the scene. You should find the simulation character slumping
and unable to raise the mass object to its previous height.
4.
2.
3.
4.
Simulate the scene. You should find that the mass object now bounces
off the collision object after colliding with it. Also note that this bounce
affects the simulation character itself, in addition to the mass object.
5.
6.
Use the Property Editor to set the Material property of the collision
object to Sponge.
7.
Simulate the scene. You should now find that the mass object penetrates
the collision object after colliding with it.
158 TUTORIAL 14
Active animation and motion transfer
2.
3.
Move the Time Slider to the frame at which the mass object has its
deepest penetration into the collision object.
4.
5.
6.
Modify the constraint event End Frame so that the event has a duration of
around 45 frames. For example, it might have a Start Frame of Frame 50,
and an End Frame of Frame 95.
7.
Simulate the scene. You should find that the sword mass object now
penetrates into the collision object, and is held in place for the duration of
the constraint event. When the constraint event ends, the mass object
springs back and the character quickly resumes its original animation.
Conclusion
You have learned to use active animation events poses, which effectively
influence the motion of simulated characters via a sequence of single-frame
active pose events. You have also used helper constraints to increase the realism
of simulated scenes.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 14 Active Animation And Motion Transfer\Tutorial
14 Active Animation And Motion Transfer - Complete.ens. This scene is an
example of how your scene should look if you have successfully followed all the
steps in this tutorial.
160 TUTORIAL 15
Working with fluids
Tutorial 15
2.
Select the Standard Prop Character from the standard character list, and
click OK.
3.
Reshape the mass object to roughly represent the size and weigh of a
small boat.
4.
Build the collision surface of the boat using sphyl collision objects for the
sides and cube collision objects for the bottom.
2.
Select Character > Create Sphyl Fluid Object. This will create a new fluid
object that represents a floating body. The default fluid object shape is a
sphyl but this can be changed using the Property Editor.
3.
Use the Move, Rotate and Scale tools to position and resize the fluid
object to match one of the side collision objects.
4.
Keep creating as many fluid objects as you need to define the parts of the
boat that will interact with the fluid. Fluid objects do not need to cover
every part of your objectonly those that are going to be affected by the
fluid.
162 TUTORIAL 15
Working with fluids
Once you are happy with the boat character, select File > Save
Character, and save the prop character as MyBoat. Click OK.
Hint To increase the stability of the boat, try moving the mass object
downwards with respect to the centre of mass of the boat.
2.
Load your small boat character. To do this select Character > Add
Character. Find the prop character named MyBoat and click OK.
2.
Use the Move tool to move the character so that it is placed roughly
above the small boat.
3.
We now apply a pose to the character. With the character still selected,
select Character > Load Pose. Browse to the resource folder for this
tutorial and select the pose file named on_the_dingy.nma. (A dingy is
type of small boat.)
4.
Click OK in the Load Pose window. The character will be placed quite
high in the sceneyou may need to adjust the viewport zoom to see it.
5.
Select the boat and use the Move tool to move it into position
underneath the character.
164 TUTORIAL 15
Working with fluids
2.
Set the behaviour Name property to Physical Effect: Fluid 1. Each fluid
behaviour has a corresponding fluid cube. Most often, you will use fluid
cubes to represent water, but you can represent thicker fluids like
quicksand and mud, as well as thinner fluids like air. Note that the fluid
cube is not displayed in the viewport until you have simulated at least
once.
3.
Edit the Start Frame and End Frame properties of the Fluid behaviour, so
that it begins at Frame 0 and ends at Frame 600.
Right click on the viewport and select Fluid Objects. Fluid objects should
now be displayed.
2.
3.
Use box-selection to select all objects in the viewport. All selected fluid
objects are added to the Floating Bodies set of the Fluid behaviour.
4.
Locate the Cube Size parameter, and change value of the cube size to 20.
This will increase the size of the fluid cube.
5.
Keep all other parameters at their default settings. The default fluid
density matches that of water.
6.
Simulate the scene to see how the fluid behaviour behaves. The fluid
cube should be displayed as a semi-transparent cube, and the simulation
character and the boat prop character should float on the surface of the
water.
2.
3.
Adjust the timing of this behaviour so that it begins at Frame 0 and ends
at Frame 150.
4.
166 TUTORIAL 15
Working with fluids
Try to add behaviours to the character so that it reacts while underneath the
water. For example, try adding Arms Windmill 2 and Legs Kick 2 behaviours
to the characterthese behaviour both generate the kinds of movement that
one might expect from the submerged character. Experiment with the
behaviour parameters to obtain a better motion.
2.
Further experiments
Try posing the head of the character so that it remains aligned with its body.
Introduce some soft constraints to the chest of the character to help increase
its stability while its head remains above the level of the fluid cube.
Try changing the size, shape and position of the fluid objects for both the
small boat and the simulation character to see how these changes affect the
buoyancy of the characters. Experiment with the various fluid parameters
such its density and stream vector. You can visualise the stream vector as a
current or wind direction.
Try turning on the fluid waving system. Increase or decrease the amplitude
and frequency of the waves.
Try creating your own prop characters and attach fluid objects to them. See if
you can correctly model their expected buoyancy properties.
Try simulating multiple fluid cubes in the same scene to model different fluid
effects.
Conclusion
In this tutorial we have looked at how to work with the fluid physical effect
behaviour.
We have learned how to model characters using fluid objects, and how to add a
fluid cube in a scene. We have also modified the properties of the cube to obtain
different fluid effects and how to control the way objects are affected by the
fluid.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 15 Working With Fluids\Tutorial 15
Working With Fluids - Complete.ens. This scene is an example of how your
scene should look if you have successfully followed all the steps in this tutorial.
168 TUTORIAL 16
Using physical effects
Tutorial 16
Select File > New Scene, and select the Character01 standard simulation
character using the Timeline Editor.
2.
Use the Move tool to move the character back to the edge of the grid.
This is a Z-position of approximately -10.5.
3.
4.
5.
6.
7.
2.
3.
Move the behaviour marker so that is on the middle timeline track. This
ensures that this behaviour has lower priority than the Jump And Dive 1
behaviour.
4.
Adjust the behaviour timing so that it begins at Frame 67, and ends at
Frame 117.
5.
The Force X, Force Y and Force Z properties define the direction and
strength of the force applied by this behaviour. Set the Force Y property
to 20. Set the Force Z property to 40.
6.
The TargetMassObjects property defined the mass objects that have the
force applied to them. Note that the usual Target Objects property is not
used by this behaviour. Click the [Select] hotlink to edit the target mass
objects.
7.
8.
9.
Simulate the scene. The character should now be pushed forward rapidly
by the Push behaviour. You should also notice a red arrow appearing in
the viewport while the physical effect is simulated. This arrow represents
the magnitude and direction of the push force.
170 TUTORIAL 16
Using physical effects
To make the jump more stable we will apply an active pose to the character
in order to increase its stiffness. Move the Time Slider to Frame 83.
2.
Right-click on the Character01 timeline, and select Create Active Pose Event.
3.
4.
Adjust the active pose timing so that it begins at Frame 83 and ends at Frame
117.
5.
In the Property Editor, set the active pose Strength property to 15.
6.
Simulate the scene. You should now see a more stable jump.
2.
3.
4.
Move the behaviour marker so that is on the bottom timeline track. This
ensures that this behaviour has lower priority than the active pose.
5.
Adjust the behaviour timing so that it begins at Frame 70, and ends at Frame
117.
6.
The Torque X, Torque Y and Torque Z properties define the axis about which
the torque force is applied, and its strength. Set the Torque Z property to 15.
This will ensure that objects are rotated about the Z-axis by the Twist force.
7.
The TargetMetaBodies property defined the mass objects that have the
torque applied to them. Note that the usual Target Objects property is not
used by this behaviour. Click the [Select] hotlink to edit the target mass
objects.
8.
Zoom into the character torso, and select the four body parts formed by the
pelvis and the three spine objects.
9.
10. Simulate the scene. You should now have obtained a Twist jump. Next we will
add another character to the scene, and have this character jump towards our
existing character and collide with it in midair.
Note You can turn off the display of behaviour helper graphics by rightclicking on the viewport, and turning off the Display > Events setting. Also, if
the behaviour helper graphics are too large or small you can change their size
by adjusting the Arrow Scale property of the Push and Twist behaviours.
172 TUTORIAL 16
Using physical effects
2.
3.
Use the Move tool to position this new character at the opposite side of the
grid to the previously created character.
4.
While the new character is still selected, rotate it around the Y-axis by setting
its Y Orientation property to 180 in the Property Edutor. The two characters
should now be facing each other.
2.
Adjust the new behaviour timing so that it begins at Frame 0 and ends at
Frame 60.
3.
Right-click on the Muscular character timeline on the middle track and select
Create Behaviour Event. Set the behaviour name to Physical Effect: Push 1.
2.
Adjust the new behaviour timing so that it begins at Frame 54 and ends at
Frame 117.
3.
4.
Set the behaviour Force Y property to 10 and the Force Z property to -30.
5.
Click the [Select] hotlink of the TargetMetaBodies property, and select the
mass objects that which will be affected by the Push behaviour. Use boxselection to select the entire character in the viewport. Make sure that all
objects have been selected.
6.
7.
2.
3.
4.
Browse to the fighting_pose.nma file located in the resource folder for this
tutorial. Double-click on the pose file to load it.
5.
Adjust the active pose timing so that it begins at Frame 75 and ends at
Frame 135.
6.
7.
8.
Simulate the scene for visual feedback. The characters should now collide in
flight. In the next step we will concentrate on the collision between the
characters.
174 TUTORIAL 16
Using physical effects
Note At this stage, the characters are moving extremely fast. You may
find that some intersections between collision objects are not detected at
the standard simulation frame rate, resulting in undesirable penetration
of collision objects. In later steps we will reduce the velocities of the
characters to avoid this problem.
Select the Push event on the Muscular character timeline and adjust its
Force Y property using the Property Editor. Experiment with slightly
higher and lower values of Force Y. The goal is to have the simulation
character narrowly miss the kick of the muscular character. Simulate the
scene each time until you are satisfied with how the two characters
intersect during the collision.
2.
Use the Move and Rotate tools to slightly adjust the position and
orientation of the characters in order to get the arms of the twisting
character around the body of the other character. Experiment with
increasing the distance between the two characters. Again, continue
making small changes iteratively until you are satisfied with the collision
of the two characters.
2.
3.
4.
Adjust the behaviour timing so that it begins two frames before the
collision between the two characters. Resize the event so that its duration
is 10 frames.
5.
With the event still selected, use the Property Editor to set the
LinearVelocityDamping property to 0, and set the
AngularVelocityDamping property to 30. These parameters define the
magnitudes at which the linear and angular velocities should be reduced.
6.
7.
8.
Select the pelvis mass object together with the three mass objects that
form the spine of the character.
9.
10. Adjust the End Frame properties for both the Twist and Push physical
effects and the active pose present on the standard character timeline so
that they match the Start Frame property of the damping physical effect.
176 TUTORIAL 16
Using physical effects
2.
Set the behaviour name to Physical Effect: Damping 2, and move the
behaviour marker to the bottom timeline track. If necessary, create an
additional timeline marker track.
3.
Adjust the behaviour timing so that it begins two frames before the
collision between the two characters. Resize the event so that its duration
is 6 frames.
4.
With the event still selected, use the Property Editor to set the
LinearVelocityDamping property to 40. Leave the
AngularVelocityDamping property at its default value.
5.
6.
7.
Select the entire character, excluding its shoulders, arms and head.
8.
9.
Simulate the scene. Note that the two characters suddenly decrease their
speed when the damping physical effects are triggered.
2.
3.
Adjust the timing of the behaviour so that it begins the same as the
damping physical effect.
4.
With the event selected, set its Arms Strength and Arms Speed
properties both to 1.
5.
6.
7.
Simulate the scene. The standard character should now be able to grab
the muscular character while it is in mid-air. If this is not the case,
continue to adjust the parameters of the damping physical effect for
both characters until their velocities are slow enough to allow the
activation of the tackle behaviour.
Hint Check that the standard character active pose event does not
extend into the timeframe of the tackle behaviour, as the active pose
stiffness can override the behaviour and prevent it from simulating
correctly.
Further experiments
Try changing the poses used by the active pose events, as well as the attack
angles, to obtain different attack results.
178 TUTORIAL 16
Using physical effects
Conclusion
In this tutorial we have looked at how to work with the Push and Twist physical
effect behaviours to create linear and rotational forces that apply to characters
over multiple frames. We have also used the damping behaviour to slow down
to motion of various body parts.
We have also looked at how behaviours and active poses can be used in
conjunction with the physical effect behaviours to create more compelling
animation.
If you have any problems with this tutorial, open the corresponding scene
Resources\Tutorials\Tutorial 16 - Using Physical Effects\Tutorial 16 Using
Physical Effects - Complete.ens. This scene is an example of how your scene
should look if you have successfully followed all the steps in this tutorial.
Tutorial 17
Ideally, you should set the Maya Linear Working Units to Centimeters.
However, if this is not possible, you can still make scale adjustments
during import and export.
Launch Maya.
180 TUTORIAL 17
Working with Maya
2.
3.
4.
Select File > Export All. Choose FBX from the File Type list, and specify
MayaChara as the export filename.
5.
Click Export. The skeletal structure of your Maya character will be saved
into an FBX file.
6.
Select File > Export All. Choose OBJ from the File Type list, and specify
MayaChara_Mesh as the export filename. It is generally good working
practice to name the FBX and OBJ files using the same name.
7.
Click Export. The polygonal skin mesh of the Maya character will be saved
into an OBJ file.
2.
3.
4.
You will automatically enter Character Edit Mode. In this mode you will
be able to edit both the simulation and the reference characters. Turn on
the Skeletal View viewport display setting, and then snap align the
simulation character joints to match the reference character joints. Also,
adjust the sizes, shapes and positions of the mass objects and collision
objects of the simulation character, if needed. See the User Guide and
tutorials for more detailed information on creating simulation-reference
character pairs.
5.
Display the Motion Transfer Editor, and use the following connection
settings to connect the mass objects of your reference character to the
Standard Character Rig. See the User Guide and tutorials for more
detailed information on rigging reference characters.
6.
Once the simulation and reference character skeletons are aligned, select
File > Save Character. You can browse for a location to save the
character, and specify MayaChara as the character name. endorphin will
save both the simulation and reference characters as two separate .nmc
character files.
182 TUTORIAL 17
Working with Maya
Keep in mind that the reference character will be used to import and
export animation, whereas the simulation character will be used to
actually generate new animation data in endorphin.
While you are still in Character Edit Mode, right-click and select Shaded
View.
2.
3.
Select File > Import and select the MayaChara_Mesh.OBJ file that you
saved from Maya in Step 2. Click Open, and then click the OK button on
the Import Options dialog. If necessary, you may need to adjust the
orientation of the OBJ file in the Import Options dialog.
4.
The OBJ file is imported as a new graphical object, and associated with
the reference character. The graphical object is displayed partially
transparently.
5.
Select View > Node View to display the Node View. The keyboard
shortcut is N.
6.
Right-click on the Reference Character and select Hide All. This hides all
the entities that make up the reference character, including all mass
objects, collision objects, graphical objects, joints and joint limits.
7.
In the Node View, identify the node representing the graphical object
MayaChara_Mesh that you created from the imported OBJ file. The
graphical object name will match the corresponding OBJ file name. Click
this node to display the graphical object of the mesh.
8. Select Activate Simulation Character. You will still be able to view the
mesh, but it will no longer be selectable.
9.
You can now move, rotate and scale each of the simulation character
collision objects to match the shape specified by the skin graphical
object.
You can also select individual mass objects and create new child collision
objects. This is useful for filling out the mesh more accurately.
You can use the Mirror Tool in Character Edit Mode to quickly copy
changes from one side of the character to the other side.
See the User Guide and tutorials for more detailed information on filling
out simulation characters.
10. It is good practice to regularly save your changes when you are editing
characters.
2.
3.
184 TUTORIAL 17
Working with Maya
2.
3.
Select Character > Add Character. This displays the Add Character
dialog.
4.
Select the character that you created in Step 3 and Step 4. You may need
to browse if you have saved that simulation-reference character to a
different location. You do not need to turn on the Include Reference
Character setting.
5.
Select the character using the Timeline Editor, and then select File >
Import. This displays the Select File To Import dialog.
6. Browse to select any FBX file that you created using Maya with the
corresponding character. Click Open to display the Import Options
dialog.
7. In the Import Option dialog, turn on the Source Reference Character
setting.
8.
Click the Browse button in the Auto Motion Transfer settings. Select the
MayaChara reference character file you created for importing data in
Step 2.
9.
10. In the node hierarchy tree, select the Hips node. This ensures that only
motion on this jointand its child jointsis imported.
11. Click OK to import the animation in the FBX file using dynamic motion
transfer. Internally, endorphin imports this FBX animation onto the import
reference character, and then uses dynamic motion transfer to map this
motion onto the selected simulation character in your scene.
You can import many different animation segments onto the same
endorphin simulation character. Typically, you will create a separate
animation event for each set of animation data keyframes, although you
can also import the animation data directly as keyframes in the simulation
character timeline.
Select the character that contains the animation data that you want to
export.
2.
Select File > Export. This displays the Select File To Export dialog.
3.
Set the Save As type to FBX Files. You can enter a new name, or choose
an existing FBX file to replace it. Click Save to display the Export Options
dialog.
4.
5.
Click the Browse button in the Auto Motion Transfer settings. Select the
MayaChara reference character file you created for importing data in
Step 2.
6.
Click OK to export the animation to the FBX file using dynamic motion
transfer. Internally, endorphin uses dynamic motion transfer to map the
character motion onto the specified export reference character, and then
exports this mapped motion.
2.
Select File > Import and browse for the FBX file that you saved from
endorphin.
3.
4.
Press Play in Maya to see the animation applied to the character. You can
now modify this animation like any other Maya animation.
186 TUTORIAL 17
Working with Maya
Conclusion
In this tutorial, we have configured the Maya animation pipeline. We have then
imported animation data from Maya into endorphin, and exported animation
data back from endorphin into Maya.
Tutorial 18
Launch Maya, and open the ExampleIKRig.mb file. This file contains a
very simple example of a typical IK keyframing rig.
2.
Click the endorphin Control Panel button on the endorphin shelf. This
launches the endorphin Control Panel editor.
3.
4.
188 TUTORIAL 18
Working with the Maya Control Panel
2.
Starting with the endorphin root joint, snap the endorphin joints
contained in the blue skeletonto their corresponding joints in the Maya
custom skeleton. In some cases, there is no one-to-one correspondence
between the endorphin and Maya joints. In these cases, manually position
the endorphin joints partway between the corresponding Maya joints.
3.
When you have completed the reshaping process, click the Save
Character As button. In the file browser, enter a filename that matches
your character name, and click Save. This saves a copy of the endorphin
character that contains your reshaped joint positions and orientations.
Click on the notebook tab that corresponds to the name of the new
endorphin character. This displays the character editor notebook for
that character. The character editor notebook includes the Create Import
Connections editor, the Create Export Connections editor, and the
Exchange Animation Data editor.
2.
Use the Maya Outliner or Hypergraph to select the topmost node of Maya
control rigthe Master node.
3.
In the Create Import Connections editor, click the << Load button. The
Load button loads all the child nodes of the selected Master node into the
list of Maya character control rig nodes.
2.
In the Maya viewport, select the box graphic that contains the root of the
Maya custom character. You should find that the corresponding node is
selected in the Maya character control rig nodes list.
3.
With an endorphin node selected, and a Maya node selected, click the
Create Import Connection button to create a connection between these
nodes. The selected diagram button will now be displayed red to indicate
that it is a connected node. In addition, the connected nodes are
displayed as pairs of nodes in the endorphin and Maya node lists. With the
root nodes connected, any animation applied to the endorphin character
root will now drive the Maya character root.
2.
3.
In the Maya viewport, select the left leg look-at controller, which is
represented by a blue arrow graphic.
4.
190 TUTORIAL 18
Working with the Maya Control Panel
2.
3.
By default, the list of Maya control rig nodes displays only the node name
itself. If you want to view entire node namesqualified by their full
parenting pathselect the Display > List Maya Full Node Paths item.
Similarly, by default the lists of endorphin and Maya nodes display the full
set of nodes. If you want to view only the nodes involved in import
connections, select the Display > List Connected Nodes Only.
Continue creating import connections until you have the following node
pairs connected. Note that none of the endorphin end joints appear in
the endorphin node list, or in the endorphin node diagram. These joints
never contain animation data, and so never need to be connected to your
Maya character. Also note that not every endorphin node requires
connecting to a corresponding Maya character:
endorphin node
Maya node
Root
HipsCTRL
LowerSpineJoint
Spine1CTRL
MidSpineJoint
Spine2CTRL
UpperSpineJoint
Spine3CTRL
LowerNeckJoint
NeckCTRL
UpperNeckJoint
HeadCTRL
LeftClavicleJoint
LeftShoulderCTRL
LeftElbowJointLookAtHelper
LeftElbowLookat1
LeftWristJoint
LeftHandCTRL
LeftFingersJoint
LeftFingersCTRL
LeftKneeJointLookAtHelper
LeftKneeLookat1
LeftAnkleJoint
LeftFootCTRL
RightClavicleJoint
RightShoulderCTRL
RightElbowJointLookAtHelper
RightElbowLookat1
RightWristJoint
RightHandCTRL
RightFingersJoint
RightFingersCTRL
RightKneeJointLookAtHelper
RightKneeLookat1
RightAnkleJoint
RightFootCTRL
Click on the notebook tab that corresponds to the name of the new
endorphin character. This displays the character editor notebook for
that character. The character editor notebook includes the Create Import
Connections editor, the Create Export Connections editor, and the
Exchange Animation Data editor.
2.
In the Create Export Connections editor, the skeletal node has already
been loaded, and we do not need to change this setting. In fact, now that
we have reshaped the endorphin character to match the Maya skeleton,
we can very quickly create a set of export connections automatically,
using a simple proximity test.
3.
Click the Quick Create Export Connections button to create the export
connections based on proximity, and click OK in the confirmation dialog.
The Control Panel compares the position of each endorphin joint to each
Maya joint, and connects pairs of joints that are located within a tight
distance threshold from each other.
4.
192 TUTORIAL 18
Working with the Maya Control Panel
2.
Click the Add Character button, and browse to the folder in which the
endorphin character created in Step 2 was saved.
3.
Select the character from the character list, and click OK to load this
character into your scene.
At this stage, the endorphin character will appear somewhat unusual. This
is because the endorphin Control Panel for Maya plugin does not yet
support the editing of mass and collision object positions and
orientations. Future releases of the plugin may support additional
character-editing functionality; for the moment, the endorphin Character
Edit Mode must be used to complete the character-editing process.
In the current tutorialin which we are generating some sample
animation to demonstrate the animation pipelinewe can ignore the
incomplete editing state of the character. Of course, when editing
characters to create actual animation, you will need to use Character Edit
Mode to adjust the mass and collision objects and joint limits to ensure
that they match the physical dimensions of your Maya character.
4.
5.
With the event marker selected, use the Property Editor to set it Name
property to Stagger 3. Also, set the Start Frame to 0, and the End Frame
to 200.
6.
7.
8.
9.
Select File > Export, and save the animation to an FBX file.
In Maya, open the endorphin Control Panel, and browse to the Exchange
Animation Data tab associated with the endorphin character in the
scene. There should be only one endorphin character in this scene.
2.
Click the Import Animation button, and browse to the FBX file
containing the animation generated in Step 5.
3.
Click Import to import this motion onto the endorphin import character.
4.
Use the Maya Time Slider to scrub through the animation. You should
find that the endorphin import character is correctly animated by the
animation. Importantly, however, you should also find that your Maya
control rig is now driven by the endorphin motion as well. Note that the
Maya control rig does not have any keyframed motion itselfinstead, it is
constrained to the keyframed motion of the endorphin import character.
We are driving the Maya control rig using the import connection
constraints created in Step 3. However, we can now animate the control
rig over this motion. That is, we can use the endorphin sample animation
as a baseline on top of which we animate. In this example, we want to
change the motion of the left hand of the character such that it reaches
backwards as though reaching for an object.
194 TUTORIAL 18
Working with the Maya Control Panel
2.
3.
4.
5.
Move the time slider to frame 10, and adjust the position of this control
node. Move the hand back so that the character is reaching behind itself,
then set a key.
6.
Scrub through the timeline to see the new Maya animation. The Maya
character is still driven by the endorphin import character; on top of this
motion we have added some additional left arm movement. In this
manner you can modify the entire endorphin motion to stylise it as
required by your target scene.
2.
With the hand control object still selected, in the Maya timeline, rightclick and copy the key at frame 10.
3.
4.
5.
6.
Click the large K button to create keys for both the translation and
rotation blend strengths. At this stage, both of these strengths should be
at their maximum (10.0).
7.
8.
Set the translation and rotation blend strengths to their minimum (0.0).
9.
Click the K button to create new blend strength keys for both translation
and rotation.
Between frames 11 and 20, the blend strengths are zero, and
none of this motion is transferred. Any left hand motion is
entirely generated by your own keys.
In this way, you can not only animate over the top of the endorphin
motion, you can also replace the endorphin motion altogether if required.
196 TUTORIAL 18
Working with the Maya Control Panel
Conclusion
In this tutorial, you have used the endorphin Control Panel to create, reshape and
save endorphin characters. You have also created import and export connections
to associate endorphin characters with corresponding Maya characters.
You have then created animation in endorphin, and imported it onto endorphin
characters in Maya. This motion has then driven connected Maya characters via
the import connections that you created.
You then experimented with animating the Maya control rig over the endorphin
motion, and finally, by adjusting the relative blend strengths over time, replaced
the endorphin motion with your own motion for certain periods. In this way you
have taken motion generated by endorphin, and customised it to the needs of
your Maya scene.