Are reflection captures working?

Mastering Unreal Engine Lighting: Rebuilds & Reflections

18/03/2003

Rating: 3.91 (10051 votes)

Unreal Engine's rendering capabilities are legendary, allowing developers to craft visually stunning worlds. At the heart of this visual fidelity lies its sophisticated lighting system. However, mastering this system often involves understanding crucial concepts like lighting rebuilds and the strategic use of Reflection Capture Actors. For newcomers and seasoned developers alike, these elements can be a source of confusion, impacting both the aesthetic quality and performance of a project. This comprehensive guide will demystify these essential aspects, providing you with the knowledge to illuminate your virtual worlds with unparalleled realism and efficiency.

How does UE use reflection capture actors?
When you use Reflection Capture Actors, UE mixes the indirect Specular from the Reflection Capture with the indirect Diffuse lighting from lightmaps. This helps to reduce leaking since the reflection cubemap was only captured at one point in space, but the lightmaps were computed on all the receiver surfaces and contain local shadowing information.
Table

Does Unreal Engine Lighting Need to Be Re-built?

The short answer is: often, yes, especially when dealing with static lighting. Unreal Engine employs a powerful pre-computed lighting system for static elements in your scene. This system, known as lightmapping, calculates how light interacts with static geometry and bakes this information directly onto textures (lightmaps) that are then applied to your objects. This approach significantly reduces the computational load during runtime, allowing for highly detailed and complex global illumination effects that would be too expensive to render dynamically.

When is a Lighting Rebuild Necessary?

A lighting rebuild is essentially the process of recalculating these lightmaps. You'll need to initiate a rebuild in several key scenarios:

  • Moving or Modifying Static Geometry: If you move, scale, rotate, or alter the mesh of any object marked as "Static" in your scene, its existing lightmap data becomes inaccurate. The engine needs to re-calculate how light falls on its new position or shape.
  • Changing Static Light Properties: Adjusting the intensity, colour, position, or type (e.g., from movable to static) of any light source designated as "Static" or "Stationary" will necessitate a rebuild. The lightmaps depend entirely on these light properties.
  • Altering Environment Lighting: Changes to Sky Lights, which are typically static and contribute to global illumination, will also require a rebuild to update the environment's contribution to your lightmaps.
  • Post-Process Volume Adjustments (Indirect Lighting): While not direct lighting, changes to indirect lighting intensity or colour in post-process volumes can sometimes influence the final baked result, warranting a rebuild.
  • Reflection Capture Actors: Although we'll delve deeper into these, changes to the position or properties of Reflection Capture Actors often require a lighting rebuild, as they are integrated into the overall indirect lighting solution.

Static, Stationary, and Movable Lights: A Quick Overview

Understanding the three primary light mobility types is crucial for grasping rebuild requirements:

  • Static Lights: These lights are fully baked into lightmaps. They offer the highest quality global illumination but cannot be changed or moved at runtime. Any alteration requires a full lighting rebuild. They are the most performance-friendly at runtime.
  • Stationary Lights: These lights have their direct lighting rendered dynamically, but their indirect lighting is baked into lightmaps. This offers a good balance, allowing some runtime changes (like colour or intensity) without a full rebuild, but their position cannot change. Moving a stationary light does require a rebuild. They cast dynamic shadows from static objects and bake shadows from dynamic objects.
  • Movable Lights: These lights are entirely dynamic. Nothing about them is pre-computed. They can be moved, changed, and toggled at runtime without any lighting rebuild. While offering maximum flexibility, they are the most expensive in terms of performance due to constant real-time calculations.

The Impact of Rebuilding

A lighting rebuild can range from a few seconds to several hours, depending on the complexity of your scene, the quality settings of your lightmaps (Lightmass settings), and your hardware. During this process, Unreal Engine's Lightmass global illumination system calculates complex light bounces, shadows, and ambient occlusion. A successful rebuild results in:

  • Accurate Shadows: Shadows that precisely match the light sources and geometry.
  • Realistic Global Illumination: Light bouncing off surfaces and subtly illuminating other areas, adding depth and realism.
  • Optimised Performance: By pre-computing, the engine avoids expensive real-time calculations for static elements.

Tips for Efficient Rebuilding:

  • Iterate with Preview Quality: During initial development, use "Preview" quality settings for Lightmass to get quick rebuilds, even if the quality is lower. Only switch to "Production" for final builds.
  • Use Lightmass Importance Volume: Enclose your primary gameplay areas within a Lightmass Importance Volume. This tells Lightmass to focus its high-quality calculations within this zone, speeding up builds for less critical areas.
  • Optimise UVs for Lightmaps: Ensure your static meshes have proper, non-overlapping lightmap UVs (usually UV Channel 1). Poor UVs lead to artifacts and longer build times.
  • Consider Data Layers/World Partition: For extremely large worlds, these features can help manage lighting builds by only loading and processing relevant sections.

