Jump to content
Whatsinaname

Bullet - How to limit Velocities or exclude elements

Recommended Posts

I want to emit smoketrails from pieces I created using a Voronoifracture. However, it seems like impossible getting the sim completely stable, there is always something flying off too rapidly or exploding. I was thinking about creating something like a VOPSOP that checks if an element is above a certain velocity and if so, limits this velocity in order to prevent those explosions or maybe kills those exploding elements/ elements taht are outside a certain bounds. 

 

My problem is I do not know where or how to create such a VOP in DOPs/ Bullet context. Does anybody have an idea how to achieve that?

 

EDIT:

 

Something strange (maybe anybody has an idea why):

 

I created the geometry for those pieces using some cookie operations. After the cookie, I added a Remesh SOP, then turned this into a VDB, scattered points into that VDB and finally fed that into the Voronoi. Using the Remesh, there were always some pieces going nuts in the Bullet sim. After deleting the Remesh, it works like a delight. 

Edited by Phlok

Share this post


Link to post
Share on other sites

wire bullet solver to multi solver and add sop solver with wrangle inside or just Geometry Wrangle DOP and add similar code:

float maxSpd = 5;
float crSpd = length(@v);
if(crSpd>maxSpd){
    @v = normalize(@v)*maxSpd;
}

small pieces sometimes go crazy, but there are some fixes in newer builds. worth to check

  • Like 4

Share this post


Link to post
Share on other sites

Bullet doesn't like RBD pieces with very small masses. Sometimes clamping mass to a fixed small limit will help with the pieces that accelerate out of control. Clamp in the same Wrangle operator. This in combination with keeping the velocities in check.

 

For packed prim Bullet sims, I use again the MultiSolver DOP but use the POP Wrangle DOP as it is a bit more convenient to manipulate the point packed prim attributes.

  • Like 1

Share this post


Link to post
Share on other sites

 use a vopforce dop to reduce your velocities and torque.  Multiply by mass to normalize your drag.  You can also add a mask input (as second parameter to vopforce drag) to limit where you want the drag to work.

 

 -G

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×