- Qt 3D Studio
- Best Practices
- Using Image-based Lighting
- Qt 3D Studio 2.8 Manual

# Using Image-based Lighting

## Introduction

Qt 3D Studio supports IBL (Image-based lighting) to illuminate layers and objects.

IBL is a lighting technique that allows scenes to be illuminated with images. This is especially useful when you want to create realistic lighting and reflections in indoor and outdoor scenes.

You can use any image file for IBL but it is recommended to use 360º HDR (High Dynamic Range) images. HDR images have a much higher dynamic range than for example JPEG or PNG images. A higher dynamic range will provide more realistic lighting through a great range of luminance levels from very bright to very dark.

Included in Studio is a set of sample 360º HDR images. You find these in the Environments folder of the Maps library. Add desired images to your project by dragging and dropping them from the file system to the project palette.

It is of course also possible to create and use your own 360º HDR images. There are many different techniques that can be used to obtain such images.

Below you can see the effect of lighting an object with the HDR image above versus lighting the same object with a single directional light.

Light | Reflective material | Matte material
--- | --- | ---
Single directional light |  |
Image-based light |  |

## Layer Lighting

To illuminate a layer using an image follow the steps below:

1. Select the desired layer in the scene graph.
2. Click Light Probe in the inspector palette and browse to the image you wish to use.

Once you have selected an image IBL is set up for your layer. All objects on the layer will by default be illuminated by the light probe.

Note: You can combine IBL with any other light source, or you can use it alone. It is also possible to use two different IBL light probes, which is described below.

Now that you have IBL set up for your layer, let us have a look at the different settings. You find these in the inspector palette once you have selected the corresponding layer. In many cases the default settings will provide a satisfying result, but depending on the source image and desired end result you might want to tweak these.

- IBL Brightness - The amount of light emitted by the light probe.
- IBL Horizon Cutoff - Increasing the value will add darkness (black) to the bottom half of the environment, forcing the lighting to come predominantly from the top of the image (and removing specific reflections from the lower half).
- IBL FOV Angle - The image source field of view.
- Secondary Light Probe - The image to use as secondary IBL light source.
- Probe crossfade - The blend amount between the primary and secondary light probes.

Property | Reflective material | Matte material
--- | --- | ---
Default settings |  |
IBL Horizon Cutoff |  |
IBL FOV Angle |  |
Secondary Light Probe |  |

### Edit Light Probe

To edit the light probe source image, you can double-click the Light Probe in the scene graph to open it in your default image editing software. You might need to save and re-open your project for the changes to be visible.

Note: Editing the source image will only edit the image in this project, the original image file will remain untouched.

## Object Lighting

To use image-based lighting only on one object instead of a layer, or if you want to use a separate light probe for an object on a layer already illuminated by image-based lighting, follow the steps below:

1. In the scene graph expand the desired object and select its material.

2. In the inspector palette click the IBL Override and select the desired image to use as the light probe.

Once you have followed the steps above you have a separate light probe set up for the material. This light probe will always override the layer light probe if there is one specified.

Note: You can easily reuse the same material on any other object using Reference Material.