Creating 3D Models and Animations for 3DView2
3D Objects and Animation for 3DView2 can be created using standard 3D modeling programs. The most well-known professional programs are probably "Maya" by Alias Wavefront and "3D Studio Max" by discreet. There are also a number of freeware and open source programs that are suitable for the task but for the remainder of this article we will focus on the major applications.
Internally, 3DView2 uses the Microsoft X-File format (*.x), so all models must be converted to X-Files before they can be used. X-File exporters are available for both Alias Wavefront Maya and discreet 3D Studio Max (and a few other modeling packages).
A X-File always contains mesh data. It can (but does not have to) include animation data, both simple keyframe animation and skeletal animation ("skinning") are supported. It can, however, be tricky at times to export animations since not every exporter supports all features of a particular modeling program.
X-Files also contain material definitions, but you must be aware that materials as seen by 3DView2 and other real time applications are somewhat different from the materials you use in your modeling program. Every modeling program has a different approach to materials anyway. Any "fancy" shaders your program offers will usually not get exported, most exporters only support simple textures that must be available as bitmap files (jpg, png, tga or the like). More sophisticated effects are possible through DirectX shaders in the form of Microsoft FX-Files (.fx). Some modeling programs support FX-Files; for instance, 3D Studio MAX 7 does and Maya 5 (or better) does with the help of a plugin by Microsoft. Using FX-Files the object in your modeling program will appear exactly as it will in 3DView2. Most FX-shaders have parameters like textures, colors or ranges that you must set. Naturally, your X-File exporter must also support shader assignments and parameters.
The following Table summarizes the features of the most popular exporters:
The best exporter for 3D studio MAX is the
Pandasoft Exporter. The best exporter for Maya is the one available from the Microsoft
DirectX SDK.
General Exporting Guidelines
- The exporter tools export the hierarchy exactly as it is in the modeling program. (In Maya the hierarchy is displayed in the Outliner or Hypergraph, in 3DS Max the same feature is called Schematic View). While it is a good idea to have a well-structured hierarchy while working on the model it is usually not a good idea to export the hierarchy like this. The reason is that every mesh group in the modeling program leads to a so-called vertex group in 3DView2. On most systems application performance largely depends on the number of vertex groups and not so much on the number of polygons. Therefore, you should merge all groups that use the same material (or texture) before exporting; this will greatly improve performance.
- The number of textures a model uses also has an impact on performance. It is better to have few large textures than a lot of smaller ones. Combine and reuse textures wherever possible.
- if the orientation of an object matters, make sure that the 'front' points towards the positive x axis in your modeling program
Exporting Models and Animations with discreet 3DStudio MAX
- The default unit in 3DS MAX is 'meters'. This often results in exported objects being extremely large in 3DView2; you will need to scale them down before exporting. It is advisable to set your unit scale to 'centimeters' when working on models for 3DView2 - that way the size in MAX and the 3D engine will match. Go to Customize - Units Setup... to do this.
- Scaled transform nodes cause trouble with 3DView2. Therefore, you will need to reset all transformations before exporting. Use the 'Reset XForm' command to do this.
- Only polygon data gets exported. Before exporting you will need to triangulate your complete scene.
- All known exporters have trouble with transformed bones, e.g. mirrored ones. You will need to reset these transformations before exporting.
The Pandasoft Exporter for 3D Studio MAX
The Pandasoft Exporter is available for 3D Studio Max starting with version 3. The following settings are recommended when exporting models or animations for 3DView2:
- Output Options:
- Mesh Definition, Materials
- Optimize Mesh = Normal or Optimized
- Include Animation, Bones (if needed)
- Object Types
- Mesh Options
- Mesh Normals
- Mapping Coordinates
- Animation (if needed)
- Key Options: Matrix
- Timeline: 3DS Max ticks
- .fx Effect Files
- Include .fx file
- Include .fx parameters
- DX File Type
- DX Frame
- Sub Frame Hierarchy (does not matter if you use skinning)
Exporting Models and Animations with Alias Wavefront Maya
- Scaled transform nodes cause trouble with 3DView2. Therefore, you will need to reset all transformations before exporting. Use the 'Freeze Transformations' command to do this.
- Only polygon data gets exported. Before exporting you will need to triangulate your complete scene.