Jump to content

How to make RBD spheres explode individually on emission (Houdini 20.5)


vikola

Recommended Posts

Hi houdini expert!
I'm in Houdini 20.5.
I’ve got a pre-fractured sphere made with rbdmaterialfracturerbdpack.
Using copytopoints, I duplicate it on some points that i had previously cached.

The spheres are emitted over time with emitRBD, so they don’t all exist from frame 1.
What I want is for each sphere to explode the moment it’s emitted, with the force starting from that sphere’s center and affecting the individual fragments, not the sphere as a single packed piece.

After copytopoints I’ve got an rbdunpack connected to an rbdbulletsolver.
With only the gravity each sphere, when enter in the simulation, start falling on the ground and the breaks.

How can I make each emitted RBD sphere explode outward from its own center, with the force applied to its fractured pieces instead of the packed object as a whole?
The explosion should start in the first frame each ball enter in the simulation.

Thank you!!

SphereExplosion_V04.hiplc geo.zip

Edited by vikola
Link to comment
Share on other sites

Hi,

insert an attribute wrangle into connection wire of the rbd bullet solver sop first input, copy and past this code:

vector centroid = getbbox_center(0);
vector vel = normalize(@P - centroid) * ch("scale");
v@v = vel;

It should work in your scene without other changes.

  • Thanks 2
Link to comment
Share on other sites

2 hours ago, vicvvsh said:

Hi,

insert an attribute wrangle into connection wire of the rbd bullet solver sop first input, copy and past this code:

vector centroid = getbbox_center(0);
vector vel = normalize(@P - centroid) * ch("scale");
v@v = vel;

It should work in your scene without other changes.

Thank you!
The only problem I've notice is that the centroid is the same for every new sphere emitted, so it gives a direction more than an impulse from it's center.

I've achieved I think in some way, but I'm not sure is the best way to do it, as I'm farily new in houdini.
What I did was with a sopSolver inside rbdBulletSolver connected to the presolve output
dopImport->attRandomize @v min(-1,-1,-1) max(1,1,1) ->attWrangle:

int was_active = point(1, "active", @ptnum);
int now_active = i@active;


if (now_active == 1 && was_active == 0)
{
       v@v *= chf("impulse_strength");

}

Now my problem is to create smoke from the debris, as DebrisSource is not reading the incoming geometry as they are not in the scene from the beginning, so the rest frame is not working.
Any suggestion is welcome :)
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...