# Instancing From Maya

This guideline is focusing on how to setup (basic) instances of an object in Maya and write it as a USD asset. We also have guides talking about Point Instancing which is fundamentally different, so make sure to read the instancing overview first.

Instancing, in its basic form, is basically just a simple duplicate of a USD asset, and it carries a dedicated transform.

Because Multiverse introduces Compounds in Maya we have two possible sources of data for our basic instancing:

  • Maya geometry
  • Multiverse Compound

# Instancing Maya Geometry

# Duplicate as Instance

Below is an example where we have a bunch of Maneki Maya model hierarchies which we have generated using Maya’s “Duplicate Special” as Instance, and grouped as NEKOS:

The Nekochans


Duplicate Special Options

Select the NEKOS group and perform a Multiverse Write USD Asset operation.

Because we are dealing with Maya geometry as source, you will use the Multiverse USD Write Asset rather than composition assets (which is instead used when the source data are Multiverse Compounds).

Write the instances of Maya Geo

If we read the generated USD file back into Maya, we should set the original Maya geometry and the four instances. When inspecting the hierarchy in MEOW we can see that each of the GEO location are displayed with an orange label, meaning they are referencing the GEO location from the original MANEKI_NEKO group.

Instanced Nekochans in a single asset

When the source data is Maya geometry you will always generate references in the USD file. To get actual USD instances you need to reference Multiverse Compounds.

Later we will explore instancing of Compounds which will produce true instancing instead of references.

# Duplicate as Copy

If you did not set the duplicate as an instance but simply as a copy then you will obtain a file with no references and just multiple copies of the same geometry. This is according to Maya behavior, but obviously it is not so efficient as we have multiples copies of the same data and not instancing.

# Instancing Multiverse Compounds

We can also duplicate as instances a Multiverse Compound. First we will read a USD asset, and then we duplicate it as instance.

This time, because the source data is a Multiverse Compound, you will write it out as a Composition with the Multiverse Write Comp.

When the source data are Multiverse Compounds, it’s important to understand the differences between “duplicating” and “instancing”, let’s have a look:

# Duplicate as Copy

Below we read a single cat asset and then use the Ctrl+D command to duplicate the initial asset to neko1 and neko2. We can also group them as NekosDuplicate, select the NekosDuplicate group and write it as a composition using Write USD Composition shelf button:

Neko assets duplicated


Afterwards when we read the composition back in Maya, if we inspect in MEOW we should see that all neko locations are displayed in orange color. That means each assets are referencing the same USD asset from the disk.

Duplicate results

# Duplicate as Instance

If we perform the same steps — but this time using Duplicate Special as Instance — you will obtain 3x cats as instances.

Note

We are still actually drawing 3x unique cats in the viewport: if the number was much larger this could cost in FPS because the cats will not be consolidated by a single graphic hardware draw call . This is why once you have duplicated the cats you should really write out the composition, which will then be a single draw call.

Once the composition is written, you can read it back into Maya, we inspect in MEOW and see that now the nekoShapes locations are displayed in blue, means they are actual instances (not references like in the basic duplicate case):

Instance results

This concludes the Instancing from Maya guide.

Last Updated: 8/3/2020, 2:04:11 PM