Exporting from Max

From C4 Engine Wiki

Jump to: navigation, search
Image:warning.jpg Obsolete Article

Some or all of the information on this page is obsolete and needs to be updated.

Installing the Collada Plugin

The following steps were tested with 3D Max 8 SP3. I can't provide help for any other configurations.

Installing the IGame library

In order to use the the Collada exporter, it is necessary to install the IGame library. Visit this thread [1] on the offical Collada forums and download the latest IGame library (currently from 03-06-06). Extract it and copy the file IGame.dll under COLLADA/exe/ to the base directory of your 3D Studio Max Installation, and overwrite the old IGame.dll. (Remember to backup first!).

Installing the Collada Exporter

Go to the homepage of the Collada Plugin [2] and download the latest version (currently version 1.04). Extract the archive and copy the file ColladaMax.dle from the 3dxmax8 folder to the plugins folder of your 3D Studio Max installation.

Downloading the "Reset Xform Box Trick"

If your exported Collada files appear messed up in C4, you need this Max Script. Look at "Helping Mr. Shizzle" for instructions about how to use it.

Helping Mr. Shizzle

This is a step-by-step tutorial about how you can import an animated mesh into C4. Download the archive, extract it and open the file MrShizzle.max. You will see a simple mesh with bones and a skin modifier. The first thing we have do to is fix the mesh. So we need the “Reset Xform” Max Script. Go to the Utilities Panel, choose MAXScript, then Run Script, and choose the script. In the new window, uncheck “Freeze Final Result”, click on “Pick Object”, and finally click on the mesh. When you've done everything right, the color of the mesh should change.


Image:reset_xform.jpg


Now, you need to re-assign the Skin Modifier, because the script will delete all attached modifiers. Go to the Modifier Panel and select the modifier “Skin”. A new side-panel will open. Choose Bones: Add. In the new window choose All, and after that choose Select. Mr. Shizzle is now ready for the export.


Image:skin.jpg


Now it's time to export Mr. Shizzle. We need to export him two times. The first time, we'll export his base mesh and the second time, we'll export his animation. Choose File/Export. In the save dialog, choose COLLADA (*.DAE) as the file type. Name the file MrShizzle and click on Save.

The Exporter Options will show up. As we are only exporting the base mesh, the only checked option in the dialog should be “Object Space”. Leave all the other options unchecked and click OK. Now follow the same steps with the animation. Export it again, name it anim, but this time, check “Single <animation>” too, otherwise it won't export the animation.


Image:export_mesh.jpg


Now go back to C4. In the first step, we have to copy both of our files to the correct location. Go to the Import/dae/ directory inside the C4 base directory. Copy the MrShizzle.dae there. Now, create a folder with the name MrShizzle and copy anim.dae into it. Read the Creating_an_Entity_Model article for more information.


Image:export_anim.jpg


Fire up C4, go to the World Editor and choose Import Scene from the World menu. Select MrShizzle.dae and click Open. You will see the imported mesh and its bones. If you want, you can apply a new fancy material (only colors, as Mr. Shizzle doesn't have texcoords). When done, choose Export Model from the World menu and save the model as MrShizzle.

Congratulations, you have now successfully imported the 3D Max file in C4. Finally, we apply the animation to it. Open MrShizzle in the Model Viewer. On the left side, click on the Import button and choose anim.dae. After that, the animation shows up in the list on the left side. Select it and press the Play button.


Image:Ende.jpg

Resources

Homepage of the Max Collada Exporter [3]

Documentation of the Max Collada Exporter [4]

Download of the 3DXI library [5]

Hompeage of the "Reset Xform Box Trick" [6]

Download Mr. Shizzle [7]

Personal tools