Re: [osg-users] multiple matrix transfromations cause severe slowness in performance

2019-10-09 Thread Robert Osfield
Hi Gianluca,

It should be possible to have thousands of transforms in your scene graph
and still get good frame rates.  The only thing that jumps to mind right
now, is could you be doing the test with a debug build?

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] multiple matrix transfromations cause severe slowness in performance

2019-10-08 Thread Andrew Cunningham
Hi Gianluca,
We have performance problems with scene graphs when we end up with
thousands of nodes and "small=low triangle count" geometries at each node.
After investigation, it is clearly not so much the scene graph traversal
itself, as the large number of small "primitive sets". I tested this by
writing a node visitor that collected all the primitive sets from our scene
graph into one Geode - thus removed all overhead of scene graph
traversal.The performance, was better, but nothing special. However,
coalescing all the primitive sets into one primitive set caused a massive
FPS improvement. Orders of magnitude.

Andrew


On Tue, Oct 8, 2019 at 7:47 AM Voerman, L.  wrote:

> Hi Gianluca,
> I have a feeling something is wrong with your setup, as we do these sort
> of graphs in our viewer and get way higher framerates.
> I get about 60 fps rendering 1920x1080x2 (=red-green stereo) on my Geforce
> 1080,
> with a static scene of 1.1 M vertices (886k triangels)
> and in a similar shape ~9200 matixTransforms each with a ref to mostly the
> same tree (4.5k vertices, vk triangels)
> A few questions:
> where seems to be the bottelneck when you enable the stats?
> What os/gfx combo do you use?
> if you dump out the scene and load it into the osgviewer, does the
> framerate improve?
> are you sure you're not useing a windows debug build?
>
> Regards, Laurens.
>
> On Tue, Oct 8, 2019 at 2:21 PM Gianluca Natale 
> wrote:
>
>> Hi all,
>>
>> I have a performance issue in my scenegraph that I cannot completely
>> understand.
>>
>> My scenegraph is made by a main matrix transform, with these 2 children:
>>
>>- One geode that renders a big object on screen (the geometry in the
>>drawable can take up to several thousands vertices);
>>- One group node that in its turn has 200 children, each made by a
>>matrix transform and a geode. The drawable in each of those geodes is very
>>simple (no more than 100 vertices)
>>
>> It seems that this configuration allows me to have at most 50 fps.
>>
>> I feel that this should be rendered much faster.
>>
>>
>>
>> So I made some experiment. If I remove the 200 matrix transform attached
>> to the group node I mentioned above,
>> and directly apply the transformations to the vertices of the geometries
>> in the 200 drawables of the small objects, performance improves a lot, till
>> 100 fps.
>> I investigatd a bit inside OSG code (I’m using OG ver.3.4.1), and
>> apparently the only overhead due to the additional matrix transformations
>> is a call to glLoadMatrix (I’m using the old ffp).
>> How can you explain such an improvement?
>>
>> My real problem is that I would like to replace the 200 matrix
>> transfromations with 200 auto-transform matrices, since I’d like those
>> small objects to keep constant size on screen.
>>
>> But if I do that, I cannot remove the 200 transformations at all, and
>> I’ll end up with a bad performance.
>>
>> Any idea about what I can try to make rendering of my scenegraph faster?
>>
>>
>>
>> Thanks,
>>
>> Gianluca
>> ___
>> 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] multiple matrix transfromations cause severe slowness in performance

2019-10-08 Thread Voerman, L.
Hi Gianluca,
I have a feeling something is wrong with your setup, as we do these sort of
graphs in our viewer and get way higher framerates.
I get about 60 fps rendering 1920x1080x2 (=red-green stereo) on my Geforce
1080,
with a static scene of 1.1 M vertices (886k triangels)
and in a similar shape ~9200 matixTransforms each with a ref to mostly the
same tree (4.5k vertices, vk triangels)
A few questions:
where seems to be the bottelneck when you enable the stats?
What os/gfx combo do you use?
if you dump out the scene and load it into the osgviewer, does the
framerate improve?
are you sure you're not useing a windows debug build?

Regards, Laurens.

On Tue, Oct 8, 2019 at 2:21 PM Gianluca Natale 
wrote:

> Hi all,
>
> I have a performance issue in my scenegraph that I cannot completely
> understand.
>
> My scenegraph is made by a main matrix transform, with these 2 children:
>
>- One geode that renders a big object on screen (the geometry in the
>drawable can take up to several thousands vertices);
>- One group node that in its turn has 200 children, each made by a
>matrix transform and a geode. The drawable in each of those geodes is very
>simple (no more than 100 vertices)
>
> It seems that this configuration allows me to have at most 50 fps.
>
> I feel that this should be rendered much faster.
>
>
>
> So I made some experiment. If I remove the 200 matrix transform attached
> to the group node I mentioned above,
> and directly apply the transformations to the vertices of the geometries
> in the 200 drawables of the small objects, performance improves a lot, till
> 100 fps.
> I investigatd a bit inside OSG code (I’m using OG ver.3.4.1), and
> apparently the only overhead due to the additional matrix transformations
> is a call to glLoadMatrix (I’m using the old ffp).
> How can you explain such an improvement?
>
> My real problem is that I would like to replace the 200 matrix
> transfromations with 200 auto-transform matrices, since I’d like those
> small objects to keep constant size on screen.
>
> But if I do that, I cannot remove the 200 transformations at all, and I’ll
> end up with a bad performance.
>
> Any idea about what I can try to make rendering of my scenegraph faster?
>
>
>
> Thanks,
>
> Gianluca
> ___
> 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] multiple matrix transfromations cause severe slowness in performance

2019-10-08 Thread Chris Hanson
Can you find a way to perform the transform on each object in a vertex
shader and not have a unique state have to be calculated for each of the
200 objects?

On Tue, Oct 8, 2019 at 6:20 AM Gianluca Natale 
wrote:

> Hi all,
>
> I have a performance issue in my scenegraph that I cannot completely
> understand.
>
> My scenegraph is made by a main matrix transform, with these 2 children:
>
>- One geode that renders a big object on screen (the geometry in the
>drawable can take up to several thousands vertices);
>- One group node that in its turn has 200 children, each made by a
>matrix transform and a geode. The drawable in each of those geodes is very
>simple (no more than 100 vertices)
>
> It seems that this configuration allows me to have at most 50 fps.
>
> I feel that this should be rendered much faster.
>
>
>
> So I made some experiment. If I remove the 200 matrix transform attached
> to the group node I mentioned above,
> and directly apply the transformations to the vertices of the geometries
> in the 200 drawables of the small objects, performance improves a lot, till
> 100 fps.
> I investigatd a bit inside OSG code (I’m using OG ver.3.4.1), and
> apparently the only overhead due to the additional matrix transformations
> is a call to glLoadMatrix (I’m using the old ffp).
> How can you explain such an improvement?
>
> My real problem is that I would like to replace the 200 matrix
> transfromations with 200 auto-transform matrices, since I’d like those
> small objects to keep constant size on screen.
>
> But if I do that, I cannot remove the 200 transformations at all, and I’ll
> end up with a bad performance.
>
> Any idea about what I can try to make rendering of my scenegraph faster?
>
>
>
> Thanks,
>
> Gianluca
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] multiple matrix transfromations cause severe slowness in performance

2019-10-08 Thread Gianluca Natale
Hi all,
I have a performance issue in my scenegraph that I cannot completely understand.
My scenegraph is made by a main matrix transform, with these 2 children:

  *   One geode that renders a big object on screen (the geometry in the 
drawable can take up to several thousands vertices);
  *   One group node that in its turn has 200 children, each made by a matrix 
transform and a geode. The drawable in each of those geodes is very simple (no 
more than 100 vertices)
It seems that this configuration allows me to have at most 50 fps.
I feel that this should be rendered much faster.

So I made some experiment. If I remove the 200 matrix transform attached to the 
group node I mentioned above,
and directly apply the transformations to the vertices of the geometries in the 
200 drawables of the small objects, performance improves a lot, till 100 fps.
I investigatd a bit inside OSG code (I'm using OG ver.3.4.1), and apparently 
the only overhead due to the additional matrix transformations is a call to 
glLoadMatrix (I'm using the old ffp).
How can you explain such an improvement?

My real problem is that I would like to replace the 200 matrix transfromations 
with 200 auto-transform matrices, since I'd like those small objects to keep 
constant size on screen.
But if I do that, I cannot remove the 200 transformations at all, and I'll end 
up with a bad performance.
Any idea about what I can try to make rendering of my scenegraph faster?

Thanks,
Gianluca
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org