An instance is an exact replica of a model. Any type of model can be instanced. You can create as many instances as you like and position them anywhere in your scene. When you modify the original “master” model, all instances update automatically.
Instances are useful because they require very little memory: only the transformations of the instance root is stored. However, you cannot modify, for example, an instance’s geometry or material. If you need to individually modify copies of an original object, use a duplicate or clone instead, as described in Duplicating and Cloning Objects in the Scene Elements guide.
Instantiation has the following advantages:
• Instances use much less disk space than duplicates or clones because you’re not duplicating the geometry.
• Editing multiple identical objects is very simple because you only have to edit the original.
• Wireframe, shading, and memory operations are much faster.
Instantiation uses the same options as duplication and cloning. For complete details, see Duplicating and Cloning Objects in the Scene Elements guide.
Instances are displayed in the explorer with a cyan i superimposed on the model icon. In the schematic view, they are represented by trapezoids with the label I.
|
In XSI versions 2.0X and previous, the Instantiate commands behaved differently. The old Instantiate commands have been renamed Clone. The old script command Instance is still available for backwards compatibility, but it has been deprecated in favor of the new synonym Clone. A new script command Instantiate is used for the new instantiation behavior on models. |
1. Select the roots of one or more models.
2. Choose one of the following commands from the Edit > Duplicate/Instantiate menu:
- Instantiate Single creates a single instance of the selected models using the current options set in the Duplicate/Instantiate Options property editor.
- Instantiate Single without Options creates a single instance of the selected models, ignoring any transformation options set in the Duplicate/Instantiate Options property editor. The instance is automatically selected and is at the same location as the original.
- Instantiate Multiple creates any number of instances from the selected models.
To create instantiate models from animation
1. Select a model whose root node transformations have been animated.
2. Choose Edit > Duplicate/Instantiate > Duplicate/Instantiate from Animation from the Edit panel.
3. In the Duplicate from Animation dialog box, set the start and end frames of the animation to use for the duplicates, as well as the step values.
For example, if the Start Frame is 10, the End Frame is 40, and the Step Value is 15, the duplicates are created based on the object’s state at frames 10, 25, and 40.
4. Make sure that Instance is activated, and click OK.
An instance of the original model is created for each frame interval along the animated transformation.
You can click on any part of an instance in a 3D view to select it. You do not need to click on the root of the model.
You can toggle the display of instances on or off in the 3D views.
To toggle the display instances
• Do one of the following:
- To toggle the display of instances in a single 3D view, click the eye icon (Show menu) and choose Instances.
or
- To toggle the display of instances in all open 3D views, choose Display > Objects > Instances from the main menu bar.
Viewing Instance Relationships
You can display the relationship between instances and masters in the schematic view. When Show > Associated Model Links is on and an instance is selected, an orange link labeled Inst is displayed between the instance and its master. When a master is selected, links between the master and all its instances are displayed.
Notes on Working with Instances
This section includes some information you should be aware of when working with instances.
Understanding the InstanceGroup
When you instantiate a model, a new group is created in the master model called InstanceGroup. This group keeps track of all the instances of the master model in the scene.
The InstanceGroup is locked: you cannot add or remove members manually. Deleting a member of this group deletes the instance from the scene.
Instances are replicas of the master model. This means that, for example, you cannot modify the geometry nor change materials. However, you can:
• Transform the instance.
• Change its visibility, display, and other properties.
• Add new properties, such as annotations or custom parameter sets.
• Add new children and modify any of their properties, materials, and so on. These children are “real” children of the instance’s model root, and have no association with the master model.
• Apply a property or material in branch mode to the model root of the instance. These properties are propagated to the instance’s children, but do not affect any elements from the master model.
|
Although instances contain an animation mixer like any other model, you cannot use actions defined for the master to animate the instance separately. This is because the instance does not contain the master’s children. For example, the master may contain a child called leftarm_effector but the instance does not. |
Visibility and Instances
Instances have their own visibility properties, independent of the master. This means that you can turn viewport visibility, selectability, and rendering options on or off per instance. You can also set these options to Ignore, in which case the instance inherits the master’s setting.
The Instance Master Hidden option in the visibility properties allows you to hide an object when rendering if it is part of a master model hierarchy. This is especially useful with particle and hair instancing, where you often don’t want the master hierarchy in the rendered images.
Because instances are treated as single objects, you cannot control the visibility of individual objects within an instance. You can only set visibility options for the instance itself. Toggling visibility on or off affects the entire instance.
You can change the visibility options of individual objects within the master model’s hierarchy. Toggling any object’s visibility on or off affects the corresponding object in each instance.
For more information about visibility in general, see Setting Object Visibility Properties in the Interface and Tools guide.
Instances behave like ordinary models except in one respect: instantiating them. If you try to instantiate an instance, another instance of the original master is created instead.
You can export an instance as an .emdl file. However, only the elements that you have manually added to the instance are included. The elements of the master model are not included.
If you want to apply motion blur on instances, you should use estimated motion blur instead of regular motion blur. This is because estimated motion blur is based on the object’s motion, which can be different for each instance, while regular motion blur is part of an object’s geometry so all instances share the master’s motion blur.
For more information about motion blur in general, see Motion Blur in the Lights and Cameras guide.
SOFTIMAGE|XSI v.6.01