Improving Game Visuals with Unity’s HDRP
Improve your game visuals and take them up by several notches using the High Definition Render Pipeline from Unity. By Wilmer Lin.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
Improving Game Visuals with Unity’s HDRP
35 mins
- Getting Started
- Exploring the Level
- Understanding HDRP
- Adding Some Visual Flair
- Understanding Environment Lighting
- Adding a Sky and Fog Volume
- Understanding the Volume Framework
- Understanding Overrides
- Setting the Physically Based Sky
- Setting Exposure and Light Emission
- Understanding Exposure
- Understanding Light Emission
- Adding More Volume Overrides
- Setting Lightmapping and Global Illumination
- Understanding Global Illumination
- Baking Lightmaps
- Debugging the Render Pipeline
- Adding Volumetric Fog
- Understanding Volume Settings
- Understanding Light Settings
- Adding Lights
- Exploring a More Complex Scene
- Understanding the Light Explorer
- Where to Go From Here?
Exploring a More Complex Scene
This scene, of course, represents a simple lighting example. Try another set of lights with the same environment.
Open the Start scene, and save it as Night, like before. Disable the Lighting object to turn off the existing lights.
From the RW/Prefabs folder, find and drag the Lighting Night prefab into the Hierarchy. Rather than relying on a single directional light for the key light, this setup uses spotlights and area lights.
The Sky and Fog Volume located in the Lighting Night prefab will use the Night Settings Profile in the RW/Settings folder.
The Game view suddenly appears bright and foggy. Disregard how the scene looks for the moment. Baking lightmaps will fix it.
Open the Lighting window. Swap the Lighting Settings to use LightingSettings4Ultra. Otherwise, the lightmapping may appear too blotchy. You might also want to flip the Max Lightmap Size to 2048 if not already set. This increases the Lightmap texture size for higher resolution.
Then, click Generate Lighting.
Wait for the scene to bake. Lightmapping takes longer since the scene has more lights. Once complete, it’s literally the difference between night and day!
Understanding the Light Explorer
Open Window ▸ Rendering ▸ Light Explorer. This dialogue helps manage large sets of lights.
For example, you can easily highlight the four CeilingLight_Spot_1600lm spotlights. Shift-select multiple lights to edit them at once. Then, adjust their color and temperature to your liking.
For example, you can easily highlight the four CeilingLight_Spot_1600lm spotlights. Shift-select multiple lights to edit them at once. Then, adjust their color and temperature to your liking.
Walk the room with the FPS controller. Note these differences with the Daylight scene:
- Area lights spill from the top and bottom staircase. They also form long, thin accents near the windows.
- Blue and gold colors compliment one another. This borrows from traditional cinematic lighting.
- The four spotlights on the ceiling cast volumetric shadows. Adjust their angles and multipliers to enhance their conical light shafts.
Use the Light Explorer to tweak and rebalance light values. Don’t be afraid to experiment! Different settings can create a completely different mood and atmosphere.
Where to Go From Here?
You can download the completed project files by clicking Download Materials at the top or bottom of the tutorial.
This tutorial, of course, just scratches the surface of HDRP. To continue exploring this very deep pipeline, see the official documentation.
You can also open the HDRP template’s SampleScene, as seen below, from the Scenes directory. This showcases three distinct lighting setups with several HDRP workflows.
Once ready, go back to the Night or Daylight scenes. Feel free to add some additional assets to fill out the bare room. Then, build a new lighting setup from scratch. Try your hand at designing with light!
With a little practice, you can channel your inner cinematographer. You might not look at a cube the same way again. :]
We hope you enjoyed this tutorial, and if you have any questions or comments, please join the forum discussion below!