Forums

Full Version: hi all... some little questions..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi!
I'm looking the code to help you in this project...
i have only a few of question...

* I'm using visual studio 2005... does anybody can help me to build vdrift in visual studio?

* in the source there's bullet engine and vamos... what is made with bullet and what is made with vamos?

* I read the wiky in the track section.. but the informations about the road.trk are different... (i'm interested about the collision of the track!

thanks in advance and I hope to be helpful
Hello,

ghiboz Wrote:* in the source there's bullet engine and vamos... what is made with bullet and what is made with vamos?

Bullet is used for ray/trimesh and box/trimesh collision detection only. Vamos handles all of the actual physics (responses to collisions, car simulation, etc). Note that I'm currently rewriting VDrift and replacing Vamos with a custom engine (but it will probably be similar to vamos, since I'm using it as a reference).

Quote:* I read the wiky in the track section.. but the informations about the road.trk are different... (i'm interested about the collision of the track!

I've updated the wiki with better info (thanks to rookie1 for the nice write-up in an earlier forum post):
http://wiki.vdrift.net/Track_files_and_f...#roads.trk

Collision of a wheel with the track is a three step process:
* 1) shoot a ray down from the wheel and see if it collides with the road (the actual driving surface)
* if not, 2) shoot a ray down from the wheel and see if it collides with the other track objects (such as grassy ground, etc)
* if there was a collision in 1) or 2), then 3) find the properties of the surface and add an offset based on the bumpiness of the surface

Step 1 is done separately from step 2 because we use the roads.trk file to generate bezier patches, which will be smoother than using the raw geometry. Step 1 was directly colliding the rays with the bezier geometry, but now it generates a highly tessellated piece of road geometry (trimesh) and then uses bullet to do a ray/trimesh collision. I changed this originally because I was worried about bugs/performance issues with my ray/bezier collision routine, but I think I might change it back to the direct ray/bezier collision method for the refactor (and just tweak my ray/bezier collision code). If you can provide any help in this area that'd be super. The best function I came up with was in src/bezier.cpp function BEZIER::CollideSubDivQuadSimpleNorm. This function, from what I remember, does an iterative subdivide of the bezier patch using ray/quad collisions for approximation until it subdivides past some threshold depth.

Step 2 is simple ray/trimesh collision using bullet.