Skip to content
Dorian Fevrier edited this page Feb 13, 2019 · 19 revisions

This page gather documentation and prototype discussion informations about the WIP alembic_assembly.

Author's note

I try to keep this as a road map of what has been done and what is left to do. Please don't edit except for typos. :)

Dorian Fevrier (aka: narann)

Assembly parameters

Here is the list of alembic_assembly's parameters:

file_path (string)

Description

File path to the alembic file.

If the bounding box is not set on the assembly, the global bounding box of the alembic will be loaded when frame rendering begging.

A warning is raised if the file doesn't exists or the assembly fail to read the file content.

Example

<assembly name="my_alembic_assembly" model="alembic_assembly">
    <parameter name="file_path" value="/path/to/my_file.abc" />
</assembly>

shutter_open_time and shutter_close_time (float) (optional)

Description

Absolute shutter open and shutter close time used retrieve alembic samples (0.0 if not set).

Selected transform samples will be:

  • The first transform sample before shutter_open_time.
  • The first transform sample after shutter_close_time.
  • Every transform samples between shutter_open_time and shutter_close_time.

TODO: Define rules for deformed motion blur.

Example

<assembly name="my_alembic_assembly" model="alembic_assembly">
    <parameter name="shutter_open_time" value="1.0" />
    <parameter name="shutter_close_time" value="1.04" />
</assembly>

References

time_offset (float) (optional)

Description

Time offset applied to shutters before gather animation samples (0.0 by default).

Example

<assembly name="my_alembic_assembly" model="alembic_assembly">
    <!-- offset 2 frames (at 24 FPS): 2/24 = 0.083333 -->
    <parameter name="time_offset" value="0.0833333" />
</assembly>

implicit_instancing (bool) (optional)

Description

Implicitly instantiate identical polymesh (true by default).

Alembic file format calculate and store a Murmur3 128 bit hash per data sample on write.

This hash is used by AlembicAssembly to detect identical polymesh and store them only once.

Example

<assembly name="my_alembic_assembly" model="alembic_assembly">
    <parameter name="implicit_instancing" value="false" />
</assembly>

Note about dynamic mesh samples and shutters

Because of how appleseed stores dynamic meshes internally, shutter_open_time and shutter_close_time have to match alembic geometry samples or appleseed will not be able to start rendering. Note that this rule also apply to time_offset value which must be sets properly.

TODO

  • shape_path (string): Absolute path to shape (or regex?).
  • time_speed (float): Time speed factor (1.0 by default).

Discussion

Those are other parameters ideas. Somes could complexify the alembic assembly code but provide interesting flexibility.

  • motion_blur (bool): Store only one fixed value if off. This can decrease memory footprint.
  • max_samples (int): By default, the alembic assembly take every samples inside the shutter open and close value (plus the first outside the shutter range for interpolation purpose). When max_samples is setted, it will only took only those number of sample. Problem: How choose the sample to use?
  • xform_sample_limit (int): Limit the number of samples stored in the xform sequence. We need a choose policy to choose samples.
  • geo_sample_limit (int): Limit the number of samples stored in the geometry.
  • load_xforms (bool): Do not load transformation (IXform) is false (true by default);
  • load_polymeshs (bool): Do not load polygon mesh (IPolyMesh) is false (true by default);
  • load_curves (bool): Do not load curves (ICurves) is false (true by default);
  • load_points (bool): Do not load points (IPoints) is false (true by default);
  • load_visibility_samples (bool): Load visibility samples if true (false by default);
  • load_bbox (bool): By default, bounding boxes are computed by appleseed, if this parameter is true, bouding boxes from alembic file will be use (false by default).
  • bbox_as_geo (bool): If true, polymeshes (IPolyMesh) will use their alembic bounding box as geometry.
  • bake_xform_to_geo (bool): If true, transformations will be baked into primitives.
  • polymeshs_as_points (bool): If true, load polygon meshes as points.

References

Alembic custom attribute support

The point is to interpret some alembic properties written in third party softwares (Maya, Max, Blender) as appleseed parameters. Those have to be prefixed with appleseed_.

Those parameters raise a warning if they are setted on incompatible objects (subdiv on xform object for example).

  • appleseed_max_ray_intensity (float): Set max_ray_intensity parameter on the object to the given value. Clamp ray intensity of the object to the given value, (use project value by default).
  • appleseed_double_sided (bool): Set double_sided on the object. Shape is visible on both sides.
  • appleseed_reverse_normals (bool): Set reverse_normals on the object. Normal of the object are reversed.
  • etc.

Other ideas:

  • appleseed_camera_ray (bool).
  • appleseed_motion_blur (bool).

Subdivision parameters

Those are parameters we will use when we will support geometry subdivision. Raise a warning if this value is setted on non-geometry shape.

  • appleseed_subdiv_level (int): Set subdiv_level parameter on the object to the given value.
  • appleseed_subdiv_smooth (bool): Set subdiv_smooth parameter on the object to the given value.

Other ideas:

  • appleseed_subdiv_uv_mode (“no”, “all”, “edges”, “edges and corner”).

Long term discussion

Implicit instancing

Use alembic (or appleseed) array hashing to detect instances and allow massive scene loading (cities).

Layers

Alembic supports "hierarchy layering" (aka merging multiple hierarchy in one). It could be interesting to provide a way to layer multiple alembic with some options. Not a tiny project as it can have a big number of concepts involved.

2 steps design

Procedurally generate a whole hierarchy is not what a renderer should do. This prevent material assignment and other things.

Separate the assembly in two:

  • One to load single alembic objects individually. This one take an absolute alembic object path and can't load a hierarchy (let's call it alembic_object_assembly).
  • One to unroll the whole alembic file hierarchy (let's call it alembic_archive_assembly) in multiple alembic_object_assembly.

This 2 steps design would separate the hierarchy loading from the object loading.

This would not solve the material/attribute assignment problem but it would decrease its scope to the alembic_archive_assembly while letting alembic_object_assembly clean and one-purpose focused.

Known limitations

  • Appleseed doesn't support UV and normal animation so the Alembic assembly doesn't support it.
  • Cyclic and Acyclic TimeSamplingType are not supported, only Uniform is.
  • HeterogeneousTopology meshes (eg. realflow fluids) are not supported, only ConstantTopology (non deformed) and HomogeneousTopology (deformed with fixed number of vertices) are.

Roadmap

  • implicit instancing
  • material assignments
Clone this wiki locally