Hi all,
I’ve recently started a small project, I’m aiming to combine things like pose-blending (a la Overgrowth) and possibly full-body IK constraints later on.
To get started on the pose blending, I started out using Mecanim’s Humanoid features, since it would allow me to retarget the same poses across different humanoids. That’s the only type of character I’ll be focusing on for now.
I’ve made a little bit of progress, but my next step is using the Animation C# Jobs API to perform blending.
This is where I’ve hit a kind of a bumpy road, because the actual workings of the Mecanim system are quite a mystery to me, to be honest.
I’ll illustrate one example here, maybe someone else can chime in:
I’ve currently experimented in simply getting a HumanPose
and applying it to another model, and it seems successful (not in a Job yet though). So there we have retargeting down.
The next step is to possibly bring this all into an AnimationJob. I notice we can act on an AnimationHumanStream
via stream.AsHuman()
, and it gives me some functionality to set muscles with the Get/SetMuscle
functions.
However, I think I can’t directly set a HumanPose
into a AnimationHumanStream
; there’s only a function that can act on a specific muscle, not one that can take the whole array of muscle values from a HumanPose
.
Any thoughts on how I can dump that pose into the animation stream?
If simply setting all the muscle values is not possible, how do I correctly map a HumanPose
array to the individual muscle handles?
The next step, should I succeed in that, is to figure out if it is feasible to blend between two HumanPose
directly. Since the muscle values aren’t documented (as far as I know) I can’t know if this is going to be easy or even possible.
That’s it for now, I’ll follow up with other stuff as I tinker with it.
Also, I hope you don’t mind this, but I’ll ping you @Mecanim-Dev