Obsolete. This documentation refers to either a deprecated system or an unsupported function or feature.
This tutorial shows you how to export a head with morph targets, by using 3ds Max.
Morph Target Min Offset displays the minimum offset value that a vertex needs, in order to be exported. If you use a very low value, like 0.00000000001, the .chr file size will be very large because every vertex in every morph will be saved. If you use a high value, like 5, none of the vertices that have a value smaller than 5, will be exported. The recommended value is 0.0001, which works well in most cases.
Note: If you see only one digit after the colon, you can go to the Customize > Preferences > General tab. There, you will find the Spinner properties. Set the Precision to 5 decimals.
The last thing that you have to do is to check whether Bip01 exists in the Bone Export list or not. If you receive error messages related to the sorting of the bones, you can select the Sort Bones check box.
This tutorial will guide you through exporting a character head from Maya to the CryENGINE assuming that you have a base mesh with multiple morphs that have the same topology.
With this example, you will learn how to make a simple and morph-based facial setup. The Facial Editor allows you to combine and use morphs, bones, and attachments in various ways.
The first thing you need is a set of morphs.
Note: Ensure that all the models have the same pivot.
Check the .chr file. The easiest way to check if morphs are working is to use the Character Editor. Open the model and use the Animation panel to fire certain morphs.
Create the Expressions Folders
Right-click the Root folder and select New Folder. Call this folder Mouth. It will contain all the expressions that specifically control the mouth area.
Expressions
Right-click the Mouth folder and select New Expression to create a new expression inside this folder. Call this expression, Mouth_x. The x stands for the x-axis of the joystick that you will create a little later.
Adding Morphs
Now, either drag the desired morph to the expression or use the text field. Most often, it's easier to use the text field, especially when an expression set starts to grow.
For typing in the name, right-click the Mouth_x expression and select New Expression again. This time, type in the name of one of the morphs: Example_mouth_wide. Repeat the same step with the Example_mouth_narrow morph.
4. Tweaking the Expressions
Right now, you have two morphs. Both are linear and will be displayed at the same time when the expression value (1) is at +1. At the same time, you will get a combination of both negative values at -1. This is something that you don't want.
In this case, Example_mouth_wide and Example_mouth_narrow are opposing morphs and should never be displayed at the same time. Using an expression like this will make sure that either one or the other will always be used, but never both at the same time.
To tweak the expressions:
Right-click the spline (2) and select Spline, instead of Linear. This will convert the line to a curve. Double-clicking the spline will create a point on it. With the help of this, you'll be able to tweak the curve in various ways.
Use this tool to modify the curves, as shown in the following image:
Now, the Example_mouth_wide morph will be active only when the expression value is negative. Example_mouth_narrow will be active only when the expression value is positive.
Repeat the whole process with Example_mouth_open_01 and call the expression, Mouth_y.
It will now look like this:
Non-Linear Expressions
You will use the arch-like behavior of the jaws to create a non-linear expression.
So far, you have a starting morph (base) and a destination morph (Example_mouth_open_01). This creates a linear motion, which is atypical for any rotating joints, like the jaw. This problem can be solved by adding another morph in between or at the end.
Theory:
Arc movement of the jaw:
Linear:
Non-Linear:
Creating a Non-Linear Expression
Add the Example_mouth_open_02 morph to the mouth_y expression (1).
Arrange the curves like in (2) and (3). At 50% of the expression, the Example_mouth_open_01 morph will be displayed for 100%, while Example_mouth_open_02 will not be displayed. At 100% of the expression, Example_mouth_open_01 will not be displayed, while Example_mouth_open_02 will show up till 100%.
The curves are slightly offset from the middle; this produces a smoother blending at the cost of a little negligible accuracy. Make sure that you've saved the expression file. This file needs to be referenced in the .cal file.
Wire It
As you've got the basic set of a simple mouth expression together, you have to wire everything up in the Facial Editor to use it. The expressions (1) need to be listed in the sequence of the sequencer (2). From there on, the expressions can be linked to a Joystick (3).
Right-click the Root folder in order to create a new folder. Call this folder "Mouth".
Using folders will enable you to key certain segments at once and logically separate certain parts of the face from each other. Drag both the expressions to the Mouth folder in the sequencer.
Each expression in the sequencer gets its own curve. From now on, the expression can be animated.
Richt-click the Joystick menu and create a new Joystick.
You can drag its borders to change its size. Use the joystick options to modify its appearance.
Select an expression in the Sequencer (2) and right-click the Joystick to assign the expression by using the Set Horizontal/Vertical Joystick Channel.
Repeat this with the other expression.
Joysticks will work only when a key is existent at the current point in time. The Joystick's cross will be marked red if a key already exists. Make sure that you are either on key or that Auto-Create Key has been activated.
Now, you will be able to move the face by using the Joystick controls.