Frequently Asked Questions
We list some common troubles faced by many users and their corresponding solutions here. Feel free to enrich the list if you find any frequent issues and have ways to help others to solve them. If the contents here do not cover your issue, do not hesitate to create an issue!
API
How to use the plugin of Blender/Unreal under development
First you should clone the repo of XRFeitoria, and maybe modify the code of the plugin under src/XRFeitoriaBlender
or src/XRFeitoriaUnreal
.
Then you can use the plugin under development by setting dev_plugin=True
in init_blender
or init_unreal
.
You can install the plugin by:
1git clone https://github.com/openxrlab/xrfeitoria.git
2cd xrfeitoria
3pip install -e .
4python -c "import xrfeitoria as xf; xf.init_blender(replace_plugin=True, dev_plugin=True)"
5
6# or through the code in tests
7python -m tests.blender.init --dev [-b]
1git clone https://github.com/openxrlab/xrfeitoria.git
2cd xrfeitoria
3pip install -e .
4python -c "import xrfeitoria as xf; xf.init_unreal(replace_plugin=True, dev_plugin=True)"
5
6# or through the code in tests
7python -m tests.unreal.init --dev [-b]
Build plugins
If you want to publish plugins of your own, you can use the following command:
1# install xrfeitoria first
2cd xrfeitoria
3pip install .
4
5# build plugins for UE 5.1, UE 5.2, and UE 5.3 on Windows
6python -m xrfeitoria.utils.publish_plugins build-unreal `
7 -u "C:/Program Files/Epic Games/UE_5.1/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
8 -u "C:/Program Files/Epic Games/UE_5.2/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
9 -u "C:/Program Files/Epic Games/UE_5.3/Engine/Binaries/Win64/UnrealEditor-Cmd.exe"
10
11# build plugins for Blender
12python -m xrfeitoria.utils.publish_plugins build-blender
Please check the path ./src/dist
for the generated plugins.
XRFeitoriaBlender
will be archived by default, and XRFeitoriaUnreal
will only be built when you specify the Unreal editor path.
Make sure you have installed the corresponding Unreal Engine and Visual Studio before building the unreal plugin.
Find out the plugin version in ./xrfeitoria/version.py
. Or by:
>>> python -c "import xrfeitoria; print(xrfeitoria.__version__)"
0.6.1.dev10+gd12997e.d20240122
You can set the environment variable XRFEITORIA__DIST_ROOT
and XRFEITORIA__VERSION
to change the plugins used by XRFeitoria.
Run your code xxx.py
like:
XRFEITORIA__VERSION=$(python -c "import xrfeitoria; print(xrfeitoria.__version__)") \
XRFEITORIA__DIST_ROOT=src \
python xxx.py
$env:XRFEITORIA__VERSION=$(python -c "import xrfeitoria; print(xrfeitoria.__version__)")
$env:XRFEITORIA__DIST_ROOT="src"; `
python xxx.py
What is stencil_value
stencil_value
is to distinguish different actors in the sequence when rendering segmentation masks.
The RGB mask color of actors will be saved in the {output_path}/actor_infos.json
of the render job.
What is console_variables
console_variables
is a dictionary of console variables for configure detailed rendering settings.
Please refer to the official documentation for more details: Unreal-MRQ-Doc.
example:
>>> console_variables = {'r.MotionBlurQuality': 0} # disable motion blur
RPC Port
The RPC port is used for communication between python and engine (blender/unreal).
If the default port is occupied, or you want to use multiple engines at the same time,
you can set the environment variable BLENDER_PORT
or UNREAL_PORT
to change it.
BLENDER_PORT=50051 python xxx.py
$env:BLENDER_PORT=50051; python xxx.py