Hi Robert,

   Thank you for your solution.  Using SampleDensityWhenMovingProperty can 
reduce the density on moving.  Mouse becomes responsive on moving now.  On the 
cpu usage, I notice it always stays on 15-20%.   I am using MFC.  When I 
clicked on menu bar and select menu, it is obviously delay.  I guess the 
problem is occurred as the following code.  I am using another thread to run 
the code below.

while (!viewer->done()) {
        viewer->run();
}

If I opened more than one sample at the same time, cpu usage will increase to 
20-30%.  The whole program will be very slow.  Anyway to avoid too much cpu 
loading.  Thanks.


Regards,
Clement


________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Robert Osfield 
[[email protected]]
Sent: Friday, 17 February 2012 10:59 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgvolume performance

Hi Clement,

On 17 February 2012 01:53,  <[email protected]> wrote:
>   I am using MFC to display osg volume data.  If the sample data is 30 * 30 * 
> 20 voxel, it is quite smooth on rotating the image on viewer.  If the sample 
> data is 350 * 350 * 60 voxel, I can't rotate the image as smooth as before.  
> If I used higher voxel data, the rotation become very hard.  I would like to 
> know if there is any way to improve the performance.  Thanks.

With higher res data you have to take more samples to accurately
represent the data so it takes much more work on the GPU to do it -
volume rendering is the most intensive type of rendering that graphics
card do so I'm afraid low framerate is the norm.  osgVolume allows you
to alter the sample density so you can trade visual quality for speed
via the SampleDensityProperty.  Press 'd' and move the mouse up and
down to alter the sample density.  You can also use a
SampleDensityWhenMovingProperty to tell osgVolume to use a different
sample density when moving.

Robert.
_______________________________________________
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

Reply via email to