This page will be going over general techniques and workflows riggers go through to setup a decent character rig through 3ds Max and Maya. When you receive a humanoid model that you will need to rig, you will first need to fit a biped skeleton to it. When a modeler creates a character, they use this rig to match all their proportions, and the biped should be included and the figure posed in the file.
If you will want to utilize the CryENGINE's integrated IK system it is important to keep in mind the joint orientations must be setup the same way and naming of the joints as well as defined in your chrparams file.
For Maya Users: Also be sure that you work with -Z as your front view as this is the front in-engine.
The joint orientations must be aligned as described:
Arms: z= forward, X= downward along arm
Legs: z= forward, x= downward along legs
Eyes: Y= forward, z= along vertical axis
In the above left you see the kind of object you will be receiving from a modeler. The arms are in a default position and the object should be frozen. The object may or may not be one single mesh, with no unattached pieces, and likely a head. On the right, you see the biped rig. If your character does not have a biped skeleton (it should have one that is posed and aligned already at this point). Import the default biped into your character's scene.
Figure Mode (Max Users)
Now, you will be lining the biped up with the character that you have been given. As stated above, do not worry if the character is not in the same pose as the biped. You will now enter figure mode to align the biped with the character that you are going to rig.
Standard Rigging For Maya Users
Now, you will be lining the biped up with the character that you have been given. As stated above, do not worry if the character is not in the same pose as the biped. In Maya you will have you jointed skeleton, then parented on that will by the phys mesh and next to it will be the copied phys mesh but with the parent frames.
You can lower the transparency of the material so that you can better see the bones inside the character to check proportions. This hand is perfectly aligned and fits to the proportions of the model.
For Max Users: Another way to do this is to turn on the built in X-Ray mode by pressing Alt+X.
For Maya Users: Another way to do this is to click "Shading" then enable "X Ray" or other various rendering options to better viewing.
You are now able to begin the skinning process of your character, the next part will be split into two sections between Max and Maya. Each one will provide supplemental information on the setup for each. Before starting to skin the character it would be recommended that the character's local pivot is zeroed out at [0,0,0], and the model's scale is [100%,100%,100%]. If not go into the Utilities menu and Reset the Xform on the model for Max users, Freeze Transformations for Maya users.
For Max Users: You can begin by using 3ds Max's Skin modifier in place of the old physique for the skinning purposes. Skin modifier is a much newer and more versatile addition in 3ds Max. There is also Cryskin which features a more accurate preview of how your skinning will look in Sandbox.
As now you have aligned the biped to the model, you are ready to proceed with skinning.
CRYENGINE always supported 4 weights.
Since CRYENGINE 3.6 the engine supports 8 weights instead of 4, but only on CPU. When running on GPU, the 4 smallest weights were ignored. (use CPU instead of GPU by setting flags=8 on the attachment in the CDF file, or the "software skinning" option in character tool in CRYENGINE 3.7)
Since CRYENGINE 3.8 the engine supports 8 weights on GPU as well.
For Maya Users: As now you have aligned the biped to the model, you are ready to proceed with skinning. Select the model and your rig, go into the skin panel, then Bind Skin and Smooth Bind. Be sure that when you skin the character to the rig you have Quaternion skinning and no more than 4 influences.
Most of your weight editing will be done via the Paint Skin Weights Tool:
Now you can proceed with the fine tuning of the skinning. There are various techniques to keep in mind but often individuals will develop their own process
The Paint Skin Weights Tool is one of the rigging tools in Maya. With the Paint Skin Weights Tool, you can paint weight intensity values on the current smooth skin. If you want to set individual skin point weights to specific values, you can use the Component Editor.
Note: Reflection is disabled for the Paint Skin Weights Tool. You can use Skin -> Edit Smooth Skin -> Mirror Skin Weights as an alternative method for reflecting skin weights.
When using the Paint Skin Weights Tool, you cannot select the joint you want to paint the weights for through the Maya marking menus. Instead, you need to select the joint from the list of influences in the Paint Skin Weights Tool settings or -click a joint, then press the up and down arrow keys on the keyboard to navigate your character's joint hierarchy. While you are painting skin point weights, you can reset the weights to their initial values at any time.
You can copy smooth skin weights from one smooth skin object to another, or from one group of smooth skin objects to another. You can also copy skin weights on selected components of the skin, or from a single vertex.
Copying smooth skin weights can save a lot of time if your project involves setting up several similar characters, as it allows you to transfer weight information between characters. Rather than skinning all of your characters and painting weights for their deformation effects individually, you can focus your painting efforts on one character, then copy those weights to the other characters.
For best results, the skeleton on the character you are copying from and the skeleton you are copying to should have the same structure. If the skeletons are similar, Maya will still try to copy the weights. However, if the skeletons are radically different in scale or proportion, consider doing the following before you copy:
Scale and rotate the joints to make the skeletons better match.
Copy skin weights using the UV space influence association setting provided UVs exist on the both characters. In addition, the skeletons on each character should be in the same pose during copying. If the orientation of the joints are not similar, the copying can lack some precision, which means you may have to do some touch up painting to the results.
If the skin objects have different numbers of CVs, or if the ordering of the CVs is different, the copying will intelligently take into account the differences and provide the same type of weighting. This is very useful if you want to apply the smooth skin weighting from a high-res character to a low-res version of the character.
While you can copy skin weights between skin objects of different types, the options work best when the source object is a polygon mesh.
You can mirror smooth skin weights, either from one smooth skin object to another, or within the same smooth skin object. You can also mirror skin weights on selected components of the skin.
Mirroring smooth skin weights greatly speeds up the process of editing and fine-tuning skin deformation effects. For example, you can perfect the smooth skin weighting for a character's right shoulder area, then simply mirror the weighting to the character's left shoulder.
Maya mirrors weights across planes defined by Maya's global workspace axis. For mirroring to work properly, the skinned object (or character) should be centered on the global axis, or at least aligned along the axes you want to mirror about. Also, the skinned object (including its skeleton) should be in a pose that is symmetrical across the mirror-plane.
Now you can proceed with the fine tuning of the skinning. At your disposal are several very effective skinning tools:
The way of working with skin is usually a personal preference. Yet there is really one common way of starting skinning and that is using the Skin Envelopes.
Here you see the Vertex Link Assignment Rollout. You will see these options if you are initializing or re-initializing Physique on a character mesh. Lets go through these options as they relate to skinning and the engine.
Briefly, the other options are:
Figure mode allows you to adjust the biped after the character mesh is attached to it with Physique. After using Physique to attach a character mesh to the biped, you may want to realign a biped limb/joints relative to the character for better deformation. You still must deactivate Physique, realign the limbs, and then a Reinitialize in Physique, you can then reactivate the Physique modifier.
Weights assigned to vertices do not always add up to 1.0 or greater, when this happens, instead of leaving vertices behind as the character moves, Physique will normalize then to a value of 1.0. (Based on their current weighting percentages per link?)
By adjusting the falloff, overlap, scale, and other envelope parameters you can change the vertex weight distribution across multiple links. This will then change the way the character mesh is deformed as the biped skeleton moves. 80% of your time rigging a biped character in Physique will be correcting the way the character mesh deforms on a character through the use of envelopes.
There are two different ways links can be enveloped, deformable and rigid. You do not use deformable vertices; only rigid weighting, which is also known as Linear Skinning. From the manual: 'Rigid envelopes determine vertex-link assignment based upon the linear 3ds max link and move in an immobile relationship to the link.' Vertices in rigid envelopes though, are (blended) in the overlap area of other envelopes as discussed earlier. Take a look at the following section for a more detailed look at the Vertex Link Assignment Rollout.
The most important thing about enveloping a character, is knowing how to override those envelopes. You cannot get by with enveloping many times, and you must define weights on a point-by-point basis by manually assigning Vertex Properties. For example, you can select vertices and just remove a link's influence from them entirely. You can also change the weight distribution between links for a single vertex by using type-in weights. Here is a rundown of what you see at your left:
Select - This allows you to select vertices when in the Vertex Sub-Object Weighting mode. Click to enter the global selection mode.
Select by Link - This will select all vertices that are influenced by the selected link.
Assign to Link / Remove From Link - This will add or remove weighting from the selected vertices. You do this by selecting the verts, then choosing an option then selecting the link in question.
Locking Assignments, and Type-In Weights - You can type in a link weight value per vertex for multiple links. To do this they must be locked. When you click the Type-In Weights button, you will be presented with the dialog on the left. Now for the fun part (or most depressing), you will now have to go through and tweak individual point weights one vert at a time.
Character Studio (CS3.X) does not have MaxScript support. You may have noticed this if you were trying to echo commands in MaxScriptListener to create a script to mirror envelopes or weights (and it would be such a simple script too!). This is a major problem with Physique and Character Studio in general. Luckily for us, enough people seemed to have complained, and Discreet later released some source code on their website that exposed some of Physique to MaxScript. The source code is attached to this tutorial. The source code has also been compiled into a .GUP file for Max 7. Here are links to the files:
Place IPhysique.gup into your \plugins
directory. You can now use the hooks documented on the Discreet Sparks site linked above to make scripts that take advantage of Character Studio and Physique features.
Do not use a compiled version of the Physique Exposure source that you have downloaded from a website or external server, ours is compiled to work with the latest version of Max and meld with our internal workflow and tools.
There are very few MaxScripts that utilize the Physique Exposure plugin/source. They have been developed by people working at studios and now been ported to free tools.
This is a great tool for mirroring all assigned or locked vert weights in across the X axis. Here is a quick rundown:
1) Weight up one part of the model (i.e; hand).
2) Select the area you may select by Element, Poly, Edge or Vertex (Do not select verts in Physique Sub-Object mode).
3) Click Mirror Selected.
4) When it is finished, it will select the vertices that were successfully mirrored.
5) Enjoy all the time this has just saved you!
Tips:
Problems:
This script has been updated to work with Max7, if you find and download the one online, it will not work with Max7 or our tools, so use the one attached to this tutorial.
1) Select the verts you would like to save.
2) Click Export, and type in the filename. The weights are now saved.
3) You can change the point order by adding or removing geometry.
4) If you import them via Position or Index, position compares the positions if the point order has changed, index uses the point order to remap the weights in a mesh that has not changed.
5) When comparing and remapping vertex weights, Distance Check measures the distances between mirrored points on each side of the X axis, Threshold Check will use the same threshold-type implementation used in the script above.
On export you receive this message. After initializing a Physique with <4 links/bones, how are there 5 assigned to one vert? How do you find this vert?
1) Find it by point index: Use a MaxScript to find the vert by point index. Open up MaxScript Listener and enter the following: $Rifleman_Light_Body.verts[#baz] = #(2110)
Then press enter. The vert is now stored into a selection set 'baz' and you can select it. If this worked MaxScript Listener will return: #(2110)
Select: $Rifleman_Light_Body.verts["baz"]
This should select the vert you were looking for. If it is not the point you are looking for. If this is the case, follow the next step.
2) Find the vertex by it's location: Use a MaxScript to generate a dummy object at the exact location of the point. Generate a dummy object around it, with MaxScript of course: dummy pos:[53.97,-3.56,91.98] boxsize:[1,1,1]
This will create a dummy directly around the point in question, and return: $Dummy:Dummy06 @ [53.970001,-3.560000,91.980003]
Pictured left is an example of the worst case scenario, this character had many unweighted vertices, no matter how many times it was initialized. In this case, only one hand has been weighted, and then mirrored it to the other side, which works well. NOTE: The point lies in the coordinate system relative to the mesh object. And not always the world coordinate system.
IF THIS DOES NOT WORK: Sometimes the dummy will be created in a spot with no point. You will need to add a 'reset Xform' to reset the transformations, depending on certain things the modeler may have done to the model. Add the xform modifier between the editable mesh and physique in the stack, as shown below:
Now this will mess up physique, so you may want to save first. It helps to open another copy of Max and load the character, you can then create the dummy on the version with transformations reset, and find the same vert on the character with physique applied in the other running version of Max. If the dummy is still not encasing the point, you may need to try exporting the character again, the numeric location of the erroneous point may have changed in the error message.
Let's get info on it by clicking 'Type-In Weights'.. (It has to be locked, if not it wouldn't have 5 links unless you messed up in initialization by selecting N Links).
It has five links assigned, but in 3ds Max, four of them are the exactly the same bone, and on top of that, they have zero influence. This should count as only one link but it doesn't. It also does not ignore links with values of zero, or even multiple links with the same name.
Unfortunately, the only fix is to now select the vert, unlock it, remove it's assignments, and assign it to a new link. Then you have to re-weight it. You have to do this for every point that you find in the mesh from now on.
NOTE: The chances of this happening would be greatly lessened if you just initialize with two or less links/bones. This will make you have to work a tad harder on the shoulder carriage, but in the end you will have less problems like this.
Deformation in the Character Editor not matching what is in your DCC tools:
There are a few reasons the deformations you see in Maya or Max may not match what you see in Character editor. Here are some fixes to known problems:
1) Quaternion Skinning Quaternion Skinning must be used in all skinning procedures as any other will result in abnormalities in engine.
For Maya Users: Simply be sure you have the Quaternion method chosen when you bind your skin.
For Max Users: Spherical skinning may be enabled (although currently it is disabled by default). To disable Spherical Skinning, enter the following console variable: ca_SphericalSkinning 0 This will drop to the default linear skinning you are accustomed to from Max.