www.jpct.net

Bones - Skeletal and Pose Animations for jPCT/jPCT-AE => Bones => Topic started by: Angie on June 18, 2013, 11:49:56 pm

Title: how to add/remove items in an animated group on the fly?
Post by: Angie on June 18, 2013, 11:49:56 pm
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!
Title: Re: how to add/remove items in an animated group on the fly?
Post by: raft on June 18, 2013, 11:58:06 pm
you cannot at the moment. but you can export all weapons with your model and make visible one of them at a time.
Title: Re: how to add/remove items in an animated group on the fly?
Post by: 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.
there are games on bones API far more advanced than mine, how do people usually solve that problem?

thanks for your reply!
Title: Re: how to add/remove items in an animated group on the fly?
Post by: raft on June 20, 2013, 12:40:34 am
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.

there are games on bones API far more advanced than mine..
which games are they? I'd like to know ;)

Title: Re: how to add/remove items in an animated group on the fly?
Post by: Angie on June 20, 2013, 11:48:44 am
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?
Title: Re: how to add/remove items in an animated group on the fly?
Post by: raft on June 20, 2013, 02:29:54 pm
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.
Title: Re: how to add/remove items in an animated group on the fly?
Post by: Angie on June 29, 2013, 11:26:37 pm
All solved, thanks alot!
Pictures show how i switch different items

(http://25.media.tumblr.com/5de12769e5fb206d45f52c8a909aaf9d/tumblr_mp3y1as1Jh1sqapx9o1_400.png)  (http://24.media.tumblr.com/e0a9f1f42d3a6a6f5ff6d81c37b0075c/tumblr_mp3y1as1Jh1sqapx9o4_400.png)


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

.
Title: Re: how to add/remove items in an animated group on the fly?
Post by: raft on June 30, 2013, 02:28:48 pm
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)