3
$\begingroup$

My goal is import crowd particle data from Maya to Blender, but I'm stuck at how to find aim direction from each particle, because all points not pointing at the velocity direction.

I try this workflow:

  • export particle cache (nparticle) via ABC
  • in Blender import that Alembic
  • then using geometry node point instance to add some object instance
$\endgroup$
2
  • $\begingroup$ abc format has .velocities attribute under modifier, but when I tried to use this attribute as vector under geometry nodes, the "Group Input" socket plugged into Viewer node is zero ... so I'm not sure if there is something to be used ... or I could misunderstood the velocity usage :) $\endgroup$
    – vklidu
    Commented Nov 19, 2021 at 20:53
  • $\begingroup$ In theory ... there probably could be a way to generate from vertex a point for each frame, connect by curve spline as motion trail and let follow instances this curve spline ... ? $\endgroup$
    – vklidu
    Commented Nov 19, 2021 at 20:56

2 Answers 2

4
$\begingroup$

Velocity Attribute

  • connect Vector input socket of Align Euler to Vector node directly to empty socket of Group Input, it will automatically set socket type as Vector.

enter image description here

  • go to Modifiers and under Geometry Nodes > Input click on icon and then click into empty field and select Point>Velocity

enter image description here

enter image description here

Tested on an one of the developer's .abc file used as proof of implementation.

Note: Alembic's velocity was implemented in 2020, but due unification of handling velocity data, this feature wasn't available for 2.93 and some versions above (A velocity was available only for objects changing point count, like a fluid.)

It is back in 3.6+ (thanks Leander for the comment) ... maybe earlier, I don't know from what version, so just a notification if you need to use some older blender in between those mentioned versions it is miss there :)

For 3.6+ I had to switch vector direction. You can use ...

  • Vector Math node > Scale -1 or
  • under Instance on Points node set Scale for XYZ -1 (It probably make a more sense, since velocity is a forward force.)
$\endgroup$
2
  • $\begingroup$ Works still/again in 3.6 Don't delete. $\endgroup$
    – Leander
    Commented Aug 22, 2023 at 10:47
  • $\begingroup$ @Leander Thanks for letting me know :) Great ... Edited. $\endgroup$
    – vklidu
    Commented Aug 27, 2023 at 14:11
3
$\begingroup$

Currently a velocity atribute is not part of .abc file. Velocity is stored only for mesh sequence like fluid, because there is not any other way to calculate velocity due vertex amount change.
For more info read here.


For particles exported as vertices is kept vertex ID and continuity from frame to frame. It means you can calculate velocity from previous/next vertex position.

As workaround you would have to duplicate object and under Constraint Properties > Transform Cache > set Frame Offset 1 (don't forget to make this data block unique).

Then you can use Geometry Nodes to calculate velocity from previous vertex position by Transfering Attribute from the duplicated object and Subtract vector from original object.

enter image description here

enter image description here

With particles it works in the same way ...

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .