trueSpace Exporter

Programmer: Shane Cantrell

Downloads:

Source Code: ExportModel_Source.zip

Description:

This is the code for my trueSpace model exporter. I have uploaded it as proof of my plug-in writing abilities. :) Of course, it is sort-of a hack since its sole purpose is to allow me to experiment with Direct3D. I intend to make a better one once I have a worthy engine.

How it works:

1) Open the project in Visual C++ (7.0 or above)

2) Open the my_model.h file and include or remove the "#define _SaveAsAnimation_" line depending on whether you want the plug-in to export the model or animation.

3) Compile the plug-in.

4) Add the plug-in to your trueSpace setup.

Important note:

Every triangle in the model must have 3 adjacent triangles. This is needed for my shadow algorithm. You can achieve this by making sure that none of your three-dimensional objects are open. Unfortunately, a lot of the trueSpace models that come with DarkMatter are open and must be modified. (If your model fails the test, then trueSpace will exit. This is a bit annoying, but the exporter is only meant to get the job done, which it does.)

Models will not automatically work in my demo software. Object names have to corrispond with names in the bone.cfg file that can be found in the Model folder. The number in the configuration file is used as a standard to determine which bones are the same between animations and models. (There may be other little technicalites too. If you are really trying to do this, then feel free to contact me.)

Known problems:

Most failures are fairly harsh and exit trueSpace completely. This isn't too serious since the software is only meant to be good enough to generate files that I can experiment with anyway, and not supposed to be a professional development tool.