# Import USD data as Maya data
In this section we will introduce the concept of importing USD data into Maya as Maya data. Let's first explain the difference between "reading" and "importing" in Multiverse.
# Reading Vs Importing
# Reading
Multiverse "reads" USD of Alembic files through Multiverse Compound shape nodes in Maya: the data is streamed into the viewport via HydraVP2, or streamed procedurally to the supported renderers.
This reading process does not generate any Maya data: when you save a Maya scene
to a .ma
or .mb
file, no actual geometry will be present for the data read
by the Compound. This means you cannot, for example, move the vertices of the
data that you see, because they do not exist in Maya.
Likewise, a renderer scene description file such as .nsi
, .ass
, .rib
,
.vrscene
will not contain actual data and instead simply point the the USD
file on disk to stream.
# Importing
With Multiverse it is also possible to "import" statit or animated USD data into Maya: you can import individual prim items, sub-hierarchies or even full hierarchies of USD prim items. The following type of USD prims are imported as such:
USD prim data type | Maya data |
---|---|
transform | transform |
meshes | mesh shape |
camera | camera |
inherit (mesh instance) | instanced mesh |
point instancer | instancer |
An "import" will actually create real Maya data that you can modify, save (it will be present in the Maya scene if so) and you can also potentially write back into USD via the Asset Write, including as sparse data.
TIP
Importing is also available through the Multiverse Python API:
multiverse.ImportPrim
See the relative API documentation
# Importing an individual prim item
The workflow is performed in MEOW:
Read a USD asset
In MEOW, go to a supported location (transform, poly mesh shape, instance, point instancer, or camera), RMB and you will see a contextual "import" options at the bottom of the popup menu. Click import mesh, for example.
As a result a Maya object will have been imported into Maya. In outliner you will see a group node named after the Compound from which data has been imported, and inside the actual data (the node name is colored with the typical blue color of a Multiverse Compound to hint that this data actually comes from a Compound).
If the data was animated, animation will be preserved. You can also look at the node editor to see what's going on under the hood:
You can use/edit/modify this data as you wish.
When desirable you can write "back into USD" the data, simply select the nodes and perform an Asset Write with "Use Imported Prim Paths" set to
on
: you can write all the data, or just the sparse override only and even auto-sync it with its Compound of origin, so it will be nicely layered and active automatically after writing. Both static and animated imported data can be written of course.When writing imported data the following two options will be un-grayed in the Asset Writer:
- "Use Imported Prim Paths"
- "Auto Sync Compound after Writing"
# Importing a (sub or full) hierarchy of prim items
You can either use MEOW or File> Import as a workflow. Let's see them both.
Read a USD asset
In MEOW, go to either:
- the root prim item
/
to import a full hierarchy - or any supported prim item (transform, poly mesh shape, inherit instance mesh, point instancer, or camera) to import a sub-hierarchy
RMB and you will see a contextual "import" options at the bottom of the popup menu. Click import hierarchy.
- the root prim item
As a result a Maya object will have been imported into Maya. In outliner you will see a group node named after the Compound from which data has been imported, and inside the actual data (the node names are colored with the typical blue color of a Multiverse Compound to hint that this data actually comes from a Compound).
If the data was animated, animation will be preserved. You can also look at the node editor to see what's going on under the hood:
You can use/edit/modify this data as you wish.
When desirable you can write "back into USD" the data, simply select the nodes and perform an Asset Write with "Use Imported Prim Paths" set to
on
: you can write all the data, or just the sparse override only and even auto-sync it with its Compound of origin, so it will be nicely layered and active automatically after writing. Both static and animated imported data can be written of course.When writing imported data the following two options will be un-grayed in the Asset Writer:
- "Use Imported Prim Paths"
- "Auto Sync Compound after Writing"
Alternatively, it is also possible to import full hierarchies from the Maya
File> Import> USD (Multiverse)
command: all you have to choose is a USD file
of an asset and everything will be imported into Maya with the same process:
As a result:
- a compound node will be created for that file
- the mvUsdImporter node will import the data into Maya
- outliner will show you the blue named nodes just as before.