Importing Alembic hair 

Ornatrix has a quick and easy way of importing Alembic .abc files containing hair curves and setting up Ornatrix hair shapes from them. The curves can be previously exported using Ornatrix own Alembic exporter or from any other DCC application, including Maya's Alembic support. The imported curves can contain a variety of information including widths, UV channels, strand groups, and strand channel data. Once imported the hair can be used as any other part of Ornatrix pipeline.

 

Importing Alembic files 

To import an Alembic hair file:

  1. In the main menu go to File, Import, Import...
  2. In the Import dialog, at the bottom Files of type drop down select Ornatrix Alembic option
  3. Select the .abc file to load and press Import
 

Structure of imported hair 

A new Baked Hair shape will be added to the scene and the imported .abc file will be loaded in it as reference. You can choose the viewport preview percentage and other options which Baked Hair provides. You can also use this hair normally with other Ornatrix operators.

 

Up axis 

Not every application writes Alembic files in the same coordinate system. 3ds Max is Z-up right-handed, Maya and Houdini are Y-up right-handed, and Cinema 4D is Y-up left-handed. Ornatrix can rotate the incoming curves into 3ds Max coordinates while importing them.

The up axis is a global Ornatrix setting rather than a per-file option: it applies to every subsequent import and persists between sessions. To change it, open the Ornatrix settings dialog (the Settings page of the Ornatrix About dialog, or OrnaAbout() from MaxScript) and pick a value under Import Settings, Alembic Import Up Axis:

  • Z-up Right-handed (3ds Max) - the default, no conversion is applied
  • Y-up Right-handed (Maya/Houdini)
  • Z-up Left-handed
  • Y-up Left-handed (Cinema 4D)

The conversion is stored on the resulting Baked Hair shape as its Source File Object Transform, so changing the setting afterwards does not disturb hair which has already been imported.

 

MaxScript Access 

The same setting is exposed on the AlembicImporter interface, which makes it possible to script the import of files authored in another application:

-- Read the up axis currently used for Alembic import
AlembicImporter.upAxis

-- Set the up axis. Valid values are #z_up_right_handed, #y_up_right_handed,
-- #z_up_left_handed and #y_up_left_handed
AlembicImporter.upAxis = #y_up_right_handed

-- Import a Maya-authored Alembic hair file. Pass "using:" so that Ornatrix's own
-- importer is used rather than another plugin which also handles .abc files
importFile "C:/hair/fromMaya.abc" #noPrompt using:AlembicImporter
Missing Something? Let us know if this page needs more information about the topic.