Re: [osg-users] osgText::Text darker when rendered on frame buffer
It's fixed! Code: osg::ref_ptr blendFunc = new osg::BlendFunc(osg::BlendFunc::SRC_ALPHA, osg::BlendFunc::DST_ALPHA, osg::BlendFunc::ZERO, osg::BlendFunc::ONE); label->getOrCreateStateSet()->setAttributeAndModes(blendFunc); I didn't know you could/should specify the alpha blending separately. Now it doesn't overwrite the alpha anymore. It also means I HAVE to draw a background for the label first, or else it will not be visible... but that's a minor inconvenience, I don't think my idea "only write alpha when it's higher than destination alpha" is actually possible in openGL. Somehow I assume that it worked that way because it seems intuitive in the situation I am working with.. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60388#60388 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FBO question
On 21 July 2014 19:11, Trajce Nikolov NICK wrote: > if I set my camera to RTT into FBO, will the Camera Read/Write buffers > points to this FBO? > Yes. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Why my submission with a bug fix is ignored?
Got it. Thank you for the quick answer. Cheers, Mikhail -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60387#60387 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] FBO question
Hi Community, if I set my camera to RTT into FBO, will the Camera Read/Write buffers points to this FBO? Thanks a bunch! Nick -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Using plugins inside plugins
Hi, Will answer by myself. This wasn't problem with plugins, just forget to set checking z-buffer for loaded node in my plugin, so quite obvious error :/. So, probably this thread could be deleted (if possible) as not very interesting problem. Thank you! Cheers, Robert -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60384#60384 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Using plugins inside plugins
Hi I have written custom plugin to save/load my scene with custom user data. My solution stores scene tree, but geodes are stored as paths to separate model files (not geometry data). When scene is loaded, geodes are created using such piece of code: Code: osgDB::ReaderWriter* plyReader = osgDB::Registry::instance()->getReaderWriterForExtension("ply"); osgDB::ReaderWriter::ReadResult result; osg::Node* node; if(NULL != plyReader) result = plyReader->readNode(name.toUtf8().constData()); node = result.takeNode(); Models are loaded, but what is strange, seems that normals are inverted. When i use the same way to load particular model directly onto scene, models looks fine. Particular format i'm using is "*.ply" supported by osg plugin. Any idea for such behaviour? Is it safe in general to use plugins in plugin in osg? Thank you! Cheers, Robert -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60380#60380 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText::Text darker when rendered on frame buffer
Hi Bram, >From the sound of it you have a blending issue that is either down to blending being done or the order that things are being written to the colour and depth buffers. As such I wouldn't expect using CompositeView with multiple View to help. It'll be down to the find details of how you set up blending and rendering order. Robert. On 21 July 2014 16:29, Bram Vaessen wrote: > I'm pretty sure I found the problem, but not sure how to fix it (probably > easy for someone with more openGL knowledge ;) > > What I do: > > On the canvas I first draw a full solid background. Now all the alpha > values are 1. > > Then I draw the text on top of that background. Now the problem is: it > seems to replace the alpha values of the buffer with values lower than 1. > > Because if I render the canvas (quad) to the screen using: > > > Code: > gl_FragColor = vec4(color.a, 0,0,1); > > > > > I can clearly see the text as darker than full red on screen. > > So then it makes sense that if I draw this quad to the screen, the lower > alpha values make the text seem less bright... > > But why does it do this, the canvas is already filled with full solid > color and alpha values of one (the rest of the canvas is indeed full red). > Why does the text overwrite the alpha values in the buffer with lower > values? > > Is this expected behavior or...? > > and also: how can I make sure this doesn't happen? > > thanks! > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=60376#60376 > > > > > > ___ > 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] Why my submission with a bug fix is ignored?
Hi Mikhail, Patience please, your submission is being ignored, it's just sitting waiting for me to get to it. FYI, I had a weeks holiday after the 3.2.1 release, had client work to complete last week and have now just got back to looking at submissions. The unpaid work has to be juggled with paid work in this way to make sure bills get paid. Robert. On 21 July 2014 14:56, Mikhail Matrosov wrote: > Hi, > > I have posted a submission with a bug fix me and several other users have > experienced: http://forum.openscenegraph.org/viewtopic.php?t=14029 > > But there is no response during two weeks for now. Why? Am I doing > something wrong? > > Best regards, Mikhail > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=60372#60372 > > > > > > ___ > 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] osgText::Text darker when rendered on frame buffer
I'm pretty sure I found the problem, but not sure how to fix it (probably easy for someone with more openGL knowledge ;) What I do: On the canvas I first draw a full solid background. Now all the alpha values are 1. Then I draw the text on top of that background. Now the problem is: it seems to replace the alpha values of the buffer with values lower than 1. Because if I render the canvas (quad) to the screen using: Code: gl_FragColor = vec4(color.a, 0,0,1); I can clearly see the text as darker than full red on screen. So then it makes sense that if I draw this quad to the screen, the lower alpha values make the text seem less bright... But why does it do this, the canvas is already filled with full solid color and alpha values of one (the rest of the canvas is indeed full red). Why does the text overwrite the alpha values in the buffer with lower values? Is this expected behavior or...? and also: how can I make sure this doesn't happen? thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60376#60376 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText::Text darker when rendered on frame buffer
I'll try the multiple viewer to see if that makes a difference. When I render a texture to the framebuffer, it seems exactly the same as when I render it to the screen, so it seems there is problem of rendering the quad to the screen, or else everything would be different. Could it be that the type of buffer is different between the viewer and the framebuffer object? What is the default 'buffer' type when you use the normal viewer? Maybe I should make sure that is exactly the same as the buffer that is used by the viewer? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60375#60375 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Why my submission with a bug fix is ignored?
Hi Mikhail, You're not doing anything wrong. I guess Robert has some higher priority tasks to attend too. Usually he sort of batch-processes the pending submission before creating a new version. So be patient;-) cheers Sebastian Hi, I have posted a submission with a bug fix me and several other users have experienced: http://forum.openscenegraph.org/viewtopic.php?t=14029 But there is no response during two weeks for now. Why? Am I doing something wrong? Best regards, Mikhail -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60372#60372 ___ 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] Why my submission with a bug fix is ignored?
Hi, I have posted a submission with a bug fix me and several other users have experienced: http://forum.openscenegraph.org/viewtopic.php?t=14029 But there is no response during two weeks for now. Why? Am I doing something wrong? Best regards, Mikhail -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60372#60372 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Disabling cameramanipulator in CompositeViewer
Hi All, In order to provide the guidance for the others and since I discovered it recently I 'd like to point out that there is example for creating 2D ad-hoc manipulator in OSG cookbook which provide paning zooming (scaling) in Chapter 4 Designing a 2D camera manipulator. Regards,Date: Sat, 19 Jul 2014 11:57:50 +0100 From: robert.osfi...@gmail.com To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Disabling cameramanipulator in CompositeViewer On 19 July 2014 11:46, Sonya Blade wrote: Ok Thank you Robert, >The viewer.run() method is a convenience method that is only applicable for straight forward usage I should have catched that one my bad sorry, I would like to know also whether from that point onward, can I achieve the effect of ortho pan/zooming with view matrix on my own ? I'd like to emphasize also that it's a bit intimidating for me to ask that question to you after I've seen all of your responses on net about that topic, Please bear with us. For zooming with an ortho view you will need to modify the projection matrix. I find it best to see the projection matrix as the lens of the Camera. For panning of an ortho view you can also modify the projection matrix as you have done, however, conceptually it starts of mix the concept of view (position of world relative to the camera) and projection matrix (the lens of the camera.) I would generally recommend keeping concepts coherent with implementation to avoid tangling oneself in knots about what one is trying to achieve, so I'd implement zooming as changing the lens via the projection matrix, and panning via setting the view matrix. One little question, you know there is scribe that can be applied to the selected in composite viewer example objects which does an overlay of edge lines + smooth shading on model. When I select a cow there is slight flickering in the scene, not on total view but on the model only is this normal if there are ways to avoid I'd like to know. This is a different topic best addressed in a different thread, so I'll let you kick off another thread for this. Keeping separate threads for separate topics makes it much easier for others to follow and contribute and for other developers that follow along afterwards to find answers to their problems. Robert. ___ 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] Ambiguous defines in Atomic.cpp when compiling with MinGW and GCC
Hi Björn, On 20 July 2014 18:43, Björn Blissing wrote: > I tried both options and they both seem to work. Although I guess some > deeper benchmarking would be in order. Are there any of the examples and/or > datasets that would be good candidates for benchmarking the different > versions? There aren't any tests that specific test the speed to atomic operations, so you'd need to create one. The ref_ptr<> coupled with osg::Referenced would probably be a good place to start as this will be the most common area where atomic are relied upon in the OSG. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText::Text darker when rendered on frame buffer
Hi Bram, Even with the extra info it's still hard to guess what might be amiss. As general notes, if the GUI elements are screen aligned rather than being part of the 3D scene then I'd be inclined to use CompositeViewer and multiple View, one for the 3D view and one for the GUI overlay. As for the cause of the changing in brightness, since you have tried out the global state side we'd have to assume that this isn't affecting things. My best guess now would be that the quad you are rendered the FBO texture with could be introducing the change in colour. Lighting, base colour or texture blending might be to blame. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org