[info-performer] Re: Alpha texture problem

New Message Reply Date view Thread view Subject view Author view

From: lawrence bertoldi (lberto++at++md.prestige.net)
Date: 04/17/2002 13:03:30


I did not mean to imply that Linux Performer was different from Irix performer
(although it dose seem so at times). I was only trying to say that you sometimes need to
sort
things your self to be sure there in the right place! then you need to
pfChannel::setBinSort as well
to insure that things inside the bin are sorted the way you want them sorted, i.e.:
PFSORT_BACK_TO_FRONT or PFSORT_BY_STATE.
Hope this helps!

See Ya ~;-}>
Lawrence Bertoldi Graphics Software Consultant
lberto++at++md.prestige.net Simagery Inc.
410.960.1623 Software Consulting

Andreas Ekstrand wrote:

> Lawrence,
>
> Do you mean that the sorting is different on Linux? In what way?
>
> I realize that the bin has to be sorted, but I expected Performer to
> sort the transparency bin by default and put the trees in that bin since
> they are transparent. I also tried to apply back-to-front sorting
> explicitly on the transparent bin and still got the same result. That's
> why I wondered why I got this strange behaviour.
>
> /Andreas
>
> lawrence bertoldi wrote:
> >
> > On Linux... Some times yes, depending on what else is in the scene. for example
> > if the scene has more then one object with transparency in it there is no way to tell
> > when
> > things will be drawn( without sorting back to front) unless you create your own bins.
> >
> > then you can set the order that things happen. The scene did draw your background
> > first and you can see it through the transparent parts of the second object to be
> > drawn.
> > so if the next object drawn is between the background and the 2nd object.. well you
> > get the picture!
> >
> > See Ya ~;-}>
> > Lawrence Bertoldi Graphics Software Consultant
> > lberto++at++md.prestige.net Simagery Inc.
> > 410.960.1623 Software Consulting For Hire
> >
> > Andreas Ekstrand wrote:
> >
> > > Hi Yair,
> > >
> > > I thought that Performer used a special bin for all transparent geometry
> > > and sorted it from back to front. However, I tried an explicit setup
> > > like that and it still didn't work.
> > >
> > > Cut-out trees are not sufficient for me I'm afraid, I would like the
> > > alpha edges to blend nicely with the background. So I realize that the
> > > rendering order is of importance. But I can't see why this is happening
> > > if the background trees actually are rendered before the foreground
> > > trees? Do I have to assign special bins just for these trees? Isn't it
> > > enough to use the transparent bin?
> > >
> > > Regards,
> > > Andreas
> > >
> > > Yair Kurzion wrote:
> > > >
> > > > Hello Andreas !
> > > >
> > > > By default, IR/IR2/IR3 use a different transparency method than Octane/Octane2.
> > > > For correct semi-transparency, Octane/Octane2 require sorting of objects
> > > > from farthest to nearest.
> > > >
> > > > It looks like your trees are not sorted back-to-front. Do you assign
> > > > special bins to the tree geometry ?
> > > >
> > > > Trees are a special case of transparency. You normally don't want to see
> > > > semi-transparent pixels. Each pixel is either completely transparent or
> > > > completely opaque (the tree texture defines a cut-out of the polygon).
> > > > If all you want is cut-out trees, read on ...
> > > >
> > > > You can fix the tree edge problem without sorting back-to-front: Take a look
> > > > at pfGeoState modes: PFSTATE_ALPHAREF and PFSTATE_ALPHAFUNC. They let you
> > > > control what alpha values of a polygon are skipped while rendering.
> > > > Take a look at man pfAlphaFunc for more info on this.
> > > >
> > > > -yair
> > > >
> > > > > I have noticed that polygons with alpha textures (e.g. flat trees or
> > > > > bushes) become somewhat strangely rendered when viewed in front of each
> > > > > other. If you're viewing such a polygon in front of another, you can
> > > > > actually see through the second polygon through the edges between the
> > > > > alpha and non-alpha texels of the first polygon.
> > > > >
> > > > > I know, this might sound a bit confusing, but I'm sure this is a common
> > > > > problem and has been noticed by many Performers out there. It doesn't
> > > > > happen on IR/IR2/IR3, but it does with Octane/Octane2 as well as with
> > > > > Geforce2/Geforce3. I have attached an image that shows the problem quite
> > > > > clearly. Could anyone describe why this is happening and if you could
> > > > > avoid it?
> > > >
> > > > --
> > > > \_________ \_____ \__ \__ \_____
> > > > \_________ \_____ \__ \__ \_____ Yair Kurzion
> > > > \__ \__ \____\__ \__ yair++at++sgi.com
> > > > \__ \__ \__ (650) 933-6502
> > > > \__ \__ \__
> > > > \__ \__ \__
> > > > -----------------------------------------------------------------------
> > > > List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> > > > Open Development Project: http://oss.sgi.com/projects/performer/
> > > > Submissions: info-performer++at++sgi.com
> > > > Admin. requests: info-performer-request++at++sgi.com
> > > > -----------------------------------------------------------------------
> > >
> > > --
> > > ---------------------------------------------------------
> > > FDM-AE Andreas Ekstrand |E-mail: Andreas.Ekstrand++at++saab.se
> > > Saab AB |Phone: +46 (0)13 - 18 40 42
> > > SE-581 88 Linkoping |Fax: +46 (0)13 - 18 41 77
> > > SWEDEN |
> > > ---------------------------------------------------------
> > > -----------------------------------------------------------------------
> > > List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> > > Open Development Project: http://oss.sgi.com/projects/performer/
> > > Submissions: info-performer++at++sgi.com
> > > Admin. requests: info-performer-request++at++sgi.com
> > > -----------------------------------------------------------------------
> > > ITEC 2002 Friends of Performer Meeting: Wednesday April 10 17:00h
> > > Hainaut Room, Lille Grand Palais, Lille, France
> >
> > -----------------------------------------------------------------------
> > List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> > Open Development Project: http://oss.sgi.com/projects/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
> > -----------------------------------------------------------------------
> > ITEC 2002 Friends of Performer Meeting: Wednesday April 10 17:00h
> > Hainaut Room, Lille Grand Palais, Lille, France
>
> --
> ---------------------------------------------------------
> FDM-AE Andreas Ekstrand |E-mail: Andreas.Ekstrand++at++saab.se
> Saab AB |Phone: +46 (0)13 - 18 40 42
> SE-581 88 Linkoping |Fax: +46 (0)13 - 18 41 77
> SWEDEN |
> ---------------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Apr 17 2002 - 14:03:28 PDT

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