Hi Tugkan,

Sorry to hear that the effect is broke, I don't have any immediate
advice or fix.  The investigative work you've done is very useful.  We
can see the changes using viewcvs:

 http://openscenegraph.org/viewcvs/src/osgUtil/RenderBin.cpp

The changes of interest are:

Revision 1.47 Changed osgUtil::RenderBin and osg::State to allow
nesting of StateSet's associated with RenderBin's.

And a bit latter that day:

Revision 1.48 Added _sorted flag into RenderBin to prevent a bin being
sorted twice in one frame

Do both these changes together break you effect, or might we be able
to isolate the issue down to one of the above changes.

Do you see any problems with the shadow effects such as osgshadowtext,
osgdepthshadow?

Robert.

On 2/14/07, Tugkan Calapoglu <[EMAIL PROTECTED]> wrote:
Hi,

I am upgrading our application from OSG0.99 to the latest CVS version
and ran across my first problem.

First some background:
I implemented shadows using projected shadow textures. Every frame for
each shadow caster the geodes which will receive its shadow are found
and attached to a 'Shadow Receivers Group' which is,in turn, attached to
'Shadow Receivers Root Group'. StateSets in Shadow Receivers Groups set
shadow texture,blending mode and shaders as necessary. Shadow textures
of each shadow caster is rendered by CameraNodes every frame.

Every frame the scene is rendered normally first. Then for each shadow
caster object shadow receiving geodes are blended to the frame buffer
with corresponding object's shadow texture(projected).

The problem is that with the latest CVS version this feature broke. Now
some of the objects cast shadow and others do not. Depending on which
objects are in view this changes. The simplest case I achieved is two
shadow casting cars. Shadows function properly when I view them alone
but if both of them are visible then only one has shadow.

I've tested older CVS versions and found that everything is ok with
2007/01/26 and bug appears on 2007/01/28. Making a diff and applying
changes to the older version step by step I found that the two changes
in RenderBin::drawImplementation() are responsible.

I've attached RenderBin.cpp from both of the above versions to the email.

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/

Reply via email to