Jump to content

Generating collision shapes for bullet engine from concave geo


Cassidy

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?

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

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

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

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...