Re: [osg-users] ShadowMap is wiping out ambient light; how to fix?

2008-05-22 Thread Ben Discoe
- From: Alejandro Segovia Sent: Wednesday, May 21, 2008 5:50 AM Hey Ben, On Tue, May 20, 2008 at 6:20 AM, Ben Discoe [EMAIL PROTECTED] wrote: I noticed that using osgShadow::ShadowMap in my scene makes everything very dark, even nodes not part of the shadowed scene. Studying the OSG

Re: [osg-users] ShadowMap is wiping out ambient light; how to fix?

2008-05-22 Thread Robert Osfield
Hi Ben, Thanks for investigating, with my fix I obviously made the assumption that the ShadowedScene contained the whole scene graph. As for using a separate light, this might well be the best route, one would probably need to keep overwriting it's values each frame from the main one. There

Re: [osg-users] ShadowMap is wiping out ambient light; how to fix?

2008-05-22 Thread Ben Discoe
] [mailto:osg-users- [EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, May 21, 2008 10:15 PM To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap is wiping out ambient light; how to fix? Hi Ben, Thanks for investigating, with my fix I obviously made the assumption

Re: [osg-users] ShadowMap is wiping out ambient light; how to fix?

2008-05-22 Thread Robert Osfield
, with the workaround which is at least some improvement. -Ben -Original Message- From: [EMAIL PROTECTED] [mailto:osg-users- [EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, May 21, 2008 10:15 PM To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap is wiping out ambient

Re: [osg-users] ShadowMap is wiping out ambient light; how to fix?

2008-05-22 Thread Wojciech Lewandowski
ShadowMaping app. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ben Discoe Sent: Thursday, May 22, 2008 11:28 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] ShadowMap is wiping out ambient light; how to fix? Robert, I have found a partial workaround; save

Re: [osg-users] ShadowMap is wiping out ambient light; how to fix?

2008-05-22 Thread Robert Osfield
ShadowMaping app. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ben Discoe Sent: Thursday, May 22, 2008 11:28 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] ShadowMap is wiping out ambient light; how to fix? Robert, I have found

Re: [osg-users] ShadowMap is wiping out ambient light; how to fix?

2008-05-22 Thread Wojciech Lewandowski
Sent: Thursday, May 22, 2008 11:28 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] ShadowMap is wiping out ambient light; how to fix? Robert, I have found a partial workaround; save the light's Ambient value at the top of cull(), and restore it before the bottom of the function

Re: [osg-users] ShadowMap is wiping out ambient light; how to fix?

2008-05-21 Thread Alejandro Segovia
Hey Ben, On Tue, May 20, 2008 at 6:20 AM, Ben Discoe [EMAIL PROTECTED] wrote: I noticed that using osgShadow::ShadowMap in my scene makes everything very dark, even nodes not part of the shadowed scene. Studying the OSG code, i found this in ShadowMap.cpp, in ShadowMap::cull:

[osg-users] ShadowMap is wiping out ambient light; how to fix?

2008-05-20 Thread Ben Discoe
I noticed that using osgShadow::ShadowMap in my scene makes everything very dark, even nodes not part of the shadowed scene. Studying the OSG code, i found this in ShadowMap.cpp, in ShadowMap::cull: const_castosg::Light*(selectLight)-setAmbient(osg::Vec4(0.0f,0.0f,0.0f,1.0f); The