[ODE] Object hierarchies

Jon Watte (ODE) hplus-ode at mindcontrol.org
Thu Mar 30 10:27:45 MST 2006


You probably ned more information than the scene graph alone gives you.

You need to know which objects are intended to be "separate objects" and 
which are intended to be "connected objects". For example, in some scene 
graphs, you might see:

forest
   tree
   tree
   rockformation
     rock
     rock
   fairy
     wings
   car
     carbody
       wheel
       wheel
       wheel
       wheel

Now, the typical representation of that scene in ODE would be:


Composite static trimesh (tree+tree+rock+rock) with no body.

fairy body, with two geoms: fairy geom, and wings geom

car body, with car body geom
   car wheel body, with car wheel geom, connected with joint
   car wheel body, with car wheel geom, connected with joint
   car wheel body, with car wheel geom, connected with joint
   car wheel body, with car wheel geom, connected with joint

If you don't want the extra performance of compositing all static 
trimeshes into a single trimesh, you could just make four separate mesh 
instances, each of them with no body.

Note that the scene graph does not tell you that the wings are fixed to 
the fairy, but the wheels are attached using joints. It doesn't tell you 
that the car is not fixed to the forest, nor that the rock formation or 
the rocks are just fixed objects.

Your scene graph needs to have the appropriate mark-up to be able to 
transform the scene graph into a suitable ODE scene. Also, for things 
that move, you don't want to use trimesh geoms, because they aren't that 
stable. For best stability, you want proxies (boxes, spheres, capsules) 
for objects with bodies, and trimeshes only for things that stay fixed.

Cheers,

			/ h+


Jean-Sebastien Guay wrote:
> Hello Doron,
> 
> 
>>I've been doing similar tree-like stuff for years,
>>and what I use may help: ODE + Open Inventor
> 
> 
> I'm aware of ready-made scene graph implementations. Unfortunately, I have to
> stick with my program's scene graph system (the original developers rolled
> their own - not what I would have done but I'm stuck with it).
> 
> Let me just clear up something before we go on the wrong track here. The
> graphical objects and their meshes are rendered properly. The object
> hierarchies are correct, and their relative transformations too. The problem I
> have is how to convert that into "ODE-space". I'm making trimesh geoms for each
> mesh (they're already relatively low polygon) but each object or "model" has a
> hierarchy of meshes, and I was wondering what would be the most painless
> approach to mirror that with ODE objects (body, geom, geomTransform etc.) so
> that in every case (mobile or immobile object) I can just move the parent and
> all the children follow (still in ODE). All that works fine in the engine's
> graphical representation.
> 
> I hope that clarifies my questions. Thanks in advance,
> 
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay     jean-sebastien.guay at polymtl.ca
>                          http://whitestar02.webhop.org
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
> 
> 



More information about the ODE mailing list