Loading Bones on Android

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

Previous topic - Next topic

AGP

Oh, you may be counting the morphs' vertices in addition to the original pose's.

raft

the number comes from IVertexController.getSourceMesh(). it's still strange that 9300 polygons have 27000+ vertices. lots of them should be shared but apparently not in your case.

i don't know what Unity exactly does. maybe it uses hardware skinning?

AGP

Look at the screenshot: it's 4800 vertices.

Like I said, IVertexController is probably adding all the morphs together.

raft

jPCT reports me 27000+ vertices. Egon what do you think?

EgonOlsen

If that's the size of the vertex array in the controller, it's the size that this thing has in memory. No idea what the loader loads though. You can verify this by using Mesh.getUniqueVertexCount(). It should more or less report the same number.

AGP

Alright, but I think it's fairly safe to trust 3ds Max's count, don't you? It could be a wrong count by jpct (like, say, counting the sum of all of the morphs), or it could be something weird either by the exporter or by the importer (or, come to think of it, by the second importer and exporter to .bones format).

raft

AGP whay don't you look at mesh.xml file?

EgonOlsen

I've no idea what a morph is in this context...jPCT displays the number that someone (in this case the loader of that model) has given to it for a mesh. It's a simple array containing the vertex data. If it reports a size of X, that's the size it has...the question is: Why?

AGP

An example of a morph would be a copy of the same model with closed eyes. This particular model has several morphs. jpct's normal behavior should probably be to create a new frame for vertex animation (and not add all the different meshes into a single one), but then again I'm not sure how the animation blending is handled.

EgonOlsen

jPCT doesn't do anything like that. It's not aware of morphs or frames or whatever. Whatever is in the engine is there, because the importer/loader considered it to belong there. If that is wrong, the importer or the file is flawed. The engine itself can't do anything about this.

AGP

I know, I meant the loader. But what's different in this case from, say, importing an animated MD2 is that not all of the morphs will have been put in the animation "track" (the morphs are there and OgreMax probably exports even the ones that aren't being used in the animation, but I wouldn't know where they would go).

raft

AGP can you send me your mesh.xml file?

AGP

I can only do it a few hours from now, but sure.

raft

@AGP looking at your mesh.xml, there are 9440 polygons and 28320 (=9440x3) vertices. so none of the vertices is shared among polygons. i don't know what causes this. possibly a problem in your model or in exporter. try playing with options of both

neither jPCT nor Bones has any flaw here. they both process what input is given

AGP

OK, but the extra vertices are definitely for the morphs. The model, I assure you, is perfect and has, as I've shown 4800 vertices. I'll ask the developer of OgreMax about this and report what he says.