Ziva Real Time Player - Unreal Engine¶
The Ziva RT Player for Unreal Engine (ZRTP for UE) is a plugin for Unreal Engine that can deploy a ZivaRT character into an application (a game) developed in Unreal Engine. For the purposes of this documentation, we will use a simple “cylinder” asset in our documentation whose animation mimics a very simplistic human elbow.
Unreal Engine Setup
We currently support only Unreal Engine 4.24.
The ZRTP for UE plugin is treated as a “Game Plugin”, meaning it can only be used as a part of an already existing Unreal Engine Project. To learn how to create a project in Unreal Engine, follow the instructions from the Unreal Engine documentation.
Once an Unreal Engine project has been created, navigate to the project directory (the folder with the .uproject file in it) and create a folder named “Plugins” in this directory.
Unzip the ZivaRT.zip archive, and navigate to “ZivaRT\ZRTPlayer-UE4” and copy the “Ziva” folder into the “Plugins” folder that was created in the previous step.
Close your project if it is open, then re-open the project. The Unreal Engine should automatically detect a new plugin, and request that it be installed. Select “Manage Plugins” and agree to installing the plugin. To confirm your recently installed plugin, go to “Edit->Plugins”, then in the plugins sidebar scroll to the bottom to find a category of plugins called “Project”, with a subcategory “Animation”. Selecting either of these categories will show the Ziva plugin. Make sure the “Enabled” checkbox is checked.
If the Ziva plugin is not immediately available, try re-compiling your project. It may be necessary to ensure that your Unreal project is a “Code” project instead of a “Blueprints” project in order for this step to succeed.
Two files must be imported into Unreal in order to set up a ZivaRT character:
The FBX file is the standard way of importing an animated character into Unreal, and Ziva Unreal takes advantage of this. There are three important things that come into Unreal via the FBX file:
The character’s mesh is brought into Unreal through the FBX file.
In Unreal, ZivaRT characters are considered “skeletal meshes”. This means that they must have a joint skeleton bound to them for skinning. (A single-joint skeleton can be used for characters animated using only scalar parameters; the one joint will just be used to position the character mesh in space).
Animation curves are imported into Unreal via FBX files. Note that animations can either be in the same FBX file as the Mesh and Skeleton, or they can be imported from separate files. This allows many different animations for the same character to be imported separately. There are several distinct types of animation curves in Unreal. The simplest are skeletal animations that move the joints of a skeleton. Scalar parameters are animated via material and/or morph target animation curves.
After importing an FBX file into Unreal, there will be a collection of assets of varying types (animation, skeletal mesh, physics, etc) placed into your content browser.
The ZivaRT file (.zrt) contains the trained model used to drive high-quality mesh deformations during animation of the character in Unreal. It must have been trained on the exact same mesh (and skeleton) imported into Unreal via an FBX file. In particular, the rest/bind pose of the mesh in the FBX must be exactly the same as the rest pose used during model training.
When the Ziva Unreal plugin is enabled in Unreal Editor, “.zrt” files are recognized as a valid asset type that can be imported into the Editor.
Quick Setup of a ZivaRT Character¶
To help you set up a character, here is a quick step-by-step guide.
Create a “ZivaSkeletalMeshActor” in the scene.
Select the new actor, in the details panel set the skeletal mesh of the actor to be the skeletal mesh asset imported from the fbx file.
Set the animation to be the animation asset imported from the fbx file. If no animation was imported with the original fbx, import an animation using a separate fbx and add set the newly imported animation to the animation.
Set the Ziva Solver to be the Ziva Solver asset imported from the zrt file.
At this point, pressing “play” should animate the character based on the animation asset, and the shape of the character will deform according to the results of the ZivaRT player plugin.
- Ziva Skeletal Mesh Actor
This actor type is a Skeletal Mesh Actor that uses the Ziva Skeletal Mesh Component for its Mesh.
- Ziva Character
This actor type is a Character that uses a Ziva Skeletal Mesh Component for its Mesh.
Ziva Skeletal Mesh Component Options¶
- Ziva Solver
Ziva Solver asset slot, that defines the Ziva Solver asset used for this Ziva Skeletal Mesh Component. Typically imported to Unreal via a “.zrt” file.
- Pose Parameters
Pose parameter values that aren’t part of the joint skeleton. If “0 array elements” is shown, then this ZivaRT character is not using pose parameters. Note: pose parameters are also known as “extra parameters”.
- Enable Deformation
Whether or not to compute deformations using the Ziva solver.
- Recompute Normals
Whether or not to recompute normals of the deformed mesh.
- Preserve Normal Offset
Whether or not to preserve the original normals relative to the surface curvature.
- Static Solver Quality
Number between 0 and 1 which trades off runtime speed for quality. 1.0 indicates highest quality result, 0.0 indicates lowest quality result. Default is 1.0.