[ODE] Triangle mesh

Duncan Frostick duncanf at f2s.com
Thu Aug 26 14:33:46 MST 2004


The winding order for ODE's trimeshes is the opposite to DirectX I 
think, i.e. triangles that are defined in CounterClockWise order are the 
front facing ones in ODE. By default Direct3D culls these CCW triangles 
from view. When I started playing with trimeshes, I didn't realise this 
and had similar sounding problems to yours - just write a simple method 
to rewind the indices in the index buffer and then set the culling mode 
to CW and you'll be in line with ODE (assuming you're doing the graphics 
in Direct3D that is).

Cheers, Duncan

Shamim wrote:

> Hi guys,
> 
> I am very new to ODE. Started last week. First of all let me
> congratulate to ODE community for bringing such a magnificient
> software.
> 
> All said now I would like to come to the problem that I am facing. 
> 
> I have built a program that traverses a model hierarchy and creates
> ODE hash spaces for parent nodes and simple boxes as geoms for the
> renderable meshes. This works fine. But when I changed the box geoms
> to triangle meshes by converting renderable mesh to ODE trimesh
> everything gets screwed up. Basically I have a simple triangle mesh
> that acts as a test terrain and a box which is also a triangle mesh. I
> let the box fall freely due to gravity. Sometimes my box sticks to the
> terrain but sometimes it just penetrates through the terrain and falls
> below. When i change my ODE geoms to box everything works fine. Whats
> the problem here? Sometimes I also see that some part of the box mesh
> is not touching the terrain as it should behave in actual cases.
> 
> I have serched the mailing list archives. I made sure that the
> windings for the triangles are front facing (as per DX). Is this the
> correct winding? I am not providing any normals in the creation of
> triangle meshes.
> 
> Help will be greatly appreciated.
> 
> ~Cheers
> Shamim.
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode



More information about the ODE mailing list