Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)

2008-10-01 Thread Wojciech Lewandowski
Hi Adrian,

I suppose that pluging the LightNode as parent or earlier sibling of 
ShadowedScene should work. OSG handles LightNodes, ClipNodes and TexGenNodes in 
such a way that last such node encounterd in traversal will be used for whole 
render stage during rendering traversal. So there is a chance that your light 
may be processed (culled) after shadowed scene but will still be used for 
lighting computation. However, if light was not processed before ShadowMap   
StandardShadowMap by cull traversal - these techniques will not find such light 
among render stage positional state attributes. In such case they may use other 
light for shadow computation.

I suppose your user light concept may be an approach that will work always but 
it changes standard OSG policy of handling positional state attributes. Lets 
imagine following case: suppose that such the same light will get used by 
lighting and shadow computation. It may bring some discrepancies if happens to 
be preceded by some trransformation. When used with lighting it will be 
premultiplied by inverse model view but when used by shadowing it will be not 
premultiplied. So the lighting direction and shadow casting direction may get 
out of sync. Using this properly would require some knowledge and discipline 
from user. But it may be still worth adding. I would be grateful If Robert or 
others could join this discussion and say what they think.

Cheers,
Wojtek



- Original Message - 
  From: Adrian Egli OpenSceneGraph (3D) 
  To: OpenSceneGraph Users 
  Sent: Tuesday, September 30, 2008 10:17 PM
  Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)


  Hi Wojtek, 

  i didn't get the time slot to test the lighting and the other maps again. but 
if we assume, that we will have a sun light, for what pssm is good (or other 
shadow tech.), we can easy assume that the light doesn't move with a matrix 
transformation, so we set the sun light at a position and a direction, and this 
would be the (global) world pos, so the question can be answered with yes. 

  may the pssm sun light concept (user light) is not a good idea. i don't know. 
how can i force the algorithme to cull the light? 



  2008/9/30 Wojciech Lewandowski [EMAIL PROTECTED]

Adrian,

Does osgShadow::ShadowMap works in the same case ?  I tried to mimic 
osgShadow::ShadowMap functionality. Both osgShadow::StandardShadowMap   
osgShadow::ShadowMap try to lcate the light and compute its proper modelview 
matrix by scanning render stage state attributes. If the light was not culled 
yet it will be not found. In this case algorithm will stick to some other light 
(probably the default one).

I briefly looked at PSSM user light usage. I noticed that PSSM sort of 
treats userLight as ABSOLUTE_RF. It simply takes its location and direction as 
is and  assumes that model view matrix is identity. It also does not check if 
this light was processed by cull traversal, so there is chance we would use one 
light for shadow casting and other light for lighting computations. Is this the 
intention ? If yes, we may add similar functionality.

Cheers,
Wojtek



- Original Message - 
  From: Wojciech Lewandowski 
  To: OpenSceneGraph Users 
  Sent: Monday, September 29, 2008 10:32 PM
  Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow 
maps(LispSM)


  Hi Adrian,

  I will check it. Hopefully tomorrow (tuesday) Maybe I will be able to 
find what is wrong.

  Cheers,
  Wojtek


  [Wojciech Lewandowski]  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Adrian Egli 
OpenSceneGraph (3D)
  Sent: Saturday, September 27, 2008 6:52 PM
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow 
maps(LispSM)


I don't have any shadow, 

my scene look similar to the osgshadow one. but i have a strange 
behaviour. 

pseudo code:
osg::Group g
osg::Lightsource s;

shadowed-addchild(s)
shadowed-addchild(g)

viewer.setData(shadowed) 

i don't have light on, need state set to switch on light ()


s-getOrCreateStateSet()-setAttributeAndModes(m_lightSource_Sun-getLight(),osg::StateAttribute::ON);

and pssm does work, but lispsm not (event with setlight(s-getLight())


adrian 


2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

  Hi,

  What is wrong ? It does not work ? Method accepts Light ptr. If you 
have LightNode simply use getLight() to pass right argument.

  Wojtek
- Original Message - 
From: Adrian Egli OpenSceneGraph (3D) 
To: [EMAIL PROTECTED] ; OpenSceneGraph Users 
Sent: Wednesday, September 24, 2008 10:17 AM
Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow 
maps (LispSM)


Thanks

Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)

