Hi Paul,

I'm pretty sure it's a render bin problem. I did some debugging and
discovered that each geometry is being placed into a different
RenderBin, although their bin number and names are the same during the
cull traversal. It seems that osgUtil::CullVisitor does not always use
the same RenderBin instance with StateSets that have the same bin
number and name.

Robert, should drawables in different subgraphs with the same render
bin details be placed into the same RenderBin instance during the cull
traversal? I made a quick hack that ensured this was the case and it
fixed my problem. But the hack only works on this specific test case,
it doesn't address the bigger problem, as I see it.

-Farshid

On 3/14/07, Paul Speed <[EMAIL PROTECTED]> wrote:
Unfortunately, where transparency is concerned visual display is not
enough to know if your render bins are messed up.  It is more likely to
be that your objects are not being drawn in the order you expect.

A common example is when transparent objects A and B are at the same
location with A being larger than B.  If A is drawn first then you will
not see B because the Z-buffer will have already been filled in.  With
transparency, rendering order is crucial.

-Paul

Farshid Lashkari wrote:
> Hi,
>
> I just noticed a bug with setting render bins. I'm not sure if it is
> related to this bug, but I was able to create a .osg file that
> reproduces it. The problem I noticed is that some StateSets don't
> inherit the correct render bin. In this example there are two
> semi-transparent quads. Both geodes are set to use TRANSPARENT_BIN.
> One geometry is also set to use TRANSPARENT_BIN and the other is set
> to inherit the bin. Both geometries should be rendered in the same
> bin, but this is not the case, because one geometry is not visible
> through the other. Hope this helps.
>
> -Farshid
>
> On 3/13/07, Terry Welsh <[EMAIL PROTECTED]> wrote:
>> Any progress on this bug or should I look for a workaround?  I can't
>> for the life of me figure out the real cause of problem, and I think
>> it's going to get in my way pretty badly soon....
>> - Terry
>>
>> On 2/23/07, Terry Welsh <[EMAIL PROTECTED]> wrote:
>> > Thanks Tugkan; that's good to know.  Since it's a known problem I
>> > guess I'll just wait a while and see if Robert patches it.  I really
>> > don't know what the best solution is.
>> >
>> > Robert, yes, that change I mentioned is a complete hack.  But it does
>> > make the problem go away.  If you wanted it to not be a hack, you
>> > could probably also replace line 462 with state.popAllStateSets();
>> > However, I think that essentially takes you back to version 1.46.  The
>> > way you're doing things now looks smarter and faster, so I wish I knew
>> > why it didn't work.
>> > - Terry
>> >
>> > > Message: 11
>> > > Date: Fri, 23 Feb 2007 09:47:00 +0100
>> > > From: Tugkan Calapoglu <[EMAIL PROTECTED]>
>> > > Subject: Re: [osg-users] obscure state bug
>> > > To: osg users <[email protected]>
>> > > Message-ID: <[EMAIL PROTECTED]>
>> > > Content-Type: text/plain; charset=us-ascii; format=flowed
>> > >
>> > > Terry Welsh wrote:
>> > > > I have a really weird bug that shows up in one of my apps.
>> Sometimes
>> > > > objects get the wrong StateSet applied to them.  I have not been
>> able
>> > > > to produce a simple enough test case to send in yet, but I
>> wanted to
>> > > > know if anyone else has seen this problem in the last month.
>> > > >
>> > > > The problem was introduced when RenderBin.cpp went from v1.46 to
>> > > > v1.47.  The problem goes away if I add state.popAllStateSets(); at
>> > > > line 386.
>> > >
>> > > Hi Terry,
>> > >
>> > > Just to save you some work:
>> > > I observed the same bug and created an .osg file to reproduce it.
>> Robert
>> > > already has it.
>> > >
>> > > tugkan
>> >
>> _______________________________________________
>> 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/
_______________________________________________
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