That fixed it. Thanks for the quick reply.

Jason

Robert Osfield wrote:
> Hi Jason,
>
> In principle this should work, but looking at the relevant code in
> src/osg/CullSettings.cpp and src/osgUtil/CullVisitor.cpp it looks like
> the which the settings are inherited, the actual traversal mask of the
> NodeVisitor isn't set up, which is what will be required.  Adding this
> will require a modification to the apply(osg::Camera&) method in
> CullVisitor.cpp.
>
> Something like:
>
>   bool hasSetCullMask =
>         (camera->getInheritanceMask() & osg::CullSettings::CULL_MASK)=0;
>
>   if (hasSetCullMask)
>   {
>       setTraversalMask(camera.getCullMask());
>   }
>
> Please tweak the code and see how you get on,if it fixes the problem
> then please send the working code to osg-submissions so I can
> integrate it.
>
> Robert.
>
> On 4/16/07, Jason K. Howlett <[EMAIL PROTECTED]> wrote:
>> I have a scene graph that contains a number of osg::Camera's that are
>> used to produce shadow maps. There are certain elements of the scene
>> that exist for illustrative purposes and should not be used to create
>> shadows. I have tried using the cullMask to disable the drawing of these
>> elements during shadow map creation with the following:
>>
>> #define SHADOW_CULL_MASK 0x00010000
>> int im = camera->getInheritanceMask();
>> im &= ~(osg::CullSettings::CULL_MASK);
>> camera->setInheritanceMask( im );
>> camera->setCullMask(SHADOW_CULL_MASK);
>>
>> And then for my scene element:
>> element->setNodeMask(1);
>>
>> The osgUtil::SceneView is left with its default settings.
>>
>> This setup does not work however. The element still produces a shadow.
>> Any ideas why this doesn't work?
>>
>> Thanks,
>> Jason
>>
>> -- 
>> Jason K. Howlett
>> U.S. Army Aeroflightdynamics Directorate
>>
>> Phone:  650-604-5374
>> Fax:    650-604-2414
>> mailto: [EMAIL PROTECTED]
>> Mail Stop T12B-2
>> Moffett Field, CA 94035-1000
>>
>> _______________________________________________
>> 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/
>

-- 
Jason K. Howlett
U.S. Army Aeroflightdynamics Directorate

Phone:  650-604-5374
Fax:    650-604-2414
mailto: [EMAIL PROTECTED]
Mail Stop T12B-2 
Moffett Field, CA 94035-1000 

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

Reply via email to