Hi Tugkan,

If users want AlphaFunc on by default for the opaque bin then they can
simply attached an osg::AlphaFunc to the topmost StateSet in the scene
graph and get back the old functionality.

Robert.

On 4/12/07, Tugkan Calapoglu <[EMAIL PROTECTED]> wrote:
Hi Robert,

Unless we have alpha blending we do not need to sort objects from back
to front hence we can save some performance by not putting such objects
to the transparent bin. Lets say we have a few hundred trees which are
rendered with alpha test but not alpha blending. Putting them to the
transparent bin will load the CPU unnecessarily. Admittedly I doubt that
the performance gain from "early Z culling" could make for it. I did not
test it recently but some tests I've done long ago did not create
impressive results even though I tried to craete a scenario in which
"early Z culling" should bring the gretest advantage.

I think unless pixel processing is not the bottleneck there isn't much
to expect from that.

Moreover this seemed to be pretty unintuitive to me. If I wouldn't see
this email I would for sure think that it is a bug when I observe it.

My vote (if there is any voting :) ) would go to the previous
implementation.

Tugkan

> Hi Marc,
>
> This isn't a bug, rather it looked like it was working before because
> the problem was masked out, quite literally.  Originally the OSG set
> turned on glAlphaFunc (osg::AlphaFunc) for both transparent and opaque
> bins, this allow objects dropped into the opaque bin to clip out
> fragments that had an alpha of 0.0.
>
> According to NVidia docs on making effective use of early z culling of
> fragments one shouildn't use AlphaFunc for opaque objects, so I
> changed the OSG across to only enable AlphaFunc for the transparent
> bin.  For a well conditioned database this won't result in any
> artifacts.
>
> However, if objects that shouldn't have been placed in the transparent
> bin, but instead were dropped in the opaque bin, the not only will the
> sort order be different but the AlphaFunc will be switched off, both
> of which you might be noticing.
>
> Robert.
>


>
>
> On 4/11/07, Marc Bernatchez <[EMAIL PROTECTED]> wrote:
>
>> Any progress on this bug? I don't know if it is the bug I'm seeing but
>> it roughly started when I went to OSG 1.2 and appears to only show up
>> with OpenFlight models. I noticed some strange transparency bugs as I
>> went 1.2. Some objects that were totally transparent got half visible
>> while other opaque objects would completely be culled off when they were
>> going in the left most region of the FOV.
>>
>> Recently, I did some tests on another FLT model and some opaque objects
>> would suddenly disappear when a transparent object would be in front of
>> them. Here again, the opaque object disappearance is Dependant on its
>> position in the field of view. If it is on the left of the FOV, it bugs,
>> but will be fine other wise.
>>
>> Any thoughts and updates on the previously mentioned bug?
>> Thanks,
>>
>> --
>> =====================================
>> Marc Bernatchez
>> Candidat au Ph.D.
>> Ecole Polytechnique de Montreal
>> Montreal, QC, CANADA
>> =====================================
>> Virtual Reality web site, VResources:
>> http://vresources.org
>> =====================================
>>
>> _______________________________________________
>> osg-users mailing list
>> [EMAIL PROTECTED]
>> http://openscenegraph.net/mailman/listinfo/osg-users
>> http://www.openscenegraph.org/
>>
> _______________________________________________
> osg-users mailing list
> [EMAIL PROTECTED]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>


--
Tugkan Calapoglu

-------------------------------------
VIRES Simulationstechnologie GmbH
Oberaustrasse 34
83026 Rosenheim
Germany
phone    +49.8031.463640
fax      +49.8031.463645
email    [EMAIL PROTECTED]
internet www.vires.com
-------------------------------------
Sitz der Gesellschaft: Rosenheim
Handelsregister Traunstein  HRB 10410
Geschaeftsfuehrer: Marius Dupuis
                    Wunibald Karl
-------------------------------------
_______________________________________________
osg-users mailing list
[EMAIL PROTECTED]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[EMAIL PROTECTED]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to