Is it possible to have one animator controlling let’s say two topologically identical models (vertex count & order), each of which having its own rig (different bone system). And all of that without any special magic tricks?
I don’t see any reason why this cannot be done.
You can just re-use the same animator controller for both the 2 models, and all that matters is the avatar set up.
Are you trying to experiment with different rig systems? Sounds interesting to me
There is one way to achieve this pretty easily if you are animating humanoid character.
Use our mecanim humanoid rig, this rig allow you to retarget any humanoid motion to another character with different topology, see this post for more detail
Hi,
I am using 3DS Max CAT animation system which allows me to build any rig I can imagine - a procedural rig system that is. I want to combine humanoid rig with non humanoid rig to allow for some very strange animations which I really need. I want to be able to make transitions between animations belonging to different rigs.
I initially thought about using 1 animation controller for both models, and just dragged animations to animator window from the rig I wanted to use to make new states, then I made the required transitions between animations belonging to different rigs, but… it wasn’t working as expected. Since both models have identical topology, I am pretty sure I could use morphing to get the required effect, but the whole state machine would get messy pretty soon, I guess. Therefore I am looking for a clean solution to do this.
Do you have an example of what you would like to do?
Our animation system support this as well. You can have some layer that control the locomotion of your character with humanoid motion and add another layer that control wing on your character with a generic motion.
In this case you could reuse the same controller for all your character to control the locomotion.
Just be aware that if you use more than one animator controller to animate different body part synchronization between all you animator component can become an issue if you need to sync them.
An example:
I have a model with 2 rigs: humanoid and spider. I want to build an animation system, which has some animations depending on humanoid rig (like, let’s say, walking), but other, like attacking, relying on a completely different rig (spider rig), and I want to have transition from that Walk state to Attack state in one animator, seamless. I haven’t tried animation layers yet, though. I will give it a try and let know about the results.
Why do you want to mix both rig together in the same animator? If they are both different entity they should have both their own animator and controller. A statemachine can only be 1 one state at a time so I don’t understand how you could have both rig in the same state but behave differently.
Well, because at times my character moves like human, and at other times like a spider… And I have to blend between the two modes while moving. I want one animator feeding anims from 2 rigs, both on the same model (identical vertex count and order). I want to build 1 entity out of 2 prefabs, it that would make it more clear.
interesting, so you plan to have only 1 model mesh in the end, able to feed on animations from 2 different rigs.
I don’t think there is a way Unity will process animations from 2 separate rigs for 1 model, as only 1 rig can be defined in the Animator Controller.
What I can suggest is to perform a switch (through scripting) from 1 model (humanoid rig) to the other model (with the spider rig) for the transition, not sure if this will work?
Otherwise, you may need to use the same rig to create the spider animations, as Unity only recognizes the model and the matching target animations by the skin weights. Two different rigs will have different skin weights (I assume this is for your case), thus unless you have 2 separate model meshes, I don’t think Unity will work it out without magic.
That seems to be the more logical solution. Doc Ock - I’m sure was only one animation rig, and it didn’t have to go through the export/import process and into a real-time engine.
The solution seems viable using the humanoid rig, additive layers and avatar masking. Just a little(a lot) of pre-planning and troubleshooting required. Though for multiple arms/hands/legs legacy or generic may be a better pipeline to consider.
Ok thank you for help. I am sure this kind of transition may be achieved through good old morphing via scripting, but this disrupts the nice pipeline of using animator. If I develop a working solution, I will let you know.