I have defined many animations for a model including things such as walking, jumping etc. In each case I’d like to be able to play the animation with hands in different positions depending on what they are holding. That’s no problem: I have defined separate channels for different sets of bones and am able to run the animations in parallel just as the tutorial says. The issue I have is that some animations (e.g. swinging on a rope) involve animating all bones in the model while others (e.g. closing and opening a hand) involves just a few.
My question is about best practice when I’ve defined several channels and now need to play an animation that covers more than one of them. The options seem to be:
- Define separate animations for each channel and play them together. This makes modelling more difficult because I would need to animate each section separately which is hard to visualise (in Blender in any case).
- Define one animation for the model and then remove all other channels before playing it, then replay the animations for different parts of the model once it’s complete. This is possible but awkward (e.g. AnimControl doesn’t have a method for removing channels so I need to remove them all and create a new channel each time).
- Define one animation for the entire model and then play it through all channels. Each channel would then need to have the correct bones added to make sure the influences do not overlap.
Which of these is best or are there other options for this?
If the final option is the correct one, is there a way to remove a bone from an AnimChannel? Ideally I’d like to be able to say something like:
bodyChannel.addAllBones();
bodyChannel.removeBonesInChannel(handChannel);
bodyChannel.removeBonesInChannel(armChannel);
Nice thing about that would be that I wouldn’t need to list all the bones and the code guarantees no overlap. But there doesn’t seem to be any way to remove a bone.
Advice appreciated. If there’s a good tutorial covering this stuff I’d love to hear about it.