222 3.08 UE4 integration - ARM architecture

Enlighten™ 3.08 UE4 integration ... ARM tests the PDF only in Adobe Acrobat and Acrobat Reader, and cannot guarantee the quality of the...

105 downloads 708 Views 4MB Size
Enlighten™ 3.08 UE4 integration Revision: r3p8

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. ARM 100836_0308_00_en

Enlighten™ 3.08 UE4 integration

Enlighten™ 3.08 UE4 integration Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Release Information

Document History Issue

Date

Confidentiality

Change

0308-00

21 February 2017

Non-Confidential

First release

Non-Confidential Proprietary Notice This document is protected by copyright and other related rights and the practice or implementation of the information contained in this document may be protected by one or more patents or pending patent applications. No part of this document may be reproduced in any form by any means without the express prior written permission of ARM. No license, express or implied, by estoppel or otherwise to any intellectual property rights is granted by this document unless specifically stated. Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use the information for the purposes of determining whether implementations infringe any third party patents. THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE DOCUMENT. For the avoidance of doubt, ARM makes no representation with respect to, and has undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or other rights. This document may include technical inaccuracies or typographical errors. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure of this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof is not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to ARM’s customers is not intended to create or refer to any partnership relationship with any other company. ARM may make changes to this document at any time and without notice. If any of the provisions contained in these terms conflict with any of the provisions of any signed written agreement covering this document with ARM, then the signed written agreement prevails over and supersedes the conflicting provisions of these terms. This document may be translated into other languages for convenience, and you agree that if there is any conflict between the English version of this document and any translation, the terms of the English version of the Agreement shall prevail. Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM Limited or its affiliates in the EU and/or elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective owners. Please follow ARM’s trademark usage guidelines at http://www.arm.com/about/trademark-usage-guidelines.php Copyright © 2017, ARM Limited or its affiliates. All rights reserved. ARM Limited. Company 02557590 registered in England. 110 Fulbourn Road, Cambridge, England CB1 9NJ. LES-PRE-20349 Confidentiality Status This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to. Unrestricted Access is an ARM internal classification.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2

Enlighten™ 3.08 UE4 integration Product Status The information in this document is Final, that is for a developed product. Web Address http://www.arm.com

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3

Contents Enlighten™ 3.08 UE4 integration

Preface About this book ...................................................... ...................................................... 7 Feedback ...................................................................................................................... 9

Chapter 1

Introduction 1.1 1.2 1.3

Chapter 2

Before precomputing and Enlighten settings 2.1 2.2 2.3

Chapter 3

Before you precompute ............................................. ............................................. 2-18 Enlighten world settings ............................................. ............................................. 2-20 Enlighten system settings ........................................................................................ 2-24

Lighting geometries with Enlighten 3.1 3.2 3.3 3.4 3.5 3.6 3.7

ARM 100836_0308_00_en

Welcome to Enlighten .............................................................................................. 1-11 How Enlighten works ............................................... ............................................... 1-12 Installing Enlighten for UE4 .......................................... .......................................... 1-16

Setting up sky lighting .............................................................................................. 3-27 Relighting an existing scene with Enlighten .............................. .............................. 3-28 Lighting static geometry ............................................. ............................................. 3-29 Enlighten light properties ............................................ ............................................ 3-33 Supplying simplified UVs ............................................ ............................................ 3-34 Lighting movable actors ............................................. ............................................. 3-36 Lighting destructible meshes ......................................... ......................................... 3-39

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

4

Chapter 4

Precomputing 4.1

Chapter 5

Material properties and using indirect specular 5.1 5.2

Chapter 6

UE4 Integration 3.08 Release Notes ................................... ................................... 9-68 UE4 Integration 3.07 Release Notes ................................... ................................... 9-69

Revisions A.1

ARM 100836_0308_00_en

Third party licences ................................................ ................................................ 8-66

Release notes 9.1 9.2

Appendix A

Troubleshooting and support ......................................... ......................................... 7-61 Debugging with Enlighten tools ....................................... ....................................... 7-62 Number of base pass pixel shader texture and sampler slots required by Enlighten .... .................................................................................................................................. 7-64

Third party licences 8.1

Chapter 9

Visualizations and statistics .......................................... .......................................... 6-51 Precomputed data storage ...................................................................................... 6-56 Removing Enlighten data from packages ................................................................ 6-59

Troubleshooting and debugging 7.1 7.2 7.3

Chapter 8

Material properties ................................................. ................................................. 5-46 Using indirect specular ............................................................................................ 5-49

Visualizations, statistics, and data 6.1 6.2 6.3

Chapter 7

Precomputing your level .......................................................................................... 4-43

Revisions ................................................... ................................................... Appx-A-71

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

5

Preface

This preface introduces the Enlighten™ 3.08 UE4 integration . It contains the following: • About this book on page 7. • Feedback on page 9.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6

Preface About this book

About this book This is a guide to integrating Enlighten in UE4. Product revision status The rmpn identifier indicates the revision status of the product described in this book, for example, r1p2, where: rm Identifies the major revision of the product, for example, r1. pn Identifies the minor revision or modification status of the product, for example, p2. Intended audience This resource is for evaluators, lighting artists, and users of Enlighten. Using this book This book is organized into the following chapters: Chapter 1 Introduction About Enlighten, a real-time global illumination solution that dynamically simulates indirect lighting. Chapter 2 Before precomputing and Enlighten settings Before you preomcpute you must configure Enlighten for your geometry. Enlighten is configurable using world and system settings. Chapter 3 Lighting geometries with Enlighten Enlighten is configrable in UE4 to light static geometries, movable actors and destructible meshes.Enlighten is configrable in UE4 to light static geometries, movable actors and destructible meshes. Chapter 4 Precomputing The Enlighten precompute runs in the background and can be set to precompute all levels or to precompute the current level or selected actors. Chapter 5 Material properties and using indirect specular All materials have Enlghten albedo and emissive proprties that can be configured. Enlighten also provides indirect specualr using UE4 box and sphere reflection captures. Chapter 6 Visualizations, statistics, and data Enlighten has a number of visualization modes for previewing elements of Enlighten. Enlighten also provides access to statistics for Enlighten data. Precomputed data can be moved, duplicated and renamed, and Enlighten data can be removed from packages. Chapter 7 Troubleshooting and debugging Troubleshooting common Enighten issues and debugging with Enlighten tools. Chapter 8 Third party licences The Enlighten SDK uses third party licences. Chapter 9 Release notes Appendix A Revisions This appendix describes the technical changes between released issues of this documentation. Glossary The ARM Glossary is a list of terms used in ARM documentation, together with definitions for those terms. The ARM Glossary does not contain terms that are industry standard unless the ARM meaning differs from the generally accepted meaning. ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

7

Preface About this book

See the ARM Glossary for more information. Typographic conventions italic Introduces special terminology, denotes cross-references, and citations. bold Highlights interface elements, such as menu names. Denotes signal names. Also used for terms in descriptive lists, where appropriate. monospace

Denotes text that you can enter at the keyboard, such as commands, file and program names, and source code. monospace

Denotes a permitted abbreviation for a command or option. You can enter the underlined text instead of the full command or option name. monospace italic

Denotes arguments to monospace text where the argument is to be replaced by a specific value. monospace bold

Denotes language keywords when used outside example code.

Encloses replaceable terms for assembler syntax where they appear in code or code fragments. For example: MRC p15, 0, , , , SMALL CAPITALS

Used in body text for a few terms that have specific technical meanings, that are defined in the ARM glossary. For example, IMPLEMENTATION DEFINED, IMPLEMENTATION SPECIFIC, UNKNOWN, and UNPREDICTABLE. Additional reading ARM publications Other publications

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

8

Preface Feedback

Feedback Feedback on this product If you have any comments or suggestions about this product, contact your supplier and give: • The product name. • The product revision or version. • An explanation with as much information as you can provide. Include symptoms and diagnostic procedures if appropriate. Feedback on content If you have comments on content then send an e-mail to [email protected]. Give: • • • •

The title Enlighten 3.08 UE4 integration . The number ARM 100836_0308_00_en. If applicable, the page number(s) to which your comments refer. A concise explanation of your comments.

ARM also welcomes general suggestions for additions and improvements. Note ARM tests the PDF only in Adobe Acrobat and Acrobat Reader, and cannot guarantee the quality of the represented document when used with any other PDF reader.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

9

Chapter 1 Introduction

About Enlighten, a real-time global illumination solution that dynamically simulates indirect lighting. It contains the following sections: • 1.1 Welcome to Enlighten on page 1-11. • 1.2 How Enlighten works on page 1-12. • 1.3 Installing Enlighten for UE4 on page 1-16.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

1-10

1 Introduction 1.1 Welcome to Enlighten

1.1

Welcome to Enlighten Welcome to Enlighten, a real-time global illumination solution that dynamically simulates indirect lighting. Enlighten allows you to: • Improve your game lighting with high quality realistic global illumination. • See instant feedback on changes for lighting artists, rather than waiting hours for a Lightmass build. • Have the freedom for games designers to develop entirely new gameplay experiences. • No longer work around the limitations of static lighting. Enlighten delivers both improved lighting quality and reduced development cost. Enlighten upgrades the static global illumination provided by Unreal Engine 4 (UE4), generating realtime indirect lighting for the stationary and movable lights in your world. In UE4, you can configure the static geometry and movable actors for use with Enlighten before running the Enlighten Precompute to generate Enlighten runtime data. At runtime, Enlighten uses this data, along with information about light sources and materials, to solve the global illumination. This gives instant indirect lighting updates both in editor and in game, when any aspect of the lighting changes. These images show how Enlighten improves the lighting in an environment. In the left-hand image, a scene is lit with only direct lighting. The middle image only shows the indirect lighting produced by Enlighten, and the right-hand image shows the combination of direct and indirect lighting, producing the final result.

Figure 1-1 Direct lighting, indirect lighting, and the two combined

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

1-11

1 Introduction 1.2 How Enlighten works

1.2

How Enlighten works There are two main parts to Enlighten: The Enlighten Precompute and the Enlighten Runtime. The Enlighten Precompute takes all static geometry as input. It then computes visibility information, and outputs highly compressed run-time data. The Enlighten Runtime takes as input the precomputed Enlighten data, along with the lighting configuration and material information provided by the engine. The Enlighten Runtime solves the Global Illumination and produces three types of output: • Lightmaps • Light Probes • Cube Maps. These Enlighten outputs are used by the renderer to produce the final rendered image. Lightmaps, Light Probes and Cube Maps are widely supported data formats and can be used with any renderer or graphics API. Enlighten Runtime The Enlighten Runtime is designed to run entirely asynchronously on the CPU alongside the main renderer, without blocking rendering. It is generally not necessary to update the indirect lighting at the full frame rate. Decoupling Enlighten updates from the rendering means you can tune performance by trading processing time for latency in the lighting. This is particularly relevant when the renderer is already pushing the GPU to its limit to hit a fixed framerate target, such as 60FPS on consoles, or even 90FPS in VR/AR applications. Workflow Enlighten offers complete control over all aspects of scene configuration, but in practice most of the configuration process is automated. Before running the Enlighten precompute, you can change the lightmap resolution, Light Probe density and the location of cubemaps used for reflections. After the precompute, the lighting artist can iterate on the lighting setup with instant feedback on their changes. The artist now has the freedom to tweak and experiment with the lighting until the perfect result is achieved. Enlighten Lightmaps Enlighten can generate Lightmap UV coordinates automatically, and provides various tools to help produce efficient UV layouts. This means that instead of specifying a fixed size lightmap for each mesh, the artist can specify the size of a light map pixel in world units and the UVs will be automatically adjusted. Enlighten Lightmaps contain only low frequency indirect lighting and require much lower resolution than traditional baked lightmaps. A typical scene might use a resolution of one pixel per metre. The runtime cost of Enlighten Lightmaps increases in proportion with the number of pixels updated. Changing the pixel size allows you to choose the right trade off between performance and quality. The following image shows a mesh that is identified for lightmap lighting.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

1-12

1 Introduction 1.2 How Enlighten works

Figure 1-2 Original mesh

Charts are identified from UV islands, as shown in this image.

Figure 1-3 Chart identification

Each chart requires additional padding space in the Lightmap. A high number of small charts can result in an inefficient use of Lightmap space. The Enlighten automatic UV generation tools produce efficient UV layouts by intelligently merging charts together, as shown in this image.

Figure 1-4 Chart merging

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

1-13

1 Introduction 1.2 How Enlighten works

The following image shows the way Enlighten Lightmaps are mapped to surfaces in a scene. Each UV chart is shown in a different colour. The Lightmap resolution is much lower than would typically be required for static lightmap baking, but is more than enough for high quality indirect lighting. The charts for the picture frame and the wall have been merged so that they share the same lighting.

Figure 1-5 Enlighten lightmaps mapped to surfaces in a scene.

Enlighten Probes Enlighten Light Probes provide lighting both for moving objects and for meshes which it is difficult to produce efficient Lightmap UVs. For example, very complex meshes such as trees would require many small UV charts, and can be more efficiently lit using Light Probes. Enlighten provides tools to completely automate the process of placing Light Probes. The user specifies the volume of space in which objects may move, along with the desired probe spacing.

Figure 1-6 A scene with automatic probe placement. ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

1-14

1 Introduction 1.2 How Enlighten works

The above image shows the results of the automatic probe placement. There is a lower density of probes in the middle of the room, because the frequency of the variation of the lighting generally reduces as the distance from a surface increases. The Enlighten runtime efficiently determines the nearby probes to sample from, based on the location of each mesh. Enlighten cube maps Enlighten Cube Maps capture the scene from a given location for use in reflections. This technique is commonly known as local Image Based Lighting. Enlighten Cube Maps are manually placed in the scene. The engine requires specification of a volume, typically a box or sphere, within which objects take specular reflections from the Cube Map.

Figure 1-7 A cube map placed in a scene.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

1-15

1 Introduction 1.3 Installing Enlighten for UE4

1.3

Installing Enlighten for UE4 Instructions for installing Enlighten for UE4, and a description of the distribution files. This is an integration of Enlighten SDK 3.08 into Unreal Engine 4.13.0. The PS4 SDK 3.500 and the Xbox One August 2016 XDK are supported for 4.13.0. The Enlighten UE4 integration is distributed as a collection of .zip files containing changes and additions to the base UE4 build. Not all of these files may be required, depending on your circumstances. To install Enlighten: 1. Install an unmodified copy of a supported version of UE4. This must be a major release, not a hotfix. 2. Download the required Enlighten .zip.zip files from https://downloads.geomerics.com. For a reminder of your login details, send an email to [email protected]. 3. Extract the Enlighten .zip files on top of your unmodified copy of UE4, overwriting files where necessary. 4. Delete the Engine/Intermediate folder, if it exists. 5. Run the GenerateProjectFiles.bat file. 6. Rebuild at minimum the following set of projects: a. UnrealFrontend Development Win64. b. UnrealLightmass Development Win64. c. ShaderCompileWorker Development Win64. d. UE4 Development Editor Win64. The distribution .zip files are named as follows: EnlightenUE4-[Version][UE4 Version][Type].zip Where: • [Version] is the version of the build. This is composed of: — A major version. — The letter R denoting the initial release or Pn for patch n. — The internal build number that uniquely identifies the build. • [UE4 Version] is the UE4 version to which this build should be applied. • [Type] can be either: — Base: Required. This zip folder contains the integration source files, the Enlighten libraries, the precompute executables, and various other support files. — Samples: This zip contains maps and assets demonstrating Enlighten and the integration, contained inEnlightenSamples.uproject. — Console specific files: Extra files required to run on various consoles. These files are available to you where the appropriate NDAs are in place. For example, EnlightenUE4-3.08.R.12345-QA_BUILD_4.13.0-Base.zip would contain the Base files for the initial release of Enlighten UE4 version 3.08 integrated with UE4 version 4.13.0.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

1-16

Chapter 2 Before precomputing and Enlighten settings

Before you preomcpute you must configure Enlighten for your geometry. Enlighten is configurable using world and system settings. It contains the following sections: • 2.1 Before you precompute on page 2-18. • 2.2 Enlighten world settings on page 2-20. • 2.3 Enlighten system settings on page 2-24.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2-17

2 Before precomputing and Enlighten settings 2.1 Before you precompute

2.1

Before you precompute Applying Enlighten settings for your geometry to optimise global illumination. Before precomputing your level for use with Enlighten, spend a few minutes to apply the appropriate Enlighten settings for your geometry. With appropriate Enlighten settings, a typical map will take only minutes to precompute. Note You must enable the Realtime view mode to see the correct Enlighten lighting result. To do this, select Viewport Options > Realtime.

Lighting modes and how to choose them Enlighten uses lighting modes set on static meshes to govern how meshes receive and/or contribute radiosity. By default, each static mesh is lit using Enlighten lightmaps, and both receives and contributes radiosity (the Contribute Lightmap lighting mode). This lighting mode is appropriate for large objects that need to bounce a significant amount of light. Each object using this lighting mode must be processed during the precompute. This increases precompute time and has an associated runtime cost proportional to the number of Enlighten lightmap pixels assigned to the mesh. For complex foliage meshes, the Contribute Probe mode blocks and bounces indirect light in the same way as Contribute Lightmap, but receives indirect lighting as if the mesh was lit using the Probe mode, the foliage is lit with indirect light taken from nearby probes, but will contribute indirect light on the basis of its target mesh. Meshes using the Detail lighting mode do not contribute to radiosity, but are automatically assigned to share the radiosity of nearby contributing geometry. This lighting mode is appropriate for small complex static meshes that are very close to a floor or wall, such as ornaments on a wall or toys on a floor. Because these meshes share the same radiosity as the nearby wall or floor, they will not receive light bounced from the wall or floor that they are assigned to. Meshes using the Detail lighting mode do not contribute to radiosity, but receive radiosity from nearby light probes. This lighting mode is appropriate for small complex static meshes that are not close to a wall or floor, such as small items of furniture. Because these meshes are lit by probes, they will receive light bounced from all nearby contributing geometry. This image shows the Enlighten lighting modes in the Properties tab.

Figure 2-1 Enlighten lighting modes

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2-18

2 Before precomputing and Enlighten settings 2.1 Before you precompute

Quality modes and how to choose them The Enlighten quality settings determine the number of lightmap pixels with which Contribute Lightmap geometry will be lit. This has a direct impact on your precompute time and runtime performance, so it's important to use appropriate quality modes for your meshes. You can override the quality setting for each mesh as described in [Lighting Static geometry], but by default the meshes in each level will use the level-default quality found in the Enlighten System Container (select Scene Outliner > EnlightenSystemContainer). This defaults to High, which is only appropriate for meshes that can be seen up close by the player. Meshes that cannot be seen up close should be set to Medium, and distant meshes should be set to Low. Using the appropriate quality setting for a mesh can significantly reduce the precompute time, along with the runtime memory and processing cost. For a large Landscape, the Medium quality setting is generally appropriate. You can set the quality for Landscape in a level using the Landscape Quality setting in the Enlighten System Container for that level.

Figure 2-2 Enlighten lighting modes options

Related information 3.3 Lighting static geometry on page 3-29.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2-19

2 Before precomputing and Enlighten settings 2.2 Enlighten world settings

2.2

Enlighten world settings The Enlighten UE4 integration adds extra settings to your world and geometry, to configure how it is used by Enlighten. These settings are used to determine the method Enlighten uses to generate radiosity for different objects, and with what level of resolution. To set the Enlighten world properties for your level, select World Settings> Enlighten > Enlighten Settings.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2-20

2 Before precomputing and Enlighten settings 2.2 Enlighten world settings

Figure 2-3 Enlighten world settings

The following lightmap resolution settings can be set:

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2-21

2 Before precomputing and Enlighten settings 2.2 Enlighten world settings

Enlighten quality levels With Enlighten, meshes are assigned a quality setting that describes the quality and cost of the Enlighten lighting. The quality setting is used to identify close, nearby, and distant geometry. Each geometry distance type is lit with a level of resolution that is appropriate to its visibility to the player. There are four default Enlighten quality levels to choose from. You can optimize the settings of each quality level if appropriate: • Background • Low • Medium • High The following system parameters can be modified in the Enlighten world settings: Output pixel size The size of a pixel in the Enlighten output texture. Cluster Size The size of a lighting cluster in the Enlighten input. Samples Per Cluster The number of lighting samples that are calculated per cluster in an Enlighten lighting cluster. This value must be a multiple of 4. Radiosity Budget The number of bytes per output pixel used to store radiosity data. Lowering this number reduces the file size and radiosity quality. Increasing this number increases the file size and quality. This value has a near-linear effect on runtime performance and memory. • Minimum value: 16. This value results in poor quality. • Maximum value: 512. This value is not recommended. The following probe parameters can be set: Radiosity Budget The number of bytes per output pixel that are used to store radiosity data. Increasing or lowering this number has a near-linear effect on file size, memory usage and runtime performance. • Minimum value: 16. • Maximum value: 512. Additional Enlighten world properties that can be set: Ideal System Size Desired size for each system lightmap. Specified as a dimension, so a value of 64 means a 64x64 lightmap. The actual size of systems will not equal this exactly. Enlighten Static Albedo Boost Scales the Enlighten static albedo contribution of all materials in the scene. Enlighten Static Emissive Boost Scales the Enlighten static emissive contribution of all materials in the scene. Secondary Bounce Scale Scale to apply to the feedback step that adds the radiosity results back into the input to provide secondary bounce light.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2-22

2 Before precomputing and Enlighten settings 2.2 Enlighten world settings

Dependency Included System Distance Systems within this distance will be used to occlude other systems when calculating dependencies. If left at the default of 0, all systems in the world will be considered as occluders when calculating dependencies. In general, this gives the most accurate result and doesn't significantly impact the precompute time. If a non-zero value is specified, only systems within the specified distance of a given system will be considered as occluders when calculating dependencies. In very large maps, it may be possible to reduce the precompute time by choosing an appropriate value. Care must be taken when choosing this value, because if the specified value is too small, it may significantly increase the precompute time. Adaptive Probe Grid Spacing The minimum grid spacing of Enlighten probes generated by an Adaptive Probe Volume. Adaptive Probe Error Threshold The error threshold value for adaptive probe placement. A probe will be rejected if it can be substituted by interpolating adjacent probes without introducing an error greater than this value. A value of 0 generates the largest number of probes and therefore gives the highest accuracy, but at the highest runtime cost. Higher values reduce the number of probes generated. Disable Enlighten Disables Enlighten for all levels. After modifying this setting, run a precompute to apply the change. This affects all Enlighten entities, including probe sets, cubemaps and detail meshes. To instead disable Enlighten for a single level, enable the Disable Enlighten option in the EnlightenSystemContainer for your scene. Disable Auto UV Simplification Globally disable Auto UV simplification. Enable Probe Interpolation Visibility When enabled, visibility information is used in probe interpolation, which can prevent objects from taking light from the wrong side of walls. Disable this option if you can see popping where the lighting should be continuous. Enable Automatic Probe Placement When checked, probes are automatically placed near static geometry in the scene that requires them. Minimum Landscape LOD Count The minimum number of levels of detail to generate for landscapes which have LOD enabled. Landscape LODDistance The distance at which landscape lighting will begin the transition to a lower level of detail. Lightmap Levels Of Detail The number of Lightmap LODs for Contribute Lightmap meshes. An Enlighten precompute is required after changing this setting. The value of Lightmap LODDistance must also be non-zero to enable this feature. Lightmap LODDistance The distance at which lightmap lighting will begin the transition to a lower level of detail. Probe LODDistance The distance at which probe lighting will begin the transition to a lower level of detail. The default value of 0.0 disables probe LOD. Radiosity Sample Rate An advanced setting, which controls the number of rays to cast for computing irradiance form factors. Generally, a setting of Medium is suitable for normal use. Higher settings can alleviate noise issues, but significantly increase precompute time.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2-23

2 Before precomputing and Enlighten settings 2.3 Enlighten system settings

2.3

Enlighten system settings The Enlighten system container provides settings that are applied to the systems in your level. To access the Enlighten system container settings, select EnlightenSystemContainer in the Scene Outliner. The following image shows the Enlighten system container settings.

Figure 2-4 Enlighten system container settings

The Enlighten system container contains the following settings: Default Quality The default quality for the primitives in this level. Default Update Method The default update method for the primitives in this level. BSPQuality The quality level to use for BSP in the level. BSPQuality The quality level to use for BSP in the level. BSPUpdate Method The update method to use for BSP in the level. Landscape quality The quality level to use for landscape in the level. Landscape Update Method The update method to use for landscape in the level. Adaptive Probe Resolution The resolution of the probe data created for actors in this level, specified relative to the Adaptive Probe Grid Spacing setting found in *World Settings*.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2-24

2 Before precomputing and Enlighten settings 2.3 Enlighten system settings

Disable Enlighten When checked, no objects in the level will contribute Enlighten lighting. You can instead disable Enlighten for the entire scene using *World Settings > Enlighten > Disable Enlighten*. Allow Gpu Input Shadowing When checked, Enlighten systems in this container can use GPU shadowing to compute input light visibility. If this isn't needed, you can disable it prevent the required data being loaded, thus saving memory. Precompute Data This setting determines whether the Enlighten precompute data is stored in the level package or in an external asset.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

2-25

Chapter 3 Lighting geometries with Enlighten

Enlighten is configrable in UE4 to light static geometries, movable actors and destructible meshes.Enlighten is configrable in UE4 to light static geometries, movable actors and destructible meshes. It contains the following sections: • 3.1 Setting up sky lighting on page 3-27. • 3.2 Relighting an existing scene with Enlighten on page 3-28. • 3.3 Lighting static geometry on page 3-29. • 3.4 Enlighten light properties on page 3-33. • 3.5 Supplying simplified UVs on page 3-34. • 3.6 Lighting movable actors on page 3-36. • 3.7 Lighting destructible meshes on page 3-39.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-26

3 Lighting geometries with Enlighten 3.1 Setting up sky lighting

3.1

Setting up sky lighting How to setup sky lighting by defining the cubemap texture, brightness and color of the EnlightenTextureEnvironment actor. Sky lighting is handled by the EnlightenTextureEnvironment actor. More than one environment can be added to a scene, and the contribution from each environment will be summed together. Enlighten environments are also included in reflection rendering, along with ambient cubemaps. To add sky lighting to your scene, open Window > Class Viewer and drag EnlightenTextureEnvironment into your scene. The following image shows the Class Viewer.

Figure 3-1 Class viewer

Configure the cubemap for the environment and set its brightness in the Details window for the EnlightenTextureEnvironment, shown in the following image. Environment brightness can also be scripted using Blueprints. You can rotate the cubemap texture in the editor, but the rotation cannot be modified using a blueprint.

Figure 3-2 The EnlightenTextureEnvironment settings dialog

Set the environment color with the EnvironmentColor property of the EnlightenTextureEnvironment. The environment color can also be set by the Blueprint function SetColor. The EnvironmentColor property is multiplied with the brightness and texture to produce the final output. ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-27

3 Lighting geometries with Enlighten 3.2 Relighting an existing scene with Enlighten

3.2

Relighting an existing scene with Enlighten How to remove Lightmass lighting in an existing map so that Enlighten can be applied. It is possible to use Enlighten dynamic indirect lighting in an existing map that has been authored with Lightmass static lighting. Examples include the sample maps shipped with Unreal Engine such as Reflections Subway and Realistic Rendering. Movable and Stationary lights contribute to Enlighten dynamic indirect lighting. Static and Stationary lights are baked into Lightmass lightmaps and shadowmaps respectively. If you choose to make all the lights Movable, all Lightmass lightmaps and shadowmaps will be removed the next time you build Lightmass. To remove Lightmass lighting: 1. Ensure that all lights in the scene are set to Movable. 2. In World Settings > Lightmass Settings, ensure that Environment Colour is black and AO is disabled. 3. Build Lighting Only. The Lightmass build completes quickly. You can verify that your map is using Enlighten indirect lighting exclusively by toggling Enlighten on and off. To do this, select Show > Lighting Features > Enlighten Indirect Lighting.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-28

3 Lighting geometries with Enlighten 3.3 Lighting static geometry

3.3

