Microsoft Direct3D translator

To launch the Microsoft Direct3D translator, select Direct3D from within the MakeGame window. If you want to use the command line export, keep Gui Off; for a window with the options, turn Gui On, and click Go.

Translator Features

The GetD3D translator is a dynamically shared object (DSO) to be used with the Make Game plug-in to allow Alias wire file conversion to the Direct3D file format.

What does it produce?

Given a scene name, <scene>, specified in the Make Game translator option box, the translator creates a file <scene>.x that contains geometry, hierarchy, material, texture, normal and animation information. If the Metacycle option is on, a file named <scene>.x.metacycle containing information about snippets and transitions is exported. Each texture in the model is saved as a separate portable pixmap (.ppm) file that can be used for texture mapping within Direct3D applications.

The Direct3D translator supports:

Using Direct 3D Translator

After installing and running the MakeGame plug-in, select the Direct3D radio button from the Game Box section. This sets up the default settings to use with the Direct3D translator. You can then change any of the settings for the particular type of output you require.

To run the translator, click the Go button at the bottom of the Make Game translator window. The Direct3D option window is displayed.

Notes

Graphical User Interface

If the translator is started with the Gui option turned on from the Make Game translator option box, another Direct3D translator-specific option box is displayed showing the current default options. You can change options by clicking on the radio buttons. To adjust the tolerance level for adaptive keyframe sampling, simply drag on the scroll bar. When you have finished selecting your options, click on Begin Direct3D translation to proceed.

Toggle Buttons

Frames Only|Animation Selects between exporting the frame hierarchy data and exporting the frame hierarchy with animation information.
Uniform Frames Uniform Frames outputs the keyframes at uniform intervals.
Adaptive frames uses the Adaptive tolerance value shown by the slider to reduce the number of frames exported while still preserving the original motion.
Geometry Scale Factor Drag on this slider to further adjust the global scale factor for the object's geometry.
Materials If toggled on, material information is included. Materials must be on if texture export is desired.
Normals If toggled on, normal information is included.
Textures If toggled on, texture information is included. If the materials are turned off, this button is ignored as textures are not included.
Reverse Z polarity If toggled on, the appropriate conversion is performed to adjust geometry, normal and animation data to a left-handed coordinate system (the coordinate system Direct3D uses). In particular, the z components of all vertices and normals is reflected about the x-y plane (multiplied by -1), and orientations are adjusted to accommodate the different coordinate axes. If this option is turned off, the object's geometry and animation appear in Direct3D to have been reflected about the x-y plane to form a mirror image of the original object.
Metacycle If toggled on, metacycle information is exported as a separate file with extension .x.metacycle.
Verbose If selected, messages will be displayed on the prompt line to update the translator's progress.
File Downloading Click on this option to activate file downloading. This saves the Direct3D file under the name test.x in the directory specified by the environment variable $DT_DOWNLOAD_DIR. This allows files to be sent to a shared directory that can be accessible from a PC to allow automatic updates of models on PC Direct3D object viewers. This shared directory must have read-write-executable permissions for everyone for PC script files to correctly update models in the PC viewers. You can use the unix command chmod a+rwx <directory> to do this. Note: If multiple characters are exported, only the last character exported is saved as test.x.

Begin Direct3D translation Click on this button to begin the translation.
Cancel Click on this button to cancel the translation.

Command-line Options

