Amazing Curves Racing: Real-time interactive car setup

Post Reply
John Schultz
Posts: 23
Joined: Sat Aug 06, 2005 7:48 am
Contact:

Amazing Curves Racing: Real-time interactive car setup

Post by John Schultz »

Adjust all major suspension, tire, engine, mass, and aerodynamic settings in real-time, interactively (including during online network play):
http://www.brightland.com/ac/ (Beta 1.04)

Image
http://www.brightland.com/ac/AC_IS800.jpg

What?s New in Version 1.04

Physics

* Improved tire model.
* Multibody wheel simulation.
* Added Force Feedback support: real-time interactive adjustments.
* Improved limited slip differential.
* Real-time, interactive car setup including springs, dampers (compression and rebound), swaybars, chassis weight, wheel weight, unsprung weight, tires, mass distribution, aerodynamics including front and rear wings (angle, area, and efficiency), computed using CFD, frontal area, CD, engine torque, engine rotating mass, brake bias, etc.
* Networked physics optimizations.

Graphics + Gameplay

* Four car setups: two street car (softer, heavier) and two race car (stiffer, lighter) setups (400 and 622 HP @ 5252 RPM).
* Resetting onto track ghosts player car for a few seconds, preventing collisions with other cars. If the car materializes inside another car, is gracefully handled by physics system.
* Surface properties for varying traction and roughness, felt through the steering wheel with force feedback.
* Improved Driving Aid: Tip Over Prevention. Even with a very hard crash which should result in a flip, physical result looks plausible; the car ?realistically? does not tip over.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post by Erwin Coumans »

Hi John,

This realtime-tuning looks really great, I will check it out again.

I'm also interested in your patch-collision detection. Are they bezier-patches? It would be great to extend COLLADA physics with such primitives. Do you have description of your curve/patch data?

There is support in Bullet for triangle-generation-on-the-fly, which could be used for a collision detection implementation.

Thanks,
Erwin
John Schultz
Posts: 23
Joined: Sat Aug 06, 2005 7:48 am
Contact:

Post by John Schultz »

Erwin Coumans wrote:Hi John,

This realtime-tuning looks really great, I will check it out again.

I'm also interested in your patch-collision detection. Are they bezier-patches? It would be great to extend COLLADA physics with such primitives. Do you have description of your curve/patch data?

There is support in Bullet for triangle-generation-on-the-fly, which could be used for a collision detection implementation.

Thanks,
Erwin
Hi Erwin,

The patches are bicubic Beziers, exported directly from 3DSMax. Any bicubic patch can be supported: Bezier, b-spline, tensed b-spline, Catmull-Rom, tau-spline, beta-spline, cardinal-spline, Hermite, etc. In practice I have only used Bezier, Catmull-Rom, and b-spline. Bezier is very useful in that you can have sharp edges as well as smooth edges between patches. It's also common to convert NURBS to Beziers with good accuracy (for time consuming ops, then convert back to NURBS). Thus, a NURBS model can be converted to an equivalent Bezier model. While working on a project with http://npowersoftware.com/, Gary (lead dev) exposed some code to allow their NURBS patches to be converted to bicubic Bezier patches for direct use and export from 3DSMax. It would take a little bit of work to be more useful for game/sim work, but it was very cool to be able to take a quickly created NURBS surface, convert to Max bicubic Bezier, then export and interact with in real-time with the driving sim.

As far as data format, bicubic patches are 4x4 matrices (16 floats) per data channel. For Vec3's (geometry), it's 4x4x3 (x,y,z), texture coords, Vec2's, 4x4x2, and if desired, normals as 4x4x3 (perhaps to match Max's smoothing groups). Any data channel can be interpolated by the bicubic patch, though normals would have to be renormalized. For Amazing Curves Racing, the normals are computed from the patch surface (compute tangent, bi-tangent, cross, normalize, etc.). I also support general curves (track, objects), as well as so-called 'non-parametric' (NP) surfaces, which must be aligned to a regular grid (terrain only, limited use). NP surfaces allow fast terrain collisions (really just compute height; a full ray-patch intersection would still be complicated).

I am aware of the following methods for ray-patch collisions:

1. Tessellation to triangles. Works fine, as can be integrated into existing systems easily. However, unless fine tessellation, won't get full benefit of curved surface smoothness (very useful for driving sims).
2. For Bezier only, de Casteljau subdivision. Easy to implement, elegant, but slow.
3. For Bezier only, Bezier Clipping: clips away and computes new sub-Beziers (final step does a more direct computation). Not clear how fast this would be for real-time usage (perhaps useful for a generalized HW implementation).
4. Newton iteration with good initial guess (used in ACR). Requires extra data structures and various tricks (caching, etc.), but so far works fast enough for 64 cars for an online simulation (effectively 128 cars) on P4 3.2 or faster (50-100 FPS). IIRC, typically takes just 1 iteration to get a good answer, though for a miss, will iterate a few times before giving up. Initial root finding setup is somewhat expensive. Could probably use more optimization (currently all in C++, no fancy alignment, no asm, etc.).
Post Reply