View Full Version : Bullet for Car collision / deformation

04-11-2013, 10:16 PM
Hi guys, I'm trying to reproduce an effect with no success. I want to deform an object so it keeps its deformation after each collision, like that:

Heve somebody succeeded with Bullet?

04-12-2013, 01:41 AM
I'm trying and i can get boxes to make dent on car but somehow dent gets back after box bounces like car is made of jello :D. Reading manuals, trying and still cant' grasp how to do similar effect, hmmmm.

Waves of light
04-12-2013, 01:51 AM
It'll be interesting to see what you come up with... The Bullet part is easy, but getting the van surface to conform and stay to the shape of the dent is difficult. Almost like we need a morph created for each box hit/dent. Morphs and weightmaps applied after the bullet collisions?

04-12-2013, 02:21 AM
Yes, i can't make it to keep deforming shape, it feels like we miss some option/input field for that.

04-12-2013, 02:28 AM
Yes, i can't make it to keep deforming shape, it feels like we miss some option/input field for that.

I think you are right. I tried this as well and ended up with the same problem.

Waves of light
04-12-2013, 02:33 AM
Could you do this:

Have a copy of the car mesh in another layer.
Make it smaller
Use the smaller model as the collision object for the boxes (the reduction in size will be your dent depth - i.e. between the two models)
Then run Bullet on the smaller model, but not visible to camera.
Then eyeball where the boxes hit and create morphs for the larger car mesh at hit points
Animate morphs in timings with Bullet

04-12-2013, 02:36 AM
Spent a few hours on that and I can't get it rtght.
We can use negative values but not values over 100% in the input field. However, by using enveloppe, we can do whatever we want to.
There is no stretch limit and no elasticity limit. I played with Stiffness with no success.
Also self collision is reaaaaaallly slow. Far to slow to be useable.
I haven't tried a null that would affect the sim locally yet. But I dont see what parameters I would use to "stop" the sim locally.

Maybe I lack experence with bullet but I can't get tfabric behaviours (thick or silky or hard/ leather like) as easy as the previous cloth system.

04-12-2013, 02:46 AM
Try this: 113531

I only spent a few minutes setting this up but it's not far off I think. With a little tweaking and better geometry you could probably get it there. Tip: try increasing the two Stiffness values and decreasing Volume Conservation and see what happens.

Hope this helps. :)


04-12-2013, 03:49 AM
Yes that's on right track Grenlaw, thanks for posting but still don't behave like real metal, somehow the big block is sinking in the ground and looks too soft/jello-ish in certain areas, I got similar results but doesn't convince me to be metal deforming, it's always correcting dents slightly like it's made of jello :(. Also it has to have outrageous "mass" numbers like 25 Tons or so to at least hold some dents. If is realistic measure (like 1500kg for average car) then it's fully like jello and corrects/smooths out dents :(. I also tired simulating it on 75k polys (just small part of real car mesh freeze) and that makes i sooo long and completely junk looking - everything goes wonky and all aroudn place :). Needs more testing :).

04-12-2013, 04:09 AM
Maybe if you change the time scale you won't see the geometry deformation until it stops?

04-12-2013, 04:12 AM
Well my scales are Real world stuff (Car is 4.5m long and boxes are 50cm) so it should work since it's within Bullet "limitations".

EDIT, here i quick VPR test. Deformation keep is now maintained OK-ish (still not looking like metal) but i can't seem to stop "car" to deflate like it's big balloon :).

04-12-2013, 09:09 AM
I only spent a few minutes fooling with this but I think the sinking in this case is due to the fact the the block is modeled as a solid object, so forces will pretty much run through it's entire mass. If you really want it to dent, the object will need to be hollowed out and have a surface like sheet metal--this should cause it to buckle without affecting areas farther away from the impact point. In other words, the object's structure is very important for the type of physical response you want. That doesn't necessarily mean it needs to be realistically modeled either--in fact, that could work against you. Much like a character, it needs to be modeled to deform the way you want it to deform.

For detailed damage, it needs to be subdivided a bit more, otherwise, you'll get odd render artifacts. Adding damage textures would help sell the effect--you could do this with animated textures or, even better, do it procedurally using the old Acid shader from Worley or one of the DP shaders.

Anyway, I still think this effect is entirely possible with a little more planning and thought than I put into this demo. Just a few thoughts anyway. Hope this helps.


04-12-2013, 12:02 PM
I did something similar with just morphs in the car collisions in one of my videos, but it's laborious.

04-12-2013, 12:06 PM
old cloth fx, seemed good for that, but it might now be that easy to work in conjunction with bullet dynamics.


04-12-2013, 12:49 PM
What was that old stress map thing in the 9.X cycle?

04-12-2013, 04:29 PM
Been trying again today but we're still far from that http://vimeo.com/49321396
There is no way to control elasticity.

04-12-2013, 05:37 PM
Yeah, I gave it a few gos but I don't see anyway to achieve denting in a deforming body without the deflating or rubbery look to it.

04-12-2013, 06:01 PM
If we had a way to control elasticity, we would just set it up to none so when it hits something od is hit by something, it just deforms without Jell-o effect or rebound or deflating

04-12-2013, 06:29 PM
If we had a way to control elasticity, we would just set it up to none so when it hits something od is hit by something, it just deforms without Jell-o effect or rebound or deflating

I just tested...took me around 10 minutes to set it up...I think you guys need to use the given mass specificaton of given mass, not density...
try a low 1.0 shape retention or 0.
experiment with linear and angular stiffness, try zero values etc..
keep the others at 100%

recommended might be to subdivide,metaform the object the most before toggle to subpatch, or not using it, if used as subpatch you of course need to set it to last or after displacement, without
subpatch thatīs not necessary and will give some interesting results.
I also thickened the object to be dented.

canīt post today, maybe tomorrow..only semi decent right now.


04-13-2013, 02:22 AM
I also thickened the object to be dented.


Looking forward to your results but thickening the complete car mesh would be such waste of polycount and hard task to do (on real project not on thes etests we are doing here) and computation woudl take forever since as soon as oyu set static/right object bullet goes to SinGleThreaded calulations :(. Sometime if is only SoftBody then it's multithreaded but if harbody is set to any mesh then it's all back to singleThread i.e. slow :(. Ther eis trick of using subtbody (deformation mode) for all meshes and clalulate that way to speedup but is there a way how to make gorund cube "static" if is softbody bullet ?

04-13-2013, 08:02 AM
still not what you would want really..heres a few samples, I mentioned setting it to given mass..but that might not be it..
I pulled down shape retention to 0, I think you would have to paint a weightmap for it to be correct, not sure..but that would be not so useful since you shouldnīt
have to decide exactly where and how the collision needs to hit the deform body.

Anyway try the deform_linearTexture first...I put a texture on the linear stiffness, and also a litttle stronger like 200 % but be carful to raise that more..that texture slows down the whole thing, but
gives some crumpling effect.

Also..try turn off subpatch...and use first level in deform tab..and check difference.

Maybe some of you can enhance it.