2008-10-01 Thread Jean-Sébastien Guay

Hello Wojtek, Adrian,

Lets imagine following case: suppose that such the 
same light will get used by lighting and shadow computation. It may 
bring some discrepancies if happens to be preceded by some 
trransformation. When used with lighting it will be premultiplied by 
inverse model view but when used by shadowing it will be not 
premultiplied. So the lighting direction and shadow casting direction 
may get out of sync. Using this properly would require some knowledge 
and discipline from user. But it may be still worth adding. I would be 
grateful If Robert or others could join this discussion and say what 
they think.


Personally, I think the lighting computations for shadowing should be 
the same as for any other OpenGL application. A light source is 
positional state, you can't just assume it will always be at the top of 
your graph with no transforms above it.


Even if it might be a valid assumption in one case, it's not in general 
because as Wojtek says, if you ever have the case where there is a 
transform above the light source (which is also perfectly valid from an 
OpenGL standpoint) then the scene lighting and shadows won't match.


I think PSSM should be fixed to handle this correctly. At a minimum, any 
such assumptions should be well documented instead of having to read the 
code to find out...


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)

2008-09-30 Thread Wojciech Lewandowski
Adrian,

Does osgShadow::ShadowMap works in the same case ?  I tried to mimic 
osgShadow::ShadowMap functionality. Both osgShadow::StandardShadowMap   
osgShadow::ShadowMap try to lcate the light and compute its proper modelview 
matrix by scanning render stage state attributes. If the light was not culled 
yet it will be not found. In this case algorithm will stick to some other light 
(probably the default one).

I briefly looked at PSSM user light usage. I noticed that PSSM sort of treats 
userLight as ABSOLUTE_RF. It simply takes its location and direction as is and  
assumes that model view matrix is identity. It also does not check if this 
light was processed by cull traversal, so there is chance we would use one 
light for shadow casting and other light for lighting computations. Is this the 
intention ? If yes, we may add similar functionality.

Cheers,
Wojtek



- Original Message - 
  From: Wojciech Lewandowski 
  To: OpenSceneGraph Users 
  Sent: Monday, September 29, 2008 10:32 PM
  Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)


  Hi Adrian,

  I will check it. Hopefully tomorrow (tuesday) Maybe I will be able to find 
what is wrong.

  Cheers,
  Wojtek


  [Wojciech Lewandowski]  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Adrian Egli 
OpenSceneGraph (3D)
  Sent: Saturday, September 27, 2008 6:52 PM
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)


I don't have any shadow, 

my scene look similar to the osgshadow one. but i have a strange behaviour. 

pseudo code:
osg::Group g
osg::Lightsource s;

shadowed-addchild(s)
shadowed-addchild(g)

viewer.setData(shadowed) 

i don't have light on, need state set to switch on light ()


s-getOrCreateStateSet()-setAttributeAndModes(m_lightSource_Sun-getLight(),osg::StateAttribute::ON);

and pssm does work, but lispsm not (event with setlight(s-getLight())


adrian 


2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

  Hi,

  What is wrong ? It does not work ? Method accepts Light ptr. If you have 
LightNode simply use getLight() to pass right argument.

  Wojtek
- Original Message - 
From: Adrian Egli OpenSceneGraph (3D) 
To: [EMAIL PROTECTED] ; OpenSceneGraph Users 
Sent: Wednesday, September 24, 2008 10:17 AM
Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow maps 
(LispSM)


Thanks, 

it doesn't solve my problem. i will have a look into the code as soon 
as i have some time left

adrian 


2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

  Thank You, Adrian

  Lispsm classes derive all methods from StandardShadowMap  
MinimalShadowMap. StandardShadowMap has setLight method. I believe this is what 
you want.

  Cheers,
  Wojtek

   -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Adrian 
Egli OpenSceneGraph (3D)
  Sent: Tuesday, September 23, 2008 10:46 PM
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow maps 
(LispSM)


Sorry, answered to  wrong list 
but here i am right :-) 


