Unreal StarVR Plugin
Creating a New Project
Introduction to Blueprint Templates
A quick an easy way to start new projects is to use the enclosed Blueprint templates. A new project can be started by adding predefined features or a content pack. The following section provides a guide to creating your first project using a Blueprint template.
Creating a First Person Project
The StarVR Unreal Engine controller test guide provides the guidance to run the Unreal Engine build-in template project for First Person and viewing the stunning contents through the StarVR HMD (head-mounted displays) and VIVE controllers are supported.
To experience the contents through the StarVR HMD and VIVE controllers, please follow the following steps to import and run the samples in Unreal Engine to experience the project through your StarVR HMD.
To select a template:
1. Launch Unreal Engine 4.22.3. From the tool bar interface select the New Project tab.
2. Select the project settings.
Note: Settings can be modified through the Target Hardware menu under Project Settings.
3. Click the Desktop/Console drop down menu to select the class of hardware to target : Desktop or Console or Mobile Device.
4. Click the Maximum Quality drop down menu to select the graphic level to target: High-end only or scalable from low to high.
5. Click the No Starter Content drop down menu to select a starting template: Include or exclude additional content pack; pack may contain simple place mat meshes with basic material and textures.
To create a project with the bare essentials, select the No Starter Content template.
6. Once the settings are selected, select a location for the project by clicking the Browse function to select a folder.
7. Enter the project name in the Name field.
8. The new project is ready as defined by the Blueprint template selections. Click Create Project to save the specified project.
9. From the Content Browser select Content > FirstPersonBP > Blueprints > FirstPersonCharacter, see the following figure.
10. From the Content Browser panel, select Variables and click UsingMotionControllers. Locate the block If HMD and Motion Controllers are enable, use the VR_Gun and hide the Mesh2P. Locate the flow line between the Event BeginPlay and Branch nodes and right click to open All Actions menu.
11. In the Search bar, type delay to open the Delay Action node menu.
12. Under Flow Control, select Delay.
The following step requires disabling the Pawn Control Rotation (First Person Camera).
13. Locate the Camera Options in the column selector and click it to open the drop down menu.
14. Click Use Pawn Control Rotation to disable it.
15. From the column selector on the right, locate Default Value and click Using Motion Controller to enable the setting.
The following step is intended to add a delay action within two existing nodes.
16. Locate the flow line between the Event BeginPlay and Branch nodes and right click to open All Actions menu.
17. In the Search bar, type delay to open the Delay Action node menu.
18. Under Flow Control, select Delay.
19. Click on the Delay Start action pin and drag it to the Exec pin on Event BeginPlay.
20. Click on the Delay Complete Exec pin and drag it to the Exec pin on Branch.
The latent action between the two events is now created.
The Duration setting allows you to set the length of the delay in seconds.
21. Locate the Play menu from the tool bar and select VR Preview.
22. Put on the StarVR One HMD on to activate the viewing display. Once the VR Preview function is executed, the sample project displays through the StarVR One HMD.
In the following section the VIVE controller setup is detailed.
Controller Component Setup
In the following section the information necessary to add Motion Controller support for theStarVR Unreal Engine Plugin is explained. The information is intended to help you setup the components that are needed for Motion Controllers to work.
Once the sample project, as explained in the previous section, is setup, the controller components can be setup. The components required to complete the controller setup are
listed as follows:
- Motion Controller Setup
Motion Controller Setup
In the following section we will take a look at how to add and setup the components that are needed for Motion Controllers to work.
1. First, inside the Content Browser, right click to open the Create Basic Asset menu.
2. Locate Blueprint Class and select it. The Pick Parent Class menu displays.
3. Select Pawn from the menu and click on it.
4. Once the Pawn is created, rename it. In the following, VR_Pawn is used.
5. Click on your Player Pawn Blueprint to load it in the Viewport.
6. In the Components section, click on Add Component to view the available Blueprint.
7. In the Search field, enter Motion to display the Motion Controller listing.
8. Select Motion Controller to add it to the component list. Rename the selection to identify it easily. In the following the name MC_Left is used to designate it as the motion controller for the Left controller.
9. Select the Motion Controller component (MC_Left) to display the Details panel, see the following figure.
10. Locate Motion Controller to view Motion Source, click the drop down menu and select Left. This designates the Pawn’s motion reference as the left controller.
11. Once the Motion Source is defined, locate the Components panel and select the component (MC_Left).
12. Click the Add Component drop down menu to open the Search field. In the Search field, enter Static Mesh.
13. Click on Static Mesh to add this component. Rename the selection to identify it easily. In the following the name SM_Left is used to designate it.
Note: To ensure the Static Mesh follows the Motion Controller movement, make sure the Static Mesh Component is a child of the Motion Controller Component.
14. To define the viewing representation of the Motion Controller, it is necessary to select the image. To do this locate the Details pane of the Static Mesh Component.
15. Select Static Mesh to open the drop down menu.
16. The scale of the component view is also adjustable through the Scale settings under Transform.
17. Follow the previous steps to duplicate the component settings for the Right Motion Controller.
Compile and save your Pawn Blueprint, make sure it is placed in your test level and then launch your project. When you put on your StarVR One HMD, the Motion Controllers are also enabled.
Creating a Standalone Project
VR Contents can either be viewed directly within Unreal Editor or can be compiled as a standalone project. The compiling process allows you to create an executable VR project that does not require activating the Unreal Editor to run the VR Contents.
To compile a standalone project :
1. From the tool bar, select Settings to display the drop down menu.
2. Select Project Settings to change the settings of the currently loaded project.
The Project Settings window displays.
3. Under the Project content column, select Description. The details panel with the available settings displays.
4. Locate the Settings category and select Start in VR.
5. Click the function to enable it.
6. Return to the Project category in the menu column, locate Maps & Modes.
7. Locate Game Default Map and click the drop down menu to select the target content.
Prior to concluding the packing function, RHI support must be selected.
8. Under the Platform content column, locate the Windows category and select it.
The Targeted RHIs panel displays and lists the available RHIs, DirectX 10 DirectX 11, DirectX 12, OpenGL and Vulkan.
9. Click on a selection to enable it.
10. Close the Project Settings window.
Once the settings are configured, the packing of the project can being.
11. From the File main menu, select Package Project > Windows.
12. Select the required Windows Bit version (32/64) and click on it.
13. Select a target folder and the name for the compiled project and save it. The process begins to cook the standalone project.
14. Once completed an executable file is created. Click on the file (.exe) to open the file without the use of the Unreal Engine prompt.