Max, here are two things to try. IncrementalCompileOperation. You can activate this with the osgviewer --ico flag. It will time-slice GL object compilation over multiple frames, mitigating the chance of frame breaks from things like mipmap generation.
Buffer pools. These are helpful for managing large amounts of VBO and Texture Buffer usage. Activate these with environment variables like so: set OSG_TEXTURE_POOL_SIZE=350000000 set OSG_BUFFER_OBJECT_POOL_SIZE=350000000 The values are in bytes; adjust as necessary for the memory capacity of your GPU. Hope this helps. Glenn Waldron / @glennwaldron On Mon, Feb 16, 2015 at 4:08 PM, Max Reimann <[email protected]> wrote: > Hello everyone! > > I'm rendering a city model with about 1 million vertices and about 3 GB of > compressed (dxt1) textures. > This works fine and I get a steady 60 f/s even when viewing the whole > model at large. But when turning (its a car simulation), the draw calls > suddenly explode. > > Framedrop when turning: > see attached osg-frame-drop.png (can't post links yet..) > > > To reduce draw calls, the textures are already packed into texture > atlasses, > so there should be only max 100 texture calls per frame. > > I suspected that this might be due to culling, so I deactivated culling > for the model with setCullingActive(false), but it didn't have any effect. > The cull times stay pretty low at any time. > > Further optimizations I tried: > - use all optimizer options > - set data variance to static for all geodes > - setUnRefImageDataAfterApply for all textures, so they are not swapped > back in main memory > > This really bugs me, as I can render the whole scene pretty fast. > see osg-whole-city.png > > As you can see, there are framerate break-ins, which happen when looking > at previously not looked-at geometry (it really sounds like a culling > issue..). > > My best shot is, that osg is unloading textures when not in sight and > reloading hundreds of MBs kills the framerate obviously. > > Is there any way to disable this texture unload? > Might setCullingActive(false) actually not disable the culling? > > > Thank you in advance! > > Cheers, > Max > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=62687#62687 > > > > > Attachments: > http://forum.openscenegraph.org//files/osg_frame_drop_123.png > http://forum.openscenegraph.org//files/osg_whole_city_189.png > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