Hi all, 

great algorithm. i have just one question. my scene has a lof of 
lighs, but only one should cast shadows. so would it be possible to add a 
method like in parallel splitted shadow map to tell the algorithm witch light 
it should be used for shadow casting. 

please have a short look at : 
_ParallelSplitShadowMap- 
setUserLight(m_sun.get());

this method allow to tell the sun light. :-) for example 

adrian 




  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





-- 

Adrian Egli


  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





-- 

Adrian Egli



--


  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)

2008-09-30 Thread Adrian Egli OpenSceneGraph (3D)
Hi Wojtek,

i didn't get the time slot to test the lighting and the other maps again.
but if we assume, that we will have a sun light, for what pssm is good (or
other shadow tech.), we can easy assume that the light doesn't move with a
matrix transformation, so we set the sun light at a position and a
direction, and this would be the (global) world pos, so the question can be
answered with yes.

may the pssm sun light concept (user light) is not a good idea. i don't
know. how can i force the algorithme to cull the light?


2008/9/30 Wojciech Lewandowski [EMAIL PROTECTED]

  Adrian,

 Does osgShadow::ShadowMap works in the same case ?  I tried to mimic
 osgShadow::ShadowMap functionality. Both osgShadow::StandardShadowMap  
 osgShadow::ShadowMap try to lcate the light and compute its proper modelview
 matrix by scanning render stage state attributes. If the light was not
 culled yet it will be not found. In this case algorithm will stick to some
 other light (probably the default one).

 I briefly looked at PSSM user light usage. I noticed that PSSM sort of
 treats userLight as ABSOLUTE_RF. It simply takes its location and direction
 as is and  assumes that model view matrix is identity. It also does not
 check if this light was processed by cull traversal, so there is chance we
 would use one light for shadow casting and other light for lighting
 computations. Is this the intention ? If yes, we may add similar
 functionality.

 Cheers,
 Wojtek



 - Original Message -

 *From:* Wojciech Lewandowski [EMAIL PROTECTED]
 *To:* OpenSceneGraph Users osg-users@lists.openscenegraph.org
 *Sent:* Monday, September 29, 2008 10:32 PM
 *Subject:* Re: [osg-users] [osg-submissions] View Dependent Shadow
 maps(LispSM)

 Hi Adrian,

 I will check it. Hopefully tomorrow (tuesday) Maybe I will be able to find
 what is wrong.

 Cheers,
 Wojtek


 [Wojciech Lewandowski]  -Original Message-
 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] Behalf Of *Adrian Egli
 OpenSceneGraph (3D)
 *Sent:* Saturday, September 27, 2008 6:52 PM
 *To:* OpenSceneGraph Users
 *Subject:* Re: [osg-users] [osg-submissions] View Dependent Shadow
 maps(LispSM)

  I don't have any shadow,

 my scene look similar to the osgshadow one. but i have a strange behaviour.


 pseudo code:
 osg::Group g
 osg::Lightsource s;

 shadowed-addchild(s)
 shadowed-addchild(g)

 viewer.setData(shadowed)

 i don't have light on, need state set to switch on light ()


 s-getOrCreateStateSet()-setAttributeAndModes(m_lightSource_Sun-getLight(),osg::StateAttribute::ON);

 and pssm does work, but lispsm not (event with setlight(s-getLight())


 adrian

 2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

  Hi,

 What is wrong ? It does not work ? Method accepts Light ptr. If you have
 LightNode simply use getLight() to pass right argument.

 Wojtek

  - Original Message -
 *From:* Adrian Egli OpenSceneGraph (3D) [EMAIL PROTECTED]
   *To:* [EMAIL PROTECTED] ; OpenSceneGraph 
 Usersosg-users@lists.openscenegraph.org
 *Sent:* Wednesday, September 24, 2008 10:17 AM
 *Subject:* Re: [osg-users] [osg-submissions] View Dependent Shadow maps
 (LispSM)

 Thanks,

 it doesn't solve my problem. i will have a look into the code as soon as i
 have some time left

 adrian

 2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

  Thank You, Adrian

 Lispsm classes derive all methods from StandardShadowMap 
 MinimalShadowMap. StandardShadowMap has setLight method. I believe this is
 what you want.

 Cheers,
 Wojtek

  -Original Message-
 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] Behalf Of *Adrian Egli
 OpenSceneGraph (3D)
 *Sent:* Tuesday, September 23, 2008 10:46 PM
 *To:* OpenSceneGraph Users
 *Subject:* Re: [osg-users] [osg-submissions] View Dependent Shadow maps
 (LispSM)

  Sorry, answered to  wrong list
 but here i am right :-)


 Hi all,

 great algorithm. i have just one question. my scene has a lof of lighs,
 but only one should cast shadows. so would it be possible to add a method
 like in parallel splitted shadow map to tell the algorithm witch light it
 should be used for shadow casting.

 please have a short look at :
 _ParallelSplitShadowMap- setUserLight(m_sun.get());

 this method allow to tell the sun light. :-) for example

 adrian



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




 --
 
 Adrian Egli


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




 --
 
 Adrian Egli

  --

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users

