Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

8/2/2020 Physically-Based Rendering, And You Can Too!

| Marmoset

Toolbag  Hexels  Tutorials & Resources  Support 

SHOP 

Physically-Based
Rendering, And
You Can Too!
 

ADVANCED TUTORIALS

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 1/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

By Joe “EarthQuake” WilsonThis tutorial will cover the basics of art


content creation, some of the reasoning behind various PBR
standards (without getting too technical), and squash some
common misconceptions. Jeff Russell wrote an excellent tutorial
on the Theory of Physically Based Rendering, which I highly
recommend reading rst.

Additional help from Jeff Russell, Teddy Bergsman, and Ryan


Hawkins. Special thanks to Wojciech Klimas and Joeri Vromman
for the extra insight and awesome art.

Contents
A New Standard
PBR FAQs
Inputs and Terminology
Energy Conservation
Albedo
Microsurface
Re ectivity
Fresnel
Ambient Occlusion
Cavity

Finding Material Values


Creating Texture Content
Artist Q&A: Wojciech Klimas
Artist Q&A: Joeri Vromman
References

A New Standard
Fast becoming a standard in the games industry due to increased
computing power and the universal need for art content
https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 2/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

standardization, physically based rendering aims to rede ne how


we create and render art.

Physically based rendering (PBR) refers to the concept of using


realistic shading/lighting models along with measured surface
values to accurately represent real-world materials.

PBR is more of a concept than a strict set of rules, and as such, the
exact implementations of PBR systems tend to vary. However, as
every PBR system is based on the same principal idea (render stuff
as accurately as possible) many concepts will transfer easily from
project to project or engine to engine. Toolbag 2 supports most of
the common inputs that you would expect to nd in a PBR system.

Beyond rendering quality, consistency is the biggest reason to use


measured values. Having consistent base materials takes the
guess work out of material creation for individual artists. It also
makes it easier from an art direction perspective to ensure that
content created by a team of artists will look great in every lighting
condition.

PBR FAQs
Before we get started, it’s important to cover common questions
that usually pop up when people talk about PBR.

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 3/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

1) I don’t know how to use a PBR


system, will I need to re-learn how to
create art content?

In most cases, no. If you have experience with previous generation


shaders which use dynamic per-pixel lighting you already possess
much of the knowledge necessary to create content for a PBR
system. Terminology tends to be one of the biggest stumbling
blocks for artists, so I have written a section on various terms and
translations below. Most of the concepts here are simple and easy
to pick up.

If your experience lies mostly with hand painted/mobile work,


learning the new techniques and work ows outlined here may be
more of a challenge. However, likely not more di cult than picking
up a traditional normal map based work ow.

2) Will artists need to capture


photographic reference with a
polarized camera system for every
material they wish to create?

No, generally you will be provided with reference for common


materials by your studio. Alternatively, you can nd known values
from various 3rd party sources, like Quixel’s Megascans service.
Creating your own scan data is a very technical and time
consuming process, and in most cases not necessary.

3) If I use a PBR shader does that


mean my artwork is physically
accurate?

Not necessarily; simply using a PBR shader does not make your
artwork physically accurate. A PBR system is a combination of

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 4/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

physically accurate lighting, shading, and properly calibrated art


content.

4) Do I need to use a metalness map


for it to be PBR?

No, a metalness map is just one method of determining re ectivity


and is generally not more or less physically accurate than using a
specular color/intensity map.

5) Do I need to use index of


refraction (IOR) for it to be PBR?

No, similar to the metalness map input, IOR is simply an alternate


method to de ne re ectivity.

6) Is specular no longer a thing?

Not quite. Specular re ection intensity, or re ectivity is still a very


important parameter in PBR systems. You may not have a map to
directly set re ectivity (e.g. with a metalness work ow) but it is still
required in a PBR system.

7) Do gloss maps replace specular


maps?

No, gloss or roughness maps de ne the microsurface of the


material (how rough or smooth it is), and do not replace a specular
intensity map. However, if you’re not used to working with gloss
maps, it may be somewhat of an adjustment to put certain detail in
the gloss map that you would otherwise add to the specular map.

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 5/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

8) Can a PBR system be used to


create stylized art?

Yes, absolutely. If your goal is to create a fantastical, stylized world,


having accurate material de nition is still very important. Even if
you’re creating a unicorn that farts rainbows, you still generally
want that unicorn to obey the physics of light and matter.

A great example of this is Pixar’s work, which is very stylized, yet


often on the cutting edge of material accuracy. Here is a great
article about PBR in Monsters University: fxguide feature on
Monsters University

