Rendering With Unreal Engine

In this tutorial, we present a method to render Golaem simulations with Unreal Engine. The really big advantage of this method is that it avoids baking out geometry from Maya and handles both geometry and shading variation.

Supported Versions

Check the Release Notes to see which Golaem and Unreal Engine versions are compatible together.

Source Code

The source code of the plugin has been released under the GNU Lesser General Public License v2.1. Please contact our support with your GitHub account in order to be granted access.

Limitations

For now, some features of Golaem are not supported, this includes:

Workflow

The figure below details the workflow of the render of Golaem simulations with Unreal Engine.

Setup in Maya

Setup the Simulation In Maya

As Unreal Engine renders scenes at 30fps, it is recommended to set your Maya scenes to 30fps as well

Create your Crowd Simulation within Maya using Golaem . In our example we will use the locomotion scene from the Golaem Crowd Samples. Once the simulation is done, open the Simulation Exporter to export the Simulation Cache. Once the Simulation Cache will be exported, a Simulation Cache Library File (.gscb) will be created in the same directory than the Simulation Cache. It is also possible to add the exported simulation to an existing Simulation Cache Library File using the Library Tool.

The Simulation Cache Library File contains the useful information about exported simulations such as the export directory, the Character Files used...

Setup Unreal Engine

A few steps must be undertaken for Unreal Engine to be able to load and render with the Golaem plugin.

Installing the Golaem For Unreal Engine Plugin

The Golaem for Unreal Engine plugin can be found in its own section on the Golaem Download Page and is made of four directories and one .uplugin file:

Adding Golaem For Unreal Engine Plugin to your Environment

Then, for Unreal Engine to be able to find the Golaem For Unreal Engine Plugin, it must be added in the Plugins/GolaemPlugin directory of your Unreal Engine Project. If correctly installed, you should be able to set it in the Plugin list of Plugin Window (Edit / Plugins):

Licensing the Golaem For Unreal Engine Plugin

In order to run without rendering watermarks (actually parts of meshes removed), a Golaem For Unreal license is mandatory. It need to be installed the same way than the Golaem For Maya licenses. Please check http://license.mayacrowd.com/#unreal. It is also possible to use the same Environment Variables to avoid fetching of licenses or PLE License0.s

Once installed, you can check the status of your license by looking at the Unreal Engine Output log, the pop up message displayed when the plugin is loaded or in the Window / Golaem / About Menu:

If you run the Golaem for Unreal plugin without a license, it will be in PLE mode. Therefore some meshes will be missing on your characters. This is done on purpose, of course with a license, all meshes will be there.

Adding Golaem For Unreal Engine Dependencies to the Unreal Engine Environment

For the Golaem Editors to work properly, some third party dependencies need to be manually installed.

Installing PySide

To install the PySide Python module, open a Command tool in Administrator Mode and change the current directory to point to the Unreal Engine installation directory  UnrealEngineInstallDir/Engine/Binaries/ThirdParty/Python/Win64/. Then, run the following commands:

python -m pip install --upgrade pip
python -m pip install --no-warn-script-location PySide
This will install the latest version of PySide in your Unreal Engine Python environment

Load the Python Editor Script and the Editor Scripting Utilities Plugins

In Unreal Engine Plugin Window (Edit / Plugins), enable both the Python Editor Script and Editor Scripting Utilities plugins:

Setting up the Scene Unit

Within Unreal, Golaem considers by default that simulations have been made in meters. Thus, when a Simulation Cache is loaded the node will be scaled x100 based on the Unreal default unit (which is centimeters). It is possible to change this default behavior by setting the following variable:

:: Set Scene Unit (0 for millimeters, 1 for centimeters, 3 for meters, 4 for inches, 5 for feet)
set GLMCROWD_UNIT=3

Importing your Golaem Character

Replaying / Rendering a Simulation

Setting Shading Variation

Editing the Simulation

Simulation results (character positions, orientations, postures) and Assets repartition or shading assignment (shader, shader attributes...) can be edited using the Simulation Layout Tool in Maya or Unreal. You can see the results once saving the Layout File with these edits and using the Refresh Layout button in the Golaem Cache node in Unreal Engine.

Assets repartition or shading assignment (shader, shader attributes...) can also be edited using the Character Maker in Maya. When done, you just need to save the changes in the Character File. Reexporting the library file is not required.

The actual transformation and scale of the node in the Unreal Engine scene is taken into account.

If you'd like to change any Crowd Shader properties (texture, color, displacement, multi matte IDs...), it can be done on the assigned Materials in Unreal Engine (see above).

FAQ

When launching Golaem Editors, they don't show up

If Golaem Editors don't show, start by checking the Unreal Engine Output Log for errors. If an exception saying "No Qt binding were found" pops, it means that Qt For Python (PySide) is not installed or has not been installed properly. For the Golaem Editors to work properly, some third party dependencies need to be manually installed, especially Qt For Python. Please check the Install Dependencies part of the documentation.