How Does UE Use Reflection Capture Actors?

While lightmaps handle the indirect diffuse lighting (the general ambient light bouncing around), they don't capture the specular reflections that give surfaces their shine and reflectivity. This is where Reflection Capture Actors come into play. These actors are essentially static probes that capture a 360-degree cubemap of their surrounding environment at a specific point in space.

The Magic Blend: Indirect Specular + Indirect Diffuse

As per the provided information, Unreal Engine ingeniously combines the data from Reflection Capture Actors with the lightmap data:

  • Indirect Specular from Reflection Capture: The cubemap captured by the Reflection Capture Actor provides the indirect specular component. This means it tells shiny surfaces what they should be reflecting from their environment.
  • Indirect Diffuse from Lightmaps: The lightmaps, on the other hand, provide the indirect diffuse component, which is the general, non-directional light bounce.

This blend is crucial for achieving realistic materials. Imagine a polished metal surface in a dimly lit room. The lightmaps will provide the overall dimness (indirect diffuse), but the Reflection Capture Actor will provide the subtle, blurry reflections of the room's geometry and lights (indirect specular).

Why This Combination is So Effective:

The key benefit of this approach is in reducing "leaking". Leaking occurs when reflection data, captured from a single point, incorrectly spills into areas it shouldn't. Since lightmaps are computed on all receiver surfaces and contain local shadowing information, they can inform the engine where reflections should be attenuated or blocked. For example, if a surface is in shadow according to the lightmap, the engine can intelligently reduce the intensity of the reflection from the Reflection Capture Actor, preventing the reflection from appearing too bright or out of place. This results in a much more believable and consistent lighting environment.

Does Unreal Engine lighting need to be re-built?
Since i started with Unreal Engine i had a problem that dosen’t dissapear, it says LIGHTING NEEDS TO BE REBUILT . I tried these methods to solve it : Build ( Too many times) Save all after build Build Lighting only Re…

Types of Reflection Capture Actors:

Unreal Engine offers two primary types:

  • Sphere Reflection Capture: The most common type. It captures the environment from a single point and projects it spherically. Ideal for most general purposes, especially for open spaces or rooms.
  • Box Reflection Capture: Designed for more rectilinear spaces, like corridors or enclosed rooms. It projects the cubemap using a box projection, which can be more accurate for flat surfaces within its bounds, reducing parallax errors compared to a sphere. You define the box's size and blend distance.

Placement Strategies for Optimal Results:

  • Density: Place Reflection Capture Actors strategically throughout your scene. More reflective surfaces and complex environments will benefit from a higher density.
  • Centred in Rooms: For enclosed spaces, place a Sphere Reflection Capture actor roughly in the centre of the room.
  • Along Corridors: For long corridors, Box Reflection Captures can be very effective, aligned with the corridor's geometry.
  • Avoid Overlap (Generally): While some overlap is inevitable and handled by the engine's blending, excessive overlap can sometimes lead to visual inconsistencies. Aim for a sensible distribution.
  • Reflective Surfaces: Prioritise placing captures near areas with highly reflective materials (metals, polished floors, glass).
  • Rebuild After Moving: Just like static lights, moving or adding Reflection Capture Actors often necessitates a lighting rebuild to update the scene's reflection data.

Are Reflection Captures Working? Troubleshooting and Verification

It's crucial to verify that your Reflection Capture Actors are functioning correctly to achieve the desired visual fidelity. Here's how to check and troubleshoot common issues:

Verification Steps:

  1. Visualise in Editor:
    • In the viewport, go to Show > Visualise > Reflection Captures. This will display a visual representation of your reflection capture actors, showing their influence radius (for spheres) or box bounds (for boxes).
    • You can also use Show > Visualise > Reflection Overlap to see how different capture volumes blend.
  2. Check Material Reflectivity: Ensure the materials on your surfaces actually have a "Roughness" value that allows for reflections (lower roughness = more reflective). Also, check their "Metallic" value if applicable.
  3. Perform a Lighting Rebuild: Reflection captures are part of the static lighting solution. After placing or modifying them, you must perform a lighting rebuild (Build > Build Lighting Only or Build > Build All) for their effects to be accurately calculated and applied.
  4. Influence Radius/Box Extents: Select a Reflection Capture Actor and examine its properties in the Details panel. For Sphere Captures, adjust the "Influence Radius" to ensure it covers the intended area. For Box Captures, adjust "Box Extent" and "Blend Distance."

