> For the complete documentation index, see [llms.txt](https://ms-kb.msd.unimelb.edu.au/next-lab/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ms-kb.msd.unimelb.edu.au/next-lab/virtual-reality/guides/vr-development-overview/unreal-engine-overview/vr-video-tutorial-series/unreal-engine.md).

# Unreal Engine

## Starting a New Project

{% embed url="<https://www.youtube.com/watch?v=IoZZn1J8lQU>" %}

#### **Notes**

1. [Create an Epic Games Account](https://accounts.epicgames.com/login)
2. [Download the NExT Lab template](https://drive.google.com/uc?export=download\&id=1bLL5v-QSbAg3g4QzyP71d2d2ZX6eo7TO)

#### **Resources**

1. [Best Practice VR](https://docs.unrealengine.com/latest/INT/Platforms/VR/ContentSetup/)

## User Interface & Importing

{% embed url="<https://www.youtube.com/watch?v=WklMZku1dww>" %}

#### **Notes**

1. To navigate:
   1. **Click and hold** your *r*`ight mouse button` **to move** the camera.
   2. Use the `scroll wheel` to **zoom**.
   3. **Use** the `[W] [A] [S] [D] keys` **to move** around the scene.
   4. We recommend a `camera speed` of **5**.
2. **FBX Import Options**:
   1. **Deselect** `auto generate collisions.`
   2. **Untick** `Generate Lightmap UV's`.
   3. Make sure the **Import Uniform Scale** is set to `1`.
   4. **Untick** `Import Materials` and `Import Textures`.

#### **Resources**

1. [Unreal Engine Interface](https://docs.unrealengine.com/latest/INT/Engine/UI/index.html)

## Placing Objects

{% embed url="<https://www.youtube.com/watch?v=wIc72nPTy1k>" %}

#### **Notes**

1. **Transform tools**; found in the **top right hand corner** of the **viewport**.
   1. Move `[E]`
   2. Rotate `[R]`
   3. Scale `[W]`
   4. Whether the **Gizmo** is **Object** or **World-based**
   5. **Grid Snapping** On/Off and **Grid Sizing**
   6. **Rotation Snapping** On/Off and **Rotational increments**.
   7. **Scale Snapping** On/Off and **Scale increments**.

## Starter Content Materials

{% embed url="<https://www.youtube.com/watch?v=kWS0BbtSchA>" %}

#### **Notes**

1. To **apply a materia**l to an object simply **drag the material** from the content browser **onto the object**.

#### **Resources**

1. [Starter Content](https://docs.unrealengine.com/latest/INT/Engine/Content/Packs/index.html)

## Creating Basic Materials

{% embed url="<https://www.youtube.com/watch?v=ffb_yX7iVZ4>" %}

#### **Notes**

1. **Adjust UVWs** on the `texture coordinate node` with U and V tiling. **The smaller the number, the larger the tiles**. The larger the number, the smaller the tiles.

#### **Resources**

1. [Material Nodes](https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/MaterialNodes/index.html)

## Creating Materials from Textures

{% embed url="<https://www.youtube.com/watch?v=Ur0tL_Urufg>" %}

#### **Notes**

1. **Opacity channel** controls the **translucency** of the material.&#x20;
   1. &#x20;`0 = Transparent`
   2. &#x20;`1 = Opaque`

#### **Resources**

1. [Download T\_Concrete\_Tiles\_D.TGA](https://drive.google.com/uc?export=download\&id=1XVNGtY26NlDTHElp2MwGu8NPQeTIISMD)
2. [Download T\_Concrete\_Tiles\_N.TGA](https://drive.google.com/uc?export=download\&id=1A-qew30BXwaL83B6KOiZ5DC5FMcoh2J3)

## Lighting & Lighting Builds

{% embed url="<https://www.youtube.com/watch?v=TebuSDfsw6c>" %}

#### **Notes**

1. You can also **adjust the direction** of the light by **using the transformation tools**.
2. There are **two main lights**; a `spot light` and a `point light`.
3. The **third** is a; `Directional Sky-Light` **AKA**. **Sun**
   1. Like the other lights, **this can be adjusted using the rotation tool**. This will change the angle of the sun.
   2. The directional light is **also connected to the** `skysphere` that creates the sky. In the **world outliner**, it is called `SkySphereBlueprint`.
   3. Every time you **move the directional light** you need to **refresh to sky sphere**.
4. You can **build the lighting separately** by **clicking** the `[dropdown arrow]` on the **build button** and selection `[build lighting only]`.
   1. The `medium` **quality setting** should suffice **for most uses**.
5. **You can still work** while your **lighting** is **building**.

#### **Resources**

1. [Lighting Tutorials](https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/)

## VR Camera & Navigation

{% embed url="<https://www.youtube.com/watch?v=y1liDIzYDvg>" %}

#### **Notes**

1. **Enable** collisions on the floor by adding a `box simplified collision` to the `static mesh`*.*
2. **Drag and Drop** the `HTC Vive Camera` into the **scene**
   1. Found in the `[Virtual Reality Blueprint > Blueprints > Motion Controller Pawn]`.
3. **Change the camera** to `Auto Possess Player 0.`
4. **Correct** your `Nav Mesh Bounds` with a **manual scale operation**.
5. `VR Preview` will work only if your **headset is connected**.

## Packaging the Project

{% embed url="<https://www.youtube.com/watch?v=jYJdF06c8DY>" %}

#### **Notes**

1. Script `Escape` key as **quit function**.
2. Adjusting the project settings;
   1. Always provide an **appropriate Project Name**.
   2. Make sure `start in VR` is **ticked**.
   3. Make sure `game default map` is **correct**.
   4. Make sure `Windows` is a **supported platform**.
3. Package
   1. `File > Package Project > Windows` and then `Windows 64bit`.
   2. This can take some time.
4. To transfer your application to a new computer copy the entire folder named WindowsNoEditor.

#### **Resources**

1. [Packaging Documentation](https://docs.unrealengine.com/latest/INT/Engine/Basics/Projects/Packaging/)
