[ODE] Heightfield Origin Change

Jason Perkins starkos at gmail.com
Thu Jul 27 10:02:52 MST 2006


On 7/27/06, Justin Couch <justin at vlc.com.au> wrote:
> One thing to note is that conventionally heightfields all start at the
> corner. Of the dozen or so different file formats that I can think of
> off the top of my head, none of them start with the origin in the
> center. They all use a corner as it is far more natural to describe them
> that way as corner then grid from there. Describing from a "center"
> position means the center may or may not line up with the grid depending
> on whether there is odd or even number of rows or columns.

As another data point to this discussion: the heightfield primitive
has uses beyond simple +Y-up terrain. Because they can be freely
rotated and positoned you can glue two, four, or six of them together
to to make a cave or planetoid. Or they could be used for complex
character shapes in place of a moving trimesh. In these kinds of
situations IMHO it is easier to have the origin at the center.

I plan on using heightfields as an approximation for more detailed
triangle meshes, and possibly also for some moving objects. Having the
origin at the center means that it can share an origin with my body
and rendering objects.

Just my $0.02,

Jason


More information about the ODE mailing list