Reader small image

You're reading from  Unreal Engine 5 Character Creation, Animation, and Cinematics

Product typeBook
Published inJun 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781801812443
Edition1st Edition
Languages
Concepts
Right arrow
Authors (2):
Henk Venter
Henk Venter
author image
Henk Venter

Henk Venter is currently running his own 3D Art Production Studio. He was the Principal Character Artist at THQ Studio Australia and Senior Character Artist at Electronic Arts in Montreal, Canada. In the UK he worked for Microsoft's Studio Rare, Sumo Digital, and Eurocom Entertainment.
Read more about Henk Venter

Wilhelm Ogterop
Wilhelm Ogterop
author image
Wilhelm Ogterop

Wilhelm Ogterop worked in bigger games studios in the UK as Character Animator and later Lead Animator on several projects. He was also part of ingame real-time cinematics teams, motion capture direction, cleanup, and implementation. Studios he worked for on-site, as well as a contractor, include Raven Software, Deep Silver, Travelers Tales Fusion, Eurocom Entertainment Software, Instinct Games, Entrada Interactive, and Headfirst Productions.
Read more about Wilhelm Ogterop

View More author details
Right arrow

Chapter 15: Creating a Control Rig with Basic IK Controls for the Robot in UE5

In the previous chapter, we made a Control Rig for our Alien Plant. The Alien Plant Control Rig was a simple forward kinematics (FK) setup. Like we said in Chapter 14, Making a Custom Rig for Our Alien Plant with Control Rig, this is just like a basic parent/child hierarchy setup. In this chapter, we will set up the Control Rig for our Robot Drone. We will learn how to set up inverse kinematics (IK) for the arms of our Robot Drone as well as the rest of the Control Rig.

In this chapter, we will cover the following:

  • What is IK?
  • Creating the controllers for the robot character
  • Ordering the control objects in the correct hierarchy and linking them to joints
  • Creating an IK controller and testing the whole rig

Technical requirements

The following are the technical skills and software you need to complete this chapter:

  • A computer that can run basic 3D animation software.
  • You need to have Blender installed for free from https://www.blender.org/ (at the time of writing). The Blender version in this chapter is 3.1.2, but some older and newer versions will also work.
  • You need to have installed Unreal Engine (UE) 5. You can download it from https://www.unrealengine.com/en-US/download.
  • You need to have a basic understanding of how to navigate the UE 3D user interface. If you skipped ahead, this was covered in Chapter 6, Exploring Unreal Engine 5.

The files related to this chapter are placed at https://github.com/PacktPublishing/Unreal-Engine-5-Character-Creation-Animation-and-Cinematics/tree/main/Chapter15

What is IK?

A character Animation Rig is normally a combination of FK and IK setups. The spine, neck, and head, plus things such as tails, are normally set up as an FK. However, things such as arms and legs are normally set up as an IK within an Animation Rig. On more advanced Animation Rigs, it is possible to set arms and legs up in such a way that they can switch between the IK and FK, but that is beyond the scope of this book. Most of the time, you want a good IK setup for your arms and legs.

Understanding IK

Imagine we had an arm and a hand. We want to move the hand from A to B. With an FK setup, we will first need to rotate the upper arm joint and then the lower arm joint for the hand to reach B, as shown in Figure 15.1:

Figure 15.1 – FK A to B

In reality, we'll have to keep switching between rotating the upper and lower arm joints until we reach B exactly. This is a very time-consuming process. Very early on in the history of computer...

Creating the controllers for the robot character

Next, we will create the Control Rig controllers as we did for the Alien Plant in Chapter 14, Making a Custom Rig for Our Alien Plant with Control Rig.

Exporting the robot and its skeleton from Blender

Before we can start, we need to export the skinned robot and its skeleton from Blender. The Blender file can also be downloaded from https://github.com/PacktPublishing/Unreal-Engine-5-Character-Creation-Animation-and-Cinematics/blob/main/Chapter15/EndOffChapter13_Results_Drone_Skinned.blend. In Blender, we need to select all the parts of the robot as well as the armature and export it as an FBX file. The export settings are the same as what we used for the Alien Plant in the Exporting the Alien Plant from Blender section in Chapter 14, Making a Custom Rig for Our Alien Plant with Control Rig. Figure 15.5 provides an overview of the important robot export settings:

Figure 15.5 – Robot export settings...

Ordering the control objects in the correct hierarchy and linking them to joints

In this section, we need to organize our rig controllers in the correct hierarchy. Just like with all our parent/child hierarchies in our Animation Rigs, the hierarchy needs to be parented in the right order, so our rig works correctly.

Controller hierarchy

Like with our Alien Plant Control Rig, we need to figure out how we want our hierarchy to work.

Firstly, we want an overall root controller (RobotRoot) that can move our entire Animation Rig if we need to. That needs to be at the top of the hierarchy and the parent of everything in the Animation Rig.

Secondly, we want the body controller (RobotBody) as the child of the root controller. We just need to left-click to select and hold the mouse button to drag the RobotBody controller on top of the RobotRoot controller, as shown in Figure 15.19:

Figure 15.19 – Parent body controller to root controller

Following...

Creating an IK controller and testing the whole rig

Before we set up the IK controls, we need to get a few bits of information from our arm skeleton. This is going to be used later to set up the orientation of our IK control.

Getting bone orientations of our arm bones

In the Rig Hierarchy window, right-click on the L_Arm_Lower bone and select Control Bone Transform, as shown in Figure 15.31:

Figure 15.31 – Control Bone Transform

This will display the local transform of the bone. Make sure it's set to Local Space and select Move, as shown in Figure 15.32:

Figure 15.32 – Axes primary and secondary

Notice that the Z axis (blue Z arrow) is pointing directly down the arm toward the hand. Note this direction down as +Z (if the blue Z-axis arrow were pointing in the opposite direction but along the same axis to the hand, it would have been -Z).

This +Z value is what we will use later as the primary IK axis. Now...

Summary

In this chapter, we learned how to correctly export our Robot Drone from Blender and import it into UE. We learned what IK is. We also built a basic FK rig for the body controls and then set up IK controls for our Robot Drone arms on the same Animation Rig.

If you can set up basic FK and IK on an Animation Rig, you're well equipped to set up almost any basic character rig and can achieve a lot. Rigging can be very complicated on complex rigs, but these two basic building blocks of basic FK and IK setups are at the core of it all.

In the next chapter, we will do some animation on these Animation Rigs we created.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Unreal Engine 5 Character Creation, Animation, and Cinematics
Published in: Jun 2022Publisher: PacktISBN-13: 9781801812443
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Henk Venter

Henk Venter is currently running his own 3D Art Production Studio. He was the Principal Character Artist at THQ Studio Australia and Senior Character Artist at Electronic Arts in Montreal, Canada. In the UK he worked for Microsoft's Studio Rare, Sumo Digital, and Eurocom Entertainment.
Read more about Henk Venter

author image
Wilhelm Ogterop

Wilhelm Ogterop worked in bigger games studios in the UK as Character Animator and later Lead Animator on several projects. He was also part of ingame real-time cinematics teams, motion capture direction, cleanup, and implementation. Studios he worked for on-site, as well as a contractor, include Raven Software, Deep Silver, Travelers Tales Fusion, Eurocom Entertainment Software, Instinct Games, Entrada Interactive, and Headfirst Productions.
Read more about Wilhelm Ogterop