[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Re: Ancient treasures (?) and more ...

From: Kai Sterker
Subject: [Adonthell-devel] Re: Ancient treasures (?) and more ...
Date: Mon, 16 Jun 2008 23:00:38 +0200

On Sun, Jun 15, 2008 at 12:12 PM, Kai Sterker <address@hidden> wrote:

A slight correction I didn't want to add to the other mail (it's long
enough as it is).

> [3] grouping of multiple images into a single object
> Examples where this is useful are character and its shadow, the grass
> James is working on, which is composed of multiple layers, objects
> that have both vertical and horizontal elements (like the diagonal
> cliff wall in the current demo) and possibly others. The idea is to
> group gfx to make life easier for map makers, but do not split the
> internal objects to keep the polygon count low (faster collision
> detection) and decrease the number of objects on the world (faster
> octree traversals). For rendering, each image will be handled
> separately, as rendering order differs for flat and vertical objects
> and because other sprites might intersect.


> Also, we
> still need to make sure that model bounding boxes properly enclose
> objects (like the high grass). We may need a non-solid flag to exclude
> bounding boxes from collision detection while still ensuring that
> objects are rendered correctly. So the high grass might have a solid
> box that represents the ground and a non-solid box that encloses the
> vertical extent of the grass.

A better idea might be to manually specify the model bounding box
instead. So far, it is calculated from the individual 3D shapes that
define its form, but nobody says we can't override this automatism
where needed. That way, our grass tile would still have a solid shape
for the ground. The bbox of the entire model however would be set
large enough to enclose the high grass as well and the non-solid flag
is no longer needed at the individual shape level. A non-solid object
(like a ghost or water surface) OTOH would have no shape at all, just
a manually specified bounding box. That means it will be rendered
correctly, but it will be invisible to the collision code at the same
time :-).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]