Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hi all... some little questions..
07-03-2008, 10:24 AM,
Re: hi all... some little questions..

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):

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.

Messages In This Thread
hi all... some little questions.. - by ghiboz - 07-02-2008, 02:36 AM
Re: hi all... some little questions.. - by joevenzon_phpbb2_import3 - 07-03-2008, 10:24 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)