Re: [osg-users] geometry indexes?
HI Akilan, On 17 January 2012 05:04, Akilan Thangamani akilan.thangam...@gmail.com wrote: Is there any easy way to find vertices's index for the shapes like Cone, Cube etc., in osg::shape? Otherwise, should it be done thru graph note book only? The osg::Shape subclasses don't have any vertices they are just primitive shapes. In rendering and intersection testing vertices are created on the fly and never stored. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgViewer::RecordAnimationPath without file
Hello list, osgViewer::RecordAnimationPath will always store the AnimationPath to a file. This looks very limited to me. For my use-case extracting a osg::AnimationPath would be enough and it seems possible to extend the current interface with this functionality. Otherwise it would be nice, if osg::RecordAnimationPath could be used with a stringstream to allow me to store the produced string. Am I overlooking some functionality here? Otherwise I could contribute the modifications. Cheers, Philipp ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgViewer::RecordAnimationPath without file
Hi Phillipp, RecordAnimationPath is just a simple utility class. It's quite easy to roll your own so this may well be the most convenient way for your to do it. Alternatively you could just modify the existing class to just populate an AnimationPath and now write out to disk. Robert. On 17 January 2012 13:19, Philipp Moeller philipp.moel...@geometryfactory.com wrote: Hello list, osgViewer::RecordAnimationPath will always store the AnimationPath to a file. This looks very limited to me. For my use-case extracting a osg::AnimationPath would be enough and it seems possible to extend the current interface with this functionality. Otherwise it would be nice, if osg::RecordAnimationPath could be used with a stringstream to allow me to store the produced string. Am I overlooking some functionality here? Otherwise I could contribute the modifications. Cheers, Philipp ___ 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] Dynamic surface coloring
image-dirty() does it. Thanks JP. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44875#44875 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Is a render to texture master camera critical?
Hello all, A few weeks ago, I want to render my scene into a texture, which I want to use in the final rendering on a screen aligned quad. My first problem was I lost the shadows, because view dependent shadow techniques don't work with nested cameras. So I used a RTT slave camera. Now my Callbacks don't work, because they don't work with slave cameras (no update visistors for slave scene graphs). So now my rtt camera is the master camera and my ortho camera for the quad is a nested camera (see the render_to_texture_scene_graph.png). It looks fine, but I am not sure whether it is a good idea. There are any special explanatory notes for me? Is it a good or bad scene graph pattern for my use case? Cheers Martin -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de attachment: render_to_texture_scene_graph.png___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is a render to texture master camera critical?
Hello Martin, So now my rtt camera is the master camera and my ortho camera for the quad is a nested camera (see the render_to_texture_scene_graph.png). It looks fine, but I am not sure whether it is a good idea. That's always how I've done it too. I think it's fine. For me, the motivation was that I wanted my app to work whether I was doing normal rendering or RTT of the main pass + post effects on a full-screen quad afterwards, so the common factor between the two needed to be that the master camera did the main scene rendering. Then I can switch between the two cases by simply changing the renderTargetImplementation of the main camera, attaching the output texture to the main camera's color buffer, and finally setting the node mask of the child ortho camera (that has the full-screen quad) to non-zero value. Hope this helps, J-S -- __ Jean-Sebastien Guay jean_...@videotron.ca http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Help:what is openGl shader version 140?
Hello, my shader compile stage throws out such warnings: 0(8) : warning C7532: global type sampler2DRect requires #version 140 or later 0(8) : warning C: ... or #extension GL_ARB_texture_rectangle : enable and Then I add #version 140 #extension GL_ARB_texture_rectangle : enable at the very head of the shader file, but the warnings remain. So how can I check whether my programm is able to use #version 140 #extension GL_ARB_texture_rectangle : enable ? Thank you very much in advance. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Help: wrong ouput from frag shader.
Hello, when I write gl_FragColor = vec4(0.174977,0,0,1) in Frag shader, then I get through a related image: float Vec4: (0.176471,0,0,1) so why 0.174977 changed into 0.176471? I think there should be no process there after per fragment operations that can change this element in the rendering pipeline. Blend, alphatest and so on are all disenabled. Thank you in advance! Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is a render to texture master camera critical?
Hello Jean-Sébastien, yes, it helps. :-) thank you very much for your feedback. Cheers Martin Am 17.01.2012 18:21, schrieb Jean-Sébastien Guay: Hello Martin, So now my rtt camera is the master camera and my ortho camera for the quad is a nested camera (see the render_to_texture_scene_graph.png). It looks fine, but I am not sure whether it is a good idea. That's always how I've done it too. I think it's fine. For me, the motivation was that I wanted my app to work whether I was doing normal rendering or RTT of the main pass + post effects on a full-screen quad afterwards, so the common factor between the two needed to be that the master camera did the main scene rendering. Then I can switch between the two cases by simply changing the renderTargetImplementation of the main camera, attaching the output texture to the main camera's color buffer, and finally setting the node mask of the child ortho camera (that has the full-screen quad) to non-zero value. Hope this helps, J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Bringing OSG to Google's Native Client NaCl
Here's a breadcrumb trail for anyone wishing to go the NaCl route. It's a zip containing a detailed list of changes needed for osg 3.0.1, a custom GraphicsWindow derivative (GraphicsWindowNaCl), and a sample application that will render a triangle as shown above. If something is not clear or seems incomplete, don't hesitate to ask! Thanks, Michael The Goods (http://www.mediafire.com/file/ylt55w7nfos820h/OSG_NaCl.zip) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44881#44881 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Place axes at corner
Thanks Robert. The example is not quite suitable on my case because my application is running on MFC window, but I still got some idea from the example to locate the axes on corner. I created a camera for axes geometry and then added as slave to view, but the axes cannot be rotated. Do you know the reason? I want the axes can be rotated when the volume data is rotated, but I would like to keep its size. I mean the size of the axes is not changed when using mouse to zoom the volume data. Is it possible? And any hence to do it . Many thanks. Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Monday, 16 January 2012 8:18 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Place axes at corner Hi Clement, On 16 January 2012 06:14, clement@csiro.au wrote: I have created axes to display on viewer, but I have no idea to place it at the bottom corner of the view. Anyone know how to location the corner of the view? Many thanks. Have a look at the osghud example. 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] Help: wrong ouput from frag shader.
Hi, what format is the texture you are rendering to? If it is UNSIGNED CHAR then your data would be discretised. e.g. 45/255 = 0.176471 jp On 17/01/2012 21:11, wang shuiying wrote: Hello, when I write gl_FragColor = vec4(0.174977,0,0,1) in Frag shader, then I get through a related image: float Vec4: (0.176471,0,0,1) so why 0.174977 changed into 0.176471? I think there should be no process there after per fragment operations that can change this element in the rendering pipeline. Blend, alphatest and so on are all disenabled. Thank you in advance! Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help: wrong ouput from frag shader.
I suppose you are using a normal framebuffer. I this case it is pretty normal, that your original value that is in the image (you unfortunately didn't tell use if the value comes from a texture) doesn't exactly match the value in the framebuffer. Usually the framebuffer has 8bit per color channel, which makes the value of 0.174977 not representable. If you need the exact value to be in the framebuffer you'll have to render it to a floating point buffer via RTT. Also you didn't tell us how you got the result value. There is also the possibility that you read an interpolated/filtered value. If you provide a bit more context someone might be able to help you with your problem Hello, when I write gl_FragColor = vec4(0.174977,0,0,1) in Frag shader, then I get through a related image: float Vec4: (0.176471,0,0,1) so why 0.174977 changed into 0.176471? I think there should be no process there after per fragment operations that can change this element in the rendering pipeline. Blend, alphatest and so on are all disenabled. Thank you in advance! Shuiying ___ 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] Help:what is openGl shader version 140?
Hi, try without the version and just #extension GL_ARB_texture_rectangle : enable jp On 17/01/2012 20:15, wang shuiying wrote: Hello, my shader compile stage throws out such warnings: 0(8) : warning C7532: global type sampler2DRect requires #version 140 or later 0(8) : warning C: ... or #extension GL_ARB_texture_rectangle : enable and Then I add #version 140 #extension GL_ARB_texture_rectangle : enable at the very head of the shader file, but the warnings remain. So how can I check whether my programm is able to use #version 140 #extension GL_ARB_texture_rectangle : enable ? Thank you very much in advance. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help:what is openGl shader version 140?
Hello shuiying, either your card doesn't support glsl version 1.40 or you might have some other error in the shader. GLSL comes in different versions that are (AFAIK) defined by the GPU Architecture/Driver and Base OpenGL version. I had such warning sometimes if there was another problem in the shader, so maybe post the entire shader here or on opengl.org. cheers Sebastian Hello, my shader compile stage throws out such warnings: 0(8) : warning C7532: global type sampler2DRect requires #version 140 or later 0(8) : warning C: ... or #extension GL_ARB_texture_rectangle : enable and Then I add #version 140 #extension GL_ARB_texture_rectangle : enable at the very head of the shader file, but the warnings remain. So how can I check whether my programm is able to use #version 140 #extension GL_ARB_texture_rectangle : enable ? Thank you very much in advance. ___ 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