1. Learning
  2. How to realize an app that moves in Spatial Reality Display space - Unreal Engine

How to realize an app that moves in Spatial Reality Display space - Unreal Engine

 

#For first time Spatial Reality Display developers #Unreal Engine


pic_tips_movesrd_main

When developing a Spatial Reaility Display (Spatial Reality Display) application, you may want to provide an experience that allows users to move freely within the space you have created. In this article, we will show you how to convert your existing Unreal Engine project into an Spatial Reality Display application and realize easy movement control with the keyboard.

We have prepared the following two patterns, so please refer to the appropriate one and make use of it to develop more attractive contents.

① Simple way to implement viewpoint movement operations
② A method to implement the viewpoint operation following the player's movement, which is already implemented in UnrealiEngine's "player" movement operation.

A Simple Way to Implement Viewpoint Movement Manipulation

This section explains how to freely move the camera viewpoint on the Spatial Reality Display. It is a good idea to migrate "P_MoveSpatial Reality DisplayMgr" from the Unreal Engine Project file provided as a sample app and set it up in the Unreal Engine application you are developing. The specific steps are as follows

Procedure

  1. Install the Spatial Reality Display Plugin for Unreal Engine.
  2. Open the Unreal Engine Project of the sample app.
  3. Migrate P_MoveSpatial Reality DisplayMgr from the sample app to the existing Unreal Engine application.
  4. Setup P_MoveSpatial Reality DisplayMgr in the existing Unreal Engine application.
  5. Display and playback in Spatial Reality Display, and control with keyboard.

Concrete example

The procedure is explained with specific examples.

1. Install the Spatial Reality Display Plugin for Unreal Engine.

  • Refer to the Unreal Engine Setup page to install the Spatial Reality Display Plugin for Unreal Engine, including setup of the Spatial Reality Display.
  • Referring to the Build Your First App page, you must have the Spatial Reality Display Plugin enabled in your already existing Unreal Engine application. However, it is not necessary to place the SRDisplay Manager actor anywhere in the level.
  • Close the already existing Unreal Engine application.

**2. Open the Unreal Engine Project of the sample app. **

  • Download and open the Unreal Engine Project file for the sample app.
  • Please see the description below for the Unreal Engine Project file for the Unreal Engine sample app.

**3. Migrate P_MoveSpatial Reality DisplayMgr from the sample app to the existing Unreal Engine application. **

  • Open the Unreal Engine Project file of the sample app and find P_MoveSpatial Reality DisplayMgr in the Content Browser.
    • Content > MoveSpatial Reality DisplayMgr > Blueprints > P_MoveSpatial Reality DisplayMgr (Blueprint Class)

pic_tips_movesrd_cb_bp

  • Select P_MoveSpatial Reality DisplayMgr and choose Migrate.

pic_tips_movesrd_cb_bp_migrate

  • The Asset Report will be displayed. Make sure that all are selected and press the OK button.

pic_tips_movesrd_ar

  • Navigate to the destination contents folder (the Contents folder of the already existing Unreal Engine application project files) and press the Select Folder button.

pic_tips_movesrd_dis_dir

4. Setup P_MoveSpatial Reality DisplayMgr in the existing Unreal Engine application.

  • Open an already existing Unreal Engine application.
  • In the Content Browser, find P_MoveSpatial Reality DisplayMgr and double-click it to open Blueprint. Content > MoveSpatial Reality DisplayMgr > Blueprints > P_MoveSpatial Reality DisplayMgr (Blueprint Class)
  • Remove BP_SRDisplayDebugManager since an error occurs because it uses a function defined on the sample app side.

pic_tips_movesrd_del_bp_srddebugmgr

  • Compile.

pic_tips_movesrd_bp_compile

  • Also, in the Content Browser, find BP_SRDisplayDebugManager and force BP_SRDisplayDebugManager to be removed. Content > Common > SRDisplay > BP_SRDisplayDebugManager (Blueprint Class)

