Please Be Advised

I am not available for work, of any kind -- and while I would love to provide an insightful response to all messages received, the reality is that it just isn't possible given time constraints and personal goals.  

-Jeremy

         

123 Street Avenue, City Town, 99999

(123) 555-6789

email@address.com

 

You can set your address, phone number, email and site description in the settings tab.
Link to read me page with more information.

Let's Get Physical: Part 1 of 3

JeremyRomanowski.com Blog

The official blog of JeremyRomanowski.com, features in-depth tutorials and essential knowledge for artists and designers. The JeremyRomanowski.com blog aims to go one step further than other sites by explaining the why just as often as the how in order to build our audience's fundamental foundations of art & design and prepare them for additive knowledge.

Let's Get Physical: Part 1 of 3

Jeremy R

PBR in theory


The physical laws of the universe govern the appearance of everything in our third dimensional lives; PBR simply aims to reproduce nature by approximating the real world [physically-based] magnitude [intensity] and wavelength [color] of energy [light] present upon entering and exiting a given material’s surface properties. 


Simply put, the PBR tidal wave has been swelling for a long time, but the computational power necessary for physically-based rendering didn’t brush shoulders with real-time rendering capabilities, en masse, until recent years.

Why is the industry shifting towards PBR?

The visual fidelity of physically based rendering is second-to-none, and always has been.  In fact if you're familiar with VRay you're already acquainted with a physically based renderer.  As such, PBR is nothing to call home about, but until recently its applications were limited to 3D visuals of the pre-rendered variety (e.g. Pixar movies).  Simply put, the PBR tidal wave has been swelling for a long time, but the computational power necessary for physically-based rendering didn't brush shoulders with real-time rendering capabilities, en masse, until recent years.

What makes something physically-based?

In order for something to be considered "physically-based" it must approximate the laws of physics, and more specifically the behavior of light.  For example, all PBR shaders limit the amount of light leaving an object's surface to ensure it is never greater than the light which fell upon it originally. (This is known as the law of Energy Conservation.)  The physical laws of the universe govern the appearance of everything in our third dimensional lives; PBR simply aims to reproduce nature by approximating the real world [physically-based] magnitude [intensity] and wavelength [color] of energy [light] present upon entering and exiting a given material’s surface properties.  

If it sounds complicated, hang in there, it’s surprisingly simple in practice. 

— up close or from afar, realistic or stylized — without micro-surface details your scene will suffer from the aesthetic disorder known as Appending Disbelief! ...Sounds serious if you ask me.

What are Micro-Surface Details?

Micro-Surface Details (i.e. Smoothness/Roughness Maps) are one of the new additions to next-gen art pipelines.  Micro-surfaces are exactly what they sound like; the sheen of silk, the microscopic pitting of brick, the gloss of marble -- all micro-surfaces which can be mimicked by assigning a value between 0 (black) and 255 (white). The floor [0] and ceiling [255] describe whether a surface is as rough as physically-possible [0% Smoothness] or as smooth as physically possible [0% Roughness].*  

Smoothness Chart Unity 5 // Click for Full Size

These micro-surface details are rarely noticed by the average pair of eyes,  and most often it's the non-metal objects' surfaces we realize (e.g. wood, fabric, plastic).  This is because non-metals have a low index of reflectivity, which means light energy is much more prone to diffusion, rather than reflection.  Metals on the other hand have a high index of reflectivity, diffuse less light, and absorb certain wavelengths of light (i.e. Albedo) which make their surface details much more difficult to discern under "average" lighting conditions. 

Regardless of application these (micro)surface details are absolutely vital for creating the illusion of a world you can "reach out and touch" -- whether up close or from afar, realistic or stylized -- without micro-surface details your scene will suffer from the aesthetic disorder known as Appending Disbelief!  -gasp-  ...Sounds serious if you ask me.

*You'll find different values represent the floor [0] and ceiling [255] depending on what shader framework you're using. This is because shaders are written both ways -- some choose 255 to represent 100% roughness while others choose 255 to represent 100% smoothness. It's all a big mess really, and only adds to the difficulty of learning a new technology. In fact this is the prevailing reason there isn't a majority-ruled name for the roughness/smoothness map-slot found in PBR shaders.

A good rule of thumb -- the shader framework will use the maximum value to determine the map name. e.g. Unity's Standard Shader uses 255 for 100% smoothness, as such the Standard Shader has a Smoothness map-slot in the shader, rather than a Roughness map slot which many other frameworks use. Your mileage may vary.


I’m telling you this is the end for texture artists! PBR is going to turn us all into a bunch of monkeys punching predetermined values into one of these new fangled material generating machines. And watch, they’ll probably keep the machines in the basement.
— Anonymous Texture Artist

