[osg-users] OsgViewer stalls in renderingTraversals
Hello, I've just reinstalled OSG 2.8.2 with CMake 2.4 to work in MSVC 7.1 environment. I tried to run a number of examples and all but one stalls in ViewerBase.cpp line 813 from the first frame. The only one I can run is osgeviewerGLUT. All suggestions will be well appreciated MZ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereoscopy in OSG
Thanks a lot JCL and Robert :) Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=3#3 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgPPU related questions
Hi all, I've also experienced a delay issue when using osgPPU combined with Delta3D. All the examples (like the glow) which requires 2 different paths and a final unit combining them, show an offset of at least one frame between the 2 rendering paths. Delta3D should not interfere here, as it leaves all the rendering part to osgViewer. Any hint on the possible cause? Thanks, Ricky On Mon, Mar 14, 2011 at 20:42, Sergey Polischuk wrote: > Ignore pbo part, didnt know it used for external processing, and i dont use > it. > > 14.03.2011, 17:56, "Sergey Polischuk" : > > Hi all, > > > > When i used osgppu i've experienced several frames delay (1 to 3 frames, > not sure if this delay is persistent or it shows up from time to time, > threading mode is singlethreaded) between content of input textures and > units output, f.e. first several rendering frames can output some colored > noise in the end of osgppu pipeline (and input textures are good atm) and > then when picture comes out you get delay in rendering results in several > frames (i mean comparing what you are supposed to get, and what actually > comes out). What can cause this kind of problems? Can it be due to > asynchronous transfers to pbo? > > > > Sergey. > > ___ > > 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 > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenNI(Kinect) and osgAnimation
On 3/21/2011 9:41 AM, Aitor Ardanza wrote: > Ok, I get it!!! > You just have to change the values in the quaternion > Code: > q.set(mat.getRotate().x(),mat.getRotate().z(),mat.getRotate().y(),mat.getRotate().w()); When you guys get this solid, I'd like to discuss with you incorporating your work into a larger library of this sort of Kinect-related code. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] saving camera view state
What about keeping your cameraManipulator using ref_ptr (instead of deleting and creating another one. By the way, your code deals with HOME position, not with current manipulator position. If you will be still lost, look at lexolight.sf.net sources. It uses two manipulators and you can swap between them by using Ctrl. So, the scenario is not the same but the similar to yours - copying manipulator settings from one to the other. Hope it helps, John > Original message > From: "suneel suresh" > Subject: [osg-users] saving camera view state > Date: 20. 3. 2011 20:44:38 > > Hi, i have a case where i need to delete the camera manipulator and i do so > by > > viewer->setCameraManipulator(NULL); > > This freezes the camera movement and camera is locked for some editing > features. Now when i toggle the edit button i do > > viewer->setCameraManipulator(new osgGA::TrackballManipulator); > > But this resets the viewing and looses the current view. So I tried to do > the following > > Code: > > if(isPickMode) > { > viewer->getCameraManipulator()->getHomePosition(vec3_eye, vec3_center, > vec3_up); viewer->setCameraManipulator(NULL); > } > else > { > viewer->setCameraManipulator(new osgGA::TrackballManipulator); > viewer->getCameraManipulator()->setHomePosition(vec3_eye, vec3_center, > vec3_up); } > > > > > But this still resets the view position. How can it set it to the exact > camera view position? > > p.s=> new to osg > ... > > Thank you! > > Cheers, > suneel > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=37754#37754 > > > > > > ___ > 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
Re: [osg-users] OpenNI(Kinect) and osgAnimation
Ok, I get it!!! You just have to change the values in the quaternion Code: q.set(mat.getRotate().x(),mat.getRotate().z(),mat.getRotate().y(),mat.getRotate().w()); And with that, I've managed to make the rotations right! Code: if(!sceneM->getAnimatedModel()->boneMatrices[j]->getName().compare("LeftShoulder")){ mat.set(osg::Matrix::inverse(*jointsTracker.at(SkeletonJoint::TORSO))); mat.postMult(*jointsTracker.at(SkeletonJoint::LEFT_SHOULDER)); q.set(mat.getRotate().x(),mat.getRotate().z(),mat.getRotate().y(),mat.getRotate().w()); mat.setRotate(q); sceneM->getAnimatedModel()->boneMatrices[j]->setMatrix(mat); } -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37773#37773 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] new-bee question on mdl and md2 samples
On 03/19/2011 10:38 PM, Jitrapon Tiachunpun wrote: Hi Jason Daly, I have a similar question to pradeep. I know that you wrote the mdl plug-in for Valve's model to be read in osg. However, after I've done extracting all the model files and texture (vtf) files as exactly as how the original files are organized in the gcf file, when I tried to view the model using osgviewer, it still says that it couldn't find a particular texture file. How exactly do I need to organize the file? Currently I have the following: hl -> models (mdl files are here) materials (vtf files are here) maps After trying to view mdl file, it couldn't find the texture files in materials folder. The simplest way is to point OSG at the root of the hl2 stuff. The loaders know to look in models, materials, or maps for the appropriate content. If you're on Linux (bash) try this: export OSG_FILE_PATH= osgviewer models/ or, on Windows, from a command prompt: set OSG_FILE_PATH= Hope this helps... --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereoscopy in OSG
Hi Mukend, If you are creating the graphics contexts yourself then you'll need to specify the use of the quad buffer stereo in the GraphicsTraits, simply set GraphicsContext::Traits::quadBufferStereo bool to true before you pass the Triats to the createGraphicsContext(Traits*) method. For quad buffer stereo you'll also need to set the Camera DrawBuffer to be left and right for the left and right eye cameras respectively. Robert. On Mon, Mar 21, 2011 at 12:00 PM, Mukund Keshav wrote: > Well, we are using a 120Hz stereo projector and the system has an Nvidia > Quadro card. So, its a typical active stereo setup. > > So, the user would have to wear LCD shutter glasses to view the stereo. We > did try the built in stereo provided by OSG. > > Code: > > osg::DisplaySettings::instance()->setStereo(true); > > osg::DisplaySettings::instance()->setStereoMode(osg::DisplaySettings::AQUAD_BUFFER > ); > > > > But since you had suggested us explicitly doing it using two cameras, i > wanted to know how i could do it. > > Thanks, > Mukund > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=37764#37764 > > > > > > ___ > 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
Re: [osg-users] Light intensity and color
Hi I would recommend you have a good read of the OpenGl docs on how it handles lighting as OSG is a straight pass through to OpenGL For instance http://www.opengl.org/sdk/docs/man/xhtml/glLight.xml http://glprogramming.com/red/chapter05.html As to color you can have any color you in like by using any mixture Red, Green Blue 0,0,0 is black 1.0, 1.0.10 is white, 0.5,0.5,0.5 is a gray 1.0,0.0,0.0 is red etc Note many things affect the final color you see, the lighting model, shading model, colors of the vertices, textures applied to polygons, materials applied etc __ Gordon Tomlinson www.photographybyGordon.com www.gordontomlinson.com www.vis-sim.com "Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival" -Master Tambo Tetsura -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of daniele argiolas Sent: Monday, March 21, 2011 12:03 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Light intensity and color Hi, when I put a light in my scene I notice that I can set position, direction, attenuation and diffuse, specular and ambient components. The first problem is, how can I set intensity of light? My light with this basic setting is to much strong. The second problem concerns color light. Why I can't set intermediate colors but only primary colors? thank you very much daniele -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37765#37765 ___ 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
[osg-users] CompositViewer and WindowManager
Hi all. I am trying to get a WindowManager to work "ontop" of a CompositeViewer with all its views inside one window. I have managed to get it up and running but the widgets act wierd, I can turn them like if they were a node. Is there a way to achieve this or do i have to create a WindowManager for every view in the CompositeViwer and how do i get widgets to move from a view to the other. I found a similar question on http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2010-February/039025.html but nobody seems to have any answers. Regards Nikola R. const unsigned int MASK_2D = 0xF000; const unsigned int MASK_3D = 0x0F00; osg::ref_ptr compositeViewer = new osgViewer::CompositeViewer; osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface(); unsigned width, height; wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height); osg::ref_ptr traits = new osg::GraphicsContext::Traits; traits->x = 200; traits->y = 200; width = width - 400; height = height - 400; traits->width = width; traits->height = height; traits->windowDecoration = true; traits->doubleBuffer = true; traits->sharedContext = 0; traits->overrideRedirect = true; osg::ref_ptr gc = osg::GraphicsContext::createGraphicsContext(traits.get()); osgViewer::View* view0 = new osgViewer::View(); osg::ref_ptr cam0 = view0->getCamera(); cam0->setGraphicsContext(gc.get()); cam0->setViewport(0, 0, width/2, height); cam0->setClearColor(osg::Vec4(0.5f, 0.6f, 0.5f, 1.0f)); osg::Node* model0 = osgDB::readNodeFile("cessna.osg"); model0->setNodeMask(MASK_3D); osg::Group* group0 = new osg::Group; group0->addChild(model0); view0->setSceneData(group0); view0->setName("view0"); view0->setCameraManipulator(new osgGA::TrackballManipulator()); compositeViewer->addView(view0); osgViewer::View* view1 = new osgViewer::View(); osg::ref_ptr cam1 = view1->getCamera(); cam1->setGraphicsContext(gc.get()); cam1->setViewport(width/2, 0, width/2, height); cam1->setClearColor(osg::Vec4(0.5f, 0.5f, 0.6f, 1.0f)); osg::Node* model1 = osgDB::readNodeFile("glider.osg"); model1->setNodeMask(MASK_3D); osg::Group* group1 = new osg::Group; group1->addChild(model1); view1->setSceneData(group1); view1->setName("view1"); view1->setCameraManipulator(new osgGA::TrackballManipulator()); compositeViewer->addView(view1); osgViewer::View* view2 = new osgViewer::View(); view2->setName("view2"); osgWidget::WindowManager* wm = new osgWidget::WindowManager(view2, width, height, MASK_2D); osgWidget::Window* box1 = new osgWidget::Box("HBOX", osgWidget::Box::HORIZONTAL); osgWidget::Label* label = new osgWidget::Label("label", "label"); label->setSize(width, height); label->setColor(1.0f, 1.0f, 0.0f, 1.0f); box1->addWidget(label); box1->attachMoveCallback(); box1->getBackground()->setColor(1.0f, 1.0f, 1.0f, 1.0f); wm->addChild(box1); wm->resizeAllWindows(true); osg::Group* group2 = new osg::Group(); osg::Camera* cam2 = wm->createParentOrthoCamera(); view2->addEventHandler(new osgWidget::MouseHandler(wm)); view2->addEventHandler(new osgWidget::KeyboardHandler(wm)); view2->addEventHandler(new osgWidget::ResizeHandler(wm, cam2)); view2->addEventHandler(new osgWidget::CameraSwitchHandler(wm, cam1)); view2->addEventHandler(new osgViewer::StatsHandler()); view2->addEventHandler(new osgViewer::WindowSizeHandler()); view2->addEventHandler(new osgGA::StateSetManipulator( cam2->getOrCreateStateSet() )); cam2->addChild(wm); cam2->setViewport(0, 0, width, height); cam2->setGraphicsContext(gc.get()); view2->setCamera(cam2); compositeViewer->addView(view2); compositeViewer->run(); return 0; ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereoscopy in OSG
Hi, If you need to specify your own stereo matrices (ie to implement head tracking), you should have a look at osgUtil::SceneView::ComputeStereoMatricesCallback (http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00643.html). It is, I think, the easiest way to specify your own view and projection matrices for each eye. Cheers, jcl Mukund Keshav wrote: Well, we are using a 120Hz stereo projector and the system has an Nvidia Quadro card. So, its a typical active stereo setup. So, the user would have to wear LCD shutter glasses to view the stereo. We did try the built in stereo provided by OSG. Code: osg::DisplaySettings::instance()->setStereo(true); osg::DisplaySettings::instance()->setStereoMode(osg::DisplaySettings::AQUAD_BUFFER ); But since you had suggested us explicitly doing it using two cameras, i wanted to know how i could do it. Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37764#37764 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jean-Christophe Lombardo Espace Immersif DREAM / INRIA 2004 route des Lucioles - BP93 - 06902 Sophia Antipolis Cedex - France http://www.inria.fr/sophia/dream C013 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenNI(Kinect) and osgAnimation
Hi, Is there any easy way to change the axis of rotation matrix XYZ to XZY? I need to swap the values of the rotations between Z and Y axes... Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37766#37766 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Light intensity and color
Hi, when I put a light in my scene I notice that I can set position, direction, attenuation and diffuse, specular and ambient components. The first problem is, how can I set intensity of light? My light with this basic setting is to much strong. The second problem concerns color light. Why I can't set intermediate colors but only primary colors? thank you very much daniele -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37765#37765 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereoscopy in OSG
Well, we are using a 120Hz stereo projector and the system has an Nvidia Quadro card. So, its a typical active stereo setup. So, the user would have to wear LCD shutter glasses to view the stereo. We did try the built in stereo provided by OSG. Code: osg::DisplaySettings::instance()->setStereo(true); osg::DisplaySettings::instance()->setStereoMode(osg::DisplaySettings::AQUAD_BUFFER ); But since you had suggested us explicitly doing it using two cameras, i wanted to know how i could do it. Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37764#37764 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereoscopy in OSG
Hi Mukend, Active stereo will require a quad buffer graphics context, you can't implement it by swapping the contents of the windows yourself. The OSG supports quad buffer stereo graphics context, but... your driver might not. I don'tknow anything about your particular set up so can't comment. Robert. On Mon, Mar 21, 2011 at 11:42 AM, Mukund Keshav wrote: > Hi Robert, > > We are using LCD shutter stereoscopy. So, wont we need to continuously change > left and right images within the same viewport right? Sorry, i must be > getting some things wrong here. So, i would be needing a quad-buffered > enabled GPU to achieve it. > > Won't i need to do something like this (this is from the link i had given) ? > > > > Code: > > // Left eye > glMatrixMode(GL_MODELVIEW); > glDrawBuffer(GL_BACK_RIGHT); > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); > glLoadIdentity(); > gluLookAt(...); > > > // Right eye > glMatrixMode(GL_MODELVIEW); > glDrawBuffer(GL_BACK_LEFT); > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); > glLoadIdentity(); > gluLookAt(...); > > > > > > So, how do i do the exact same thing in OSG? i got to know the setting up > the matrices part, but i couldn't figure out how to specify which buffer to > be used for drawing. i mean an equivalent of glDrawBuffers(). > > Also, if im using viewer->frame, would it be fine? i mean would it swap > buffers in the same way glutSwapBuffers() does? > > > Thanks, > Mukund > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=37762#37762 > > > > > > ___ > 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
Re: [osg-users] Stereoscopy in OSG
Hi Robert, We are using LCD shutter stereoscopy. So, wont we need to continuously change left and right images within the same viewport right? Sorry, i must be getting some things wrong here. So, i would be needing a quad-buffered enabled GPU to achieve it. Won't i need to do something like this (this is from the link i had given) ? Code: // Left eye glMatrixMode(GL_MODELVIEW); glDrawBuffer(GL_BACK_RIGHT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); gluLookAt(...); // Right eye glMatrixMode(GL_MODELVIEW); glDrawBuffer(GL_BACK_LEFT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); gluLookAt(...); So, how do i do the exact same thing in OSG? i got to know the setting up the matrices part, but i couldn't figure out how to specify which buffer to be used for drawing. i mean an equivalent of glDrawBuffers(). Also, if im using viewer->frame, would it be fine? i mean would it swap buffers in the same way glutSwapBuffers() does? Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37762#37762 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenThreads::Mutex works differently on windows and linux
Hi Robert, On 03/21/11 12:29, Robert Osfield wrote: > OpenThreads::ReentrantMutex is a recursive mutex so you could use > this, but use it sparingly as in most threaded code you shouldn't be > re entering the same code. Problem that 3rdparty code already use OpenThreads::Mutex, and we can't change it to OpenThreads::ReentrantMutex. Anyway thanks for the answer :) Mikhail. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenThreads::Mutex works differently on windows and linux
Hi Mikhail, All windows mutexes are in fact recursive/reentrant, while pthread mutexes aren't by default recursive. To make OpenThreads::Mutex work exactly the same under windows and all other operating systems you either have to explictly use recursive mutexes on all platforms or come up with a way of deadlock OpenThreads::Mutex when under windows. OpenThreads::ReentrantMutex is a recursive mutex so you could use this, but use it sparingly as in most threaded code you shouldn't be re entering the same code. Robert. On Sun, Mar 20, 2011 at 12:03 PM, Mikhail I. Izmestev wrote: > Hi *, > > I discovered some strange issue, on windows normal mutex works like recursive > :) > Attached test code which after compilation on linux output: > Mutex not recursive > > and on windows: > Mutex is recursive > > Is this feature or bug? > > Mikhail. > > ___ > 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
Re: [osg-users] Stereoscopy in OSG
Hi Mukund, I am confused why you'd want to render to two scenes on the same viewport, this is only something you'd do with interleaved or anaglyphic stereo. What type of stereo presentation does you hardware require? Robert. On Sat, Mar 19, 2011 at 6:10 PM, Mukund Keshav wrote: > Hi Robert, > > Thanks a lot, > > Well, as you had suggested, im trying to render two views with two slave > cameras. > > This is after modifying an example code. So, in the same window, i render two > different views, a left view and a right view. Just as an example, for the > below code, how do i specify that i need to render one image after an other > in the same viewport? Do i have to continuously keep rendering them? Or do i > specify some settings? > > > Code: > osg::ref_ptr traits = new > osg::GraphicsContext::Traits; > > traits->x = xoffset + 0; > traits->y = yoffset + 0; > traits->width = 600; > traits->height = 480; > traits->windowDecoration = true; > traits->doubleBuffer = true; > traits->sharedContext = 0; > > osg::ref_ptr gc = > osg::GraphicsContext::createGraphicsContext(traits.get()); > > osg::ref_ptr camera = new osg::Camera; > camera->setGraphicsContext(gc.get()); > camera->setViewport(new osg::Viewport(0,0, traits->width, traits->height)); > GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT; > camera->setDrawBuffer(buffer); > camera->setReadBuffer(buffer); > > > // Camera 1 > viewer.addSlave(camera.get(), osg::Matrixd::translate(1.0,0.0,0.0), > osg::Matrixd()); > > > osg::ref_ptr camera1 = new osg::Camera; > camera1->setGraphicsContext(gc.get()); > camera1->setViewport(new osg::Viewport(0,0, traits->width, traits->height)); > camera1->setDrawBuffer(buffer); > camera1->setReadBuffer(buffer); > > // Camera 2 > viewer.addSlave(camera1.get(), osg::Matrixd::translate(-1.0,0.0,0.0), > osg::Matrixd()); > > > > > Thank you! > > Cheers, > Mukund > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=37743#37743 > > > > > > ___ > 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
Re: [osg-users] Using KDtree breaks rendering
Hi Torben, The cull and draw traversals don't use the KdTree data structures at all, and since they only hang off the osg::Drawable leaves of the scene graph they will basically be invisible to all operations on the scene graph unless they explictly look for them. So if enable the build of KdTree is causing a problem then it must be that other parts of the scene graph are being modified somehow. I can't answer how because I've never seen this problem before, and knowing the code I can't think of anywhere that would likely cause a problem like this. I'm afraid you'll just need to dig into the code and try to debug what is happening during the traversal that adds the KdTree's. One thing you could do is write out a copy of the scene graph prior to the addition of the KdTree, and then a copy afterwards to see if there is a difference. Robert. On Sat, Mar 19, 2011 at 4:35 PM, Torben Dannhauer wrote: > Hi, > > i have implemented a psuedo loader recently, which modifies the height values > of the loaded tile. Nothing else. > > If I use this pseudo loader in a plain osgViewer without KDtrees, it llooks > great, everything works. > > If I use if in combination of KDtrees, I have strange rendering effects. If > I zoom in the scene and approach the ground with the camera, the files > directly in fron of the camera are invisible. It seems they are culled away, > but not with a flat near plan, but on a "per tile base". For better > understanding please look at the attached screenshot. > > It happens with all tiles which have modified height values. > It does NOT happen with tiles which were loaded by the pseudo loader but were > unmodified. > > I call > > Code: > > osgDB::Registry::instance()->setBuildKdTreesHint(osgDB::ReaderWriter::Options::BUILD_KDTREES); > > > > before I load the terrain. > > What could be the reason? > > Thank you! > > Cheers, > Torben > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=37742#37742 > > > > > ___ > 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