# Instancing: Overview

This document introduces the different flavors of instancing that can be performed in Maya, and how they relate and are written by Multiverse to USD files. It also provides information on how to instance in Houdini.

In general there are two ways to instance an asset:

  • Instancing: produces instances of a source asset, each placed in 3D space by its own transform, which allows for placing/moving each individual instance at any time.

    While the geometry is shared, the additional transform adds a considerable cost in terms of performance and efficiency, this means that you cannot produce 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 and there is no individual transform. This is very efficient and you generate billions of instances, but, 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 have a look at how we can produce instancing in Maya, and write it to USD with Multiverse.

# Instancing in Maya

This is achieved by the “Duplicate Special” command.

Because Multiverse provides you with Compounds, there are two possible “sources” for your instancing:

  • Duplicate as Instance of regular Maya geometry will produce USD references (displayed in orange in MEOW).

    See the relative documentation:

  • Duplicate as instance of Multiverse compounds will produce USD instances (displayed in blue in MEOW).

    See the relative documentation:

Maya Operation Source Data Multiverse Write Result data in USD
Duplicate as Instance Maya geometry Asset Write Reference
Duplicate as Instance Multiverse Compound Composition Write Instance

# Point Instancing in Maya

This is achieved by "Instancer" nodes and by MASH (which uses instancer nodes).

Again, because Multiverse provides you with Compounds, there are two possible “sources” for your point instancing:

  • Duplicate as instance of regular Maya geometry will produce USD references (displayed in orange in MEOW).

    See the relative documentation:

  • Duplicate as instance of Multiverse compounds will produce USD instances (displayed in blue in MEOW).

    See the relative documentation:

Maya Operation Source Data Multiverse Write Result data in USD
MASH / Instancer node Maya geometry Asset Write Reference
MASH / Instancer node Multiverse Compound Composition Write Instance

# Instancing in Houdini

There are limits when doing massive instancing in Maya, even when using MASH / Instancer nodes for point instancing. Houdini offers much more flexibility and more power to control your instances.

  1. In Maya, use Multiverse to write your USD asset (possibly with proxy).
  2. In Houdini, read the USD assets.
  3. In Houdini, create your instances and then write the results to USD.
  4. In Maya, use Multiverse to read back the USD data generated by Houdini, 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.

This is especially useful if Maya is your application of choice for lighting and rendering.

# 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:

  1. Before writing to USD the asset you want to instance, for example a tree, remember to create a proxy for viewport display.

  2. Use MASH to populate your instancing distribution.

  3. When writing your composition, the instances should have a switchable proxy that allows viewport display to be faster to navigate.

    Bed asset with proxy setup

  4. When loading a heavy instanced asset make sure to set initial Viewport Draw to proxy.

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