Hi Jean-Sébastien,

Using a HUD-like system seems to be a extrem solution for me... I am just
looking at a way to set a node always rendered...

For the moment, using the .osg format file to see my stateset, I see that
the culling test still stay ON.


I correct it ; my code is now :

*    node->setCullingActive(false);
    osg::ref_ptr<osg::Depth> depth = new osg::Depth(osg::Depth::NEVER, 0.0,
1.0);
    node->getOrCreateStateSet()->setAttributeAndModes(depth.get(),
osg::StateAttribute::ON);
    node->getOrCreateStateSet()->setMode(GL_DEPTH_TEST,
osg::StateAttribute::OFF);
    node->getOrCreateStateSet()->setRenderBinDetails(1000, "RenderBin");*

my node is now :

*PositionAttitudeTransform {
  UniqueID PositionAttitudeTransform_0
  name "F-GHOP"
  nodeMask 0xffffffff
  cullingActive FALSE
  StateSet {
    UniqueID StateSet_1
    rendering_hint DEFAULT_BIN
    renderBinMode USE
    binNumber 1000
    binName RenderBin
    GL_DEPTH_TEST OFF
    GL_NORMALIZE ON
    Depth {
      UniqueID Depth_2
      function NEVER
      writeMask TRUE
      range 0 1
    }
  }
  UpdateCallbacks {
    NodeCallback {
      name "planeOverTheFloorCallback"
      NodeCallback {
        name "triggerScaleCallback"
      }
    }
  }
...
//with LOD children after.*

And the result... still the same : culling make nothing different.
Am I missing something important ?

thanks,

Regards,
   Vincent.

2008/12/4 Ralph Kern <[EMAIL PROTECTED]>

> Jean-Sébastien Guay schrieb:
> > Hi Vincent,
> >
> > Or perhaps your ground is a very very large sphere where no part of the
> > sphere can be culled away, so the far plane is actually behind the Earth
> > (which is very far away relatively to the distance between the airplane
> > and the ground)...
> >
> > J-S
>
> I second that. Your background sphere (which is the radius of the earth)
> takes away all of the Z-Buffer resolution.
>
> What you would really need is a two pass rendering: Rendering of the
> earth sphere as a "background" with it's own depth range and then the
> air plane as the front scene. So I'd propose a variant of the "HUD"
> approach, but with 3 dimensional geometry for background and front part.
>
> regards Ralph
>
> _______________________________________________
> 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