Re: [osg-users] [osg-submissions] View Dependent Shadow maps(LispSM)

2008-09-29 Thread Wojciech Lewandowski
Hi Adrian,

I will check it. Hopefully tomorrow (tuesday) Maybe I will be able to find
what is wrong.

Cheers,
Wojtek


[Wojciech Lewandowski]  -Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Adrian Egli
OpenSceneGraph (3D)
Sent: Saturday, September 27, 2008 6:52 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow
maps(LispSM)


  I don't have any shadow,

  my scene look similar to the osgshadow one. but i have a strange
behaviour.

  pseudo code:
  osg::Group g
  osg::Lightsource s;

  shadowed-addchild(s)
  shadowed-addchild(g)

  viewer.setData(shadowed)

  i don't have light on, need state set to switch on light ()

  s-getOrCreateStateSet()-setAttributeAndModes(m_lightSource_Sun-getL
ight(),osg::StateAttribute::ON);

  and pssm does work, but lispsm not (event with setlight(s-getLight())


  adrian


  2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

Hi,

What is wrong ? It does not work ? Method accepts Light ptr. If you have
LightNode simply use getLight() to pass right argument.

Wojtek
  - Original Message -
  From: Adrian Egli OpenSceneGraph (3D)
  To: [EMAIL PROTECTED] ; OpenSceneGraph Users
  Sent: Wednesday, September 24, 2008 10:17 AM
  Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow maps
(LispSM)


  Thanks,

  it doesn't solve my problem. i will have a look into the code as soon
as i have some time left

  adrian


  2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

Thank You, Adrian

Lispsm classes derive all methods from StandardShadowMap 
MinimalShadowMap. StandardShadowMap has setLight method. I believe this is
what you want.

Cheers,
Wojtek

 -Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Adrian Egli
OpenSceneGraph (3D)
Sent: Tuesday, September 23, 2008 10:46 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow
maps (LispSM)


  Sorry, answered to  wrong list
  but here i am right :-)


  Hi all,

  great algorithm. i have just one question. my scene has a lof of
lighs, but only one should cast shadows. so would it be possible to add a
method like in parallel splitted shadow map to tell the algorithm witch
light it should be used for shadow casting.

  please have a short look at :
  _ParallelSplitShadowMap-
  setUserLight(m_sun.get());

  this method allow to tell the sun light. :-) for example

  adrian




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegrap
h.org





  --
  
  Adrian Egli


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g





  --
  
  Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osg-submissions] View Dependent Shadow maps (LispSM)

2008-09-27 Thread Adrian Egli OpenSceneGraph (3D)
I don't have any shadow,

my scene look similar to the osgshadow one. but i have a strange behaviour.

pseudo code:
osg::Group g
osg::Lightsource s;

