Alembic\USD: Full fidelity animation data for non-geometry properties #124555

Open
opened 2024-07-11 22:27:33 +02:00 by Jesse Yurkovich · 3 comments

Context

The current animation import capability of Alembic and USD importers is heavily geared toward use of the Mesh Sequence Cache modifier and Transform Cache constraint. Over time, and as USD matured and gained further traction, we are now accumulating many more scenarios which don't quite fit into the current cache based capability and approach.

Existing Tasks and PRs

[1] #54050
[2] #69046

Problem

There are two general problems associated with the current machinery used by both Alembic and USD importers. Much of this stems from the Mesh Sequence Cache in that it only supports various Mesh and Curve attributes. See [2] above for further notes on the topic.

Animated, non-geometry, object properties are only imported statically and any time-varying behavior will be ignored.

Examples include

  • Animated camera focal length, depth of field focal distance, and depth of field F-Stops
  • Animated light intensity, color, and size
  • Animated material properties
  • Animated prim/object visibility settings

Baked data vs. Editable data - The problem with only having a Cache-based workflow

Alembic, being a format created specifically to contain pre-baked data, lends itself well to opaque cache workflows. Whether through the Mesh Sequence Cache, or a hypothetical system where animated properties have their F-Curve data loaded directly from a cache file rather than being evaluated each frame, editing the data was never intended. The main purpose here was always to only load the smallest amount of data possible, and evaluate it as quickly as possible, for only the current frame being viewed or rendered.

USD is different. Like Alembic, it can serve as a container for pre-baked data, but it can also serve as a general interchange format where editing and composing changes "over" existing data is possible. In that world, being able to interact with, and change, individual keyframes and f-curves is desired and expected.

Some USD data (Skeletons/bones) is already being loaded directly into f-curve/actions today for similar reasons. Additionally, other formats like FBX and glTF have mostly chosen to import f-curve data directly as well, skipping caching workflows altogether.

Choices to consider

  • Do we explore a system like what's was mentioned in [2] further?

  • Do we forgo a caching system for animated properties entirely and instead author the f-curve on the relevant properties directly?

  • Do we need an "Un-Bake cache to f-curve" Operator to help solve problem 2 for cases where the cache is used today?
    Caching is important for the efficiency reasons noted above. But could we un-bake the cache and turn it into f-curves as an Operator? This would allow the use of Caches by default while enabling the user to turn it into editable data at a time of their choosing later.

Decision needed

<which choices to plan and investigate further>

## Context The current animation import capability of Alembic and USD importers is heavily geared toward use of the Mesh Sequence Cache modifier and Transform Cache constraint. Over time, and as USD matured and gained further traction, we are now accumulating many more scenarios which don't quite fit into the current cache based capability and approach. #### Existing Tasks and PRs [1] https://projects.blender.org/blender/blender/issues/54050 [2] https://projects.blender.org/blender/blender/issues/69046 ## Problem There are two general problems associated with the current machinery used by both Alembic and USD importers. Much of this stems from the Mesh Sequence Cache in that it only supports various Mesh and Curve attributes. See [2] above for further notes on the topic. #### Animated, non-geometry, object properties are only imported statically and any time-varying behavior will be ignored. Examples include - Animated camera focal length, depth of field focal distance, and depth of field F-Stops - Animated light intensity, color, and size - Animated material properties - Animated prim/object visibility settings #### Baked data vs. Editable data - The problem with only having a Cache-based workflow Alembic, being a format created specifically to contain pre-baked data, lends itself well to opaque cache workflows. Whether through the Mesh Sequence Cache, or a hypothetical system where animated properties have their F-Curve data loaded directly from a cache file rather than being evaluated each frame, editing the data was never intended. The main purpose here was always to only load the smallest amount of data possible, and evaluate it as quickly as possible, for only the current frame being viewed or rendered. USD is different. Like Alembic, it can serve as a container for pre-baked data, but it can also serve as a general interchange format where editing and composing changes "over" existing data is possible. In that world, being able to interact with, and change, individual keyframes and f-curves is desired and expected. Some USD data (Skeletons/bones) is already being loaded directly into f-curve/actions today for similar reasons. Additionally, other formats like FBX and glTF have mostly chosen to import f-curve data directly as well, skipping caching workflows altogether. ## Choices to consider - Do we explore a system like what's was mentioned in [2] further? - Do we forgo a caching system for animated properties entirely and instead author the f-curve on the relevant properties directly? - Do we need an "Un-Bake cache to f-curve" Operator to help solve problem 2 for cases where the cache is used today? Caching is important for the efficiency reasons noted above. But could we un-bake the cache and turn it into f-curves as an Operator? This would allow the use of Caches by default while enabling the user to turn it into editable data at a time of their choosing later. ## Decision needed `<which choices to plan and investigate further>`
Bastien Montagne added the
Interest
Animation & Rigging
Interest
Geometry Nodes
labels 2024-09-03 13:07:38 +02:00

While option [2] could be part of the new animation system roadmap, I don't think this is something we can count on in the immediate future.

Further more, I would rather have the option to import these property animations as (editable) F-Curves anyway.

So IMHO for the immediate future we should rather focus on supporting F-Curve import/generation from all of these property baked animations. And keep the modifier (and node in the future?) cache reader only for baked geometry and its attributes.

@Sergey, @JacquesLucke and @dr.sybren may also have things to say here?

While option [2] could be part of the new animation system roadmap, I don't think this is something we can count on in the immediate future. Further more, I would rather have the option to import these property animations as (editable) F-Curves anyway. So IMHO for the immediate future we should rather focus on supporting F-Curve import/generation from all of these property baked animations. And keep the modifier (and node in the future?) cache reader only for baked geometry and its attributes. @Sergey, @JacquesLucke and @dr.sybren may also have things to say here?

If we want editable F-Curves then neither using modifiers not animation system sounds like a good fit: for being editable the data needs to exist in the "original" bmain and can not be "generated".

Also. for this to work the entire f-curve would need to be loaded. I am not sure this is something that is (cheaply) possible with the Alembic/USD. And even if it's possible from their side, I am not sure unconditional converting to F-Curves is the way to go. It would be fine for a handful animated properties, but eventually you'd hit the performance impact of F-Curve evaluation. Would be good to know if streaming animated properties in is faster without F-Curves (or whether Alembic/USD will essentially do the same evaluation).

Is also unclear to me whether the [2] proposes to make it so animation data generates geometry, or just uses Alembic/USD as a replacement for F-Curves (maybe i've just missed this information).

If we want editable F-Curves then neither using modifiers not animation system sounds like a good fit: for being editable the data needs to exist in the "original" bmain and can not be "generated". Also. for this to work the entire f-curve would need to be loaded. I am not sure this is something that is (cheaply) possible with the Alembic/USD. And even if it's possible from their side, I am not sure unconditional converting to F-Curves is the way to go. It would be fine for a handful animated properties, but eventually you'd hit the performance impact of F-Curve evaluation. Would be good to know if streaming animated properties in is faster without F-Curves (or whether Alembic/USD will essentially do the same evaluation). Is also unclear to me whether the [2] proposes to make it so animation data generates geometry, or just uses Alembic/USD as a replacement for F-Curves (maybe i've just missed this information).

In the long run we want to have the layered animation system support Alembic/USD animation layers as well. That could produce evaluated values for properties, without having those values explicitly stored as F-Curves. That's far future though.

Further more, I would rather have the option to import these property animations as (editable) F-Curves anyway.

The layered animation system would make this possible and unambiguous, by copying the animation curve into an F-Curve on a new layer that sits on top of the USD/Alembic layer, ready for editing.

Would be good to know if streaming animated properties in is faster without F-Curves (or whether Alembic/USD will essentially do the same evaluation).

Even if the evaluation performance were the same, I'd still prefer Alembic/USD doing this evaluation work. It would remove the need to read all the data in advance. Of course display of the data in the dope sheet and graph editor would then also require some more work.

Is also unclear to me whether the [2] proposes to make it so animation data generates geometry, or just uses Alembic/USD as a replacement for F-Curves (maybe i've just missed this information).

[2] originated years before the layered animation work. I hope the above helps to illustrate things in a bit more modern way?

In the long run we want to have the layered animation system support Alembic/USD animation layers as well. That could produce evaluated values for properties, without having those values explicitly stored as F-Curves. That's far future though. > Further more, I would rather have the option to import these property animations as (editable) F-Curves anyway. The layered animation system would make this possible and unambiguous, by copying the animation curve into an F-Curve on a new layer that sits on top of the USD/Alembic layer, ready for editing. > Would be good to know if streaming animated properties in is faster without F-Curves (or whether Alembic/USD will essentially do the same evaluation). Even if the evaluation performance were the same, I'd still prefer Alembic/USD doing this evaluation work. It would remove the need to read all the data in advance. Of course display of the data in the dope sheet and graph editor would then also require some more work. > Is also unclear to me whether the [2] proposes to make it so animation data generates geometry, or just uses Alembic/USD as a replacement for F-Curves (maybe i've just missed this information). [2] originated years before the layered animation work. I hope the above helps to illustrate things in a bit more modern way?
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info 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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#124555
No description provided.