I have been having an issue with getting a squash and stretch rig to behave correctly in UE4 after exporting from Blender. Particularly the issue is that the child bones for a character skeleton inherit the scale of the squash and stretch bones. As you can see here:
The setup is two stretchy bones in the leg then two non-stretchy bones in the foot, then there are some extra bones to form a pelvis and root bone. What is odd is that the foot bone appears to be inheriting the scale of the stretching shin bone.
Originally I created a simpler squash and stretch rig with one stretchy bone weighted to the cube and one non-stretchy child bone weighted to the sphere, shown below:
In this case however the child does not inherit the scale, so I am not sure why the leg behaves the way it does.
I have a feeling this is an issue to do with the IK setup on the leg. From other threads I have browsed it seems this seems to be an issue on the Blender export side of things. But perhaps there is a way to stop bones inheriting the scale values of parent bones inside Unreal?
If anyone has some advice on how to solve this I would be very grateful. Thank you.
i have the exact same problem…
i have heard that UE4 bones are more simplified than those of 3D modelling/animating programs such as maya or max… it doesn’t seem to store information like joint orient or bone scaling properly…
please i wish someone would answer this question and help us out…
So after working on this on and off for many months now I have some some promising results. I have tried to emulate the default Unreal Engine Mannequin Skeleton to keep some consistency across the assets I am making. I created a deform skeleton and a control rig inside Blender, containing one squash and stretch bone in the torso. This was the result I was getting:
After reading more threads I saw Lina Halper mention a preserve local transform option in the import dialogue. I gave that a go and my result was this:
Notice the arms aren’t being broken by transforms inherited up the bone chain. I was over the moon when I imported this anim. But it was short lived as I found more issues, particularly when if I rotate the bone that sits above the squash and stretch bone. Results pictured here:
(If you have seen the new IT movie it starts to look like the spooky Woman with the Flute.)
This was a bummer. Unfortunately the skeleton also starts to experience problems if you have a squash and stretch chain, on an arm for example. I tested this with the Rigify Rig by stretching the arms. The hands began inheriting unwanted transforms again.
In any case I am still determined to get this to work. I have been messaging one of the Tech Animators at Epic to see if there is anything they can figure. I have thought to contact Lina too because she is the source of all animation knowledge haha, but I figure the folks at Epic are busy people so I will keep chipping away. Hopefully someone will be able to give me a hand either here, or if anyone wants to contact me my twitter handle is @ SamBattz.
I have posted this update on other forums, thinking of starting a new thread with more clarity in the title.
Thanks for reading
We have found a solution! The solution discovered is to use constraints inside the 4.17 Animation Graph to copy the ideal scale from one bone to the offending bones.
For example say you have a stretchy spine_01 bone and you want the spine_02 bone to maintain its one to one scale. Apply a constraint to your spine_02 bone and copy the scale of a bone that holds a scale of one.
In an ideal scenario you would export an extra control bone that holds the correct transforms of your spine_02 bone and use that as your constraint.
Here is the result of the Squash and Stretch Rig!
And here is the constraint setup in the animation graph.
In this example I have a constraint node for the spine_02 bone and the head, I have set these nodes to constrain their scale values to the root since the root will always have a scale of one.
Big thank you to Lina Halper for implementing the constraints to make this work, and thank you to @Cyaeou for helping me figure out how they work.
I’m so excited to have this working and I cant wait to get animating with it!!
I love you for your tenacity and pioneer work. Really, thank you! <3
That’s so great to hear, Battz! Are you able to link to or paste in the additional knowledge shared by Lina and Cyaeou to offer further insight on this solution? Thanks!
-Adam (aka Copperplate on Blenderartists.org)
There’s not much else to it as it turns out. The Blender rig itself just uses the “Stretch To” constraints. Getting the skeleton in the engine with the stretching is just your standard export/import process, nothing fancy going on there, just making sure all the export/import settings are correct for Unreal.
Then the in engine setup has nothing more to it than what I outlined above.
There are a couple of tweets Lina made which show the constraints being used here and here.
As far as I know there isn’t any documentation about these constraint nodes, I think that’s why Lina made the tweets in the first place to get the word out. But I am working on a tutorial to explain the process I go through to get it in engine. I will put that up when it is ready to go, I just want it to be thorough, so starting with the skeleton in Blender all the way to the final product in Unreal
Thanks so much for sharing that, Battz! Looking forward to your tutorial when it is ready. I’m glad there is a reliable solution discovered for squash and stretch rigs.
I realize this is like 3 years old… But by chance did you ever make that tutorial?