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 Tool

The 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-In

An 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 Conversion

The MAXExporter class traverses the 3D Studio MAX scenegraph hierarchy that is being exported, analyzing and converting all the scene elements into eight basic categories:

  • hierarchy node (group node, light node, view node, model node)

  • light resource

  • shader resource

  • material resource

  • texture resource

  • model resource

  • mixer resource

  • motion resource

 

 

Mesh Conversion

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.

Shockwave 3D Scenegraph

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.

WriteManager

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.

Details

To recap, a high-level overview of the entire export process involves four main steps:

§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.