# Instancing: Overview
This document introduces the different flavors of instancing that can be performed in Maya, in USD, and how Multiverse deals with both.
Given there is a lot of Multiverse<>Solaris interchange we also provide some information on how to instance in Houdini as a bonus.
Let's first introduce some general concepts:
Instancing: produces "instances" of a source asset, each placed in 3D space via its own transform, which allows for placing/moving each instance individually.
While the geometry is shared, the additional transform adds a considerable cost in terms of performance and efficiency, this means that you shouldn't use instancing to produce a very large number of instances.
Point-instancing: produces instances of a source asset, each placed in 3D space at the position of a particular point that is part of a set of points.
The geometry is shared but in this case there is no individual transform. This is very efficient and you generate millions, if not billions of point-instances.
Because there is no dedicated transform, instances cannot be moved individually: you can only move them by providing an updated point set with more point positions.
Let's now have a look at how we can produce instances and point-instances in Maya, and write to USD via Multiverse.
# Instancing in Maya
This is achieved by the instancing (instance
command) in Maya (Edit> Duplicate
Special: Instance).
Because Multiverse provides you with Compound nodes, there are two possible "sources" for your instancing:
Instancing of regular Maya geometry shape nodes will produce USD "inherits" (opens new window) (displayed in light pink in MEOW).
Instancing of Multiverse Compound nodes will produce USD "instances" (displayed in blue in MEOW).
Maya Operation | Source Data | Multiverse Write | Result data in USD |
---|---|---|---|
Duplicate Special Instance | Maya geometry shape | Asset Write | Inherits |
Duplicate Special Instance | Multiverse Compound | Composition Write | Instance |
# Point Instancing in Maya
This is achieved by the instancer
node and also by MASH (which, too, relies on
instancer
nodes).
Again, because Multiverse provides you with Compounds, there are two possible "sources" for your point instancing:
Instancers of regular Maya geometry will produce USD "references" (displayed in orange in MEOW).
Instancers of Multiverse compounds will produce USD "instances" (displayed in blue in MEOW).
Maya Operation | Source Data | Multiverse Write | Result data in USD |
---|---|---|---|
Instancer node & MASH | Maya geometry shape | Asset Write | Reference |
Instancer node & MASH | Multiverse Compound | Composition Write | Instance |
# Using proxies for lightweight instancing
Maya has limits when displaying massive number of instances in the viewport. We suggest the following strategy to keep things efficient:
Before writing to USD the asset you want to instance, for example a complex tree model, remember to create a proxy and render purpose for viewport display.
Use MASH to populate your instancing distribution.
When writing your composition, the instances should have a switchable proxy that allows viewport display to be faster to navigate.
When loading a heavy instanced asset make sure to set initial Viewport Draw to proxy.
# Instancing in Houdini
There are limits when doing massive instancing in Maya, even when using MASH / Instancer nodes for point instancing, since the data needs to exists first in Maya before being written into USD. Houdini offers much more flexibility and more power to control your instances.
- In Maya, use Multiverse to write your USD asset (possibly with proxy/render purpose in case the asset is complex).
- In Houdini, read the USD assets.
- In Houdini, create your instances and then write the results to USD.
- In Maya, use Multiverse to read back the USD data generated by Houdini, rely on Multiverse strategic compound draw options, then set any desired overrides and perform your shading, lighting, rendering.
TIP
When writing your USD assets from Maya, remember that the option to write material assignment (with namespace): this will allows persistent material assignments that round trip from Maya to Houdini and back again to Maya.
Likewise, as of Multiverse 7, you can write Maya shading networks to USD. This is especially useful if you want to interchange shading network with another app like Houdini, or if Maya is your application of choice for lighting and rendering and you are using 3Delight NSI for rendering.