Model Resource
147
A model also contains modifiers that control how the model is rendered or how its animation
behaves. Modifiers are attached to a model by using the
addModifier()
method. After a modifier
has been attached to a model, its properties can be manipulated with script.
The following modifiers are available to a model:
For more information about the methods, properties, and events available to the modifiers, see
the Using Director topics in the Director Help Panel.
Model Resource
Represents an element of 3D geometry that is used to draw 3D models.
A model makes use of a model resource and occupies a specific position and orientation with a
3D world. A model also defines the appearance of the model resource, such as what textures and
shaders are used.
For more information about the relationship between models and model resources, and about
using models and model resources, see the Using Director topics in the Director Help Panel.
You can create a reference to a model resource by using the
modelResource
property of the 3D
Member
object. The
modelResource
property gets the model resource at a specified index
position in the list of model resources. In Lingo, you use the
modelResource
property directly
from the 3D
Member
object to create a reference. In JavaScript syntax, you must use the
getPropRef()
method to create a reference.
The following example creates a reference to the second model resource of the 3D cast member
wheels
and assigns it to the variable
myModelResource
.
-- Lingo syntax
myModelResource = member("wheels").modelResource[2]
// JavaScript syntax
var myModelResource = member("wheels").getPropRef("modelResource", 2);
Modifier
Description
Bones player
Modifies a model’s geometry over time.
Collision
Allows a model to be notified of and respond to collisions.
Inker
Adds silhouette, crease, and boundary edges to an existing model.
Keyframe player
Modifies a model’s
transform
properties over time.
Level of detail (LOD)
Provides per-model control over the number of polygons used to
render a model, based on the model’s distance from a camera.
The LOD modifier is also available to model resources.
Mesh deform
Alters an existing model resource’s geometry at runtime.
Subdivision surfaces (SDS) Causes the model to be rendered with additional geometric detail in the
area of the model that the camera is currently looking at.
Toon
Changes a model’s rendering to imitate a cartoon drawing style.
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...