Jump to content

Bullet - How to limit Velocities or exclude elements


Whatsinaname

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
Link to comment
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
Link to comment
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
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...