# Unreal Engine: Introduction to Unreal

*2025-06-18*

> Notes taken from the first week of Game Programming Foundations


Following on from the [C++ portion]({{< relref "/posts/2025/delving-into-c-plus-plus/" >}}) of my course, it's time to dive into the world of Unreal Engine. This week's focus was on getting familiar with the engine's interface and understanding its core concepts.

Here are my notes from watching the content for the first week of [Game Programming Foundations](https://www.cgspectrum.com/courses/game-programming-foundations/).

## Getting Started with the Editor

- The **F key** focuses the camera on your selected object – essential for navigating big levels quickly
- The **Outliner** panel shows every object currently loaded in your level
- You can replace the default map and set it as your startup map (found in Project Settings → Maps & Modes)
- World origin sits at `0,0,0` - good to know when placing objects
- Unreal's units are in **centimeters**, not meters
- Hold **Left Alt + drag** to duplicate objects in the viewport
- Dragging objects onto others in the Outliner assigns parent-child relationships


## Setting Up Git LFS

Unreal's asset files (`*.uasset`, `*.umap`) are large binaries that'll break regular Git repos fast. You need Git LFS:

```bash
git lfs install
git lfs track "*.uasset"
git lfs track "*.umap"
```

This generates a `.gitattributes` file. Make sure it contains:

```bash
*.uasset filter=lfs diff=lfs merge=lfs -text
*.umap filter=lfs diff=lfs merge=lfs -text
```

Commit this file early – it's the difference between a 50MB repo and one that balloons to gigabytes.

## Assets and Imports

- Textures don't stand alone – they get wrapped into Materials
- Import 3D models via **FBX** export from Blender
- When importing textures, pay attention to import method options (e.g. "Do Not Create Material" if you're building your own)

### Common Asset Types

- **WorldGridMaterial** — the default checkerboard material you see in untextured areas
- Textures can wrap around objects like a "chocolate Santa Claus wrapper"

## Material Editor

Unreal uses **PBR (Physically Based Rendering)** materials. Key values include:

- **Metallic**, **Roughness**, and **Specular** control surface appearance
- You can pack three greyscale maps into one RGB texture for efficiency:
  - **Red** = Ambient Occlusion
  - **Green** = Roughness
  - **Blue** = Metallic
- For **Linear Colour textures** (HDR data), untick sRGB
- **Normal maps** encode surface direction as RGB vectors – the purple/blue colour shifts represent angle information, not lighting brightness

## Material Instances

These let you reuse master materials without recompiling:

1. Build your base material with texture samples
2. Convert texture samples to parameters (right-click → Convert)
3. Right-click the material → **Create Material Instance**
4. Instance is a child material you can customise independently (default colour, normal map, occlusion map, etc.)

## Blueprints Overview

Unreal's visual scripting system:

- Everything inherits from **Object**; subclasses inherit parents
- Blueprints appear under **All Classes** when spawning or creating actors
- Press **End key** to drop selected object onto the floor plane
- The left panel is the "My Blueprint" header (like a class header file)
- Booleans are prefixed with lowercase 'b' in code (`bIsOn`), but Unreal strips this prefix in UI names ("Is On")

## Event Graphs

Where gameplay logic lives:

- Group functionality into logical clusters (Physics Graph, Input Graph, etc.)
- Nodes like **For Loop** and **Branch** form control flow
- The graph is split: left side = header/properties, centre = implementation nodes

---

Notes: These are raw notes from watching Week 1 content for Game Programming Foundations. Expect updates as I build the project out - the GitHub repo linked below tracks progress.

[sawnoff-studios/first-project](https://github.com/sawnoff-studios/first-project)
