question about 3D Mesh and race car track

Blitz3D Forums/Blitz3D Beginners Area/question about 3D Mesh and race car track

Santiworld(Posted 2009) [#1]
hi, i have a big problem with my project.

i am doing a racecar game...

when i rotate the track, for the speed turns, my cars bounce every time they touch and edge of my track...

i think this is because the triangles surfaces in the turns, are not constantly, and the car start to bounce becouse the faces are not flat or smooth...

this is a screenshot wireframe of my track
here i turn and rotate to show the problem.






now, i show and example, in yelowlines, the face orientation, in green the car bounce. this happend becouse the left edge has a different angle than the right edge..

here the picture..



i'm using ode for the physics...

does anybody know how can i fix this problem?

thanks and regars..


GfK(Posted 2009) [#2]
No idea but the geometry looks a right old mess.


Stevie G(Posted 2009) [#3]
How are you making the track? If you are not using beziers then I suggest that you do. With enough segments between control points, the track and therefore movement should be pretty smooth.


Santiworld(Posted 2009) [#4]
thanks, im not using beziers...

i made the track section by section, increasing the values like turn, left-altitude, right altitude, etc..

i don't know if the solution is to make smoother the elevations, to get an effect more alike the beziers curves...

stevie, the method i use is similar as a program you posted time ago, procedural track or something like that... but in my case, i made the track section by section... maybe i must use smoother values, to simulate beziers curves.

i tried closing the section one each other, but the problem still there


Ross C(Posted 2009) [#5]
You said your rotating the track? Surely your rotating the car to make turns?


Santiworld(Posted 2009) [#6]
i meant rotate the track while i was creating it.


Ross C(Posted 2009) [#7]
Oh right sorry. Maybe you should try not to apply physics whilst turning the track?


Pongo(Posted 2009) [#8]
The track geometry doesn't look too bad from what I can tell. It looks a bit messy due to being displayed in triangles, but it looks like the structure is pretty clean.

I'd like to examine the mesh if you would be willing to send me a section (sent you a private email) I can take a look and see how things look from an artist point of view. I'd also like to check the continuity between faces to see if that is the problem.


Santiworld(Posted 2009) [#9]
hi pongo, i can't send a part of the mesh, because the mesh dosen't exist..

the track mesh, is created by a procedural patch, changing the parameters to make the elevations, etc...

pongo, i can make one example in 3ds o b3d, exactly like the mesh i create in the game... and i going to postit here...

i studied the second image i post, this...

the problem is when i have 2 triangles with a diferent angle in parallel edges...

here two drawing examples i make...

for this reason, the car bounce, i dont know how fix that..
(see the line in the middle of the track, and the arrows are the triangle orientation)






Pongo(Posted 2009) [#10]
I don't know if this will help much, but believe I understand what the problem is. I've made a sample picture to demonstrate.



In that example, the first 3 are nearly identical in geometry. The first one is polys, not triangles, so it looks correct. Unfortunately, you need to convert to triangles. The individual triangles of each poly are not planer, however, and this appears when I triangulate the faces. The third one seems slightly better, but still shows the problem. I believe this is what is happening with your mesh.

In the 4th example, I have added some extra segments in the middle. These points are linear, so there is no curve to the track at all. Notice how it greatly reduced the triangle effect though. If you can afford the extra polygons it may fix the problem for you.


Santiworld(Posted 2009) [#11]
Pongo, first at all I thank you a lot that you had taken the job to create those exelent examples... I think that you are totally right about the cause of the problem. I'm gonna try to make the tests based on the image you posted

in this post i'm showing images and videos of the game, don't know if you saw it, if don't, please take a look

(forum link)
http://blitzbasic.com/Community/posts.php?topic=83490

(youtube video link)
http://www.youtube.com/watch?v=iffuQ3nuh6U

if i undestood you, the fourth example is the right one, then creating the triangles will give me the fifth example

thanks a lot again


Pongo(Posted 2009) [#12]
yea, the 4th and 5th are the same, the only difference is that #5 has been triangulated. This does not remove the problem, but it does make it quite a bit smaller, so I hope that is enough to help. You may want to try just a single point in the middle first if you need to keep poly count down.

I looked at your video,... that track editor is awesome looking.


Santiworld(Posted 2009) [#13]
:) thanks pongo!..

i spend all the morning making test with diferent ways to make tracks, specialy the curves...

i think there is now way to do a PLANAR triangulation in a camber curve..
this is a problem to me... now, i think the solution is in other place.. like you say, more triangles maibe reduce the effect..

vip3r is help with a tips to improve the ode physics to reduce the bounces, maibe all things togheter fix this problem...

see the last post
http://www.blitzbasic.com/Community/posts.php?topic=79489


Pongo(Posted 2009) [#14]
Yea, the planar triangulation is what is needed. Even if you get that perfect, you are still going to have slight bumps as you go from polygon to polygon. The only simple solutions are to use more triangles or not use cambered curves.