P.S. Re: culling errors for dynamic geometry

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 04/11/2000 08:15:23


Bram Stolk wrote:
>
> Hello performers,
>
> I use a pfGeoSet for which I change the contents of the vertex array
> each frame.
>
> This means, that each frame, the bounding volume changes, and should
> be updated to ensure proper culling/isecting.
>
> In the manual page for pfGeoSet, I read:
>
> ... If the mode is
> PFBOUND_DYNAMIC, IRIS Performer will recompute the bound if the number of
> primitives, the primitive lengths array or the vertex coordinate arrays
> are changed. Note that IRIS Performer does not know if the contents of
> these arrays changes, only when the pointer itself is set. Recomputation
> of the bounding box can be forced by calling pfGeoSet::setBound with a
> bbox that is NULL.
>
> So each time I change the vertex array contents, I do:
> set->setBound(0,PFBOUND_DYNAMIC);
>
> Nevertheless, the geoset is occasionally culled when it should not
> have been. I use a CAVE setup, so I see some cave walls do culling,
> and others do no culling.
>
> Being quite puzzled about this, I decided to take more drastic
> measures, and to disable culling for the geode alltogether,
> using this func call:
> geode->setTravMask(PFTRAV_CULL, 0, PFTRAV_SELF | PFTRAV_DESCEND, PF_SET);
>
> Even this does not prevent the erroneous culling of my dynamically
> adjusted object!

P.S. I don't think this is the way to get the result you are after.
Setting the cull traversal mask to zero is not going to disable culling
and force it to be drawn. You might want to explore a cull callback, or
highly inclusive bounds but let's face it, not culling isn't really a
good solution.

>
> Can someone please enlighten me in the noble art of culling dynamic geometry?
> Many thanks,

In general you have the right approach, just force the recomputation
with a NULL box, perhaps something is wrong with the fluxing of data or
exactly when you compute the box w.r.t. your updates, also the process
in which you make these changes, it must be the APP.

Can you set an explicit bound box on the geometry which includes the
volume of all potential geometry?

CHeers,ANgus.

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/

"In the middle of difficulty lies opportunity." --Albert Einstein


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Apr 11 2000 - 08:15:29 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.