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

Wojciech Lewandowski lewandowski at ai.com.pl
Tue Sep 30 07:08:10 PDT 2008


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: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org]On 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 <lewandowski at ai.com.pl>

      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: lewandowski at ai.com.pl ; 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 <lewandowski at ai.com.pl>

          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: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org]On 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 at lists.openscenegraph.org
          http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





        -- 
        ********************************************
        Adrian Egli


      _______________________________________________
      osg-users mailing list
      osg-users at lists.openscenegraph.org
      http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





    -- 
    ********************************************
    Adrian Egli



------------------------------------------------------------------------------


  _______________________________________________
  osg-users mailing list
  osg-users at lists.openscenegraph.org
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080930/f25e9dd7/attachment-0003.htm>


More information about the osg-users mailing list