shadowed-addchild(s)
shadowed-addchild(g)

viewer.setData(shadowed)

i don't have light on, need state set to switch on light ()


s-getOrCreateStateSet()-setAttributeAndModes(m_lightSource_Sun-getLight(),osg::StateAttribute::ON);

and pssm does work, but lispsm not (event with setlight(s-getLight())


adrian

2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

  Hi,

 What is wrong ? It does not work ? Method accepts Light ptr. If you have
 LightNode simply use getLight() to pass right argument.

 Wojtek

 - Original Message -
 *From:* Adrian Egli OpenSceneGraph (3D) [EMAIL PROTECTED]
 *To:* [EMAIL PROTECTED] ; OpenSceneGraph 
 Usersosg-users@lists.openscenegraph.org
 *Sent:* Wednesday, September 24, 2008 10:17 AM
 *Subject:* Re: [osg-users] [osg-submissions] View Dependent Shadow maps
 (LispSM)

 Thanks,

 it doesn't solve my problem. i will have a look into the code as soon as i
 have some time left

 adrian

 2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

  Thank You, Adrian

 Lispsm classes derive all methods from StandardShadowMap 
 MinimalShadowMap. StandardShadowMap has setLight method. I believe this is
 what you want.

 Cheers,
 Wojtek

  -Original Message-
 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] Behalf Of *Adrian Egli
 OpenSceneGraph (3D)
 *Sent:* Tuesday, September 23, 2008 10:46 PM
 *To:* OpenSceneGraph Users
 *Subject:* Re: [osg-users] [osg-submissions] View Dependent Shadow maps
 (LispSM)

  Sorry, answered to  wrong list
 but here i am right :-)


 Hi all,

 great algorithm. i have just one question. my scene has a lof of lighs,
 but only one should cast shadows. so would it be possible to add a method
 like in parallel splitted shadow map to tell the algorithm witch light it
 should be used for shadow casting.

 please have a short look at :
 _ParallelSplitShadowMap- setUserLight(m_sun.get());

 this method allow to tell the sun light. :-) for example

 adrian



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




 --
 
 Adrian Egli


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osg-submissions] View Dependent Shadow maps (LispSM)

2008-09-24 Thread Adrian Egli OpenSceneGraph (3D)
Thanks,

it doesn't solve my problem. i will have a look into the code as soon as i
have some time left

adrian

2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

  Thank You, Adrian

 Lispsm classes derive all methods from StandardShadowMap 
 MinimalShadowMap. StandardShadowMap has setLight method. I believe this is
 what you want.

 Cheers,
 Wojtek

  -Original Message-
 *From:* [EMAIL PROTECTED] [mailto:
 [EMAIL PROTECTED] Behalf Of *Adrian Egli
 OpenSceneGraph (3D)
 *Sent:* Tuesday, September 23, 2008 10:46 PM
 *To:* OpenSceneGraph Users
 *Subject:* Re: [osg-users] [osg-submissions] View Dependent Shadow maps
 (LispSM)

  Sorry, answered to  wrong list
 but here i am right :-)


 Hi all,

 great algorithm. i have just one question. my scene has a lof of lighs, but
 only one should cast shadows. so would it be possible to add a method like
 in parallel splitted shadow map to tell the algorithm witch light it should
 be used for shadow casting.

 please have a short look at :
 _ParallelSplitShadowMap- setUserLight(m_sun.get());

 this method allow to tell the sun light. :-) for example

 adrian



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osg-submissions] View Dependent Shadow maps (LispSM)

2008-09-24 Thread Wojciech Lewandowski
Hi,

What is wrong ? It does not work ? Method accepts Light ptr. If you have 
LightNode simply use getLight() to pass right argument.

Wojtek
  - Original Message - 
  From: Adrian Egli OpenSceneGraph (3D) 
  To: [EMAIL PROTECTED] ; OpenSceneGraph Users 
  Sent: Wednesday, September 24, 2008 10:17 AM
  Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow maps (LispSM)


  Thanks, 

  it doesn't solve my problem. i will have a look into the code as soon as i 