Common Troubleshooting Scenarios:

  • Reflections are Missing/Incorrect:
    • No Rebuild: Did you rebuild lighting after placing or moving the capture? This is the most common oversight.
    • Incorrect Placement: Is the capture actor positioned correctly relative to the surfaces that should be reflecting?
    • Influence Too Small: Is the influence radius or box extent too small to cover the reflective surfaces?
    • Material Settings: Is the material actually set up to be reflective (low roughness, high metallic)?
    • Overlapping Captures: While blending is handled, sometimes complex overlaps can cause unexpected results. Try simplifying your capture layout.
    • Static Mesh Issues: Does the static mesh have proper lightmap UVs? Sometimes issues with UVs can indirectly affect reflection quality.
  • Reflections Look Blocky/Low Resolution:
    • Capture Resolution: While not directly exposed as a simple setting for individual captures, the overall quality of reflections can be influenced by project settings or the density of captures.
    • Distance from Capture: Surfaces further away from a capture actor will naturally have less accurate reflections.
    • Engine Scalability Settings: Ensure your editor's "Engine Scalability Settings" (under Settings in the viewport) are not set too low, as this can degrade reflection quality.
  • "Leaking" or Incorrect Reflections:
    • This is where the lightmap integration becomes vital. If you see reflections that seem out of place, ensure your static lighting is built and accurate. The lightmaps provide the local shadowing context to prevent leaking.
    • Consider using more Box Reflection Captures in highly structured interior spaces where parallax correction is more important.
  • Performance Issues:
    • Too Many Captures: While necessary, an excessive number of Reflection Capture Actors can add to rendering overhead, especially if they have large influence radii. Optimise their placement and density.
    • Rebuild Time: Remember that rebuilding lighting with many captures will increase build times.

Comparative Table: Key Lighting & Reflection Components

FeaturePrimary FunctionMobility Types AffectedRebuild Required? (for changes)Performance Impact (Runtime)Best Use Case
Static LightingBakes direct and indirect diffuse light into lightmapsStatic, StationaryYesVery LowHigh-quality, unchanging scene elements
Movable LightingReal-time direct and indirect light calculationMovableNoHighDynamic objects, effects, player-controlled lights
Reflection CapturesCaptures indirect specular reflections (cubemaps)Static (indirect specular)Yes (often with lighting)ModerateAdding realistic reflections to shiny surfaces
LightmapsStores pre-computed diffuse lighting & shadowsStatic, StationaryYesVery LowBase global illumination for static geometry
Sky LightCaptures and applies ambient light from the skyStatic, Stationary, MovableYes (if static)Low to ModerateOverall scene ambient lighting, exterior environments

Frequently Asked Questions (FAQs)

Q: Can I avoid rebuilding lighting entirely?
A: You can, by making all your lights "Movable." However, this comes at a significant performance cost and you will lose the high-quality pre-computed global illumination that static lighting provides. For most production-quality games, a mix of light types is essential.

Q: How often should I rebuild lighting?
A: Rebuild lighting whenever you make significant changes to static geometry, static light sources, or reflection capture actors in your scene. During active development, you might rebuild frequently with "Preview" quality. For final passes, use "Production" quality.

Q: Do Reflection Capture Actors affect performance at runtime?
A: Yes, they do. While their primary cost is during the lighting build, rendering objects that sample from reflection captures incurs a small runtime cost. Too many overlapping or high-resolution captures can add up, so optimise their placement.

Q: My reflections look blurry even with high-quality settings. Why?
A: Blurriness in reflections is often tied to the "Roughness" property of your material. A higher roughness value will make reflections appear more blurry or diffused. Ensure your material's roughness is appropriately set for the desired surface type. Also, the resolution of the reflection capture itself is finite; very fine details might be lost.

Does Unreal Engine lighting need to be re-built?
Since i started with Unreal Engine i had a problem that dosen’t dissapear, it says LIGHTING NEEDS TO BE REBUILT . I tried these methods to solve it : Build ( Too many times) Save all after build Build Lighting only Re…

Q: What is "Lightmass" and how does it relate to rebuilding?
A: Lightmass is Unreal Engine's global illumination solver. When you initiate a lighting rebuild, Lightmass is the system that performs the complex calculations for bouncing light, generating lightmaps, and updating reflection capture data.

Q: Can I have dynamic objects reflect static environments?
A: Absolutely! Dynamic (movable) objects will still sample from Reflection Capture Actors and receive indirect diffuse light from light probes (if you have them) or general ambient light. They will also dynamically interact with movable lights. The blend of static and dynamic lighting is one of Unreal Engine's strengths.

Conclusion

Mastering the art of lighting in Unreal Engine is a journey, but understanding the fundamental concepts of lighting rebuilds and the strategic application of Reflection Capture Actors is a critical milestone. By judiciously using static lighting and its associated rebuilds, you can achieve stunning global illumination with optimal performance. Simultaneously, by deploying Reflection Capture Actors thoughtfully, you can imbue your materials with lifelike reflectivity, seamlessly blending indirect specular highlights with the ambient diffuse light from your lightmaps. Embrace these tools, iterate, experiment, and watch your virtual worlds come to life with unparalleled visual fidelity.

If you want to read more articles similar to Mastering Unreal Engine Lighting: Rebuilds & Reflections, you can visit the Automotive category.

Go up