Agreed, keeping Geometry out of the scene graph's inherent desire to deal
with it as spatial data is a serious issue in OSG.

One solution would be to disable culling on the Geode (as you did above)
and place it under its own dedicated Camera. Kind of heavyweight, though.

Another possibility would be to draw your Geometry from a post-draw
callback, but I haven't tried this.


On Sun, Apr 7, 2013 at 5:07 AM, Anton Fuhrmann <fuhrm...@vrvis.at> wrote:

> Hi,
>
> I need to disable culling on a geode which implements a skydome/plane as a
> shader.
>
> The problem is that the vertex shader places the existing vertices
> screen-aligned at the far plane, but OSG still thinks they are in their
> original positions.
>
> This problem as already been discussed - but not conclusively solved - in
> other threads:
> (cannot post URLs at the moment)
> viewtopic.php?t=20300
> viewtopic.php?t=10912
>
> For this situation, disabling the culling is necessary because I do not
> want the scene to include the "real" positions of the sky plane at
> "infinity". It would defy near/far calculation and I would need to
> introduce a callback that recalculates the positions outside the vertex
> shader just so that the skydome node does not get clipped.
>
> I already tried
> Code:
> Geode->setCullingActive(false)
>
> and
> Code:
> Camera()->setCullingMode( osg::CullSettings::NO_CULLING )
>
>
> but both cull my node as soon as the original vertex positions are behind
> the camera.
>
> My workaround at the moment is to set the initial bounds very large, but
> this is unnecessarily inflates the BBox of the real scene.
>
> Any suggestions would be appreciated!
>
> ...
>
> Thank you!
>
> Cheers,
> Anton
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=53481#53481
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Paul Martz
Skew Matrix Software LLC
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to