Inputs and
Terminology
Artists who are unfamiliar with the concept of PBR systems often
assume that content creation is drastically different, usually
because of the terminology that is used. If you’ve worked with
modern shaders and art creation techniques you already have
experience with many of the concepts of a physically based
rendering system.

Figuring out what type of content to create, or how to plug your


content into a PBR shader can be confusing, so here are some
common terms and concepts to get started.

Energy Conservation
The concept of energy conservation states that an object can not
re ect more light than it receives.

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 6/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

For practical purpose, more diffuse and rough materials will re ect
dimmer and wider highlights, while smoother and more re ective
materials will re ect brighter and tighter highlights.

Albedo
Albedo is the base color input, commonly known as a diffuse map.

An albedo map de nes the color of diffused light. One of the


biggest differences between an albedo map in a PBR system and a
traditional diffuse map is the lack of directional light or ambient
occlusion. Directional light will look incorrect in certain lighting
conditions, and ambient occlusion should be added in the separate
AO slot.

The albedo map will sometimes de ne more than the diffuse color
as well, for instance, when using a metalness map, the albedo map
de nes the diffuse color for insulators (non-metals) and re ectivity
for metallic surfaces.

Microsurface
Microsurface de nes how rough or smooth the surface of a
material is.

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 7/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

Here we see the how the principles of energy conservation are


affected by the microsurface of the material, rougher surfaces will
show wider, but dimmer specular re ections while smoother
surfaces will show brighter, but sharper specular re ections.

Depending on what engine you’re authoring content for, your


texture may be called a roughness map instead of a gloss map. In
practice there is little difference between these two types, though a
roughness map may have an inverted mapping, ie: dark values
equal glossy/smooth surfaces while bright values equal
rough/matte surfaces. By default, Toolbag expects white to de ne
the smoothest surfaces while black de nes roughest surfaces, if
you’re loading a gloss/roughness map with an inverted scale, click
the invert check box in the gloss module.

Re ectivity
Re ectivity is the percentage of light a surface re ects. All types of
re ectivity (aka base re ectivity or F0) inputs, including specular,
metalness, and IOR, de ne how re ective a surface is when
viewing head on, while Fresnel de nes how re ective a surface is
at grazing angles.

Its important to note how narrow the range of re ectivity is for


insulative materials. Combined with the concept of energy
conservation it’s easy to conclude that surface variation should

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 8/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

generally be represented in the microsurface map, not the


re ectivity map. For a given material type, re ectivity tends to
remain fairly constant. Re ection color tends to be neutral/white
for insulators, and colored only for metals. Thus, a map speci cally
dedicated to re ectivity intensity/color (commonly called a
specular map) may be dropped in favor of a metalness map.

When using a metalness map, insulative surfaces – pixels set to


0.0 (black) in the metalness map – are assigned a xed re ectance
value (linear: 0.04 sRGB: 0.22) and use the albedo map for the
diffuse value. For metallic surfaces – pixels set to 1.0 (white) in the
metalness map – the specular color and intensity is taken from the
albedo map, and the diffuse value is set to 0 (black) in the shader.
Gray values in the metalness map will be treated as partially
metallic and will pull the re ectivity from the albedo and darken the
diffuse proportionally to that value (partially metallic materials are
uncommon).

Again, a metalness map is not more or less physically accurate


than a standard specular map. It is, however, a concept that may
be easier to understand, and a metalness map can be packed into
a grayscale slot to save memory. The drawback to using a
metalness map over a specular map is a loss of control over the
exact values for insulative materials

Traditional specular maps offer more control over the the specular
intensity and color, and allow greater exibility when trying to
reproduce certain complex materials. The main drawback to a
specular map is that it generally will be saved as a 24 bit le
resulting in more memory use. It also requires artists to have a very
good understanding of physical material properties to get the
values right, which can be a positive or negative depending on your
perspective.

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 9/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

PROTIP: Metalness maps should use values of 0 or 1 ( some


gradation can be okay for transitions). Materials like painted metal
should not be set to metallic as paint is an insulator. The
metalness value should represent the top layer of the material.

IOR is another way to de ne re ectivity, and is equivalent to the


specular and metalness inputs. The biggest difference from the
specular input is that IOR values are de ned with a difference
scale. The IOR scale determines how fast light travels through a
material in relation to a vacuum. An IOR value of 1.33 (water)
means that light travels 1.33 times slower through water than it
does the empty vacuum of space. You can nd more measured
values in the Filmetrics Refractive Index Database.

