Gaming development platform Unity 5.0 was released in March of 2015, and this release brought with it physically based rendering to the platform. This new lighting model helps simulate natural interactions of light with real world objects. Rendering, being a complicated process is made way easier by Unity Game Development and helps create dynamic images with great contrasts and details.
Image Source :- www.rivellomultimediaconsulting.com
How is Physically Based Rendering advantageous?
Beyond the basic definition, PBR is also inclusive of textural maps, and new shaders along with a new and improved way of working.
PBR has come a long way after being introduced to the industry by Disney and Pixar in offline rendering and animated films, as now it is being used in real-time rendering for games. PBR is thus, being used as a multi-faceted tool in Unity Game Development as well as Unreal game engine along with being implemented in Autodesk Maya and Allegorithmic Substance Designer.
The biggest advantages of PBR are its consistency and predictability. For example, 3D artists earlier were able to develop textures that looked good under specific lighting conditions, and had to be retouched to look real under variant lighting, but now with the help of PBR assets look the way one would expect them to look whenever there are any changes in the lighting. All the PBR renderers now use image based lighting which allows assets to gather hues from the surroundings.
Another advantage of PBR is its rapidness in producing realistic results, which is the ultimate goal of a game developer. PBR uses scientifically calibrated colors for real-world assets which lead to more concrete work.
A PBR generally has two kinds of workflows, Metallic-Roughness and Spectacular Glossiness, but since it uses the workflow greatly similar to Metallic Roughness, this post will focus only on the Metallic Roughness workflow.
What is the Unity Game Development 5.0 Standard Shader?
A shader is a small computer code that performs appropriate calculations to specify the appearance of a surface. Generally, a shader may need input data to modify the behavior, which may be in numeric form, or as often we see, in form of 2D textural maps.
In Unity Game Development, any 3D object has a Material Component attached to it, which uses a standard shader. Material is generally a combination of both, a shader and a textural map. The three most important texture map slots (called Channels) available in Unity Game Development 5.0 are:
Explaining the three most important channels in Unity Development 5.0:
Image Source :- nintendoeverything.com
This texture map helps PBR to quickly produce believable results with the help of pre-calibrated sRGB values for known materials. It describes colors as viewed in perfectly diffused light conditions without fake shadows. There are pre-fed values of several materials like gold, aluminum, coal etc, which can be referred from a PBR chart to get the scientifically accurate values.
This is a combination of R channel (for metallic map) and the A channel (for smoothness map). This division helps save the textural memory since both are grayscale maps and occupy single channel of RGBA color space.
PBR materials using the metallic map fall into two categories of metal and non-metal (also called dielectric) in Unity Game Development. They are split into these categories because a PBR materials need to have a description of how light is reflected upon a material surface, since reflections on metal surfaces like chrome car bumpers tend to be colored and those on non-metal surface like a smooth piece of plastic tend to be on the neutral side.
A metallic map describes the parts of a material which are metals and which are non-metal with the help of pixels. White pixels on the chart point to metals and the black ones to non-metals, and any color in between like gray specifies a non-metallic coating over a metal surface.
Similar to metallic map, smoothness map also is a grayscale map describing smoothness or roughness of a surface. If a substance is completely smooth the pixels shown are white whereas black pixels are for rough surfaces which won’t have any reflections. This map has no scientific values.
These describe the direction of reflection of light off a surface. This tool helps in additional details across a surface in forms of texture and indentations and improving rendering performance of Unity Game Development. More details on Normal Maps will be included in future posts.