Alembic Hair Data 

 

Overview 

Ornatrix provides a custom Alembic imported/exporter which allows writing one or more hair objects into an Alembic file. The resulting .abc files can be imported in a myriad of CG software which supports Alembic. This tool also allows to read Alembic files which has curves in it (regardless if it was exported with Ornatrix or not), creating a baked hair modifier and reference the imported file in it. You can then use the imported/referenced file together with other operators in Ornatrix operator stack.

They can also be used with V-Ray Proxy objects to quickly load and render the resulting hairs anywhere V-Ray is used. There are options to export single frame or an animation range as well as viewport or render representation of the hair.

 

Exporting Hair 

To export a hair object to Alembic file:
  1. Select the Ornatrix hair object which you want to export
  2. Go to Main Menu -> File -> Export... -> Ornatrix Alembic (*.abc)
  3. Type in the desired name of your .abc file and press Export
 

Importing Hair 

To import an Alembic hair file:

  1. Go to File->Merge...
  2. Select the .abc file to import
 

To import the Alembic hair with Unreal Engine 4 

  1. Make sure you use the Unreal Engine 4 Export checkbox in the export settings.
  2. Follow instructions from Unreal Engine to import the resulting .abc file into UE4.
 

Parameters 

  • Format
    The algorithm used to encode the Alembic file. Currently there are two options: Ogawa and HDF5. Ogawa tends to give better compression rates and robustness.
  • Start Time
    The first frame of the scene to be exported.
  • End Time
    The last frame of the scene to be exported. If this value is same as Start Time then static hair is exported at specified time. Otherwise an animation is exported.
  • Step
    When exporting animated hair this specifies how many frames to skip between each sample. Value of 1 means that every frame will be sampled.
  • Use Render Version
    When on, hair in the scene will be switched to render mode and dense hair strands will be exported. Otherwise, what is seen in the viewport will be exported.
  • Up Direction
    Allows specifying the direction which points up in the saved Alembic file. This is needed when exporting hair to other hosts. For example, in 3dsmax Z axis points up but in Maya Y axis points up.
    When velocity export is used specifies the length, in frames, of time interval used to calculate the velocity vectors.
  • Use World Coordinates
    When on, hair will take its shape's transform into account when writing its position data. For example, if there are multiple hair objects their relative positions to each other will be preserved. Otherwise, hair will be exported in its local object space, placing it at the origin.
  • One Object per File
    When on, separate Alembic files are written for each of the objects being exported. Object's name will be appended to the file name.
  • Unreal Engine 4 Export
    When on, the resulting Alembic file will be formatted to be compatible with groom import in Unreal Engine 4
  • Export Each Strand as Separate Object
    When on, each hair strand will be exported as a separate Alembic single curve object with its own transform instead of a single object with many curves.
 

Exported Components 

These are different aspects of hair which can be selectively exported or ignored:

  • Export Velocities
    When on, a velocity vector will be written for each hair vertex. This is needed if you're exporting per-frame .abc files and want to have motion blur working when rendering it out.
    • Velocity Interval Center
      When velocity export is used specifies the offset from current frame which will be the center of the interval used to compute the velocity vectors.
    • Velocity Interval Length
  • Export Strand Data
    When on, any per-strand and per-vertex data which exists in hair will be written to the Alembic file. This data can be created with Edit Guides modifier or Generate Strand Data modifier, for example.
  • Export Texture Coordinates
    When on, all texture coordinates channels present in hair will be written to the Alembic file.
  • Export Widths
    When on, the strand width/thickness information will be preserved into the Alembic file.
  • Export Strand Ids
    When on, unique strand ids will be written to the Alembic file. This is useful if you want to ensure that applying operators after importing the hair back will provide consistent results since strand ids are often used to set random values by some operators.
 

Exported Data Format 

Ornatrix hair or guide strands are written to an Alembic file as curves. Information such as width, velocities, and texture coordinates is included in the description of said curves. Additional information which is Ornatrix-specific is attached to either individual vertices or individual curve primitives within Alembic file the following way:
  • Strand ids are written as per-curve geometric attributes with name strandId.
  • Strand groups are written as per-curve geometric attributes with name strandGroup.
  • Per-vertex channel data is written as floating point per-vertex geometric attributes with name chan_ followed by the channel's name.
  • Per-strand channel data is written as floating point per-curve geometric attributes with name chan_ followed by the channel's name.
 

Technical Specs 

  • Ornatrix uses Alembic library version 1.7.3.
  • Curves are exported using B-Spline Basis, they are non-periodic and linear.
 

What is exported 

The following information about the hair strands is being exported, if it is present. If importing hair back it will be preserved:
  • Strand positions and animation.
  • Per-vertex widths.
  • Texture (UV) coordinates.
  • Per-vertex channel names and data.
  • Per-vertex velocities (optionally, off by default).
 

Space orientation 

Different hosts (such as Maya, 3dsmax, Cinema 4D, Unreal Engine) may have different coordinate which is considered to be "up" direction. For example, in 3dsmax Z-axis is up and in Maya and C4D Y-axis is up. To allow exchange of data between these hosts Ornatrix provides the Up Axis parameter during export. No matter the current up-axis of the host, the up-axis of the exported data will be determined by this parameter.

Therefore, if you want to export an Alembic file to 3dsmax you need to specify Z-axis as up. If you want to export to Maya or C4D, specify Y-axis as up. You cannot adjust this parameter during import because the host which is importing the data does not know which transformation was applied during the export. It is therefore important to specify the correct axis during the export.

Missing Something? Let us know if this page needs more information about the topic.