Jump to content
Cassidy

Generating collision shapes for bullet engine from concave geo

Recommended Posts

Hello everyone,

I'm trying to do a multiple explosion effect on a piece of geometry with a glass material and I have some issues with concave shapes.

Since the object needs to be transparent I cannot use any kind of pre-fracturing, otherwise it would show. (picture 1 & 2)

render.png.9e11d00e3c8f0930e64ee0242ae0772c.png

 

So I setup a DOP network with a SOP solver inside to fracture the geometry dynamically. (picture 3)

Capture7.PNG.5948450b98eacbb08a4acd77c5da19d1.PNG


It works fine and the explosions are happening as planned. But since the geometry is concave, a convex collision shape is automatically created around it. (picture 5)
And this causes the pieces created from explosions to be pushed outside instantaneously (picture 6).

sim_result.thumb.png.eb0f3ffe63d14d885d67a09899d9534a.png

 


So I've searched for ways to handle concave geometry and this is what I found:

Use the "concave" option in the "rbd packed object" node.

It works! (picture 7). But it is excruciatingly slow, and this chess piece is part of a larger simulation with other chess pieces with similar issues. So in the end it would be difficult to work with everything being so slow.

Decompose the base geometry into convex shapes.

With the "convex decomposition" SOP for example. Since it produces several pieces, I can't display the result directly as the object is transparent (same issue as picture 2). And since I fracture the geometry dynamically I don't see how I could replace the simulated geo with some display geo in the end. Maybe I'm missing something here, but I don't know how to replace proxy geometry with display geometry when the proxy geometry is dynamically fractured.

The "compound" option in the "rbd packed object" node

The description of this option looks promising in the documentation, but it specifies that you need to use a node to generate some data, and that node is deprecated... It is replaced by another option called "Create Convex Hull Per Set Of Connected Primitives". But as far as I understand, your input geometry needs to be made of several "pieces" for this option to be useful.


Is there anything I missed here? A method for generating collision shapes that doesn't involve breaking your geometry into several components?

Share this post


Link to post
Share on other sites

Why do you need to replace the fractured geometry dynamically? The dop exports packed data which can be read in the sop network, either directly from the dop network or with the dop inport fields. Cannot you just replace one geometry with another with a help of switch node with some sort of if $FF > (yourstartofexplosion) and that way avoid to see the cracks prior to explosion?

Share this post


Link to post
Share on other sites
On 5.12.2020 at 2:57 PM, Cassidy said:

Hello everyone,

I'm trying to do a multiple explosion effect on a piece of geometry with a glass material and I have some issues with concave shapes.

Since the object needs to be transparent I cannot use any kind of pre-fracturing, otherwise it would show. (picture 1 & 2)

render.png.9e11d00e3c8f0930e64ee0242ae0772c.png

You can absolutely use pre-fractured geometry.

https://www.sidefx.com/docs/houdini/examples/nodes/sop/rbdconnectedfaces/RBDConnectedFaces.html

Share this post


Link to post
Share on other sites
9 hours ago, skomdra said:

Why do you need to replace the fractured geometry dynamically? The dop exports packed data which can be read in the sop network, either directly from the dop network or with the dop inport fields. Cannot you just replace one geometry with another with a help of switch node with some sort of if $FF > (yourstartofexplosion) and that way avoid to see the cracks prior to explosion?

Yes I tried that in the beginning but issues arise when you have more complex destruction effects like multiple stage fracturing. Since some pieces have moved when you trigger the second fracture, you need to match the position before swapping the pieces. And if you want to be able to break pieces when they collide with something  else during the sim it becomes even more complex.

In the end it seemed easier to do everything dynamically during the sim.

 

9 hours ago, dleonhardt said:

Ah! I feel so silly to have missed this. :rolleyes:

I'll see what I can do with it. Thanks!

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

×