This section describes how to use the interface of the Direct3D-specific Direct Translator. For information on how to run the translator, see Using the MakeGame Plug-in on page 9 and Using Translators from the Command Line on page 15. |
GetD3D converts Alias wire models to special Direct3D file formats.
The Direct3D translator does not require any special installation. However, you must install the Alias|Wavefront Demo Viewer on a PC (or PC emulator) to view the output. See Setting Up the Demo Viewer on page 68.
When you run the translator from MakeGame, the Direct3D Options window appears. Use this window to set the options described below, then click Begin Translation to start converting.
output frame hierarchy with animation information.
output keyframes at uniform intervals.
use the tolerance value to reduce the number of keyframes required while preserving the original motion.
Keyframe data is only exported for levels with animation. (For example, in a moving arm, only the animation data for the shoulder is exported if the elbow and hand are not moving)
The higher the tolerance, the more keyframes are removed and the lower the motion fidelity.
Use a high number to eliminate a lot of keyframes if the original animation is much smoother than you need. Use a low number if you don't want to sacrifice smoothness.
the translator will scale the whole model by this factor before conversion.
Note: this is in addition to scaling applied by MakeGame or DtExport.
do not output any material information.
output material information but no textures.
output material and texture information.
output mesh vertex colors instead of materials and textures.
If you rendered the model with pre-lit polygons in Alias, you can export the mesh colors instead of materials.
output normal information. If no normals are output, Direct3D calculates them using polygon order.
convert geometry, normals, and animation from right-handed (Alias) to left-handed (Direct3D) coordinates.
If you turn this option off, the model will appear as a mirror image in Direct3D.
output MetaCycle information. MetaCycle information is saved in a separate file (see Output on page 67).
display updates during the conversion process.
save the output as binary data instead of text. Binary files are usually much smaller than text files.
(Note: when using AWviewer 2.0, this option is not necessary. You can use File Monitoring in the File menu instead).
save the output under the name test.x in the directory specified by the $DT_DOWNLOAD_DIR environment variable. (If you are exporting multiple characters, only the last one is saved as test.x).
Set $DT_DOWNLOAD_DIR to a directory accessible to the PC development environment and use this option to streamline the testing cycle. This directory must be world-readable and world-writable.
If you turn the GUI checkbox off in the MakeGame window, enter these options in the Option field to control the conversion.
-a n | Use adaptive keyframe sampling with tolerance n (where n is 0 to 1). The higher the tolerance, the more keyframes are removed and the lower the motion fidelity. |
-b | Output binary data (instead of text). |
-d | Use file downloading (save the output under the name test.x in the directory specified by the $DT_DOWNLOAD_DIR environment variable). |
-g | Open the option window (GUI mode). |
-n | Output MetaCycle information. MetaCycle information is saved in a separate file (see Output on page 67). |
-v | Print updates during the conversion process. |
-f | Output frame information only (no animation data). |
-m[0|1|2] | Material information. Use one of the following: 0 = do not output material data. 1 = output material information. 2 = output mesh vertex colors instead of materials. |
-t[0|1] | Texture information. Use one of the following: 0 = do not output texture information. 1 = output texture information. |
-N[0|1] | Normals. Use on of the following: 0 = do not output normals information. 1 = output normals information (default). |
-s factor | Scale model by factor before converting. |
The command line options duplicate controls in the GUI window. See Options on page 64 for a description of the GUI interface.
The shared destination directory where files are placed for downloading to a PC for testing. (This variables is used when you use File Downloading or -d).
Parameters: a valid path to a directory
If you convert a scene with several characters with their own MetaCycles, GetD3D outputs each character's geometry and materials into separate files named <character>.x and <character>.x.metacycle (the name is taken from the MetaCycle definition). |
The Direct3D demo viewer (AWViewer) is distributed in source code and executable form. To use it you must first copy it to your PC.
You can use the source code to customize the viewer, or use it as an example of how to use MetaCycle and vertex animation data. To rebuild the viewer:
This is easiest if using Microsoft Visual C++, since you can use the project file, AWViewer.mdp. You may need to change your Build settings to point to the correct include and library paths.
SET AWPATH=<directory>/app-models
(Replace <directory> with the path of the directory you copied the files to).
If you do not want to edit the autoexec.bat file, copy the files pointlight.x, dirlight.x, movie-camera.x, and arcball.x from app-models into the same directory as the executable.
The Demo Viewer is designed for use with three-button mice. Please note the following when using the mouse:
You can also switch the Camera tool on or off by double-clicking the left mouse button, pressing the space bar, or using the Edit menu. |
When Auto-center (in the Interface menu) is off, you can drag along the sides of the view to twist around the line of sight. |
For convenience, the speed of the pan is scaled to the distance to the camera. When you are far away you pan quickly, but when you are in close you pan slowly.
When Auto-center (in the Interface menu) is off, you can drag along the sides of the view to twist around the line of sight. |
There are several ways to control MetaCycle animation in the Demo Viewer:
If you created a vertex animation file (.vanim) for the scene with the translator, the Demo Viewer will automatically load the animation.
Use the VCR controls in the toolbar to view the animation.
There are several ways to improve the playback rate:
To hide or display the Toolbar, choose Toolbar from the Interface menu.
Click this button to open an existing document.
Click the question mark button to view help instructions.
Click the pointer-question mark button for context sensitive help. The mouse pointer changes to an arrow and question mark. Click anywhere in the Viewer to get help.
These buttons control the camera. Y and Z provide YUP and ZUP camera orientations of the scene. The camera button toggles between Camera and Object selection mode.
Click these buttons to view MetaCycle snippets.
Create a new scene using a default model.
Import a Direct3D object into the current scene.
Reload all documents that have changed since they were opened (useful when testing).
When file monitoring is on, the viewer automatically updates the files at regular intervals.
Load a Windows bitmap (.bmp) or Portable pixmap (.ppm) file as a backdrop for the scene.
Close the current scene. Any other view windows of the scene will close also. If you have made changes to the scene since it was last saved, the viewer will ask you if you want to save the changes.
The file menu displays the filenames of the four most recent scenes. Choose the filename to open the scene.
Close all scenes and quit AWViewer.
switch the Camera tool on or off. See Viewing the Model on page 69.
You can also switch the Camera tool on or off by double-clicking the left mouse button, pressing the space bar, or using the toolbar.
delete the currently selected object or light.
delete all objects and lights in the scene.
reload the files of all the objects in a scene (useful for resetting objects to their saved positions).
open a new window with another view of the current scene.
arrange the windows so their titlebars are visible.
list of open windows. Click on the name of a window to bring it to the front and make it active.
show/hide the toolbar at the top of the window.
show/hide the status bar at the bottom of the window.
when this option is on, clicking in a view window centers the view on the click.
Turn this option off to allow twisting around the line of sight by dragging along the sides of the view.
show/hide animation information in the window titlebar and frames per second display in the status bar.
turn off light, arcball and camera manipulators.
The Rendering menu controls the shading, dithering, geometry and color model parameters of the active view in a scene:
shade the objects with flat colors.
shade the objects using the Gouraud shading model.
shade the objects using the Phong shading model.
When this option is OFF, the scene is rendered in monochrome.
recalculate the normals of surfaces as they move during vertex animation (turn this option off to increase the speed of vertex animation).
draw only the points of the scene (fastest).
draw the scene in wireframe (faster).
draw the scene using solid polygons.
use the nearest pixel in the texture to decide color.
interpolate the pixels of the texture to decide color.
do not use MipMaps for texture mapping.
use the closest Mipmap for texture mapping.
interpolates the MipMap for texture mapping.
display an index of help topics.
display the version number and copyright information of the viewer application.