realistic car collisions
Hi using DirectX and c++ i am making a car game the problem that i am having is trying to make thhe collisions look realistic when the car hits the walls (blocks that make up the walls) at the moment i just have the car negating the velocity so it bounces back off the wall
pCar->vVelocity = -pCar->vVelocity;
so how couuld i make it more realistic?
I can advise you to try existing physics engines, like PhysX,Newton,ODE and so on. They have good implementations for differen vehicle types. Reinventing the wheel is out nowadays.
theres all sorts of stuff you could do:
1) Sparks flying from car grinding on wall - google "particle engine" or equivelant.
2) Deform your model by that i mean when the car hits the wall dent the car and the wall either with a displacement map shader(GPU intensive) or by accessing the vertex buffer of the objects and manipulating them directly (CPU intensive).
3) Use decals which are basically relativly small textures of scuff,dirt and damage, and place these decals on your car at the point of impact.
4) rather than just reflecting your car off the wall try and implement true physics systems such as inertia,momentum,force,acceleration,velocity,friction etc.
well theres a few suggestions. Get googling and get some books from the library and hopefully you will get a nice little demo/game going. Addison wesley have a real time physics engine book that might help you out but don't qoute me on that.
good luck,
fanatic.
1) Sparks flying from car grinding on wall - google "particle engine" or equivelant.
2) Deform your model by that i mean when the car hits the wall dent the car and the wall either with a displacement map shader(GPU intensive) or by accessing the vertex buffer of the objects and manipulating them directly (CPU intensive).
3) Use decals which are basically relativly small textures of scuff,dirt and damage, and place these decals on your car at the point of impact.
4) rather than just reflecting your car off the wall try and implement true physics systems such as inertia,momentum,force,acceleration,velocity,friction etc.
well theres a few suggestions. Get googling and get some books from the library and hopefully you will get a nice little demo/game going. Addison wesley have a real time physics engine book that might help you out but don't qoute me on that.
good luck,
fanatic.
Quote:Original post by Prog101
Yeah a Rochdale lad hehe i am from rochdale too
cool, small world lol.
You might want to pore over this Gamasutra article on collision response to get a quick overview of the problems and potential solutions.
Chris Hecker's rigid body page has a lot of stuff that's useful, too.
Chris Hecker's rigid body page has a lot of stuff that's useful, too.
I'd wrap an existing physics SDK in your own physics interface classes and use them. This method gives you a great deal of flexibility. If you want to change SDKs, you can do it quickly and easily just by changing the physics classes which wrap it. Done properly, you won't need to change any other code. You could also write your own physics simulator in the physics classes, if you really wanted to.
I'd suggest PhysX.
I'd suggest PhysX.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement