Unreal Engine

About

Notes

Notes

Editor

Selection

Select All By Class

Select SM > RMB > Select > Select Matching (All Classes)

Transformation

Temporary Reposition Actor Pivot

Select Actor/s > ALT + MMB + Drag

Save Transform State After Simulation

Simulate scene.

With selected actors, press K to save their transform state.

Units

UE units are in centimeters.

Asset Management

Moving & Renaming Files

Following any move or rename, RMB the directory to access and process Fix Up Redirectors in Folder. This will update and links between the moved or renamed asset to any other asset/s that is referenced or it itself references.

To view redirectors in a directory with the Content Browser, navigate to Filter > Other > Show Redirectors.

Developers Content

Utilize the following sandbox directory for prototyping, experimenting, and collaborative development efforts.

Content Browser > View Options > Show Developers Content

Notes:

  • Never reference content from other directories in this Developers Content directory.
  • For collaborating and displaying each developer's content in project, Content Browser > Filters > Other Filters > Other Developers.

Marketplace Content

Import Marketplace content into a temporary project and then Migrate into actual project to help manage organization of different sourced content and mitigate extraneous content.

Environment

Base Environment Lighting Setup

Generate a base environment lighting setup with Window > Environment Light Mixer.

image

Materials

Color Picker Value Parameter

When set to greater than 1, this is shown as a gradient in the swatch and is used to denote the intensity of the 'glow'.

image

Cinematics

Sequencer Curve Tangents

  • Enable tangents to be shown for manipulation. They may not be visible and accessible by default.
  • Right click individual tangent to convert to weighted tangent for custom length.
image

Batch Export Multiple Screenshots

image

Sequencer

  • Set up in Sequencer with each camera on a separate frame.
  • Each camera is to be positioned for the intended screenshot.
  • Use left/right keyboard keys for quick navigation among cameras.

Export Renders

  • Render image sequence as alternative to individual screenshots per view.
  • Render Movie Settings
    • Specify output location.
    • Add some time to the following Render Movie Settings to allow for any effects or other animations to settle before generating the screenshot. Without this warm up, effects like motion blur could distort image.
      • Warm Up Frame Count
      • Delay Before Warm Up
      • Delay Before Shot Warm Up

Add Tracks Simultaneously Across Actors

Tracks can be added to multiple actors by selecting them all and adding the relevant tracks, which will add to each of the selected actors at the same time. This can save time and coordination over individually managing actor tracks.

image

Quick Export

Arrow at top left of viewport > High Res Screenshot

Views can be set to bookmarks for quick navigation amongst cameras.

Post-Processing

  • Disable camera PP by setting the blend weight: Camera Settings > Post Process Blend Weight.
  • This will allow for the PPV in the scene to drive the PP enabled effects rather than the camera overriding them.

  • Be cautious of multiple PPV in the scene, including those in other sub-levels, which can have their streaming disabled so as not to be rendered in a cinematic.

Motion Blur

The following parameters can contribute to the application of motion blur:

  • Camera > Details > Motion Blur > Amount
  • Post Process Volume > Details > Motion Blur > Amount
  • Project Settings > Default Postprocessing Settings > Motion Blur
  • Materials may need to have motion vectors enabled

Experimentation discovered that the following setting removed trailing motion blur artifacts in cinematic renders:

  • Project Settings > Default Postprocessing Settings > Anti-Aliasing Method > FXAA

Compositing

Backplate Compositing

Setup

  1. Enable Edit > Plugins > Composure.
  2. Navigate to Edit > Project Settings > Engine - Rendering > Post Processing > Enable
    • Set Enable alpha channel support in post processing to Allow thru tonemapper.
  3. Restart editor to compile shaders.

Add New Comp

Window > Virtual Production > Composure Compositing

RMB (in Composure Compositing) > Create New Comp > Empty Comp Shot

RMB (new comp) > Add Layer Element > Media Plate

Navigate to Details > Composure > Inputs > Media Source.

Set Media Source to Texture Input, which is intended to house the backplate texture.

Optimization & Performance

Visibility & Occlusion Culling

Frustum culling is enabled by default, but distance culling and precomputed visibility need to be manually enabled.

Debug Shader

With transparency, manage performance with Viewport, View Mode > Optimization Viewmodes > Shader Complexity.

When constructing shaders, manage the number of instructions required for it. Higher number of instructions impacts real-time performance.

Note that UE uses pixel shaders, so the number of pixels in the viewport will impact the performance.

Example:

Being closer to a large area of translucent objects will have a greater number of pixels requiring computation than having the camera far away from it.

Draw Calls

In a simplified way, draw calls are the number of objects in the scene, each of which are rendered separately; then each material within the object is also a separate draw call. Draw calls are more than this simplified way of thinking about it, but it is not entirely dependent on poly count; instead focus on number of different objects and their materials.

Reference the following command to monitor Triangles drawn and Draw Primitive Calls:

stat rhi

Shadows

Dynamic shadows are very performance intensive, not necessarily the lights in the scene. Note that dynamic shadows are highly reliant on the polygon count in the scene. Instead, consider static lighting for shadows.

Animation Strategies

Importing Content

Morph Targets

When importing the FBX, enable FBX Import Options > Mesh > Skeletal Mesh.

This enables the Import Morph Targets option, which should also be enabled to access the morph targets in the incoming FBX file.

Material Management

Importing Content

Geometry With Vertex Colors

Import FBX

  • When importing the FBX, set Vertex Color Import Options > Replace to enable access to the vertex color attributes within the incoming geometry.
  • This can also be enabled in the static mesh Details > Vertex Color Import Options > Replace.

Material

  • For the UE4 material applies to these incoming assets, simply use a Vertex Color to the Base Color.
image

Megascans Asset Management

Overview

This is a powerful asset management tool and integrator among a variety of tools, including Unreal Engine, Unity, Houdini, and many others. The assets are sourced from Quixel's Megascan library, which continuously grow in size and diversity. Their high quality make them ideal for quick use in just about any type of environment development. They even include the applicable LODs necessary to provide optimization within the created environment, and can be further refined with custom LOD Settings in UE. I've used this in a few instances to mostly test Blueprints in UE, but the process for accessing and integrating them is very quick and simple.

General

Log file location: C:\Users\<username>\AppData\Roaming\Bridge

Materials

Surface Assets

  • Albedo
  • Normal
  • ORDp
    • Channel Assignments:
      • Red Channel: Occlusion
      • Green Channel: Roughness
      • Blue Channel: Displacement
    • Compression Setting defaults to Masks (No sRGB)

3D Assets

  • Albedo
  • Normal
  • DpR
    • Channel Assignments:
      • Red Channel: Displacement
      • Green Channel: Roughness
      • Blue Channel: Not Utilized
    • Compression Setting defaults to Masks (No sRGB)

Nanite

Advantages

All opaque geometry processed on a single draw call.

Only updates changes per frame rather than resetting each frame from start.

Utilize Nanite where possible and applicable

Recommended Applicability

Mesh contains numerous, small triangles

Closed, watertight meshes

Several instances of a mesh are used in the scene

Mesh serves as a large occluder in the scene

Unsupported

Translucent or masked materials.

2-sided faces

Deforming or skeletal meshes

Tesselation or displacement

Fine details, namely hair, foliage, etc.

Efficient compression integration.

Potential Challenges

Overdraw

This occurs in instances with multiple layers geometry, even if occluded by other geometry, and those pixels are rendered by necessity.

More instances of overdraw impact performance negatively.

This is quite noticeable in aerial views capturing large environments of layered geometry.

Nanite Visualization includes option to visualize Overdraw in scene.

Visualizer set up as a heat map.

Hotter areas identify more overdraw.

With glancing angles, occlusion culling is challenged with Nanite; it relies on overdraw to compensate for those areas visible or not visible.

Solution

Limit the layers of geometry on top of each other.

Resources

Game Development

Actions

Input Mappings & Binding

Initialize new actions via Bindings:

  • Project Settings > Engine > Input > Bindings
  • Add as many new actions with their corresponding input control mappings.

Once initialized, these action mappings will be accessible via BPs as Input Actions that reference the Action Mapping name specified under Project Settings.

Case Study

This is a short video of actual gameplay within Unreal Engine 4 that documents the initial setup of a character that I conceptualized, modeled, rigged, and textured recently. I had a lot of fun developing it that I wanted to see it in action, so this is the first work-in-progress as I integrate the character and its assets into Unreal Engine 4. It includes cloth simulation and socket assignments to manage the bow and knife assets. Stay tuned; more WIP videos will follow.

Command Line

Metrics

Display FPS.

stat fps

Display game, GPU, etc. metrics.

stat unit

Display GPU metrics.

stat rhi

Display rendering metrics.

stat scenerendering

Display Nanite metrics.

nanitestats list

Mixed Reality

UE4 Remote Session

Source:

This is to allow for the app to be quickly deployed for testing on the mobile device (iPad,iPhone) which has the enabled UE app. It primarily focuses on the UI elements of the app.

Plugin Setup

Settings > Plugins > Remote Session (enabled)

App

Unreal Remote 2 (URemote) Connect to IP Address and await Play on UE4 session

Process

Play > New Editor Window (PIE)

Note

Does not permit AR functionality, even with the correct AR plugin configured in Plugins, since the AR Session will not be enabled via the Play, but only with a full deploy through XCode and mobile device (iOS).

Log Note

(Message received during testing) Attempting to start an AR session but there is no AR plugin configured. To use AR, enable the proper AR plugin in the Plugin Settings.

ARCore Development

Android Development Environment

Android SDK & NDK

Updated 20210427

Installation Documentation

Install Android Studio version 3.5.3: https://developer.android.com/studio/archive

  • Verify default SDK path.
  • Adds the following to system environment variables:
    • ANDROID_HOME
      • C:\Users\<username>\AppData\Local\Android\Sdk
    • JAVA_HOME
      • C:\Program Files\Android\Android Studio\jre

Execute SetupAndroid.bat script to setup NDK.

  • Script Location: C:\Program Files\Epic Games\UE_4.26\Engine\Extras\Android
  • Script adds the following to system environment variables:
    • PATH
      • C:\Users\<username>\AppData\Local\Android\Sdk\platform-tools
      • C:\Users\<username>\AppData\Local\Android\Sdk\tools
    • NDK_ROOT, NDKROOT
      • C:\Users\<username\AppData\Local\Android\Sdk\ndk\<version>

Default SDK path: C:\Users\<username>\AppData\Local\Android\Sdk

Default NDK path: C:\Users\<username>\AppData\Local\Android\Sdk\ndk

Android Device

Enable Developer Mode.

  • Settings > About Tablet > Software information > Build number (tap 7x)

Enable USB Debugging.

  • Settings > Developer options > USB Debugging

Verify Google Play Services for AR is updated.

If applicable, install appropriate driver: https://developer.android.com/studio/run/oem-usb

UE4 Development Environment

Project Initialization

Projct Category: Games

Template: Handheld AR

Project Settings:

  • Target Hardware > Mobile / Tablet

Project Settings

  1. Platforms >
  2. Android > APK Packaging >

    Configure Now

    Accept SDK License

    Android Package Name: com.Company.Project

  3. Settings > Scalability > Preview Rendering Level > Android
  4. Active Play Mode > Mobile Preview

Launch Project To Device

Launch Options > Devices > Specified Android Device

  • Android device should be visible in list of available devices if connected to computer and configured as noted above in Android Device.

Package Project

File > Package Project > Android

Settings

Spatial Coordiation

World Origin for AR space

Specified by DebugDrawWorldOrigin function in BP_DebugMenu

ARSessionConfig

Session Type:

  • World:
    • Enables all world tracking and plane detection Includes option to detect images if set up in BP_Pawn
  • Image:
    • Disables all world tracking and plane detection

Reset Camera Tracking

Test with 'Image' Session Type does not appear to make impact

Candidate Images

Verify all tracked images are included here.

Data Asset

Window > Details to access additional info for that specific data asset.

Touch Controls

  • Setup:
  • Settings > Project Settings > Input > Mobile >

  • Enable Always Show Touch Interface
  • Verify Default Touch Interface set to Default Virtual Joysticks

Note: These controls are visible and function with the Remote Session

Tests

Setup: Session Type: Image Reset Camera Tracking: Disabled Reset Tracked Objects: Disabled (Not applicable to tracked images) Candidate Images: 1 data asset assigned

Result: Object spawned upon image detection but then the object stuck to the camera and the camera's movement. It did not track with the image.

BP_Pawn Transformation of spawned object: Y-axis transformation to towards and away from the camera. +Y means the object gets spawned closer to the camera and vice versa.

Setup: Image Session Type, spawn in level BP, transform attempt in pawn BP Print Log: Get All AR Tracked Images: ARTrackedImage_2147482043 Get Local to World Transform: Actual XYZ coordinates BP_Placeable: false

Game Instance BP -Location for global variables, such as BP_Placeable -Assign in Project Settings > Maps & Modes > Game Instance Class -Variables called by using 'Get Game Instance' to 'Cast To BP_ARGameInstance' to either Get or Set of the variable

References

Mixed Reality Resources

Resources

Perforce & UGS

Nomenclature

  • Workspace
    • Local copy is a local copy of what is on the remote server.
  • The Depot
    • This is the Perforce Depot where all of the files are stored
  • Staged Files
    • These are file intended to go back to the remote server from the local copy.

Workspace Management

Delete Workspace

View > Workspaces

Select workspace to be deleted > RMB > Delete Workspace

Setup Guides

UE Resources

Resources

Acronyms

Acronyms

AbbreviationDefinitionReferenceNotes
DDC
Derived Data Cache
Asset storage protocol for UE and target platforms.
UMG
Unreal Motion Graphics
UMG UI Designer is a visual UI authoring tool.
DOP
Disconnected On Purpose
Commenting clarification in visual scripting to log disconnected streams.

Keyboard Shortcuts

Keyboard Shortcuts

NameShortcutNotes
Toggle collision box on selected asset
ALT + C
Enable actor snapping
CTRL + SHIFT + K
Distance can be adjusted; located under Settings
Marquee Select
CTRL + ALT + LMB Drag
Open/Collapse Content Drawer
CTRL + SPACE
UE5
Center Content
A
Context: Niagara Graph
Add Comment
C
Context: Niagara Graph
Display FPS
CTRL + SHIFT + H
Context: Editor
Command Line
`
Mouse Control (Play)
SHIFT + F1
Full Screen
F11
Context: Game Mode
Reference Viewer
ALT + SHIFT + R
Move Actor with Viewport Locked
CTRL + SHIFT + Drag Actor
Move Actor (X-Axis Constrained)
CTRL + LMB + Drag Actor
Move Actor (Z-Axis Constrained)
CTRL + RMB + Drag Actor
Move Actor (Z-Axis Constrained)
CTRL + LMB + RMB + Drag Actor
Browse to Asset
CTRL + B
Erase
CTRL + SHIFT + LMB
Context: Paint Mode

Support Tools

Support Tools