irrlicht performance

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Serg88
Posts: 30
Joined: Mon Oct 19, 2009 5:52 pm
Location: Moscow/Russia

irrlicht performance

Post by Serg88 »

Hi people,
I am interested how can enlarge performance of application
or it`s trouble only with irr-engine?

My programm show me 5 FPS and
PrimitiveCountDrawn(0) return me 232873

But only my terrain use 262144 vertexes
and 26214 pyramid with 5 vertex each.

irrlicht does not assume the optimization rendering?
even 24 thousand primitives and 5 fps is very little

http://rapidshare.com/files/305726142/FPS_DEMO.rar.html

in my demo im use cycle

Code: Select all

	IMeshBuffer* mb = terrain->getMesh()->getMeshBuffer(0);

	for(int i=0; i<mb->getVertexCount();i+=10)
		{
			//core::vector3df pos = mb->getNormal(i); //mb->getTCoords(i);
			core::vector3df pos = mb->getPosition(i); //mb->getTCoords(i);
			pos.X *=5; // terrain was scaled
			pos.Y+= 5;
			pos.Z *=5;

			gameModel* tmp = new Test1(this->device,this->player.node,pos,core::vector3df(0,0,0));

		}
	printf("VERTEX COUNT: %d\n", mb->getVertexCount());

i load model with GetMesh(MODEL_NAME) and use simple animator

Code: Select all

		scene::ISceneNodeAnimator* anim = 0;
		core::vector3df end_pos = obj_pos;
		end_pos.Y += 200;
		anim = smgr->createFlyStraightAnimator(obj_pos,end_pos,1200,true,true);
		node->addAnimator(anim);
		anim->drop();
from Russia with love :))))
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Uh 232873 is quite high. If you insist on keeping it at that number, try vbo's or level of detail.
Serg88
Posts: 30
Joined: Mon Oct 19, 2009 5:52 pm
Location: Moscow/Russia

Post by Serg88 »

Please tell more about VBO, what is it?

LOD don`t needed, my models is already lowpoly(only 6 rectangles)

How i can hide objects when he is invisible or behind the wall?

Because when my camera don`t watch on terrain my FPS is still low.
This is that what worries me.
from Russia with love :))))
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

The problem is that irrlicht doesn't deal well with lots of scene nodes. I remember Bitplane wrote some code for a batching mesh, I'll dig that up later. And for VBO's, say you have a scene node called node, then you would do

Code: Select all

node->getMesh()->setHardwareMappingHint(EHM_STATIC)
Serg88
Posts: 30
Joined: Mon Oct 19, 2009 5:52 pm
Location: Moscow/Russia

Post by Serg88 »

So this is a problem of Irrlicht, hardware, or node count?
from Russia with love :))))
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Node count. Any engine will have problems with having to render so many nodes. Try this. It's bitplane's batching mesh code, which should speed up rendering for so many nodes.
Serg88
Posts: 30
Joined: Mon Oct 19, 2009 5:52 pm
Location: Moscow/Russia

Post by Serg88 »

great thanks :)
from Russia with love :))))
Post Reply