Bullet concave objects ?

   11912   17   0
User Avatar
Member
34 posts
Joined: 3月 2012
Offline
Hi

I last couple of days i start to experiment with bullet simulations.
First thing i setup simulation with convex hull and cone twist constraint , simulation was ok.
Then i switched to concave shapes.
So i can say that simulation was more precise , better collisions , but i start to get some weird behavior on some parts , like some pieces stuck in air and such.
So my question is , is this common problem with concave shape , to be somewhat unstable , or maybe i'm doing something wrong etc.

thanks
User Avatar
Member
2622 posts
Joined: 6月 2008
Offline
You may want to inspect the collision geometry generated from your source mesh. If the sampling is not high enough the resulting collision surface may be evaluated as a shape with poor boundaries or holes. If you can post an example scene that would help identify the actual problem.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
34 posts
Joined: 3月 2012
Offline
Hi

So i search on internet for this problem , and found on bullet forum and houdini , that concave geomeotry( especially Active rbds) can be problem , so i'm assuming that this is case and we can't get simulations without problems with concave geo , but i'm not sure.



So here i have done first convex simulation , and it went without problems , than switch to concave mesh and i have problems .
So there is problem with strange collision , rbds intersecting , etc
With more substeps things are even worse.


So , i want to do workflow where i'm simulating convex pieces , because they are fast , and at end i switch to concave to get quality , and because concave simulations are slow i can't allow to get “errors” like that.

In attachment is very simple scene , showing problem of bad collisions.
Any idea how to fix this?


Thanks

Attachments:
concave_test.hip (2.9 MB)

User Avatar
Member
2622 posts
Joined: 6月 2008
Offline
Sometimes you have to throw nodes away and just start over. I did this with your scene. I deleted everything but the wall pieces and then used the shelf tools to recreate the simulation. It works faster and better now.

