What I’ve able to achieve so far, is an universal procedural animation method in control rig. In theory, for different parts (arm, leg, neck etc), as long as they have three point basic IK, all I needed to do is to adjust some variable values, and it should work just fine.
However I noticed that, for it to actually work on different parts, I will need to:
- In Control rig, delete the existing hierarchy and import the new part’s bone structure.
- Change the preview mesh. (Not doing this cause the part to use the initial transform of incorrect preview mesh)
- Basically, if I cannot resolve the above two points, I will still need to create different ABP and ControlRig assets for different parts, although based on a template, it is still a problem.
For the first item, I can get around it simply by setting a naming standard for all parts that wish to reuse control rig.
The second part however, proves to be a bit difficult:
- I have tried to set preview mesh using C++ at runtime, but it doesn’t work. I guess that’s expected since “UControlRigBlueprintEditorLibrary::SetPreviewMesh” is for editor only.
- Assuming the preview mesh affects only the initial transform, I have taken the value of correct part’s initial transform, and using “Set Transform - Bone initial”, I can set the initial values. That seems to work, however it is notices that the IK is not functioning correctly (The endpoint is setting the transform based on procedural logic, but there is no bending for the two parent bones).
To dive a little deeper into the second method, I noticed that I can set the initial values for the two parent bones and the IK will function normally, but when I set the initial transform for the endpoint bone, the IK breaks and do not work.
If we are able to achieve this, that means I can reuse control rigs and even animation blueprints for different parts, I just need their specific IK-related variables to be retrieved elsewhere.
Do anyone have experience on getting same animation blueprint and config working for different skeletal mesh (all but bone hierarchy are different)? Much appreciated!