Re: [osg-users] CompositeViewer + MultiView + databasepager --> Framerate drop

2010-02-03 Thread Emmanuel Roche
Hello everyone !

Robert, in fact I found exactly where the problem comes from:

Above my star object (so all my points in a geometry in a geode) I added an
osg::Camera

On this camera I have an event callback, and in this event callback I used
to set the Camera viewport and graphics window to be the same as the master
camera (except that: 1. I doesn't make sense with a CompositeViewer since we
have 1 event traversal for possibly many View, and 2. Now I know this is
pointless anyway since a sub camera will retrieve the parent camera viewport
if it doesn't have its own (and I assume it's the same for the graphics
context ?) )

Anyway, if I remove this event callback from that camera, everything is
fine, if i keep it, I get this awfully long draw + GPU phases for at least
one View when I have two of them on the same scene.

Maybe you have an explanation for this ? But I just need to find a better
implementation for handling those stars anyway.

Manu.


2010/2/3 Robert Osfield 

> Hi Manu,
>
> I haven't tried osgEarth+multi-views+multiple-contexts like you are
> attempting so can't offer to much insight.  In your investigation one
> thing you could try is instead of creating two windows/two graphics
> contexts, is to create a single window/graphics context and then have
> the two views share this window using separate viewport to what
> portion of the window is dedicated to each view.  Using a single
> graphics context will drive both the OSG and the graphics/drover card
> more efficiently.
>
> To set the viewport just set the view's master camera to be attached
> to the window, and then set master camera's viewport to the
> appropriate portion.  Have a look at the osgcamera example to see how.
>
> Robert.
> ___
> 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] CompositeViewer + MultiView + databasepager --> Framerate drop

2010-02-03 Thread Robert Osfield
Hi Manu,

I haven't tried osgEarth+multi-views+multiple-contexts like you are
attempting so can't offer to much insight.  In your investigation one
thing you could try is instead of creating two windows/two graphics
contexts, is to create a single window/graphics context and then have
the two views share this window using separate viewport to what
portion of the window is dedicated to each view.  Using a single
graphics context will drive both the OSG and the graphics/drover card
more efficiently.

To set the viewport just set the view's master camera to be attached
to the window, and then set master camera's viewport to the
appropriate portion.  Have a look at the osgcamera example to see how.

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


Re: [osg-users] CompositeViewer + MultiView + databasepager --> Framerate drop

2010-02-02 Thread Emmanuel Roche
Also note that I store texture coordinates for those vertices (in fact I use
the texture coords array to store color data for the stars as a Vec2 [ie BV
index and Magnitude]) and I process this data using a shader...

Manu.


2010/2/2 Emmanuel Roche 

> I've managed to narrow the source of the problem even further:
>
> If I keep all my planet models and remove the stars then everything is
> still fine with 2 views !!!
>
> => So I'm on my star model now... this model is a simple geometry with
> about 11 vertices, rendered as POINTS... I know I should cut this
> geometry into pieces, but could this really explain the problem I'm facing
> now ??
>
>
> Manu.
>
>
> 2010/2/2 Emmanuel Roche 
>
>> Okay, I was wrong: this is not related to the pagedLOD+databasepager I can
>> reproduce the same behavior without my earth model if I keep the stars, sun,
>> moon and mars models...
>>
>> So I'm now trying to remove additional objects :-)
>>
>> => In fact I use a depthPartitionNode in that scene, could this be the
>> source of the problem ???
>>
>>
>> Manu.
>>
>>
>> 2010/2/2 Emmanuel Roche 
>>
>>> By the way, I also checked the camera/view details on the Screen stats,
>>> and both display exactly the same content.
>>>
>>> Manu.
>>>
>>>
>>> 2010/2/2 Emmanuel Roche 
>>>
>>> hello everyone,

 Just another strange issue I can't solve by myself here:

 I have a scene with an osgEarth earth model,
 I use a composite viewer to manage the display,

 -> When I use a single View on that scene everything is fine, and I get
 for instance something around 200fps
 -> As soon as I add an additional View on the same scene, my global
 framerate drops to no more than 30 fps !

 I used the on screen statistics and noticed that when I have two views,
 then the first one takes ages during the draw phase whereas the second one
 seems to behave just fine. (the GPU phase is also a lot longer) (I'm using
 SingleThreaded mode for now)

 Also, this is when I use a shared context for my scene,

 If I disable context sharing, then with a single View everything is
 still fine, but with two views *both* views will take ages during the
 draw phase (and also a very long time for the GPU phase)...

 Strangely, this doesn't seem to happen when I don't have an osgEarth
 model in my scene (ie so it could be somehow PagedLODs & databasePager
 related ?)

 Did someone already face this situation ? Or do you have an idea where I
 should start investigating ?

 Thanks for you help guys !

 Manu.



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


Re: [osg-users] CompositeViewer + MultiView + databasepager --> Framerate drop

2010-02-02 Thread Emmanuel Roche
I've managed to narrow the source of the problem even further:

If I keep all my planet models and remove the stars then everything is still
fine with 2 views !!!