Lighting static geometry Enlighten considers an actor to be static if it has Mobility set to Static, or if it has Light As If Static enabled in advanced Lightmass properties. The Enlighten UE4 integration provides additional properties for static actors. This allows to you set the appropriate Enlighten lighting mode for actors These settings are used to determine the how an actor is lit by Enlighten and how it contributes to indirect lighting in the scene. Setting the lighting mode for a static mesh The lighting mode for a static mesh can be set from either: • The Details window for the mesh. This is the most convenient method. • Within the StaticMesh Editor. • Using keyboard shortcut. You can define the keyboard shortcut within Editor Preferences > Keyboard Shortcuts. Setting the lighting mode from the Details window Use either the Set Lighting Mode On Base Mesh or Set Lighting Mode Per-instance drop-down selections to affect the static mesh itself or the selected instance of the mesh, respectively.

Figure 3-3 Lighting mode options menu

For both Set Lighting Mode On Base Mesh and Set Lighting Mode Per-instance drop-downs, the following options are available: Disabled The mesh is not seen by Enlighten.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-29

3 Lighting geometries with Enlighten 3.3 Lighting static geometry

Contribute Lightmap The mesh receives and contributes radiosity. This is best for larger objects that contribute a significant amount of radiosity to the scene. Contribute Probe The mesh blocks and bounces indirect light in the same way as Contribute Lightmap, but receives indirect lighting as if it was lit using Probe. This mode is suitable for complex foliage meshes with simplified Enlighten target LODs; the foliage will be lit with indirect light taken from nearby probes, but will contribute indirect light on the basis of its target mesh. Detail The mesh receives radiosity based on the closest mesh set to Contribute Lightmap. The mesh does not contribute radiosity. This is best for small, complex objects close to larger geometry, such as small items on a floor or wall. Probe The mesh is lit using a light probes in the same way as dynamic objects. See Lighting Movable actors on page 3-36 for more information about using light probes. The object receives, but does not contribute radiosity. As well as being used for dynamic objects this also very useful for small objects, or long, thin objects such as poles or trees. Until you precompute your level, new meshes with Contribute Lightmap or Detail lighting modes (including Foliage) take their indirect lighting from nearby probes, or from the Enlighten Texture Environment. Overriding the lighting settings for a static mesh actor

Figure 3-4 Overriding lighting mode dropdown menu

By default, meshes use the lighting mode from the static mesh asset, but you can override this for each instance of a mesh. 1. Select the mesh in the viewport. 2. In the Details window: a. Check Enlighten > Override Lighting Mode to enable the Lighting Mode Override drop-down list. b. Select the type of lighting to use from Lighting Mode Override. When the lighting mode is Contribute Lightmap, the Enlighten quality and update method can also be overridden: The Enlighten Quality may be: • • • •

Low Medium High Use Default

Lower quality is more appropriate for distant or unimportant objects, and is vital for Landscape.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-30

3 Lighting geometries with Enlighten 3.3 Lighting static geometry

When Use Default is selected, the instance uses the Enlighten quality set on the base mesh. If the base mesh is also set to Use Default then the default setting for the level is applied. TheEnlighten Update Method may be: • Dynamic. Enlighten generates dynamic radiosity at runtime. • Static. Enlighten lighting does not change at runtime; the lighting in this area of your map appears as it did when the map was last saved. This saves memory and CPU, and is ideal for areas in which there are no moving light sources. • Use Default. The mesh uses the default set for the level in the Enlighten system container. Select Scene Outliner > EnlightenSystemContainer. The Enable Dynamic Transmittance and Enlighten Transmittance properties control the way indirect light is transmitted through a static mesh actor. This is used to simulate lighting destructible meshes of static geometry. Probe-lit static meshes have an additional option, Enlighten Adaptive Probe Resolution. This controls the resolution of the adaptively-placed probes around that mesh. When the value is left as the default (Use Level Default) then the resolution is taken from the Enlighten System Container in the containing level. Level of Detail Note The level of detail feature is under development and has a number of limitations, described at the end of this section. In levels with many distant Static Mesh actors using the Contribute Lightmap lighting mode the Enlighten update cost can be reduced significantly using Lightmap LOD. The reduction in cost is achieved by generating a series of Enlighten LODs with decreasing lightmap resolution, and using the lightmap of the appropriate resolution based on the distance from the camera. To enable this feature for all static meshes in the world, set the Lightmap LOD Count property found in to a number greater than one. After running the Enlighten precompute, the distance from the camera at which the rendered Enlighten lightmap LOD will start to decrease can be controlled using the Lightmap LOD Distance property. The default value of zero will result in the highest LOD being rendered at all distances. Note When using this feature in combination with mesh LOD, when the Enlighten lightmap LOD chosen is not the highest, the lowest mesh LOD will always be rendered. Also, the transition between Enlighten lightmap LOD levels is not currently smoothly blended and can result in a visible pop.

Support for other geometry types Enlighten also supports BSP, Decals, Foliage and Landscape splines. Foliage Foliage instances have similar Enlighten settings to StaticMesh actors, which can be viewed and changed within the Foliage tool. There are some some minor differences compared to StaticMeshes: • The Contribute Lightmap lighting mode is unavailable for Foliage. • The Enlighten Probe Sample Method property for Foliage defaults to Force Single.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-31

3 Lighting geometries with Enlighten 3.3 Lighting static geometry

Figure 3-5 Foliage instance mesh settings

Landscape splines Landscape splines are supported, and are always treated as detail meshes. After a precompute, Landscape splines pick up their indirect lighting from the Landscape onto which they are drawn.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-32

3 Lighting geometries with Enlighten 3.4 Enlighten light properties

3.4

Enlighten light properties Directional, spot, and point lights have extra Enlighten settings. These Enlighten settings are from the Details window of the lights. You can determine the colour saturation of radiosity using the Enlighten Saturation slider. A value of 0 results in complete desaturation. If you select Enlighten Only, radiosity will be generated from this light, but there will be no direct lighting. The light will not be seen by Lightmass.

Figure 3-6 Enlighten saturation in the light details window

Cast Dynamic Enlighten Shadows Cast Dynamic Enlighten Shadows operates on movable spotlights only, and causes the spotlight to use GPU shadowing to provide visibility information for input lighting. This can prevent light leaking, and is especially noticeable when light hits a wall in front of another wall, such as an adjacent room. If you don't need this feature, you can save memory by disabling it for a level by unchecking Enlighten Settings > Allow Gpu Input Shadowing in the Details window for the EnlightenSystemContainer. The data required to support this feature is then not loaded at runtime. Note that you won't see correct results when a light with Cast Dynamic Enlighten Shadows enabled affects a system with Allow Gpu Input Shadowing disabled. You can use Show > Enlighten > Enlighten Duster Visibility to determine the visibility of the currently-selected or last-selected light.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-33

3 Lighting geometries with Enlighten 3.5 Supplying simplified UVs

3.5

Supplying simplified UVs Meshes lit using the Contribute Lightmap lighting mode are allocated space in Enlighten lightmaps based on the Enlighten UVs of the mesh. The Enlighten UVs of a mesh determine the shape and size of the Enlighten lightmap pixels, and the way the mesh faces are grouped into Enlighten charts. The Enlighten UVs control the number of lightmap pixels required for the mesh, and whether the boundary between two faces will have a hard or soft edge in the lighting. There are a few different ways to provide good Enlighten UVs for a mesh. Enlighten's Auto UVs simplification feature produces good UVs in most cases, but in some cases you may want to have full control over the UVs. In this scenario you can either generate simplified UVs via mesh projection using a Target mesh, or use a specified Lightmap UV channel.

Figure 3-7 Enlighten settings in the StaticMesh editor

Adjusting Auto UVs settings By default, Enlighten automatically generates simplified UVs for a mesh. Enlighten Auto UVs settings for a mesh can be tweaked in the StaticMesh Editor. You can also disable Auto UVs for the entire map in World Settings > Enlighten. In the StaticMesh Editor, three Simplification Mode settings are available: EAUM Automatic This is the default setting. Automatically generated UVs are only used if they are better than the existing UVs. EAUM Override Automatically generated UVs are always used. UVs generated from a target mesh or specified UV channel are ignored. EAUM Disable The existing UVs are always used. Use this to force the use of UVs generated from a target mesh or specified UV channel. After changing Auto UV settings, you can run [Enlighten Parameterize|Precomputing your level] and use the Enlighten Charts view to visualise the generated Enlighten UVs. Further settings are available for fine-tuning the Auto UVs behaviour according to the Auto UVs algorithm. Geomerics does not recommend that you change these settings. For assistance, contact Geomerics support. ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-34

3 Lighting geometries with Enlighten 3.5 Supplying simplified UVs

Max Distance The maximum distance allowed between input charts for them to be considered for merging. Specified in units of the Output Pixel Size. Max Initial Normal Deviation The maximum angular deviation in degrees allowed between input charts for them to be considered candidates for projection plane creation. Max General Normal Deviation The maximum angular deviation in degrees allowed between input charts and projection planes. Expansion Factor The bounding box expansion when detecting which input charts overlap. Significant Area Ratio The ratio of the chart area within which normals point at more than 90 degrees from the chart principal normal to the area of the chart above which the chart is considered to be curved. Also a ratio of the chart area to the area of the merged group below which the chart is considered insignificant. Using a target mesh LOD You can explicitly select an existing LOD to be used as a target mesh, via the Enlighten Target Lod setting in the StaticMesh Editor. Use the default setting of -1 to leave the target mesh LOD unspecified. Check Use Box Target Mesh to use a basic box-shaped mesh as the target mesh. Specifying an Enlighten UV channel Enlighten uses the UV channel specified in the Light Map UV Index property of the mesh in the StaticMesh Editor. When a target mesh is present, Enlighten also uses this UV channel when performing mesh projection. Lighting objects using larger nearby geometry Meshes using the Detail lighting mode automatically obtain their UVs by mesh projection onto nearby contributing geometry. The best target mesh for projection is chosen automatically. This method is appropriate for small objects on a larger, flat surface such as a wall or floor. Creating a dedicated target mesh If you need to light objects in the Contribute Lightmap mode, but you find that Auto UVs doesn't give you the results you want and you don't have a suitable low-detail LOD, another option is to author a dedicated target mesh. When authoring a mesh, you can include a dedicated Enlighten target mesh that will never be rendered. In the exported FBX, name the target mesh with the same name as the render mesh, with a prefix ENL\_ (for example ENL_RenderMeshName). This is similar to the workflow for UE4 collision meshes.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-35

