Export Process Overview |
The export process converts a 3-D authoring tool's scenegraph to a Shockwave 3D§ scenegraph with Shockwave 3D data types. The resulting Shockwave 3D scenegraph is then written to a compressed and streamable Shockwave 3D (.W3D) file.
3-D Authoring ToolThe 3-D authoring tool creates a hierarchical scenegraph and underlying database for a 3-D scene. Note: Sample code used in this exporter SDK will reference 3D Studio MAX§ as an authoring tool and will demonstrate how its scenegraphs were converted in the export process. Refer to the 3D Studio MAX SDK for more details of its scenegraph structure. Exporter Plug-InAn exporter plug-in interface initiates the export process. It calls a MAX_S3D_Plugin class that describes the properties of the plug-in. This class, derived from an exporter base class template in the 3D Studio MAX SDK, also instantiates the MAXExporter object used for the next stage of the export. Scenegraph ConversionThe MAXExporter class traverses the 3D Studio MAX scenegraph hierarchy that is being exported, analyzing and converting all the scene elements into eight basic categories:
|
|
Model/geometry elements undergo an additional step before the entire conversion process is complete. The export converts mesh data from the authoring tool to IFXAuthorMesh data structures. This data is then compiled by the IFXAuthorMeshCompiler to create IFXMesh/Shockwave 3D data structures, which are material partitioned to allow faster rendering time.
The Shockwave 3D scenegraph database is created one element at a time. The scene hierarchy is established and, as the scenegraph resources are converted, they are added to the database as scene palette resources. The Shockwave 3D scenegraph is often simplified, with some branches of the scene hierarchy being flattened out in order to speed up real-time rendering. A parent node and child model mesh in 3D Studio MAX, for example, are exported into Shockwave 3D as a single model node.
MAXExporter calls the WriteManager, which references the Shockwave 3D scenegraph in memory and transfers it to a write buffer to write out a .W3D file.
To recap, a high-level overview of the entire export process involves four main steps:
Communicate scenegraph data from the 3-D authoring tool to the exporter with an Exporter plug-in interface
Convert the authoring tool scenegraph database, and convert model geometry data structures into Shockwave 3D data structures
Create a Shockwave 3D scenegraph database
Write Shockwave 3D scenegraph data to a .W3D file
§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.