wops, your truck has to be set to  truck->setNodeMask(
CastsShadowTraversalMask ) only .. was a typo

Nick


On Thu, Apr 10, 2014 at 7:46 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Yann,
>
> from my experience with different shadow maps techniques the best results
> I am getting with open terrain and models is
> with LightSpacePerspectiveShadowMapDB.
>
> To answer your question: probably you have found the masks for shadow
> casting and recieval with setReceivesShadowTraversalMask
> and setCastsShadowTraversalMask methods of ShadowedScene. Then you set
> these masks in the node->setNodeMask. For the terrain you set the nodemask
> to terrain->setNodeMask(CastsShadowTraversalMask |
> ReceivesShadowTraversalMask) and for the truck you do
> truck->setNodeMask(ReceivesShadowTraversalMask)
>
> I have some code I can share if you wish that works well with huge
> terrains and models. Ping me on my email if you want
>
> Nick
>
>
> On Thu, Apr 10, 2014 at 4:27 PM, Yann Takvorian <ytakvor...@virtualsim.com
> > wrote:
>
>> Hi,
>>
>> I have tried to use osgShadow on a terrain database to make it more
>> reallistic but could not get what I want.
>>
>> I started with the osgShadow sample (v3.1.5) and noticed on the island
>> demo (-4) that the shadows where jittering when the light was moving.
>>
>> Then, I replaced the island with an OSG database onto which I added one
>> truck.
>>
>> So, my shadowedScene contains 2 nodes, the osg database node and the
>> truck node.
>>
>> On the final result, I tried several shadow techniques. The ShadowMap is
>> the one I like the most but the result with the moving truck is not
>> satisfactory.
>>
>> I believe that the selfshadowing is the problem because, when the terrain
>> is receving only and the truck is casting, the shadow of the truck is nice,
>> BUT, there is no shadow for all buildings and trees of the database !
>>
>> Is is possible to remove the selfshadowing effect ?
>>
>> Could it be possible to make the terrain apply the shadow on itself,
>> without the truck node, then cast the truck node on the terrain only ? (so
>> that to prevent the terrain from casting shadows on the truck)
>>
>> Any hint would help me.
>> Thanks in advance.
>> ...
>>
>> Thank you!
>>
>> Cheers,
>> Yann
>>
>> ------------------
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=58872#58872
>>
>>
>>
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
>
> --
> trajce nikolov nick
>



-- 
trajce nikolov nick
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to