Sub topic 8
Rotating the HDRI and Setting Its Strength
Assume you can navigate Blender’s Shader Editor and have rendered a scene with Cycles or EEVEE. You also need an HDRI file. An HDRI, or high dynamic range image, is a 360-degree image that stores bright and dark lighting information. In the World shader, it can light the whole scene and appear as the background.
Strength controls brightness
The Strength value on the World Background node controls how strongly the HDRI lights the scene.
- A low value gives soft, dim ambient light.
- A high value makes the scene brighter and can wash out material colors.
- Strength affects the HDRI’s lighting and reflections.
- Strength does not rotate the environment or change the camera exposure.
Start with a value between 0.3 and 1.0. Adjust the value while watching both the subject and its shadow. If the image is too bright, lower the World strength before changing individual lamps.
Rotation controls the lighting direction
Rotating the HDRI changes which part of the environment faces the subject. This changes:
- The direction of the main highlights.
- The direction and shape of shadows.
- The colors reflected by glossy materials.
- The visible background behind the subject.
A useful workflow is to rotate the HDRI until its brightest region creates the highlight direction you want. Then add lamps only when the HDRI cannot provide enough control.
Build the node setup
In the Shader Editor, switch the context from Object to World. Enable Use Nodes. Connect the nodes in this order:
- Texture Coordinate
Normaloutput to MappingVector. - Mapping
Vectoroutput to Environment TextureVector. - Environment Texture
Coloroutput to BackgroundColor. - Background
Coloroutput to World OutputSurface.
Use the Mapping node’s Z rotation to spin the HDRI around the scene’s vertical axis. In a typical scene, this is the most useful rotation because it changes the side-facing lighting without tilting the horizon.
| Setting | What it changes | Common starting point |
|---|---|---|
| Mapping Z rotation | Direction of highlights and shadows | 0–360° |
| Background Strength | Overall HDRI light intensity | 0.3–1.0 |
| Scene exposure | Brightness of the final view | 0 stops |
The following script creates the same setup. Replace the HDRI path with your own file.
import bpy
import math
scene = bpy.context.scene
world = scene.world or bpy.data.worlds.new("HDRI World")
scene.world = world
world.use_nodes = True
nodes = world.node_tree.nodes
links = world.node_tree.links
nodes.clear()
coordinates = nodes.new("ShaderNodeTexCoord")
mapping = nodes.new("ShaderNodeMapping")
environment = nodes.new("ShaderNodeTexEnvironment")
background = nodes.new("ShaderNodeBackground")
output = nodes.new("ShaderNodeOutputWorld")
mapping.inputs["Rotation"].default_value[2] = math.radians(90.0)
background.inputs["Strength"].default_value = 0.7
environment.image = bpy.data.images.load("//hdri/studio.exr")
links.new(coordinates.outputs["Normal"], mapping.inputs["Vector"])
links.new(mapping.outputs["Vector"], environment.inputs["Vector"])
links.new(environment.outputs["Color"], background.inputs["Color"])
links.new(background.outputs["Background"], output.inputs["Surface"])Exercise
Exercise
Your subject has a highlight from the wrong side, but its brightness is correct. Which setting should you change first, and why?
Show answer
Change the Mapping node’s Z rotation first. It changes the HDRI’s lighting direction without changing its overall strength.