In this tutorial, we'll see how to use an image, particularly in the HDR or EXR format, as the backdrop for Blender's virtual universe, enabling us to light our scene with a more intriguing illumination than a simple uniform color or Blender's Sky Texture.
Video Transcript
Hello everyone! In this tutorial, we'll see how to use an image, particularly in the HDR or EXR format, as the backdrop for Blender's virtual universe, enabling us to light our scene with a more intriguing illumination than a simple uniform color or Blender's Sky Texture.
Furthermore, we'll discuss three different methods to rotate the background of the virtual universe, allowing us to alter the scene's lighting and observe the changes in real-time within the 3D Viewport preview.
This tutorial is aimed at beginners and was recorded using v. 3.3 of Blender.
However, the concepts and tools we'll cover have been available across several software versions and will likely continue to be so in the future.
Images with HDR and EXR extensions differ from other images in PNG, JPG, BMP formats, not only in their extension, but also in the type of data they contain. These are, in fact, HDR type images, meaning High Dynamic Range.
These images can represent more light information than can be stored in LDR type files, i.e., Low Dynamic Range, like BMP, JPG, or PNG.
This enables capturing more detail in very dark or very bright areas, delivering more realistic and natural-looking images.
This naturally has a significant impact both on the renderings and the file sizes, as these additional pieces of information are stored by HDR or EXR files with 16 or 32 bits per color, whereas LDR formats typically only use 8 bits per color.
Alright, having laid this theoretical groundwork, let's analyze the scene I'll be using in this tutorial!
The scene depicts a room containing some objects.
I know that World Background illumination tutorials are usually set in outdoor scenes with simple objects, such as metallic spheres or cubes, but I preferred to use this scene to also show you how different background images can influence the mood of an indoor scene.

Note that the backdrop of the virtual universe is the only light source in the scene; in fact, if I switch to Rendered view mode in the 3D Viewport and set the World Background color to black, the scene will appear entirely dark.

I'll adjust Blender's interface a bit to see not only the 3D Viewport and Properties and Outliner windows, but also a Shader Editor, so we can examine the node setups for the virtual universe's backdrop.

By the way: by default, a Shader Editor will show the nodes for the material selected for an object. To display the nodes for the material of the virtual universe's backdrop, we select World in the Shader Type dropdown window.

To load an HDR or EXR image as the environment image for the virtual environment, we first need to change the Color mode in the World Properties tab to Environment Texture.

This type of Texture allows us to import an image to use for the backdrop and adjust its Color Space, which we can leave set to Linear for our purposes, and the intensity of the lighting, via the Strength parameter... but there's more: the node also provides a Projection selector that allows us to specify whether the image to be used is a Mirrorball or Equirectangular type.

You can easily distinguish the types of HDR image projections that you'll be using each time by their preview. Indeed, Mirrorball images are circular and show obvious image distortions, while Equirectangular images are essentially rectangular images that wrap around the center of the scene.
To load an image into this node, click Open and select an HDR or EXR image from your disk.

There are various websites from which you can download HDR or EXR images, both for free and for a fee.
However, I recommend searching for very high-resolution images, especially if you want to display the actual background image in the final rendering.
You can view image previews in Blender's File Browser window by simply clicking the Thumbnail Display Mode icon.

Generating the preview can take a bit of time; this is because these images take up a lot of memory space, both due to their high resolution and the amount of data they contain, as I previously mentioned.
For this first example, I'm using an Equirectangular image, so I don't need to change the default setting of the Projection selector on the node.
As you can see in the 3D Viewport preview in Rendered mode, the image is now the background of the virtual universe and is already illuminating the scene.

However, we might want to modify some characteristics, such as light intensity, how the image appears in the preview and in the rendering, and finally, the rotation of the virtual background.
Let's start with the simplest parameter, which is light intensity, and this can be adjusted by manipulating the Strength parameter of the node.
HDR images could represent a wheat field on a sunny, cloudless day or, conversely, the interior of a cave lit by a few artificial light sources, so you may need to adjust the background light intensity.

As for the display of the virtual universe background in both the preview and final render, this can be enabled or disabled using the Film Transparent parameter within the Render Properties tab.

This option can be useful if you want to use the image only as a light source and not as the final background, to be modified later in post-production, for example, because we want to use a specific image as a background but we don't have it in HDR format, or because the HDR image used as a background has a low resolution, not suitable for the final render.
In this scene, the background image remains visible through the windows even if we select Transparent Film.
This is due to the fact that the glasses are equipped with a Glass type material, so what we see is the interaction of the background with the glass, not the background itself.
There are ways to solve this problem and not display the background where the glasses are in the final rendering, but I'll talk about it another time.

Alright, let's move on to rotating the virtual background!
As mentioned at the beginning of the tutorial, we'll look at three different methods, each with its pros and cons, so in the end, it's up to you to decide which one to use!
The first method is the simplest: it involves opening the Transform panel of the Shader Editor with the N key, selecting the Environment Texture node, then opening the Texture Mapping section of the Node tab and modifying the Z Rotation value.

This is a straightforward method for which you don't need to insert any other nodes or objects, but it also has a downside: you need to keep the Shader Editor open, which can take up some space in the interface.
Note that the background image can also be moved along the Z-axis to adjust the elevation of the scene, but the movements must be really minimal, otherwise noticeable distortions in the background image will be introduced.

The second method involves inserting two nodes within the Shader World, namely Input Texture Coordinate and Vector Mapping, to be connected in succession in this way: Generated from Texture Coordinate with Vector from Mapping, then the Vector output from Mapping with the Vector input from Environment Texture.

The rotation of the virtual universe background can therefore occur by modifying the Z Rotation value of Mapping, but this time we can also modify this parameter in the World tab, which allows us to remove the Shader Editor from the interface and have more space for the preview in the 3D Viewport.

The third method involves using an external object to adjust the rotation of the background. To do this, we insert an Empty object at the center of the scene, rename it, for example, to Background Rotation …

… then we change the mode of the Texture Coordinate node from Generated to Object and specify the name of the new Empty in the Object field just below.

At this point, it will be sufficient to rotate the Empty in the 3D view with R Z and mouse movement, or by typing values in Z Rotation in its Item tab.

The advantage of this method over the previous one is that we won't need to access the World tab, but we can select the object in the scene or in the Outliner and rotate it interactively; the disadvantage is obviously having to insert a new object into the scene.
In summary: we have seen what HDR images are, why they are useful as light sources for the virtual universe and how it is possible to rotate them to modify the lighting of the scene, with three different methods...
… but I didn't tell you the whole truth about it.
If your goal is to modify the orientation of the lighting, then in reality there would be another method: parent all the objects in the scene to a new Empty and...
… rotate the Empty! Ok, ok, I was just kidding!
Joking aside, I hope this tutorial has been useful to you! See you soon!