Different meshes with same skeleton

Started by kkl, March 31, 2014, 03:26:59 AM

Previous topic - Next topic

kkl

Hi,

I have different 3d models that have the same animation. Is it doable if the skeleton is shared among all the meshes? Can it be achieved by linked-duplicating the skeleton and adjust the vertex group to the same bones in Blender? I'm building an Android app and I need to save as much memory and processing power as possible. Thanks.

raft

yes that is what OgreMax exporter does at 3dsMax. multiple objects are attached to same skeleton, when they are exported together they share the same skeleton.

i'm not sure how exporter works at blender, but it should -hopefully- work the same way.

kkl

Quotemultiple objects are attached to same skeleton
Did you mean the ninja and sword example? If yes, i think i meant different context. My case is abit different though. E.g. I have a group of fish sharing the same skeleton animation. Each fish has different meshes but with same animation skeleton and has its own animation frame. Is it doable by using same skeleton?

How do we do it in 3dsmax to share the same skeleton? Do we just export the skeleton along with all objects without any further setup? I'll try to reproduce it in Blender and see if it works.

raft

Quote
How do we do it in 3dsmax to share the same skeleton? Do we just export the skeleton along with all objects without any further setup? I'll try to reproduce it in Blender and see if it works.
you dont export skeleton seperately. you attach many objects to same skeleton with a proper modifier (pysique or skin). in OgreMax setup, you define animations (start - end frames). i'm not sure if you can define different animations for different objects but i dont think soo. finally you export your objects (not the skeleton) and skeleton is also automatically exported to a seperate file

Quote
My case is abit different though. E.g. I have a group of fish sharing the same skeleton animation. Each fish has different meshes but with same animation skeleton and has its own animation frame. Is it doable by using same skeleton?
I dont think so. even if so, (i.e. different objects have different animation sequences) Bones cannot import it.

but, if your objects will have different animations, sharing skeleton will not reduce memory usage that much. it will reduce but not that much. that's because the skeleton data itself is not that big (assuming you dont have too many joints in your skeleton). animation data itself is much bigger than that.

kkl

#4
I guess I have to make a different skeleton for each fish in this case. BTW, how do we see the memory usage for Bones, e.g. the skeleton data and animation data? It would be easier for me to plan how many skeletons should be fit into scene with the limit of android phones.

raft

Quote
I guess I have to make a different skeleton for each fish in this case.
I guess so.

QuoteBTW, how do we see the memory usage for Bones, e.g. the skeleton data and animation data? It would be easier for me to plan how many skeletons should be fit into scene with the limit of android phones.
You can inspect memory with android's DDMS tools. I've never used it for memory profiling  but I know it can do that

kkl

Is there any way to track the memory before making them into java objects? DDMS tools seems to track memory by java objects. I'm trying to track memory while compiling .bones file so I can estimate the memory usage, to skip one process. 

raft

you mean a method like sizeOf(skeleton) ? no. i'm not aware of such a thing.

I'll suggest dont worry about memory. the overhead a skeleton adds is really negligible unless you have a huge skeleton(with many many bones). have a look at code of Skeleton class to convince yourself.

kkl

Haha.. sure.. I guess I'll check with DDMS tools. I have been having alot of problems with memory issue, especially low end devices, mostly caused by texture data. That's why I'm trying my best to save memory. Thank you so much for your help btw. Appreciate it ;)

raft

you are welcome ;) a texture consumes much more memory than a skeletom btw if you keep a copy in memory.