pic_tips_movesrd_del_srddebugmgr_mainpic_tips_movesrd_del_srddebugmgr

  • Place P_MoveSpatial Reality DisplayMgr anywhere on the level. Adjust the position, rotation, and scale.
    • Caution 1 If you are using an older version of the Spatial Reality Display Plugin for Unreal Engine, you may get a BAD Blueprint due to BP_FaceTrackErrorPlane. If this is the case, please remove the following two parts as done for BP_SRDisplayDebugManager.
      • Delete BP_FaceTrackErrorPlane in Blueprint of P_MoveSpatial Reality DisplayMgr.
        • Please also compile when deleting.
      • Forcibly delete Content > Common > FaceTrackErrorPlane > BP_FaceTrackErrorPlane.
    • Caution 2 P_MoveSpatial Reality DisplayMgr will stop moving if it hits another object, so place it so that it does not hit another object.

pic_tips_movesrd_put_movesrdmgr

5. Display and playback in Spatial Reality Display, and control with keyboard.

  • Performs VR preview playback.
  • The W/A/S/D and arrow keys can be used to move the camera viewpoint.

Unreal Engine Sample Apps and Project Files

Unreal Engine Sample App

A sample app is provided as a Spatial Reality Display compliant application.

The sample can be obtained from

We have prepared a sample app for the Spatial Reality Display. You can download the app from here.


in the Samples page.

The MoveSpatial Reality DisplayMgr sample in the sample app is a sample of camera viewpoint movement.

Unreal Engine Project file for the Unreal Engine sample app

A sample application, Unreal Engine Project, is also provided.

Can be acquired from

  1. Download Sample Projects.


in the Build and Run Sample Projects section of the Quickstart page.

The method to implement the viewpoint operation following the player's movement, which is already implemented in UnrealiEngine's "player" movement operation.

When converting an existing Unreal Engine application to a Spatial Reality Display-compliant application, there may be a problem with the camera viewpoint. This is because the viewpoint is changed to "SRDisplayManager" when the application is converted to support Spatial Reality Display. Therefore, the "SRDisplayManager" must be positioned to match the viewpoint of the original application.

For example, if the camera viewpoint needs to move with the player's movements, the following procedure can be used.

A concrete example is shown in the "MoveSpatial Reality DisplayMgr" sample.

Procedure

  1. Add SRDisplayManager to the player's Blueprint. This will allow the SRDisplayManager to work in the same way as the player.
  2. Adjust the position, rotation, and scale of SRDisplayManager to match the viewpoint of the original application.

Concrete example

Moving the camera viewpoint can be understood by checking the Blueprint of P_MoveSpatial Reality DisplayMgr, which is the user-operated target of the MoveSpatial Reality DisplayMgr sample in the sample app.

The location of the MoveSpatial Reality DisplayMgr sample can be found in the Content Browser after launching Unreal Engine Project in the sample app in the Content > MoveSpatial Reality DisplayMgr folder.

pic_tips_movesrd_cb
To view the Blueprint of P_MoveSpatial Reality DisplayMgr, in the Content Browser,

pic_tips_movesrd_cb_bp
open P_MoveSpatial Reality DisplayMgr (Blueprint Class) from Content > MoveSpatial Reality DisplayMgr > Blueprints.

pic_tips_movesrd_bp_all
By checking Components in the upper left corner of the Blueprint Editor of P_MoveSpatial Reality DisplayMgr, you can see that SRDisplayManager has been added to P_MoveSpatial Reality DisplayMgr as a Child Actor Component. This corresponds to step 1.

pic_tips_movesrd_bp_compo
y checking Details in the upper right corner of the Blueprint Editor in P_MoveSpatial Reality DisplayMgr, you can confirm that the position, rotation, scale, etc. of SRDisplayManager have been adjusted. This corresponds to Step 2.

pic_tips_movesrd_bp_details

The above will confirm that when the player is operated, the screen will also follow and the space will move within the Spatial Reality Display.

With these Tips, we believe we can realize a way to move within spaces and convey content to customers in an attractive way from various angles. For example, it will be possible to show moving within architectural structures, or to express movement within a space like a metaverse or game content. Please take a look at this page for more information.

Support information

Tips
Twinmotion to Spatial Reality Display connection

Learn how to connect and use the Sony Spatial Reality Display with Twinmotion, including setup, requirements, and navigation tips for optimal 3D viewing.

Details
Tips
VRED + Spatial Reality Display Instructions

Learn how to set up and use VRED with the Sony Spatial Reality Display for enhanced 3D visualization, including troubleshooting tips and system requirements.

Details
Tips
Omniverse Set up Instructions

Learn how to set up Omniverse with Spatial Reality Display using OpenXR. Follow this detailed guide for seamless VR integration and enhanced viewing experience.

Details