Hi Oliver, The screenshots certainly help understand what is happening at runtime, but like Wojtek I'm still rather foggy on why it shouldn't just be working - if the HUD camera only has the axis subgraph in it this is that should be rendered. The fact it is suggest either a bug in your scene graph set up of in the OSG itself. There are plenty of OSG examples that do something similar without this additional subgraphs so most likely I'd suspect an error in the scene graph setup at your end.
If its a bug on the OSG side then you could try upgrading to 2.x. Robert. On Tue, Apr 8, 2008 at 2:53 PM, Oliver Kutter <[EMAIL PROTECTED]> wrote: > Hi, > > ok, I made some screenshots, which I will explain in detail. > > First I show you the structure of the graph. This is how I set up the > graph: > http://getwww.uni-paderborn.de/~kutter/structure.jpg<http://getwww.uni-paderborn.de/%7Ekutter/structure.jpg> > > As you can see, the camera and the coordinate system axes are in a 2nd > subgraph. > > Now, some screenshot from the application: > > First, what you see in the main window is our lab with a robot at (0,0,0). > The small viewport bottom left is the view from the 2nd camera. > http://getwww.uni-paderborn.de/~kutter/scene1.jpg<http://getwww.uni-paderborn.de/%7Ekutter/scene1.jpg> > > As you can see in the next image, the coordinate system axes, which are a > child of the 2nd camera, are not shown in the main viewport but in the > viewport of the 2nd camera. But the main scene (lab with robot) is also > shown in the 2nd viewport. I don't know why. > http://getwww.uni-paderborn.de/~kutter/scene2.jpg<http://getwww.uni-paderborn.de/%7Ekutter/scene2.jpg> > > I used GL_DEPTH_BUFFER_BIT to ensure that the background of the 2nd > viewport is not visible, so that the main scene is visible through the 2nd > viewport, as you can see here. > http://getwww.uni-paderborn.de/~kutter/scene3.jpg<http://getwww.uni-paderborn.de/%7Ekutter/scene3.jpg> > > Now I want only the coordinate system axes to be shown in the 2nd > viewport. > > I hope you can help me now. And I hope you can see the images. > > regards, > Oliver > > <http://getwww.uni-paderborn.de/%7Ekutter/scene1.jpg><http://getwww.uni-paderborn.de/%7Ekutter/scene2.jpg><http://getwww.uni-paderborn.de/%7Ekutter/scene3.jpg> > <http://getwww.uni-paderborn.de/%7Ekutter/structure.jpg> > > Robert Osfield schrieb: > > Hi Oliver, > > On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > isn't there anybody, who can answer my question (see below)? > > > > I've just re-read you post and can't think of anything to say - as I > really don't know > what specifically is amiss. I'd guess others don't know either. > > Try providing a screen shot to tell us what looks wrong then we might be > able to help you. > > Robert. > > > > > > regards > > Oliver > > > > Oliver Kutter schrieb: > > > > Hi guys, > > > > I have a question concerning the openscenegraph example "osghud". I have > > a similar scene like this example except that I don't want to display hud > > text. Instead I want to render some small coordinate system axes like the > > ones in 3d studio max in the left bottom corner. > > > > I still use openscenegraph 1.2, but I think this is not important for my > > problem. > > > > Now my graph looks like this: I have a sceneview with a camera, a root > > node and the main scene as a child of the root node. > > Now I constructed my stuff like the osghud example: I added a new camera > > to the root node as a new subgraph and then I added my coordinates system > > axes model as a child to that camera so that the axes and the main scene > > are not connected. > > I set up the viewport of that camera (2nd viewport) to the left bottom > > corner with size (100,100) similar to 3d studio max. Finally, my axes are > > displayed in the 2nd viewport, but not in the main scene. That is correct so > > far. > > > > Now my problem is that not only the axes but also the main scene is > > displayed in the 2nd viewport. This shouldn't be like that because the main > > scene is not a child of the 2nd camera. > > > > What am I doing wrong? > > > > These are my parameters which I set to the camera: > > osg::ref_ptr<osg::Node> _axes = > > osgDB::readNodeFile("../data/osg/coordinate_axes.osg"); > > > > _camera->setProjectionMatrix(osg::Matrix::perspective(50.0, 1, 0.1, > > 10000.0)); > > _camera->setViewport(0,0,100,100); > > _camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); > > _camera->setRenderOrder(osg::CameraNode::POST_RENDER); > > _camera->setClearMask(GL_DEPTH_BUFFER_BIT); > > > > _camera->addChild(_axes.get()); > > _root->addChild(_camera.get()); > > > > best regards, > > Oliver > > > > ------------------------------ > > > > _______________________________________________ > > osg-users mailing [EMAIL > > PROTECTED]://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > _______________________________________________ > > osg-users mailing list > > [email protected] > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > ------------------------------ > > _______________________________________________ > osg-users mailing [EMAIL > PROTECTED]://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

