performance problems? is irrlicht slow?
performance problems? is irrlicht slow?
hello,
i am encountering some performance issues with irrlicht. just to test the performance of the engine i used the HelloWorld example to render 100 of this sydney models, which makes an amount of ca. 140.000 polys. but i just got a frame rate of 14. my configuration:
AMD XP 3000
1GB RAM
Geforce 6600GT
i find 14 very low for that? has anyone an idea why it is like that, or is irrlicht just quite slow? i found some posts in the net, telling that irrlicht has a good performance. for comparision: rendering 400.000 - 500.000 polys with osg has about the same frame rate O.o (not exactly sure, i already deleted osg because i hated it but i was impressed by its speed).
so is it true or am i just doing something wrong, by simply adding the models in a row?
i am encountering some performance issues with irrlicht. just to test the performance of the engine i used the HelloWorld example to render 100 of this sydney models, which makes an amount of ca. 140.000 polys. but i just got a frame rate of 14. my configuration:
AMD XP 3000
1GB RAM
Geforce 6600GT
i find 14 very low for that? has anyone an idea why it is like that, or is irrlicht just quite slow? i found some posts in the net, telling that irrlicht has a good performance. for comparision: rendering 400.000 - 500.000 polys with osg has about the same frame rate O.o (not exactly sure, i already deleted osg because i hated it but i was impressed by its speed).
so is it true or am i just doing something wrong, by simply adding the models in a row?
-
- Posts: 370
- Joined: Mon Aug 29, 2005 10:54 pm
- Location: http://web.utk.edu/~pfox1
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
if you post your code where you "multyplied" your sydneys, maybe we will all see that you are having 100 instances of a meshnode with a Imesh in it (so you have 100 sydneys in your dynamic memory....which is only 1GB...instead of having one ) ...are you atleast crating it as octtree?
what is this thing...
needforhint > could you re-explain that please. I take it you are trying to say that you should (obviously) load and store 1 mesh and use instances of that mesh (copies)?
So what is the correct way to do that?
IAnimatedMeshSceneNode = SceneManager->getMesh();
or
sm->addAnimatedMeshSceneNode.
or
something else???
thnx
So what is the correct way to do that?
IAnimatedMeshSceneNode = SceneManager->getMesh();
or
sm->addAnimatedMeshSceneNode.
or
something else???
thnx
thanks for the answers so far. here's the code part which should be relevant. i hope it helps:
As I said, I just started to use Irrlicht and tested it's performance. Thats why I don't know about how to use an octree, I was just going straight ahead. I'll take a look for this octree in the documentation.
I was looking for a graphic angine that has a good gui available and Irrlichts GUI is great, compared to what other engines have (mostly as additionaly libs). And also the API of Irrlicht is very intuitive, thats why I would like to use it, just this performance thing is a little odd
all suggestions are very welcome, thanks a lot
Code: Select all
IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
for (int j=0; j<20; j++)
for (int k=0; k<20; k++)
{
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
node->setPosition(vector3d<f32>(-(f32)j*20, 0.0, (f32)k*20));
node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0, 310);
node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
}
smgr->addCameraSceneNodeMaya();
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
I was looking for a graphic angine that has a good gui available and Irrlichts GUI is great, compared to what other engines have (mostly as additionaly libs). And also the API of Irrlicht is very intuitive, thats why I would like to use it, just this performance thing is a little odd
all suggestions are very welcome, thanks a lot
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
here is a demonstration http://www.medeal.sk/irr/ for all of you who find irrlicht "slow", there is a 32bit per pixel render turned on and a moving light is placed so every dwarf is calculated in your graphic card uniqely
Last edited by needforhint on Fri Oct 21, 2005 11:35 am, edited 1 time in total.
what is this thing...
i was already using direct3d 9.0 and also tried direct3d 8 and opengl, they all result in the same frame rate. well i will try to put "IAnimatedMeshSceneNode* node" out of the loop, but i am afraid this will not change anything, for the drawing is not happening there but in a later loop. but for sure my way was poor style.
well i will take a look at your example with the dwarfs
are there some kinda "benchmarks" of Irrlichts performance on different machines? I'd like to compare how much my machine should be capable of.
thanks so far
well i will take a look at your example with the dwarfs
are there some kinda "benchmarks" of Irrlichts performance on different machines? I'd like to compare how much my machine should be capable of.
thanks so far
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
hm,
I think it is a Graphicscard and Engine Problem.
if you make 1 mesh, with 1'000'000 Polygon it runs with 60 fps
but if you make 100 x animationcount Meshs with 140'000 x animationcount polygon you have 10fps.
First, the engine have to Flusturm all, 2. the engine, have to animate all
3. the Graficscard, need to set a own texture, per loaded mesh. (100x animationcount and 1 mesh.)
I think, thats it.
I think it is a Graphicscard and Engine Problem.
if you make 1 mesh, with 1'000'000 Polygon it runs with 60 fps
but if you make 100 x animationcount Meshs with 140'000 x animationcount polygon you have 10fps.
First, the engine have to Flusturm all, 2. the engine, have to animate all
3. the Graficscard, need to set a own texture, per loaded mesh. (100x animationcount and 1 mesh.)
I think, thats it.
is that right? if you load 100 meshes but they all use the same texture then it SHOULD only be used and set once per frame, at least that is what I thought was happening.. in the docs it states if it is already loaded it won't be loaded again - and batching will make sure it renders all with X texture before moving on. So I can't see it swapping textures 100 times at all.
I could be wrong, please someone let me know If I am and need to do more manual batching.
I could be wrong, please someone let me know If I am and need to do more manual batching.
Well first: I solved my little speed problem, thanks for the help. Though I still don't know what happened, I just copied the code to a new project and it worked. Maybe some stupid Problem with the Project settings.
I looked a little bit deeper to the OpenGL source of Irrlicht (I don't know DirectX) and I think one issue of Irrlicht is, that it is not optimized for specific kinds of models. Which is good on the one hand, because it keeps the API easier, but bad on the other hand, because it might lack in speed sometimes. If you have static models (like houses or trees) you can optimize a lot (using display lists of OpenGL for example). But using an animated model or not, doesn't make a real difference in Irrlicht (in ways of performance) it's using mainly the same way of rendering. I tested Irrlicht against OSG (which is really fast, but sucks about the rest (API, docu, ...)) with static models and OSG is almost 3 times faster (2000 models, together more than 1.300.000 polys: still 12 FPS).
Anyway I will go on with Irrlicht, for it is still fast enough and has a great API and a GUI System included. Try to get a GUI running with other Engines ...
I looked a little bit deeper to the OpenGL source of Irrlicht (I don't know DirectX) and I think one issue of Irrlicht is, that it is not optimized for specific kinds of models. Which is good on the one hand, because it keeps the API easier, but bad on the other hand, because it might lack in speed sometimes. If you have static models (like houses or trees) you can optimize a lot (using display lists of OpenGL for example). But using an animated model or not, doesn't make a real difference in Irrlicht (in ways of performance) it's using mainly the same way of rendering. I tested Irrlicht against OSG (which is really fast, but sucks about the rest (API, docu, ...)) with static models and OSG is almost 3 times faster (2000 models, together more than 1.300.000 polys: still 12 FPS).
Anyway I will go on with Irrlicht, for it is still fast enough and has a great API and a GUI System included. Try to get a GUI running with other Engines ...