Vehicle demo

Show what you made with Bullet Physics SDK: Games, Demos, Integrations with a graphics engine, modeler or any other application
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Vehicle demo

Post by mi076 »

Thank you. In fact, i haven't uploaded source distribution for a long time, i shall do again soon, have rewritten many parts, specially graphics...
John1789
Posts: 15
Joined: Fri Sep 02, 2011 11:54 am

Re: Vehicle demo

Post by John1789 »

mi076 wrote:Thank you. In fact, i haven't uploaded source distribution for a long time, i shall do again soon, have rewritten many parts, specially graphics...
but i am not able to get the earlier ones.....can you please give me the link ?
If you can mail me at clark.john1789@gmail.com, it would be of great help.
Thanks.
John1789
Posts: 15
Joined: Fri Sep 02, 2011 11:54 am

Re: Vehicle demo

Post by John1789 »

Hi mi076,
i get your source code, do you have any documentation for this code as its a big one.
actually i need only the car physics part as i am using my own rendering engine, can you tell me which files are specifically only for the car physics that i can use in my rendering engine.
Thanks in advance.
curoro
Posts: 9
Joined: Mon Jul 25, 2011 1:21 am

Re: Vehicle demo

Post by curoro »

:shock: :shock: :shock: hai, can you share your source code vehicle bullet demo please :shock: :shock: :shock:
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Vehicle demo

Post by mi076 »

vehicle is here:
http://code.google.com/p/game-ws/source ... cast_car.h
http://code.google.com/p/game-ws/source ... st_car.cpp
it is based on Bullet's class... + there is some engine stuff .. and it is "work in progress", friction/sliding is commented out, i hope i'll get it ready one day :) ... You can look for some advices about friction model in the document mentioned in Bullet's documentation (PDF file) in section about vehicle..
John1789
Posts: 15
Joined: Fri Sep 02, 2011 11:54 am

Re: Vehicle demo

Post by John1789 »

Hey Nice work done....
Can you please help me to sort out some stuff.
Are you using the collision detection and response from the bullet engine or you are using your custom detection technique and responses. If yes then how you connect the bullet physics part with your detection and responses.
Thanks in advance.
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Vehicle demo

Post by mi076 »

Are you using the collision detection and response from the bullet engine or you are using your custom detection technique and responses.
nothing special, collision detection is from Bullet...
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Vehicle demo

Post by mi076 »

uploaded source distribution for Visual Studio C++ 2010, all dependencies are included. Solution file is in "build/vs10" folder. Executable goes into "release" folder. If something doesn't work or if someone need Linux build, please let me know..

http://code.google.com/p/game-ws/downloads/list


+++++++++++++++++++++++++
short introduction:
in "src" folder:
-----
appconfig.h, main.cpp, application.h/.cpp :
configuration, initialization, loop, input (SDL),
optional CEGUI (can be completely removed with singe #define)
-----
camera.h/.cpp : SSE vectormath standalone camera
----
engine_core.h, mesh.h :basic structures
cgshaders.h/.cpp : cgfx shaders setup
(s. shaders in "release/shaders" folder)
scene.cpp/.h,scene_utils.h : scene prototype and utils
----
raycast_car.cpp/.h - raycast vehicle class (standalone)
----
level3.h/.cpp : setup and run scene
level3_dcallbacks.h :scene display functions
----
no old style fixed function OpenGL at all (except inside CEGUI).
TODO: DirectX port and finish vehicle model stuff (friction).
John1789
Posts: 15
Joined: Fri Sep 02, 2011 11:54 am

Re: Vehicle demo

Post by John1789 »

hi ,
i am trying to implement your code in my rendering engine, as i am new to bullet i need some help.

Firstly i want to know if i want to add collision response of my own, which bullet class should i refer and what parameters of vehicle physics should i focus?

Thanks in advance.
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Vehicle demo

Post by mi076 »

i am trying to implement your code in my rendering engine, as i am new to bullet i need some help.

Firstly i want to know if i want to add collision response of my own, which bullet class should i refer and what parameters of vehicle physics should i focus?
not 100% sure what do you mean with own collision response, but in particular case everything is in vehicle class - collision tests, calculations, applied forces. If you wish use Bullet and raycast vehicle, probably the best way is to start with "official" vehicle demo, to see minimal setup, read Bullet's raycast vehicle classes... All the knowledge will be applicable for my version of raycast vehicle... Probably i shall describe it little later, but now it is still work in progress. BTW, additions, corrections are welcome.
John1789
Posts: 15
Joined: Fri Sep 02, 2011 11:54 am

Re: Vehicle demo

Post by John1789 »

mi076 wrote: not 100% sure what do you mean with own collision response
It means, suppose car collide with a vertical collider (like a wall) then according to physics its response is nice but for a proper game play its not seems good that the car over turns and lost user handling, at least it should not flip in the air any time.
John1789
Posts: 15
Joined: Fri Sep 02, 2011 11:54 am

Re: Vehicle demo

Post by John1789 »

Hey, why you commented the sliding code... is there are some issue with it or it's not completed?
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Vehicle demo

Post by mi076 »

It means, suppose car collide with a vertical collider (like a wall) then according to physics its response is nice but for a proper game play its not seems good that the car over turns and lost user handling, at least it should not flip in the air any time.
you may try to adjust restitution or chassis rigid body(try both with and without "split impulse") or make some custom solution http://bulletphysics.org/mediawiki-1.5. ... d_Triggers. Probably you will need it sooner or later for some effects (sound, smoke).
Hey, why you commented the sliding code... is there are some issue with it or it's not completed?
it is not a final version, it is work in progress
John1789
Posts: 15
Joined: Fri Sep 02, 2011 11:54 am

Re: Vehicle demo

Post by John1789 »

mi076 wrote:you may try to adjust restitution or chassis rigid body(try both with and without "split impulse")
How can i modify "split impulse"?
or make some custom solution
Are you using any custom collision response in your code? as i am new to bullet i am not able to find any example regarding this.

EDIT:: i tried with and without split impulse but not useful.(making restitution 0 for all cases).
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Vehicle demo

Post by mi076 »

EDIT:: i tried with and without split impulse but not useful.(making restitution 0 for all cases).
i have uploaded new version, i have tried to address the issue and there are 2 callbacks: "contact added callback" sets
motions to 0, combined restitution to 0... and "contact processed callback" damps velocities a little... The last one is
most effective... i also don't see side effects now (BTW, they can be disabled if comment #define USE_CAR_CALLBACKS at the beginning of level3.cpp file)

http://code.google.com/p/game-ws/source ... st_car.cpp
http://code.google.com/p/game-ws/source ... cast_car.h

svn checkout http://game-ws.googlecode.com/svn/branches/cardemo cardemo
(Visual Studio C++ 2010)


EDIT: BTW. about restitution issues... playing with restitution (without callbacks) also try increase simulation frequence and/or solver iteration and/or set solver "error reducing parameter" lower (caution with the last, objects can sink).... try split impulse option
Last edited by mi076 on Wed Oct 12, 2011 9:00 pm, edited 1 time in total.
Post Reply