[ODE] Trimesh question

Pavel Mach xreg at centrum.cz
Sat Sep 23 09:06:14 MST 2006

I have a problem which I am not able to fix. When creating trimesh, 
there is no needed to support normal vectors as I can read in the wiki 
manual. But will the trimeshs behave the same if I let the ODE to hendle 
the normals itself or if I support the face normals? What are the 
normals for? Is it possible that if I make the mesh with inverted 
normals, that the collisions will be different?

I am asking because I have a problem with trimesh, but I cannot find a 
solution, so I am thinking about the normals now... I made a video about 
it, you can dowload it below.... I made some cars, every car is a body 
with 4 cylinders for wheels connected to car-body with hinge2.
When I use simple BOX geom for car's body, the colisons looks like in 
video 1. When I use the trimesh for car body (the trimesh is the same 
like in the car rendered in video), the collisions look strange like in 
video 2 - the cars are "kicking hard" to themself when touched. It's 
obvious from the movies, it's hard to explain.
When I "tune" the contact-cfm and erp, it's little bit better (I set the 
worse cfm and erp in purpose for the video) but it's never good enough 
like in video-1 when just a box geom is used. I explain it to myself 
that it's exactly because of setting ERP and the "correcting force" when 
two bodies are overlapping, but I am not sure and I don't know even how 
to "fix" it. So is it possible to fix this problem somehow?

And I have another question :) : A simple box geom for a car is not good 
enough for the car body, but instead of using trimesh body, I would use 
a couple of small boxes for representing the body, it would be about  20 
or 50 or even 100 boxes per a body. Do you think it's applicable to 
represent a object in scene with this amount of simple geoms? Can ODE 
handle it and wouldn't it be even faster than represent it with a 
low-poly-trimesh (with about the same number of triangles, say)?

VIDEO1 (box geom):

VIDEO2: (trimesh geom)

Thanks for your suggestions.
pavel mach

More information about the ODE mailing list