Table of Contents
- Overview
- Adding the Template to Unreal Engine
- Creating a new Project
- Adding Plugins to a Project
- Update Repository
- Open your Project
Overview
Here is explained how to add our template to Unreal Engine and how to use it.
- VR Group Unreal Template: Link
- RWTH VR Toolkit Plugin: Link
- RWTH VR Cluster Plugin: Link
- RWTH VR DTrack Plugin (fork of ART): Link
Adding the Template to Unreal Engine
Just clone the template repository to the Templates
folder of your Unreal Engine installation.
# go to your local Unreal Engines' templates directory
# (e.g. C:/Unreal/UE_5.3/Templates)
cd your/UnrealEngine/Templates
# clone branch according to your Unreal version (here 5.3)
git clone -b 5.3 https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/unrealprojecttemplate.git
There are also official docs for adding a project as a template.
Creating a new Project
When creating a new Project using Unreal you can find the template under New Project -> C++ -> RWTH-VR
.
Then you should:
- Add plugins
- Change the remote to your personal repository
- Optional: Create/Remove branches
- Push to your personal repository
Adding Plugins to a Project
A plugin is simply saved in the Project_Folder/Plugins/
folder. This can be either done via copy or by adding a git submodule.
As git submodules offer much more versatility (update the Plugin, change branches, ...) and are therefore preferred. See below for an example.
# Go to your project folder
cd my/project
# Add the rwth-vr-toolkit plugin as git submodule
# (here the 5.3 branch is used, adapt to your unreal version)
git submodule add -b 5.3 https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/plugins/rwth-vr-toolkit.git ./Plugins/rwth-vr-toolkit
# Add the rwth-vr-cluster-plugin as git submodule
# (here the 5.3 branch is used, adapt to your unreal version)
git submodule add -b 5.3 https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/plugins/rwth-vr-cluster-plugin.git ./Plugins/rwth-vr-cluster-plugin
# Add the dtrack plugin as git submodule
git submodule add https://github.com/VRGroupRWTH/UnrealDTrackPlugin.git ./Plugins/DTrack
# If you want to remove a plugin added as submodule:
# git rm ./Plugins/Stupid_Plugin
# (add --force if it doesn't work without)
Necessary Plugins
- RWTH VR Toolkit Plugin
- RWTH VR Cluster Plugin (For CAVE Usage only)
- DTrack Plugin (For CAVE Usage only)
Some additional plugins (non-exclusive)
Update Repository
The created project still points to the template repository. Thus, you now need to configure git to point at your personal repository for this project and push it. Additionally you can configure more, e.g. which branches to create or delete before pushing.
# Setup new remote
# ----------------
# rename origin remote to template origin
git remote rename origin template_origin
# add new remote pointing to your repository
git remote add origin https://git-ce.rwth-aachen.de/OWNER/REPOSITORY.git
# Optional: Create/Delete Branches
# --------------------------------
# Checkout to develop
git checkout -b develop
# List all branches (locally)
git branch
# Delete any branch you want (locally)
git branch --delete [branchname]
# Push to Repository
# ------------------
git push -u origin --all
git push -u origin --tags
Potential Fixes
If LFS makes some problems, try below commands.
git lfs install # Needs only to be done once per machine
git lfs fetch --all origin # Download LFS content
If git is annoyed about your upstream, you may try this command.
# Fix potential upstream annoyance
git branch --unset-upstream
git push --set-upstream origin develop # Assuming you have the develop branch checked out locally
Open your Project
There are multiple ways how to open/start your fresh project.
Open directly with Editor
Just double click the (ProjectName).uproject
file in your project folder.
Open with IDE
For this you first need to generate a VS Solution file (.sln
).
Rightclick the (ProjectName).uproject
file in your project folder and click on Generate Project Files
.
Afterwars use Visual Studio or Rider to open the (ProjectName).sln
file. Rider is an IDE tailored for Unreal development and is free for students.
If this does not work, make sure you installed all Visual Studio packages as listed in the official docs
Configure Project
When opening the project the first time, it will probably need to rebuild dependencies. Everything should then work out-of-the-box.
Nevertheless, some things you should look out for:
-
Edit -> Project Settings -> Project -> Maps & Modes
-
Default GameMode: RWTHVRGameMode
(unless you know what you're doing) -
Editor Startup Map: YourMap
(choose the Level you want to open per default in editor) -
Game Default Map: YourMap
(choose the Level you want to open per default in build)
-
- To show the content of the RWTH VR Toolkit in the Content Browser, hit
Settings
on the Content Browser and checkShow Plugin Content
.
Preparing CAVE applications
If you want to deploy applications on CAVE, Vulkan is used as a renderer (due to Linux).
As the image and stability may very between DirectX and Vulkan, it is advised to equalize your Windows setup to the CAVE (Linux) Setup.
Below, we also adjust the Vulkan shader model to support SM6. This may introduce instability, but offers more up-to-date shader functions.
Check the Shader format for Linux in Edit -> Project Settings -> Plattforms -> Linux
first:
- Targeted RHIs
- Check Vulkan Desktop (SM6)
✔️
- Check Vulkan Desktop (SM6)
Then check the Shader format for Windows in Plattforms -> Windows
to match:
- D3D12 Targeted Shader Formats
- Check SM6
✔️ - Uncheck everything else
❌
- Check SM6
- D3D11 Targeted Shader Formats
- Uncheck everything
❌
- Uncheck everything
- Vulkan Targeted Shader Format
- Check SM6
✔️
- Check SM6
- Targeted RHIs: Vulkan
If development becomes unstable under Windows, switch back to D3D12.
Preparing HMD applications
As HMD apps are most probably running on Windows, you can adjust the settings in Edit -> Project Settings -> Plattforms -> Windows
as you like.
Optionally set up Shared Derived Data Cave via Zen
At accelerate your build process when creating executables and packaging your application, you can easily set up a shared derived data cache through Zen Storage Server. Instructions on how to do that can be found here: https://git-ce.rwth-aachen.de/vr-vis/unreal-wiki/-/wikis/Unreal/Derived-Data-Cache-(Shader-Cache)