Vehicle demo

Show what you made with Bullet Physics SDK: Games, Demos, Integrations with a graphics engine, modeler or any other application
anshul.bhardwaj
Posts: 28
Joined: Mon Aug 29, 2011 11:02 am

Re: Vehicle demo

Post by anshul.bhardwaj »

Hi,
Do you have any documentation how to make car skid, if i want to implement in your code.
Thanks.
rocksvick
Posts: 5
Joined: Mon Aug 29, 2011 9:56 am

Re: Vehicle demo

Post by rocksvick »

Hello

i am working on opengl ES 2.0
i wanna implement dynamic shadows, the way you have implemented in vehicle demo of car.
can you tell me how you have implemented that and where is code of shadow in your project.

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

Re: Vehicle demo

Post by mi076 »

anshul.bhardwaj wrote:Hi,
Do you have any documentation how to make car skid, if i want to implement in your code.
Thanks.
if you want very exact simulation - look for "Pacejka magic formulas"... They are based on works of Prof, Pacejka from Delft. You can look at implementation by racer.nl There is also standalone prog pacejka.exe... and documentation..
i can only share one article i found somewhere free (s. attach.)... There are also good books about vehicle dynamics (Genta, Jazar, for example).
rocksvick wrote: can you tell me how you have implemented that and where is code of shadow in your project.
Step by step tutorial were rather big... there are many such tuturials already.. it is common technique.. http://en.wikipedia.org/wiki/Shadow_mapping I render the scene from "light position" into depth FBO...
FBO setup is in shadow.h/cpp..
http://code.google.com/p/game-ws/source ... c/shadow.h
http://code.google.com/p/game-ws/source ... shadow.cpp
Most important are correct matrices (all required functions are in camera.h/cpp) ...
http://code.google.com/p/game-ws/source ... c/camera.h
http://code.google.com/p/game-ws/source ... camera.cpp
you can use depth texture and matrix in your shaders.. look in "release/shaders".
This way you will get correct hard shadow and can start reading tons of articles and books how to make them soft

Edit: branch in the above link is currently not updated..
Attachments
VehicleDynamicsForRacingGames.pdf.zip
(291.49 KiB) Downloaded 1235 times
Last edited by mi076 on Thu Nov 17, 2011 2:34 am, edited 1 time in total.
anshul.bhardwaj
Posts: 28
Joined: Mon Aug 29, 2011 11:02 am

Re: Vehicle demo

Post by anshul.bhardwaj »

Hi,

i tried your code to implement the car vehicle , i just print the rpm value of the car in console and get the following output...

Code: Select all

