To complete this tutorial we will now be moving into CRYENGINE. We'll be using the Character Tool and using the character attachment system within.
Please download and unzip the tutorial file contents to your <CRYENGINE_ROOT> folder.
The "SkeletonList.xml" is normally located at "<DRIVE_LETTER>:\<CRYENGINE_ROOT>\GameSDK\Animations".
Source 3ds Max / Maya scenes with exported CRYENGINE files:
Since the skeleton list is not used in Engine release 5.6 onwards, the Tutorial SkeletonList.xml file doesn't need to be downloaded. Any other references to this file within this tutorial can also be ignored.
Please backup your "SkeletonList.xml" before overwriting!
If you want to open the provided tutorial CDF in Character Tool immediately, you'll have to add the pony tail CHR file to your custom "SkeletonList.xml" first.
From the last section you should have these files exported:
In this section we will go through the process of how to get the *.chr file into the "SkeletonList.xml", create a new character and extend the new character with a pony tail "Skin Attachment". Thereafter, we will go into the next section demonstrating the "Character Tool's" Attachment System with some use cases. By the end you will have...:
Look at the pane on the left of the Character Tool. You will find your new character CDF file under:
Characters -> Objects -> jigglebone_tutorial_maya\attachment_ponytail.cdf.
Double-click it to open the character. Notice the asterisk in front of the name?
On the right pane the properties of the CDF are displayed, there browse for the *.chr you exported and added to the "SkeletonList.xml":
Add the skeleton again to the CDF!
Before we dig deeper into the simulation parameters, let's change the layout for the properties on the right side of the Character Tool window. This is an important step to be able to tweak the values across multiple "Joint Attachments" concurrently.
Split the right pane in the "Properties" section into two right and left halves
Try selecting multiple Joint Attachments on the left and make changes for the same parameter in the right. Cool, eh?
Always use this layout for tweaking parameter across several attachments.
In addition, you should turn on/off the debug view when you make changes to the simulation parameters:
Debug View
First, pendulum physics will only produce rotations to your simulated nodes. If you need translations, use the spring attachments or at least mix the spring and pendulum simulated attachments. You will see bending of the joint chain.
The strategy to changing the physics parameters is to only change one of a kind at the same time, ideally starting from the top. For the Pendulum physics system we highlighted the parameter names by using a Blue color.
Take special care of these two parameters for each "Joint Attachment" in the attachment list.
All other mentioned parameters are applicable to the other pendulum types: Pendulum Hinge, Pendulum Half Cone, etc...
Try using the same parameter values for the simulated joints, especially true with equidistant joints.
If you leave the "Pendulum Cone" simulation joints to the default values, you may want to play with the Damping, Joint Spring and the Cone Angle to get nice results:
use low Damping values around 0.3 in 0.05 steps.
start with Joint Spring values around 20 and advance in steps of plus/minus 5.
increase the Cone Angle, if the simulation becomes jerky. Re-evaluate Damping and Joint Spring.
First, spring physics will produce only translations. If you need rotations, get the pendulum or at least mix the spring and pendulum simulated attachments.
You will see stretching of the joint chain, along with them translated each on a disk or ellipsoid shape, when using this simulation type.
Example of a "Spring Ellipsoid" simulation setup ( File: attachment_antenna.cdf )
Springs are much harder to control than the pendulum. Your main goal should be:
Start using same parameter values for the simulated joints, but vary the pendulum length (Simluation Axis) to "stabilize" the joints.
With Debug View turned on:
increase the Disk Radius, so the springs have full freedom of movement,
lower Gravity to small values, e.g. 0.2,
increase Damping to high values up to 10,
lower Mass below 1.0,
play with Stiffness values, in steps of 5, start with 30.
Open the "attachment_springytail.cdf" in Character Tool.
Perhaps you may have noticed in the previous Use Case 2, that to offset rotate up the antenna, we added a "Pendulum Cone" with initial rotation. This way, we could rotate the whole joint chain. Hence, you may have SEVERAL simulations running on ONE joint:
Achieve a similar pendulum simulation with springs
We used a different setup to make a pony tail, but the difference between the CDF using springs and pendula is the following (beside the stretching (translation) of the springs and bending (rotation) of the pendula simulation) :
With the springs, the whole joint chain is tilted as the "head joint" (the node that is animated) ends up tilted, while with the pendula, the whole joint chain rotates to point down, as gravity pulls it downwards.
Comparing the difference in setups with Springs & Pendula, while in a rest pose.
With the spring sample CDF, we added in front of the springs a pendulum simulation joint to offset rotate the joint chain. We could also replicate the pendulum-only setup by tweaking the value for the pendulum pulled downwards by gravity.
What we achieved in this tutorial: