Maniphest T95945

Alembic not importing velocity
Confirmed, NormalBUG

Assigned To
None
Authored By
Juan Gea (juang3d)
Feb 21 2022, 9:54 PM
Tags
  • BF Blender
  • Alembic
  • Pipeline, Assets & I/O
Subscribers
Brecht Van Lommel (brecht)
Juan Gea (juang3d)
Kévin Dietrich (kevindietrich)
Omar Emara (OmarSquircleArt)
Robert Rioux (riouxr)
Steffen Dünner (SteffenD)

Description

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.79

Blender Version
Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-02-20 22:00, hash: rB1a0a22f95a22

Short description of error
When importing an Alembic file, velocity is not being imported, cycles is not using it and GN is incapable of seeing it.

Exact steps for others to reproduce the error
Import given Alembic file and look for velocity.

https://we.tl/t-nq8wwGR6ul

The link will last around 1 week, it's just one frame of a simulation.

Event Timeline

Juan Gea (juang3d) created this task.Feb 21 2022, 9:54 PM
Omar Emara (OmarSquircleArt) changed the task status from Needs Triage to Confirmed.Feb 22 2022, 9:43 AM
Omar Emara (OmarSquircleArt) added a project: Alembic.
Omar Emara (OmarSquircleArt) added a subscriber: Omar Emara (OmarSquircleArt).

Can confirm missing velocity attribute. Alembic listing:

/:
StormPoints
/StormPoints:
.geom
/StormPoints/.geom:
.selfBnds   P   .pointIds   .velocities   .widths   .arbGeomParams   /StormPoints/.arbGeomParams:
Cd   emissionPos   emitterId
Steffen Dünner (SteffenD) added a subscriber: Steffen Dünner (SteffenD).Feb 22 2022, 9:47 AM
Brecht Van Lommel (brecht) added a project: Pipeline, Assets & I/O.Feb 22 2022, 9:59 AM
Brecht Van Lommel (brecht) added subscribers: Kévin Dietrich (kevindietrich), Brecht Van Lommel (brecht).

CC @Kévin Dietrich (kevindietrich)

@Omar Emara (OmarSquircleArt), bug reports should always be tagged with a module when confirmed, to ensure someone looks at it.

Steffen Dünner (SteffenD) added a comment.Feb 22 2022, 10:02 AM

The Alembic contains only points. AFAIK velocities / attributes on points are not yet supported in Alembic import?

Omar Emara (OmarSquircleArt) added a comment.Feb 22 2022, 10:11 AM

@Brecht Van Lommel (brecht) Noted. I didn't realize projects might not be modules.

@Steffen Dünner (SteffenD) I am not sure, lets wait for Kevin to look into it.

Bastien Montagne (mont29) changed the subtype of this task from "Report" to "Bug".Feb 22 2022, 10:52 AM
Juan Gea (juang3d) added a comment.Feb 22 2022, 12:40 PM

@Steffen Dünner (SteffenD) In the current Alembic implementation points are interpreted as vertices, and velocities should be there for those vertices, other attributes would be ignored basically because there are not read, but velocity is the only one that was read to be able to render it with Cycles.
So even when they are points, when imported they are vertices and those should have velocity if it exists, at least is what I understand, I may be wrong, @Kévin Dietrich (kevindietrich) would know better :)

Kévin Dietrich (kevindietrich) added a comment.Feb 22 2022, 12:50 PM

It is not strictly a bug in the sense that there is no support yet for reading arbitrary attributes for Alembic point clouds yet.

Although:

  • we do read normals for point clouds (I added this back in the day for somehow to instantiate objects on the points and give them a direction, the example was a fish school)
  • given that we load point clouds as meshes, and that regular meshes do have velocities loaded, this could be considered a bug

I can add support for this, but depending if we consider this a bug or not, it will either go to 3.1 or 3.2.

Kévin Dietrich (kevindietrich) added a comment.Feb 22 2022, 12:53 PM

I posted too quickly, if we do not consider this a bug and this should go to 3.2, then it will be probably handled by D11591: Alembic: import arbitrary attributes (which currently lacks unit tests).

Steffen Dünner (SteffenD) added a comment.Feb 22 2022, 1:01 PM

I just gave some point clouds with velocity vectors coming from different source software a try (in Blender 2.93, 3.01 final and in 3.2 master) and never could get motion vectors to import. I also tried animated point clouds with static and changing point counts and a (particle) point cloud exported from Blender that successfully exports its motion vectors to an Alembic but doesn't load them back in. They're actually there, I confirmed it in 3rd party software.
So apart from a patch by @Kévin Dietrich (kevindietrich) I think Blender never supported velocity on points / vertices?

Kévin Dietrich (kevindietrich) added a comment.Feb 22 2022, 1:05 PM

Support for reading velocity for meshes was added in 2.92 I think (when I added motion blur support). Back then, Cycles could not render point clouds so I was useless to import velocity for them, and no other tool could really make anything with point clouds imported from Alembic. The only use case was scattering/instancing.

Juan Gea (juang3d) added a comment.Feb 22 2022, 2:58 PM

That's why I assumed that we should have velocity, since the actual import of the points is a mesh with vertices, I could swear that I saw it working at some point, and I even remember using Alembic to export particles from Mantaflow and reimport them to have motion blur, but I may be totally wrong, I have many things in my head.

The thing is that if what it's being imported is a mesh, and we have a place in the modifier to read the velocities, why is that not being imported?

Anyways, this could be a feature and not a bug, I'll leave this up to you, for 3.1 I think it's pity to not have velocities in points now that we have point cloud rendering, but as I said, I'll leave this up to you, whatever you decide will be what it's done, from my POV it's a bug because meshes has velocities support and points are imported as mesh :)

Bastien Montagne (mont29) moved this task from Backlog to Bugs on the Pipeline, Assets & I/O board.Feb 22 2022, 3:02 PM
Kévin Dietrich (kevindietrich) mentioned this in D11591: Alembic: import arbitrary attributes.Mar 17 2022, 6:00 PM
Kévin Dietrich (kevindietrich) merged a task: T96873: point cloud Motion blur broken from alembic.Mar 30 2022, 6:09 PM
Kévin Dietrich (kevindietrich) added a subscriber: Robert Rioux (riouxr).