Insights From The Blog

Looking at Long Term Support for the Unity 2021 Universal Render Pipeline

As a major part of its overall package Unity developed a pre-built scriptable render pipeline called the Universal Render Pipeline (URP) to facilitate rendering of a project. URP offers artist-friendly workflows that make it possible to quickly and easily create graphics that are optimised for a variety of platforms, including mobile, high-end consoles, and personal computers. It is not possible to render using the High-Definition Render Pipeline (HDRP) or the Built-in Render Pipeline on a project that was created using the URP. Before beginning development on your project, you need to make a decision regarding the render pipeline that will be used.

As with any high-end development software, to achieve a professional level of lighting, you need to strike a delicate balance between achieving the desired atmosphere for a scene and working within the technical and performance constraints of your target platforms. This is where the URP comes in.

The URP Asset has a number of different settings that can be used to modify the lighting. Although some of these options can also be found in the Rendering, Quality, and Post-processing sections of the Inspector, these are the Lighting and Shadows sections. By accessing the Inspector, it is possible to modify a number of aspects of the displayed light, and introduce layers, change their names, and make changes to scene settings.  All of this makes the Inspector and the URP an enormously powerful part of the Unity package. The URP provides developer with three distinct lighting models that can be used for the project, depending on the requirements. These are the models that are:

  • Physically Based, making use of both the Lit and Complex Lit shaders.
  • Simple lighting, using the Blinn-Phong model as the foundation, and using the Simple Lit shader.
  • Using the Baked Lit shader for the Baked Lit effect.

The properties and operations of all three models are very distinct from one another, and it would be highly unusual to combine them into a single model; however, such a combination might produce an interesting appearance if it were well-balanced. Even though combining Baked Lit geometry with Lit or Simple shaders can help the developer achieve stronger performance, it is generally best to just choose one and stick with it. A simplified Cook-Torrance BRDF is the foundation of the physically based lighting system in URP. It requires more resources than Blinn-Phong does, but it renders materials in a way that is more physically accurate, which helps to amplify your visuals. This is useful whether you’re trying to create something that looks cartoonish or something that is supposed to look realistic. As a breakdown of these distinct lighting types:

  • The Complex Lit shader is a superset of the Lit shader, and it offers an additional feature known as Clear Coat. This feature simulates a thin layer of transparent material on top of a material. It is important to keep in mind that the Clear Coat shader uses twice the allotted amount of resources that the Complex Lit shader does on its own due to the fact that URP must evaluate the lightning twice.
  • The Blinn-Phong model, which is used by the Simple Lit shader, is a straightforward representation of light that is not based on any physical principles. This model has been used in a great number of classic games, primarily due to limitations imposed by hardware. It is a good choice when the art style is suitable for a non-Physically Based approach, such as when the developer wants to recreate the sensation of playing an old-school video game.
  • The Baked Lit shader will only light an object with the help of a light map or a Light Probe. Although it is not accurate from a physical standpoint, it is a cost-effective method for rendering your objects. The one and only drawback is that it is only capable of evaluating the light maps or the Light Probes, which means that you cannot take advantage of reflections or dynamic lights.

Unity makes a big issue of the URP because it is such a huge part of the rendering process, and long-term support for this important feature is pretty much assured. As can be seen, the Universal Render Pipeline’s URP Asset is responsible for controlling a number of graphical settings and parameters related to quality. It is an object that can be scripted and that inherits its functionality from ‘RenderPipelineAsset.’ Unity will use the URP instead of its built-in render pipeline once you have assigned the asset in the Graphics settings. Generally, the developer won’t need to search for the corresponding settings anywhere else because they will be able to adjust them directly in the URP. Unity allows for multiple URP assets, and the developer is free to switch between them as needed. They could, for instance, have one with the Shadows feature turned on and another without it. If they switch between the assets to see the effects, you won’t need to manually toggle the settings that correspond to shadows each time. This is because switching between the assets will show you the effect immediately. However, because HDRP/SRP and URP assets use different render pipelines, developers are unable to switch between the two types of assets.

The Universal Render Pipeline can make or break your project and we recommend that you get to know it well and investigate all of the options as well as experimenting with the different operations and renderings.