Alembic design notes #54690

Open
opened 5 years ago by dr.sybren · 5 comments
Collaborator

Terminology

  • ABC = Alembic file (because extension is .abc)
  • DNA = Blender’s data structure

Current Functionality

Importing meshes from ABC can result in multiple cases. For each imported object:

  • No object animation, no mesh deformation: mesh is imported into DNA as regular mesh object, after that no more link with ABC.
  • With object animation: as above, but with constraint that streams transformations from ABC to DNA.
  • With mesh deformation: as first case, but with modifier that streams mesh data from ABC to DNA, possibly even removing and reconstructing the entire mesh.

Other functionality:

  • Materials are buggy (materials should be mapped by name, but we don’t seem to save those to ABC).
  • Curves are supported and loaded as Blender curves (but miss certain properties such as extrustion, etc.).
  • Particles in ABC are loaded as vertex-only mesh.
  • Camera animation is partially supported (transforms, but not camera properties such as zoom/DoF)

Currently easy to do:

  • Static mesh exchange between other software and Blender (because of point 1 above)
  • Adding constraints/modifiers on top of ABC import.
  • Removing extraneous objects.
  • Assigning and editing materials (but on data level may be troublesome).
  • Adding hair/particle systems (it may not work well, but it’s easy to add).

Currently hard or impossible to do:

  • Keeping Blender in sync with ABC (automatically importing added objects, etc.)
  • Knowing (from user perspective) which objects are from ABC and which are from Blender.
  • Performing actions for all imported objects (such as setting a consistent time offset)
  • Offsetting objects in space.
  • Flipping between “real” objects and cached versions.
  • Reliably add hair/particle system, groom, and bake to ABC again.

Tech meeting with Sybren, Sergey, and Campbell

Features discussed:

  • Data streaming can be implemented in same way as dupli-lists / dupli-groups:
    • Loaded ABC is represented as dupli-object. This allows us to generate the meshes / curves from ABC without saving them to the blend file. It also allows the artist to spatially offset the ABC.
    • Dupli-object has option to indicate which sub-hierarchy is loaded. This allows artists to select a subset of objects in the ABC, for example loading an animated character but not the environment or cameras.
    • Dupli-object is stored as DNAAlembicHierarchy struct in DNA.
    • Objects from ABC are shown in outliner as collection, similar as currently done with dupli-group.
    • Besides being able to disable the entire collection (currently possible), it should be possible to disable individual objects (not yet possible). This allows, for example, to load an animated Agent 327 from ABC and remove/hide his watch.
    • The collection could contain options to indicate which sub-hierarchy it represents, and a time offset for animations.
    • Alembic XForm hierarchies are loaded as hierarchy of Empties, possibly as their own subgraph in the depsgraph.
    • Open question: how to interact with the objects, how to create static overrides or otherwise “make local”.
  • Material names are loaded from ABC
    • Currently Blender doesn’t even properly store material names to ABC at all.
    • The creator of the ABC is responsible for assigning materials to objects / data. The name of these materials should be saved to the ABC.
    • When loading an ABC the materials are looked up by name (if there are duplicates from different libraries, pick arbitrary one).
    • An artist should be able to choose which material names in the ABC map to which Blender materials.
    • It might be nice to have a button “Generate Missing Materials”, which automatically creates correctly-named materials and assigns them to the meshes/objects.
  • Objects loaded from ABC should be handled as “linked from library”, with the ABC as “virtual library”. Interaction between objects from ABC and Blender should be discussed (for example when merging two meshes, one from ABC and one from Blender).
  • Hair: It may be possible to load an animated mesh from ABC, add a hair system, groom it, and save to another ABC. This poses problems with ABC allowing meshes to arbitrarily change topology (and thus also vertex and face order) from one frame to the next. Possible solutions lie in reconnecting the hair system after loading the ABC (for example by using UV coordinates instead of vertex/face indices) or disallowing mesh changes completely after adding hair (this option won’t be liked by artists). We should check with artists in the industry to see which workflows are actually in use.
  • Motion blur: object motion blur is already there. Deformation motion blur should work when the mesh doesn’t change topology. Otherwise it can work if we save & load velocities.

Interface Mockup

abc-collections.svg.png

Future Work

Possible directions that we may implement in the future, and may be nice to know about in advance to at least not make completely impossible with current design choices. The basic idea behind this feature is fixups on top of cached data.

Sculpt on top of ABC mesh