3 Lighting geometries with Enlighten 3.6 Lighting movable actors

3.6

Lighting movable actors Movable actors are lit using light probes. These are points in space from where indirect lighting is computed. To ensure that Movable actors are lit correctly, you must place probe volume actors that cover all of the regions where Movable actors will be positioned during gameplay. There are two types of probe volume to choose between, Adaptive Probe Volume and regular Probe Volume. Geomerics recommends using the Adaptive Probe Volume exclusively, because it makes probe placement faster. As well as being required for lighting movable actors, probe lighting is also appropriate for some static actors, such as small objects or long, thin objects like poles or trees. Note Mixing the two types of probe volume can result in incorrect lighting. For best results, use only one type of probe volume.

Sampling The process of reading light from nearby probes is known as sampling. There are two sampling methods with different performance and quality characteristics. Per-object sampling This method allocates each object one or more samples. Taking a single sample is appropriate for small objects. Large objects are more smoothly lit when assigned multiple samples, although this quality comes with some cost to performance. The cost of per-object sampling scales with the number of probelit objects in the scene and so gives better performance when there are few probe-lit meshes, but worse performance when there are lots. Per-pixel sampling This method takes a separate sample at each screen-space pixel and so generally gives better lighting quality, especially in areas of varying lighting. The cost of per-pixel sampling does not scale with the number of probe-lit objects and so gives better performance when there are lots of probe-lit meshes. Per-pixel sampling does not make use of visibility information and so may lead to light leaks.Per-pixel sampling does not work with regular Enlighten Probe Volumes. Please use Enlighten Adaptive Probe Volumes instead. Settings The Enlighten project setting Available Probe Sample Methods determines which of the two sampling methods (per-object and per-pixel) are available for use in the project. Choosing Both gives the flexibility of choosing a different sampling method for each probe-lit mesh but adds an overhead. When selecting Both, each probe-lit mesh (and foliage type) has an extra property, Probe Sample Method, which determines the method to use for that object. When using per-object sampling on an object, there is a further decision as to the number of sample points to allocate for the object. By default, the decision whether to use single or multiple samples is based on the radius of the object's bounding sphere. If this is smaller than 400 world units then a single sample is used; if it is larger then multiple samples are used. This threshold can be modified by setting the en.EnlightenLargeObjectThreshold console variable. You can also force single or multiple probes by specifying ForceSingle or ForceMultiple respectively for the Per-object Probe Sample Count property. The default of UseBounds indicates the size-based determination method. Choosing manual or adaptive probe volumes For probe-lit objects to receive light, you must place probe volumes in any area of the level where probelit actors appear during gameplay. The options for probe volume are: Enlighten Adaptive Probe ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-36

3 Lighting geometries with Enlighten 3.6 Lighting movable actors

Volume. The adaptive probe volumes in a level define the combined volume in which light probes will be automatically positioned. It is generally efficient to allow these volumes to significantly overlap other adaptive probe volumes. This method requires much less authoring time. Enlighten Probe Volume. The box specified by each manual probe volume defines the placement of a uniform grid of light probes. For efficiency, these volumes should not significantly overlap other probe volumes. This gives direct control of where probes are placed, but requires more authoring time. Automatically placed probes Light probes are automatically placed around static actors by the Probe or Contribute Probe lighting mode. The resolution at which probes are automatically placed is controlled by the Adaptive Probe Resolution property. This property defines the default resolution for all actors in a level, and is located in the Enlighten System Container for the level. The value of this property can be overridden using the Adaptive Probe Resolution property on an actor or Foliage Type. Note To place probes manually using regular Probe Volume actors, disable the Enable Automatic Probe Placement option in World Settings. This prevent automatic placement of probes for Static actors.

Placing adaptive probe volumes To place an adaptive probe volume, perform the following tasks: 1. Click Modes > Volumes and drag the Enlighten Adaptive Probe Volume function into your scene, as shown in the image. 2. Use the Geometry Editing tools to adjust the shape and size of the volume. 3. Add an appropriate number of volumes to cover your region.

Figure 3-8 Enlighten adaptive probe volume

To avoid creating unnecessary probes, avoid covering regions in which Movable actors are not permitted. Probes are automatically created at the next precompute, and they are shown in the viewport when you select Show > Enlighten> Enlighten Probe Positions.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-37

3 Lighting geometries with Enlighten 3.6 Lighting movable actors

Placing manual probe volumes and adjusting probe density To place a manual probe volume, perform the following tasks: 1. 2. 3. 4.

Open the Class Viewer by selecting Window > Developer Tools > Class Viewer. Locate the EnlightenProbeVolume function, as shown in the image. Drag the EnlightenProbeVolume function into the viewport. Adjust the size of the volume in the Details window.

Figure 3-9 Enlighten probe volume in the class viewer

To adjust the density of probes: 1. Select the probe volume in the viewport. 2. In the DetailsDetails window, adjust the three values under Enlighten Probe Volume > Probe Spacing. These values represent the spacing across the X, Y and Z dimensions. 3. You can visualize probes in a manual probe volume by clicking the probe volume, or selecting Show > Enlighten > Enlighten Probe Positions. Streaming levels Probe volumes can be placed in any streaming level. Enlighten only samples from probe volumes that are within currently loaded streaming levels. To avoid significantly overlapping Adaptive Probe Volumes between streaming levels, split probe volumes at the boundary between streaming levels.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-38

3 Lighting geometries with Enlighten 3.7 Lighting destructible meshes

3.7

Lighting destructible meshes The Enlighten Transmittance properties of the Static Mesh Actor simulate the effect of mesh destruction on indirect lighting. Enlighten Transmittance controls the amount of indirect lighting that appears to pass through a destroyed mesh. A Blueprint function provides control over the Enlighten Transmittance value. This can be used to modify the Enlighten Transmittance at the same time as triggering a separate destruction animation. As an example, with a Blueprint you can simultaneously hide the intact mesh, set its Enlighten Transmittance value to simulate indirect light passing through it, and show a destroyed version of the mesh while triggering its destruction animation. The Enlighten Transmittance value has a range between zero and one. When the value is greater than zero, a proportion of the indirect light arriving at one side of the mesh is emitted at the opposite side. This gives an illusion of indirect light passing through the space occupied by a mesh. When the Enlighten Transmittance value is one, all of the indirect light that arrives at one side of a mesh is emitted from the opposite side. When the value is between zero and one, the light emitted from the opposite side takes on a proportion of the albedo colour of the surface at the point of emission. While a mesh is being destroyed through an animation that breaks it into fragments, setting a value between zero and one gives an illusion of indirect light passing between the fragments. Setting Transmittance for a static mesh actor Set the following Enlighten Transmittance properties of a Static Mesh Actor in the Details window: Enable Dynamic Transmittance This enables modifications to the Transmittance while the game is running. When this is not enabled, changes to the Enlighten Transmittance property have no effect. Enlighten Transmittance This is the proportion of indirect light that is transmitted. This can be changed while the game is running using a Blueprint.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-39

3 Lighting geometries with Enlighten 3.7 Lighting destructible meshes

This image shows the Enlighten Transmittance properties, highlighted in the Details window.

Figure 3-10 Enlighten transmittance settings

Tip Enlighten Transmittance properties are visible when the Lighting Mode property in the Details window is set to either Contributing Lightmap or Contributing Probe.

Controlling Transmittance using a Blueprint You can control the Enlighten Transmittancevalue of a Static Mesh Component while the game is running, by using the Blueprint function Set Enlighten Dynamic Transmittance.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-40

3 Lighting geometries with Enlighten 3.7 Lighting destructible meshes

The following image shows the Set Enlighten Dynamic Transmittance Blueprint function.

Figure 3-11 Set Enlighten Dynamic Transmittance Blueprint function

Note The Enlighten Transmittance value affects only the Enlighten indirect lighting properties of the mesh.

Performance considerations Additional Enlighten light probes are automatically generated for meshes with the Enable Dynamic Transmittance option enabled. To achieve the correct lighting for transmittance there must be a sufficient resolution of probes around the mesh. You must use the Enlighten Adaptive Probe Resolution property to control the resolution of probes that have been placed. Modifying Enlighten Transmittance while your game is running increases the amount of Enlighten computation required. Because of this, Geomerics recommends only using Enable Dynamic Transmittance for meshes that have their Enlighten Transmittance property modified while the game is running.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

3-41

Chapter 4 Precomputing

The Enlighten precompute runs in the background and can be set to precompute all levels or to precompute the current level or selected actors. It contains the following section: • 4.1 Precomputing your level on page 4-43.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

4-42

4 Precomputing 4.1 Precomputing your level

4.1