=> So I'm on my star model now... this model is a simple geometry with about
11 vertices, rendered as POINTS... I know I should cut this geometry
into pieces, but could this really explain the problem I'm facing now ??

Manu.


2010/2/2 Emmanuel Roche 

> Okay, I was wrong: this is not related to the pagedLOD+databasepager I can
> reproduce the same behavior without my earth model if I keep the stars, sun,
> moon and mars models...
>
> So I'm now trying to remove additional objects :-)
>
> => In fact I use a depthPartitionNode in that scene, could this be the
> source of the problem ???
>
>
> Manu.
>
>
> 2010/2/2 Emmanuel Roche 
>
>> By the way, I also checked the camera/view details on the Screen stats,
>> and both display exactly the same content.
>>
>> Manu.
>>
>>
>> 2010/2/2 Emmanuel Roche 
>>
>> hello everyone,
>>>
>>> Just another strange issue I can't solve by myself here:
>>>
>>> I have a scene with an osgEarth earth model,
>>> I use a composite viewer to manage the display,
>>>
>>> -> When I use a single View on that scene everything is fine, and I get
>>> for instance something around 200fps
>>> -> As soon as I add an additional View on the same scene, my global
>>> framerate drops to no more than 30 fps !
>>>
>>> I used the on screen statistics and noticed that when I have two views,
>>> then the first one takes ages during the draw phase whereas the second one
>>> seems to behave just fine. (the GPU phase is also a lot longer) (I'm using
>>> SingleThreaded mode for now)
>>>
>>> Also, this is when I use a shared context for my scene,
>>>
>>> If I disable context sharing, then with a single View everything is still
>>> fine, but with two views *both* views will take ages during the draw
>>> phase (and also a very long time for the GPU phase)...
>>>
>>> Strangely, this doesn't seem to happen when I don't have an osgEarth
>>> model in my scene (ie so it could be somehow PagedLODs & databasePager
>>> related ?)
>>>
>>> Did someone already face this situation ? Or do you have an idea where I
>>> should start investigating ?
>>>
>>> Thanks for you help guys !
>>>
>>> Manu.
>>>
>>>
>>>
>>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer + MultiView + databasepager --> Framerate drop

2010-02-02 Thread Emmanuel Roche
Okay, I was wrong: this is not related to the pagedLOD+databasepager I can
reproduce the same behavior without my earth model if I keep the stars, sun,
moon and mars models...

So I'm now trying to remove additional objects :-)

=> In fact I use a depthPartitionNode in that scene, could this be the
source of the problem ???

Manu.


2010/2/2 Emmanuel Roche 

> By the way, I also checked the camera/view details on the Screen stats, and
> both display exactly the same content.
>
> Manu.
>
>
> 2010/2/2 Emmanuel Roche 
>
> hello everyone,
>>
>> Just another strange issue I can't solve by myself here:
>>
>> I have a scene with an osgEarth earth model,
>> I use a composite viewer to manage the display,
>>
>> -> When I use a single View on that scene everything is fine, and I get
>> for instance something around 200fps
>> -> As soon as I add an additional View on the same scene, my global
>> framerate drops to no more than 30 fps !
>>
>> I used the on screen statistics and noticed that when I have two views,
>> then the first one takes ages during the draw phase whereas the second one
>> seems to behave just fine. (the GPU phase is also a lot longer) (I'm using
>> SingleThreaded mode for now)
>>
>> Also, this is when I use a shared context for my scene,
>>
>> If I disable context sharing, then with a single View everything is still
>> fine, but with two views *both* views will take ages during the draw
>> phase (and also a very long time for the GPU phase)...
>>
>> Strangely, this doesn't seem to happen when I don't have an osgEarth model
>> in my scene (ie so it could be somehow PagedLODs & databasePager related ?)
>>
>> Did someone already face this situation ? Or do you have an idea where I
>> should start investigating ?
>>
>> Thanks for you help guys !
>>
>> Manu.
>>
>>
>>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] CompositeViewer + MultiView + databasepager --> Framerate drop

2010-02-02 Thread Emmanuel Roche
hello everyone,

Just another strange issue I can't solve by myself here:

I have a scene with an osgEarth earth model,
I use a composite viewer to manage the display,

-> When I use a single View on that scene everything is fine, and I get for
instance something around 200fps
-> As soon as I add an additional View on the same scene, my global
framerate drops to no more than 30 fps !

I used the on screen statistics and noticed that when I have two views, then
the first one takes ages during the draw phase whereas the second one seems
to behave just fine. (the GPU phase is also a lot longer) (I'm using
SingleThreaded mode for now)

Also, this is when I use a shared context for my scene,

If I disable context sharing, then with a single View everything is still
fine, but with two views *both* views will take ages during the draw phase
(and also a very long time for the GPU phase)...

Strangely, this doesn't seem to happen when I don't have an osgEarth model
in my scene (ie so it could be somehow PagedLODs & databasePager related ?)

Did someone already face this situation ? Or do you have an idea where I
should start investigating ?

Thanks for you help guys !

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