Re: Culling callbacks
Rémi Arnaud (remi++at++remi.asd.sgi.com)
Tue, 29 Apr 1997 11:43:37 -0700 (PDT)
Luciano Pinho wrote:
>
> Hi!
>
> I'm trying to speed up culling by using geometric coherence.
> The scene is a city, so I've defined some strategically placed
> oclusion planes that if placed between the camera and an object
> will turn it invisible.
> There is a pre-processing stage for the determination of the
> "shadow" region of each plane for each node.
> Than I should modify culling in such a way that after fustrum
> culling each 'visible' node would be tested against every oclusion
> plane's shadow volume for a more restrictive visibility testing.
>
> The problem is that the culling callback method doesn't seem to work
> properly:
>
> 1- Should I use pre or post culling?
> Pre is before fustrum culling, wich is not what I want,
> but Post is done after all the child of the node are
> processed, wich seems to be inneficient!
> 2- I've implemented a simple test callback, but it seems
> that it is executed only once for the hole scene.
> What I need is a callback that is called for each node,
> so that I can do the oclusion tests.
>
> Can anyone help me on this or have any sugestion?
> Thank you so much!
You can set a PRE_CULL callback on some nodes using the
pfNode::setTravFuncs(PFTRAV_CULL,pre_cull,NULL); that will
be called for each node that have this callback set.
You can use the setTravData to set the plane equation.
Your callback returns PFTRAV_CONT or PFTRAV_PRUNE as a result of
the test with the plane.
_ / _ _
|_) _ ._ _ o /\ |_)|\ | /\ | || \
| \(/_| | || /--\| \| \|/--\|_||_/
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:55:07 PDT