Hello, Sebastian

I find something new. After I remove the prerender cameras (which has customized shaders), the FPS becomes 60, more or less,even with the models.

So I guess the problem lies in these cameras.

When I make the shaders do nothing, the FPS doesn't changer, still 3FPS.
When I disable those pre render cameras, FPS goes up , to a normal state, i.e. 60

There are altogether 36+22+1 prerender cameras. So perhaps it is because the cameras should render one by one, thus FPS gets so slow.


I wonder if there is a way to make those prerender cameras render parallelly?

Thank you very much for any advice!

Cheers

Shuiying







On 02/05/2012 12:11 AM, wang shuiying wrote:
Hello, Sebastian

Of course, I can share my models. They are all from free model website.

attached are one house,7M, and 1 car.

after I change the timer interval to 1, the time interval for osg
update turns 170, better than before, but still bad performance.

Thank you very much for your advice!

Shuiying


On 02/04/2012 11:33 PM, Sebastian Messerschmidt wrote:
Hello Shuiying,

Hello, Sebastian

my model is simple 3D model like car (1MB), house(2~7MB).
That still says sort of nothing about the model ...

This application is a car simulator within the framework of OROCOS,
which is a multi-task real time toolkit. OSG is used to display the
simulator.

I took a look at the "root" code just now (I only here take over
the half done job of someone else:-( ).

it shows that  there is:

a Qlist of   View3D, which is derived from  QOsgWidget and  osgViewer.

whenever there is a new subscenegraph (osg::group node), it will be
added to a view3D(because it has a osg::group as a member);

at the same time  the  cameraNode of this subscenegraph will be
collected by a cameraCollector; (so that all camera will be
controlled  to act coherent)

Then this view3D(as a QOsgWidget) will be added to   QMainFrame.

I think this following  line of source code may help explain the
problem:

connect(&mTimer, SIGNAL(timeout()), this, SLOT(updateGL()));
    mTimer.setInterval(30);
    mTimer.start();

So the scene update rate is not controlled by GPU or something, it
is controlled by QT  timer, that is disappointing.:-(
You're right.
The problem is that timer will fire every 30ms which should give you
around 33Hz maximum (effectively it will fire around twice the time
your OS schedulers minimum thread time).
Anyways, for the maximum framerate try setInterval 0 or 1.

Am I right here?

So is there a way to get higher "FPS" based on this condition?
That depends. You reported 300ms per update, which is 3 FPS, so
increasing the frame rate is not purely based on your timer.
First of all: Is your project running in debug or release mode? If it
is debug I strongly suggest measuring any timings in release only, as
the debug overhead is huge.
If you're already running release the problem is most likely in your
models. There is just no general suggestion how to improve rendering
time, as it mainly depends on the scenegraph's structure.
Maybe running an optimizer on the model will fix some of the major
problems.
In order to see if there is a framework induced penalty you should
try to load a model with the osgviewer and check the framerate there
(just press 's' to see the framerate and other statistics). If the
framerate there is much higher than in your application, there most
likely is a problem in your application. If not, your model is quite
heavy.
If you wont mind sharing one of the models (you can also send it to
my private address if you don't want to make it public) I can see
what are my results here with my renderer.

cheers
Sebastian

Thanks a lot in advance!

Shuiying





On 02/04/2012 09:47 PM, Sebastian Messerschmidt wrote:
Hello Shuiying

You didn't tell us what kind of models. If I would add 51 of my
terrain models i'd be happy to get 3 frames ;-)
Also you didn't tell us what your application is ... more or less
only a osgviewer?
In case you provide a little more detail you probably get some
answers/help

cheer
Sebastian
Hello,

This is  somehow frustrating, if the rendering rate is the same
with update rate.

I check the update interval of the sceneNode in my application, it
turns out to be 300ms.

I only attach 51 3D models in my application.

when there is only 5 3D models, the interval is 70ms.

I just wonder whether it is normal or not?

And update rate is the same with rendering rate?

Thank  you very much for any advice!

shuiying


_______________________________________________
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