Here Hjalti takes the role of the animator, and Andy that of the shader/lighter/look developer.

  1. Hjalti animates character, exports to ABC.
  2. Andy loads ABC, tweaks materials and environment.
  3. Andy locally changes the ABC-streamed mesh (e.g. not changing topology, but for a number of frames change, say, the position of the hand).
  4. Andy saves those changes to another ABC file that acts as a 2nd layer of mesh data.
    Steps 2-4 can be repeated, generating multiple layers of ABC files that eventually are all merged into a single animated character in Blender (this merging of data from different ABC files is supported by ABC itself).

Open Questions

  • How to interact with instanced objects from ABC.
  • How to allow modifiers to be stacked on top of imported ABC meshes/curves.

Development Targets

TBD which is part of Code Quest, or postponed to later. Should be discussed with artists for final decision on what to build & how.

  1. Rework ABC importer to produce DNAAlembicHierarchy structs instead of directly creating new objects/meshes/curves/cameras.
  2. Allow enable/disable of individual objects in ABC dupli-group.
  3. Create & link Collection for ABC.
  4. Fix material name saving.
  5. Create system for material linking.
  6. Implement switching collection between ‘cached’ and ‘live’.
  7. User Interaction between ABC-backed and non-ABC-backed objects (for example trying to join two of those, or trying to parent a Blender object to an ABC object or vice versa)
  8. Make the hair system work.
  9. Test motion blur to clarify what works and what doesn’t (and implement/fix the latter if desired).
# Terminology * ABC = Alembic file (because extension is .abc) * DNA = Blender’s data structure # Current Functionality Importing meshes from ABC can result in multiple cases. For each imported object: * No object animation, no mesh deformation: mesh is imported into DNA as regular mesh object, after that no more link with ABC. * With object animation: as above, but with constraint that streams transformations from ABC to DNA. * With mesh deformation: as first case, but with modifier that streams mesh data from ABC to DNA, possibly even removing and reconstructing the entire mesh. Other functionality: * Materials are buggy (materials should be mapped by name, but we don’t seem to save those to ABC). * Curves are supported and loaded as Blender curves (but miss certain properties such as extrustion, etc.). * Particles in ABC are loaded as vertex-only mesh. * Camera animation is partially supported (transforms, but not camera properties such as zoom/DoF) Currently easy to do: * Static mesh exchange between other software and Blender (because of point 1 above) * Adding constraints/modifiers on top of ABC import. * Removing extraneous objects. * Assigning and editing materials (but on data level may be troublesome). * Adding hair/particle systems (it may not work well, but it’s easy to add). Currently hard or impossible to do: * Keeping Blender in sync with ABC (automatically importing added objects, etc.) * Knowing (from user perspective) which objects are from ABC and which are from Blender. * Performing actions for all imported objects (such as setting a consistent time offset) * Offsetting objects in space. * Flipping between “real” objects and cached versions. * Reliably add hair/particle system, groom, and bake to ABC again. # Tech meeting with Sybren, Sergey, and Campbell Features discussed: * Data streaming can be implemented in same way as dupli-lists / dupli-groups: * Loaded ABC is represented as dupli-object. This allows us to generate the meshes / curves from ABC without saving them to the blend file. It also allows the artist to spatially offset the ABC. * Dupli-object has option to indicate which sub-hierarchy is loaded. This allows artists to select a subset of objects in the ABC, for example loading an animated character but not the environment or cameras. * Dupli-object is stored as `DNAAlembicHierarchy` struct in DNA. * Objects from ABC are shown in outliner as collection, similar as currently done with dupli-group. * Besides being able to disable the entire collection (currently possible), it should be possible to disable individual objects (not yet possible). This allows, for example, to load an animated Agent 327 from ABC and remove/hide his watch. * The collection could contain options to indicate which sub-hierarchy it represents, and a time offset for animations. * Alembic XForm hierarchies are loaded as hierarchy of Empties, possibly as their own subgraph in the depsgraph. * Open question: how to interact with the objects, how to create static overrides or otherwise “make local”. * [Material](http://docs.alembic.io/python/abcm.html) names are loaded from ABC * Currently Blender doesn’t even properly store material names to ABC at all. * The creator of the ABC is responsible for assigning materials to objects / data. The name of these materials should be saved to the ABC. * When loading an ABC the materials are looked up by name (if there are duplicates from different libraries, pick arbitrary one). * An artist should be able to choose which material names in the ABC map to which Blender materials. * It might be nice to have a button “Generate Missing Materials”, which automatically creates correctly-named materials and assigns them to the meshes/objects. * Objects loaded from ABC should be handled as “linked from library”, with the ABC as “virtual library”. Interaction between objects from ABC and Blender should be discussed (for example when merging two meshes, one from ABC and one from Blender). * Hair: It may be possible to load an animated mesh from ABC, add a hair system, groom it, and save to another ABC. This poses problems with ABC allowing meshes to arbitrarily change topology (and thus also vertex and face order) from one frame to the next. Possible solutions lie in reconnecting the hair system after loading the ABC (for example by using UV coordinates instead of vertex/face indices) or disallowing mesh changes completely after adding hair (this option won’t be liked by artists). We should check with artists in the industry to see which workflows are actually in use. * Motion blur: object motion blur is already there. Deformation motion blur should work when the mesh doesn’t change topology. Otherwise it can work if we save & load velocities. # Interface Mockup ![abc-collections.svg.png](https://archive.blender.org/developer/F2764144/abc-collections.svg.png) # Future Work Possible directions that we may implement in the future, and may be nice to know about in advance to at least not make completely impossible with current design choices. The basic idea behind this feature is *fixups on top of cached data*. ## Sculpt on top of ABC mesh Here Hjalti takes the role of the animator, and Andy that of the shader/lighter/look developer. 1. Hjalti animates character, exports to ABC. 2. Andy loads ABC, tweaks materials and environment. 3. Andy locally changes the ABC-streamed mesh (e.g. not changing topology, but for a number of frames change, say, the position of the hand). 4. Andy saves those changes to another ABC file that acts as a 2nd layer of mesh data. Steps 2-4 can be repeated, generating multiple layers of ABC files that eventually are all merged into a single animated character in Blender (this merging of data from different ABC files is supported by ABC itself). # Open Questions - How to interact with instanced objects from ABC. - How to allow modifiers to be stacked on top of imported ABC meshes/curves. # Development Targets TBD which is part of Code Quest, or postponed to later. Should be discussed with artists for final decision on what to build & how. 1. Rework ABC importer to produce `DNAAlembicHierarchy` structs instead of directly creating new objects/meshes/curves/cameras. 2. Allow enable/disable of individual objects in ABC dupli-group. 3. Create & link Collection for ABC. 4. Fix material name saving. 5. Create system for material linking. 6. Implement switching collection between ‘cached’ and ‘live’. 7. User Interaction between ABC-backed and non-ABC-backed objects (for example trying to join two of those, or trying to parent a Blender object to an ABC object or vice versa) 8. Make the hair system work. 9. Test motion blur to clarify what works and what doesn’t (and implement/fix the latter if desired).
dr.sybren self-assigned this 5 years ago
Poster
Collaborator

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
g-lul commented 5 years ago

