Hello
There are very little resources on this topic and most threads have no (real) answer. I found some complicated methods, but I suspect that there might be an easier, more efficient solution. Any help appreciated.
The problem is basically the following:
Imagine having a mechanical object like a robot arm or lamp like this one for example: Imgur: The magic of the Internet
You create the mesh and rig in Blender, afterwards export it to UE. In UE, you create the control rig and use the most fitting IK solver. You can then use it to create animations or even move it in real time. But what if certain joints/bones have constraints (in reality)? For example, the head of the lamp being only able to rotate 45° up and down? How do you implement that? With physics constraints it’s easy, but obviously I (or “we”) don’t want to use physics for this, as it’s highly inefficient and also unstable for more complicated objects.
The only resources I found were
-
https://www.theseus.fi/bitstream/handle/10024/496971/Pukki_Evgeny.pdf?sequence=2 (page 24 - 27)
-
UE4 Control Rig Robot Arm Part 1 - YouTube (entire series)
But again, I really hope there’s an easier solution for this task. I don’t understand why I can’t just set bone limits of skeletal meshes like I can for physics constraints or physics bones.
1 Like
Download the Content Example and open the IK rig map, in there you’ll find an example of a mechanical arm with joint limits.
2 Likes
Ok, looks like in UE5 you can define the limits in the Rig Definition Asset, which you attach to the Control Rig Node inside the Animation Blueprint. Unfortunately, I’m still using UE4.27 for the current project, which doesn’t have the Rig Definition Asset option.
You can use the Min node inside the AnimBP, which in short allows you apply a constraint on a value, where if the value is over a specific amount, it will always return the minimum amount that you set.
I tried using a simple IK node for a human arm, then I use the Transform bone node for the lowerarm, where I set the location/rotation of the arm ( the data is coming from the BP, where on tick I used the get socket transform, specifying the bone name, sending then the data to the AnimBP ).
On this realtime data of the lower arm, I used the break rot to break the rotator into floats, then on the bending axis ( Y in my case ) I applied the min node, while the other two were reconnected to the make rot node, so that only the Y axis has the min value applied.
It does work ad intended, since even though the IK is applied, I can limit the bending of the arm.
Not sure then it with all the contraints applied, you’re still able to achieve what you’re looking for.
By the way, check the “Manipulator Robot” in the marketplace, I think it can give you advices for what you’re looking for…I bought it a while ago, but never really used in any project.
1 Like
Thanks for the help. Actually I already own that asset. I will take a look at it again, but iirc, it wasn’t optimal for mass production. Control rig with a variable bone name setup really seems what I’m looking for. I’ll just upgrade to UE5 and do it the Content Example way.
Also I can’t figure out how to mark this thread as solved.