Attachments:
ap_concave_test.hiplc (2.8 MB)
Untitled-1.jpg (166.8 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
34 posts
Joined: 3月 2012
Offline
But , you do not have passive objects , everything fall down , and you must have passive in “real” simulation.
User Avatar
Member
2622 posts
Joined: 6月 2008
Offline
Just cache it out and put a time shift on the playback. You can control when a cache starts playing. Or just glue it together and break the bonds when needed.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
34 posts
Joined: 3月 2012
Offline
Enivob , i think you do not understand problem here.
Please read name of thread and my post.
In your scene you created simulation with convex objects , and problem here is with CONCAVE objects in simulation.
I do not need any help with scene that attatched , this is only simplest example where you can see collision problems with concave objects.
User Avatar
Member
2622 posts
Joined: 6月 2008
Offline
I simply revised your posted scene using your source objects. Personally I did not see any concave objects in your scene, it is just a fractured wall. A concave object is like a bowl, right?

I did notice your simulation was hosed, it took too long and had interpenetrating convex objects. I simply threw the entire AutoDOPNetwork away and the ground planes and built it up again. Sometimes it is easier to do that than to try to figure out what default value you may have twiddled unknowingly slowing or altering the final simulation.

Do you have an example CONCAVE hip file that need help with?
Edited by Enivob - 2016年8月2日 16:50:23
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
4 posts
Joined: 3月 2010
Offline
I don't see any pieces ‘stuck’ in the air. All I see is that some of the pieces near the static part of your solve are moving around…Why is that happening? Chances are they are caught on a part of the static wall and because you are using concave, you are getting a more precise solve rather than just using convex hull which is good and bad. The geo in that file is cut a bit funky so, it is not surprising that the bottom active pieces are getting caught.

If you turn on your guide geometry, turn off display geometry, and switch between concave/convex hull on your geo1 node in your AutoDopNetwork, you can see the difference of the collision between convex hull and concave. With a difference like that, of course you are going to get different issues. If you don't need to use concave objects, which in this example scene you don't, I would stick with using convex objects as it would be quicker. 9 times out of 10 nobody is going to know if you are using convex hull or concave. Using concave is always going to be a bit slower.

As for the penetration between pieces, turning up the number of substeps in the rigid body solver helped alot testing it on my end. I don't know what you mean by it making things worse turning that number up…? If by worse, you mean that the simulation changes then well, that is to be expected. You can mess with the collision padding also on the RBD packed object to see if that will help.
User Avatar
Member
34 posts
Joined: 3月 2012
Offline
Enivob
So i think this concave option in houdini is actually in general terms “triangle mesh” collision , it is not important that my geometry is not actually concave…
So i'm testing this type of collision to conclude , is it even good to be used (no matter speed).

rbowden
Thanks for response.


I my scene i raised simulation steps really high , and still penetration is happening , atop of that simulation is now jittery , look “unstable” , this is what a meant with “worse”.

And with much more pieces than this (5000) , you will see pieces stuck in air(near collision) , and things like this.
User Avatar
Member
20 posts
Joined: 2月 2015
Offline
Hello,

I hope you have watched the bullet master class as it has lots of valuable info. Here is the link just in case. https://vimeo.com/80840429 [vimeo.com] Bullet was built for real time video games on consoles. Its strength is convex hulls. If you are getting weird shapes when you turn on show collision in dops when using convex hulls… its because the geo was not built for correctly for it. Most of your time when doing simulations is modifying the geo to make sure a certain criteria is met… like the geo being water tight etc.

Now onto concave.. yes it works, yes its slower. The reason why things are so goofy in your scene with concave vs convex is simple. With Convex hulls.. Bullet under the hood ignores penetrating geometry so things don't explode on you on the first frame of the solve.

With Concave you are telling bullet you want more precision. However you supplied bullet with a ton of penetrating oddly cut up geo. So things are sticking to each other and so on. You can do things like raise the collision padding or make it smaller. You need to change density. The default value of 1000 is that of water. Change friction values and so on.

Also for bullet go as low res as possible on the geometry you use. And upres the cache after with higher detailed assets.

I hope the penetrating geometry explanation helps you. Also tisk tisk on the substeps that was not the solution to fix this.

Edited by Jeremy Kendall - 2016年8月3日 00:57:11
User Avatar
Member
34 posts
Joined: 3月 2012
Offline
Hi Jeremy Kendall

Thanks for response.

So i tried what you suggested , but still things are same.
So what i did:

1.make “cleanest” geometry , voronoi fracture + remesh
2.separate pieces (to not have any contact in first frame)
3.raise substeps in solver

You are mentioning collision padding , but i do not see this option is active when you turn on concave option or rbds.

My last test file is in attachment.

Attachments:
concave_1.hip (230.1 KB)

User Avatar
Member
182 posts
Joined: 4月 2009
Offline
I agree that in your example you really don't have that much concavity going on.

The usual approach in bullet is to sim with convex hulls (with a simplified geometry even ) and then replace the lores chunks with hires pieces with noise / displacement etc. As already mentioned, bullet was built with speed in mind, not precision.

If you are interested, you may want to look into “convex decomposition”.
There are a number of papers on the subject out there. You basically divide your concave mesh into smaller convex hulls to approximate its concave volume.
So you'd slice your geometry into smaller pieces until you are satisfied with the approximation. This can be an automated setup or you can manually cut your mesh. In your RBD object is an option to create convex hulls based on connectivity btw.
Here is an example:
Edited by blackpixel - 2016年8月3日 08:53:18

Attachments:
decomp.gif (528.2 KB)
convex_hulls.hip (229.4 KB)

User Avatar
Member
34 posts
Joined: 3月 2012
Offline
blackpixel
Thanks for response.
I think you are right.
Till now i was thinking only problem with concave(mesh) type simulation is speed , but i think i concluded that they have problem in resolving collision , so that put them in unusable category(maybe they work correct for static meshes only when colliding with convex , diin't try that)
Actually speed is not that bad if you put some simulation over night , and if you can get excellent simulation.
As you mentioned convex decomposition is way to go.
I'm not aware that in houdini there is node to do convex decomposition , i found some topic in forum that some guy wrote plugin for houdini that is doing convex decomposition , still have to download that i try how it works.
Right now i'm doing some sort of convex decomposition , with voronoi fracture , than check on rbd packed primitives dop (create convell hull per set of connected primitive) , i this is doing trick.
User Avatar
Member
20 posts
Joined: 2月 2015
Offline

Collision padding lives on the rbd object under collision>bullet data. Its on the same tab you change things from convex hull to concave.



ginodauri
Hi Jeremy Kendall

Thanks for response.

So i tried what you suggested , but still things are same.
So what i did:

1.make “cleanest” geometry , voronoi fracture + remesh
2.separate pieces (to not have any contact in first frame)
3.raise substeps in solver

You are mentioning collision padding , but i do not see this option is active when you turn on concave option or rbds.

My last test file is in attachment.
User Avatar
Member
34 posts
Joined: 3月 2012
Offline
Jeremy Kendall
Collision padding lives on the rbd object under collision>bullet data. Its on the same tab you change things from convex hull to concave.



Yes , but in my case , when i change geometry to concave , it became automatically gray out.
User Avatar
Member
34 posts
Joined: 3月 2012
Offline
nodeway
You may want to filter your geometry with remeshSOP (with TargetEdgeLength set something like 0.05 or just set it to adaptive mode) followed by foreachSOP where you fuseSOP each chunk, before you decompose it. I got better results with your geometry when I done this.

Rubber Toy was processed without any problems:


Cool , thanks for this , will try that.
  • Quick Links