Real-time deformation

Hello!
Im trying to make real time car deformation using Lattice. Well painting with Weight brush everything looks good, but i just cant figure it out how to make same thing in game. for example driving the car into wall.
…maybe sumthin similar as Vertex paint script… im hell bad in scriptin. please help :confused:

http://img97.imageshack.us/img97/2305/picture1zs6.jpg
http://img166.imageshack.us/img166/1214/picture2zx3.jpg

Lattice do not work in the game engine.

You could apply an armature to the cars hull to animate the crash. Differnet bones can be used for different parts of the mesh.

You could build the cars hull out of different objects. With the replace mesh actuator you can then replace the good mesh with the damage mesh.

I hope this helps

Thanks! Well then… ill try with armatures. Oh, and… does weight painting works in game engine? If not, there is no use of armatures.

Yes, weight painting works. You can also manually assign vertices to the different bone groups.

Lattices and weight painting are entirely unrelated, if I’m not mistaken.

But weights are related to armatures.

… is there a way to paint weights in game - real-time… from blue(no deform) to red (max deform)?

I don’t think so, but you could have the car broken into seperate parts (hood, sides, roof, bumpers, etc.) and have a deformation animation for each part, which plays when that part detects a collision (did that make sense?)

Yep! done already. well, it doesnt look like crash simulation, but i think it is better than replace mesh thing…
Ill post .blend file soon… just need to add some sparks and other stuff to make it more realistic

If u work on it, animated crasches with collisiondectors, it can be very cool…
whatever… if u got a nice way to make a crashable cargame, I wanna know the how u do it… I´m very intresting to make a driver-likegame in blender some day…
Also, if anybody know a good tutorial of making the physics, tireanimation än stuff look and act real. I wanna know…

here is the link to .blend file
car has no wheels :slight_smile:
“driving” with arrow keys
there are 5 step deformation for each part of car… had to use Ray Sensors instead of collision.
Have fun

ok… some screens here

http://img215.imageshack.us/img215/7599/1am0.jpg

http://img215.imageshack.us/img215/9849/2pq0.jpg

http://img300.imageshack.us/img300/4919/3qg0.jpg

http://img215.imageshack.us/img215/2452/4re9.jpg

Is that damage location based? (can’t DL it now)

martinsh,

this looks cool. I don’t want to sit in this car.
I think the glas should brake somehow. Maby with a replace mesh? So you get the well known spider webs. Don’t worry about animation. Normally you wouldn’t see glas brake. It is just to fast.

Keep up the good work.

yeah looking good!

hi martinsh,

couldn’t download your blend… get a 404 error…

ok ill host it somewhere else… yah im lazy to make wheels and glass smash… here i just experimanted with deformation.
ok try here http://www.filefactory.com/file/2e1a42/

martinsh

thanks for hosting it elsewere… but

forgive me for being dense… trying to play hunt for the dowload link of that file hosting site… um I couldn’t see one anywhere??

ya… it takes time :slight_smile:
hosted here
http://www.filelodge.com/files/room50/1446322/car_deformtest.blendhttp://www.filelodge.com/files/room50/1446322/car_deformtest.blend
http://www.filelodge.com/files/room50/1446322/car_deformtest.blend

it’s quite fun even with no wheels. I was playing with it for a while before i suddenly realised that you got the car to slide :smiley: But perhaps that’s just because there are no wheels. Either way, nice work so far.

Is there a way to reset the damage? When i exit the game mode and re-enter it, the car retains the damage it had before.