What's New in Director 8.5 > 3D Basics > The 3D world > Models and model resources |
![]() ![]() ![]() |
Models and model resources
Models are the objects that users see within the 3D world. Model resources are elements of 3D geometry that can be used to draw 3D models. A model is a visible object that makes use of a model resource and occupies a specific position and orientation with the 3D world. The model also defines the appearance of the model resource, such as what textures and shaders are used. For more information, see Working with models and model resources overview.
The relationship between a model and a model resource is similar to that between a sprite and a cast member. Model resource data can be reused, because multiple models can use the same model resource, just as cast member data can be reused by multiple sprites. Unlike sprites, however, models don't appear in and can't be controlled from the Score.
For example, a 3D cast member might contain two model resources. One could be the geometry for a car body, and the other could be the geometry for a car wheel. In order for a complete car to appear visibly in the 3D scene, the model resource for the car body would be used once, and the model resource for the wheel would be used four timesonce for each wheel.
All models are located within a parent-child hierarchy. A model can have any number of children but only one parent. If a model doesn't have another model as a parent, its parent is the group called "world," which is, for all practical purposes, the 3D cast member itself.
A model's parent and children don't have to be models, however. Models, lights, cameras, and groups all share the same parent-child hierarchy. A light, for example, can be the child of a group and the parent of a model.
The primary benefit of these parent-child relationships is that they make it easier to move complex models around in the 3D world and to have the component parts of those models move together in the proper way. In the example of the car described earlier, if the wheels of the car are defined as children of the car model, then moving the car will cause the wheels to be moved with the car in the expected manner. If no parent-child relationship is defined between the car and the wheels, moving only the car will cause the wheels to be left behind in their original position in the world.
![]() ![]() ![]() |