Hi Wojtek,
thanks for the hint. Our project supports camera views from the robots
position. But the robots cameranodes are not placed directly beyond the
root node, but as leaves of the graph. So I've implemented a function
which does it automatically, and with all cameranodes. So that was the
problem.
regards
Oliver
Wojciech Lewandowski schrieb:
Hi Oliver,
I have read your email. And, I too, have no idea what might be wrong.
I bet its something beyond the code excerpt you had given. My
only guess is that scene is somehow added to second camera. Do you
clone this second hud camera from main camera maybe ? Could this be
possible that you somehow added scene model into axes.osg ?
I am afraid I am unable to figure it out. Maybe you can post more
lines of your code ?
Cheers,
Wojtek
----- Original Message -----
*From:* Oliver Kutter <mailto:[EMAIL PROTECTED]>
*To:* OpenSceneGraph Users
<mailto:[email protected]>
*Sent:* Tuesday, April 08, 2008 3:53 PM
*Subject:* Re: [osg-users] Two separated subgraphs, 2nd trial
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
Robert Osfield schrieb:
Hi Oliver,
On Tue, Apr 8, 2008 at 1:13 PM, Oliver Kutter <[EMAIL PROTECTED]
<mailto:[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 list
[email protected]
<mailto:[email protected]>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
<mailto:[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
------------------------------------------------------------------------
_______________________________________________
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
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org