3D Objects

Shockwave 3D allows you to add 3D objects to your Director movie. 3D objects can be manipulated in the Properties window, or with Lingo code.

Shockwave 3D cast members can be created within Director, or imported from a .w3d file created by another 3D program (e.g. Maya, Carrara, 3D Studio Max). A 3D cast member differs from a non-3D cast member in that a 3D cast member contains a complete 3D world. A 3D world contains the objects that provide access to 3D functionality. All objects in a 3D world are based on a basic object known as a node. The simplest form of a node in a 3D world is a Group object; a Group object is essentially the most basic node. All other objects in a 3D world are based on a Group object, which means that the other objects inherit the functionality of a Group object in addition to containing functionality that is specific to those objects.

The following diagram shows how all the objects work together.

Director Object Model

* This page was derived from Adobe's Director Scripting Reference. Refer to that for more detailed information.

Shockwave 3D Cast Member and Sprite

A Shockwave 3D Cast Member contains a complete 3D world. It can include one or more Models, ModelResources, Cameras, Lights, Groups, Shaders, Textures, Motions, and Meshes. You can initialize a 3D world with:

member("myWorld").resetWorld()

When a Shockwave 3D Cast Member is dragged onto the stage, a Sprite is created. This has the properties of all sprites, with additional methods for adding/deleting cameras (see below). It also has a property that determines whether the 3D object is rendered with antialiasing, and whether or not it is rendered directly to the stage. Rendering directly to the stage reduces rendering time, but doesn't allow anything else in the movie to overlay the sprite. Here are examples of these properties being set:

sprite(1).antiAliasingEnabled = TRUE

sprite(1).directToStage = TRUE

Model

A model represents a visible object in the 3D world. A model has a particular position and orientation in the world, and can also have associated shaders and textures. A model's geometry is defined by a Model Resource. In additon, a model can be modified by a Bones Player, Collision detecter, Inker, Keyframe player, Level Of Detail Mesh deformation, Subdivision surfaces, or Toon modifier.

Light

Models in the 3D world are illuminated by one or more Lights. A light can be directional (like the sun), a point (like a lightbulb), a spot light, or ambient (everywhere). Lights also have position, orientation, and color.

Camera

A camera controls the view of the 3D world that is shown on the stage at any one time. In addition to its position and orientation, a Camera can have a backdrop image, a series of overlay images, and a fog effect.

Shader

A shader determines a model's surface color. This can be a flat color, or it can be modified by applying one or more textures to it.