Re: [osg-users] Model(s) load ~10 times longer in 3.6.x than 3.4.x series in osgviewer (and my in-house software)
Thanks Robert, I suppose my confusion comes from the original issue I was seeing... the very slow loading of ive and osg files (even though obj's are slow too) So.When osgconv creates an ive and/or osg formats from a obj, does the obj information remain wrapped up in the ive/osg formats and the obj plugin still used when loading?That would make sense that the obj plugin is the problem when loading. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74369#74369 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Model(s) load ~10 times longer in 3.6.x than 3.4.x series in osgviewer (and my in-house software)
After changing two files, I have ive files loading very fast AND osgconv converting obj files to osg and ive files very fast. You'll have to forgive my lack of understanding a lot of the internals of OSG. The code I changed was due to noticing where bottle necks (for loops) were occurring when loading .ive files in my program. Once I changed the code and created new libraries, I tested them on the osgconv with speed success. The code I changed was NOT in the obj plugin but in the osg library itself. I changed a few lines to previous changes compared to 3.4.1. Note that I did attempt at trying to use the 3.4.1 obj plugin, but quickly found it was not the problem. The two files I changed were Geometry.cpp and Drawable.cpp, and I'll need some help understanding why my changes really made a difference. When I would 'break' in my debugger when loading an ive file, most of the time the process ended up on a for loop in Geometry.cpp (line 582) in the getOrCreateElementBufferObject method. The callstack was Geometry::read, Geometry::addPrimitiveSet, Geometry::addElementBufferObjectRequired. I decided to make the change line 28 to #if 1 and add back all the if conditions of _useVertexBufferObjects. This fixed the load .ive issue but still did not fix the osgconv. I had to change Drawable.cpp line 229 to #if 1 to make _userVertecBufferObjects = false. Can someone take a look at the impact _useVertexBufferObjects has on certain files being loaded. It seems a check needs to be before the for loop of traversing through the drawElementList if it really doesn't need to be called. Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74366#74366 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Model(s) load ~10 times longer in 3.6.x than 3.4.x series in osgviewer (and my in-house software)
I wanted to see if anyone had a chance to come up with some test code I might could try out. Sorry if I sound like I'm nagging. :? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74363#74363 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgQt + OSG 3.6.2 Status
I'm no code guru (more like a hacker), but I'll post what I do if it makes sense and helps. Had to hand-type this as my code is on a different PC and I couldnt copy. You'll probably see some typos and short cuts. My setup is in a class called OSGDataViewer which double inherits a view base class (pretty much a QMainWindow) and a CompositeViewer. I define a osgQt::GraphisWindowQt* m_gw member along with all my manipulators, rootnode hud etc in this OSGDataViewer class. In my constructor, I call a method initializeOSG() which does the following: setThreadModel(osgViewer::Viewer::SingleThreaded); osg::ref_ptr cam0 = this->createCamera(x(), y(), height(), "Main Camera", false); //more on createCamera in a bit. x,y,width,height comes from qmainwindow QWidget* GLWidget = m_gw->getGLWidget(); //finally set my central widget this->setCentralWidget(GLWidget); I then setup a cam1 which is my hud camera. I'll post if you want to see it. Next I set up my root node, depthPartitionNode, and others. finally, I'll call another local method: addNewView(cam0.get(), rootnode.get(), "MainView") //i'd call this with cam1 also. This method is described below also finally, my difference scene manipulators are created and i'd do something like the following: this->getView(0)->setCameraManipulator(m_keyswitchManipulator.get()) I'd also setup callbacks as example: this->getView(1)->getCamera()->setFinalDrawCallbac(w_WinCapCallback.get()) here is my createCamera method: osg::Camera* OSGDataViewer::createCamera(int x, y, w, h, name...) osg::ref_ptr ds = osg::DisplaySettings::instance(); ds->setMaxNumberOfGraphicContext(20) osg::ref_ptr traits = new osg::GraphicsContext::Traits; traits->readDISPLAY if (traits->displayNum<0) traigs->displayNum=0; traits->windowName = name traits->. x=x y=y width=w alpha = ds->getMinimumNumberAlphaBits stencil = ds->getMinimumNumStencilBits() windowDecoration = false doubleBuffer = true; sampleBuffers = ds->getMultiSamples samples = ds->getNumMultiSamples traits->inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData((HWND)QWidget::winID()); osgQt::GraphicsWindowQt *GWQ; if (!m_gw) traits->sharedContext = 0; GWQ = new osgQt::GraphicsWindowQt(traits.get()) GWQ->createNewContextID else traits->sharedContext = m_gw GWQ = new osgQt::GraphicsWindowQt(traits.get()) GWQ->createNewContextID(); GWQ->setName(name) osg::ref_ptr camera = new osg::Camera() camera->setGraphicsContext(GWQ); QWidget* GLWidget = GWQ->getGLWidget(); GLWidget->setAttribute(Qt::WA_PaintOnScreen) . WA_NoSystemBackground WA_OpaquePaintEvent WA_DeleteOnClose GLWidget->setAttribute(Qt::ClickFocus) camera->setClearColor(... camera->setViewPort(new osg::Viewport(0, 0, traits->width, traits->height)) camera ->setLODScale(3.0) camera->setProjectionMatrixAsPerspective(.. osg::StateSet* stateset = camera->getOrCreateStateSet() stateset->setGlobalDefaults() return camera.release() here is my addNewView method: void OSGDataViewer::addNewView(osg::Camera* camera, osg::Node* scene, string viewname) osgVIewer::View* view = new osgVIewer::View; view->setCamera(camera) view->adddEventHandler(new osgGA::StateSetManipulator(view->getCamera()->getOrCreateStateSet())) view->addEventHandler(new osgVIewer::ThreadingHandler) ::WindowSizeHandler) ::StatsHandler) view->setLightingMode(osg::View::SKY_LIGHT) view->getDatabasePaer()->setUnrefImageDataAfterApplyPolicy(true, valse) this->addView(view) view->setSceneData(scene); Hope this is as clear as mud! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74359#74359 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgQt + OSG 3.6.2 Status
This is probably nothing more than a data point of things working, but I had no issue compiling/running OSG 3.6.2 and osgQt (qt 5.10 on windows 10 using VS 2017) and Linux (Cent OS7 / gcc 4.8.5). -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74350#74350 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Model(s) load ~10 times longer in 3.6.x than 3.4.x series in osgviewer (and my in-house software)
Ok...did a little testing and found that loading speed does NOT depend on image textures. I created a test plane and subdivided it to make many faces and extruded every other one to give it a little depth. The face count of my plane is ~43k faces. I UV textured the sample plane with a jpeg, one with a png, and one with no image. I converted each to a .obj. The no-image had about the same poor performance in loading as with the jpeg or png. Note that loading time doesn't matter if I convert to a osg or ive first and then load. So, for some reason, OSG 3.6.x is taking a lot longer loading a higher faced/vert count .obj (or osg or ive) object than 3.4.1. This is a show stopper for my customer, and I'll have to stick with 3.4.1 until something is figured out. Suggestions? Thoughts? Are there any optimization switches I've missed that was not default before building the 3.6.x series? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74266#74266 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Model(s) load ~10 times longer in 3.6.x than 3.4.x series in osgviewer (and my in-house software)
The image file the .obj and .ive converted uses is a .png I did verify and both 3.4.1 and 3.6.x are linking to the x64\lib\libpng16.lib. But, perhaps this is a clue? I'm doing some further investigating on a test model. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74265#74265 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Model(s) load ~10 times longer in 3.6.x than 3.4.x series in osgviewer (and my in-house software)
Good guess, however, I'm linking both 3.4.1 and 3.6.x to the same 3rdParty libs. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74264#74264 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Model(s) load ~10 times longer in 3.6.x than 3.4.x series in osgviewer (and my in-house software)
Hi, The models I build and use are mainly jpeg UV textured obj files that have been osgconv'd into an ive. I have built OpenSceneGraph versions 3.6.0, 1 and 2, and they all display this issue on BOTH windows (10) and Linux (CentOS 7). Note that I also built the OSG 3.4.1 The issue is that I can open a model in osgviewer in 3.4.1 and the model loads in the window very, very fast. When I run osgviewer in 3.6.x, it is taking ~10 times longer to load the exact same model (somtimes 15+ seconds). This is a major issue in the program I build that loads many, many different models. Thanks for any help! James -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74260#74260 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgviewerQt with view using
Hi, I'm using OSG 3.0.1 in Windows and compiling with Visual Studio V9. I am having problems when trying to use depthPartition on a view in osgviewerQt. To see the issue, change the following in the Examples osgviewerQt project: 1) comment out the QWidget *Widget2 through *Widget4 in the ViewerWidget constructor AND there cooresponding grid-addWidget(). Also comment out the popupWidget. This will simplyfy the example. 2) In the addViewWidget method, add view-setUpDepthPartition() after view-setCameraManipulator(..). When executed, I get a blank QWidget and the 'invalid enumerant' at after RenderBin::draw(..) message streaming in the DOS window. If you commented out the view-setUpDepthPartition() line, I see the cow in the widget with no problems. Thanks for your help. James -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50635#50635 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Qt 4.6 context menus not repainting in osgViewerQT or osgViewerQtWidget
I have just upgraded to qt 4.6.3, and it has corrected the problem. Thanks, Pan Liang, for the suggestion. James -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29870#29870 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Qt 4.6 context menus not repainting in osgViewerQT or osgViewerQtWidget
Hi, I'm having the same issue. I right click to open up the context menu in a list of names in a widget living next to the layout with osgViewerQtWidget, and all that is created is an outline of the menu. I've noticed that I can hit a key (like TAB or something), and the event makes the information show up in the menu. Note that the menu still works and everything, just transparent (except the boarder of it). As suggested in Eric's comment, I was running at 5ms, and bumped it up to 20ms (and beyond). I'm still having the same issue. Any help? Thank you! James -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29631#29631 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org