Hey guys,
Been struggling for a while with that one. I know it's rather simple to achieve with Copy Sops and Stamping, but i'm trying to offset the animation of my “instances” (using Redshift point instancing here) so each instances plays its animation from the moment the particle instancing it borns.
Any idea how to achieve that please?
Cheers,
A.
Offset instances animation by particle age / birth?
2009 4 2- Adriano
- Member
- 403 posts
- Joined: June 2015
- Offline
- Enivob
- Member
- 2528 posts
- Joined: June 2008
- Offline
You could look at @age and remap @age over @life to the frame sequence range, let's assume 0-100 in your sequence. Then construct a filename based upon that output.
So when the particle age is 0 you will display geo for frame #0. You could construct an alternate filename that points to blank geometry until the particle is actually born. i.e. @age> 0.001 or something…
if (@age > 0.001) { float frame_num = fit(@age,0,@life,0,100); string sequence_path = "c:/my_folder/my_sequence/"; s@instancefile = sprintf("%s/my_geo_%03d.bgeo.sc", sequence_path,frame_num); f@pscale = 1.0; } else { s@instancefile = "c:/my_folder/my_sequence/my_null.bgeo.sc"; // Or the old scale to 0 trick. f@pscale = 0.0; }
So when the particle age is 0 you will display geo for frame #0. You could construct an alternate filename that points to blank geometry until the particle is actually born. i.e. @age> 0.001 or something…
Edited by Enivob - March 6, 2018 20:40:22
Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- AndyW
- Member
- 336 posts
- Joined: Dec. 2014
- Offline
Correct me if I'm wrong, won't this give you a float value for the frame number that is the same as @age?
Another way would be to do frame_num = (int)(@age * 24) (24 being your fps) to get a frame sequence number incremented by age, I guess you could use wrap() to have it loop back when it reaches 100
Another way would be to do frame_num = (int)(@age * 24) (24 being your fps) to get a frame sequence number incremented by age, I guess you could use wrap() to have it loop back when it reaches 100
- Adriano
- Member
- 403 posts
- Joined: June 2015
- Offline
Thanks for bothering, guys. Much appreciated. But i found an other work around for my case scenario that does not involve POPs (nor birth time consequently). Couldn't wait and dig any longer in the topic. Hoping though that Sidefx will add a button for dummies to handle stuff like that on the next releases. It's kinda off the shelf in other packages.
Cheers,
A.
Cheers,
A.
- Enivob
- Member
- 2528 posts
- Joined: June 2008
- Offline
Correct me if I'm wrong, won't this give you a float value for the frame number that is the same as @age?Only if the life were set to 100 frames. By default it is set to 100 seconds which would be 2400 frames @24fps. Also age does not increment until the particle is birthed which may not happen exactly on frame 1.
Edited by Enivob - March 7, 2018 17:29:30
Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
-
- Quick Links