Explore, learn and create with the new HDRP Scene template
We are excited to share our brand-new template for the High Definition Render Pipeline (HDRP), which helps beginners get started with multi-room lighting setups, physically based lighting intensities, and much more.
The scene has been created by a small group of game industry veterans composed of 3D environment artists, VFX artists, lighting artists, and technical artists. They worked previously on world-renowned game licenses such as Assassin’s Creed, Batman: Arkham, Crysis, FIFA, Grand Theft Auto, Need for Speed, Red Dead Redemption, and Watch Dogs.
You can run the HDRP template on your machine by downloading Unity 2020.2 and starting an HDRP project in the Unity Hub. Create a New Project, Select the High Definition Render Pipeline template, and hit the Create button.
I also encourage you to stream the template from the cloud using Unity’s Furioos cloud platform – you only need a web browser! This template requires mouse and keyboard inputs, and your session time will be limited to 5 minutes.
Why a new template?
HDRP has a feature set tailored for high-fidelity graphics on high-end hardware (desktop PC and game consoles). Some techniques and concepts used in HDRP can be difficult to understand for newcomers or anyone who’s not familiar with industry standards and photographic concepts. This is why we created this new HDRP template as a learning tool.
For the past couple of years, you might have used the following template, which features a tiny construction site. This template lacks a physically correct lighting setup, which is a major drawback when it comes to understanding HDRP’s features.
To be more precise, the sun intensity in the older template was set at ten thousand lux, 10 times lower than its real counterpart. This has dramatic implications on the entire lighting setup, notably on the exposure, and the calibration of other light sources. This incorrect setup created a lot of confusion for artists and designers who wanted to adopt a physically based workflow, and beginners were bound to be confused by the randomness of the selected values.
Listening to user feedback, we heard that you want more examples for interior and exterior transitions. These scenarios can be very difficult to handle due to the immense exposure variations between a brightly lit outdoor area and a darker, artificially lit interior.
To help you understand how the lighting is set up, I prepared a cheat sheet with important values. You will find color temperatures and intensities of common light sources, and exposure values, set via the Exposure Volume Component, for several types of scenes.
Finally, HDRP’s Volume System, although common in many AAA engines, can be daunting for beginners who aren’t familiar with the hierarchical concepts of global volumes and local overrides that are necessary to handle rendering settings on a per-location basis. As a consequence, the former template, made of one area only, was not able to showcase the great potential of the volume system.
What’s new in the HDRP template?
The new template is set up in a physically based way, with a realistic sun intensity at 100,000 lux and correct exposures for each location. Beginners now have a good setup to start lighting their scenes, and they can experiment confidently with this template, knowing that the lighting is already correctly tuned.
Once you open the HDRP template, you will find three interconnected rooms with distinctive vibes and lighting setups. Each area has its own set of local volumes to handle the exposure using the brand-new Automatic Histogram mode. They also include various other HDRP settings, such as Volumetric Fog and White Balance to simulate the natural action of your brain or the auto white balance of a camera.
Feel free to also explore the environment by jumping into Play mode to get a sense of the scale and appreciate the environment from a human perspective. Press the WASD keys on your keyboard to move and use the mouse to look around.
The first room consists of a circular sunlit arena with a large concrete platform, perfect to test your assets in a low-noise environment. The area makes extensive use of HDRP’s Decal Projectors to simulate grime and water puddles, and they also provide more visual variations by breaking up the apparent tiling on the concrete materials.
Taking the stairs down to the second room, you’ll discover a naturally lit interior featuring a windowed tree cage with advanced materials such as transparency, subsurface scattering, and tessellation. The area also offers a couple of GPU-based special effects, in the form of floating dust, and butterflies inside the tree cage. A custom Density Volume simulates the higher humidity in the vicinity of the cage and creates beautiful rays of light.
The room is a perfect showcase for the capabilities of the GPU Lightmapper since the majority of the indirect lighting is provided by the sole opening in the ceiling. This lets the sun and sky lighting bounce around to simulate beautifully smooth gradients of light, emphasized by the vibrant paint used on specific walls.
If you follow the ramp leading to the third and last room, you will discover an ultra-minimalist living space featuring real-time spotlights, a set of three ceiling lamps, and a long, emissive strip light that once again takes advantage of the GPU Lightmapper.
The majority of the illumination in this space is generated by artificial lights, making extensive use of soft shadows, light cookies (projection textures), and carefully placed Reflection Probes. As you approach the lamps, subtle specks of dust light up as they traverse the beam of light.
Constraints and art style
First of all, the main constraint for this project was a 100 megabytes limit! By today’s standards, this is a very small amount of data, especially when it comes to texture budgets, notably for albedo, normals, lightmaps, and reflection probes. However, a small template size allows users to download and import the HDRP package very quickly, no matter where they are in the world, and it complied with the internal size limitations for Scriptable Render Pipeline (SRP) templates at the time of its production.
To make the best use of our data budget, we decided to adopt a brutalist architectural style with strong shapes, simple materials and a small number of reusable props. Nevertheless, we weren’t shy about using complex geometrical shapes for this environment, particularly curved and tilted ones, which can cause numerous problems when it comes to the light baking and the placement of box-shaped rendering GameObjects, such as Reflection Probes and Volumes.
To handle the skybox, we decided not to include a custom (and memory-intensive) HDRI texture, as it would have radically increased the size of the template. Instead, we rely on the built-in, low-resolution, HDRI from HDRP. The main drawback is that it doesn’t include a sun disk.
Finally, one of the main victims of this 100 MB limit was Reflection Probes. A maximum resolution of 256 pixels had to be used in order to minimize the memory footprint of the 18 Reflection Probes in the scene.
This kind of resolution is common in games. Nevertheless, if you require pin-sharp reflections for your mirror-like assets, nothing prevents you from increasing the Reflection Probe resolution in a HDRP asset, then rebaking the Reflection Probes on your local machine. Obviously, the performance impact on memory will increase depending on the resolution and the size of the Probe Cache.
The template offers multiple levels of quality to perform on a wide variety of hardware. Head to Edit > Project Settings > Quality, and choose between Low, Medium, and High settings. For instance, in the Low quality mode, Volumetric Fog is disabled to maximize the framerate. On the other end of the scale, the High setting offers soft shadows with penumbra approximation and effects with a higher sample count across the board.
The project uses a mixture of real-time lights, lightmaps and light probes. The entire structure and the largest assets take advantage of the GPU Lightmapper. Therefore, most lights are set to Mixed, and the light bake is generated using the Baked Indirect mode. This provides a soft light bounce as well as beautifully smooth occlusion shadows while ensuring the direct lighting and shadowing remain entirely real-time.
Small objects, by contrast, rely on a network of Light Probes distributed across the entire scene, rather than on the slower lightmapping approach. I always recommend spending some time minimizing the baking times by forcing smaller objects to only Receive GI from Light Probes, and/or preventing them from Contributing GI altogether in the Mesh Renderers Inspector window.
Additionally, to let you experiment with different levels of indirect lighting quality, I provide several Light Baking presets for the GPU Lightmapper, accessible via the Lighting Settings asset under Window > Rendering > Lighting. For example, when using a reasonable Geforce RTX 2070 Super, the Draft preset should produce an extremely quick yet blotchy result in 10 seconds, ideal for quick iterations, whereas the Ultra settings will yield extremely clean lightmaps in just four minutes for production-quality renders.
Nevertheless, depending on your GPU, your mileage may vary. Therefore, I recommend that you experiment with different parameters which can greatly influence both the quality and the baking time, especially the Indirect Sample count and the Texel density.
As new HDRP features emerge, the template will be updated to showcase them, so keep an eye on future releases of Unity and HDRP. Stay tuned for my upcoming Unite Now Talk, where I will explain in more detail how I set up the lighting in this new template, as well as the volumes, exposure, lightmapper, post-processing effects, and many other HDRP features. Also, register for this upcoming NVIDIA webinar where I will let you know how to enable and tune the ray tracing effects in this template. When you register and attend the entire webinar, you have a chance to win an NVIDIA Quadro RTX 5000!
In the meantime, have a look at my previous Unite Now session, titled Achieving high fidelity graphics for games with the HDRP, where I present important HDRP features and physical concepts such as exposure and lighting intensities. You can also find more HDRP learning resources in this blog article, Create jaw-dropping graphics with these High Definition Render Pipeline resources.
We hope you will find this new template educational, and we look forward to seeing how you experiment with it.
About the Author
Pierre Yves Donzallaz (Technical Art Manager, R&D, Graphics) is an experienced lighting artist with over a decade of AAA experience in the field of real-time rendering. He has a strong technical and artistic background and specializes in lighting, level beautification, UX, tools design, and workflow improvements.
He is currently a member of Unity’s R&D Graphics team, where he leads fellow technical artists whose mission is to improve artists’ efficiency, educate users globally, and to develop new tools, workflows and graphical features alongside engineers and designers.