One shader to rule them all

Additionally, PBR reduces the number of special-case shaders necessary for a given scene.  In the past, realtime renderers relied upon a myriad of highly optimized [special case] shaders in order to emulate the physical world on a per-object basis:  An emissive shader for glowing objects, an additive shader for particles, a cutout shader for foliage, a refractive shader for glass, a refractive shader with displacement for water, a cubemap shader for.... you get the picture. 

How is this problematic?

Additional shaders == additional draw-calls!  Why are draw-calls important?  Well it is the number of draw-calls on the processor which is the single most delimiting factor [rendering bottleneck] of virtually all mobile devices; past, present and for the foreseeable future.  This limitation resulted in the sharing of shaders amongst assorted assets;  artists and tech artists alike had to be creative with their shader construction and implementation in order to get the most mileage out of each shader.  From an optimization perspective the sharing of shaders is great -- if we could have a single UBER shader to render every object in a scene, accurately, well that would be the mythical "absolute zero" of draw-call optimization. 

However, while sharing shaders is good from an optimization perspective, it often leads to a loss in visual fidelity... But not with PBR.  In the case of Unity 5's "Uber" Standard Shader, the unused shader functions are "dropped off" at run-time automatically.  Pretty neat!  Additionally, the leading physically-based shader frameworks (i.e. Alloy Shader Framework for Unity 5 by the guys over at Rust LTD) offer an all-encompassing shader framework which is built modularly from the ground up; able to add, edit and control specific and extended PBR shader passes on a per-material basis. 

Of course Unity 5's Standard Shader also drops off the unused shader passes but it doesn't have the modularity which is often key for prototyping in PBR.  In fact, I would like to take this opportunity to shout-out to Rust LTD for making Alloy -- it's my go-to shader package whether I'm authoring a material found in everyday life or something more interesting.  Thanks Rust!


approximating reality

light interaction upon opaque surfaces can be summarized by two distinct behaviors:

Reflection [Specular] 

To Reflect 100% of all light, that is to say all light energy is bounced (reflected) from the surface without actually penetrating the surface, would give you a perfectly mirrored surface which exhibits equal intensity of the incident ray which fell upon it.  (See Right)

Diffusion [Albedo]

To diffuse 100% of all light would produce the flattest most vacuous of all matte finishes -- something akin to a rubber tire.  It doesn't sound very interesting, but I assure you there are countless awesome materials hiding between shiny mirror and dull rubber.  

The smoothness/roughness value of a physically-based material plays a major role in determining just how much light energy is reflected or diffused in a given lighting environment - but as we'll find out below, it's not the only parameter which plays a part in reflectivity.


to metal, or not to metal?

Whether or not a material is metallic in nature is the single most defining property of how it will appear visually, and for that reason the Metalness model of PBR was created [by Disney].

Non-Metals:   

Most materials we see in our daily life fall into this category.  They reflect the full spectrum of light which hits* its surface -- although that reflection is usually so diffused upon exiting the surface that we don’t see a crisp reflection like those of metals.

*Keep in mind, light energy (or lack thereof) is emitted from virtually and literally every object in an environment, not just the light sources themselves.  This is why Reflection Probes are vital for PBR to have visual fidelity.

Metals: 

Metallic surfaces reflect most but not all of the spectrum of light that hits its surface, while absorbing the other visible wavelengths.  For this reason metals tend to reflect their own tinted version of reality, and the color it reflects is referred to as their Albedo.  

Metals also have a very high index of Reflectivity compared to non-metals.  A smooth gold surface will reflect the world around it with strong contrast, while a non-metal with the “same” smooth surface will only reflect a faint image.

 

Specular [Glossy] the alternative pipeline

The competing PBR model is called Specular [Glossy]. The Specular pipeline allows the artist to explicitly define the specular color of the material with the help of an additional RGB texture.  By contrast, the Metalness pipeline approximates the specular color of the material based on whether or not the surface is metallic in nature, and it's albedo value.  While the Specular approach is more akin to the traditional non physically-based way of authoring texture maps it also introduces an unnecessary variable for most artists to manage.  Additionally, the Specular model comes at the cost of greater memory overhead.

The general consensus is that the Metalness approach is considered more “artist friendly” due to its handling of the specular color, which reduces the possibility of producing “illogical” materials.  If you’re interested in the Specular approach you can select “Standard Shader (Specular)” from the shader menu or do a bit of Googling.


Part 0 of 3


Want to know why Physically Based Rendering is becoming the new standard? Start here!

Part 2 of 3


Familiar with PBR and ready to start authoring your own physically based materials in Unity 5? Start here!

Part 3 of 3


Looking for examples? Additional resources and a downloadable asset package featuring 10 materials.