Page 1 of 1

(Android) Octree slower than addMeshSceneNode..

Posted: Sat Sep 10, 2011 2:56 pm
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 ??

Re: (Android) Octree slower than addMeshSceneNode..

Posted: Sat Sep 10, 2011 4:15 pm
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?

Re: (Android) Octree slower than addMeshSceneNode..

Posted: Sat Sep 10, 2011 5:09 pm
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

Re: (Android) Octree slower than addMeshSceneNode..

Posted: Sat Sep 10, 2011 5:17 pm
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).

Re: (Android) Octree slower than addMeshSceneNode..

Posted: Sat Sep 10, 2011 7:42 pm
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.

Re: (Android) Octree slower than addMeshSceneNode..

Posted: Sat Sep 10, 2011 9:37 pm
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.