Scaling down chunks of RBD Material Fracture, post kaboom.

   3119   5   1
User Avatar
Member
20 posts
Joined: March 2023
Offline
Hello all,

I'm currently working on a shot where the bad guys need to explode (RBD Material Fracture) and disappear.

The concrete option is working well. My problem is I need all the pieces to hit the ground, bounce about for a few frames and then scale down to nothing. I have been doing these shots in Maya, where I'm able to just keyframe the scale down for each chunk but I can't see how to do this in Houdini. Any help very much appreciated!!

I've attached my very basic node tree.

Thanks in advance!
Cam. sdfs

Attachments:
nodes1.JPG (23.6 KB)

User Avatar
Member
2658 posts
Joined: June 2008
Offline
There should be a @hitcount attribute you can leverage post-sim in a wrangle.
Like...
if(@hitcount>2){v@scale *= 0.9;} //Slowly shrink, or *= 0.1 to shrink fast.
Edited by Enivob - May 25, 2023 16:27:49
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
20 posts
Joined: March 2023
Offline
Enivob
There should be a @hitcount attribute you can leverage post-sim in a wrangle.
Like...
if(@hitcount>2){v@scale *= 0.9;} //Slowly shrink, or *= 0.1 to shrink fast.

Thanks Enivob,

Appreciate your help! I perhaps should've mentioned I'm still very new to houdini.. I had a go at implementing the above but it's not doing much. I just found an Entagma tut that might help so will try that out. https://www.youtube.com/watch?v=kZuoPyLcj64&ab_channel=Entagma [www.youtube.com]

Thanks again!
User Avatar
Member
20 posts
Joined: March 2023
Offline
Enivob
There should be a @hitcount attribute you can leverage post-sim in a wrangle.
Like...
if(@hitcount>2){v@scale *= 0.9;} //Slowly shrink, or *= 0.1 to shrink fast.

Okay, I'm a bit lost. If you could tell me how to get the above working in my node tree that would be AWESOME.

Thanks for your time!
User Avatar
Staff
445 posts
Joined: Feb. 2008
Offline
Here's an example of how you can achieve that in the sim rather than scaling them afterwards - this'll prevent pieces from floating.

Enable "Impact Data" on the RBD Bullet Solver (no need for the Impact Analysis) so you get access to the impact points. You'll probably want to lower the collision padding also, otherwise as the pieces shrink, you'll likely start getting pieces rolling around or floating).
Dive inside the RBD Bullet Solver - there's a SOP solver which starts by creating a "pscale" and a "bullet_want_deactivate" point attributes, setting their default value to 1 only.
It then looks for the impact points with matching primid, and accumulates a numimpacts on every frame a piece collides with something. If numimpacts > 2, it starts shrinking pscale by multiplying it by 0.99 and set the "bullet_want_deactivate" to 0 - this disables sleeping for the shrinking pieces - if you don't deactivate sleeping for the shrinking pieces, they'll start floating as they shrink once they're sleeping.

If pieces are constrained, you may want to check that and do something different - you could ignore constrained pieces, or you could start moving them closer to one another as they start shrinking, or any which other thing you can imagine.

Edit - I've updated the hip file to show scaling post-sim.
Edited by npetit - May 29, 2023 22:28:31

Attachments:
ScaledRBDs.hip (1.0 MB)

User Avatar
Member
20 posts
Joined: March 2023
Offline
Hi npetit,

Thanks very much for your helpful reply! I have only just seen it so will give it a go when I get another one of these shots. Thanks again for the detail you've given and for taking the time!

Cheers,
Cam.
  • Quick Links