The following options are available:
-a <n> Adaptive keyframe sampling at tolerance <n> (where n is a real number between 0 and 1). The higher the tolerance number, the more keyframes are removed at the expense of lower motion fidelity.
-d Enable file downloading. The geometry is also saved under the name test.x and placed in the $DT_DOWNLOAD_DIR directory. This allows files to be placed in shared directories accessible to PCs for convenient transfer of objects across platforms.This shared directory must have read-write-executable permissions for everyone for PC script files to correctly update models in the PC viewers. You can use the unix command chmod a+rwx <directory> to do this.
-g Enables the graphical user interface (GUI). This opens up an option window that lets you choose the various translation options by clicking on them. It is useful if you have trouble remembering the command-line options.
-n Export MetaCycle information. A separate file named <file>.x.metacycle is exported. This file can then be used to drive MetaCycle animations in a PC application that uses Direct3D.
-v Verbose information is displayed indicating what stages of the translation are in progress and what parts of the object the translator is currently working on.
-f Only Direct3D frames information (no animation data) is exported.
-m<0|1> Material information flag. A value of 1 includes material information (default), while a value of 0 does not include material data.
-t<0|1> Texture information flag. A value of 1 includes textures (default), while a value of 0 does not include textures.
-N<0|1> Normal information flag. A value of 1 includes normals (default), while a value of 0 does not include normals.
-s <n> The scale option is followed by a real number that scales up or down the object's geometry relative to its original size.

Environment Variables

DT_EXPORT_DIR

Use this variable to specify where the exported files should be placed. They are displayed in the Export directory field of the mgame plug-in.

DT_DOWNLOAD_DIR

Use this variable to specify the shared destination directory for placing files for downloading objects, MetaCycles and textures for PC previewing. The File Downloading or -d command-line option must be applied for downloading to be active.

DT_PLUGIN_LOCATION

This variable tells Alias Power Animator|Studio which directory the GetD3D translator resides in.

Environment variables can be entered into the text fields of mgame and are expanded internally. Make sure that DT_EXPORT_DIR is properly set if you decide to use it from the Make Game translator Export Dir field.

Awviewer: the PC Direct3D Metacycle Viewer

Building Awviewer

Make a subdirectory called awviewer in the Microsoft Game SDK sdk\samples directory and copy the contents of ODS/Games/source/GetD3D/tools/PC to this directory. Enter the newly created awviewer directory and type:

nmake

This assumes you are using the Microsoft Visual C++ compiler. If not, modify the supplied makefile in msvc.mk to fit the needs of your compiler. You will need a C++ compiler since the code in metacycle.cpp is implemented as a C++ class.

Running Awviewer

Awviewer allows your converted Direct3D objects to be viewed under a Windows95 PC. This is a modified version of the original viewer program that was distributed with the Microsoft Developer Network SDK for Direct3D. The major changes are that it has several more flexible camera controls and has support for the Alias|Wavefront Metacycle feature for cycling through animation snippets.

To run Awviewer, type:

awviewer
and press the Return key.

The initial scene has only a light source in the top right. To see this, the view can be moved backwards and forwards using the T and R keys. Objects (like the supplied awlogo.x file) can be loaded from the file menu, and new light sources can be added from the lights menu. Objects can be rotated with the left mouse button and dragged with the right.

The last object that was rotated or dragged is the current selection.

The device quality can be altered using the Renderer menu. Using this menu, the type of device used can also be switched from ramp to RGB. When using the RGB device, the color of lights in the scene can be changed in the same way as you change the color of objects. In 256 color mode, it is advisable to dither an RGB device for best results.

To view available textures on an object, the texture files must reside in the same directory as the object file. Otherwise, no textures will be displayed on the object.

Loading from the Menu bar

From the menu bar, you have the option of loading a mesh, frame or animation file. Mesh files are used if the only template present in the Direct3D file is the Mesh. Frame files contain Frame templates, while animation files have AnimationSet templates. You must use the correct file type when loading a Direct3D file, or an error message will be displayed.

For MetaCycle and animation files, only the first object loaded displays the animation correctly. Subsequent loaded files with animation produce an error message. Simply quit and restart the viewer to display another animation file.

New Features in the Alias|Wavefront Viewer

Additional keyboard controls
O Rotate about the Y-axis.
P Rotate about the X-axis.
T Forwards.
R Back.
Z Move current selection forwards.
X Move current selection back.
G Gouraud shade
F Flat Shade
D Dither toggle.
Delete Delete the current selection.

Microsoft Direct3D Release Notes

Features (Version history)

Version 1.0

Version 2.0

Limitations:

User Interface - WorkFlow notes:





aliasdocs@aw.sgi.com
Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.