PDA

View Full Version : flipping a car with bullet problems

vonpietro
05-24-2014, 10:59 AM
Hi,

I'm working on a 3d car that i'm trying to flip using bullet. Although hand animating it is probably what i'll settle for now until i figure out bullet better.

I use a force to hit the car, which is about 15 layers including wheels and bumper and and windshield, ect.
the result however is that the entire car looses cohesion and every separate layer bounces away.
is there a way to make all the layers stick together? or to limit the amount of motion of each layer in bullet? say only allowing the wheels to move up or down a certain distance?
or a way to keep all the layers from "bouncing" away. Keep the windshield in place more or less. I realize just putting it all in one layer works, however if i use parts, similar problem. Maybe merging points might help. I'd like to keep separate layers

similarly, if i wanted to hit the car with a small force, and only have it move a couple of feet how would i do that without the entire model disintegrating into bouncy pieces that float away.

i've seen people use glue with multipart turned on, and someone did a column example that showed a force breaking a specific part of the column,
again, i tried blowing a column apart, and as soon as my physics reacted ball hits my column, the entire thing shatters, instead of just the small area.
forget about doing bullet dings with stuff shattering off. Although i think thats possible with glue set really high, it seems really tricky.

I also tried a cylinder within an cylinder experiment, it seems that the inside cylinder disintegrates because the outside cylinder activates it "when hit" again the entire thing breaks apart - lets call it the glass jaw effect, becuase you just tap it and the entire thing just breaks into pieces.

on a separete note, is it possible to use a low poly obj for the bullet calculations and swap in a high res obj after it figures out the math?

Ryan Roye
05-24-2014, 11:18 AM
My suggestion would be to use a null which has a collision radius or proxy mesh in the approximate shape of the entire car, flip that over using bullet, and then use same as item constraints, pairing the topmost parent of the real car with the proxy one. This results in not only a faster simulation, but will also keep your car put together without having to do anything complicated with bullet. You can bake the motion of only the keyframes in which the real car is following the proxy one to re-gain manual control over the vehicle at any time... I suggest mentalfish motion baker to do this as native Lightwave has few viable options for baking.

As for choreographing things breaking apart, that's kind of trial and error. There are a few things you do do to visualize settings however... for instance, if you want to see how your procedural texture is applying to the glue property, you can place a temporary surface on your model, size/adjust it how you like, and then copy/paste that into the glue property texture (You need openGL enabled to see this however).

Keep in mind that how well things stay together (for choreographed breakage) is very strongly dependent on your frames-per-second setting. That glue property may work great at 180 fps , but at 40 fps it'll break apart as if it were never glued at all.