Hi Bart, On 15/12/10 22:53 , Bart Jan Schuit wrote: > Thank you for your quick response. Well when I delete my CameraManipulator > (Trackball), > the screen goes blank (just blue or black background, depending on which > model I load). > So I assumed a Manipulator was needed.
You see nothing because the cameras are not properly set up. The CameraManipulators will by default place the camera so that the entire model is visible. Camera doesn't do that for you. What I usually do first (to get something visible) is to place the camera so it's watching the entire scene: // Get the scene bounding sphere osg::BoundingSphere bsph = scene->getBound(); // Look at the center of the scene osg::Vec3 lookAt = bsph.center(); // Place eye at an appropriate distance 'south' of the look-at point osg::Vec3 eye = lookAt + osg::Vec3(0,-1,0) * bsph.radius() * 1.5f; // Set camera view matrix camera->setViewMatrixAsLookAt(eye, lookAt, osg::Vec3(0,0,1)); > (with what values but also where and how), the projection matrix etc. > Because the view > and projection matrix can only be set via a camera. But I cannot manipulate a > camera > myself, because a Manipulator is defined. That's why I said don't use a Manipulator. The Manipulator is only calling osg::Camera::setViewMatrix* with a properly constructed view matrix, but you can just as well do that yourself. See above. Cheers, /ulrich _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

