Takaro CryImporter

Takaro has updated his CryImporter (for Importing geometry and animation from Crytek CGF, CGA, and CAF files into 3ds max 6 or above.). Th...


Do not refresh or leave this page!

File Description

Takaro has updated his CryImporter (for Importing geometry and animation from Crytek CGF, CGA, and CAF files into 3ds max 6 or above.). This version fixes a bug in the importing of mesh chunks, caused by a discrepancy between the official CGF file format documentation and reality! This was first spotted in rl.cgf, the first person rocket launcher model file. This release is version 1.0.2 of the utility.

This is a must have for any moddeler! See the readme for complete notes.

Read More

Download 'cryimporter_1.0.2.zip' (31KB)

Takaro CryImporter script for 3ds max 6 and above

Version 1.0.2
Copyright (C) 2006 Takaro Pty Ltd

Imports geometry and animation from Crytek CGF, CGA, and CAF files into 3ds max 6 or above.


This software is provided 'as-is', without any express or implied warranty. In no event will the
author be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any non-profit purpose, including non-
profit commercial applications, and to alter it and redistribute it, subject to the following

1. Explicit permission from the authors must be obtained if this software is to be redistributed as
   part of a 'for-profit' application.
2. The origin of this software must not be misrepresented; you must not claim that you wrote the
   original software. If you use this software in a product, an acknowledgment in the product
   documentation is required.

3. Altered source versions must be plainly marked as such, and must not be misrepresented as being
   the original software.

4. This notice must be included in any original source distribution.

For the latest version, bug reporting and tech support, go to:


1. Copy the CryImporter folder and its contents to the 'Scripts' directory in your 3ds max 


1. Running the script

	1 Make sure you have the Crytek Exporter installed before running the importer, or it will not 
	work correctly. There are features in the exporter that the importer relies on.
  1 Once script is installed in your 3ds max scripts directory, start 3ds max and go to the
	utilities tab

  2 Press the 'MAXScript' button in the 'Utilities' rollout

  3 Press the 'Run Script' button and in the dialog box, select the 'CryImporter' directory, and 
  then 'CryImporter.ms'

	4 Select 'CryImporter' from the 'Utilities' drop-down list

2. Importing geometry from a CGF/CGA file

  1 If you want the model to appear see-through when it is imported (to see the bones better, for 
  instance), make sure the 'See-Through Mesh' checkbox is marked. All textures are still imported 
  for the model. This option simply sets the 'See-Through' display property of the mesh.
  2 Press the "Import Model" button and in the dialog box, select the model to import. If you wish 
  to import a CGA file, select CGA from the 'Files of type' drop-down list.

  3 Due to limitations with the Crytek Exporter, it is not possible to automatically set the shader 
  name for materials that are imported. This is probably due to a bug, since all other parameters 
  are settable. Due to this, the shader names must be set manually by the user. A messagebox will 
  come up telling you to open the MaxScript listener window, where the details will be listed. This 
  is done by pressing F11.
	4 If your model is a character model with facial expressions, you will be prompted to set the
	  'Morph target min offset' to 0.0 in the CryExporter. This is another action that cannot be done
	  automatically, but is necessary for the correct exporting of facial expressions.

3. Importing animations from a CAF file

  1 First import the geometry file that you want to add the animations to. 
    NOTE: If you import a geometry file and then save it as a .max file, you can't load that .max file 
    at a later date and import new animations into it. You must import the geometry in the same
    session as the animations so that the CryImporter can store internal information that allows it to 
    match up the animations to the right bones in the model.
    If you want to import multiple animations, you must either import them all in one session (you can
    use the 'append' feature mentioned in the next step to help with this), or you must export the
    model you imported previously and saved to a .max file, and then import it back in again when you
    want to import in more animations. 
  2 If you want the animation frames to be added after the current animation range (the range 
    currently shown on your track bar at the bottom of the screen), make sure the 'Append to current
    range' checkbox is marked. If it is unmarked, the animation will be imported starting at frame 0

  3 Press the "Import Anim" button and in the dialog box, select the animation to import.

4. Configuration

4.1 Base Asset Path

Since CGF/CGA files contain texture paths as relative paths, it must be supplied with an absolute
base path to use in order to find the correct textures to apply to meshes. For this to work
properly, the user must extract some of the FarCry PAK files so that the necessary textures can be 
located by the Importer. Typically, extraction of textures.pak and objects.pak is sufficient. Once 
you do this, you should have a directory tree like the following:

   C:\ --- MyAssets --- Objects
                   \--- Textures
In this case your base path will be "C:\MyAssets".

NOTE: The Crytek Exporter exports texture paths by removing the first directory name, and then 
keeping the rest, so for example, the texture "C:\MyAssets\Textures\foo.dds" is exported as 
"Textures\foo.dds". Because of this, you should set up your directory structure so that there is 
only one directory above the Object and Texture directory level, or else your models will probably 
not work properly inside FarCry or the Sandbox.

  1 Press the 'Set Base Asset Path' button and in the dialog box, navigate to the base directory.

4.2 Alternate Asset Path

Since users may want to import models that use custom textures, an optional alternate path may be
specified for locating textures. If specified, this path will be checked first, in order to support
custom versions of textures from the original Far Cry distribution.

  2 Press the 'Set Alternate Asset Path' button and in the dialog box, navigate to the base
directory where the custom textures are located.

4.3 Configuration File

Various properties may be set in the CryImporter.ini configuration file, so they don't have to be 
set every time the importer is used. This file should be located in the base scripts directory of 
your 3ds Max installation.


* The Morpher modifier is used for facial animation. This modifier requires a copy of the mesh to be 
made for each facial animation, which is typically about 20 different animations for a character in 
FarCry. For clarity, these meshes are hidden during the import process.

* Bones typically do not look the same when they are imported. This is due to the fact that the 
CryExporter appears to sometimes export bone meshes badly, but I can't find a pattern to be able to 
programmatically determine which bones are faulty. Also, some files seem to contain only a few of 
the bone meshes. Due to these problems, the bone hierarchy is built using some guesses. It will 
still work the same, but the bones will sometimes look different. I try to construct bones that 
touch their child bones, but when this doesn't work quite right, I make them short, like dummy 
helpers. I also try to size bones appropriately so that they don't obscure the mesh too much, but 
this works better in some cases than others.


* Add support for 2Sided materials if necessary
* Add support for B-Spline and Const controllers if these are still relevant
* Add support for CAL files, to import all animations for a mesh in one hit
* Print out subrange list when importing from a CAL file
* Find a use for scene prop chunks
* Add button to rebuild morpher targets. This would be for when the primary model has been altered


1.0.2 (2006-03-10) - Fixed bug in mesh chunk importing due to discrepancy between official 
                     documentation for CGF file format and reality

1.0.1 (2006-02-20) - Added error checking for zero length ranges in timing chunks

1.0   (2006-01-30) - Added support for vertex animation chunks
                   - Added support for v826 controller chunks

0.7   (2006-01-27) - Added CAF file support
                   - Added support for most of the properties in CryTextures 
                      (don't know what to do with nthFrame, refSize, and refBlur)
                   - Added support for v827 controller chunks 

0.6   (2006-01-24) - Added support for boneLightBinds
                   - Added support for mesh morphs

0.5   (2006-01-22) - Added helpers
                   - Added lights
                   - Added bones
                   - Added skin modifier with correct assigning of vertex weights

0.4   (2006-01-18) - Added support for materials, so we now have fully textured meshes

0.3   (2006-01-14) - Displays basic meshes with names, but no other data
                   - Added INI file support
0.2   (2006-01-13) - Reads and prints all chunk types

0.1   (2005-12-30) - Reads CGF, CGA, CAL files, and can extract chunk headers

Read More

Comments on this File

There are no comments yet. Be the first!


50 XP

Registered 20th February 2006

5 Files Uploaded

Share This File
Embed File