Re: ZB limits & Overlaid channels

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Fri, 03 Apr 1998 15:11:23 -0800


Steve Baker wrote:
>
> On Fri, 3 Apr 1998, Michael Boccara wrote:
>
> > Hi Performers,
> >
> > For my space application, I have to use a very large Near/Far range : 1m/1e6km.
> > I chose to superpose 2 channels, sharing all attributes except near/far and draw
> > callback.
> > ChanFG : N = 1m F = 10km
> > ChanBG : N = 10km F = 1e6km
> > Better than a long speech, my piece of code is at the end of the message.
> >
> > If I used only 1 channel, it would draw all the scene.
> > While my 2 channels draw 2 complementary parts of the scene, using draw
> > traversal masks.
> > So we should have the same graphic load...
> >
> > BUT using 2 superposed channels is almost twice longer than using only 1 channel
> > !!!
>
> > 1/ Why does it take longer than using only 1 channel ?
>
> There are quite a few reasons why it'll take longer:
>
> * Much more CULL workload (the scene graph has to be traversed twice).
> * Z buffer is cleared twice.
> * (perhaps) Many more state changes since Performer will be
> * (perhaps) Rendering the same material/texture properties once in the
> near channel and again in the far.
> * There is (presumably) some per-channel overhead in Performer for setting
> up viewpoint and projection matrixes, clipping planes, etc.
>
> ...it's a bit suprising that it's *TWICE* as long unless your rendering is
> severely CULL limited (possible - since you only have two CPU's) or has an
> insane number of pfGeoState changes that are happening for pfGeoState that
> appear on both far and near objects.

I agree, try running in APPCULL_DRAW mode. Most of the overheads should
be
extremely small except cull.

>
> > 2/ What does happen in the pfDraw() function that is uselessly repeated between
> > the 2 channels ?
>
> It'll be drawing two different display lists - so that isn't (in itself) a
> huge deal.
>
> > 3/ How come can I call twice pfDraw() without any argument, into each draw
> > callback, letting Performer guess that it is for 2 separate channels ?

No, you only call pfDraw once in each callback for a total of 2 draws,
like
Steve said, the callback is invoked BY the channel class.
I hope this is just a grammatical ambiguity.

>
> It's not guessing, it knows which channel it is because it knows which
> of your draw callbacks was being called.

Cheers,Angus.

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux 

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/ ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:12 PDT

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