Discussion:
[osg-users] Shadow frustum culling
Gedalia Pasternak
2018-10-29 18:43:46 UTC
Permalink
Hi List,
I've noticed that when using a camera for shadow casting it can often cull
out objects that are just outside of the frustum but cast shadows into the
scene. Is there any way to decouple the camera frustum culling calculation
from the rendering one, even just increasing the culling frustum size by
10-15% might help.
Thanks
-Gedalia
--
DI-Guy Engineering Lead, VT MÄK
150 Cambridge Park Drive, 3rd Floor, Cambridge, MA 02140
Robert Osfield
2018-10-29 20:02:30 UTC
Permalink
Hi Gadalia,

The OSG doesn't culling per Camera with each camera's own view frustum used
for culling, this means the shadow camera should only cull things that are
in it's frustum. If it's culling objects that you think should be in the
frustum then perhaps it's just set up with the wrong projection matrix
settings.

Robert
Post by Gedalia Pasternak
Hi List,
I've noticed that when using a camera for shadow casting it can often cull
out objects that are just outside of the frustum but cast shadows into the
scene. Is there any way to decouple the camera frustum culling calculation
from the rendering one, even just increasing the culling frustum size by
10-15% might help.
Thanks
-Gedalia
--
DI-Guy Engineering Lead, VT MÄK
150 Cambridge Park Drive, 3rd Floor, Cambridge, MA 02140
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Terry Welsh
2018-10-29 21:05:32 UTC
Permalink
Gedalia,
If I understand the original question correctly, you're not seeing
shadows that are cast by off-screen objects. I had that exact problem
back around 2006 and Robert solved it with the introduction of the
View class. Sorry, I don't remember the details beyond that and can't
find our old discussion archived anywhere.
- Terry
Post by Robert Osfield
Hi Gadalia,
The OSG doesn't culling per Camera with each camera's own view frustum used
for culling, this means the shadow camera should only cull things that are
in it's frustum. If it's culling objects that you think should be in the
frustum then perhaps it's just set up with the wrong projection matrix
settings.
Robert
Post by Gedalia Pasternak
Hi List,
I've noticed that when using a camera for shadow casting it can often cull
out objects that are just outside of the frustum but cast shadows into the
scene. Is there any way to decouple the camera frustum culling calculation
from the rendering one, even just increasing the culling frustum size by
10-15% might help.
Thanks
-Gedalia
Gedalia Pasternak
2018-10-30 03:46:52 UTC
Permalink
Thanks Terry, yes that’s my exact problem, I have a cascaded shadow map
system for a directional light, where objects just outside the shadow map
frustra don’t alway cast into the shadow map. I’ll take a look at the view
class.
Gedalia
Post by Terry Welsh
Gedalia,
If I understand the original question correctly, you're not seeing
shadows that are cast by off-screen objects. I had that exact problem
back around 2006 and Robert solved it with the introduction of the
View class. Sorry, I don't remember the details beyond that and can't
find our old discussion archived anywhere.
- Terry
Post by Robert Osfield
Hi Gadalia,
The OSG doesn't culling per Camera with each camera's own view frustum
used
Post by Robert Osfield
for culling, this means the shadow camera should only cull things that
are
Post by Robert Osfield
in it's frustum. If it's culling objects that you think should be in the
frustum then perhaps it's just set up with the wrong projection matrix
settings.
Robert
Post by Gedalia Pasternak
Hi List,
I've noticed that when using a camera for shadow casting it can often
cull
Post by Robert Osfield
Post by Gedalia Pasternak
out objects that are just outside of the frustum but cast shadows into
the
Post by Robert Osfield
Post by Gedalia Pasternak
scene. Is there any way to decouple the camera frustum culling
calculation
Post by Robert Osfield
Post by Gedalia Pasternak
from the rendering one, even just increasing the culling frustum size
by
Post by Robert Osfield
Post by Gedalia Pasternak
10-15% might help.
Thanks
-Gedalia
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
DI-Guy Engineering Lead, VT MÄK
150 Cambridge Park Drive, 3rd Floor, Cambridge, MA 02140
Trajce Nikolov NICK
2018-10-30 07:48:27 UTC
Permalink
Hi Gedalia,

is this implementation of the cascaded shadows map something public or you
can share , or it is proprietary
Post by Gedalia Pasternak
Thanks Terry, yes that’s my exact problem, I have a cascaded shadow map
system for a directional light, where objects just outside the shadow map
frustra don’t alway cast into the shadow map. I’ll take a look at the view
class.
Gedalia
Post by Terry Welsh
Gedalia,
If I understand the original question correctly, you're not seeing
shadows that are cast by off-screen objects. I had that exact problem
back around 2006 and Robert solved it with the introduction of the
View class. Sorry, I don't remember the details beyond that and can't
find our old discussion archived anywhere.
- Terry
Post by Robert Osfield
Hi Gadalia,
The OSG doesn't culling per Camera with each camera's own view frustum
used
Post by Robert Osfield
for culling, this means the shadow camera should only cull things that
are
Post by Robert Osfield
in it's frustum. If it's culling objects that you think should be in
the
Post by Robert Osfield
frustum then perhaps it's just set up with the wrong projection matrix
settings.
Robert
Post by Gedalia Pasternak
Hi List,
I've noticed that when using a camera for shadow casting it can often
cull
Post by Robert Osfield
Post by Gedalia Pasternak
out objects that are just outside of the frustum but cast shadows
into the
Post by Robert Osfield
Post by Gedalia Pasternak
scene. Is there any way to decouple the camera frustum culling
calculation
Post by Robert Osfield
Post by Gedalia Pasternak
from the rendering one, even just increasing the culling frustum size
by
Post by Robert Osfield
Post by Gedalia Pasternak
10-15% might help.
Thanks
-Gedalia
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
DI-Guy Engineering Lead, VT MÄK
150 Cambridge Park Drive, 3rd Floor, Cambridge, MA 02140
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
trajce nikolov nick
Loading...