Skip to navigation

Configuring your Unreal Project for AR/MR

Project settings and configuration files the ZED plugin needs in Unreal Engine 5
Open in ClaudeOpen in ChatGPT

For the plugin to work, there are a number of configurations that have to be set properly. Let’s step through them. Go to Edit -> Project Settings. You’ll see this window:

image

In Maps & Mode:

  • Change the GameMode to BP_ZED_GameMode
  • Change Game Instance Class to ZEDGameInstance
image

In General Settings:

  • Change LocalPlayerClass to ZEDLocalPlayer. Without it, the virtual camera projection does not match the optical center of the real camera.
  • Set Near Clip Plane to 1.0.
image

Project configuration files

The plugin ships its recommended project settings in Plugins/Stereolabs/Source/ZED/Defaults/*.ini. They are copied into your project’s Config folder automatically, but only if the corresponding file does not exist yet. Since your project probably already has these files, merge the following settings into them by hand.

image

Config/DefaultEngine.ini:

[/Script/EngineSettings.GameMapsSettings]
GlobalDefaultGameMode=/Stereolabs/ZED/Blueprints/GameMode/BP_ZED_GameMode.BP_ZED_GameMode_C
GameInstanceClass=/Script/ZED.ZEDGameInstance
[/Script/Engine.Engine]
; Without ZEDLocalPlayer the virtual camera projection does not match the real camera optical center.
LocalPlayerClassName=/Script/ZED.ZEDLocalPlayer
NearClipPlane=1.000000
[/Script/Engine.RendererSettings]
; The ZED passthrough plane renders with custom depth + stencil.
r.CustomDepth=3
; Keep post-processing off the real camera image.
r.DefaultFeature.AutoExposure=False
r.DefaultFeature.MotionBlur=0
r.DefaultFeature.Bloom=False
r.DefaultFeature.LensFlare=0
[ConsoleVariables]
; The point cloud Niagara system must tick after the camera texture update.
fx.Niagara.ForceLastTickGroup=1
[/Script/NavigationSystem.RecastNavMesh]
; Only needed by the SpatialMapping NPC sample (navmesh built at runtime on the scanned mesh).
RuntimeGeneration=Dynamic
bForceRebuildOnLoad=True

Config/DefaultInput.ini, used by the sample interactions:

[/Script/Engine.InputSettings]
+ActionMappings=(ActionName="Jump",Key=SpaceBar)
+ActionMappings=(ActionName="MouseLeftClick",Key=LeftMouseButton)
+ActionMappings=(ActionName="Shoot",Key=LeftMouseButton)

Config/DefaultGame.ini, only needed to package the sample maps with your game:

[/Script/UnrealEd.ProjectPackagingSettings]
+DirectoriesToAlwaysCook=(Path="/Stereolabs/Samples")
; Maps are not picked up by DirectoriesToAlwaysCook, list each sample map you ship:
+MapsToCook=(FilePath="/Stereolabs/Samples/Levels/L_PointCloud")

On the first build, the plugin also copies the default camera settings (ZED.ini, Camera.ini) into Saved/Config/ZED/.

Go back to the editor and restart it so that the new settings are applied.