[osg-users] ld: framework not found QtCore on Mac
Hi All, I'm having a error compiling OpenSceneGraph-2.9.13 on my mac laptop. I get a error ld: framework not found QtCore just after Linking CXX shared library ../../lib/libosgQt.dylib. I have change cmake directive CMAKE_OSX_ARCHITECTURES to x86_64. I'm have mac os x version 10.6.7 and Qt 4.7.0. QtCore is installed at /Library/Frameworks. I'd appreciate some information in this problem. Thank you! Cheers, Roni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39014#39014 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] iOS: integration with not-OpenGL apps
Thank you Stefan, I'm going to try it right now... Alessandro On Wed, May 4, 2011 at 10:22 PM, Stephan Huber ratzf...@digitalmind.dewrote: Hi Alessandro, I had some time to polish the GraphicsWindowIOS-implementation and it should work now to use a GraphicsWindowIOS as part of a bigger IOS-application. on github (https://github.com/stmh/osg/tree/iphone) there's even a new example demonstrating the usage. Basically you create a WindowDataClass with your parent-view as parameter, this will instruct GraphicsWindowIOS to add the created view to this parent-view, and it does respect the sizes in the traits-object. After that, you can query the GraphicsWindowIOS-object for the created view via dynamic_castosgViewer::GraphicsWindowIOS*(window)-getView(); See the code inside FlipSideViewController.mm for more details. These new changes are currently not part of osg-trunk, but I'll submit them, as soon as possible. Please let me know, if this new code works on your end. cheers, Stephan Am 02.05.11 19:17, schrieb Alessandro Terenzi: Hi, I'm trying to find a way to integrate OSG into a generic app for iOS, but I'm facing some problems. Maybe I'm missing something, but as far as I've understood, it looks like that, in order to use OSG on iOS, I must always use the UIWindow and the corresponding UIView/UIViewController objects created by means of GraphicsWindowIOS::WindowData...but in this way I find difficult to later manage those UIView and UIViewController objects especially if I need to integrate them in a dynamic view hierarchy. What I'd like to do is to create a UIView-derived class that encapsulates everything required to use OSG to draw in just that view, then I'd like to manage that view by my own UIViewController (not related to OSG). Is there a way to do this with what is already available in OSG (2.9.13)? If not, can anyone suggest what (beyond creating a context and all OpenGLES related stuff) the UIView-derived class should do from the OSG point of view? Thanks. Alessandro ___ 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] iOS: integration with not-OpenGL apps
I've tried the new updated version and it works fine on my end. Now it looks very easy to manage the OSG's view within a custom view controller. I'd like to ask a couple of things, just to understand better how everything works. 1) in GraphicsWindowIOS, beyond the window and view, also a view controller is defined and it is allocated in GraphicsWindowIOS.mm just after the view...is this view controller really needed? How is it used? 2) in the view_test example, at the end of FlipsideViewController,mm file, what is the role of USE_GRAPICSWINDOW_IMPLEMENTATION(IOS) ? I tried by removing it and it looks like that my app still works... Thanks. Alessandro On Thu, May 5, 2011 at 9:24 AM, Alessandro Terenzi a.tere...@gmail.comwrote: Thank you Stefan, I'm going to try it right now... Alessandro On Wed, May 4, 2011 at 10:22 PM, Stephan Huber ratzf...@digitalmind.dewrote: Hi Alessandro, I had some time to polish the GraphicsWindowIOS-implementation and it should work now to use a GraphicsWindowIOS as part of a bigger IOS-application. on github (https://github.com/stmh/osg/tree/iphone) there's even a new example demonstrating the usage. Basically you create a WindowDataClass with your parent-view as parameter, this will instruct GraphicsWindowIOS to add the created view to this parent-view, and it does respect the sizes in the traits-object. After that, you can query the GraphicsWindowIOS-object for the created view via dynamic_castosgViewer::GraphicsWindowIOS*(window)-getView(); See the code inside FlipSideViewController.mm for more details. These new changes are currently not part of osg-trunk, but I'll submit them, as soon as possible. Please let me know, if this new code works on your end. cheers, Stephan Am 02.05.11 19:17, schrieb Alessandro Terenzi: Hi, I'm trying to find a way to integrate OSG into a generic app for iOS, but I'm facing some problems. Maybe I'm missing something, but as far as I've understood, it looks like that, in order to use OSG on iOS, I must always use the UIWindow and the corresponding UIView/UIViewController objects created by means of GraphicsWindowIOS::WindowData...but in this way I find difficult to later manage those UIView and UIViewController objects especially if I need to integrate them in a dynamic view hierarchy. What I'd like to do is to create a UIView-derived class that encapsulates everything required to use OSG to draw in just that view, then I'd like to manage that view by my own UIViewController (not related to OSG). Is there a way to do this with what is already available in OSG (2.9.13)? If not, can anyone suggest what (beyond creating a context and all OpenGLES related stuff) the UIView-derived class should do from the OSG point of view? Thanks. Alessandro ___ 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] Geometry Generated object UV texture?
Hi, Anybody knows how to set a UV coordinate on a geometry shader generated object? I tested my U-moving VS FS shader with a osg::Sphere and osg::box. The uv coordinate can be mapping properly in VS and FS When i apply this two Shaders to a Geometry Shader generated objectsthe texture2D mapping is not right... i think it should be a problem of having right UV on GS generated object? How can I give a UV to GS generated object? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39025#39025 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] osgAnimation Update
Garrett Cope writes: Am I correct that invBindMatrixInSkeletonSpace is the rotation from the bone to the skeleton root rather than the previous bone as in earlier versions of osgAnimation? Yes, I think you are, by looking for example at the compute function in include/osgAnimation/RigTransformSoftware. -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] iOS: integration with not-OpenGL apps
Am 05.05.11 11:52, schrieb Alessandro Terenzi: 1) in GraphicsWindowIOS, beyond the window and view, also a view controller is defined and it is allocated in GraphicsWindowIOS.mm just after the view...is this view controller really needed? How is it used? The ViewController is used to adapt the view to a new device-orientation. It should be easy to add a new code-path to disable the creation of the ViewController, if needed. 2) in the view_test example, at the end of FlipsideViewController,mm file, what is the role of USE_GRAPICSWINDOW_IMPLEMENTATION(IOS) ? I tried by removing it and it looks like that my app still works... As the osg-libs are static you'll have to tell the linker to include the GraphicsWindowIOS-class in the final app, this is the purpose of USE_GRAPICSWINDOW_IMPLEMENTATION(IOS). In the other examples this line is in the file Plugins.h cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry Generated object UV texture?
On 5/5/2011 4:07 AM, Nan WANG wrote: Hi, Anybody knows how to set a UV coordinate on a geometry shader generated object? I tested my U-moving VS FS shader with a osg::Sphere and osg::box. The uv coordinate can be mapping properly in VS and FS When i apply this two Shaders to a Geometry Shader generated objectsthe texture2D mapping is not right... i think it should be a problem of having right UV on GS generated object? How can I give a UV to GS generated object? I'm not sure I understand the problem. Why not just create a varying vec2 for the texture coordinate and write to it in your geometry shader? -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry Generated object UV texture?
Hello boss: Here are some details of my problem: In my Geometry Shader, i have some codes to generate objects in real time (i.e. triangles, these trangles constitute a surface). With VS and FS, i can set the gl_FragColor as i like.. But when applying a texture to the objects which are generated in realtime... it doesn't work as i wish... I guess that is the realtime generated object does not have right UV coordinates...like osg::box...or osg::sphere... is there a way of setting box mapping UV to the realtime generated UV? Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39029#39029 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry Generated object UV texture?
the problem i am thinking is that: when we create an object like osg::box..then osg::ShapeDrawable* unitCubeDrawable then the box contain a right UV coordinate. the objects which are realtime generated do not have BOX UVso if i apply a texture to objsthere should be a problem... Right? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39030#39030 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] iOS: integration with not-OpenGL apps
Thanks Stephan. Alessandro On Thu, May 5, 2011 at 12:39 PM, Stephan Maximilian Huber ratzf...@digitalmind.de wrote: Am 05.05.11 11:52, schrieb Alessandro Terenzi: 1) in GraphicsWindowIOS, beyond the window and view, also a view controller is defined and it is allocated in GraphicsWindowIOS.mm just after the view...is this view controller really needed? How is it used? The ViewController is used to adapt the view to a new device-orientation. It should be easy to add a new code-path to disable the creation of the ViewController, if needed. 2) in the view_test example, at the end of FlipsideViewController,mm file, what is the role of USE_GRAPICSWINDOW_IMPLEMENTATION(IOS) ? I tried by removing it and it looks like that my app still works... As the osg-libs are static you'll have to tell the linker to include the GraphicsWindowIOS-class in the final app, this is the purpose of USE_GRAPICSWINDOW_IMPLEMENTATION(IOS). In the other examples this line is in the file Plugins.h cheers, Stephan ___ 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] Geometry Generated object UV texture?
See my previous post. When you use a geometry shader to create new vertices, and the object is textured, then the geometry shader must generate tex coords for each vertex. Paul Martz Skew Matrix Software Http://www.skew-matrix.com On May 5, 2011, at 7:23, Nan WANG nan.c...@gmail.com wrote: the problem i am thinking is that: when we create an object like osg::box..then osg::ShapeDrawable* unitCubeDrawable then the box contain a right UV coordinate. the objects which are realtime generated do not have BOX UVso if i apply a texture to objsthere should be a problem... Right? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39030#39030 ___ 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] Compile osg in 32 Bit
Hi, I have a 64 Bit Linux (OpenSuse) and want to compile osg to 32 Bit executables/libraries. It seems like if I run the standard installation I only get 64 Bit executables and shared objects. I know you can force the compiler to create 32 bit binaries per flag -m32 but I don't know how to tell osg to compile into 32 Bit. So what do I have to do to compile osg into 32 Bit executables and .so etc.? Thank you! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39034#39034 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Compile osg in 32 Bit
Martin Haffner writes: I know you can force the compiler to create 32 bit binaries per flag -m32 but I don't know how to tell osg to compile into 32 Bit. That's it! But please note that you also need the 32 bit version of the libraries used as a dependency for OSG. -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Compile osg in 32 Bit
Hi, Well, and how do I tell CMake to generate a makefile that uses the -m32 flag? Thank you! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39036#39036 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geometry Generated object UV texture?
i am a beginner of OSG Could you provide me an example of that?or some links Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39037#39037 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Compile osg in 32 Bit
Hi, Martin You can add -m32 manually to CXX_FLAGS in CMakeCache or with ccmake Cheers, Sergey. 05.05.2011, 18:28, Martin Haffner str...@gmx.net: Hi, Well, and how do I tell CMake to generate a makefile that uses the -m32 flag? Thank you! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39036#39036 ___ 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] Geometry Generated object UV texture?
Hi, Nan You should generate them with same GS. If you draw GS generated model immediatly you should specify correct outputs\inputs for generated tc's in geometry and fragment shaders. If you stream out and save generated vertices data with transform feedback you should also stream out generated texcoords. Cheers, Sergey. 05.05.2011, 14:07, Nan WANG nan.c...@gmail.com: Hi, Anybody knows how to set a UV coordinate on a geometry shader generated object? I tested my U-moving VS FS shader with a osg::Sphere and osg::box. The uv coordinate can be mapping properly in VS and FS When i apply this two Shaders to a Geometry Shader generated objectsthe texture2D mapping is not right... i think it should be a problem of having right UV on GS generated object? How can I give a UV to GS generated object? ... Thank you! Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39025#39025 ___ 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] Compile osg in 32 Bit
Hi, Ok, I modified the CMAKE_CXX_FLAGS line in CMakeCache.txt to this line: CMAKE_CXX_FLAGS:STRING=-m32 Then I call CMake and it also generates a Makefile. I searched in the whole Makefile but there is no m32 flag! Did I miss something? Thank you! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39040#39040 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Compile osg in 32 Bit
Martin Haffner writes: Hi, Ok, I modified the CMAKE_CXX_FLAGS line in CMakeCache.txt to this line: CMAKE_CXX_FLAGS:STRING=-m32 Then I call CMake and it also generates a Makefile. I searched in the whole Makefile but there is no m32 flag! Did I miss something? It seems cmake bundles the flags into flags.make files: $ find -name flags.make -exec grep --color m32 {} + Anyway, just to be sure, perform a test build: $ VERBOSE=1 make OpenThreads and later inspect the results with `ldd'. -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] large VBOs for multiple Drawables
Hi All, I revamp this thread as my question is strictly related, as I'm trying to pack multiple geometries into shared VBO. I'm creating a shared osg::Vec3Array for vertices, same for as many vertex attribute as I need, and then assigning these shared arrays to the different geometries (pGeom-setVertexArray() and pGeom-setVertexAttribArray() ) and telling the geometry to use VBO and not display lists. Then I create a new DrawElements for each geometry, with the correct vertex indices offset, and as I want them to share the same EBO underneath, I'm trying with: pDrawElemsUInt-setElementBufferObject(pSharedEBO); pGeom-addPrimitiveSet(pDrawElemsUInt); But I think I' missing something because, with gDebugger, I see that there are as many bindBuffer calls as num-geom * num-shared-buffers. Am I wrong in the way I try to share the drawElems EBO? Or missing something else? Thank you! Ricky On Mon, Jan 3, 2011 at 19:31, Jason Beverage jasonbever...@gmail.comwrote: Hi Terry, I was generating all my geometry in code so I wrote some custom code to pack them tightly into a single vertex array. Jason On Mon, Jan 3, 2011 at 1:05 PM, Terry Welsh mogu...@gmail.com wrote: Hi Jason, Thank you for the suggestion. I feel like I'm missing something still. Is there an Optimizer feature or something that combines Arrays for you? Or did you write a bunch of custom code that processes your models after you load them? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 3 Date: Sun, 2 Jan 2011 21:28:12 -0500 From: Jason Beverage jasonbever...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] large VBOs for multiple Drawables Message-ID: aanlktin2mdb-vewdrpkp0rwjxcok2jm4o0vdx31ao...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, You can pack the verts of your small objects into a single osg::Vec3Array and share that array across multiple osg::Geometry objects then use DrawElements for each geometry with the correct indices. I've just recently done this actually for a project I'm working on and it's worked out great. Thanks, Jason On Sat, Jan 1, 2011 at 6:21 PM, Terry Welsh mogu...@gmail.com wrote: I found some email threads that hinted at this a little, but nothing seemed very specific. ?I have scenes where display lists perform a bit better than VBOs. ?My best guess is because my objects have relatively small vertex counts (usually between 20 and 200). ?Is there any way in OSG to use one large VBO to store the date for multiple Drawables in order to minimize buffer state changes? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com ___ 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] large VBOs for multiple Drawables
Ricky, AFAIK, OSG doesn't maintain VBO/EBO bindings as part of its sortable state. So I believe they will be bound and unbound for each Geometry, even if they are shared. Somebody correct me if I'm wrong. (See Geometry::drawImplementation.) Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 11:40 AM, Riccardo Corsi riccardo.co...@kairos3d.itwrote: Hi All, I revamp this thread as my question is strictly related, as I'm trying to pack multiple geometries into shared VBO. I'm creating a shared osg::Vec3Array for vertices, same for as many vertex attribute as I need, and then assigning these shared arrays to the different geometries (pGeom-setVertexArray() and pGeom-setVertexAttribArray() ) and telling the geometry to use VBO and not display lists. Then I create a new DrawElements for each geometry, with the correct vertex indices offset, and as I want them to share the same EBO underneath, I'm trying with: pDrawElemsUInt-setElementBufferObject(pSharedEBO); pGeom-addPrimitiveSet(pDrawElemsUInt); But I think I' missing something because, with gDebugger, I see that there are as many bindBuffer calls as num-geom * num-shared-buffers. Am I wrong in the way I try to share the drawElems EBO? Or missing something else? Thank you! Ricky On Mon, Jan 3, 2011 at 19:31, Jason Beverage jasonbever...@gmail.comwrote: Hi Terry, I was generating all my geometry in code so I wrote some custom code to pack them tightly into a single vertex array. Jason On Mon, Jan 3, 2011 at 1:05 PM, Terry Welsh mogu...@gmail.com wrote: Hi Jason, Thank you for the suggestion. I feel like I'm missing something still. Is there an Optimizer feature or something that combines Arrays for you? Or did you write a bunch of custom code that processes your models after you load them? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 3 Date: Sun, 2 Jan 2011 21:28:12 -0500 From: Jason Beverage jasonbever...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] large VBOs for multiple Drawables Message-ID: aanlktin2mdb-vewdrpkp0rwjxcok2jm4o0vdx31ao...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, You can pack the verts of your small objects into a single osg::Vec3Array and share that array across multiple osg::Geometry objects then use DrawElements for each geometry with the correct indices. I've just recently done this actually for a project I'm working on and it's worked out great. Thanks, Jason On Sat, Jan 1, 2011 at 6:21 PM, Terry Welsh mogu...@gmail.com wrote: I found some email threads that hinted at this a little, but nothing seemed very specific. ?I have scenes where display lists perform a bit better than VBOs. ?My best guess is because my objects have relatively small vertex counts (usually between 20 and 200). ?Is there any way in OSG to use one large VBO to store the date for multiple Drawables in order to minimize buffer state changes? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com ___ 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] large VBOs for multiple Drawables
Hi Glenn, thanks for your reply... so to avoid the gl state change related to the bind/unbind of the buffers, have I got to pack multiple geometries into a single one? I'd had preferred to keep them separated as each has a logical meaning in my app, and to have direct access to a single geom when picking. Also, I don't understand very much what's advantage in sharing VBOs among geometries if they are rebound for every geometry rendered. I thought the gain when creating larger VBO shared among geometries was to reduce the state changes and obtain better batches down on the graphics HW. Thank you. Ricky On Thu, May 5, 2011 at 17:51, Glenn Waldron gwald...@gmail.com wrote: Ricky, AFAIK, OSG doesn't maintain VBO/EBO bindings as part of its sortable state. So I believe they will be bound and unbound for each Geometry, even if they are shared. Somebody correct me if I'm wrong. (See Geometry::drawImplementation.) Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 11:40 AM, Riccardo Corsi riccardo.co...@kairos3d.it wrote: Hi All, I revamp this thread as my question is strictly related, as I'm trying to pack multiple geometries into shared VBO. I'm creating a shared osg::Vec3Array for vertices, same for as many vertex attribute as I need, and then assigning these shared arrays to the different geometries (pGeom-setVertexArray() and pGeom-setVertexAttribArray() ) and telling the geometry to use VBO and not display lists. Then I create a new DrawElements for each geometry, with the correct vertex indices offset, and as I want them to share the same EBO underneath, I'm trying with: pDrawElemsUInt-setElementBufferObject(pSharedEBO); pGeom-addPrimitiveSet(pDrawElemsUInt); But I think I' missing something because, with gDebugger, I see that there are as many bindBuffer calls as num-geom * num-shared-buffers. Am I wrong in the way I try to share the drawElems EBO? Or missing something else? Thank you! Ricky On Mon, Jan 3, 2011 at 19:31, Jason Beverage jasonbever...@gmail.comwrote: Hi Terry, I was generating all my geometry in code so I wrote some custom code to pack them tightly into a single vertex array. Jason On Mon, Jan 3, 2011 at 1:05 PM, Terry Welsh mogu...@gmail.com wrote: Hi Jason, Thank you for the suggestion. I feel like I'm missing something still. Is there an Optimizer feature or something that combines Arrays for you? Or did you write a bunch of custom code that processes your models after you load them? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 3 Date: Sun, 2 Jan 2011 21:28:12 -0500 From: Jason Beverage jasonbever...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] large VBOs for multiple Drawables Message-ID: aanlktin2mdb-vewdrpkp0rwjxcok2jm4o0vdx31ao...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, You can pack the verts of your small objects into a single osg::Vec3Array and share that array across multiple osg::Geometry objects then use DrawElements for each geometry with the correct indices. I've just recently done this actually for a project I'm working on and it's worked out great. Thanks, Jason On Sat, Jan 1, 2011 at 6:21 PM, Terry Welsh mogu...@gmail.com wrote: I found some email threads that hinted at this a little, but nothing seemed very specific. ?I have scenes where display lists perform a bit better than VBOs. ?My best guess is because my objects have relatively small vertex counts (usually between 20 and 200). ?Is there any way in OSG to use one large VBO to store the date for multiple Drawables in order to minimize buffer state changes? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!
Hi, i have tried to generate a terrain (.ive) database using osgdem commandline options in order to buid a flat database where coordinates are in meters. After successfull generation i put that terrain in my osg application and really shocked! Before telling you what i saw as the output let me tell you my inputs. - i have four Dted-2 elevation file, - i have one GeoTiff image which is successfully mapped on dted files. - Dteds are starting (from 36N, 128E to 38N, 130E). So there are 4 1x1 degree cells [ Total size is 2x2]. - GeoTiff image also extends from 36N, 128E to 38N, 130E. So it covers [2x2] elevation file without no problem. Dted and Image Coordinate Systems are: Geographic ( Latitude / Longitude ) Datum : WGS84 Unit : Arc degrees. after putting dteds and image in seperate folders ( MyDted, MyImage ) i executed the following vpb command to generate my flat database. - osgdem -t MyDted -d MyImage -l 8 -v 0.1 -o MyTerrain_Flat.ive after executig above line and loading Terrain_Flat.ive on my osg application it was really difficult to find where is MyTerrain_Flat.ive on my view. When i zoom in What i saw was a 2x2 meter flat database in osg size. !!!It was located on x = 128 , y = 36 on my view according to ( 0,0,0) of my scene!!! Real size of Dteds of Image was 178 km in Easting and 221 km in Northing.. i have checked size and everythings was ok with Dted and Image. Now the question is 1 - Is there a problem with vpb when creating flat database in meters? 2- Have i missed a command line option? 3- Why is the generated terrain covers 2x2 meters although it is 178 x 221 km in real size? 4- Why it is located in x = 128 , y = 36 ? Those were Lower Left Lat/Lon coordinates of dteds and image file? 4- Isn't it possible to generate real size flat terrains in meters in x,y,z using vpb? Any help is really appreciated... ... Thank you! Cheers, Atilla -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39045#39045 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!
Hi, i have tried to generate a terrain (.ive) database using osgdem commandline options in order to buid a flat database where coordinates are in meters. After successfull generation i put that terrain in my osg application and really shocked! Before telling you what i saw as the output let me tell you my inputs. - i have four Dted-2 elevation file, - i have one GeoTiff image which is successfully mapped on dted files. - Dteds are starting (from 36N, 128E to 38N, 130E). So there are 4 1x1 degree cells [ Total size is 2x2]. - GeoTiff image also extends from 36N, 128E to 38N, 130E. So it covers [2x2] elevation file without no problem. Dted and Image Coordinate Systems are: Geographic ( Latitude / Longitude ) Datum : WGS84 Unit : Arc degrees. after putting dteds and image in seperate folders ( MyDted, MyImage ) i executed the following vpb command to generate my flat database. - osgdem -t MyDted -d MyImage -l 8 -v 0.1 -o MyTerrain_Flat.ive after executig above line and loading Terrain_Flat.ive on my osg application it was really difficult to find where is MyTerrain_Flat.ive on my view. When i zoom in What i saw was a 2x2 meter flat database in osg size. !!!It was located on x = 128 , y = 36 on my view according to ( 0,0,0) of my scene!!! Real size of Dteds of Image was 178 km in Easting and 221 km in Northing.. i have checked size and everythings was ok with Dted and Image. Now the question is 1 - Is there a problem with vpb when creating flat database in meters? 2- Have i missed a command line option? 3- Why is the generated terrain covers 2x2 meters although it is 178 x 221 km in real size? 4- Why it is located in x = 128 , y = 36 ? Those were Lower Left Lat/Lon coordinates of dteds and image file? 4- Isn't it possible to generate real size flat terrains in meters in x,y,z using vpb? Any help is really appreciated... ... Thank you! Cheers, Atilla -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39046#39046 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] large VBOs for multiple Drawables
On Thu, May 5, 2011 at 12:02 PM, Riccardo Corsi riccardo.co...@kairos3d.itwrote: Hi Glenn, thanks for your reply... so to avoid the gl state change related to the bind/unbind of the buffers, have I got to pack multiple geometries into a single one? yes I'd had preferred to keep them separated as each has a logical meaning in my app, and to have direct access to a single geom when picking. I have been in the same boat. OSG does not draw Geometry's in the order they appear in the graph; rather it sorts them by state attributes in order to minimize state changes during the draw. (Other things like bins come into play as well.) But VBO/EBO bindings are not part of that state...maybe they should be. Or maybe the bind/unbind methods in State could be smarter about not unbinding a buffer object until a new one needs binding. Not sure what side effects this might have but it's worth experimenting with...? Also, I don't understand very much what's advantage in sharing VBOs among geometries if they are rebound for every geometry rendered. I thought the gain when creating larger VBO shared among geometries was to reduce the state changes and obtain better batches down on the graphics HW. Thank you. Ricky On Thu, May 5, 2011 at 17:51, Glenn Waldron gwald...@gmail.com wrote: Ricky, AFAIK, OSG doesn't maintain VBO/EBO bindings as part of its sortable state. So I believe they will be bound and unbound for each Geometry, even if they are shared. Somebody correct me if I'm wrong. (See Geometry::drawImplementation.) Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 11:40 AM, Riccardo Corsi riccardo.co...@kairos3d.it wrote: Hi All, I revamp this thread as my question is strictly related, as I'm trying to pack multiple geometries into shared VBO. I'm creating a shared osg::Vec3Array for vertices, same for as many vertex attribute as I need, and then assigning these shared arrays to the different geometries (pGeom-setVertexArray() and pGeom-setVertexAttribArray() ) and telling the geometry to use VBO and not display lists. Then I create a new DrawElements for each geometry, with the correct vertex indices offset, and as I want them to share the same EBO underneath, I'm trying with: pDrawElemsUInt-setElementBufferObject(pSharedEBO); pGeom-addPrimitiveSet(pDrawElemsUInt); But I think I' missing something because, with gDebugger, I see that there are as many bindBuffer calls as num-geom * num-shared-buffers. Am I wrong in the way I try to share the drawElems EBO? Or missing something else? Thank you! Ricky On Mon, Jan 3, 2011 at 19:31, Jason Beverage jasonbever...@gmail.comwrote: Hi Terry, I was generating all my geometry in code so I wrote some custom code to pack them tightly into a single vertex array. Jason On Mon, Jan 3, 2011 at 1:05 PM, Terry Welsh mogu...@gmail.com wrote: Hi Jason, Thank you for the suggestion. I feel like I'm missing something still. Is there an Optimizer feature or something that combines Arrays for you? Or did you write a bunch of custom code that processes your models after you load them? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 3 Date: Sun, 2 Jan 2011 21:28:12 -0500 From: Jason Beverage jasonbever...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] large VBOs for multiple Drawables Message-ID: aanlktin2mdb-vewdrpkp0rwjxcok2jm4o0vdx31ao...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, You can pack the verts of your small objects into a single osg::Vec3Array and share that array across multiple osg::Geometry objects then use DrawElements for each geometry with the correct indices. I've just recently done this actually for a project I'm working on and it's worked out great. Thanks, Jason On Sat, Jan 1, 2011 at 6:21 PM, Terry Welsh mogu...@gmail.com wrote: I found some email threads that hinted at this a little, but nothing seemed very specific. ?I have scenes where display lists perform a bit better than VBOs. ?My best guess is because my objects have relatively small vertex counts (usually between 20 and 200). ?Is there any way in OSG to use one large VBO to store the date for multiple Drawables in order to minimize buffer state changes? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com ___ 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
Re: [osg-users] stats issue with svn
Martin, J-S, Do you happen to know if this issue occurs only when the stats are enabled, or if it also occurs in the viewer without the stats displayed? I ask because I've never actually used the stats functionality, but sometimes when we launch our application, the graphics appear lower quality (as in occasional jumpiness) but other times this problem is gone or at least barely noticeable. I'm just curious if this might be the same issue. Cheers, Tom -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39048#39048 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!
Atilla, osgdem is creating your model in what's called a plate carre projection -- in which degrees are simply reinterpreted as meters. That is why your 2x2 degree cell is appearing as 2x2 meters. You need to reproject into a proper projected spatial reference system (like UTM) to get the correct extents. Check the bottom of this page for tips: http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 12:25 PM, Atilla Selem ase...@havelsan.com.trwrote: Hi, i have tried to generate a terrain (.ive) database using osgdem commandline options in order to buid a flat database where coordinates are in meters. After successfull generation i put that terrain in my osg application and really shocked! Before telling you what i saw as the output let me tell you my inputs. - i have four Dted-2 elevation file, - i have one GeoTiff image which is successfully mapped on dted files. - Dteds are starting (from 36N, 128E to 38N, 130E). So there are 4 1x1 degree cells [ Total size is 2x2]. - GeoTiff image also extends from 36N, 128E to 38N, 130E. So it covers [2x2] elevation file without no problem. Dted and Image Coordinate Systems are: Geographic ( Latitude / Longitude ) Datum : WGS84 Unit : Arc degrees. after putting dteds and image in seperate folders ( MyDted, MyImage ) i executed the following vpb command to generate my flat database. - osgdem -t MyDted -d MyImage -l 8 -v 0.1 -o MyTerrain_Flat.ive after executig above line and loading Terrain_Flat.ive on my osg application it was really difficult to find where is MyTerrain_Flat.ive on my view. When i zoom in What i saw was a 2x2 meter flat database in osg size. !!!It was located on x = 128 , y = 36 on my view according to ( 0,0,0) of my scene!!! Real size of Dteds of Image was 178 km in Easting and 221 km in Northing.. i have checked size and everythings was ok with Dted and Image. Now the question is 1 - Is there a problem with vpb when creating flat database in meters? 2- Have i missed a command line option? 3- Why is the generated terrain covers 2x2 meters although it is 178 x 221 km in real size? 4- Why it is located in x = 128 , y = 36 ? Those were Lower Left Lat/Lon coordinates of dteds and image file? 4- Isn't it possible to generate real size flat terrains in meters in x,y,z using vpb? Any help is really appreciated... ... Thank you! Cheers, Atilla -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39045#39045 ___ 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] stats issue with svn
Hi Tom, Do you happen to know if this issue occurs only when the stats are enabled, or if it also occurs in the viewer without the stats displayed? I ask because I've never actually used the stats functionality, but sometimes when we launch our application, the graphics appear lower quality (as in occasional jumpiness) but other times this problem is gone or at least barely noticeable. I'm just curious if this might be the same issue. No, in my case at least the issue I've seen only affects the stats and it is only a display issue - the actual frame rate and speed of the application is not affected. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] large VBOs for multiple Drawables
On 5/5/2011 9:51 AM, Glenn Waldron wrote: AFAIK, OSG doesn't maintain VBO/EBO bindings as part of its sortable state. So I believe they will be bound and unbound for each Geometry, even if they are shared. Somebody correct me if I'm wrong. (See Geometry::drawImplementation.) This is my experience as well. OSG binds and unbinds the buffer object per Geometry during draw, and doesn't attempt to minimize this state change. OSG relies on the underlying OpenGL implementation to do lazy buffer bindings, so that binding a buffer, followed by unbinding a buffer, followed by binding the same buffer again, is handled optimally. However, to my knowledge, OSG doesn't group Geometry objects based on the buffer objects they use, so even if the underlying OpenGL implementation does perform lazy buffer bindings, it's unlikely that OSG is taking maximum advantage of it. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi Farshid, The problem I had with my own compiled version of OSGExp was indeed caused by mismatched DLLs. The prebuilt version's installer copied the OSG DLLs into the 3dsmax directory, as well as the Previewer.dll. When compiling my own version, I was able to just have my own version of OSG on the PATH, and had to replace the Previewer.dll with my compiled version. Yes, all the methods I described are supported by the existing exporter. I agree that it's not ideal, but we came up with these methods before I was even a developer on the osgmaxexp project. So we had to work with what we had at the time. That's totally understandable. I'll look at adding some automation for this process soon. Thanks for your support, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!
Hi Glenn, Thanks for the tip.. but i really need to know, Where should i do reprojection? In my dted-2 files and/or in my GeoTiff.file (since their projections are both Geographic - Lat/Lon) before executing osgdem? Or should i do re-scaling or whatever after i load terrain in osg application? And What tool or command option should i use to reproject to UTM? thanks in advance.. Atilla. Glenn Waldron wrote: Atilla,osgdem is creating your model in what's called a plate carre projection -- in which degrees are simply reinterpreted as meters. That is why your 2x2 degree cell is appearing as 2x2 meters. You need to reproject into a proper projected spatial reference system (like UTM) to get the correct extents. Check the bottom of this page for tips: http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem (http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem) Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 12:25 PM, Atilla Selem () wrote: Hi, i have tried to generate a terrain (.ive) database using osgdem commandline options in order to buid a flat database where coordinates are in meters. After successfull generation i put that terrain in my osg application and really shocked! Before telling you what i saw as the output let me tell you my inputs. - i have four Dted-2 elevation file, - i have one GeoTiff image which is successfully mapped on dted files. - Dteds are starting (from 36N, 128E to 38N, 130E). So there are 4 1x1 degree cells [ Total size is 2x2]. - GeoTiff image also extends from 36N, 128E to 38N, 130E. So it covers [2x2] elevation file without no problem. Dted and Image Coordinate Systems are: Geographic ( Latitude / Longitude ) Datum : WGS84 Unit : Arc degrees. after putting dteds and image in seperate folders ( MyDted, MyImage ) i executed the following vpb command to generate my flat database. - osgdem -t MyDted -d MyImage -l 8 -v 0.1 -o MyTerrain_Flat.ive after executig above line and loading Terrain_Flat.ive on my osg application it was really difficult to find where is MyTerrain_Flat.ive on my view. When i zoom in What i saw was a 2x2 meter flat database in osg size. !!!It was located on x = 128 , y = 36 on my view according to ( 0,0,0) of my scene!!! Real size of Dteds of Image was 178 km in Easting and 221 km in Northing.. i have checked size and everythings was ok with Dted and Image. Now the question is 1 - Is there a problem with vpb when creating flat database in meters? 2- Have i missed a command line option? 3- Why is the generated terrain covers 2x2 meters although it is 178 x 221 km in real size? 4- Why it is located in x = 128 , y = 36 ? Those were Lower Left Lat/Lon coordinates of dteds and image file? 4- Isn't it possible to generate real size flat terrains in meters in x,y,z using vpb? Any help is really appreciated... ... Thank you! Cheers, Atilla -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39045#39045 (http://forum.openscenegraph.org/viewtopic.php?p=39045#39045) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39053#39053 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hello again Farshid, OK. The different ways you mention above, are they all currently supported by OSGExp? Meaning, the material name is exported? The object properties field is exported as descriptions you say? (I haven't gone through the code to OSGExp yet) Yes, all the methods I described are supported by the existing exporter. Question then, where do I go in Max to set these kinds of tags? Can you give me an example of what your artist would do to say that a given object (or a given material) has a normal map? Thanks in advance, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Flat Database Generation in Meters really shocked me when i load it to my osg application..!!!
I recommend reprojecting them first. You can use gdalwarp, or a tool like Global Mapper. You may also want to investigate osgEarth as an alternative approach to doing terrain with OSG. Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 1:08 PM, Atilla Selem ase...@havelsan.com.tr wrote: Hi Glenn, Thanks for the tip.. but i really need to know, Where should i do reprojection? In my dted-2 files and/or in my GeoTiff.file (since their projections are both Geographic - Lat/Lon) before executing osgdem? Or should i do re-scaling or whatever after i load terrain in osg application? And What tool or command option should i use to reproject to UTM? thanks in advance.. Atilla. Glenn Waldron wrote: Atilla,osgdem is creating your model in what's called a plate carre projection -- in which degrees are simply reinterpreted as meters. That is why your 2x2 degree cell is appearing as 2x2 meters. You need to reproject into a proper projected spatial reference system (like UTM) to get the correct extents. Check the bottom of this page for tips: http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem( http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem) Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 12:25 PM, Atilla Selem () wrote: Hi, i have tried to generate a terrain (.ive) database using osgdem commandline options in order to buid a flat database where coordinates are in meters. After successfull generation i put that terrain in my osg application and really shocked! Before telling you what i saw as the output let me tell you my inputs. - i have four Dted-2 elevation file, - i have one GeoTiff image which is successfully mapped on dted files. - Dteds are starting (from 36N, 128E to 38N, 130E). So there are 4 1x1 degree cells [ Total size is 2x2]. - GeoTiff image also extends from 36N, 128E to 38N, 130E. So it covers [2x2] elevation file without no problem. Dted and Image Coordinate Systems are: Geographic ( Latitude / Longitude ) Datum : WGS84 Unit : Arc degrees. after putting dteds and image in seperate folders ( MyDted, MyImage ) i executed the following vpb command to generate my flat database. - osgdem -t MyDted -d MyImage -l 8 -v 0.1 -o MyTerrain_Flat.ive after executig above line and loading Terrain_Flat.ive on my osg application it was really difficult to find where is MyTerrain_Flat.ive on my view. When i zoom in What i saw was a 2x2 meter flat database in osg size. !!!It was located on x = 128 , y = 36 on my view according to ( 0,0,0) of my scene!!! Real size of Dteds of Image was 178 km in Easting and 221 km in Northing.. i have checked size and everythings was ok with Dted and Image. Now the question is 1 - Is there a problem with vpb when creating flat database in meters? 2- Have i missed a command line option? 3- Why is the generated terrain covers 2x2 meters although it is 178 x 221 km in real size? 4- Why it is located in x = 128 , y = 36 ? Those were Lower Left Lat/Lon coordinates of dteds and image file? 4- Isn't it possible to generate real size flat terrains in meters in x,y,z using vpb? Any help is really appreciated... ... Thank you! Cheers, Atilla -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39045#39045 ( http://forum.openscenegraph.org/viewtopic.php?p=39045#39045) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org( http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39053#39053 ___ 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] large VBOs for multiple Drawables
On Thu, May 5, 2011 at 12:59 PM, Paul Martz pma...@skew-matrix.com wrote: On 5/5/2011 9:51 AM, Glenn Waldron wrote: AFAIK, OSG doesn't maintain VBO/EBO bindings as part of its sortable state. So I believe they will be bound and unbound for each Geometry, even if they are shared. Somebody correct me if I'm wrong. (See Geometry::drawImplementation.) This is my experience as well. OSG binds and unbinds the buffer object per Geometry during draw, and doesn't attempt to minimize this state change. OSG relies on the underlying OpenGL implementation to do lazy buffer bindings, so that binding a buffer, followed by unbinding a buffer, followed by binding the same buffer again, is handled optimally. However, to my knowledge, OSG doesn't group Geometry objects based on the buffer objects they use, so even if the underlying OpenGL implementation does perform lazy buffer bindings, it's unlikely that OSG is taking maximum advantage of it. Paul, you know more about OSG internals than I. Would you think that isolating all the Geomety objects that share a VBO into a single render bin might increase the effectiveness of the driver's lazy binding? Glenn Waldron / Pelican Mapping / @glennwaldron ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi J-S! On Wed, May 4, 2011 at 10:27 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: maya2osg (Maya plugin) --- As for maya2osg, it also seems active (last checkin Apr. 24th) and I was able to compile it myself and use my compiled version without any problems. But again there are unanswered messages on the sourceforge forum. I've subscribed to its mailing list and posted a few questions to which I haven't yet gotten an answer but it hasn't been that long yet. However from the OMG! X-D How many minutes did you wait??? :) archives it doesn't seem the mailing list is much more active than the forum. Again, the main developer is also a member of this list, ParticlePeter. So the same question applies, where do we discuss this, here or on the project's sourceforge forums / its own mailing list? I have been quite busy last months and didn't work too much on the plug-in. Actually, the active developer was ParticlePeter, integrating osgAnimation export. I am retaking the project these days, and I'm afraid Peter is under heavy workload, so it seems we are playing turns :) About where to discuss, wherever you prefer, the OSG list, the maya2osg list. Personally I don't like forums very much. About the unanswered questions in the forum, it's a matter of time availability. I released the code in case someone finds it useful, but cannot guarantee user support. In both cases, I'd like to ask how active are the projects, really. If I do some work on them, will it likely be accepted and integrated quickly, or will it sit as a patch for a few months? Patches will be accepted and integrated ASAP, but this is a project developed in my spare time, so it is adapted to time availability. We'll be looking to have at least normal mapping exported as a basic feature - maya2osg already supports that but it's not working 100% yet, and we'll It has been broken on one of the last updates. I am checking it... Actually, I will need it soon at work so I must fix it whether I like it or not. want to add it to OSGExp. We'll also probably want to add a callback mechanism in some places, so that the exported file can be customized to the final engine's pipeline. But I can discuss this later. I hope I can work with the authors of the respective plugins and get them working for our purposes. Thanks in advance, As I already said in the other list, contributions are always welcome. It's nice to see there is people interested in the project. Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] large VBOs for multiple Drawables
On 5/5/2011 11:26 AM, Glenn Waldron wrote: On Thu, May 5, 2011 at 12:59 PM, Paul Martz pma...@skew-matrix.com mailto:pma...@skew-matrix.com wrote: On 5/5/2011 9:51 AM, Glenn Waldron wrote: AFAIK, OSG doesn't maintain VBO/EBO bindings as part of its sortable state. So I believe they will be bound and unbound for each Geometry, even if they are shared. Somebody correct me if I'm wrong. (See Geometry::drawImplementation.) This is my experience as well. OSG binds and unbinds the buffer object per Geometry during draw, and doesn't attempt to minimize this state change. OSG relies on the underlying OpenGL implementation to do lazy buffer bindings, so that binding a buffer, followed by unbinding a buffer, followed by binding the same buffer again, is handled optimally. However, to my knowledge, OSG doesn't group Geometry objects based on the buffer objects they use, so even if the underlying OpenGL implementation does perform lazy buffer bindings, it's unlikely that OSG is taking maximum advantage of it. Paul, you know more about OSG internals than I. Would you think that isolating all the Geomety objects that share a VBO into a single render bin might increase the effectiveness of the driver's lazy binding? Assuming the driver does lazy buffer bindings, yes. I know that OSG gets a big win from sorting some OpenGL state, so it stands to reason that including more OpenGL state in this feature (such as buffer bindings) would produce a performance increment. (Of course it goes without saying that the performance delta depends on the model's organization.) This is something that could be benchmarked in an OpenGL app first, to see if there's any real performance delta between the three strategies that I can think of: 1) Render using random buffer objects, always bind and unbind around each Geometry analogue (what OSG does currently). 2) Group Geometry analogues by their buffer objects, but still bind and unbind around each Geometry analogue (what you're proposing). 3) Like 2, but only bind once for each group of Geometry analogues that share the same buffer object (the optimal approach). -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!!
Try using the following to reproject your data... gdalwarp -s_srs proj=latlong +datum=WGS84 -t_srs proj=utm +zone=11 +datum=WGS84 infile outfile Do this before using osgdem on your data files. UTM zone selection will be dependent upon where your lat/lon is... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Atilla Selem Sent: Thursday, May 05, 2011 11:09 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!! Hi Glenn, Thanks for the tip.. but i really need to know, Where should i do reprojection? In my dted-2 files and/or in my GeoTiff.file (since their projections are both Geographic - Lat/Lon) before executing osgdem? Or should i do re-scaling or whatever after i load terrain in osg application? And What tool or command option should i use to reproject to UTM? thanks in advance.. Atilla. Glenn Waldron wrote: Atilla,osgdem is creating your model in what's called a plate carre projection -- in which degrees are simply reinterpreted as meters. That is why your 2x2 degree cell is appearing as 2x2 meters. You need to reproject into a proper projected spatial reference system (like UTM) to get the correct extents. Check the bottom of this page for tips: http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem (http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem) Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 12:25 PM, Atilla Selem () wrote: Hi, i have tried to generate a terrain (.ive) database using osgdem commandline options in order to buid a flat database where coordinates are in meters. After successfull generation i put that terrain in my osg application and really shocked! Before telling you what i saw as the output let me tell you my inputs. - i have four Dted-2 elevation file, - i have one GeoTiff image which is successfully mapped on dted files. - Dteds are starting (from 36N, 128E to 38N, 130E). So there are 4 1x1 degree cells [ Total size is 2x2]. - GeoTiff image also extends from 36N, 128E to 38N, 130E. So it covers [2x2] elevation file without no problem. Dted and Image Coordinate Systems are: Geographic ( Latitude / Longitude ) Datum : WGS84 Unit : Arc degrees. after putting dteds and image in seperate folders ( MyDted, MyImage ) i executed the following vpb command to generate my flat database. - osgdem -t MyDted -d MyImage -l 8 -v 0.1 -o MyTerrain_Flat.ive after executig above line and loading Terrain_Flat.ive on my osg application it was really difficult to find where is MyTerrain_Flat.ive on my view. When i zoom in What i saw was a 2x2 meter flat database in osg size. !!!It was located on x = 128 , y = 36 on my view according to ( 0,0,0) of my scene!!! Real size of Dteds of Image was 178 km in Easting and 221 km in Northing.. i have checked size and everythings was ok with Dted and Image. Now the question is 1 - Is there a problem with vpb when creating flat database in meters? 2- Have i missed a command line option? 3- Why is the generated terrain covers 2x2 meters although it is 178 x 221 km in real size? 4- Why it is located in x = 128 , y = 36 ? Those were Lower Left Lat/Lon coordinates of dteds and image file? 4- Isn't it possible to generate real size flat terrains in meters in x,y,z using vpb? Any help is really appreciated... ... Thank you! Cheers, Atilla -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39045#39045 (http://forum.openscenegraph.org/viewtopic.php?p=39045#39045) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39053#39053 ___ 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] large VBOs for multiple Drawables
HI All, Current the OSG does unbind VBO's at the end of osg::Geometry::drawImplementation(..) so that VBO and EBO state doesn't leak into adjoining Drawables. If an implementation is known to only use VBO's, with no display lists then potentially we could not bother with the unbind at the end of Geometry::drawImplemenation() and use lazy state updating. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi Javier, OMG! X-D How many minutes did you wait??? :) About 5 ;-) No seriously, about 5 hours, but it's fine, I didn't really expect a reply that quick - it was meant as a joke, and I had other questions to ask for the Max export plugin too so I started a thread about both plugins. About where to discuss, wherever you prefer, the OSG list, the maya2osg list. Personally I don't like forums very much. About the unanswered questions in the forum, it's a matter of time availability. I released the code in case someone finds it useful, but cannot guarantee user support. I was just asking about forums because it made it look like the project was dead, but of course I totally understand that working on such a thing can be off and on depending on other projects and workload (see osgboostpython.googlecode.com for my own example of this :-) ). About where to discuss, I think you might have better visibility if we discuss here, that way others will know the project is active. But if you generally don't read all messages and prefer to keep the two separate I can understand. It's really up to you. Patches will be accepted and integrated ASAP, but this is a project developed in my spare time, so it is adapted to time availability. I totally understand, I just hate keeping patches locally and hate even more developing new patches over old ones and not being able to separate the work, so that's why I asked :-) As I already said in the other list, contributions are always welcome. It's nice to see there is people interested in the project. Great! I'll look into adding CMake build files tomorrow, since I just did the same thing for the Max exporter today (it went quite fast). Would you mind if the first version was Windows/VC++ only? I don't have Maya for Linux so couldn't test, and putting in a build system for Linux that should work but is untested is not a good strategy I think. Thanks for your support, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGExp: CMake build
Hi Jean-Sébastien, Thanks, I will go ahead and add these to the trunk. I am going to keep the existing Visual Studio projects though. The existing projects can be used for both 32 and 64-bit builds. I even wrote a Python script in the Setup folder that automates building the Visual Studio projects for each version/platform and creates the installer. Cheers, Farshid On Thu, May 5, 2011 at 1:17 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hello Farshid, I have made a CMake configuration to be able to generate build files for OSGExp. My main motivation for this was to be able to specify the Max SDK and OSG directories more easily than directly modifying the VS Project files for each of the 3 projects... To find the Max SDK, it will use the MAXSDK environment variable as the VS project files did. To find OSG, it uses the FindOSGHelper.cmake that Paul Martz did for osgWorks - since both osgWorks and OSGExp are LGPL, I think there's no problem there. One nice thing is it will use the 32 bit or 64 bit Max SDK libs depending on whether you're building for 32 or 64 bit. It can't do the same for OSG since there's no standard convention for installing both 32 and 64 bit OSG side by side, so we just take in on faith that the user will specify the right build of OSG or else there will be compile/link errors. Also, if you specify a Max installation directory, it will copy Previewer.dll to that directory (as required for the plugin to work). It is expected that you will set CMAKE_INSTALL_PREFIX to the directory that you specify in Max's plugin.ini so that doing the INSTALL target will do all that's needed to install a newly compiled version of the plugin without any manual intervention. Since I didn't see any makefiles and I don't even know if 3dsmax exists for other platforms than Windows, I have not included anything that is not Windows in the CMake files. This can be added if needed later. Hope this is useful. If you have any questions, let me know. The zip file should be unzipped in the source tree and consists only of files that need to be added in svn... No code changes. You can decide if you want to keep the existing Visual Studio project files or not, but this completely supersedes them (apart from the fact that you could build both 32 and 64 bit from the same solution - with the CMake files you'll have to generate 2 sets of solution/project files and build them independently). Thanks, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi J-S, On Thu, May 5, 2011 at 10:25 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: No seriously, about 5 hours, but it's fine, I didn't really expect a reply that quick - it was meant as a joke, and I had other questions to ask for the Max export plugin too so I started a thread about both plugins. I suppose you have a very short timeframe in justincaseidie.com :D About where to discuss, I think you might have better visibility if we discuss here, that way others will know the project is active. But if you generally don't read all messages and prefer to keep the two separate I can understand. It's really up to you. OK. If nobody consider it intrusive to the OSG list, I'll be glad to discuss here. Great! I'll look into adding CMake build files tomorrow, since I just did the same thing for the Max exporter today (it went quite fast). Would you mind if the first version was Windows/VC++ only? I don't have Maya for Linux so couldn't test, and putting in a build system for Linux that should work but is untested is not a good strategy I think. The CMake script is already in the svn/trunk. I am trying in Win7 32-bit + VS2010 Express + Maya 2011 + OSG 2.9.11. It correctly creates the VS project and it is working in Release configuration. The installation is also ready, assuming you have write permission to the plug-in directory. The only thing I have unsolved is the Debug configuration, I don't know what is the orthodox way to make it link with debug versions of OSG. I tried to detect the CMAKE_BUILD_TYPE and if it is Debug link with OSG_LIBRARY_DEBUG instead of OSG_LIBRARY, but it didn't work. I think it should probably work in Linux, but in Visual Studio the configurations are managed inside the VS project/solution and so the CMAKE_BUILD_TYPE is not known when the CMake script is evaluated. Maybe you can help me with that, and test it in your system and let me know if it works. I'm pretty sure that you have much more knowledge than me about CMake. I am developing a weird love-hate relationship with this software. Regards, -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Looking at OSGExp and maya2osg (3dsmax and Maya export plugins)
Hi Javier, I suppose you have a very short timeframe in justincaseidie.com :D I didn't know about this, it's actually hilarious... It will actually only be sent if you fail to log back in to the system within the timeframe that you set, we're just sort of assuming that only death would stop you doing this. Gold :-) The only thing I have unsolved is the Debug configuration, I don't know what is the orthodox way to make it link with debug versions of OSG. This can actually be handled automatically with the right usage of FindOSG. But I agree that it's not always obvious how to do that. When you start writing tons of ifs for each configuration, it's a clear sign that you're not using CMake to its full potential. I'll have a look at it tomorrow morning. Thanks, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ld: framework not found QtCore on Mac
Hi, I just found my problem. I'm not sure if I caused it or it is some bug on QtSDK installation. I'm used to work on Linux so Mac is new for me. Playing with link.txt file in the osgQt/CMakeFiles/osgQt.dir I figure out the flag -isysroot /Developer/SDKs/MacOSX10.6.sdk was not finding my QtCore so I went to look at the directory and found out I had a extra Frameworks in the path /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks/Frameworks so I remove the extra Frameworks and made it a link to /Library/Frameworks. I already had /Developer/SDKs/MacOSX10.5 in my computer and then installed the latest Qt SDK without uninstalling the old one. I was building osg with minimum installation and it worked ok. I'm trying to build the examples now and got a problem in the osgviewerWX missing required architecture x86_64. I will try to fix this now. Cheers, Roni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39066#39066 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org