Page 1 of 1

Smooth road surfaces (dev idea)

PostPosted: 22 Dec 2011, 02:06
by charlie
Over at VDrift, they are implementing automatic smooth road surfaces:
http://vdrift.net/Forum/viewtopic.php?t=1677

"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."

This feature would make a lot of tracks nicer to drive on as you wouldn't have the sudden changes in track slope angle as you pass over segment boundaries.

Just a thought.

Re: Smooth road surfaces (dev idea)

PostPosted: 22 Dec 2011, 03:39
by Auria
Hi charlie,

this is a feature we are aware of, and it's actually already implemented and the results were mostly great; but the walls then become problematic. This means that if you drive near a wall your kart will topple over because the normal of the quad you're driving on is interpolated to that of the wall. Solutions to this exist but more work is required to get there

Re: Smooth road surfaces (dev idea)

PostPosted: 22 Dec 2011, 05:33
by hiker
Hi,

charlie {l Wrote}:"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."

This feature would make a lot of tracks nicer to drive on as you wouldn't have the sudden changes in track slope angle as you pass over segment boundaries.

Just to be a bit more precise: we have the option to interpolate the normals, but not the position. And as auria has written, this works fine for some tracks, but tracks where the actual road and a border (wall, fence, ...) share a vertex, the normals can not be used. This could of course be fixed in the tracks, but is quite a bit of work (and makes the task for track designer even more complicated).

We have also thought about fixing this, e.g. by discarding triangles that are too step and then recomputing all normals (so walls etc. would be discarded), but that's not trivial either. Since the impact of the interpolation was (so far) not that great, we have for now stopped working on that (but I will revisit this as part of my current work on the physics).

Thanks a lot for thinking of STK :)
Joerg

Re: Smooth road surfaces (dev idea)

PostPosted: 22 Dec 2011, 20:03
by cheesebrother
Just to be a bit more precise: we have the option to interpolate the normals, but not the position. And as auria has written, this works fine for some tracks, but tracks where the actual road and a border (wall, fence, ...) share a vertex, the normals can not be used. This could of course be fixed in the tracks, but is quite a bit of work (and makes the task for track designer even more complicated).


Just an idea, what if track interpolation wasn't mandatory? That way you'd just select peices of track that could be, select "Interpolate" (i guess an addition to the blender script) and they'd be the ones interpolated. That way stuff which can be can be nice and places which can't would be left alone - they'd be worked on extra hard by the designer to be nice.

Re: Smooth road surfaces (dev idea)

PostPosted: 22 Dec 2011, 23:21
by mac_dmh
I like the idea. Maybe vertexgroups could be used for this?

Re: Smooth road surfaces (dev idea)

PostPosted: 23 Dec 2011, 03:26
by Auria
The edge split modifier sounds to me like the easiest option (or equivalent implement on stk side)