Loading Bones on Android

Started by AGP, August 29, 2011, 10:02:52 AM

Previous topic - Next topic

EgonOlsen

Quote from: raft on September 04, 2011, 10:06:58 PM
On my N1, animating 8 Ninjas barely increased from 20 fps to 21 fps, I dont know why. But I'll still keep the modification. %5 percent is good enough.
My test case rendered only one ninja, but applied the animation 10 times to it in a frame...to stress the animation part more than the rendering itself.

AGP

Oh, good to know: animatedGroup.get(0).touch() still renders at 60 fps.

raft

Quote from: EgonOlsen on September 04, 2011, 10:34:52 PM
My test case rendered only one ninja, but applied the animation 10 times to it in a frame...to stress the animation part more than the rendering itself.

i see. so we get something around 5% overall

raft

@AGP have you tried replacing Ninja model with your model?

AGP

I did the opposite test and got that version mismatch message. Would the reverse work?

raft

with latest version, both tests should work. i especially recommend replacing ninja with your model first

AGP

Cool, I'll report back in a second.

AGP

#37
OK, 12-13 fps with your ninja demo (exactly the same as mine when I don't call animatePose()). So I'm already experiencing a boost of 20% (didn't really get your conclusion of 5 and now have confirmed 20 in practice). That's a little better but not enough.

raft

can you please post fps of:

* ninja demo with 3 ninjas
* ninja demo with your model

AGP

12-13 fps with my model, 59-60 fps with 3 ninjas.

raft

really strange ::) the only explanation i can think of is, your model skinned too heavily. ie: each vertex is influenced by a lot of joints. but still IMHO it shouldnt differ that much.

send me your model and i'll have a look. i'll PM my email

AGP

Five ninjas and it's still at 60 fps. I didn't bother test with more, but clearly it can take more ninjas.

raft

i've inspected your model. it seems as it's more complex then you said

a few numbers:

             ninja     your model
vertices     781+61       28720
joints         28           66


according to these numbers slow down is expected. if your model is really 9300 polygons all vertices should be distinct. even so, there are some extra vertices ::)

@Egon I don't know why object compiler reports 2712+312 vertices for ninja. i get these numbers from VertexController.getSourceMesh()


EgonOlsen

Because i took these numbers from the desktop version, which doesn't compile to indexed geometry by default, i.e. it results in triangles*3 vertices. Animation processing will still happen on the 781 vertices you mentioned. The compiled pipeline will map between the two formats at runtime. My bad...i should have noticed this earlier. jPCT-AE compiles to indexed geometry by default, at least for animated objects.

AGP

#44
Except that it's not more complex then I said (the number of polys here refers to squares rather than tris):

Multiply by two to get the exact number of tris (but the burger isn't skinned so you'd have to subtract its polys and vertices to get a relevant number).

And again, Unity does it at 60 fps. Since it's not jPCT, I see no reason why bones in a Java VM should be any slower than in a native machine.