Hi, Sebastian

You should be able to manage this with cull masks on cameras (cullmask on 
camera that render shadowmap to render shadow graph, cullmask for main camera 
to render main graph ), like use 0x1 on shadow graph and camera, 0x2 on main 
graph and camera.

Cheers,
Sergey.

06.07.2011, 17:42, "Sebastian Messerschmidt" <sebastian.messerschm...@gmx.de>:
> Hi Sergey,
>
> Thanks so far for the hints. I was thinking something similar.
> The problem however is how tell the shadow-technique that one graph is
> for casting while the other is for receiving.  Do I have to overwrite
> certain parts of the ShadowedScene class to achive this?
>
> cheers
> Sebastian
>
>>  Hi, Sebastian
>>
>>  I think you can create stateset on top of your shadow casting graph, and 
>> set all state you need to enable and disable explicilty with override flag, 
>> like disable textures, blend, color write, texenv stuff, lighting etc with 
>> appropriate attributes\modes. Also you can copy graph (with DEEP_COPY_NODES 
>> | DEEP_COPY_DRAWABLES), strip statesets out of it completely, and then use 
>> it for rendering.
>>
>>  Cheers, Sergey.
>>  05.07.2011, 22:43, "Sebastian 
>> Messerschmidt"<sebastian.messerschm...@gmx.de>;:
>>>  Hi,
>>>
>>>  Currently I'm trying to improve performance regarding shadow mapping.
>>>  So far I've managed to get reasonable results for large outdoor scenes
>>>  using LightSpacePerspectiveMaps.
>>>  In order to improve performance further, I did come up with the
>>>  following idea:
>>>  As my scene-graph consists of many objects, I'd like to set up a special
>>>  graph which skips all materials and textures not using alpha masking.
>>>  I know that I can skip complete nodes using the traversal mask. The
>>>  question is: how to use a graph which omits most of heavy state changing
>>>  objects to actually change the state.
>>>  E.g. I have a couple of buildings, each using ~200 different state sets
>>>  per individual building type. I'd like to reduce this overload, by
>>>  presenting a optimized graph not performing this state changes during
>>>  shadow traversal. In other words, I want to render the shadow casting
>>>  graph with a lower footprint.
>>>
>>>  So, is there some mechanism to present a different scene graph to the
>>>  ShadowTechniques for shadow casting than for actual rendering?
>>>
>>>  Cheers
>>>  Sebastian
>>>  _______________________________________________
>>>  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
>
> _______________________________________________
> 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

Reply via email to