Added subscriber: @g-lul

Added subscriber: @g-lul

Added subscriber: @francois.register

Added subscriber: @francois.register

Added subscriber: @PratyakshGaur

Added subscriber: @PratyakshGaur

Added subscriber: @juang3d

Added subscriber: @juang3d
lichtwerk removed the
legacy module/Pipeline, Assets & IO
label 8 hours ago
Sign in to join this conversation.
No Label
Interest/Alembic
Interest/Animation & Rigging
Interest/Asset Browser
Interest/Asset Browser Project Overview
Interest/Audio
Interest/Automated Testing
Interest/Blender Asset Bundle
Interest/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
Interest/Eevee & Viewport
Interest/Freestyle
Interest/Geometry Nodes
Interest/Grease Pencil
Interest/ID Management
Interest/Images & Movies
Interest/Import/Export
Interest/Line Art
Interest/Masking
Interest/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
Interest/Python API
Interest/Render & Cycles
Interest/Render Pipeline
Interest/Sculpt, Paint & Texture
Interest/Text Editor
Interest/Translations
Interest/Triaging
Interest/Undo
Interest/USD
Interest/User Interface
Interest/UV Editing
Interest/VFX & Video
Interest/Video Sequencer
Interest/Virtual Reality
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
Module › Animation & Rigging
Module › Core
Module › Development Management
Module › Eevee & Viewport
Module › Grease Pencil
Module › Modeling
Module › Nodes & Physics
Module › Pipeline, Assets & IO
Module › Platforms, Builds, Tests & Devices
Module › Python API
Module › Render & Cycles
Module › Sculpt, Paint & Texture
Module › Triaging
Module › User Interface
Module › VFX & Video
Platform/FreeBSD
Platform/Linux
Platform/macOS
Platform/Windows
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information from Developers
Status › Needs Information from User
Status › Needs Triage
Status › Resolved
Type › Bug
Type › Design
Type › Known Issue
Type › Patch
Type › Report
Type › To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#54690
Loading…
There is no content yet.