Scaling of Models influences the 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
Veiter
Posts: 18
Joined: Sun Mar 11, 2007 6:24 pm

Scaling of Models influences the performance!

Post by Veiter »

Hello together,

i have a problem with some 3D-Trees. When I scaled them to {0.01, 0.01, 0.01} (very small), I got a framerate of 100-140. But with a scaling of {1, 1, 1} (very big), the framerate goes down to 10 !! How is that possible? I thought that the performance doesn't relate on the scaling of a Mesh. Maybe it is the texture buffer?
Luben
Posts: 568
Joined: Sun Oct 09, 2005 10:12 am
Location: #irrlicht @freenode

Post by Luben »

A scale of 1,1,1 is the same as no scale applied at all... How many trees are you rendering in our viewport?
If you don't have anything nice to say, don't say anything at all.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

It could be a few things.

If your trees are smaller, they will appear further apart realtive to their size. This means fewer trees will be in view at any given time. Fewer trees to render means faster rendering.

I'm assuming that your trees use transparency around the edges of the leaves? If so, the problem could be related to the fill rate. If you have transparent objects, the object itself must be shown, and the things behind it must be shown also. This is why games slow way down when there are lots of smoke and particle effects flying around.

Travis
Veiter
Posts: 18
Joined: Sun Mar 11, 2007 6:24 pm

Post by Veiter »

Thank you for your quick answers.

Over all, there are 1000 trees, but there are never more than 30 in the viewport.

Yes, they are transparent, so that must be the answer. Is there a possibility to handle this "planes". The same problem must appear with sprites, right?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

You can find out if that is the problem by changing the material type of each of the trees material to a solid material type. Yes, this problem occurs with transparent sprites also. Particularly if there are many of them overlapping.

Travis
Post Reply