Re: [osg-users] how to improve frame rate of my scene with lots of cubes and cylinders?
Hi, Should this be done within VertexShader using GLSL? I tried to create a light following the osglight example, but it did not make any difference. Cheers, Maurizio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18417#18417 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?
Thrall, Bryan wrote: p...@graphics.cs.uni-sb.de wrote on Monday, October 19, 2009 3:14 AM: The reason you get no update callback in the .osg file is that osganimationnode uses a custom callback, AnimtkUpdateCallback, that the .osg writer doesn't know about. From the OpenSceneGraph-Data .osg files that have animation (such as robot.osg), it looks like osgAnimation::BasicAnimationManager is supported, so you could start with using that instead of AnimtkUpdateCallback. HTH, Had the same guess, but did not manage to get it to work. Example Code would be cool, so I could go on from this point, thx. Unfortunately, I am not familiar with osgAnimation, so I don't really know how to create one. I would recommend looking at the contents of robot.osg and comparing it to the interface of the osgAnimation classes; you could also look at the other osgAnimation examples (osganimationsolid seems to use BasicAnimationManager, for example). I tested that osgAnimation callbacks can be written to files using 'osgconv robot.osg robot2.osg' and they seemed to be written to robot2.osg just fine. Sorry I can't help further. Thx you for your affords, but unfortunately that does not solve the problem. I manage to convert an osg file with callbacks into an osg file with callbacks as well. But I can't figure out what's happening underneath the hood, so that I can not reproduce from scratch. Unfortunately there is no example which is doing this, only osg files with callbacks, or executables. But this functionality is required to write an osg Exporter with osgAnimation support. Cheers, searching for the Pivot of my Soul, PP !!! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Databasepager + multiple views + different camera positions = memory leak?
Hi Sergey, did you forget to attach it? jp sergey leontyev wrote: I have created an example for the memory growth problem. If you have a chance can you please run it with the following command arguments : -3, where is your database main txp file. It creates 3 views. In order to trigger the memory growth problem. First get closer to the terrain slowly ( so it appears) for lets say 2 bottom views. Tilt the camera so it looks down at the terrain. Dont do anything else and watch the memory growth. If memory usage is not growing, try to navigate camera to different places and zoom out further. Thank you! Cheers, sergey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18396#18396 ___ 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. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgEarth - fade layers not working
Hey all, I have a problem using osgEarthUtil::FadeLayerNode in osgearth_1.2_T2009-08-12 compiled against osg 2.8.2. I try using the following code: Code: osgEarthUtil::FadeLayerNode *fadeLayerNode = osgEarthUtil::FadeLayerNode(osgEarthNode-getMap()); for (unsigned int i = 1; i numImageLayers; ++i) fadeLayerNode-setOpacity(i, 0.0f); Yet I can still see all the layers. I've also tried setting elevation update callbacks and that didnt help. I am just following the example of the included osgearth_fadelayers, but I notice that even in this example, when I set all layers to opacity 0.0f, I still can see them. Any ideas? :( -Markus -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18415#18415 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Repeatable rendering of subgraphs, ideas?
Hi all, see also this thread for maybe a different idea. We also need multiple (but variable) passes for an image processing algorithm. http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/49423 regards jp Paul Martz wrote: Art Tevs wrote: P.S. The solution is practicaly for implementing iterative image processing algorithms with osgPPU for example. I've been thinking about the same issue, rendering a subgraph repeatedly with different texture input and FBO setup output, for purposes of depth peeling. Overriding traverse in a custom Group node, or maybe even overriding drawImplementation in a custom Drawable, seems like the way to go. -Paul ___ 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. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Viewer creation and frame() from different threads
Hi all, is it OK to create a viewer in e.g. the main thread and then call frame() from a different thread? We're getting erratic results on Linux vs Windows vs Mac. So I just want to know if this use case is legal. thanks jp -- 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. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Export osgAnimation callbacks into osg files
Art Tevs wrote: Hi Peter, pp wrote: Hi Cedric and thx for fast answer. I replied in the forum already, but waiting for approval. ... Wonder why your message was still not approved? Peter, please change your profile according to our forum rules. I see your email is from our Saarland University, so on questions you can also visit me in the MPI building R219 :) cheers, art P.S. Cedric, sorry if I pollute this thread ;) No, no ... no pollution from my side, just fresh hope :-) When is a good time to find you there ? Cheers, Searching for the Pivot of my Soul, PP !!! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to avoid Z Fighting
Hi, Here 's my problem. My scenegraph contains some big an little objects. But when rendering, I have some Z fighting with coplanar triangles and also, when I place my camera around a little object the znear is to big and my object is cutted. So I have used setNearFarRatio with 0.1. Like this my little object is well int the frustum. But Zfighting appears with big coplanars objects. So I have tried to use setCullingActive(true) and setCullingMode( osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES ) and commenting setNearFarRatio but nothing happens. So, I wonder if I could have access to the objects that are seen by the camera (node visitor or something else), compute their importance in the scene and use setNearFarRatio to avoid this problem of Z fighting. Typically this would be done in the camera callback (when changing camera). May be there is a better solution ? Thank you -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18423#18423 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to generate shadow map out of renderingTraversals ?
Hi Fred, By far the easiest way to do what you want is to use a post draw callback on the RTT Camera, or a pre draw callback on the master callback, and have this draw callback do your custom OpenGL code calls. Robert. On Mon, Oct 19, 2009 at 9:19 PM, Frederic Marmond fmarm...@gmail.com wrote: Thanks Robert, Rendering to texture is ok, it works fine. What I need is to completely split the rendering (pre and others) in 2 very own calls (or find a way to do the same) To explain the context / my need, here is a little documented 'code' : myOwn3DEngine* aCustom3DEngine; osgViewer* myViewer; //init the osg world, add a osg shadowedScene (with osgShadow::ShadowMap technique) [...] //init my own world (aside osg one) [...] //in the application loop: // do all osg render to textures (including shadow map generating) myViewer-prerenderingTraversals(); // I miss this one :) // play with generated textures (like adding shadow of non osg objects in shadow maps) myOwn3DEngine-updateOsgShadowMaps(); // draw my custom 3d engine, with shared shadow map (shadow maps will include osg shadows) myOwn3DEngine-render(); //draw the OSG scene with updated textures (excluding prerendering stages, as they are done few lines above) myViewer-renderingTraversals(); = is there any method to do something like that ? if I call twice the current renderingTraversals(), textures (including shadow maps) will be overwritten at each ? node switch in the graph to enable/disable the rtt camera ? (seems ugly to me) Fred On Mon, Oct 19, 2009 at 9:43 PM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Frederic, Are you familiar with the osgViewer/osg::Camera RTT capabilities? They are very flexible now, you can render subgraphs under an scene graph RTT osg::Camera as a pre rendering stage then switch it off for subsequent frames. Have a look at the osgprerender, osgprerendercubemap examples as well as osgShadow itself. Robert. On Mon, Oct 19, 2009 at 7:52 PM, Frederic Marmond fmarm...@gmail.com wrote: Hi all, I would like to generate a shadow map before the real scene draw, in order to alter it (add 3rd parties objects shadows in it) before applying the shadow map to the 'real' world. The context is that osg is called inside a custom 3D engine, so a post prerender callback won't be enough. How should I achieve that ? is there a way to do only pre-render stages, then others ? thanks in advance Fred ___ 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] Viewer creation and frame() from different threads
Hi J.P, On Tue, Oct 20, 2009 at 7:44 AM, J.P. Delport jpdelp...@csir.co.za wrote: is it OK to create a viewer in e.g. the main thread and then call frame() from a different thread? We're getting erratic results on Linux vs Windows vs Mac. So I just want to know if this use case is legal. I've done this under Linux - the osgqtbrowser example in svn/trunk has the option of creating a background thread form running the frame loop while qt takes control over the main thread. I haven't tested this under Windows or OSX though. OSX I wouldn't be surprised at problems as it has a really stupid limitation of only getting window events from the main thread - you simply can't poll for events in any other thread. I don't know what the status is under Windows though. X11 copes just fine with getting events from any thread in your app - sometimes the oldest tech still totally outstrips the new... Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to avoid Z Fighting
Hi Miguel, The OSG will try to do it's best at optimizing the near/far planes out of the box, but it isn't a magic wand that solves all z fighting issues. There are a range of strategies that you can use to help avoid z fighting, from using depth partitioning (see the osgdepthpartion example) to tweaking your database to avoid issues. I can't say what would be most appropriate as I really don't know enough about your particular apps needs. Robert. On Tue, Oct 20, 2009 at 8:06 AM, Miguel Lokida mlok...@yahoo.fr wrote: Hi, Here 's my problem. My scenegraph contains some big an little objects. But when rendering, I have some Z fighting with coplanar triangles and also, when I place my camera around a little object the znear is to big and my object is cutted. So I have used setNearFarRatio with 0.1. Like this my little object is well int the frustum. But Zfighting appears with big coplanars objects. So I have tried to use setCullingActive(true) and setCullingMode( osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES ) and commenting setNearFarRatio but nothing happens. So, I wonder if I could have access to the objects that are seen by the camera (node visitor or something else), compute their importance in the scene and use setNearFarRatio to avoid this problem of Z fighting. Typically this would be done in the camera callback (when changing camera). May be there is a better solution ? Thank you -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18423#18423 ___ 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] Viewer creation and frame() from different threads
Hi Robert, Robert Osfield wrote: Hi J.P, On Tue, Oct 20, 2009 at 7:44 AM, J.P. Delport jpdelp...@csir.co.za wrote: is it OK to create a viewer in e.g. the main thread and then call frame() from a different thread? We're getting erratic results on Linux vs Windows vs Mac. So I just want to know if this use case is legal. I've done this under Linux - the osgqtbrowser example in svn/trunk has the option of creating a background thread form running the frame loop while qt takes control over the main thread. I haven't tested this under Windows or OSX though. OSX I wouldn't be surprised at problems as it has a really stupid limitation of only getting window events from the main thread - you simply can't poll for events in any other thread. I don't know what the status is under Windows though. X11 copes just fine with getting events from any thread in your app - sometimes the oldest tech still totally outstrips the new... this confirms my findings. Our app runs fine on Linux, on Mac we have to do something in the main thread to make sure the view updates, on Windows we are not sure if it is working or not. I will try osgqtbrowser on Windows and see what happens. Anyone else have reports on osgqtbrowser on Windows? thanks jp Robert. ___ 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. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VRML plug-in
Hi Dat, tien dat tienda...@gmail.com wrote: Hi all, I need to open a wrl model with OpenSceneGraph, but it doesn't have the right plug-in to do the job. I try to search on internet and find this discussion: http://forum.openscenegraph.org/viewtopic.php?t=3576 (about a month ago). I try to follow the instruction mentioned there but am not successful. I got an error saying that it can't find unistd.h - which is a header for Linux, not for Windows Unistd.h is a standard POSIX header. MinGW provides it, I am not sure about Visual C++. (FYI, this header is for zlib-plugin, which is required by vrml plug-in). Anyway, I can't compile the plug-in and would like to ask for some favors. 1. Is there a way to compile vrml plug-in with less pain? What is less pain? OpenVRML has plenty of dependencies because of VRML complexity. There is little we can do about that. IMO, this is why a lot of people are switching over to develop on Linux these days - managing dependencies like this is just so much easier there, compared to Windows. Furthermore, the problem you are facing is nothing to do with VRML plugin but zlib - I am sure you can find a prebuilt copy of it (e.g. here http://gnuwin32.sourceforge.net/packages/zlib.htm). Otherwise, you should be able to build it using MinGW at least. 2. If there is no way, what is the best solution? I'm thinking of converting wrl models to obj or 3ds models, but I need some tools to If your models are relatively simple, you can do it using Blender or 3DS Max. Both can import some limited subset of VRML and export into different formats. Regards, Jan signature.asc Description: This is a digitally signed message part. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VRML plug-in
Hi, Jan Ciger wrote: 2. If there is no way, what is the best solution? I'm thinking of converting wrl models to obj or 3ds models, but I need some tools to If your models are relatively simple, you can do it using Blender or 3DS Max. Both can import some limited subset of VRML and export into different formats. You could also install VirtualBox + Ubuntu + OSG + VRML plugin and then do the conversion straight to .osg. Or just keep a Linux box around for conversion. jp Regards, Jan ___ 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. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to generate shadow map out of renderingTraversals ?
Hi Robert, I already had a look at this, but it's not an option in my case : I really need a way to have 2 distinct calls, one for all pre_render cameras, one for others, each call may be callbacks from the main app. (by the way, I think this would be very helpful for all who use 2 homogeneous 3d engines at a time (OSG aside a custom one)) If I understood correctly ShadowMap and osg stuff, I can generate the osg shadow map texture (the 'first call') like that (in ShadowMap) (*(_camera-getRenderer()))(_camera-getGraphicsContext()); but how may I avoid the camera to re-render when I'll call the Viewer::renderingTraversals ('second call') ? Fred On Tue, Oct 20, 2009 at 9:45 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Fred, By far the easiest way to do what you want is to use a post draw callback on the RTT Camera, or a pre draw callback on the master callback, and have this draw callback do your custom OpenGL code calls. Robert. On Mon, Oct 19, 2009 at 9:19 PM, Frederic Marmond fmarm...@gmail.com wrote: Thanks Robert, Rendering to texture is ok, it works fine. What I need is to completely split the rendering (pre and others) in 2 very own calls (or find a way to do the same) To explain the context / my need, here is a little documented 'code' : myOwn3DEngine* aCustom3DEngine; osgViewer* myViewer; //init the osg world, add a osg shadowedScene (with osgShadow::ShadowMap technique) [...] //init my own world (aside osg one) [...] //in the application loop: // do all osg render to textures (including shadow map generating) myViewer-prerenderingTraversals(); // I miss this one :) // play with generated textures (like adding shadow of non osg objects in shadow maps) myOwn3DEngine-updateOsgShadowMaps(); // draw my custom 3d engine, with shared shadow map (shadow maps will include osg shadows) myOwn3DEngine-render(); //draw the OSG scene with updated textures (excluding prerendering stages, as they are done few lines above) myViewer-renderingTraversals(); = is there any method to do something like that ? if I call twice the current renderingTraversals(), textures (including shadow maps) will be overwritten at each ? node switch in the graph to enable/disable the rtt camera ? (seems ugly to me) Fred On Mon, Oct 19, 2009 at 9:43 PM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Frederic, Are you familiar with the osgViewer/osg::Camera RTT capabilities? They are very flexible now, you can render subgraphs under an scene graph RTT osg::Camera as a pre rendering stage then switch it off for subsequent frames. Have a look at the osgprerender, osgprerendercubemap examples as well as osgShadow itself. Robert. On Mon, Oct 19, 2009 at 7:52 PM, Frederic Marmond fmarm...@gmail.com wrote: Hi all, I would like to generate a shadow map before the real scene draw, in order to alter it (add 3rd parties objects shadows in it) before applying the shadow map to the 'real' world. The context is that osg is called inside a custom 3D engine, so a post prerender callback won't be enough. How should I achieve that ? is there a way to do only pre-render stages, then others ? thanks in advance Fred ___ 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] Write osgAnimation callbacks into osg files - no Information available ?
Hi pp, Did you try to modify an osgAnimation example and add a osgDB::writeNodeFile of the root node to see if it writes the animation correctly in a osg file ? Cheers, Cedric -- +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net On Tue, 2009-10-20 at 08:30 +0200, p...@graphics.cs.uni-sb.de wrote: Thrall, Bryan wrote: p...@graphics.cs.uni-sb.de wrote on Monday, October 19, 2009 3:14 AM: The reason you get no update callback in the .osg file is that osganimationnode uses a custom callback, AnimtkUpdateCallback, that the .osg writer doesn't know about. From the OpenSceneGraph-Data .osg files that have animation (such as robot.osg), it looks like osgAnimation::BasicAnimationManager is supported, so you could start with using that instead of AnimtkUpdateCallback. HTH, Had the same guess, but did not manage to get it to work. Example Code would be cool, so I could go on from this point, thx. Unfortunately, I am not familiar with osgAnimation, so I don't really know how to create one. I would recommend looking at the contents of robot.osg and comparing it to the interface of the osgAnimation classes; you could also look at the other osgAnimation examples (osganimationsolid seems to use BasicAnimationManager, for example). I tested that osgAnimation callbacks can be written to files using 'osgconv robot.osg robot2.osg' and they seemed to be written to robot2.osg just fine. Sorry I can't help further. Thx you for your affords, but unfortunately that does not solve the problem. I manage to convert an osg file with callbacks into an osg file with callbacks as well. But I can't figure out what's happening underneath the hood, so that I can not reproduce from scratch. Unfortunately there is no example which is doing this, only osg files with callbacks, or executables. But this functionality is required to write an osg Exporter with osgAnimation support. Cheers, searching for the Pivot of my Soul, PP !!! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Viewer creation and frame() from different threads
is it OK to create a viewer in e.g. the main thread and then call frame() from a different thread? We're getting erratic results on Linux vs Windows vs Mac. So I just want to know if this use case is legal. I've done this under Linux - the osgqtbrowser example in svn/trunk has the option of creating a background thread form running the frame loop while qt takes control over the main thread. I haven't tested this under Windows or OSX though. OSX I wouldn't be surprised at problems as it has a really stupid limitation of only getting window events from the main thread - you simply can't poll for events in any other thread. I don't know what the status is under Windows though. X11 copes just fine with getting events from any thread in your app - sometimes the oldest tech still totally outstrips the new... this confirms my findings. Our app runs fine on Linux, on Mac we have to do something in the main thread to make sure the view updates, on Windows we are not sure if it is working or not. I will try osgqtbrowser on Windows and see what happens. Anyone else have reports on osgqtbrowser on Windows? thanks jp Windozes is same as Mac, only the owner thread can retrieve events for windows. -- http://www.ssTk.co.uk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Viewer creation and frame() from different threads
Hi Simon, Simon Hammett wrote: I will try osgqtbrowser on Windows and see what happens. Anyone else have reports on osgqtbrowser on Windows? thanks jp Windozes is same as Mac, only the owner thread can retrieve events for windows. can you expand on what you mean by owner. If a thread other than main creates the viewer and that same thread calls frame(), will that work on Windows? jp -- 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. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to avoid Z Fighting
How long is a piece of string, that's the sort of answer to your question.. The are a plethora of techniques you can used to try and mitigate the artifacts of z-fight and lack of precision in the z/depth buffer , a quick Google should throw up quite a lot, as this has been discussed adnosium on many graphics related, sites, lists and forums ( old Performer list, Vega, Creator,OpenGL etc and this list to name but a few) The problem with many techniques is that they are really view dependent, such that even a simple change in viewing distance or angle will cause the unwanted artifacts of z-fighting to appear, typically you need to apply more than one technique and in many cases change what your doing every time you change you viewing position. In the case of coplanar polygons using the polygon offset is one technique that can help at times (GL_POLYGON_OFFSET, glPolygonOffset(...)) Also factor such as the ratio between you far and near clipping planes affect the precision of the z-buffer, the distance from the origin etc Here's a useful link to Steve Bakers' Z-buffer calculate that illustrates how near and far clip planes and distance effect the precision http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Tuesday, October 20, 2009 3:55 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] How to avoid Z Fighting Hi Miguel, The OSG will try to do it's best at optimizing the near/far planes out of the box, but it isn't a magic wand that solves all z fighting issues. There are a range of strategies that you can use to help avoid z fighting, from using depth partitioning (see the osgdepthpartion example) to tweaking your database to avoid issues. I can't say what would be most appropriate as I really don't know enough about your particular apps needs. Robert. On Tue, Oct 20, 2009 at 8:06 AM, Miguel Lokida mlok...@yahoo.fr wrote: Hi, Here 's my problem. My scenegraph contains some big an little objects. But when rendering, I have some Z fighting with coplanar triangles and also, when I place my camera around a little object the znear is to big and my object is cutted. So I have used setNearFarRatio with 0.1. Like this my little object is well int the frustum. But Zfighting appears with big coplanars objects. So I have tried to use setCullingActive(true) and setCullingMode( osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES ) and commenting setNearFarRatio but nothing happens. So, I wonder if I could have access to the objects that are seen by the camera (node visitor or something else), compute their importance in the scene and use setNearFarRatio to avoid this problem of Z fighting. Typically this would be done in the camera callback (when changing camera). May be there is a better solution ? Thank you -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18423#18423 ___ 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Viewer creation and frame() from different threads
2009/10/20 J.P. Delport jpdelp...@csir.co.za: Hi Simon, Simon Hammett wrote: I will try osgqtbrowser on Windows and see what happens. Anyone else have reports on osgqtbrowser on Windows? thanks jp Windozes is same as Mac, only the owner thread can retrieve events for windows. can you expand on what you mean by owner. If a thread other than main creates the viewer and that same thread calls frame(), will that work on Windows? jp Sort of. When a thread first creates a window, windows also creates the message queue for the thread. Windows messages are per thread, so only the thread which owns the window will see the messages for the window in it's event loop, so you can't have another thread process mouse events, etc. The pure gl stuff does work though, so you can draw from another thread. With windows you should really make sure only one thread actually creates windows as if you have multiple windows in different threads the only safe synchronisation primitive is MsgWaitForMultipleObjects which is a huge pain in the butt. I've had a go at doing a properly separately threaded viewer window before and even being extra careful I couldn't stop it dead locking. -- 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. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- http://www.ssTk.co.uk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] is the osg inventor loader broken?
I tried out the file below, and I can confirm all of John's results. Since I use SGI's Inventor instead of Coin, it appears that the bug is in the Inventor plugin, and not Coin. I wonder if it's a problem with 64-bit builds? I have been using Centos 5.2/5.3 on a 64-bit machine for a while now, and my previous use of Inventor was probably on our old 32-bit machines. -Eric On Fri, Oct 9, 2009 at 3:12 PM, John Kelso ke...@nist.gov wrote: Hi, We're running 2.8.2 on a 64-bit Centos system. OSG was configured to use Coin-3.1.1. Not too long ago I ran an old demo using the new releases and noticed that an Inventor file that used to load properly no longer did. Checking around, many others also didn't. Here's a simple example file that demonstrates the problem: #Inventor V2.0 ascii Material { diffuseColor 1 0 0 } Cone { bottomRadius 1 height 2 } Rotation { rotation 1 0 0 3.14159 } Material { diffuseColor 0 1 0 } Cone { bottomRadius 1 height 2 } If you look at this with ivview, also linked with Coin-3.1.1, you see two intersecting cones, red on the bottom and green on the top. If you load this same file with osgviewer you just see the red cone. If you use osgconv to create an osg file from the iv file you see both cones in the osg file with identical vertex data and the green one isn't rotated. I'm surprised I don't see any z-fighting in osgviewer. Anyway, can anyone else try loading this Inventor file and see if it works for them? Many thanks, John ___ 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] [build] How i build the osg dll on WINXP
Yes, though I haven't gone down that route, CMake can generate the Eclipse Mingw files. :-) John Montgomery Medi-CAL Unit, CLSM, Polwarth Bldg., Forresterhill, Aberdeen AB25 2ZD. Web: http://www.abdn.ac.uk/JMVP/ | http://www.abdn.ac.uk/clsm/ The University of Aberdeen is a charity registered in Scotland, No SC013683. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Databasepager + multiple views + different camera positions = memory leak?
Hi, :-* looks like I did forget to attach the file, Thank you! Cheers, sergey BTW are aware of any publicly available Terra Page terrain? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18439#18439 /* OpenSceneGraph example, osgcompositeviewer. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the Software), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include iostream #include osgUtil/Optimizer #include osgDB/ReadFile #include osg/Material #include osg/Geode #include osg/BlendFunc #include osg/Depth #include osg/Projection #include osg/PolygonOffset #include osg/MatrixTransform #include osg/Camera #include osg/FrontFace #include osgText/Text #include osgGA/TrackballManipulator #include osgGA/FlightManipulator #include osgGA/StateSetManipulator #include osgViewer/ViewerEventHandlers #include osgViewer/CompositeViewer #include osgFX/Scribe #include osg/io_utils int main( int argc, char **argv ) { // use an ArgumentParser object to manage the program arguments. osg::ArgumentParser arguments(argc,argv); // read the scene from the list of file specified commandline args. osg::ref_ptrosg::Node scene = osgDB::readNodeFiles(arguments); if (!scene) { std::cout argv[0] : requires filename argument. std::endl; return 1; } // construct the viewer. osgViewer::CompositeViewer viewer(arguments); if (arguments.read(-3) || viewer.getNumViews()==0) { osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface(); if (!wsi) { osg::notify(osg::NOTICE)Error, no WindowSystemInterface available, cannot create windows.std::endl; return 1; } unsigned int width, height; wsi-getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height); osg::ref_ptrosg::GraphicsContext::Traits traits = new osg::GraphicsContext::Traits; traits-x = 100; traits-y = 100; traits-width = 1000; traits-height = 800; traits-windowDecoration = true; traits-doubleBuffer = true; traits-sharedContext = 0; osg::ref_ptrosg::GraphicsContext gc = osg::GraphicsContext::createGraphicsContext(traits.get()); if (gc.valid()) { osg::notify(osg::INFO) GraphicsWindow has been created successfully.std::endl; // need to ensure that the window is cleared make sure that the complete window is set the correct colour // rather than just the parts of the window that are under the camera's viewports gc-setClearColor(osg::Vec4f(0.2f,0.2f,0.6f,1.0f)); gc-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } else { osg::notify(osg::NOTICE) GraphicsWindow has not been created successfully.std::endl; } // view one { osgViewer::View* view = new osgViewer::View; view-setName(View one); viewer.addView(view); view-setSceneData(scene.get()); view-getCamera()-setName(Cam one); view-getCamera()-setViewport(new osg::Viewport(0,0, traits-width/2, traits-height/2)); view-getCamera()-setGraphicsContext(gc.get()); view-getDatabasePager()-setTargetMaximumNumberOfPageLOD(0); // add the state manipulator osg::ref_ptrosgGA::StateSetManipulator statesetManipulator = new osgGA::StateSetManipulator; statesetManipulator-setStateSet(view-getCamera()-getOrCreateStateSet()); view-addEventHandler( statesetManipulator.get() ); view-addEventHandler( new osgViewer::StatsHandler ); view-addEventHandler( new osgViewer::HelpHandler ); view-addEventHandler( new osgViewer::WindowSizeHandler ); view-addEventHandler( new osgViewer::ThreadingHandler ); view-addEventHandler( new osgViewer::RecordCameraPathHandler ); } // view two { osgViewer::View* view = new osgViewer::View;
Re: [osg-users] How to avoid Z Fighting
Thank you for the glPolygonOffset. I haven't though about it. That works well. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18443#18443 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] nvidia sync to vblanc and multiple viewer
Hi David, The osgviewer run as you describe, 60 htz etch and I can also see the tearing problem. (Quadro NVS 295) I thinks it's a Qt related problem: I use the viewerQT / adapterWidget from the osg exemple, so The paint event is call by a Qtimer and force OSG to run in singleThread mode. I dont know how call the swap buffer from different thread, by using a osg::Thread or a Qthread ? How can i call the SwapBuffer with OSG ? Thanks ! Le lundi 19 octobre 2009 à 09:24 -0500, David Fries a écrit : On Mon, Oct 19, 2009 at 11:29:32AM +, Linares Antonin wrote: Hi, I actually use 2 osg::viewer embedded in a Qt window, when i enable the sync to vblanc in nvidia-setting my 2 viewers work's to 30 fps while my refresh rate is 60 htz. (and 3 viewers work's to 20fps ...) Did anybody already experiment this issue ? Maybe it's a driver bug, i use osg 2.8.0 with nvidia 180.29 under linux RHEL 5. Thanks you all. What if you run osgviewer cessna.osg one, two, or three times? I would expect the same 60Hz, 30Hz, 20Hz. In my experience it is graphics card and driver dependent. I'm running an nVidia Quadro FX 3700 with driver 185.18.14 and the multiple osgviewers will each run at 60Hz, but beyond one it isn't always vertical synced as I can see tearing. I'm guessing the logic, but it seems that swap buffers doesn't return until the swap happens, or the swap happend for the previous swap buffers on that context. You could try multithreading your swap buffers calls, that way all threads are waiting for the swap to happen instead of one thread serially waiting on each context to swap. -- --- Linares Antonin ONERA - DCSD ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] nvidia sync to vblanc and multiple viewer
Hi Linares, I believe the issue you are up against is pretty common for single threaded multi-context applications, each swap buffers being issued in a different frame. This behavior will vary across drivers so you may will see variations as you move your applications to different hardware/OS/drivers. There is an OpenGL extension that supports syncronizing of swap buffers across multiple graphics contexts that allows you to assigns contexts to swap groups, the OSG itself doesn't utilize it, but you look into this. I'm afraid I can't recall the name of the extension off the top of my head. Robert. On Tue, Oct 20, 2009 at 5:49 PM, Linares Antonin antonin.lina...@onera.fr wrote: Hi David, The osgviewer run as you describe, 60 htz etch and I can also see the tearing problem. (Quadro NVS 295) I thinks it's a Qt related problem: I use the viewerQT / adapterWidget from the osg exemple, so The paint event is call by a Qtimer and force OSG to run in singleThread mode. I dont know how call the swap buffer from different thread, by using a osg::Thread or a Qthread ? How can i call the SwapBuffer with OSG ? Thanks ! Le lundi 19 octobre 2009 à 09:24 -0500, David Fries a écrit : On Mon, Oct 19, 2009 at 11:29:32AM +, Linares Antonin wrote: Hi, I actually use 2 osg::viewer embedded in a Qt window, when i enable the sync to vblanc in nvidia-setting my 2 viewers work's to 30 fps while my refresh rate is 60 htz. (and 3 viewers work's to 20fps ...) Did anybody already experiment this issue ? Maybe it's a driver bug, i use osg 2.8.0 with nvidia 180.29 under linux RHEL 5. Thanks you all. What if you run osgviewer cessna.osg one, two, or three times? I would expect the same 60Hz, 30Hz, 20Hz. In my experience it is graphics card and driver dependent. I'm running an nVidia Quadro FX 3700 with driver 185.18.14 and the multiple osgviewers will each run at 60Hz, but beyond one it isn't always vertical synced as I can see tearing. I'm guessing the logic, but it seems that swap buffers doesn't return until the swap happens, or the swap happend for the previous swap buffers on that context. You could try multithreading your swap buffers calls, that way all threads are waiting for the swap to happen instead of one thread serially waiting on each context to swap. -- --- Linares Antonin ONERA - DCSD ___ 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] instanced geometry - per instance data
Hi, I'm currently trying to render lots of instanced geometry and i need to setup some data for each instance (at least one 4x4 matrix :) Is there support for using uniform buffer objects in OSG? Or may be there are some another way to set per instance data in OSG to get it in shader without using plain opengl code? Thank you! Cheers, Sergey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18446#18446 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Repeatable rendering of subgraphs, ideas?
Hi folks, J.P: thanks, but it seems that this is a little bit different problem. Hmm, it seems that state sorting prevents me of repeated rendering of several things at the same time. For example: two nodes are being gathered by the CullVisitor and placed into the stategraph for rendering. However, the stateset of each node is not changed. Hence I got rendering like this one (for three iterations): A A A B B B. But I would like to have: A B A B A B. Is there a way to disable state sorting? The one way, which I found in the archives is to use the SceneGraphOrderRenderBin. This bin seems to be the perfect one for osgPPU, because I always need an unsorted graph in that case. However, I wasn't able to find SceneGraphOrderRenderBin in the source code. Has it not been submitted or where should I look for it? Thanks in advance, Art -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18447#18447 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Repeatable rendering of subgraphs, ideas?
Hi Art, The support for SceneGraphOrderRenderBin is only in svn/trunk. Robert. On Tue, Oct 20, 2009 at 5:41 PM, Art Tevs arti_t...@yahoo.de wrote: Hi folks, J.P: thanks, but it seems that this is a little bit different problem. Hmm, it seems that state sorting prevents me of repeated rendering of several things at the same time. For example: two nodes are being gathered by the CullVisitor and placed into the stategraph for rendering. However, the stateset of each node is not changed. Hence I got rendering like this one (for three iterations): A A A B B B. But I would like to have: A B A B A B. Is there a way to disable state sorting? The one way, which I found in the archives is to use the SceneGraphOrderRenderBin. This bin seems to be the perfect one for osgPPU, because I always need an unsorted graph in that case. However, I wasn't able to find SceneGraphOrderRenderBin in the source code. Has it not been submitted or where should I look for it? Thanks in advance, Art -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18447#18447 ___ 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] Rendering a depth texture quickly
Hello everyone, I've implemented a feature that is similar to shadow mapping in that I first have to render the scene from another point of view, and this rendering is depth-only. I'm not using it for shadows, but this first depth-only pass is conceptually the same. So right now, I have all the objects in the scene arranged in a subgraph, and this subgraph is attached to the viewer, as well as to a pre-render camera, which renders the depth texture. And one thing I'm wondering about is, it seems like this is inefficient, because during that first pass, I only need the depth. So, there's no need to actually set sample any textures, or do any other effects that these objects in the subgraph would normally use when rendering. Is it possible to perhaps override the normal rendering of the entire subgraph by, perhaps, setting the objects to use a simple set of shaders that does nothing but transform the vertices and render the depth? Could I do this using the camera node? Thanks, Frank Sullivan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18449#18449 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] instanced geometry - per instance data
Sergey Polischuk wrote: I'm currently trying to render lots of instanced geometry and i need to setup some data for each instance (at least one 4x4 matrix :) Is there support for using uniform buffer objects in OSG? Or may be there are some another way to set per instance data in OSG to get it in shader without using plain opengl code? UBOs are presently not supported, but it's something I'm considering adding support for sometime over the next year. Uniform arrays would be another option, but there are upper bounds (varies by hardware) on the max array size. If you're drawing a few instances, you're probably OK using uniform arrays, but for several thousands of instances you should probably organize your data as a texture object and index into it from the vertex shader using texture coordinates derived from the instance ID. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering a depth texture quickly
Frank Sullivan wrote: Is it possible to perhaps override the normal rendering of the entire subgraph by, perhaps, setting the objects to use a simple set of shaders that does nothing but transform the vertices and render the depth? Could I do this using the camera node? Yes, that'sexactly what you'd do. Not sure what you mean by Could I do this using the camera node?; Camera nodes do have StateSets that store shaders, if that's what you mean. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] is the osg inventor loader broken?
Hi, We just tried it on a 32 bit system and had the same incorrect results. John On Tue, 20 Oct 2009, Eric Sokolowsky wrote: I tried out the file below, and I can confirm all of John's results. Since I use SGI's Inventor instead of Coin, it appears that the bug is in the Inventor plugin, and not Coin. I wonder if it's a problem with 64-bit builds? I have been using Centos 5.2/5.3 on a 64-bit machine for a while now, and my previous use of Inventor was probably on our old 32-bit machines. -Eric On Fri, Oct 9, 2009 at 3:12 PM, John Kelso ke...@nist.govmailto:ke...@nist.gov wrote: Hi, We're running 2.8.2 on a 64-bit Centos system. OSG was configured to use Coin-3.1.1. Not too long ago I ran an old demo using the new releases and noticed that an Inventor file that used to load properly no longer did. Checking around, many others also didn't. Here's a simple example file that demonstrates the problem: #Inventor V2.0 ascii Material { diffuseColor 1 0 0 } Cone { bottomRadius 1 height 2 } Rotation { rotation 1 0 0 3.14159 } Material { diffuseColor 0 1 0 } Cone { bottomRadius 1 height 2 } If you look at this with ivview, also linked with Coin-3.1.1, you see two intersecting cones, red on the bottom and green on the top. If you load this same file with osgviewer you just see the red cone. If you use osgconv to create an osg file from the iv file you see both cones in the osg file with identical vertex data and the green one isn't rotated. I'm surprised I don't see any z-fighting in osgviewer. Anyway, can anyone else try loading this Inventor file and see if it works for them? Many thanks, John ___ osg-users mailing list osg-users@lists.openscenegraph.orgmailto: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] Repeatable rendering of subgraphs, ideas?
I am using svn/trunk. Ok, I found it, it calls TraversalOrderBin, not SceneGraphOrderRenderBin, hence was not able to see it quickly. Perfect, setting up the sort mode of the renderbin to TRAVERSAL_ORDER helps to solve my problem. Very usefull thing, thanks! art robertosfield wrote: Hi Art, The support for SceneGraphOrderRenderBin is only in svn/trunk. Robert. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18453#18453 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] CDB support
Hi, I'm new to OpenSceneGraph, but we're considering replacing our custom OpenGL graphics engine with OSG as the base. We're also considering Vega Prime as an option, but it has a much higher price tag. Has anyone tried integrating OSG with the Presagis CDB (Common Data Base) format? We need an editable worldwide database of terrain which can be paged in at run-time. I have looked at VirtualPlanetBuilder a bit, but we already have access to a detailed world database in CDB format, and we would need to edit parts of the database without regenerating the whole thing (which I believe is required by VPB). I suppose another question is, does anyone have experience with both OpenSceneGraph and Vega Prime? Thanks in advance, - Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18454#18454 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Breadth-first-search
Hi folks, current svn/trunk version has this nice option for rendering the nodes in the same order as they are traversed by a nodevisitor. This is very nice feature, which makes my life almost simpler. However, currently any node visitor is going in depth-first-search (DFS) manner. Does anybody has already tried to implement breadth-first-search (BFS) in osg? regards, art -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18455#18455 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Breadth-first-search
Hi Art -- Art Tevs wrote: However, currently any node visitor is going in depth-first-search (DFS) manner. Does anybody has already tried to implement breadth-first-search (BFS) in osg? Rather than calling NodeVisitor::traverse() from your overridden apply() methods, iterate over the child list yourself in apply() and have them accept() the NodeVisitor. You can call (or not call) the children in any order you wish. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering a depth texture quickly
Hi Paul, Yes, that is what I meant, thank you. So, I guess the thing I'm wondering about is, if I add a shader to the camera's state set, how do I ensure that this shader isn't overridden by the child nodes? For instance, if there is a Geode in this subgraph with a conflicting state set (let's say it has a shader of its own), won't that state set override the camera's? Frank -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18457#18457 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VRML plug-in
J.P. Delport jpdelp...@csir.co.za wrote: You could also install VirtualBox + Ubuntu + OSG + VRML plugin and then do the conversion straight to .osg. Or just keep a Linux box around for conversion. I think that is quite an overkill. Compiling the VRML plugin even on Windows is not *THAT* difficult. The process is well documented, it just takes a bit of time. Regards, Jan signature.asc Description: This is a digitally signed message part. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Convert osg::Image to a PNG in memory
Hi, I'm trying to convert an osg::Image to a PNG file in memory (byte array). I know I could write it to a file, then read it back in, but I was hoping for a more direct route. The goal is to then have another library read in the byte array directly. I tried just using the image-data() function, but the data appears to not have a valid image header. Hopefully, I made my question clear. Thank you! Cheers, Adam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18459#18459 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can't assign more than 7 texture matrices
Hi, i belive i solved this issue. I had to use: osg::Uniform* uniform = stateSet-getOrCreateUniform(matrices[0], osg::Uniform::FLOAT_MAT4); instead of: osg::Uniform* uniform = stateSet-getOrCreateUniform(matrices, osg::Uniform::FLOAT_MAT4); I found this post from 2006 which discussed this issue while searching for opengl uniform array documentation. http://www.mail-archive.com//msg00140.html I'm using libopenscenegraph-dev - 2.8.1-1 (Debian Lenny) Cheers, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18460#18460 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering a depth texture quickly
Frank Sullivan wrote: Yes, that is what I meant, thank you. So, I guess the thing I'm wondering about is, if I add a shader to the camera's state set, how do I ensure that this shader isn't overridden by the child nodes? For instance, if there is a Geode in this subgraph with a conflicting state set (let's say it has a shader of its own), won't that state set override the camera's? Hi Frank -- The Program StateAttribute is just like any other StateAttribute. You can force it to override child state settings with the OVERRIDE mode bit, and that will work as long as no child node has a Program set with the PROTECTED mode bit. Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ http://www.skew-matrix.com/ +1 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [forum] OsgUtil does not compile
Hi, I got the last version of 2.8.2, but osgUtil does not compile. Errors Compiling... Tessellator.cpp ..\..\..\src\osgUtil\Tessellator.cpp(44) : error C2664: 'gluTessCallback' : cannot convert parameter 3 from 'GLU_TESS_CALLBACK' to 'void (__stdcall *)(void)' This conversion requires a reinterpret_cast, a C-style cast or function-style cast ..\..\..\src\osgUtil\Tessellator.cpp(45) : error C2664: 'gluTessCallback' : cannot convert parameter 3 from 'GLU_TESS_CALLBACK' to 'void (__stdcall *)(void)' This conversion requires a reinterpret_cast, a C-style cast or function-style cast ..\..\..\src\osgUtil\Tessellator.cpp(46) : error C2664: 'gluTessCallback' : cannot convert parameter 3 from 'GLU_TESS_CALLBACK' to 'void (__stdcall *)(void)' This conversion requires a reinterpret_cast, a C-style cast or function-style cast ..\..\..\src\osgUtil\Tessellator.cpp(47) : error C2664: 'gluTessCallback' : cannot convert parameter 3 from 'GLU_TESS_CALLBACK' to 'void (__stdcall *)(void)' This conversion requires a reinterpret_cast, a C-style cast or function-style cast ..\..\..\src\osgUtil\Tessellator.cpp(48) : error C2664: 'gluTessCallback' : cannot convert parameter 3 from 'GLU_TESS_CALLBACK' to 'void (__stdcall *)(void)' This conversion requires a reinterpret_cast, a C-style cast or function-style cast Thank you! Cheers, Eduardo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18462#18462 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering a depth texture quickly
Thanks again, Paul. That looks like it will work nicely. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18463#18463 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org