[osg-users] osgWidget::WindowManager::createParentOrthoCamera
Hi, what are the characteristics of the camera that returns osgWidget::WindowManager::createParentOrthoCamera ? Thank you! Cheers, Cosimo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35249#35249 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] PagedLOD problem (setFileName vs addChild)
Hi, I have a set of terraintiles (wavefront obj meshes) with 2 lods wich I'm trying to use with the PagedLOD node like this: Code: osg::Node* land1 = osgDB::readNodeFile(land1.obj); osg::Node* land2 = osgDB::readNodeFile(land2.obj); osg::PagedLOD* tiles[48*57]; osg::MatrixTransform *xform[48*57]; int i=0; for (int y=0;y48;y++) { for (int x=0;x57;x++) { tiles[i]=new osg::PagedLOD; tiles[i]-addChild(land1,0,2); tiles[i]-addChild(land2,2,4); xform[i]=new osg::MatrixTransform; xform[i]-setMatrix( osg::Matrix::translate(x*2, y*2, 0.0f) ); xform[i]-addChild(tiles[i]); root-addChild(xform[i]); i++; } } I translate the tile because each tile is centered around 0,0,0. Now, this works just fine, no performance problem at all but as you can see I preload the meshes and use addChild(). I would like to use setFileName, something like this: Code: osg::PagedLOD* tiles[48*57]; osg::MatrixTransform *xform[48*57]; int i=0; for (int y=0;y48;y++) { for (int x=0;x57;x++) { tiles[i]=new osg::PagedLOD; tiles[i]-setFileName( 0, land1.obj ); tiles[i]-setRange( 0, 0, 2); tiles[i]-setFileName( 1, land2.obj ); tiles[i]-setRange( 1, 2, 4); xform[i]=new osg::MatrixTransform; xform[i]-setMatrix( osg::Matrix::translate(x*2, y*2, 0.0f) ); xform[i]-addChild(tiles[i]); root-addChild(xform[i]); i++; } } This works too but performance is allot worse, the loading of the meshes is causing stuttering of the view/animation. And the tiles takes a long time to load (3 seconds before the first tile shows up). I dont want to preload all the tiles since that kind of defeats the whole idea with PagedLODs. In the above example I use the same 2 lod meshes for all tiles, this will change if/when I get the setFileName example to work. Am I doing something utterly wrong? The mesh land1.obj is around 260kb and land2.obj is around 50kb. Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35248#35248 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Happy New Year !
A fruitfull, enjoyable and productive 2011 to you all! Forum traffic will probably increase the next days as people get back to work. kind regards, Roland -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35251#35251 ___ 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 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] OSX .app bundle internal dir path rules?
greetings, I'm very new to MAC platforms. I'm in the process of porting an osg-based app to the mac and before I go too far with creating new 'default' search paths for required data, I would like to know if anyone can supply any insights to the actual path rules to the internal app bundle directories. For example, suppose I have a couple of databases that are needed by the app. what 'path' does the resources folder represent? e.g., if I want them under a sub-directory -- e.g., Scenes, would the 'default' path for my app be ./Scenes ? I'm just not clear how the various directories hidden in the app bundle are referenced by 1) code in general, 2) the osg image and database pluggins. Thanks in advance for advice! Cheers, Ted -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35254#35254 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSX .app bundle internal dir path rules?
From within the .app bundle, try using @executable_path as the folder in which the unix-style executable (inside the bundle) lives. Then you can use @executable_path/../Plugins and so forth to go higher up in the bundle with whatever you need to access. That's how I set things up in my mac OSG apps. Especially with respect to use of install_name_tool to get all the dylib files pointing only to other libraries inside the bundle. -Len On Sun, Jan 2, 2011 at 9:20 PM, Ted Morris ted.mor...@gmail.com wrote: greetings, I'm very new to MAC platforms. I'm in the process of porting an osg-based app to the mac and before I go too far with creating new 'default' search paths for required data, I would like to know if anyone can supply any insights to the actual path rules to the internal app bundle directories. For example, suppose I have a couple of databases that are needed by the app. what 'path' does the resources folder represent? e.g., if I want them under a sub-directory -- e.g., Scenes, would the 'default' path for my app be ./Scenes ? I'm just not clear how the various directories hidden in the app bundle are referenced by 1) code in general, 2) the osg image and database pluggins. Thanks in advance for advice! Cheers, Ted -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35254#35254 ___ 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