Re: [osg-users] Several questions regarding Terrain
Hi Thomas, On Tue, Dec 21, 2010 at 3:51 AM, Thomas Dickerson osgfo...@tevs.eu wrote: If I have a heightfield which tiles cleanly, is there a mechanism to make a terrain repeat indefinitely? There's isn't any mechanism in osgTerrain for repeating terrain. The OSG allows you share subgraphs so you could repeat a sugraph offsetting it by decorating the subgrpah with transform node to place each shared subgraph in it's appropriate place. Is there any sort of mechanism to draw a hole in a patch of terrain? There isn't any built in support for changing the mesh of each tile to have holes in it. You can however make holes using a texture such as having a texture with a alpha value then clipping the fragments out based using osg::AlphaFunc (wrapper for glAlphaFunc). If not, how would such a thing be implemented? It depends upon you actual requirements. If you do need to modify the mesh then you could implement your own TerrainTechnique in place of the default GeoemtryTechnique, your custom TerrainTechnique would then take over responsibility of meshing the height fields and setting up the appropriate state (i.e. texturing etc.). Can you have multiple layers of texture over the same heightfield? (i.e. a background texture and another detail texture painted over it? Yes, TerrainTIle allows for multiple colour layers. In the documentation I see names like TerrainTechnique Layer Terrain and TerrainTile being thrown around without much description of the roll of any individual class. Is this documented in any reasonable form somewhere, or would someone care to explain them? osgTerrain::TerrainTile holds all the data required to represent a side terrain tile - holding a elevation layer and any colour layers that you wish to be textured ontop of it. osgTerrain::TerrainTechnique is the base class for techniques that convert the TerrainTile data into a renderable scene graph, this scene graph for rendering is held by the TerrainTechnique and passed to the cull traversal on each frame. GeometryTechnique is currently the only implementation of TerrainTechnique provided by osgTerrain. osgTerrain::Terrain is an optional terrain control node for decorating the scene graph that contains your TerrainTiles. The Terrain node provide high level control over vertical scaling, the terrain technique to use etc. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Several questions regarding Terrain
Hi Thomas, On Thu, Dec 23, 2010 at 4:40 AM, Thomas Dickerson osgfo...@tevs.eu wrote: I have loaded a 256x256 HeightField, created a HeightFieldLayer, and added it as the ElevationLayer to a TerrainTile. Now, if I would like to go about texturing patches of terrain, do I essentially need a separate TerrainTile for each individual area to be textured? Possibly... it depends on the way you want to apply the texturing, I can't say from your description what you should do. And if this is the case, can multiple TerrainTiles use the same ImageLayer for their own ColorLayers? And I still have not decoded the use of the Terrain class itself, which doesn't seem to be used in the osgterrain_example demo application! Multiple TerrainTile can share the same ColorLayer, but the each Layer defines it's own extents in world coordinates so they only apply if region of the ColorLayer ovelaps with the elevation layer of the tile it's being applied to. The usual way to use osgTerrain is to have your imagery and elevation data tiled up to the same extents so that each tile owns it's own elevation and colour layers. The terrain is then made up with a quad tree hierarchy of tiles, often using PagedLOD to provide paging support. The VirtualPlanetBuilder tools provide offline support for generating paged databases from geospatial imagery and DEMs that can scale to multi-terrabyte datasets, comfortably handling whole earth, high res data, this generates quad tree of PagedLOD/TerrainTile . The 3rd party NodeKit osgEarth provides similar paged support but generates all the tiles dynamically on demand from the source imagery and DEMs. If you want a really large terrain paging is certainly the way to go. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] invalid operation (osgearth and viewer)
Hi Robert, I will have a look at that one and give it a go. Cheers Martin. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: 22 December 2010 19:55 To: OpenSceneGraph Users Subject: Re: [osg-users] invalid operation (osgearth and viewer) Hi Martin, From extension it looks like texture compression is supported so in theory should work fine. I don't know if it's related at all, but there is a submission on osg-users that added buffer object pointer clamping to 4 byte boundaries to address a crash with Intel hardware/drivers. The submission was in form that was suitable for merging, but it might be worth you looking at to see if it affects things at your end. Beyond that, I'd guess it's a driver bug, so would recommend have a look at any updating drivers if that is possible. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgManipulator::Dragger event handler
Hi François, osgManipulator has been made more flexible and easy to use, the old hardwiring of event handling you won't need to do any more as osgManipulator will provide alot more functionality out the box for you. The osgmanipulator example is your best guide on how to use it's now form, there is a good chance you'll just be able to simply your own code. Robert. On Thu, Dec 23, 2010 at 6:48 AM, François Bodic f56...@hotmail.com wrote: Hi, I the osg::Manipulator example, there is no EventHandler Class as before but a new handle function has been introduced in the Dragger code. How does it works? I used to work with the prévious version which was using a classic pick system built in a GUIEventHandler class. Thank you! Cheers, François -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35113#35113 ___ 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] Need Help ! Open Scene Graph For IPhone Shaders Issues
Heey, Thanks all for trying to help me, i solved the problem. and i succesfully run the following code Code: #import iphoneViewerAppDelegate.h #include osgGA/TrackballManipulator #include osg/ShapeDrawable #include osgViewer/api/IOS/GraphicsWindowIOS #include osg/Node #include osg/Group #include osg/Geode #include osg/Geometry #include osg/Texture2D #include osgDB/ReadFile #include osgViewer/Viewer #include osg/PositionAttitudeTransform #include osgGA/TrackballManipulator #include osg/Geode #include osg/TexGen #include osg/Texture2D #define kAccelerometerFrequency30.0 // Hz #define kFilteringFactor0.1 #define SHADER_COMPAT \ #ifndef GL_ES\n \ #if (__VERSION__ = 110)\n \ #define lowp\n \ #define mediump\n \ #define highp\n \ #endif\n \ #endif\n static const char* vertSource = { SHADER_COMPAT // colors a fragment based on its position\n varying mediump vec4 color;\n void main(void) {\n color = gl_Vertex;\n gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n }\n }; static const char* fragSource = { SHADER_COMPAT varying mediump vec4 color;\n void main(void) {\n gl_FragColor = clamp( color, 0.0, 1.0 );\n }\n }; @implementation iphoneViewerAppDelegate @synthesize _window; // //Called once app has finished launching, create the viewer then realize. Can't call viewer-run as will //block the final inialization of the windowing system // - (void)applicationDidFinishLaunching:(UIApplication *)application { //get the screen size CGRect lFrame = [[UIScreen mainScreen] bounds]; unsigned int w = lFrame.size.width; unsigned int h = lFrame.size.height; // create the main window at screen size self._window = [[UIWindow alloc] initWithFrame: lFrame]; //show window [_window makeKeyAndVisible]; //create our graphics context directly so we can pass our own window osg::ref_ptrosg::GraphicsContext::Traits traits = new osg::GraphicsContext::Traits; // Init the Windata Variable that holds the handle for the Window to display OSG in. osg::ref_ptrosg::Referenced windata = new osgViewer::GraphicsWindowIOS::WindowData(_window); // Setup the traits parameters traits-x = 0; traits-y = 0; traits-width = w; traits-height = h; traits-depth = 16; //keep memory down, default is currently 24 traits-red = 33; traits-blue = 66; traits-green = 99; traits-windowDecoration = true;//false; traits-doubleBuffer = true; traits-sharedContext = 0; traits-setInheritedWindowPixelFormat = true; traits-windowName = osgViewer; traits-inheritedWindowData = windata; // Create the Graphics Context osg::ref_ptrosg::GraphicsContext graphicsContext = osg::GraphicsContext::createGraphicsContext(traits.get()); graphicsContext-clear(); //create the viewer viewer = new osgViewer::Viewer(); //if the context was created then attach to our viewer if(graphicsContext) { viewer-getCamera()-setGraphicsContext(graphicsContext); double w = traits-width; double h = traits-height; if(wh) h = w; else w = h; viewer-getCamera()-setViewport(new osg::Viewport(0, 0, w , h )); // viewer-getCamera()-setProjectionMatrixAsFrustum(-5,5,-5,5,1e-6,100); // viewer-getCamera()-setProjectionMatrixAsPerspective(30,traits-width/traits-height); } osg::setNotifyLevel(osg::INFO); root = new osg::MatrixTransform(); osg::Geode* geode = new osg::Geode(); osg::ShapeDrawable* drawable = new osg::ShapeDrawable(new osg::Box(osg::Vec3(1, 1, 1), 1)); geode-addDrawable(drawable); osg::Program* program = new osg::Program; program-setName(shader); program-addShader(new osg::Shader(osg::Shader::VERTEX, vertSource)); program-addShader(new osg::Shader(osg::Shader::FRAGMENT, fragSource)); geode-getOrCreateStateSet()-setAttributeAndModes(program, osg::StateAttribute::ON); root-addChild(geode); //viewer = new osgViewer::Viewer(); //viewer-setUpViewInWindow(100, 100, 800, 600, 0); viewer-setSceneData(root.get()); viewer-setCameraManipulator(new osgGA::TrackballManipulator); viewer-realize(); /* //if the context was created then attach to our viewer if(graphicsContext) { viewer-getCamera()-setGraphicsContext(graphicsContext); //viewer-getCamera()-setViewport(new osg::Viewport(0, 0, traits-width, traits-height)); }
[osg-users] Question To OpenSceneGraph Development Team.
Hey, First Thing I Would To Thank You For Your Great Job In OSG Library, Anyway, I Notices That ShaderGen.h Does Not Support OpenGLES 2.0 For Now, Is It Possible To Know It Will Be Supported. Btw, Merry Christmas guys :) ... Thank you! Cheers, Laith[/list] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35121#35121 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release
What is the status of OSG 2.9.10? I don't see it on the download page and I don't have access to SVN (not allowed through my company firewall)? Paul P. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35126#35126 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How do I handle EventVisitors that contain multiple events?
Hi, I want to have one of the nodes in my scene graph respond to key presses by giving it an event callback. When the callback gets an EventVisitor containing a KEYDOWN event, I want it to eat that event and keep others from seeing it. I noticed that EventVisitors have the capacity to contain a whole list of events, not just one. I also noticed that, at least for my simple app, this list always contains only one event. Do EventVisitors ever contain more than one event? If so, how should I get my callback to eat certain key events while leaving the other events alone? I can think of two approaches: [list=] Remove the event from the EventVisitor's event list, using std::list::erase(). Call GUIEventAdapter::setHandled(true) on the key event we want to eat. [/list] Which approach is better? On the other hand, if EventVisitors only ever contain one event, I assume I can eat the event by simply not calling traverse() in my callback. I'm worried, however, that this might make my app less future-proof, in the event that future versions of OSG start putting multiple events into single EventVisitors. Is this a valid concern? Any help would be greatly appreciated, -- Matt[/list] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35108#35108 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] MS Kinect - official drivers available
Hi guys, Here is our first test in our company with Kinect, OSG and OpenNI : http://www.youtube.com/watch?v=11Dp7ZilvwI The skeleton is rendered in real 3D, not projected on the screen in 2D. We have an application in mind to develop, I'll let you know if we manage to get it working ! Cheers, -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgManipulator::Dragger event handler
How (or where) is done the link between the mouse event and the dragger handle function. Is there somewhere a pick function? Thank you! Cheers, François -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35129#35129 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fullscreen dual monitor spanning
I'm a beginner with OSG. Can you please give me some code snippets? Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35130#35130 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release
Hi Paul, On Thu, Dec 23, 2010 at 11:20 AM, Paul Palumbo paul1...@yahoo.com wrote: What is the status of OSG 2.9.10? I don't see it on the download page and I don't have access to SVN (not allowed through my company firewall)? Sorry, I tagged 2.9.10 then had to dive into a major bug hunt and debugging session so didn't post details of the release on the downloads dev release page. I've now added a quite note on the dev release page with likes to the zip file for sources. Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render to texture 3D
Thanks a lot ! It works :D Frederic Bouvier wrote: I used camera-setImplicitBufferAttachmentMask( osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT, osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT ); to avoid having a depth buffer attached. HTH Regards, -Fred - Julien Valentin a écrit : Thank for your answer: I've manage to make it work in pure GL3 without osg and see that your tweak in osg is the right thing to do. However it always doesnt work.. here are the different GL call for fbo creation for 2 case: -working case (only one slice) cam-attach( osg::Camera::COLOR_BUFFER0,tex,0,0) Code: glGenRenderbuffersEXT(1, 048DEA40) | glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 1) | glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24_SGIX, 64, 64) | glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 1) //render to only one slice | glFramebufferTexture3DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_3D, 3, 0, 0) | glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) | glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 1) -the FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS case with cam-attach( osg::Camera::COLOR_BUFFER0,tex,0,osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER) Code: | glGenRenderbuffersEXT(1, 0484EA40) | glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 1) | glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24_SGIX, 64, 64) | glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 1) //render to all slice | glFramebufferTextureEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, 3, 0) | glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) All seems right but error occurs on glCheckFramebufferStatusEXT.. Further, my working version (pure GL3) dont initialize RenderBuffer with GL_DEPTH_COMPONENT24_SGIX, but with GL_RGBA Could it be a problem with it? Strange because it dont bother the only one slice version... Could it be because I use CORE 330 shaders? Please help Frederic Bouvier wrote: Hi Julien, It's me that submitted this change at http://www.mail-archive.com//msg05568.html It's hard to tell what's going wrong without the full code of your camera setup. In http://www.opengl.org/registry/specs/ARB/geometry_shader4.txt error 0x8da8 refers to FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB and the document has possible cause for this error. Regards, -Fred - Julien Valentin a écrit : Hi, I'm trying to make efficient fluid simulation with osg I've just found this page : http://www.mail-archive.com//msg05568.html It look pretty great as my 1 camera per slice code is very CPU time consuming. I develop a geometry shader that change gl_layer value per primitive. It work so i change my texture my texture attachement to camera's FBO as follow: Code: for(int i=0;i_depth;i++){ //one cam per slice _cameras[i]-attach( osg::Camera::COLOR_BUFFER,tex,0,i,false); } to for(int i=0;i1;i++){ //one overalll camera _cameras[0]-attach( osg::Camera::COLOR_BUFFER,tex,0,osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER); } But this change make a crash: Code: RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8da8 ___ osg-users mailing list 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=35027#35027 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum :D :D :D :D :D :D :D :D :D :D -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35132#35132 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] New book published - OpenSceneGraph 3.0 Beginner's Guide
Easy to purchase and download online. It's a PDF, and encoded in the PDF is a license mentioning me as the purchaser, to discourage distribution of free copies. Very nice touch. The book is just beautiful. Well done, great work! -Paul On 12/22/2010 5:22 PM, Wang Rui wrote: Hi Paul, Yse, there is an ebook version of this book on the Packt website. Take care of your eyes. Long time working at the computer will harm them, too. Cheers, Wang Rui 2010/12/22 Paul Martzpma...@skew-matrix.com: Is the book available electronically? Kindle, safari, PDF, etc? (Due to my eyesight, I am no longer able to read print material of any kind.) Thanks, -Paul ___ 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 -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] MS Kinect - official drivers available
Definitely nice! But to be really useful, the skeletton should include head position and possibly rotation and the angles of hand and feet. Then the motion could be realistically mapped onto a 3D avatar. I heard news that the resolution of Kinect might be increased to 640x480 by firmware update (some additional compression on the USB link). Then this might be feasible. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] invalid operation (osgearth and viewer)
On Wednesday 22 December 2010 15:09:45 Martin Naylor wrote: [...] It does appear as an earth but with no textures, height data is applied to the earth and shows ok, just no textures. Anyone know why, it works ok on my Nvidia 480 desktop, guess this could be an OSGEarth issue or the chipset driver is just naff? Hi Martin, if you are using the intel graphics drivers on Linux, and if your problem is related to the use of compressed textures, you can get the textures displayed in two ways. Try enable S3TC texture compression even if software support is not available in driconf (Image Quality tab). Or, if your distribution supports it, install the libtxc_dxtn library, which provides software support for compressed textures in Mesa. The library was originally written and hosted by Roland Scheidegger, but has since found a new home at http://cgit.freedesktop.org/~cbrill/libtxc_dxtn/ I haven't tried the intel chipset on Windows yet, and don't know if the driver supports similar tweaks. Hope this helps, Magnus Cheers Martin Naylor ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] nVidia 64-bit quadro drivers and large number of primitives (2.8.3)
Hi, I have a Quadro FX 1700 with the latest 64-bit Nvidia drivers on Windows XP/64. My app is a 64-bit Windows application. For testing I am creating a single osg::geometry with probably about 3.2 million QUAD primitives , using quadPrims_=new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS); I am not using VBO's. Once the osg scene graph is created, and the render phase begins. I see the border of my screen flash black twice and then my application is in la-la land, with a blank 3D window and needs to be killed. The app is using about 2G of memory but I have 9G free. More info... - osg does not report any errors - if I turn off the nVidia driver and switch to the default software OpenGL driver, the geometry renders fine. - If I take a geometry of a similar size or even much bigger, but break it up into multiple geometries so that each DrawElementsUInt is smaller there are no problems. I am not aware of any specific limitations on glDrawElements that says the number of elements must be some number. The reference guide says there may be performance problems with numbers GL_MAX_ELEMENTS_VERTICES/INDICES but it is not a hard limit. Any one experienced similar problems? Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35136#35136 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] VPB vs osgEarth...
All, Up to this point, we've used VPB for building our databases that our OSG app uses. However, I've contemplated taking a look at osgEarth for future consideration. My question is, is what advantages are there for using osgEarth vs. VPB? I understand that source content (DTED, GeoTiff, etc.) is loaded on the fly in osgEarth but doesn't that hurt performance when compared to a statically built database done with VPB? Thanks for any input in advance... -Shayne ... Thank you! Cheers, Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35137#35137 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] nVidia 64-bit quadro drivers and large number of primitives (2.8.3)
Hi Andrew, I wouldn't recommend creating a single osg::Geometry with millions of vertices/primitives, while in theory it should work, even if it does it's likely to perform poorly as the GL driver won't be able to just render the data directly - it'll need to stream it in chunks. To get big datasets working efficiently it's best to break them up into chunks of tens of thousands of points and to use VBO's. This way the OpenGL data can pass the data in blocks of a size that are much more amenable to being downloaded directly to the graphics hardware. The src/osgPlugins/3dc plugin can handle tens of millions of points with decent performance, and achieve this by doing the chunking of the data I suggest above, so have a look at it's source for inspiration. Robert. On Thu, Dec 23, 2010 at 7:57 PM, Andrew Cunningham andr...@mac.com wrote: Hi, I have a Quadro FX 1700 with the latest 64-bit Nvidia drivers on Windows XP/64. My app is a 64-bit Windows application. For testing I am creating a single osg::geometry with probably about 3.2 million QUAD primitives , using quadPrims_=new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS); I am not using VBO's. Once the osg scene graph is created, and the render phase begins. I see the border of my screen flash black twice and then my application is in la-la land, with a blank 3D window and needs to be killed. The app is using about 2G of memory but I have 9G free. More info... - osg does not report any errors - if I turn off the nVidia driver and switch to the default software OpenGL driver, the geometry renders fine. - If I take a geometry of a similar size or even much bigger, but break it up into multiple geometries so that each DrawElementsUInt is smaller there are no problems. I am not aware of any specific limitations on glDrawElements that says the number of elements must be some number. The reference guide says there may be performance problems with numbers GL_MAX_ELEMENTS_VERTICES/INDICES but it is not a hard limit. Any one experienced similar problems? Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35136#35136 ___ 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] [vpb] VPB vs osgEarth...
Hi Shayne, Simple put is VPB for best performance and lowest latency, osgEarth for maximum runtime flexibility. Broadly speaking a flight sim would need to use VPB, while a GIS app will find osgEarth more appropriate. You can actually mix and match the two as osgEarth has plugin for reading VPB generated databases. Robert. On Thu, Dec 23, 2010 at 7:59 PM, Shayne Tueller shayne.tuel...@hill.af.mil wrote: All, Up to this point, we've used VPB for building our databases that our OSG app uses. However, I've contemplated taking a look at osgEarth for future consideration. My question is, is what advantages are there for using osgEarth vs. VPB? I understand that source content (DTED, GeoTiff, etc.) is loaded on the fly in osgEarth but doesn't that hurt performance when compared to a statically built database done with VPB? Thanks for any input in advance... -Shayne ... Thank you! Cheers, Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35137#35137 ___ 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] nVidia 64-bit quadro drivers and large number of primitives (2.8.3)
On 12/23/2010 12:57 PM, Andrew Cunningham wrote: Once the osg scene graph is created, and the render phase begins. I see the border of my screen flash black twice and then my application is in la-la land, with a blank 3D window and needs to be killed. The app is using about 2G of memory but I have 9G free. Sounds like a possible driver bug. Are you able to try different drivers or different graphics cards? Try a GeForce or an ATI for example. Or try a 32-bit system with a 32-bit build. If you can isolate it to a single graphics device and set of drivers, NVIDIA might be able to produce a fix for you. (La la land, that's a Happy Days reference, right? Heyy...) -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg question
I get the following error when I run osgversion to see if it is working: osgversion: error while loading shared libraries: libosg.so.69: cannot open shared object file: No such file or directory The file does exist in /usr/local/lib64. I am using the latest version from svn. I have had this before and fixed it, now I can't remember how I used to fix it. Thanks for any help. Michael ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg question
On 12/23/2010 1:44 PM, Michael W. Hall wrote: I get the following error when I run osgversion to see if it is working: osgversion: error while loading shared libraries: libosg.so.69: cannot open shared object file: No such file or directory The file does exist in /usr/local/lib64. I am using the latest version from svn. I have had this before and fixed it, now I can't remember how I used to fix it. Thanks for any help. Your app was linked with a .lib file that referenced a different libosg.so, one with a different SO version number baked into its name. There are many ways to make this happen, so I'll leave the fix up to you. Hopefully the information I've provided, combined with the knowledge of how you administer your own system, will tell you what you need to do. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] VPB vs osgEarth...
Shayne, Whether you get a palpable performance hit depends on a lot of factors. One of osgEarth's features is the ability to pull data from web mapping services (similar to Googe Maps). That type of data is pre-tiled into raster pyramids - which is what VPB does too. So if your source data is similarly prepared, you can achieve loading speeds comparable to a pre-generated terrain model. osgEarth includes tools for that. osgEarth's caching stores multi-resolution pyramids of source data, so if you have to ingest expensive data it will only be a performance hit the first time through. If you're loading flat files - GeoTIFFs, DEMs, etc - then there is some processing overhead in pulling in the data, especially if it needs reprojecting. But otherwise, you might be surprised at how fast is actually is. It is worth mentioning that osgEarth is not just a terrain engine, but a whole toolkit. It includes an API for coordinate conversion, support for vector features, utilities for clamping, a programmable manipulator, plugins for lots of web- and file-based data sources, and shader composition support. Glenn Waldron : Pelican Mapping On Thu, Dec 23, 2010 at 2:59 PM, Shayne Tueller shayne.tuel...@hill.af.milwrote: All, Up to this point, we've used VPB for building our databases that our OSG app uses. However, I've contemplated taking a look at osgEarth for future consideration. My question is, is what advantages are there for using osgEarth vs. VPB? I understand that source content (DTED, GeoTiff, etc.) is loaded on the fly in osgEarth but doesn't that hurt performance when compared to a statically built database done with VPB? Thanks for any input in advance... -Shayne ... Thank you! Cheers, Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35137#35137 ___ 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] nVidia 64-bit quadro drivers and large number of primitives (2.8.3)
Hi All, I did some testing with gDebugger (now free!) and the its support for nVidia Expert - totally clean, no errors. No breakpoints. And when running under gDebugger there were no problems What did fix it was going to the nVidia Control Panel and changing the global application settings to 3D App - Visual Simulation. Go figure. Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35144#35144 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] New book published - OpenSceneGraph 3.0 Beginner's Guide
Finally another good OSG book beside yours, Paul! :-) Yes, nice work, too Windows oriented to my taste, but of course the code must work in any platform where OSG works. Congratulations! -- A. On Thu, Dec 23, 2010 at 11:02 AM, Paul Martz pma...@skew-matrix.com wrote: Easy to purchase and download online. It's a PDF, and encoded in the PDF is a license mentioning me as the purchaser, to discourage distribution of free copies. Very nice touch. The book is just beautiful. Well done, great work! -Paul On 12/22/2010 5:22 PM, Wang Rui wrote: Hi Paul, Yse, there is an ebook version of this book on the Packt website. Take care of your eyes. Long time working at the computer will harm them, too. Cheers, Wang Rui 2010/12/22 Paul Martzpma...@skew-matrix.com: Is the book available electronically? Kindle, safari, PDF, etc? (Due to my eyesight, I am no longer able to read print material of any kind.) Thanks, -Paul ___ 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 -- -Paul Martz Skew Matrix Software http://www.skew-matrix.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] draw a 3D pipe
hi lucie, I had tied to use osgModeling to draw a curve 3D pipe. You can use Loft with a self-defined function callback of making cycle profile. this way works ok in most times, but when coordinations is very large ,but the distance is very little( some times occur in geocentric coordination) eg. p1= p1 ( 2000,2000,2000) and p2 = ( 2001,2001,2001). the geometry been created is wrong. to solve this problem,you can make a local TransformMatrix to reduce the coordination value another way to draw a 3D curved pipe is draw a cylinder between each two points on the curve. the drawback is the curve is not consequent on the vector On Wed, Dec 22, 2010 at 10:42 PM, lucie lemonnier lucielemonn...@hotmail.fr wrote: Hi, I want to draw a 3D curved pipe from a list of points. I looked at osgModeling but I don't know how to do this. Would you have an idea using osgModeling or something else? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35083#35083 ___ 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] Fullscreen dual monitor spanning
Chriss10 wrote: I'm a beginner with OSG. Can you please give me some code snippets? Thanks Well I'm sorta on my Christmas vacation right now! I would have to reproduce it on my home system, but mostly it is barrowed code from the slave cameras that are used in the hang glider simulator that is part of the examples that included in OSG. There is a part that sets up the screen called Traits where you can set up the what real estate on the screen you’re going to take up that I barrowed and added the setting overrideRedirect = true; Below that was where 4 cameras are defined. I needed only one to start and basically I set up the area and position of the camera on the screen – in this case start at 0 0 and set the width to the total of the two screens I had 3200 and the height 1200. Then attach the camera to the viewer by declaring it as a slave camera - the example is also there in the hang glider simulator code. And before you start your viwer.run() loop, you invoke the viewer function setUpViewAcrossAllScreens() and your set. Youl find that the best way to understand OSG is to run and view the source code for the examples. Even in the class I took on the subject they pay emphases of that. If you had the chance to look at my code you would see allot of rip-offs of the example code in it. D Glenn D Glenn (a.k.a David Glenn) - Moving Heaven and Earth! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35147#35147 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org