Overview
By default, all the Anima features should work fine in Unreal Engine after a standard installation. However, as Unreal Engine is a very complex software that can be used in several environments and even multiple Industries (like Architectural Visualizations, VideoGames, VFX, Virtual Reality, Realtime Broadcasting, etc), in this article we have collected a list of known issues and tips that may help you get better results using our Anima plugin.
Plugin Locations
When you install Anima actually 2 plugins are installed into Unreal Engine:
- Anima importer: It manages the import process of Anima projects and individual models, either using the Anima Drop panel or directly loading the files in Anima format (*.aniproj or *.y).
- Anima 4D Plugin: It manages all the things related to the 4D Digital Humans.
If you ever disable one of the two plugins, the other will be disabled automatically because both depend on each other to work properly.
Anima 4D Plugin settings
There are some parameters to control de behavior of the plugin that handles the 4D models, and you will find them in the Project Settings, in the Anima 4D section:
Here you have a description of each one of them:
- Minimum 4D FPS: The 4D model streamer will skip to the next keyframe only when your 4D framerate is lower than this threshold (so you can set 0 to turn it off). This can be useful when your computer is struggling to keep a real-time response and you have 4D models in your scene. If the streamer detects that many 4d frames are skipped between ticks, it will skip to the next keyframe. This guarantees that the animation timing is correct and gives you a second chance for your computer to regain a smooth framerate.
- Video Decoder Device: Here you can choose the GPU device that you want to use for 4d model decoding. Defaults to GPU1. If you select a GPU that is not present in your computer or the selected GPU has no decoding capabilities (CUDA), CPU decoding fallback will be effectively used.
- Calculate Mipmaps for Cinematic: Mipmaps filter Moire patterns in 4D characters. As it is very time-consuming (2-4 seconds per frame), it is recommended only for final renders, and will only be applied in Cinematic mode.
- Show Cinematic Warning: This option will show a warning message when Cinematic Mode is selected in Editor > Engine Scalability Settings. Please notice that Cinematic Mode is a very taxing render mode that Epic designed for capturing sequences only. In particular with 4D models, Cinematic Mode will turn on a high-quality but very slow texture filtering that can hamper performance significantly while playing in the editor. For more details see the following Sequencer Performance Optimization section.
- Use 4D LODSystem in Cinematic: (False by default) When set to False only the highest LoD is used when rendering in Cinematic mode (best visuals). Change it to True to use different LoDs according to screen size when using Cinematic mode (best performance).
Activate Motion Blur for 4D models
One of the greatest features that make our Anima plugin unique is the ability to generate Motion Blur on animated models that use dynamic photogrammetry techniques like our 4D Digital Human actors.
You can activate the automatic generation of velocities to enable the motion blur effect on the 4D models by enabling the option "Output velocities during base pass" in the Rendering section in the Project Settings on Unreal Engine 4.x:
Make sure to leave the option "Output velocities due to vertex deformation" as False, it might cause an error to leave it as True.
On Unreal Engine 5, this setting has changed and now it has a drop-down selector with 3 options:
By choosing the "Auto" option you let UE decide if it is worth applying this feature based on the performance of your machine. By choosing "ON" you will force UE to always use generate velocities, independently of the performance.
Another critical setting for this to work as expected is to set the generation of the Velocity Pass during "depth pass":
In UE 5.0.x this setting is set by default to "Write during depth pass" which gives optimal results. However, in UE 5.1.0 this setting has been changed by default to "Write during base pass" which makes the Motion Blur appear very distorted or not appear at all, so we highly recommend changing it back manually to depth pass.
Tips for Packaging
We made our Anima plugin automatically enabled in UE directly in the installation process, to make it a bit easier to use from the start. However, one of the consequences of having a plugin enabled by default is that it will not be included in the builds that you make for your project and you will get the following error when you try to open the packages you build:
- Plugin 'Anima4DUnrealPlugin' failed to load because module 'Anima4DUnrealPlugin' could not be found. Please ensure the plugin is properly installed, otherwise consider disabling the plugin for this project.
So, to properly package a project using Anima characters you need to activate the recollection of the plugin in the packaging process, which can be achieved using either of these options:
- A) Activate a 3rd party plugin that is not enabled by default.
For example, you can use the "Nvidia Reflex" plugin. Go to Edit > Plugins, search "reflex", enable it and click on "Restart Now":
- B) Force your project to compile C++.
To do that you can either start creating your project as a C++ project:
Or, if you have already started the project as a Blueprint, you can also create a C++ class going to File > New C++ Class:
Once either of these steps (A or B) is performed, you can proceed to package your project normally and it should work right away.
Please note that Unreal Engine will require a valid installation of Microsoft® Visual Studio 2019 (either the free Community version or any of the other paid versions) to correctly compile some of the content included in the packages. Inside the Visual Studio installer, as there are many options to choose from, we recommend using "Game development with C++":
Currently, only Windows 64 bit packages are supported by Anima.
The Black Window Issue
Have you followed the steps mentioned above but you still get a black window when you execute your build? Don't worry, this has an easy solution.
Remember that all the usual packaging rules apply to UE that includes Anima powered content and, when this happens, almost always is because you still need to select your default start level for the project. You can do that by going to Project Settings > Maps & Modes > Game Default Map and choosing the level you want to use:
Avoid Crashes on UE Start After Updating Anima
You may experience a crash on the UE startup after updating Anima to a newer version. This is a known issue that is an unwanted secondary effect caused by 2 independent processes:
- A) The process that UE follows when you build a package or when you use the
- B) The process that the Windows Operating System uses to load all the DLLs included in Unreal (or any other application) when it starts.
When you "Build" a package of your project or when you "Launch" a level, a temporal folder is created in "<your_ue_project_folder>/Binaries/Win64" and a copy of all the DLL involved in that build is placed there:
All those files are generated and placed in that folder to be later included in the package you are building (when you use "Launch", the project is also built on-the-fly).
The problem appears when you install a new version of Anima because those files are left there by Unreal and, the next time you start your UE project after updating Anima, the Windows SO may mix some of these older DLLs with some new ones from the updated Anima plugin, and that is what causes the crash.
The solution to this problem is simple: remove all the contents of that folder before loading the project.
Those are temporal files that are recreated each time you create a new build, so it won't make any difference to remove them. Actually, we don't know why Unreal chooses to leave them there after the build is made, it would make more sense to remove them automatically. In any case, that is something that depends only on the workflow that UE chose to follow, so we can't interfere there.