GizStackGizStack
View .mdOpen in ChatGPTOpen in Claude

gizlang/alembic

the curves of an Alembic file, as a groom's maker writes its strands (Maya XGen, Houdini, Blender; Unreal Engine imports a groom from it), each curve the points of one hair. It reads Ogawa, Alembic's binary layout since 1.5 (github.com/alembic/alembic, lib/Alembic/Ogawa and AbcCoreOgawa): a tree of groups whose children are groups or data, each by its place in the file (the top bit marks data). The archive's third child is its top object; an object's first child is its properties, then its children, then the headers of those children; a compound property's children are its properties, then their headers; an array property's samples are pairs of data (a 16 byte key, then the values) and dimensions.

gizlang
import * as Alembic from "gizlang/alembic";

Types

Curves

gizlang
type Curves = { name: string; points: Vec<f64>; counts: Vec<i64>; widths: Vec<f64>; }

One object's curves at its first sample: NAME (its path), POINTS (x, y, z each, in the file's units and axes), COUNTS (the points of each curve, in order) and WIDTHS (each point's, one for all, or none). An object's own transform is not applied.

  • name: string
  • points: Vec<f64>
  • counts: Vec<i64>
  • widths: Vec<f64>

Functions

curves

gizlang
function curves(file: bytes): Vec<Curves> throws string

Every curves object of the Alembic FILE (an object whose geometry, .geom, has points P and nVertices).

Effects: fail, read, write, alloc.