Re: [osg-users] ShadowMap problem...

2009-11-20 Thread Wojciech Lewandowski
of your code and models. Cheers, Wojtek From: Wyatt Earp Sent: Friday, November 20, 2009 6:03 AM To: 'OpenSceneGraph Users' Cc: 'Wojciech Lewandowski' Subject: RE: [osg-users] ShadowMap problem... Is this what you meant? Thanks, W From: osg-users-boun...@lists.openscenegraph.org

Re: [osg-users] ShadowMap problem...

2009-11-19 Thread Wyatt Earp
[mailto:osg-users- boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Thursday, November 12, 2009 1:45 PM To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap problem... Hi Wyatt, Any suggestions? Not really. At this point you'll probably have

Re: [osg-users] ShadowMap problem...

2009-11-19 Thread Wojciech Lewandowski
' Subject: Re: [osg-users] ShadowMap problem... Ok... so I did what you suggested mostly... I took the osgshadow example, add my geometry and it worked. I added another shader on the root node of the scenegraph, because in my app, I do that. I took the shaders from ShadowMap.cpp and put them

Re: [osg-users] ShadowMap problem...

2009-11-19 Thread Wyatt Earp
this screenshot directly to my address. Cheers, Wojtek Lewandowski *From:* Wyatt Earp wyattbsearp1...@gmail.com *Sent:* Thursday, November 19, 2009 10:45 PM *To:* 'OpenSceneGraph Users' osg-users@lists.openscenegraph.org *Subject:* Re: [osg-users] ShadowMap problem... Ok... so I did what you

Re: [osg-users] ShadowMap problem...

2009-11-12 Thread Wyatt Earp
Of Jean-Sébastien Guay Sent: Wednesday, November 11, 2009 2:33 PM To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap problem... Hi Wyatt, With the debugHUD in the ShadowMap example, there was just a window which appeared to display the shadow map in gray-scale

Re: [osg-users] ShadowMap problem...

2009-11-12 Thread Wyatt B. S. Earp
I also noticed that the vehicles are all black without the terrain... i.e. just the base test texture, as though they are shadowed completely. W WyattEarp wrote: I think I am about to get this straightened out... I have implemented the LiSPPSM shadow code in my app. My scene consists

Re: [osg-users] ShadowMap problem...

2009-11-12 Thread Jean-Sébastien Guay
Hi Wyatt, Any suggestions? Not really. At this point you'll probably have to trace into OSG to make sure the shadow map traversal is getting to the right objects (i.e. your masks are set correctly), and check your shaders (perhaps even try with the basic shaders that LISPSM uses by default

Re: [osg-users] ShadowMap problem...

2009-11-12 Thread Wojciech Lewandowski
-- From: Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Sent: Thursday, November 12, 2009 8:45 PM To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] ShadowMap problem... Hi Wyatt, Any suggestions? Not really. At this point you'll probably have

Re: [osg-users] ShadowMap problem...

2009-11-11 Thread Jean-Sébastien Guay
Hi Wyatt, When I have one or two objects, say the size of a car, or truck, only. The shadow map looks correct. But when I add my terrain which is approximately x = 5100 by y = 5100, I no longer see the car/truck shadows on the shadow map. Similarly, if I increase the length and width of the

Re: [osg-users] ShadowMap problem...

2009-11-11 Thread Wyatt Earp
To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap problem... Hi Wyatt, When I have one or two objects, say the size of a car, or truck, only. The shadow map looks correct. But when I add my terrain which is approximately x = 5100 by y = 5100, I no longer see the car/truck shadows

Re: [osg-users] ShadowMap problem...

2009-11-11 Thread Wyatt Earp
: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Wednesday, November 11, 2009 8:04 AM To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap problem... Hi Wyatt, When I have one or two objects, say the size

Re: [osg-users] ShadowMap problem...

2009-11-11 Thread Jean-Sébastien Guay
Hi Wyatt, 1. Is there a way I can query the number of texture units available on my GPU via an OSG call? A Google search turned up glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB). Also searching the OSG headers, I found osg::Texture::Extensions::numTextureUnits() which returns a GLint (int). Look

Re: [osg-users] ShadowMap problem...

2009-11-11 Thread Jean-Sébastien Guay
Hi Wyatt, I have changed to a LISPSM shadow technique. OK. I have removed the cast bit from my terrain. The only two objects I have set cast shadow are close together. This should not need to be done when using LISPSM. It's view-dependent, so you don't need to make sure that the shadow

Re: [osg-users] ShadowMap problem...

2009-11-11 Thread Wyatt Earp
Did you check the debugHUD (with LISPSM it's as easy as shadowTechnique-setDebugDraw(true) )? Does it show something that looks valid? I am not sure... With the debugHUD in the ShadowMap example, there was just a window which appeared to display the shadow map in gray-scale, but in the LISPSM

Re: [osg-users] ShadowMap problem...

2009-11-11 Thread Wojciech Lewandowski
Hi Wyatt, Did you check the debugHUD (with LISPSM it's as easy as shadowTechnique-setDebugDraw(true) )? Does it show something that looks valid? I am not sure... With the debugHUD in the ShadowMap example, there was just a window which appeared to display the shadow map in gray-scale, but in

Re: [osg-users] ShadowMap problem...

2009-11-11 Thread Jean-Sébastien Guay
Hi Wojtek, Generally yes, But don't turn them off but rather alter them with your modified shaders. That's useful when the ShadowedScene is the root of the scene, and your entire scene can be rendered with a single shader (or uber-shader with uniforms to select different code paths). But in

Re: [osg-users] ShadowMap problem...

2009-11-11 Thread Wojciech Lewandowski
Generally yes, But don't turn them off but rather alter them with your modified shaders. That's useful when the ShadowedScene is the root of the scene, and your entire scene can be rendered with a single shader (or uber-shader with uniforms to select different code paths). But in some cases

Re: [osg-users] ShadowMap problem...

2009-11-10 Thread Wyatt Earp
, 2009 1:31 PM To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap problem... Hi Wyatt, Any suggestions? I haven't tried your code, but I don't see you calling ShadowMap::setLight() anywhere... Try to add this once your light source is initialized: sm-setLight(ls-getLight()); Other

Re: [osg-users] ShadowMap problem...

2009-11-10 Thread Jean-Sébastien Guay
Hi Wyatt, Thanks, That seem to make some change, instead of a grayish circle, I now see a moving roundish object... Sounds familiar... Han Solo: [flying across the deserts of Tatooine] I think my eyes are getting better. Instead of a big dark blur, I see a big bright blur.

Re: [osg-users] ShadowMap problem...

2009-11-10 Thread Jean-Sébastien Guay
Hi Wyatt, Just have to ask, if you try with only one object and a ground plane (a really simple scene) do you get the same results? I just tested, and your code seems to work. I've attached a source file which is the osgshadow example, with the main() commented out and your code in its

Re: [osg-users] ShadowMap problem...

2009-11-10 Thread Wyatt Earp
No but I'll try it... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Tuesday, November 10, 2009 2:11 PM To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap problem

Re: [osg-users] ShadowMap problem...

2009-11-10 Thread Wyatt Earp
Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Tuesday, November 10, 2009 3:08 PM To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap problem... Hi Wyatt, Just have to ask, if you try

Re: [osg-users] ShadowMap problem...

2009-11-10 Thread Wyatt Earp
...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Tuesday, November 10, 2009 3:08 PM To: OpenSceneGraph Users Subject: Re: [osg-users] ShadowMap problem... Hi Wyatt, Just have to ask, if you try with only one object and a ground plane (a really