[osg-users] (no subject)
Oran Wallace
oran.wallace at survice.com
Tue May 1 17:31:55 PDT 2018
Hi All,
Been using OSG for a while and have learned a lot and enjoyed it. I currently have an application with uses OSG and Qt for displaying a highly detailed model. A database is loaded which may cause colors in the model to change or additional geometries to be generated.
My OSG viewport is a class which subclasses from QWidget and osgViewer::CompisiteViewer and is embedded into a QMainWindow. This works fine so I've stuck with it. The application can perform most CAD-like operations on the model with OSG.
I've finally encountered a model which brings my application to around 1-2 fps while interacting with it. I know there are various techniques used to help with performance but also understand the approach depends on the situation. I'm currently considering a major rewrite.
Scene Details:
1. 540k vertices
2. 81000 drawables
3. 77000 sorted drawables
4. 81000 fast drawables
5. 81000 primitive sets
6. 100000 triangles
7. 37000 quad
8. 181000 polygon ( probably hurting a lot)
9. 26000 unique state sets
10. 73000 instance state sets
11. 28000 groups
Cull: 113.50, Draw: 390, GPU: 355 (never seen values this high on the forums)
Additionally the graph doesn't seem to rendering correctly; the largest "bar" is Cull and last ~10% is the Draw, which doesnt seem to match the values. (Probably because a single frame takes so long?)
Implementation Details:
1. I am orthographic project as it is a "CAD" style application.
2. Currently all objects are within Geode->Geometry nodes, each with their own vertex, color, and normal arrays.
3. The main "mode" of the application is a "ghosted" mode which is applied to the walls of the model. Each wall has an osg::Material set to it and blending turned on.
4. All objects are pickable and hold a variety of property data (extracted from the models file or the database). I have implemented "picking" using the PickHandler::pick example and code.
5. A user often views the whole model from afar interacting with other Qt widgets and watch how the scene changes, occasionally they will zoom in on a section but are never "inside" the model. I can clearly see when view frustum culling is working when zooming in.
6. My graph is VERY flat. Nearly all object are attached to the root node (objects like cubes, cylinders, and meshes), when the rooms form a closed space I create a group node whos children are the walls. (I often rearranged it but never saw an performance changes from this)
7. Anything else you need to know...
Fairly certain my main problem is just the sheer number of draw calls the occur when my models get a decent amount (20,000+) objects. It seems a remedy for this is to combine drawables and share one vertex array (correct?). Would this totally break the picking code? This application is designed to run on computers with "buisness" level GPU (example GeForce GT 640) but sadly I have to use the nouveau drivers.
Sorry for being so long winded by wanted to clearly lay down the situation for anyone that feels like helping. Also thanks a lot to anyone willing to help me out!
~Oran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180502/582c6c05/attachment.html>
More information about the osg-users
mailing list