For insulators, IOR values do not require color information, and can
be entered into the index eld directly, while the extinction eld
should be set to 0. For metals that have color re ections,you will
need to enter a value for the red, green and blue channels. This can
be done with an image map input (where each channel of the map
contains the correct value). The extinction value will also need to
be set for metals, which you can usually nd in libraries that
contain IOR values.

Using IOR as opposed to specular or metalness input is generally


not advised, as it is not typically used in games, and getting the
correct value in a texture with multiple material types is di cult.
IOR input is supported in Toolbag 2 more for scienti c purposes
than practical.

Fresnel
Fresnel is the percentage of light that a surface re ects at grazing
angles.

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 10/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

Fresnel generally should be set to 1 (and is locked to a value of 1


with the metalness re ectivity module) as all types of materials
become 100% re ective at grazing angles. Variances in
microsurface which result in a brighter or dimmer Fresnel effect
are automatically accounted for via the gloss map content.

Note: Toolbag 2 does not currently support a texture map to


control Fresnel intensity.

Fresnel, in Toolbag 2 and most PBR systems, is approximated


automatically by the BRDF, in this case Blinn-Phong or GGX, and
usually does not need an additional input. However, there is an
extra control for Fresnel for the Blinn-Phong BRDF, which is meant
for legacy use as it can result in non physically accurate results.

Ambient Occlusion
Ambient occlusion(AO) represents
large scale occluded light and is
generally baked from a 3d model.

Adding AO as a separate map as


opposed to baking it into the
albedo and specular maps allows
the shader to use it in a more
intelligent way. For instance, the AO function only occludes
ambient diffuse light (the diffuse component of the image based
lighting system in Toolbag 2), not direct diffuse light from dynamic
lights or specular re ections of any kind.

AO should generally not be multiplied on to specular or gloss


maps. Multiplying AO onto the specular map may have been a
common technique in the past to reduce inappropriate re ections
(e.g. the sky re ecting on an occluded object) but these days local
screen space re ections do a much better job of representing inter-
object re ections.

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 11/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

Cavity
A cavity map represents small
scale occluded light and is
generally baked from a 3d model or
a normal map.

A cavity map should only contain


the concave areas (pits) of the
surface, and not the convex areas,
as the cavity map is multiplied. The content should be mostly white
with darker sections to represent the recessed areas of the surface
where light would get trapped. The cavity map affects both diffuse
and specular from ambient and dynamic light sources.

Alternatively, a re ection occlusion map can be loaded into the


cavity slot, but be sure to set the diffuse cavity value to 0 when
doing this.

Finding Material
Values
One of the most di cult challenges when working with a PBR
system is nding accurate and consistent values. There are a
variety of sources for measured values on the internet, however, it
can be a real pain to nd a library with enough information to rely
on.

Quixel’s Megascan’s service is really useful here, as they provide a


large library of calibrated tiling textures scanned from real world
data.

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 12/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

Material values from most libraries tend to be measured from raw


materials in laboratory conditions, of which you rarely see in real
life. Factors like pureness of material, age, oxidization, and wear
may cause variation in the real world re ectance value for a given
object.

While Quixel’s scans are measured from real world materials, there
is often variation even within the same material type depending on
the various conditions described above, especially when it comes
to gloss/roughness. The values in the chart above should be
thought of as more of a beginning point, not a rigid/absolute
reference.

Creating Texture
Content
There are many ways to create texture content for PBR systems;
the exact method you choose will depend on your personal
preferences and what software you have available to you. Here is a
quick recap of the method I used to create the lens above:

First, basic
materials were
created in Toolbag
for each surface
type using a
combination of
tiling textures from
Megascans,
measured data
from known
materials, and
where lacking

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 13/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

appropriate reference, logic and observation, to determine the


values. Creating the base materials in Toolbag allows me to quickly
adjust values and offers a very accurate preview of the end result.
Often I assign base materials directly to my high poly model to get
a clear idea of how the texture will come together before doing the
nal bakes.

After setting up my base materials I brought the values and


textures into Photoshop and started layering them in a logical
manner. Brass at the bottom, nickel plating, matte primer, semi-
gloss textured paint, paint for the lettering, and nally the red
glossy plastic. This layering setup provides an easy way to reveal
the various materials below with simple masks.

Similar layering functionality can be achieved with applications


such as dDo, Mari and Substance Designer.

After I have my base layers set up and blended together to


represent various stages of wear, I added some extra details. First I
used dDo to generate a dust and dirt pass, and then I nished it off
with ne surface variation in the gloss map.

