how to add/remove items in an animated group on the fly?

Started by Angie, June 18, 2013, 11:49:56 PM

Previous topic - Next topic

Angie

hi all!
i am new to bones :) please help me to solve the problem...

in my game i need a character to carry different items in hands, like weapons.
i need to be able to change weapons on the fly without stopping the animation of the character
weapons should be attached to bones so that they can move properly, as if they were parts of character.

how should i do this? what should i export from 3d max and how do i attach things to the animated group?
i would also like to keep things modular, so every item in a separate file.

so far i managed to put a character into my app and successfully roll animation
i am using 3Dmax, android, jpct, bones

maybe asking what was asked already, please link me if it was explained
thanks!

raft

you cannot at the moment. but you can export all weapons with your model and make visible one of them at a time.

Angie

okay... if that is not possible, can I construct the animation group or whatever from different objects/files?
no animation persistance, just delete the entire animation group and then make a new with another objects

i just want to keep low memory consumption.
there are games on bones API far more advanced than mine, how do people usually solve that problem?

thanks for your reply!

raft

Quote from: Angie on June 19, 2013, 11:38:58 PM
okay... if that is not possible, can I construct the animation group or whatever from different objects/files?
no animation persistance, just delete the entire animation group and then make a new with another objects.

i just want to keep low memory consumption.
you can create new AnimatedGroup's from Animated3D's of an existing AnimatedGroup (but not from different files).

they will share Skeleton, SkeletonPose and animation data and that will save a lot of memory. you will have a master copy with all objects and some clones which are created on demand with a subset of objects.

Quote from: Angie on June 19, 2013, 11:38:58 PM
there are games on bones API far more advanced than mine..
which games are they? I'd like to know ;)


Angie

Could you explain how to export multiple objects connected to the same skeletal rig in 3DS Max?
When I export to Ogre file format I get multiple MESH files for each object. Do the invidual objects need to be attached to a single mesh and exported from there? If so, how do I set element ID? Should each object be skinned to the rig with a seperate modifier or do they need to have the same modifier for all objects?

raft

I dont have access to 3ds Max at the moment. but I'm sure it's supported and straightforward.

they should be different meshes and rigged with (attached to) same skeleton. I'm not sure if they should share same modifier but I guess not.

try playing with exporter settings. looking at OgreMax documentation and Ogre forums may also help.

Angie

All solved, thanks alot!
Pictures show how i switch different items

 


Also, can you give a hint on how to pre-process the mesh to save the memory?
it says "coordinates array is sparsely populated"

.

raft

looks cool :)

I dont think such a pre-process is necessary. make sure you use Bones' binary format. and if there is a setting in OgreMax exporter like 'use indexed geometry' make sure it's enabled (if there is, possibly it's default)