Exporting iClone cameras to Unreal Engine

Apr 19, 2022 at 04:45 am by nemirc

Exporting iClone cameras to Unreal Engine
Exporting iClone cameras to Unreal Engine

Anime was one of the main inspirations for Killer Dolls in general, and that inspiration is even more prevalent in Killer Dolls Battle Arena. For that game, I wanted the heroines to have a short animation before a special attack, an idea I got from animes like Sailor Moon.

However, for the game I am making the animations shorter since its an animation that will be playing every time gamers perform a special attack. I was also trying to figure out a way to show the animations in the game. One option I had in mind was to simply freeze everything and play the animation, similar to how the Specials play in Marvel vs Capcom games.

You can see the result of this first iteration here: https://twitter.com/TheDomaginarium/status/1499746662109089793

One thing I didn’t quite like, after comparing it to the Sailor Moon inspiration, is how the camera remained static, so I decided to jump into iClone and animate the camera, and then use that animation in UE4. Using the camera is very straightforward, but it requires some extra steps to do what I wanted.

If you already have Unreal Live Link for iClone, you know you can just send that data and then save the data. However, I didn’t want to do that because I figured it would make my process more complicated when I needed to reuse that cinematic inside the game. For that reason, I decided to export the character animation and the camera animation manually.

In Unreal Engine, I simply imported the character animation, since I already have the character imported. However, importing the camera animation is a little bit trickier. If you want to make a cinematic, you have two options. The first option is to go to the tool bar in the Unreal editor and create a new Level Sequence. What this does is create a sequence object in your level. You can then play the sequence via level Blueprints. However, I need the animation to be available to me at all times, regardless of what level I am playing in. For that reason, I decided to create a Template Sequence object in the Content Browser.

The Template Sequence object behaves exactly the same as the Level Sequence, but this one can be instanced into the game at any point. This is important, since this means I can just call that cinematic “on the fly” and play it before any special attack.

The next step is to edit the Template Sequence. In a new level, double click the Template Sequence in your Content Browser and then create a Cine Camera Actor. Drag the Cine Camera Actor into the sequence, then right-click on the camera and select “import…” and select the FBX file containing the animation, that you exported from iClone.

There is a catch, though. If you leave the sequence like this, the camera animation will always play at the origin. In my case, I needed the animation to play on the player’s location. To fix this, first click on the animation track and then select “Blend Type / Additive”. This will set the animation so it plays based on a relative location.

Now drag your character into the Sequence window, apply the animation and then turn that into “Additive” as well.

Before you can do anything else, you need to click the camera object in your sequence pane and make it “Spawnable”. Repeat the same for the character (and, if you haven’t done so, make a Blueprint class of the character, since the sequence needs it to be a Blueprint class). This is very important since this will spawn the camera and the character into the level, if they are not already created. If you don’t do this, the sequence will be empty since the camera and the character will not be there.

Now, the next part is to actually call the sequence. To do this, I created a routine inside my player character Blueprint. Depending on what you want to do, this setup will be different, but you still need to call the Template Sequence from a Blueprint. The first thing to do is create a “Create Level Sequence Player” node and pull the Template Sequence to it (you see I used a Template Sequence variable, Moni_SuperMove3, as the input to the Level Sequence pin). Then, create a Play node that calls the Target/Sequence Player that I output from the previous node.

This is only half of the setup. This one will simply call the sequence and play it. The next step is to actually position the sequence where you want it. What I did is to make the Camera into a Blueprint Actor and then edit the Blueprint. During the Begin Play event, the camera looks for the location and rotation of my player character, and then applies that location and rotation to the Camera’s root object.

What this does is to move the actor to a specific position, and rotate it so it faces the direction of the character. Since you had set the tracks in the sequence as “Additive”, the animation will play based on the actor’s new location and rotation. Of course, I also hide my player character so the character doesn’t show up in the sequence.

The result of this is what you see in the video below.


Sections: Tips + Tutorials

Top Stories

This website uses cookies to ensure you get the best experience possible More Info
Got it!