Random retiming of alembic instances

   5070   9   1
User Avatar
Member
385 posts
Joined: July 2018
Offline
Is there a way to retime alembic instances?
i would like to have an attribute on my points (before the copy to points sop) that sets the speed of the alembic animation and the frame it starts.
is possible to use an agent setup? that has this functionality built in as far as i have seen..although my alembic file is very simple geometry - not a rig or anything like that.
Any tips?
User Avatar
Member
8549 posts
Joined: July 2007
Offline
you can change "abcframe" primitive intrinsic per packed alembic prim in a wrangle to do that (it's in seconds despite the name)
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
385 posts
Joined: July 2018
Offline
tamte
you can change "abcframe" primitive intrinsic per packed alembic prim in a wrangle to do that (it's in seconds despite the name)

it seems i can change the abcframe using the setprimintrinsic() function, but the packed alembic prims are still moving in exactly the same way.

Here is a test scene

Attachments:
test.hip (152.6 KB)
test.abc (148.6 KB)

User Avatar
Member
385 posts
Joined: July 2018
Offline
if i blast two of the instances after the primitive wrangle i can see that their animations have the offset, but as soon as i introduce a third one then they get synced up. Could this be a viewport thing?
User Avatar
Member
385 posts
Joined: July 2018
Offline
ok i needed to unpack the alembic prims in order to see the randomized animation. and if i pack them again everything works as expected.
If anyone finds a better way to do this i would like to know cause my vex skills are beginner level.
User Avatar
Member
385 posts
Joined: July 2018
Offline
animation offset works using the abcframe but speed is a bit tricky to change without a retime sop node. there needs to be some kind of geometry interpolation
Any thoughts on that?

i have to say it is a bit strange that there are no nodes to handle the retiming of alembic / fbx instances.
something like the agent workflow..

Here is my file for anyone interested

Attachments:
alembic_retiming.hip (271.8 KB)

User Avatar
Member
8549 posts
Joined: July 2007
Offline
- you are in complete control over the time therefore over the speed with the direct value as you did in test.hip
- alembic handles interpolation automatically
- no unpack should be necessary even though there used to be viewport glitch which would not update the time but render used to be fine
however in the build I opened test.hip in (18.5.408) it at first didnt vary the time, but bypassing and unbypassing the wrangle triggers it and updated fine in the viewport
- don't unpack/repack, you will loose all optimisation
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
385 posts
Joined: July 2018
Offline
tamte
- you are in complete control over the time therefore over the speed with the direct value as you did in test.hip
- alembic handles interpolation automatically
- no unpack should be necessary even though there used to be viewport glitch which would not update the time but render used to be fine
however in the build I opened test.hip in (18.5.408) it at first didnt vary the time, but bypassing and unbypassing the wrangle triggers it and updated fine in the viewport
- don't unpack/repack, you will loose all optimisation

thank you for checking the demo scene!
I tried bypassing and unpybassing and in my case its not working. The correct animation registers after i unpack for some reason!

For now this hasn't affected my scene as far as i can tell. i feed the repacked geometry into an rbd simulation.
What kind of optimizations am i loosing this way?

Attachments:
before_unpacking.JPG (83.7 KB)
unpacked.JPG (90.0 KB)

User Avatar
Member
8549 posts
Joined: July 2007
Offline
papsphilip
What kind of optimizations am i loosing this way?
well, technically not much in terms of instancing if you have completely different time per copy
but you are losing transforms and pivots for example

however there is also benefit to keep packed alembic geo till render as then Mantra can directly reach for the original alembic at the specified time rather than passing unpacked/repacked geo which doesn't have any connection to original alembic

unpack forces it to evaluate that's why you are seeing it correctly, the same would happem at rendertime, and probably also if you just used in RBD without unpacking/repacking
it's just the viewport that seems to cut corners and therefore not always showing the correct data in this case of the same alembic reference with different time offsets
Edited by tamte - April 30, 2021 12:42:37
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
385 posts
Joined: July 2018
Offline
thank you! everything works now. there is some kind of viewport bug sometimes but that carried on inside dops. After a couple bypass/unbypass efforts my setup is stable so far.
Here is a very helpful tutorial also for anyone interested.

https://www.youtube.com/watch?v=crSMvytzQD0&list=PLgYcMX8FouybC_ujNMACeY0-bXg-QLv71&index=6 [www.youtube.com]
  • Quick Links