The Ignoramuses Guide to FarCry character mesh creation with 3DS Max6

This guide is intended only for the ignorant who are willing to help themselves. It is not intended for the lasy.

The essential steps outlined here are - in the order they must be done in :

  1. Pinch an existing Crytek mesh
  2. Setting up the morph animation's
  3. Setting up BIPED
  4. Getting physique to work

1. Pinch an existing Crytek mesh

You can just drop an existing Crytek CGF file into a Max6 window. You get the Mesh but all other information is lost. I use Ultimate Unwrap3D, which has a CGF import plugin to extract the mesh and bone structure.

  1. Extract the CGF file from the pak (zip) file and put in target directory.
  2. Read CGF file into Ultimate Unwrap3D.
  3. Use the textures readout to determine what textures are needed. If in doubt use CGFdump.exe in the SDK to give a readout on the mesh (texture) composition.
  4. Extract all the necessary textures from the pak file and put them in the target directory.
  5. Save the mesh as either a half-life format 1 file or MS3D file, or VRML format (which only works for non animated (boney)  things). VRML is understood by Max, but can contain loads of junk .
  6. Use Milkshape3D to pickup the MS3D or Half Life file. Make sure that the texture settings are still ok. You can now edit the mesh if you want to.
  7. Export to Max using the half-life 1 SMD file format and the the reference option.
  8. Use the Starlancer half-life MaxScript plugin to read the file into Max. Attempt to drop the mesh dead centre onto the grid, then undo the last option which will be a move.
  9. The mesh should be dead centre over the grid and have a bone based skeleton with skin modifier.
  10. Rewield the entire mesh.
  11. Using CGFdump.exe, find out and set-up the correct Crytek Shader texture settings. You will also have to locate and set-up the bump map settings - all existing mercs need the correct bump map else they wont look right (i.e. boots will have no treads, etc., cause it supplies fine details), custom meshes can cheat and use the main texture map as a poor quality bump map - they look poor.
  12. Export as a CGF file to a target directory of form "FarCry/Objects/.../targetDrectory"
  13. Put the textures in the target directory
  14. Nick an existing cal file, rename it the same as your CGF, and stick it in the target directory.
  15. Associate CGF files with the Editor.exe program in "FarCry/Bin32"
  16. Click on the CGF file. It will now run the Sandbox in model preview mode, and the mesh will animate - if it looks like a load of crap it is either because you exported only the bones or because the skin is wrong (it always is).
  17. You can now proceed to the next stage.

2. Setting up the morph animation's

Morphing is easy once you know how. Morphing only supports straight line movements of the mesh - rotating things is (almost) meaningless; if you want to do a head turn you must not select the neck line vertices (they are needed as a fixed reference point), do not create new vertices or modify settings such as the pivot point, and only rotate it say 10 degrees, else it will look strange as it turns - cause its not actually turning.

  1. Make a copy of the mesh and hide it just in-case of problems.
  2. Make a copy of the mesh and rename it BODY. With the aid of the MeshSelect modifyer, remove (do not use delete) the head. Collapse the modifier stack.
  3. Make a copy of the mesh and rename it HEAD. With the aid of the Mesh Select modifier, remove (do not use delete) the arms, torso and legs. Collapse the modifier stack.
  4. Make about 20 copies of the HEAD. Move them to the side.
  5. Add the morpher modifier to the HEAD.
  6. Add the Edit Mesh modifier to the HEAD.
  7. Reattach the BODY to the HEAD (and not the other way round). Re-label the mesh appropriately. DO NOT Collapse the modifier stack - this will destroy the morph capability..
  8. Alter each head to correspond with the (hidden) head morphs of the SDKmerc, or the merc_scout in the SDK.
  9. Rewield the neck line join vertices.
  10. Load each head into the morpher modifier and check that it is picked up correctly (you must activate the check for update option). Ignore the confusing term "channel" - it just means morph mesh number.
  11. Export as a CGF file to a target directory of form "FarCry/Objects/.../targetDrectory". You must set the export morph setting to about 0.00001, and you may have to alter the Max spinner parameter settings to allow this (0.001 is the fixed spinner default).
  12. Even without a cal file, the morph animation's should be available.
  13. Don't worry if they look ghastly/corrupt - that's due to a lack of correct skin envelope settings.
  14. You must now set up BIPED.

3. Setting up BIPED

If you have done as I have said you will have an animatable mesh with bones. Unfortunately its the wrong type of bones, and won't work correctly in FarCry - the AI cannot detect the mesh volume, so cannot determine if the mesh has been hit by weapons fire (Mad Chimps and area effect weapons are detected). You need to replace the bones with BIPED mesh geometry objects, which have a detectable volume - and this is anything but easy - plus some of the existing (bone) bones. Crytek do not tell us what type of BIPED structure to use, so we must use a VALID existing one.

Use the Crytek SDK sources animations/merc_scout.max (or whatever) and convert its internal units into the type being used in your existing max mesh file, and save it to a new file. Import this into your mesh file.

Use the bip01 object to move the merc skeleton and mesh into the correct position. If the bone system does not move ok, use the schematics link tool to link it to a dummy object, and move the dummy. Make sure the hat bone moves correctly. Once the bones are in position junk the merc mesh.

Now rescale and reshape the bones so that it fits your mesh correctly, and rotate the arm, leg, and hand bones so that the skeleton is correctly posed.  Make sure that the hat bone is correctly positioned (see below).

Use the bone tools to create any missing bones that may be needed (e.g. the shield bone, etc). Position them, then use the schematics link tool (the normal link tool does not work for physike) to link them into the skeleton - Ultimate Unwrap3D will tell you were in the hierachy they will go.

Use physike to initialize the bip01 bone to your mesh. The skeleton will now have a load of useless default envelopes and may have corrupt vertices (the ridgid vertex option does not work - among other things).

Now export your mesh to directory farcry/objects/.../whatever.cgf and provide it with a cal file. Run the sandbox on it in preview mode and it will pick up both the models specific morphs and and default cal animations. Use these animations to check out how correct the vertex envelope assignments are. Attatch things to the hat bone (like caps, helmets, sniper glasses) to see if it is in the correct position; likewise check out the position of any sheld bone, etc. Even so you may be wrong, the hat bone is trickey.

4.Getting physique to work

1. Make sure that the main head envelope covers the whole head. Do not allow it to extend into the body. Lock all head vertices (except for the neck line) and make sure that only the head and neck envelopes are affecting the head).

2. Lock the neck line vertices and make sure that the head is not affecting them.

3. Make sure that the main hand and foot envelopes are large enough.

4. The calf envelopes should not extend beyond the feet.

5. The thigh and calf envelopes should only affect their own legs - shape the envelopes so that they don't, and don't cross over at the crotch. The intersection between thigh and calf envelopes is critical - and leads to bad knees (see below).

6. Torso envelopes need to be wide enough.

7. Very big clavicle envelopes are needed to stabalize the neckline and upper arms. Likewise, big pelvic envelopes may be needed to stabalize the lower torso.

8. The fingers must have all their vertices locked and set to the correct fingers.

9. The Weapon02 bone is a ****** - the problem is that its not symetrical. It is needed to stabalize any backpack, but can upset the shoulders and the neckline - reduce the size of the envelope and / or lock vertex assignments if needed. It can strengthen the upper back.

10. Vertices always go corrupt when vertex locking is used - and there can be loss of normalization (no vertex weighting), so make sure that you save physike files incase physike trashes the model (its usually impossible to find the bad vertices). You need to use the Character Studio documentstion to find out how to convert bad vertices back into ridgid vertices (its difficult but neccesary because control vertices don't work right).

11. If the cgf mesh looks very bad (like something from the Hammer House of Horror) then it means any of these :

To correct for broken vertices - they corrupt smoothing - just select all vertices in EditMesh mode, and rewield them. For anything else, you will have to locate (not difficult, by using the various physike vertex tools) and lock the offending vertices then manually correct them.

12. Models need a lot of vertex locking and manual assigning - the envelope system is just not adequate.

13. Check your model in the Sandbox model viewer mode using the standard animations :