https://store.epicgames.com/en-US/download
Choose Unreal Engine 5.0.3
and click Install
in your own setting
(normally default setting is good).
Download xrfeitoria-gear-master.zip from releases page and unzip it.
Modify config in misc/user.json:
ue_command
: refers to the path ofUnrealEditor-Cmd.exe
(UE4Editor-Cmd.exe
for ue4).ue_project
: refers to the path of your project with suffix of.uprojcet
.render_config
: refers to the path of render config you defined in.yaml
(an example definition is in misc/render_config_common.yaml).python_script
: refers to the path of python script you want to execute.
# (optional) change pip source to speed up
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# python 3.7 or above
python misc/run_init.py -f misc/user.json
This script would execute the following steps:
-
pip install -r misc/requirements_ue.txt
for ue python. -
pip install -r misc/requirements.txt
for system python. -
create a soft link to the plugin folder in the project root folder.
python misc/run_cmd_async.py -f misc/user.json
You can simply run the command above to run a demonstration which contains:
- generating a sequence containing a
render people
model with animations and acube
- rendering to RGB, mask, depth, normal map, and optical flow.
The rendering results are saved in Output_Path
defined in render_config.yaml
.
- visualize the results in
Output_Path
- use visualize.py or
exr_reader.py
to convert
.exr
results to.png
, for example:
$Output_Path="E:\Datasets\tmp"
python misc/visualize.py -i $Output_Path -o $Output_Path/vis_mask --img_pattern "*/mask/*" -t mask
python misc/visualize.py -i $Output_Path -o $Output_Path/vis_depth --img_pattern "*/depth/*" -t depth
python misc/visualize.py -i $Output_Path -o $Output_Path/vis_flow --img_pattern "*/flow/*" -t flow
You would get a result like:
For details of this demonstration, please refer to Tutorial.
This plugin will automatically set some project settings for ue project (see Source/XRFeitoriaGear/Private/XRFeitoriaGear.cpp for details):
URendererSettings->CustomDepthStencil = ECustomDepthStencil::EnabledWithStencil
(same asr.CustomDepth=3
inConfig/DefaultEngine.ini
under[/Script/Engine.RendererSettings]
URendererSettings->VelocityPass = EVelocityOutputPass::BasePass
(same asr.VelocityOutputPass=1
inConfig/DefaultEngine.ini
under[/Script/Engine.RendererSettings]
)
- in UE 4.27:
Settings->bBasePassOutputsVelocity = True
(same asr.BasePassOutputsVelocity=True
inConfig/DefaultEngine.ini
under[/Script/Engine.RendererSettings]
)
UMovieRenderPipelineProjectSettings->DefaultClasses.Add(UCustomMoviePipelineOutput::StaticClass());
UMovieRenderPipelineProjectSettings->DefaultClasses.Add(UCustomMoviePipelineDeferredPass::StaticClass());