SPEED OF THE CAR IN KMP IS   1.68888e-05  Engine rpm  1000
SPEED OF THE CAR IN KMP IS   1.68813e-05  Engine rpm  1000
SPEED OF THE CAR IN KMP IS   1.68669e-05  Engine rpm  1000
SPEED OF THE CAR IN KMP IS   1.68739e-05  Engine rpm  1000
SPEED OF THE CAR IN KMP IS   1.6881e-05  Engine rpm  1000
SPEED OF THE CAR IN KMP IS   2.13038  Engine rpm  1723.33
SPEED OF THE CAR IN KMP IS   3.86292  Engine rpm  2313.06
SPEED OF THE CAR IN KMP IS   5.62519  Engine rpm  2912.81
contact added callback
contact added callback
contact added callback
contact added callback
SPEED OF THE CAR IN KMP IS   6.8861  Engine rpm  3369.29
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
SPEED OF THE CAR IN KMP IS   8.51088  Engine rpm  3986.98
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
SPEED OF THE CAR IN KMP IS   10.1253  Engine rpm  4614.39
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
SPEED OF THE CAR IN KMP IS   11.7242  Engine rpm  5249.72
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
SPEED OF THE CAR IN KMP IS   13.6505  Engine rpm  6037.59
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
SPEED OF THE CAR IN KMP IS   15.1059  Engine rpm  6652.91
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
SPEED OF THE CAR IN KMP IS   16.4686  Engine rpm  7000
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
contact added callback
SPEED OF THE CAR IN KMP IS   17.4582  Engine rpm  7000
contact added callback
contact added callback
contact added callback
contact added callback
SPEED OF THE CAR IN KMP IS   18.9738  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   20.2722  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   21.5703  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   22.8679  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   24.165  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   25.4616  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   26.7577  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   28.0532  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   29.3482  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   30.6425  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   31.9361  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   33.2291  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   34.9521  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   36.2434  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   37.1038  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   37.9639  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   39.2534  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   40.1126  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   40.542  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   41.4006  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   41.8298  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   42.2588  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   42.6878  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   43.1166  Engine rpm  7000
SPEED OF THE CAR IN KMP IS   43.5453  Engine rpm  7000
FYI: "contact added callback" is called when my car collider body collides with the ground.(it happens when car just start from rest position in first gear"

Can you please explain why this engine rpm is behaving like this?
Is this the same way your car rpm goes in your code? OR i am doing something wrong while initializing the bullet physics?
Thanks in advance.
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Vehicle demo

Post by mi076 »

ok, here the callback was called (chassis touched the ground), so kmh and rpm must not be consistent ... i am not sure about callback... you can disable it.. but looks somehow wrong
check engine acceleration ("inertia" parameter).
all in one the driveline should not be a problem .. most important is cornering...
rocksvick
Posts: 5
Joined: Mon Aug 29, 2011 9:56 am

Re: Vehicle demo

Post by rocksvick »

thanks a ton for the reply .
your demo is quite helpful .
anshul.bhardwaj
Posts: 28
Joined: Mon Aug 29, 2011 11:02 am

Re: Vehicle demo

Post by anshul.bhardwaj »

mi076 wrote: all in one the driveline should not be a problem .. most important is cornering...
have you implement both, low speed and high speed cornering ?
sankalp
Posts: 6
Joined: Tue Nov 08, 2011 10:50 am

Re: Vehicle demo

Post by sankalp »

i implemented bullet physics for a car ...now i want to implement same physics for a another car in same project...so please give me idea that how i do it....???
thanks in advance....
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Vehicle demo

Post by mi076 »

@rocksvick
thanks

@anshul.bhardwaj
no, i haven't, side forces are are still calculated with constraint... i have reorganised the framework, i use it for another projects. There is no SDL, CEGUI, less STL code (almost no in core structures) now. I aslo link png and zlib statically,
and moved both into solution, Generally app depends on Windows only on Cg dlls and VC 2010 runtime.
I shall put linux version too... it should work with all current distrubitions..

thanks for all responces and downloads,,, please don't forget it is work in progress
Ankita
Posts: 1
Joined: Thu Jan 19, 2012 9:18 am

Re: Vehicle demo

Post by Ankita »

Hi,
I am looking for the shaders implemented in your code for shadow mapping but unable to find it.Can u please let me know where is it specifically?

Thanx in advance.
686insomnia686
Posts: 8
Joined: Mon Apr 02, 2012 10:15 am

Re: Vehicle demo

Post by 686insomnia686 »

Hi,
I'm trying to make a race car game with Bullet.
My parameters are wrong, so I need to see yours for check mines.
But I can't acces to your google code

("403. That's an error. Your client does not have permission to get URL /p/game-ws/ from this server. That's all we know. ")

and Tortoise SVN ask me a Login and a password...

Can you share me your source with an uploader site like "mediafire"?
or on my mail : skull___666@hotmail.com
Thank you for your help,
Good continuation.

InSomNia
686insomnia686
Posts: 8
Joined: Mon Apr 02, 2012 10:15 am

Re: Vehicle demo

Post by 686insomnia686 »

COME ON GUYS, USE YOUR BRAIN & YOUR HANDs, UPLOAD THE SOURCE CODE!
OR JUST THE EXE, IT'S FINE TOO ME!
German
Posts: 2
Joined: Tue Jul 24, 2012 7:01 am

Re: Vehicle demo

Post by German »

Dear guys

Please, upload source file
gtafan
Posts: 14
Joined: Tue Jul 16, 2013 2:57 pm

Re: Vehicle demo

Post by gtafan »

The link is dead. :(
Mario Ruiz Perez
Posts: 4
Joined: Tue Oct 22, 2013 1:04 pm

Re: Vehicle demo

Post by Mario Ruiz Perez »

gtafan wrote:
The link is dead. :(
Sorry, you could get the code example? Because, I need that me too
Post Reply