Precomputing your level The Enlighten precompute takes all static geometry as input and then computes visibility information for generating indirect lighting. Before running the precompute, ensure that the Enlighten settings are appropriately assigned. See Before you precompute on page 2-18. To run a precompute, select Build > Enlighten Precompute. GeoBuildMonitor opens to show the progress of the precompute. Only visible levels in your world are precomputed. This can be a useful method of precomputing a subset of your world.

Figure 4-1 Running a precompute

Note Any geometry that is not included in the precompute, such as actors in hidden levels, will have invalid Enlighten lighting after the precompute completes. The precompute runs in the background, so you can continue to use the editor whilst it is running. However, it should be noted that changes made to the level during the precompute will not affect the results. When the precompute completes, click Apply Now to load the results, or Discard to throw them away, cancelling the build. The results are automatically loaded after ten seconds if you do neither, to avoid holding up unattended builds. Running the Enlighten precompute should take minutes for a typical level that has appropriate Enlighten settings. If yours takes a lot longer, see Troubleshooting and support on page 7-61 for tips on making the precompute faster for your level. ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

4-43

4 Precomputing 4.1 Precomputing your level

The Build > Build Enlighten menu contains several options to customise or limit the Enlighten build. For convenience, your last-used Enlighten partial or export build option will appear in the main Build menu. Partial precomputes Enlighten Precompute performs a precompute for all levels. If you wish to precompute just the current level or selected actors, use the options within the Build > Build Enlighten > Precompute menu. After precomputing just the current level or changing the lighting of a level, the stored Enlighten lighting may not match between levels. A warning will appear upon running a map check when this is the case. To perform a map check, select Build > Map Check For convenience, your last-used Enlighten partial or export build option will appear in the main Build menu. Precompute options By default, Enlighten performs an incremental, distributed precompute. To disable incremental precompute and force a full precompute, you can clean your Enlighten output files using Build > Build Enlighten > Clean Output. To force a local non-distributed precompute, you can check Build > Enlighten Settings > Disable XGE Distribution.

Figure 4-2 Enlighten menu option to disable XGE distribution

Exporting only When debugging, the Parameterize options allow you to perform just the steps of the precompute required to use certain Enlighten visualizations, and the Export Only options allow you to export your scene for use in GeoRadiosity.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

4-44

Chapter 5 Material properties and using indirect specular

All materials have Enlghten albedo and emissive proprties that can be configured. Enlighten also provides indirect specualr using UE4 box and sphere reflection captures. It contains the following sections: • 5.1 Material properties on page 5-46. • 5.2 Using indirect specular on page 5-49.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

5-45

5 Material properties and using indirect specular 5.1 Material properties

5.1

Material properties Each material has Enlighten albedo and emissive colour properties. The albedo colour modulates the colour of the light bounced from a surface, while the emissive colour specifies the colour of light emitted by a surface. These material properties can be either static or dynamic. Changing the colour of a material with static albedo in the game will have no effect. Use the dynamic albedo and emissive material properties to change the colour of a material in the game. Albedo and emissive are independent and may be used in any combination: for example, a material may have a static albedo and a dynamic emissive. These settings can also be overridden for a material instance in the Material Instance Editor. Configuring Enlighten albedo and emissive The properties of albedo and emissive are controlled in the material editor, as shown in this image.

Figure 5-1 Albedo and emissive in the material editor

Albedo In the Material Editor, check Use Dynamic Enlighten Albedo to force the material to use dynamic single colour albedo, as opposed to static automatic albedo. This enables the Dynamic Enlighten Albedo RGBA fields, which determine the albedo colour to use. If Use Dynamic Albedo is not enabled, then the value of Static Albedo Boost determines the scaling factor to apply to the static albedo. Emissive Check Use Dynamic Enlighten Emissive to force the material to use dynamic single colour emissive, as opposed to static automatic emissive. This enables the Dynamic Enlighten Emissive fields, which determine the emissive colour to use.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

5-46

5 Material properties and using indirect specular 5.1 Material properties

To use static automatic emissive derived from the colour of a material, enableUse Static Enlighten Emissive. The Static Emissive Boost field determines the scaling factor to apply to the static emissive. The value of this property is ignored when Use Dynamic Enlighten Emissive is enabled. Disabling automatic albedo updates You can disable automatic updates for materials using static albedo or emissive using Edit > Editor Preferences > Plugins > Enlighten > Disable Automatic Enlighten Static Albedo Updates.

Figure 5-2 Disabling automatic updates

Disabling automatic updates for materials using static albedo or emissive sacrifices lighting accuracy for performance. When checked, albedo and emissive are still updated when: • Saving the map. • Precomputing. • Selecting Build > Update Enlighten Static Albedo. However, albedo and emissive are not updated when materials are modified, which may result in incorrect lighting. We recommend leaving this at the default setting unless you have a specific reason to use it. Backface type and indirect opacity These are material parameters which control how surfaces using the material interact with indirect light. Backface Type determines the way Enlighten interprets the backfaces of these surfaces, and Indirect Opacity determines how much indirect light is reflected by the surface.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

5-47

5 Material properties and using indirect specular 5.1 Material properties

Figure 5-3 Backface type and indirect opacity

Backface Type has a default value of EBT Auto, which causes the backface type to be determined automatically based on the Blend Mode and Two Sided properties of the material. The other values cause Enlighten to interpret backfaces as follows: • EBT Invalid. Any surface that can 'see' the backface is culled. • EBT Black. The backface absorbs all incoming indirect light. • EBT Transparent. The backface is transparent to incoming indirect light. EBT DoubleSided. Both the frontface and backface diffusely transmit 50% of incoming indirect light, and diffusely reflect 50% of incoming indirect light. Indirect Opacity is ignored if Backface Type is EBT Invalid or EBT Black. Otherwise, the value of Indirect Opacity modulates the amount of indirect light reflected by a surface using the material. A value of zero means that the surface will not cast indirect shadows.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

5-48

5 Material properties and using indirect specular 5.2 Using indirect specular

5.2

Using indirect specular Enlighten uses the UE4 box and sphere reflection captures to provide indirect specular, with the key difference being that Enlighten cubemaps are updated dynamically at runtime for real-time glossy reflections. For an example of indirect specular with Enlighten, see the Medusa_Temple demo level included in the UE4 Enlighten Integration distribution. To use Enlighten's real-time indirect specular: 1. Add an Unreal Box or Sphere Reflection Capture 2. In the Details window for the Reflection Capture, enable Enlighten > Use Enlighten as shown in this image.

Figure 5-4 The BoxReflectionCapture options

Changing the cubemap resolution The resolution of all Enlighten cubemaps is determined by a project-wide setting within Project Settings > Plugins > Enlighten. It applies to all reflection capture actors in the project with Use Enlighten set. Cubemap resolution cannot be set per-actor or per-map. After changing this value, you must restart the editor and re-precompute all maps for it to take effect.

Figure 5-5 Cubemap resolution setting

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

5-49

Chapter 6 Visualizations, statistics, and data

Enlighten has a number of visualization modes for previewing elements of Enlighten. Enlighten also provides access to statistics for Enlighten data. Precomputed data can be moved, duplicated and renamed, and Enlighten data can be removed from packages. It contains the following sections: • 6.1 Visualizations and statistics on page 6-51. • 6.2 Precomputed data storage on page 6-56. • 6.3 Removing Enlighten data from packages on page 6-59.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-50

6 Visualizations, statistics, and data 6.1 Visualizations and statistics

6.1

Visualizations and statistics Enlighten includes a range of visualizations and statistics to help debug your level and optimise Enlighten's memory usage. Enlighten viewport visualizations You can access Enlighten visualizations using the Show > Enlighten submenu.

Figure 6-1 Enlighten visualizations menu

The following visualisations are available: Enlighten Charts Displays each Enlighten Lightmap UV Chart in a different and randomly selected colour. Enlighten Charts can only be visualized after running the Enlighten Precompute. Enlighten Cost Visualizes the Enlighten cost of a Contribute Lightmap mesh as a colour. Green indicates that the pixel area used in the Enlighten lightmap is close to the surface area of the mesh in the world. Shades of yellow, orange and red are a sign that the pixel area used in the Enlighten lightmap is very large compared with the surface area in world space. Enlighten Duster Albedo Displays the albedo colour used when computing Enlighten bounce lighting, at multiple sample positions on the surface of the contributing meshes. Use with the Unlit view mode to see accurate colours. Enlighten Duster Lighting Displays the incoming lighting values used when computing Enlighten bounce lighting, at multiple sample positions on the surface of the contributing meshes. Use with the Unlit view mode to see accurate colours. ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-51

6 Visualizations, statistics, and data 6.1 Visualizations and statistics

Enlighten Duster Location Displays the sample positions generated by the Enlighten precompute, in red. Enlighten Duster Visibility Displays the Enlighten shadowing of the current selected or most recent selected light, at multiple sample positions on the surface of the contributing meshes. Shadowing can be enabled for Movable SpotLight actors with the Cast Dynamic Enlighten Shadows property. To see correct shadowing for Stationary SpotLight and PointLight actors, the static lighting must be built using Lightmass. Enlighten Lighting Mode Colours objects based on their lighting mode: • ELM_ContributeLightmap. Orange • ELM_ContributeProbe. Yellow • ELM_DetailMesh. Blue • ELM_Disabled. Grey • ELM_Probe — Static probe-lit meshes: Green — Movable probe-lit meshes: Red Static and Movable probe-lit meshes are shown in different colours. Enlighten Probes are automatically generated for Static probe-lit meshes, but not for Movable probe-lit meshes. Enlighten Probe Positions Visualises the location of Enlighten probes. You can also visualise probes in a volume by clicking on the volume. Enlighten Quality Highlights meshes with EQWD_Low, EQWD_Med and EQWD_High mesh quality modes in orange, green and blue respectively. The colours are desaturated for meshes using the EUMD_Static update method. Enlighten System Dependencies The selected system is shown in green. Its dependencies are shown in blue, and other systems are grey. Enlighten Systems Systems are highlighted in different colours. Enlighten Target Geometry Displays only the meshes that contribute to Enlighten bounce lighting. Highlight Target Backfaces As Enlighten Target Geometry, but colours opaque faces green and invalid faces orange. Opaque faces will absorb or reflect all light. Enlighten lighting information to be deleted in areas that can see invalid faces. Static Mesh Editor Charts Use the Charts toolbar button in the StaticMesh Editor to visualize the charts generated by Enlighten for a mesh.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-52

