Re: [osg-users] Node with different projection/view matrix fixed pipeline
Hi Robert, I have an old code, as you know. Some objects are rendered with OpenGL, but before that the ViewMatrix is set to identity, as the the objects are having their position computed as follow: ObjectPositionView = ViewMatrix * ObjectPosition + 2D Move Vector(x,y) in view space ObjectPositionView already contains the ViewMatrix, so I am feeding it directly to the Open GL. Those object are some billboards but with the option to be moved in the view space, like a 2D move. If I give directly the ObjectPosition to OSG, it works fine with billboards but I don't know how to incorporated the 2D Move Vector, that vector is in the view space. On Thursday, 16 January 2020 10:18:59 UTC+2, Robert Osfield wrote: > > Hi Catalin, > > Could you explain what you are trying to do with the rendering of this > node? What you are attempting to do will guide the best way to implement > what you need. > > Robert. > > On Thu, 16 Jan 2020 at 07:33, Catalin > > wrote: > >> Hi, >> >> Is there a way to change the view matrix or projection matrix for a just >> a specific node in fixed pipeline mode? >> >> >> ___ >> osg-users mailing list >> osg-...@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/2174a736-ca96-4fba-a263-bd4be6d1a8dc%40googlegroups.com. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Node with different projection/view matrix fixed pipeline
Hi Robert, Yes I am using osg::Billboard for that now, but the user in the old code had possibility to move those billboards in view space with the mouse, left,right,up down. The green tags are attached to some other objects, but the user can move it in view space with the mouse, left,right,up down. See the green tags. https://i.imgur.com/bjQnlBq.png On Thu, 16 Jan 2020 at 13:18, Robert Osfield wrote: > Hi Catalin, > > I'm still a bit confused from your explanation. > > Is it simply that you want a 2D overlay on your scene? Have a look at the > osghud example - this uses an osg::Camera to set a user define view and > projection matrix for it's subgraph. > > If you want object to be rendered like billboards within the 3D world then > there is the osg::Billboard and osg::AutoTransform classes. > > Robert. > > On Thu, 16 Jan 2020 at 09:07, Catalin wrote: > >> Hi Robert, >> >> I have an old code, as you know. Some objects are rendered with OpenGL, >> but before that the ViewMatrix is set to identity, as the the objects are >> having their position computed as follow: >> >> ObjectPositionView = ViewMatrix * ObjectPosition + 2D Move Vector(x,y) in >> view space >> >> ObjectPositionView already contains the ViewMatrix, so I am feeding it >> directly to the Open GL. >> >> Those object are some billboards but with the option to be moved in the >> view space, like a 2D move. >> >> If I give directly the ObjectPosition to OSG, it works fine with >> billboards but I don't know how to incorporated the 2D Move Vector, that >> vector is in the view space. >> >> On Thu, 16 Jan 2020 at 10:18, Robert Osfield >> wrote: >> >>> Hi Catalin, >>> >>> Could you explain what you are trying to do with the rendering of this >>> node? What you are attempting to do will guide the best way to implement >>> what you need. >>> >>> Robert. >>> >>> On Thu, 16 Jan 2020 at 07:33, Catalin wrote: >>> >>>> Hi, >>>> >>>> Is there a way to change the view matrix or projection matrix for a >>>> just a specific node in fixed pipeline mode? >>>> >>>> >>>> ___ >>>> 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 >> > ___ > 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] Node with different projection/view matrix fixed pipeline
Hi Robert, I have an old code, as you know. Some objects are rendered with OpenGL, but before that the ViewMatrix is set to identity, as the the objects are having their position computed as follow: ObjectPositionView = ViewMatrix * ObjectPosition + 2D Move Vector(x,y) in view space ObjectPositionView already contains the ViewMatrix, so I am feeding it directly to the Open GL. Those object are some billboards but with the option to be moved in the view space, like a 2D move. If I give directly the ObjectPosition to OSG, it works fine with billboards but I don't know how to incorporated the 2D Move Vector, that vector is in the view space. On Thu, 16 Jan 2020 at 10:18, Robert Osfield wrote: > Hi Catalin, > > Could you explain what you are trying to do with the rendering of this > node? What you are attempting to do will guide the best way to implement > what you need. > > Robert. > > On Thu, 16 Jan 2020 at 07:33, Catalin wrote: > >> Hi, >> >> Is there a way to change the view matrix or projection matrix for a just >> a specific node in fixed pipeline mode? >> >> >> ___ >> 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
[osg-users] Node with different projection/view matrix fixed pipeline
> Hi, > > Is there a way to change the view matrix or projection matrix for a just a > specific node in fixed pipeline mode? > > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Node with different projection/view matrix fixed pipeline
Hi, Is there a way to change the view matrix or projection matrix for a just a specific node in fixed pipeline mode? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Clipping osgText::Text
Hi, Is there a way to clip the rendering of Text by a rectangle without using stencil buffer or clipping planes? Thank you. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] clear stencil buffer
Hi, Is there a way to clear the stencil buffer while drawing happens between nodes? Every node needs its stencil buffer to be cleared in order to use it properly. Thank you, Catalin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Clip plane with osg::ClipNode
It seems there is a bug with osg::ClipNode, by using osg::ClipPlane it fixes the issue. OSG 3.6.3 On Wed, 23 Oct 2019 at 13:48, Catalin wrote: > Hi, > > I have an issue with clipping planes, if you set 2 different clipping > planes to 2 different objects, only the last clipping plane is used. I was > expecting each object to be drawn with its clipping plane. > > osg::ref_ptr clipNode1 = new osg::ClipNode; > clipNode1->addClipPlane(new osg::ClipPlane(0)); > clipNode1->getClipPlane(0)->setClipPlane(1.0, 0.0, 0.0, -2000.0); > > osg::ref_ptr clipNode2 = new osg::ClipNode; > clipNode2->addClipPlane(new osg::ClipPlane(0)); > clipNode2->getClipPlane(0)->setClipPlane(-1.0, 0.0, 0.0, -2000.0); > > osg::ShapeDrawable* s1 = new osg::ShapeDrawable(new > osg::Box(osg::Vec3(2000, 0, 0), 500)); > clipNode1->addChild(s1); > osg::ShapeDrawable* s2 = new osg::ShapeDrawable(new > osg::Box(osg::Vec3(-2000, 0, 0), 500)); > clipNode2->addChild(s2); > > Every box is shown in half because of the clipping plane. > > *Case 1* > root->addChild(clipNode1); > //root->addChild(clipNode2); > > [image: image.png] > > *Case 2* > //root->addChild(clipNode1); > root->addChild(clipNode2); > > [image: image.png] > > *Case 3* > root->addChild(clipNode1); > root->addChild(clipNode2); > > [image: image.png] > > I was expecting both boxes, S1 and S2 to be drawn. > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Clip plane with osg::ClipNode
Hi, I have an issue with clipping planes, if you set 2 different clipping planes to 2 different objects, only the last clipping plane is used. I was expecting each object to be drawn with its clipping plane. osg::ref_ptr clipNode1 = new osg::ClipNode; clipNode1->addClipPlane(new osg::ClipPlane(0)); clipNode1->getClipPlane(0)->setClipPlane(1.0, 0.0, 0.0, -2000.0); osg::ref_ptr clipNode2 = new osg::ClipNode; clipNode2->addClipPlane(new osg::ClipPlane(0)); clipNode2->getClipPlane(0)->setClipPlane(-1.0, 0.0, 0.0, -2000.0); osg::ShapeDrawable* s1 = new osg::ShapeDrawable(new osg::Box(osg::Vec3(2000, 0, 0), 500)); clipNode1->addChild(s1); osg::ShapeDrawable* s2 = new osg::ShapeDrawable(new osg::Box(osg::Vec3(-2000, 0, 0), 500)); clipNode2->addChild(s2); Every box is shown in half because of the clipping plane. *Case 1* root->addChild(clipNode1); //root->addChild(clipNode2); [image: image.png] *Case 2* //root->addChild(clipNode1); root->addChild(clipNode2); [image: image.png] *Case 3* root->addChild(clipNode1); root->addChild(clipNode2); [image: image.png] I was expecting both boxes, S1 and S2 to be drawn. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Fixed pipeline lighting to shaders
Hi, Does OSG has some shaders that replicates the fixed pipeline of OpenGL (1.x) with the 8 lights? Thank you, Catalin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Number of Bins in StatsHandler
Hi, The number of Bins is different under Camera. The one displayed by StatsHandler(Camera) says 6 and if I do a visitor and count the node.getStateSet()->getBinNumber() I get 3: 0, 10, 100. Does the camera creates extra Bins? Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76557#76557 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Geode and Drawable Classes
Hi, In the book that I have it says to use the Geode class to add your geometries, but the osg::Geometry class is extended from osg::Node and it can be added directly on the scene graph and it works. Is there any reason to use osg::Geode? Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76530#76530 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Deactivate cull mask testing
Hi Robert, I was trying to evaluate the impact of cull mask testings on rendering. We have large number of objects, and when hide them by using cull mask on the camera the frame rate goes up only 4-6 fps. I was expecting more. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76526#76526 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Deactivate cull mask testing
Hi, Is there is a way to deactivate the entire part of the engine which it is testing the cull mask for every node? Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76524#76524 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Different colors for a node shared scene graph
Hi, My current solution to this is to have the same geode added twice (each with different color) in scene graph with a common parent and during rendering, by using a cull callback I can choose which geode to cull based on the camera object. I was hoping a more elegant/canonical solution. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76288#76288 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Transparency problem
Hi, - your cube might have wrong triangles/vertices order. Did you create the cube by "hand"? - have you modified the cull settings? The triangles with back face towards the camera need to be culled. - did you create your own camera? Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76287#76287 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Transparency problem
Hi, This might help you, you have to set the hint Code: if (transparent) { geode->getOrCreateStateSet()->setMode(GL_BLEND, osg::StateAttribute::ON); geode->getOrCreateStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); } else { geode->getOrCreateStateSet()->setRenderingHint(osg::StateSet::OPAQUE_BIN); } Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76285#76285 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Different colors for a node shared scene graph
Hi, I have a situation in which I need different colors for a node in different views, scene graph is shared between views. Can you have a different StateSet for a node in different View to change the color? Is this even possible? Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76284#76284 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Image capture in memory
Hi Chris, I would be happy to use FBO, but I have no idea how to! Please give me an example. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76129#76129 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Image capture in memory
Hi, For future reference... OSG (windows at least) supports off screen rendering without any window flashing on the screen by using pbuffer. When you create the Traits object, set traits->pbuffer = true; See example osgscreencapture, see pbuffer-only parameter. Start the example with osgscreencapture --pbuffer-only 512 512 cow.osg Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76126#76126 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-3.6.4 release candidate 3 tagged
Hi, Are there any major issues fixed 3.6.4/3.6 branch? Currently using 3.6.3. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=76102#76102 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Image capture in memory
Hi, osg::Camera::RenderTargetImplementation renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT; ... camera->setRenderTargetImplementation( renderImplementation ); By default it is using FBO, osgposter.cpp line 259 & 315 This example is created with windows in mind I guess, I want a pure example without osgViewer::Viewer being used. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75890#75890 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Image capture in memory
Hi, pbuffer seems to be the old way of doing offscreen rendering. Pbuffers and Frame buffer objects (FBO) are two methods for rendering to an offscreen buffer The major difference between a Pbuffer and an FBO is that each Pbuffer needs its seperate OpenGL context, as opposed to FBOs where you can have as many FBOs as (sanely) possible in one OpenGL context. Pbuffers are older and considered obsolete, the FBO extension is the best method for rendering to textures as of now, in my opinion. By default osgposter uses frame buffer objects: osg::Camera::RenderTargetImplementation renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT; Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75887#75887 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Dragging individual model nodes
Hi, Get this book, it learns basic stufff: https://www.amazon.com/OpenSceneGraph-3-0-Beginners-Rui-Wang/dp/1849512825 Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75886#75886 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Dragging individual model nodes
Hi, You should have your scene graph as follow root - osg::MatrixTransform - osg:Node The matrix is controlling the position of the node. Modify the matrix to modify the node position. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75885#75885 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Image capture in memory
Hi Alberto, This example is half baked as I see it: if you run it: osgposter.exe cow.osg --inactive --use-pbuffer --inactive - suppose to be without windows but it creates a window anyway --use-pbuffer still creates a window This is the code path that I tried to import in my app but no image is generated and it creates a black .bmp image. if you run it: osgposter.exe cow.osg if you can see the cow in a window and you can press 'P' and it captures an image fine to the disk I need a simple example to capture an image off-screen without any windows popping up on screen. This is a basic feature that should be simple implement and understand. Does OSG even support such a basic feature? Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75884#75884 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Dragging individual model nodes
Hi, You have to find the node associated to your object by intersection: osgUtil::LineSegmentIntersector::Intersections ints; bool bHasIntersections = viewer->computeIntersections(viewer->getCamera(), osgUtil::Intersector::WINDOW, x, y, ints, CULL_MASK_HERE); if (bHasIntersections) { const osgUtil::LineSegmentIntersector::Intersection& inter = *(ints.begin()); const osg::NodePath& nodePath = inter.nodePath; unsigned int idx = nodePath.size(); while (idx--) { osg::Node*node =nodePath[idx]; Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75881#75881 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Image capture in memory
Hi, The example is quite complex, it works if I run it. I have two issues: 1) I am trying to copy the code to my app, I cannot get the any image output for some reason 2) It creates windows, I don't want to see windows flashing on the screen while the capture happens I don't understand what it is doing. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75877#75877 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Different views hide/show different nodes shared scene graph
Hi Chris, It has worked, thank you very much. 1) setCullCallback(NodeCallback) on the nodes 2) Implementing void operator()(osg::Node* node, osg::NodeVisitor* nv) { osgUtil::CullVisitor* cullvisitor = dynamic_cast < osgUtil::CullVisitor* >(nv); osg::Camera* pCamera = cullvisitor->getCurrentCamera(); ... if (...) traverse(node, nv); } I could not find nv->asCullVisitor(). I am using OSG 3.4. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75873#75873 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Different views hide/show different nodes shared scene graph
Hi Robert, The object is made up of different sub-types which I can hide/show using the masks. Is works fine with the NodeMask for sub-types and CullMask on the camera. However I need an extra layer to show/hide the entire object. Remember I have a shared graph with multiple views. I have many objects: Obj1, Obj2, ... During the rendering I need to show/hide Obj1, Obj2 etc. This is my problem now and that can be fixed during rendering if I have access to RenderInfo somehow during cull traversal. I know there is bool osg::Drawable::Cullback::cull (osg::NodeVisitor *nv, osg::Drawable *drawable, osg::RenderInfo *renderInfo) but this is called only for osg::Drawable nodes, I need one to be called for every node in the scene graph. Also I see there is osg::Node::setCullCallback() by using NodeCallback but it doesn't have access to RenderInfo or Camera and it doesn't return a bool value. I need a callback with bool as return during cull traversal and to have access to RenderInfo or the camera. Hope this makes sense to you. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75871#75871 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Different views hide/show different nodes shared scene graph
Hi Robert, To hide the objects in views I found this solution: getViewer()->getUpdateVisitor()->setTraversalMask(0b101); // skip update for hidden objects getViewer()->getCamera()->setCullMask(0b101); // cull objects that are hidden This is the solutions that I found for the views. Is this the way to do it? Regarding your solution for the other issue, picking objects, it works by passing the traversal mask to that bool computeIntersections (float x osg::Node::NodeMask traversalMask) like you have said. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75868#75868 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Different views hide/show different nodes shared scene graph
Hi Robert, The only way that I found to add TraversalMask to the camera is by this: viewer.getUpdateVisitor()->setTraversalMask(0x0001) This means some nodes will be skipped during update traversal. But in this book that I read it says there are 4 traversals: 1 event traversal 2 update traversal 3 cull traversal 4 draw traversal My question is: What happens during cull and draw traversal, is the traversal mask used there also? Are some nodes skipped in update traversal but not skipped in the next two traversals? Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75867#75867 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Different views hide/show different nodes shared scene graph
Hi Robert, I was looking of a solution that depends on camera. Because only the view/camera knows which object is hidden. The TraversalMask will do the trick then. I see also a CullMask, guess this is not good and it will not help with the picking issue. My understanding the mask is a 32 bit value, this means I can only have a maximum 32 types of nodes to be shown/hidden because an AND operation is performed? Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75864#75864 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Different views hide/show different nodes shared scene graph
Hi, Does the node mask allow to continue with the the childrens if the current node is masked out? I need to continue the scene graph traversal even if that node is hidden. Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75856#75856 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Different views hide/show different nodes
Hi, I have an old application using OpengGL and I am porting it to OSG. I have one scene graph shared by multiple views. The problem is some views have some objects hidden. My solution: I have used osg::Drawable::CullCallback to hide some objects by implementing virtual bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const; It works great. Is this the canonical way to hide objects with a share scene graph in multiple views? My next problem is picking objects. How do I pick objects in shared scene graph in multiple views when I use CullCallback to hide some objects(nodes) ? How can I make the picker behave like the rendering which used CullCallback ? Thank you! Cheers, Catalin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75853#75853 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Image capture in memory
Hi, What is the canonical way to capture an image of a view to memory with different resolutions? Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75830#75830 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org