Geometry Nodes > Alembic Velocity #93266

Closed
opened 2021-11-21 17:47:23 +01:00 by filip mond · 11 comments

System Information
Operating system: macOS-10.15.7-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 580X OpenGL Engine ATI Technologies Inc. 4.1 ATI-3.10.19

Blender Version
Broken: version: 3.0.0 Beta, branch: master, commit date: 2021-11-20 16:50, hash: 1b2ee3cf20
Worked:

Short description of error
Geometry Nodes can't access Velocity attribute of Alembic file exported from 2.93 or newer..

Exact steps for others to reproduce the error
Exported .abc file containing velocity attribute and Imported back to blender works for motion blur rendering, but I can't access it for Geometry Nodes 3.0, 3.1 ... (fields). I can't confirm it is happening also for 2.93 GN because I never get familiar with previous Attribute system (thanks God for fields :) ).

File contains collection with original Cube used for export to Alembic ...
test_ABC_Velocity.blend
... and second collection with Imported this .abc file.
test_ABC_Velocity.abc
... but Velocity attribute is not listed.
Screenshot 2021-11-21 at 18.50.23.png

What works for me is [this test file ]] from [ https:*developer.blender.org/D2388 | this diff page ... velocity listed.

Screenshot 2021-11-21 at 18.50.23.png

Does it can be somehow related to Brecht's work on a new velocity attributes system? Thank you

**System Information** Operating system: macOS-10.15.7-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro 580X OpenGL Engine ATI Technologies Inc. 4.1 ATI-3.10.19 **Blender Version** Broken: version: 3.0.0 Beta, branch: master, commit date: 2021-11-20 16:50, hash: `1b2ee3cf20` Worked: **Short description of error** Geometry Nodes can't access Velocity attribute of Alembic file exported from 2.93 or newer.. **Exact steps for others to reproduce the error** Exported .abc file containing velocity attribute and Imported back to blender works for motion blur rendering, but I can't access it for Geometry Nodes 3.0, 3.1 ... (fields). I can't confirm it is happening also for 2.93 GN because I never get familiar with previous Attribute system (thanks God for fields :) ). File contains collection with original Cube used for export to Alembic ... [test_ABC_Velocity.blend](https://archive.blender.org/developer/F11838147/test_ABC_Velocity.blend) ... and second collection with Imported this .abc file. [test_ABC_Velocity.abc](https://archive.blender.org/developer/F11838148/test_ABC_Velocity.abc) ... but Velocity attribute is not listed. ![Screenshot 2021-11-21 at 18.50.23.png](https://archive.blender.org/developer/F11838844/Screenshot_2021-11-21_at_18.50.23.png) What works for me is [this test file ]] from [[ https:*developer.blender.org/D2388 | this diff page ](https:*dev-files.blender.org/file/download/a5ifaxbd2fvbavtn5gw2/PHID-FILE-4tylccsh2yudodwdqvnc/velocityTest.abc) ... velocity listed. ![Screenshot 2021-11-21 at 18.50.23.png](https://archive.blender.org/developer/F11838820/Screenshot_2021-11-21_at_18.50.23.png) Does it can be somehow related to [Brecht's work ](https://developer.blender.org/rBS128eb6cbe928e58dfee1c64f340fd8d663134c26) on a new velocity attributes system? Thank you
Author

Added subscriber: @FilipMond

Added subscriber: @FilipMond
Member
Added subscribers: @kevindietrich, @dr.sybren, @brecht, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

This is because the alembic file you are posting does not have .velocities:

[philippo@lic3 T93266]$ abcls -r -a ./test_ABC_Velocity.abc 
/:
Cube   .childBnds   
/Cube:
Cube   .xform   visible   
/Cube/.xform:
.inherits   .ops   .vals   isNotConstantIdentity   .animChans   
/Cube/Cube:
.geom   
/Cube/Cube/.geom:
.selfBnds   P   .faceIndices   .faceCounts   .userProperties   .arbGeomParams   uv   N   /Cube/Cube/.userProperties:
meshtype   /Cube/Cube/uv:
.vals   .indices

The file from D2388 in contrast has velocities:

[philippo@lic3 T93266]$ abcls -r -a ./torus_fluid_drop.abc 
/:
torus_object1_fluid   
/torus_object1_fluid:
RENDER   .xform   
/torus_object1_fluid/.xform:
.inherits   .ops   .vals   
/torus_object1_fluid/RENDER:
.geom   
/torus_object1_fluid/RENDER/.geom:
.selfBnds   P   .faceIndices   .faceCounts   .arbGeomParams   .velocities   /torus_object1_fluid/RENDER/.arbGeomParams:
name   varmap   /torus_object1_fluid/RENDER/name:
.vals   .indices 

So the question here is when velocities are exported to alembic?

  • for object transforms, this was/is not necessary I think (at least not for rendering motionblur)
  • deform only modifiers also dont output these (rendering motionblur works by getting the mesh before and after the current frame iirc)
  • modifiers that have changing pointcoint need these though (for rendering proper motionblur since the above method does not work)
  • blender/blender-staging@128eb6cbe9 also only does this for fluids [changing pointcount]

This could be beneficial to have as an attribute (as usage in Geometry nodes), maybe we could [optionally] write them to alembic on export?

In any case, this is not a bug, just asking @dr.sybren, @brecht, @kevindietrich if having an option to force velocities (at least for deforming modifiers also -- or also when having geometry node modifiers as input) on alembic export is something we should look at? As an alternative, one might think of having some sort of Time input node (that would enable us to read e.g. positions on previous frames) -- but I think this is even more of a hassle to get right?
Think this could be closed, but leaving open for an opinion here still.

This is because the alembic file you are posting does not have .velocities: ``` [philippo@lic3 T93266]$ abcls -r -a ./test_ABC_Velocity.abc /: Cube .childBnds /Cube: Cube .xform visible /Cube/.xform: .inherits .ops .vals isNotConstantIdentity .animChans /Cube/Cube: .geom /Cube/Cube/.geom: .selfBnds P .faceIndices .faceCounts .userProperties .arbGeomParams uv N /Cube/Cube/.userProperties: meshtype /Cube/Cube/uv: .vals .indices ``` The file from [D2388](https://archive.blender.org/developer/D2388) in contrast has velocities: ``` [philippo@lic3 T93266]$ abcls -r -a ./torus_fluid_drop.abc /: torus_object1_fluid /torus_object1_fluid: RENDER .xform /torus_object1_fluid/.xform: .inherits .ops .vals /torus_object1_fluid/RENDER: .geom /torus_object1_fluid/RENDER/.geom: .selfBnds P .faceIndices .faceCounts .arbGeomParams .velocities /torus_object1_fluid/RENDER/.arbGeomParams: name varmap /torus_object1_fluid/RENDER/name: .vals .indices ``` So the question here is when velocities are exported to alembic? - for object transforms, this was/is not necessary I think (at least not for rendering motionblur) - deform only modifiers also dont output these (rendering motionblur works by getting the mesh before and after the current frame iirc) - modifiers that have changing pointcoint need these though (for rendering proper motionblur since the above method does not work) - blender/blender-staging@128eb6cbe9 also only does this for fluids [changing pointcount] This could be beneficial to have as an attribute (as usage in Geometry nodes), maybe we could [optionally] write them to alembic on export? In any case, this is not a bug, just asking @dr.sybren, @brecht, @kevindietrich if having an option to force velocities (at least for deforming modifiers also -- or also when having geometry node modifiers as input) on alembic export is something we should look at? As an alternative, one might think of having some sort of `Time` input node (that would enable us to read e.g. positions on previous frames) -- but I think this is even more of a hassle to get right? Think this could be closed, but leaving open for an opinion here still.

If a velocity attribute should be exported to Alembic then it should be generated by the modifier stack (including geometry nodes of course), or by some other means in Blender. The Alembic exporter should not concern itself with generating such an attribute.

If a velocity attribute should be exported to Alembic then it should be generated by the modifier stack (including geometry nodes of course), or by some other means in Blender. The Alembic exporter should not concern itself with generating such an attribute.

In Blender we only write a velocity attribute in cases where the velocity can't be determined automatically due to changing topology. That's partially because velocity does not give you multi-step motion blur, so it's less accurate.

An option to force writing velocities in Alembic may be useful in some cases, but I'm not sure it's really the correct or standard workflow. Alembic files can contain a sequence of frames / time samples, and if there is a simple correspondence between them there is no need for a velocity attribute. The case where you write a velocity attribute is when that is not possible, typically a physics simulation with changing topology where you get the velocity from the simulation.

Implementing this is in Alembic export is not simple, and also redundant if the Alembic file already contains multiple time samples. If anything I would think of an option to derive velocities from time samples in an Alembic file on import.

In Blender we only write a velocity attribute in cases where the velocity can't be determined automatically due to changing topology. That's partially because velocity does not give you multi-step motion blur, so it's less accurate. An option to force writing velocities in Alembic may be useful in some cases, but I'm not sure it's really the correct or standard workflow. Alembic files can contain a sequence of frames / time samples, and if there is a simple correspondence between them there is no need for a velocity attribute. The case where you write a velocity attribute is when that is not possible, typically a physics simulation with changing topology where you get the velocity from the simulation. Implementing this is in Alembic export is not simple, and also redundant if the Alembic file already contains multiple time samples. If anything I would think of an option to derive velocities from time samples in an Alembic file on import.
Member

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'
Member

Thx for the input!
Will close then...

Thx for the input! Will close then...
Author

So ... any hint how to orient instances based on velocity direction (or previous/next vertex position)?
Like was asked here ... I will change my Answer according to this conclusion ... or does this have any other than it is not a bug? Thank you.

So ... any hint how to orient instances based on velocity direction (or previous/next vertex position)? Like was [asked here ](https://blender.stackexchange.com/questions/243648/particle-aim-direction-geometry-nodes) ... I will change my Answer according to this conclusion ... or does this have any other than it is not a bug? Thank you.

You want to compute a velocity attribute from an Alembic file that does not already have it. Support for that as part of Alembic import is a feature request.

There may be some workaround. Perhaps loading the same object a second time with a frame offset of 1, doing an attribute transfer and computing the difference in positions.

You want to compute a velocity attribute from an Alembic file that does not already have it. Support for that as part of Alembic import is a feature request. There may be some workaround. Perhaps loading the same object a second time with a frame offset of 1, doing an attribute transfer and computing the difference in positions.
Author

@brecht "Workaround" seems to be working ... https://blender.stackexchange.com/a/244606/2214 ... in hope of better way in a future :) Thanks

BTW ... if I understood you right, Alembic should store velocity for fluids ... can you confirm that?
Because I don't see any listed as seen in original post ... also no effect under shader Atribute node when written manually. If does it work for you -any link How to access velocity properly? Thank you

@brecht "Workaround" seems to be working ... https://blender.stackexchange.com/a/244606/2214 ... in hope of better way in a future :) Thanks BTW ... if I understood you right, Alembic should store velocity for fluids ... can you confirm that? Because I don't see any listed as seen in original post ... also no effect under shader Atribute node when written manually. If does it work for you -any link How to access velocity properly? Thank you
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
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
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 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#93266
No description provided.