6 Visualizations, statistics, and data 6.1 Visualizations and statistics

Figure 6-2 Chart projection preview in the StaticMesh Editor

This is useful when iterating on Auto UV settings for a mesh or changing the Output Pixel Size (open Window > Update Enlighten UVs in the StaticMesh Editor and click Apply Changes to refresh the view). If the mesh exceeds the limits set by Enlighten when generating Auto UVs, a message will appear in the Output Log. Enlighten Editor Statistics To view statistics for Enlighten data for the currently loaded map within the editor: 1. Open Statistics by selecting Window > Statistics. 2. In the dropdown menu, select Enlighten Stats. 3. Use the right-hand dropdown menu to switch between selected, current or all objects.

Figure 6-3 Enlighten stats window

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-53

6 Visualizations, statistics, and data 6.1 Visualizations and statistics

Enlighten Runtime Stats Use the following console commands to view statistics for the Enlighten runtime: • stat enlighten \-sortby=Name

Figure 6-4 stat enlighten \-sortby=Name



stat enlightenmem \-sortby=Name

Figure 6-5 stat enlightenmem \-sortby=Name



ARM 100836_0308_00_en

{stat enlightencomplexity \-sortby=Name

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-54

6 Visualizations, statistics, and data 6.1 Visualizations and statistics

Figure 6-6 stat enlightencomplexity \-sortby=Name

Note The runtime statistics are not representative of the Enlighten runtime performance when running in the editor. To obtain representative values, view the statistics when running the Standalone or cooked game build.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-55

6 Visualizations, statistics, and data 6.2 Precomputed data storage

6.2

Precomputed data storage The Enlighten precompute data can be located to allow you to move, duplicate, and rename the data. By default, precomputed Enlighten data is stored in the .umap level file. This data can be moved to a separate .uasset asset file to allow saving Enlighten data without checking out level files. Moving Enlighten data to an asset file 1. Load the map you want to change in the editor. 2. Select the Enlighten System Container actors for each streaming level in the map. 3. In the details window, expand the Enlighten panel, then click Move, followed by To Asset as shown in this image.

Figure 6-7 Selecting Enlighten systems to move to an asset

Enlighten data for the selected Enlighten System Container actors is moved to .uasset files in the same folder as the .umap files for the maps. 4. Select File > Save All to save your changes to the map and the precompute data assets. Warning In UE4, assets behave differently to levels. For example, they are not saved when loading a new level. Take care that all data is saved when necessary.

Restoring Enlighten data back to a level file 1. Load the map you want to change in the editor. 2. Select all the Enlighten System Container actors in the map (one per streaming level). 3. In the details window, click Move, followed by To Level. Unrelated .uasset files are automatically deleted. ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-56

6 Visualizations, statistics, and data 6.2 Precomputed data storage

Figure 6-8 Selecting Enlighten systems to move to a level

4. Select File > Save All to save the map. Locating the Enlighten data for a level You can find the location of the precompute data for a level by selecting its EnlightenSystemContainer actor. The Precompute Data value within the Details window displays either: • The name of the asset containing the Enlighten data, as shown in this image.

Figure 6-9 Name of asset containing Enlighten data



Or In Level, as shown in this image.

Figure 6-10 In level

If the precompute data is stored in an asset, you can use the search button to locate it in the Content Browser. This image shows the search button highlighted in red.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-57

6 Visualizations, statistics, and data 6.2 Precomputed data storage

Figure 6-11 Locating precompute data

Sub-levels When adding a streaming level to the world, if the Enlighten precompute data for the persistent level is stored in an asset, then the precompute data for the added level will be moved to a new .uasset file if necessary. Duplicating levels Duplicating levels (for example, in Windows Explorer) creates multiple levels pointing to the same asset, which produces inconsistent results. To resolve this, move Enlighten data for the duplicated map into the level, then back into an asset file. This creates new assets in the new location. Naming and placement of data assets When moving precompute data to an asset file, the .uasset file appears in the same folder as the .umap file, named _EnlightenData. This naming convention is enforced to ensure that multiple maps do not end up referencing the same asset, which would lead to loss of data. When a map is loaded or a map check is performed, the names and locations of the assets are checked against the naming convention and an option presented to fix any problems by copying the assets to the correct location. When selecting Save As, the name of the map will change, and therefore the correct name and location of the asset will change as well. When the map name changes, a message will appear that gives you the option to move the Enlighten data to match the change. This message is shown in the following image. Selecting Yes will fix the problem. After selecting Yes, re-save the map and the asset.

Figure 6-12 Map name change message

To alter the naming convention or path, edit the code in UEnlightenPrecomputeData::GetAssetName or UEnlightenPrecomputeData::GetAssetPath resp ectively in EnlightenPrecomputeData.h.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-58

6 Visualizations, statistics, and data 6.3 Removing Enlighten data from packages

6.3

Removing Enlighten data from packages To load packages with the UE4 vanilla distribution, Enlighten data must be removed. Removing Enlighten is useful for: • Reporting bugs to Epic, and providing them with assets for replicating the problem. • Verifying whether an outcome can be expected on a vanilla distribution, or if it is specific to the Enlighten integration. A commandlet is a command line program that runs in UE4. To remove Enlighten data from a package, invoke the EnlightenStripEnlightenData commandlet from the command line. This strips Enlighten data from a package and its dependencies. How the EnlightenStripEnlightenData commandlet works You must specify an input package and its project for the EnlightenStripEnlightenData commandlet to search for and locate. Both map and asset packages are supported. All direct and indirect dependencies of the input package that belong to the project are modified to remove Enlighten data. Any dependencies that are engine packages are not modified. The commandlet modifies the package in-place. To keep the original content, make a copy of the project before invoking the command. Ensure that all package files are writeable so that the EnlightenStripEnlightenData commandlet can modify them. Alternatively, use the optional AutoCheckOutPackages argument to automatically checkout a package from source control. When Enlighten data has been removed from a package and its dependencies, some of the dependencies might no longer be dependent on the input package. For example, asset packages that contain Enlighten precompute data will not be referenced by the corresponding map packages when Enlighten data is removed. The commandlet does not attempt to remove these packages. To create a streamlined project that contains packages that are still dependent after Enlighten data has been removed, apply the UE4 editor option Migrate to the stripped package. This moves the stripped package and all of its remaining dependencies to a different project or location. Example code The following example commandlet shows how to remove Enlighten data from a package and its dependencies: -run=EnlightenStripEnlightenData AutoCheckOutPackages

The example commandlet searches for the input package within the specified project. All Enlighten data is removed from the input package and its dependencies. Including the optional AutoCheckOutPackages argument automatically checks out the package files from source control. For most cases, the editor executable is UE4Editor.exe.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

6-59

Chapter 7 Troubleshooting and debugging

Troubleshooting common Enighten issues and debugging with Enlighten tools. It contains the following sections: • 7.1 Troubleshooting and support on page 7-61. • 7.2 Debugging with Enlighten tools on page 7-62. • 7.3 Number of base pass pixel shader texture and sampler slots required by Enlighten on page 7-64.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

7-60

7 Troubleshooting and debugging 7.1 Troubleshooting and support

7.1

Troubleshooting and support Some of the common issues encountered with Enlighten are addressed here. If you have a question that is not answered here, please email mailto:[email protected]. Why is my precompute taking so long? The Enlighten precompute should take minutes on a typical level, depending on the size of your level. Even for very large levels, a distributed precompute should never take more than an hour. If your precompute times are drastically longer: • Make sure you have assigned the appropriate Enlighten lighting mode and quality settings to the static meshes in the level. See 2.1 Before you precompute on page 2-18. • When using Landscape on a large level, break it into smaller components and set the Landscape lighting quality to Medium. See 3.3 Lighting static geometry on page 3-29. • Set the lighting mode for unlit translucent meshes (such as light shafts and water surfaces) to Disabled. See 3.3 Lighting static geometry on page 3-29. • Make sure you haven't increased the Ideal System Size from the default value of 64. Why do I see light leaking through walls? This may be caused by geometry that spans a wall separating dark and light areas of your level, such as floors that span the inside and outside of a building and thus see light from the outside. To avoid this, you can split the floor mesh where it meets the wall. Light leaks can also occur when a movable SpotLight's cone crosses the wall. In this case, the light will contribute to Enlighten bounce lighting even for areas which are in direct shadow. Either enable Cast Dynamic Enlighten Shadows for the SpotLight or ensure that the cone does not cross the wall. Why am I seeing dark or black spots? Dark patches can occur in areas where there are visible Invalid back-faces in the contributing geometry. Use the visualisation Show > Highlight Target Backfaces to see these faces highlighted in orange. • Avoid using the lighting modes Contribute Lightmap and Contribute Probe with open meshes that use materials with an Invalid Enlighten Backface Type0. Either ensure that these meshes are closed, use the Detail, Probe, or Disabled lighting modes. See 5.1 Material properties on page 5-46. • Avoid using the lighting modes Contribute Lightmap and Contribute Probe with meshes that have zero-thickness. Either ensure that these meshes have non-zero thickness, or use the Detail, Probe or Disabled lighting modes. Black or unusual splotchy lighting can also be a result of self-overlapping UVs in meshes. When authoring static meshes for your level, make sure the UV channel specified in the Light Map Coordinate Index does not contain self-overlapping UVs. Why am I seeing seams? Enlighten can prevent seams in the indirect lighting only when meshes are closely aligned along the edge where they meet. To minimise seams, ensure that the lightmap UVs for both meshes are aligned with each other, not at angles or with a large size disparity. Why are decals not lit by Enlighten? This relates to a known UE4 limitation which affects any lighting applied in the base pass, including Lightmass and Enlighten. Epic are working on the issue. For more information, see https://udn.unrealengine.com/questions/163838/decals-not-being-rendered-in-shadows.html.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

7-61

7 Troubleshooting and debugging 7.2 Debugging with Enlighten tools

7.2

Debugging with Enlighten tools Enlighten includes diagnostic tools to help you debug and optimise your use of Enlighten. GeoRadiosity GeoRadiosity is Enlighten's real-time debugging tool. Levels precomputed in UE4 can be loaded into GeoRadiosity to make use of its diagnostic visualisations. The Enlighten UE4 exporter does not export lighting set-ups, materials, or textures. To export your scene from UE4 to GeoRadiosity, select one of the three options in Build > Build Enlighten > Open in GeoRadiosity to export all levels, the current level, or only selected actors, as shown in this image.

Figure 7-1 Exporting from UE4 to GeoRadiosity

You can instead select one of three options in Build > Build Enlighten > Export OnlyExport Only to export the scene to disk without opening it in GeoRadiosity. The Enlighten .scene file is saved in the EnlPrecomp folder within your UE4 folder, and you can open it directly in GeoRadiosity from \Engine\Binaries\ThirdParty\Enlighten\GeoRadiosity.exe. There is further information about GeoRadiosity in our SDK documentation including a tutorial and details of how to automate GeoRadiosity via its Lua interface. Forge Forge is a lighting and material editor that puts Enlighten in the hands of artists and engineers alike. Supplied in the EnlightenSDK_Forge package, Forge contains plugins for Autodesk Max and Maya, to allow seamless connectivity with your existing content. It has a complete Physically Based Shading renderer that shows the full impact of the dynamic global illumination that Enlighten provides. The following image shows a screenshot of Forge.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

7-62

7 Troubleshooting and debugging 7.2 Debugging with Enlighten tools

Figure 7-2 Screenshot of Forge

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

7-63

7 Troubleshooting and debugging 7.3 Number of base pass pixel shader texture and sampler slots required by Enlighten

7.3

Number of base pass pixel shader texture and sampler slots required by Enlighten To help you plan material or shader modifications, it is useful to know how many extra texture and sampler slots are required in a base pass pixel shader to render an Enlighten-lit primitive. The number of textures and samplers depends on: • If the target shader profile supports independent samplers, such as Shader Models 4 and 5. • If Enlighten Lightmap LOD is implemented for the target shader profile. For example, this is not implemented for ES2. • The Enlighten lighting mode, such as Lightmap mode or Probe mode, that the primitive is set to render with, and the lighting mode settings. All platforms that support independent samplers also support Enlighten Lightmap LOD. The following table summarizes the possible options of textures and samplers:

Lighting Mode

Independent Samplers (For example, SM4, SM5, METAL_MRT, METAL_SM4) Texture Slots / Sampler Slots

No Independent Samplers,

No Independent Samplers,

Enlighten Lightmap LOD (For example, METAL)

No Enlighten Lightmap LOD (For example, ES2)

Texture Slots

Texture Slots

Lightmap lit, Lightmap Display Quality/ Mobile Lightmap Display Quality set to High

4/1

4

3

Lightmap lit, Lightmap Display Quality/ Mobile Lightmap Display Quality set to Medium

3/1

3

2

Lightmap lit, Lightmap Display Quality/ Mobile Lightmap Display Quality set to Low

2/1

2

1

Probe lit, using a single probe

0/0

0

0

Probe lit, using multiple probes

4/1

4

4

Probe lit, using per-pixel probe lighting

5/2

5

5

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

7-64

Chapter 8 Third party licences

The Enlighten SDK uses third party licences. It contains the following section: • 8.1 Third party licences on page 8-66.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

8-65

8 Third party licences 8.1 Third party licences

8.1

Third party licences Geomerics use third party licences in the Enlighten SDK. The following third party licences are used in the Enlighten SDK. • Core Runtime Code. Used in the Enlighten Runtime, which therefore may be embedded in your final game engine. • Precompute Code. Used in the Enlighten Precompute, which therefore may be embedded in your editor. • Sample Framework Code. Used in the Sample applications, including the High Level Build System, which therefore may be embedded into your tools pipeline.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

8-66

Chapter 9 Release notes

It contains the following sections: • 9.1 UE4 Integration 3.08 Release Notes on page 9-68. • 9.2 UE4 Integration 3.07 Release Notes on page 9-69.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

9-67

9 Release notes 9.1 UE4 Integration 3.08 Release Notes

9.1

UE4 Integration 3.08 Release Notes

Major Changes • The registration of Enlighten precompute data with the world has been modified. This is designed to improve editor and game stability. The result of this change removes issues caused by accessing stale worlds or attempting to re-register Enlighten objects, such as when saving packages, streaming levels in, or opening an already loaded sublevel in the editor. • UE4 Skylights are now supported at times when both the occlusion and direct light of the environment is computed by Enlighten. Previously, this was only supported when excluding the primary environment bounce in the Enlighten lightmaps by setting the console variable r.Enlighten.ExcludePrimaryEnvironmentBounce=1, intended to enable use of Skylights with DFAO. Levels using a Skylight with r.Enlighten.ExcludePrimaryEnvironmentBounce=0 may need relighting. This is because in this mode the Skylight will now contribute to Enlighten lightmaps. Minor Changes • Using the blueprint function Set Cubemap Texture on Enlighten Environment Texture Components outside of construction scripts now results in a warning message being logged and no visual changes. This is because this usage is not supported. • There is an added option to control the precision of Enlighten precomputed directional visibility. • Support added to use lightmass shadow information for stationary directional lights. Other stationary light types are already supported. Bug Fixes • Fixed crash when painting a landscape with PPPI enabled • (3.07.P2) Fixed crash related to unloading streaming levels • Fixed a bug where Contribute Probe Instanced Foliage meshes located far from the world origin were being culled when rendering Enlighten albedo. • Fixed a bug preventing the correct visualisation of Enlighten target meshes (enabled by checking Show > Enlighten > Enlighten Target Geometry in the editor) for Instanced Foliage meshes. • Fixed colour drift over time when using dynamic albedo, emissive or transparency. • Fixed a UI crash where quick navigation could cause a dangling memory pointer. • Fixed bug with empty lightmaps being created for stationary lights. New Features • You can rebuild Enlighten from source to change console SDKs etc. See the documentation section on Rebuilding Enlighten from Source. • The EnlightenTutorials project is now included in the Samples distribution

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

9-68

9 Release notes 9.2 UE4 Integration 3.07 Release Notes

9.2

UE4 Integration 3.07 Release Notes Changes in 3.07.R (QA Build 4.13) Epic QA versions: This release is integrated into the 4.13 QA build. Major changes: •

Per-pixel probe interpolation is now enabled using a Project Setting rather than a console variable. The console variable no longer has any effect. There is also an option to combine both per-pixel and per-object interpolation in the same project. See the documentation section on Lighting movable actors for details.

Minor changes: • • • •

SpeedTrees imported into UE4 are now automatically marked as Contribute Probe, and have their materials set to double-sided. These are the recommended settings for trees to increase lighting quality and decrease precompute time. The cost of updating the contents of Enlighten 2D textures on PC when using D3D11 is now more stable frame to frame when lighting is actively changing, whereas previously it could suffer from occasional spikes. The time required to start a PIE session has been reduced when the scene contains a high number of dusters. Foliage projection problems reported in the editor now include a link that allows selecting the problematic foliage instances.

Fixed bugs: • • • • • • •

A non-fatal assert will no longer be fired when generating Enlighten albedo for primitives with translucent materials making use of SceneColor nodes. Fixed crash after precomputing map with a hidden persistent level. Fixed crash when using the foliage.DensityScale command. Fixed crash when copying a level. Fixed occasional crash saving a precomputed map with a different name. Fixed intermittent crashes when the garbage collector reclaims Enlighten objects which may have only been partially setup (such as when in-progress asynchronous loads are cancelled). Fixed crash when starting a PIE session for a map created with stock UE4 which would asynchronously load streaming levels containing foliage.

Known issues: • Saving a level with a new name will not copy the precompute data to the new level. A new precompute will be required.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

9-69

Appendix A Revisions

This appendix describes the technical changes between released issues of this documentation. It contains the following section: • A.1 Revisions on page Appx-A-71.

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

Appx-A-70

A Revisions A.1 Revisions

A.1

Revisions Each table lists the technical differences between successive issues of this document. Table A-1 Issue 0000-00 Change

Location Affects

First release -

ARM 100836_0308_00_en

Copyright © 2017 ARM Limited or its affiliates. All rights reserved. Non-Confidential

-

Appx-A-71