[osg-users] Shadow Map

Cedric Pinson mornifle at plopbyte.net
Tue Sep 2 14:28:16 PDT 2008


Humm, it's late i am not very clear in my post.

 >> In my opinion other option is to put ShadowedScene as a subgraph. 
And add
 >> nodes not requiring shadows outside this subgraph. That way node 
mask is not
 >> neccessary at all and shadows won't be cast on these nodes.

With this solution an object that cast shadow will get it's own shadow 
isn't it , i know in most of the case it's what
you want but i would like to avoid when i can for performance reason.
I would like something like a list a of caster and a list of receiver. 
Maybe i could just write a shadowmap
technic that allow that.


thank you guys for the suggestions

Cedric

Cedric Pinson wrote:
> Thanks for the answer,
> ok but in this case object that cast shadow will cast shadow on 
> itself, or i miss something ?
> Maybe it's ok for my current work, but i would like to know if it was 
> possible to avoid.
>
> Cedric
>
> Wojciech Lewandowski wrote:
>> Hi Guys,
>>
>> In my opinion other option is to put ShadowedScene as a subgraph. And 
>> add
>> nodes not requiring shadows outside this subgraph. That way node mask 
>> is not
>> neccessary at all and shadows won't be cast on these nodes.
>>
>> Wojtek Lewandowski
>>
>>
>> Bonjour Cedric,
>>
>>  
>>> It seems that shadow map technique apply the 'shadow receiver' stateset
>>> even if the nodemask has not been flaged to receive the shadow.  Is
>>> there someone who resolve this case ? Or maybe i miss something ?
>>>     
>>
>> osgShadow::ShadowMap only uses the CastShadow nodemask (by including an
>> object in the shadow map RTT or not). It does not use the ReceiveShadow
>> nodemask.
>>
>> One way you can implement this is by replacing the ShadowMap shaders
>> with your own shaders, in which you would have a flag that says if a
>> given subgraph should receive shadows. This flag would be a uniform bool
>> variable, and you would put an osg::Uniform with the appropriate name
>> and a false value in the stateset of the root node of the subgraph where
>> you don't want to receive shadows.
>>
>>  
>>> I read in the mailing list that there will be an ShadowMapStandard that
>>> will replace the actual (2.6) shadowmap technique. I have not seen this
>>> class in the svn yet. I dont know if i should try to resolve the issue
>>> (if it is) in the actual shadowmap or if i should wait because 
>>> something
>>> new will be in svn quickly.
>>>     
>>
>> At this point it is not yet sure that StandardShadowMap will replace
>> osgShadow::ShadowMap. We'll see. There's still some work to be done to
>> work up to that.
>>
>> Hope this helps,
>>
>> J-S
>> -- 
>> ______________________________________________________
>> Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
>>                                 http://www.cm-labs.com/
>>                          http://whitestar02.webhop.org/
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
>>
>>   
>

-- 
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:mornifle at plopbyte.net http://www.plopbyte.net





More information about the osg-users mailing list