Yair Kurzion (yair++at++polygon.engr.sgi.com)
Mon, 7 Dec 1998 11:40:15 -0800 (PST)
> 3. ALIGN ENGINE
>
> We use an ALIGN pfEngine to attach an object to the surface of the
> Earth.
> This seems to "work" except that if the viewpoint moves too close to the
>
> object, it disappears! Move back and it reappears. Moving the object
> farther away from the surface makes no difference, nor does limiting the
>
> ASD to a single LOD.
This usually happens when your pfASD aligned object fails the frustum CULL test.
Since the alignment operation moves the object, you must make sure that CULL
behaves correctly. You have two options:
1. Re-calculate the object bounding box/sphere every frame.
2. Set a static bounding box/sphere large enough to contain all the possible
positions of the object on the pfASD surface. pfASD supplies a call
returning a bounding-box that bounds the motion of a query point (or points):
pfASDGetQueryArrayPositionSpan(asd, query_id, &box);
You can extend this bounding box by the bounding volume of your object to
generate a correct/tight static bounding volume for your object.
Check out the code at asdfly/pfuLightPoints.c. It sets a static bounding box
on each pfASD aligned object. Look at the end of the routine
pfNewObjectAlignNode. It calls pfASDGetQueryArrayPositionSpan, extends the
box by the bounding sphere of the object, and sets a static bounding box
on the nodes above the aligned object.
-yair
--
\_________ \_____ \__ \__ \_____ Yair Kurzion
\_________ \_____ \__ \__ \_____ yair++at++sgi.com
\__ \__ \____\__ \__ http://reality.sgi.com/yair
\__ \__ \__ Work: (650) 933-6502
\__ \__ \__ Home: (408) 226-9771
\__ \__ \__
This archive was generated by hypermail 2.0b2 on Mon Dec 07 1998 - 14:04:39 PST