[ODE] Simple beginner questions

Megan Fox shalinor at gmail.com
Wed Aug 16 11:36:35 MST 2006

trimeshes are fine for terrain, and the only practical alternative
applies strictly to heightmaps (eg. no multi-level terrains, strictly
solid convex terrains) - there's a heightmap collider for that which
simulates a solid terrain.  The issue with trimeshes comes in when
you're using the engine for more than just collision, because a
triangle is effectively a paper-thin collider.

If you imagine a sphere vs a triangle, barely touching, if a force
were to occur that could accelerate the sphere more than halfway
through the triangle in a single step, then the triangle would no
longer be capable of pushing against the sphere.  This, as compared to
a true solid, where no matter how far you might warp in a single step,
there's always a solid object that can detect the penetration and push
back against it.

... but in practice, this seldom matters.  You simply balance the
forces and the scales of objects in use such that no such case can
occur - you institute air drag, a minimim size for
normally-interacting objects, a max velocity, etc.

Bullets and other fast-moving projectiles then get handled in a
special case of some sort, my preferred method (used for arrows) being
to trail a ray behind any fast moving projectile whose length is
dictated by the amount of distance that object could travel in a
single step.  You could also model projectiles as capped cylinders,
and blend them from sphere dimensions to stretched spheres (capped
cylinders) as the speed increases, if you wanted to be particularly

On 8/16/06, Curtis Bennett <curtis.r.bennett at gmail.com> wrote:
> Hello again,
> Just a note saying I have all of my issues resolved, though am still curious
> how to do terrain without trimeshes.
> Thank you,
> Curtis
> On 8/16/06, Curtis Bennett <curtis.r.bennett at gmail.com> wrote:
> >
> > Hello all,
> >
> > I've been using ODE for just a day or two and have a few questions. I need
> to use ODE to read in about 50mb of chunked indexed triangle  terrain data
> (not a height field)  and cast a ray to give the height at a xy location. On
> a previous post I read that using TriMeshes is not that good, but don't know
> of a better way to do it. And when building the terrain in one space and
> calling dSpaceCollide2 with the ray for the second I keep getting access
> violations errors (?) Is there any example code of ray/trimesh intersection?
> >
> > Thank you for any help
> >
> >
> > Curtis
> >
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode

-Megan Fox
Idyllon, LLC

More information about the ODE mailing list