The exact method you use to create content for a PBR system is
much less important than the end result, so feel free to experiment
and gure out what works best for your needs. However, you
should void tweaking materials values to look more interesting in a
speci c lighting environment. Using sound base values for your
materials can greatly simplify the process, increase consistency
and asset reuse on larger projects, and will ensure that your assets
always look great no matter how you light them.

Artist Q&As
We’ve been very impressed with the work shown since Toolbag 2
has been released, and would like to take the opportunity to

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 14/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

highlight some exceptional pieces and ask the creators a few


questions related to PBR.

Wojciech Klimas
Wojciech Klimas is an artist from Poland who works at DNV,
currently working on the Survey Simulator project. Wojceich also
does freelance work. Check out his portfolio here:
www.wklimas.weebly.com

Q: What was the most di cult aspect of adapting to a PBR


work ow?

A: I think the most di cult thing to remember is to maintain


accurate albedo, re ectance, and roughness values. You can
always cheat and adjust values to look good in one speci c lighting
condition, but this may look bad in other lighting conditions. If you
do this correctly, with physically accurate values, it will look good in
all conditions, as nothing looks better than reality. 🙂

At the beginning I had Photoshop on one screen and reference


charts with re ectance values of different materials on the other,
however as you gain experience it becomes easier, and you don’t
need to check values as often.

Q: How do you decide which values to use for your materials?

A: By researching values from the internet. Measuring myself is


way out of my reach, but I would like to try this myself, as I feel like
I could learn a lot.

Q: Can you share a tip for being awesome?

A: This is a hard question. The best advice I can give is to learn


physics. 🙂 It really helps to understand why materials behave the

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 15/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

way they do. There is no shortcut to being awesome, you just have
to practice, practice, practice.

Joeri Vromman
Joeri Vromman is an artist from Belguim who is going to school at
DAE, and is also available for freelance work between his studies.
See more of work here: www.joerivromman.com

Q: What was the most di cult aspect of adapting to a PBR


work ow?

A: The hardest part was piecing together information from various


sources, being a single artist I did not have access to the tools and
resources that many studios have, which seemed very
overwhelming at rst. However, once you dive in, and become more
familiar with the process, it comes together quite quickly. With
experience, it became apparent that the step wasn’t all that big,
and that making textures for a physically based shader can be a lot
faster.

Q: How do you decide which values to use for your materials?

A: The way I like to work consists of the following steps:

Gather reference for each material type/part of the object


Start by doing a rough block in for each material type, this
doesn’t have to be exact but should be close enough so that
you have a good base to start tweaking from.

For each material I start with the re ectance value, these can be
found in various charts online, if I can’t nd a re ectance value for
a certain material, I try to determine it with logical reasoning (ie,

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 16/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

worn out rubber will be less re ective, brass is a mix of copper and
zinc, etc).

Re ectance values are the easiest to start off with, and give you a
good base for the other maps. For insulators, its important to keep
to keep the values within the small range that non-metals typically
re ect. For metals, its important to make the diffuse black rst, and
then nd the appropriate re ectance value. After this I will assign a
quick roughness value, usually by just sorting materials into 3
categories (shiny, middle or rough). Then I pick an albedo color,
paying attention here to keep things consistent and not too dark. I
also toggle through various skies to make sure the materials are
consistent in a variety of lighting conditions. Once this initial stage
is over I fall back on observation for the ne tuning these values,
since every material is different, keeping in mind the concepts of
PBR. At this point I like to add a basic overlay to the normal map
for materials that have a strong surface variation, such as bumpy
plastic.

Its important to remember that values in the re ectance map only


change when there is an actual change in material.

Q: Can you share a tip for being awesome?

A: In my opinion, although certain things have gotten a bit easier


(like re ectance values to pick from), it doesn’t mean you can rely
solely on those. The key to getting believable materials is still
observation, and being able to convincingly translate what you see
into the nal texture.

References
Sebastien Lagarde’s Adopting a physically based shading
model
Sébastien Lagarde’s summary of Rendering Remember Me
Slideshow of Real Shading in Unreal Engine 4

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 17/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

Mike Seymour’s Monsters University: rendering physically


based monsters

 

RELATED POSTS

Viewer Integration Guide Writing C

Join our Newsletter

Enter email... SUBSCRIBE

Software Community Legal Connect


With Us
Toolbag Toolbag User Privacy
Hexels Group  Cookies support@marmose

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 18/19
8/2/2020 Physically-Based Rendering, And You Can Too! | Marmoset

Shop Hexels User  


Group 
 

© Marmoset LLC, 2020

https://marmoset.co/posts/physically-based-rendering-and-you-can-too/ 19/19

You might also like