Smooth race tracks.

Started by
8 comments, last by GameDev.net 19 years, 7 months ago
I'm working a pretty simple free educational 3D racing game for children and young people, and I've run into a bit of a problem. I'm using ODE for physics and 3D Studio Max for modeling my tracks and I can't seem to get a track that's even remotely smooth around corners and hills. My car bumps insanely as it drives up (and especially down) hills or around bends and it even sometimes spins out of control. I understand the technical reason why this is happening, but I was wondering how commercial games accomplish such smooth driving. I'm not looking for perfection here -- I need the absolutely simplest solution possible. The opensource racer game has a solution, but it's much too complex for my needs. I'm willing to reduce the amount of hills and bends, if necessary, but a completely level track is not acceptible. Can anyone help?
Advertisement
maybe you could *cheat* the physics engine by dividing all the values you pass to it for impulse calculations. i guess this isn't really a proper way to solve it, but if all else fails, it could work.
sounds like you definitely need a smoothing algorithm... kinda like one for a heightmap... but what it all will come down to is how large the terrian/road polygons are compared to the size of your car or player.
Quote:Original post by ekrax
maybe you could *cheat* the physics engine by dividing all the values you pass to it for impulse calculations. i guess this isn't really a proper way to solve it, but if all else fails, it could work.


That's a possibility. I'm not sure exactly how I'd do it, but it may be possible to cheat with the physics. I'll look into that once I've exhausted other possibilities.
Quote:Original post by Anonymous Poster
sounds like you definitely need a smoothing algorithm... kinda like one for a heightmap... but what it all will come down to is how large the terrian/road polygons are compared to the size of your car or player.


Sounds right to me, but I'm not sure how that would be implemented. Isn't it something that could be done in 3D studio max, rather than writing my own algorithm?
You could always interpolate between the points. Translate a couple points into a curve of some sort.
How are you creating those tracks in Max ?

If you used surfaces, than when you're converting it to polygons, just increase the U or V values. Or if you're using polygon, I think you can apply meshsmooth or something similar modifier to it.

I am also unsure how your engine make use of the track data. But to have it smooth, make sure you smooth the normals too.
Quote:Original post by Anonymous Poster
How are you creating those tracks in Max ?

If you used surfaces, than when you're converting it to polygons, just increase the U or V values. Or if you're using polygon, I think you can apply meshsmooth or something similar modifier to it.

I am also unsure how your engine make use of the track data. But to have it smooth, make sure you smooth the normals too.


I'm making my tracks via 3D studio max lofting. I create a spline, then a cross section and then loft the spline to the cross section.

What exactly is a "surface" in 3D studio max? I'm pretty new to 3D modeling, so I'm not sure what that is.
Did you check the ODE FAQ and apply the solution for "rolling bodies get stuck sometimes" already?
enum Bool { True, False, FileNotFound };
Yes, I applied the necessary surface mode that's supposed to fix that problem, but it doesn't seem to help much.

This topic is closed to new replies.

Advertisement