Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smooth road surfaces
10-20-2011, 09:11 AM,
Smooth road surfaces
I've made some progress integrating another somewhat older patch. For anyone interested check out:

The idea is to interpolate track mesh geometry to get a smooth surface using cubic interpolation for contact position and quadratic interpolation for the normal derived from triangle mesh vertex and normal data.

The code in the fork is already using this interpolation overriding road patch values. When finished this would make road patch interpolation and hopefully road tracing obsolete. A track could be defined as a list of road meshes(segments).

At the moment code is used for wheel rays only. Car collision shape and especially car wheel cylinders are still colliding with non-smoothed geometry leading to collision artifacts.
Tracks might have to be checked for broken/skewed normals. I've already run into one on ruudskogen.

I've added some code to visualize triangle control points edges and normals(left front wheel):
[Image: 52379630.jpg]
[Image: 87386285.jpg]
10-22-2011, 01:50 PM,
Re: Smooth road surfaces
NaN Wrote:Car collision shape and especially car wheel cylinders are still colliding with non-smoothed geometry leading to collision artifacts.

Isn't that also an issue with the code in master? (traced splines for wheel ray, plain geometry for collision shape)
10-22-2011, 01:57 PM,
Only with damage enabled. The default shape in master is a rounded box without extra wheel shapes.

Edit: The car will bottom out in the worst case(large bump amplitude for example).
12-17-2011, 08:11 PM,
I've implemented code to interpolate track mesh geometry for all contacts (contact callback). The contact depth and normal are corrected. It works under ideal conditions and would even make wheel shapes possible instead of rays. But it breaks under testing with vdrift tracks. Atm I don't think it is fixable without writing a custom mesh collision algorithm(bullet is using gjk here), which would be a larger undertaking.

What does it mean? No fracture functionality as it requires complex collision shapes that require smooth contact surfaces...

Testing contact correction, f1 complex collision shape:
[Image: vdrift.jpg]
12-17-2011, 08:33 PM,
I possible hack/workaround could be to stick with the current system but use a large shape margin to keep it from surface. Wheel collision cylinder radius = wheel radius - 0.1 or something. The problem is of course to get the margin right.
12-22-2011, 06:05 PM,
Alternatively contact correction could be constrained to road meshes only(right now all mesh contacts are processed). Their vertex normals should be sane enough(don't deviate too much from triangle normal) to be usable.
12-22-2011, 11:35 PM,
You could do both: use contact correction for road meshes, AND do a slight offset for the wheel fracture meshes.

Also, how do I turn on your cool visualization mode?
12-23-2011, 07:43 PM,
I've pushed the debug drawer into master, enabled damage again. Parameters are -drawaabbs, -drawshapes and -drawcontacts.
12-31-2011, 04:12 PM,
Cool! I pushed a fix to make line drawing work with the gl3 renderer.
02-13-2012, 05:46 AM,
I was attempting to draw text using TextRenderer as per the TextRenderer Javadoc. I'm using a GLCanvas with a GL3 context. joevenzon, could you tell how you make line drawing work with the gl3 renderer?
02-15-2012, 01:09 AM,
VDrift's gl3 renderer is something I wrote that wraps the OpenGL 3.3 API. The OpenGL spec is pretty easy to read, and describes how to do line rasterization:

... but it sounds like you might be talking about something written in Java, which I know nothing about.

Forum Jump:

Users browsing this thread: 1 Guest(s)