have some time left

  adrian 


  2008/9/24 Wojciech Lewandowski [EMAIL PROTECTED]

Thank You, Adrian

Lispsm classes derive all methods from StandardShadowMap  
MinimalShadowMap. StandardShadowMap has setLight method. I believe this is what 
you want.

Cheers,
Wojtek

 -Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Adrian Egli 
OpenSceneGraph (3D)
Sent: Tuesday, September 23, 2008 10:46 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow maps 
(LispSM)


  Sorry, answered to  wrong list 
  but here i am right :-) 


  Hi all, 

  great algorithm. i have just one question. my scene has a lof of lighs, 
but only one should cast shadows. so would it be possible to add a method like 
in parallel splitted shadow map to tell the algorithm witch light it should be 
used for shadow casting. 

  please have a short look at : 
  _ParallelSplitShadowMap- 
  setUserLight(m_sun.get());

  this method allow to tell the sun light. :-) for example 

  adrian 




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





  -- 
  
  Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osg-submissions] View Dependent Shadow maps ( LispSM)

2008-09-23 Thread Adrian Egli OpenSceneGraph (3D)
Sorry, answered to  wrong list
but here i am right :-)


Hi all,

great algorithm. i have just one question. my scene has a lof of lighs, but
only one should cast shadows. so would it be possible to add a method like
in parallel splitted shadow map to tell the algorithm witch light it should
be used for shadow casting.

please have a short look at :
_ParallelSplitShadowMap-setUserLight(m_sun.get());

this method allow to tell the sun light. :-) for example

adrian





2008/9/23 Adrian Egli OpenSceneGraph (3D) [EMAIL PROTECTED]

 Hi all,

 great algorithm. i have just one question. my scene has a lof of lighs, but
 only one should cast shadows. so would it be possible to add a method like
 in parallel splitted shadow map to tell the algorithm witch light it should
 be used for shadow casting.

 please have a short look at :
 _ParallelSplitShadowMap-setUserLight(m_sun.get());

 this method allow to tell the sun light. :-) for example

 adrian


 2008/9/23 Wojciech Lewandowski [EMAIL PROTECTED]

 Many Thanks Robert,

  I've evaluated so far, it has an occasional glitch on the shadow with
 it disappearing for parts of the scene occasionally, hopefully many
 eye balls will be able to help resolve this.


 I saw this issue. I have not checked exactly what will solve it - but
 expect that it may be related to coarse computation of scene bounds.
 I would guess that switch from default --DrawBounds  to --CullBounds will
 do this.

 Other hypothesis is that extending light casting margin around computed
 scene bounds could help. --minLightMargin 20 option could be used for that.

 When I have more time I will work on some further additions. I have few
 ideas in my sleeve: trapezoidal shadow map and lispsm using not predefined
 formula but implementing numerical solution to shadow texel to pixel
 equation.

 Cheers,
 Wojtek



 ___
 osg-submissions mailing list
 [EMAIL PROTECTED]

 http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org




 --
 
 Adrian Egli




-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osg-submissions] View Dependent Shadow maps (LispSM)

2008-09-23 Thread Wojciech Lewandowski
Thank You, Adrian

Lispsm classes derive all methods from StandardShadowMap  MinimalShadowMap.
StandardShadowMap has setLight method. I believe this is what you want.

Cheers,
Wojtek

 -Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Adrian Egli
OpenSceneGraph (3D)
Sent: Tuesday, September 23, 2008 10:46 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] [osg-submissions] View Dependent Shadow maps
(LispSM)


  Sorry, answered to  wrong list
  but here i am right :-)


  Hi all,

  great algorithm. i have just one question. my scene has a lof of lighs,
but only one should cast shadows. so would it be possible to add a method
like in parallel splitted shadow map to tell the algorithm witch light it
should be used for shadow casting.

  please have a short look at :
  _ParallelSplitShadowMap-
  setUserLight(m_sun.get());

  this method allow to tell the sun light. :-) for example

  adrian


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org