(Android) Octree slower than addMeshSceneNode..

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
dark chazz
Posts: 26
Joined: Tue Nov 11, 2008 5:20 pm

(Android) Octree slower than addMeshSceneNode..

Post by dark chazz »

This has always bugged me...
Why is it running slower even though it's rendering less ?!

addMeshSceneNode gives me a constant 60fps while octree gives 45-55fps
I'm using a Galaxy S2 which is the top phone hardware-wise at the moment, others are getting 30-40fps average with addMeshSceneNode in the same map I'm using.

Any thoughts on this ??
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: (Android) Octree slower than addMeshSceneNode..

Post by Lonesome Ducky »

The overhead of an octtree will make it slower than a normal mesh node if the mesh you're using it on isn't complex. How complex is your mesh?
dark chazz
Posts: 26
Joined: Tue Nov 11, 2008 5:20 pm

Re: (Android) Octree slower than addMeshSceneNode..

Post by dark chazz »

Lonesome Ducky wrote:The overhead of an octtree will make it slower than a normal mesh node if the mesh you're using it on isn't complex. How complex is your mesh?
Polygons: 11167
Vertices: 33501
Primitives: 44
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: (Android) Octree slower than addMeshSceneNode..

Post by devsh »

you should really have about 64kb of vertex data per draw call, so that works out to (pos,tcoord,normal,color = (4+2+3+1)*4=36)*3=108 or so bytes per triangle. This means about 606 triangles, so your mesh should have no less than 512 triangles in your octree node (actually on PC I recommend 2048).
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: (Android) Octree slower than addMeshSceneNode..

Post by hybrid »

setting the hardware mapping hint (i.e. using hardware buffers) should in most situations, also on mobiles, give a better performance than octree. Moreover, octree is trading cpu time for gpu bandwidth. On mobiles, cpu time is also very limited.
dark chazz
Posts: 26
Joined: Tue Nov 11, 2008 5:20 pm

Re: (Android) Octree slower than addMeshSceneNode..

Post by dark chazz »

devsh wrote:you should really have about 64kb of vertex data per draw call, so that works out to (pos,tcoord,normal,color = (4+2+3+1)*4=36)*3=108 or so bytes per triangle. This means about 606 triangles, so your mesh should have no less than 512 triangles in your octree node (actually on PC I recommend 2048).
ehh sorry I posted this in the beginners forum, but I think I know what you mean. :oops:
hybrid wrote:setting the hardware mapping hint (i.e. using hardware buffers) should in most situations, also on mobiles, give a better performance than octree. Moreover, octree is trading cpu time for gpu bandwidth. On mobiles, cpu time is also very limited.
You mean (scene::EHM_STATIC) ?
Ya I'm using that it's probably why the frame rate is better than octree.
Post Reply