x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Blender to UE4: Squash and Stretch Bone Heirarchy Scaling

Hello,

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:

alt text

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:

alt text

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.

Product Version: UE 4.12
Tags:
more ▼

asked Aug 24 '16 at 11:07 AM in Everything Else

avatar image

Battz
81 2 5 7

avatar image jeongyc87 Oct 07 '16 at 06:47 AM

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..

avatar image Battz Sep 18 '17 at 12:59 PM

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:

alt text

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:

alt text

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:

alt text

(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 :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

-|SOLVED|-

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!

alt text

And here is the constraint setup in the animation graph.

alt text

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!!

more ▼

answered Sep 21 '17 at 11:54 AM

avatar image

Battz
81 2 5 7

avatar image AJ_Graphix Sep 21 '17 at 04:15 PM

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)

avatar image Battz Sep 23 '17 at 03:27 AM

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 :)

avatar image AJ_Graphix Sep 23 '17 at 07:11 PM

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. :-)

avatar image Ninjin Sep 21 '17 at 05:05 PM

I love you for your tenacity and pioneer work. Really, thank you! <3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question