30
Dec
13

Readings on Physically Based Rendering

Over the past two years I’ve done quite a bit of reading on Physically Based Rendering (PBR) and I have collected a lot of references and links which I’ve always had in the back of my mind to share through this blog but never got around doing it. Christmas holidays is probably the best chance I’ll have so I might as well do it now. The list is by no means exhaustive, if you think that I have missed any important references please add them with a comment and I will update it.

Linear Lighting and Shading

There is probably no point in talking about PBR, without first understanding why we should do all lighting and shading in linear space. This is why:

Physically based reflection models

Once we are convinced of the importance of linear lighting and shading we can move onto physically based reflection models.

Siggraph’s Physically Based Shading courses provide both an introduction (mainly by Naty Hoffman which is a must read) and in depth coverage of many PBR topics.

Other interesting talks from conferences include

TriAce’s Research department is doing some excellent work on PBR, unfortunately many of the presentations are in Japanese only. Of special note are the “Practical Physically Based Rendering in Real-Time” talk from GDC 2012 and the “How to Design Your Art Assets for Physically Based Rendering” talk from CEDEC 2012. The latter is in Japanese unfortunately, so if yours is a bit rusty then here is a translation.

The freely available “Programming Vertex  Geometry and Pixel Shaders” e-book provides a great introduction to PBR presenting many BRDFs with shader samples.

Then there is a wealth of information available through numerous blog posts:

BRDF Explorer by Disney Animation is a very useful tool for visualising a large number of BRDFs as well as creating your own.

If you don’t mind reading academic papers, some links to the original publications for various BRDFs

PBR for Artists

The maths of PBR is only half the story and mainly concern the graphics programmers. The other half, of more interest to artists, is how to author the texture assets. In contrast to the first days of PBR, there are now a few great presentations that focus on PBR texture authoring.

You can also find a modular implementation of the BlinnPhong BRDF model with demonstration of the impact of each term and sample source code in this blog post (shameless plug).

Physically based lights

Physically based shading focuses on how a material responds to light that bounces off the surface in a plausible way. To get better results one should consider the type of light that shines upon the surface as well. Point lights, typically used in games, do not have a counterpart in the real world so several attempts have been made recently to model more realistic, area, lights in games.

BRDFs in deferred rendering environments

A variety of BRDFs can easily be implemented in forward rendering architectures. Things become harder with deferred shading though due to the typically low amount of information we can store in a g-buffer. Anisotropic BRDFs are even harder to support, due to the need for a tangent vector. In many cases a single BRDF is enough to represent a variety of materials if you have the capacity to store glossiness and specular colour in the g-buffer. There are cases you might need more though. Some pointers to how people have address this problem so far:

  • Bake BRDFs in a 3D lookup table, each layer representing a different BRDF and within each layer addressed by (N.L, N.H). This method was used in STALKER’s deferred shading engine.
  • Another approach is to store Material IDs in the g-buffer and during the lighting pass branch to select the desired BRDF. This is the method used in Battlefield 3.
  • At Creative Assembly they use the stencil buffer to store the material ID and render each BRDF in a different pass.
  • And of course you can always forward render special-case BRDF materials. This is the approach followed recently by Ryse: Son of Rome to render specialised BRDFs.

Not directly related to deferred rendering, being more of a material authoring pipeline, Material Layering is receiving a lot of attention lately after Disney, Unreal Engine 4 and The Order:1886 successfully demonstrated the variety and complexity of materials that can achieve. In short, with this technique we bake parameters of a specific BRDF (that express different materials) into textures which can then be blended before the lighting pass either offline or in the shader. In The Order:1886 blending of different BRDFs is also supported albeit at a greater cost.

Importance Sampling

You will hear Importance Sampling being mentioned in the context of PBR, image based lighting and area lights, quite a lot so it is worth having an idea what it is all about. In short it is a method of sampling a function, image, cubemap etc with a set number of samples by assigning larger weight to important areas of the sampled function (or image, or cubemap). This way we can achieve better representation of the signal without actually increasing the number of samples. This method was feasible only in offline rendering but GPUs are catching up.

  • GPU-based Importance Sampling, a method of sampling environment maps for image-based lighting using BRDFs. More information about this work here.
  • Killzone: Shadowfall uses importance sampling to sample area lights
  • If you have the ShaderX7:Advanced Rendering Techniques book it is worth reading the “Efficient post processing with Importance Sampling” chapter by Toth, Szirmay-Kalos and Umenhoffer

Tonemapping

Not directly related to PBR, but when normalising a BRDF the specular highlight intensity can easily reach values above 1 and appear to burnout. For that reason we typically combine PBR with a tonemapping solution. A few pointers to get you started:

Shader Antialiasing

Again, this topic is not directly related to PBR, but it is a shame to make all that effort to create realistic materials only to have specular highlights crawl and shimmer as the camera moves and surfaces look flatter at a distance.

  • Togsvig presented a cheap and nice looking method to adjust the specular power based on the mipmapped normal variation. Stephen Hill has created a WebGL demo of this technique.
  • Stephen Hill’s Rock Solid Shading Siggraph talk as well as the related blog post on Specular AA are a must read.
  • Spectacular Specular-LEAN and CLEAN specular highlights by Dan Baker details the Specular AA technique used in Civilisation 5 as well as describing the specular aliasing problem.
  • Frequency Domain Normal Map Filtering, the specular AA method used in The Order:1886 is based on, calculates an NDF for each texel of the normal map using all normals from the highest-resolution mip level that contribute to a single lower-resolution texel. This NDF is then convolved with the BRDF. The produced BRDF that properly accounts for the variance of all normal map texels for a specific pixel.
  • In this blog post Matt published a sample application that implements and showcases popular specular AA techniques including Frequency Domain Normal Map Filtering, well worth a look.

I focused on materials readily available on the Internet. There are books worth looking at if you want to find more info though, such as:

  • Physically Based Rendering by Matt Pharr and Greg Humphreys, with source code
  • Real-Time Rendering, by Tomas Akenine-Möller, Eric Haines, and Naty Hoffman
  • High Dynamic Range Imaging: Acquisition, Display, and Image-Based Lighting 2nd edition by Erik Reinhard, Wolfgang Heidrich, Paul Debevec, Sumanta Pattanaik, Greg Ward and Karol Myszkowski
  • “An Efficient and Physically Plausible Real Time Shading Model” by Christian Schüler in ShaderX7 – Advanced Rendering Techniques

As I’ve already mentioned, this list is not exhaustive, if you think that I have missed an important link or topic please add it to the comments sections.

Enjoy!

Edit 27/07/2014 – Added Bioshock Infinite PBR posts, PBR Encyclopedia, and Photoshop PBR Plugin.

Edit 11/04/2014 – Replaced broken WebGL gamma correction demo link, thanks to Peter Liu for the heads up.

Edit 27/03/2014 – Added Crytek’s GDC2014 presentation, “The tech of Crytek’s Ryse: Son of Rome” suggested by Sébastien Lagarde and the BRDF wiki page suggested by Peter Liu.

Edit 23/03/2014 – Added “Physically based shading in Unity5″, “The Order: 1886″ GDC2014 talks as well as Hable’s Filmic Worlds blog links.

Edit 25/02/2014 – Added “Introduction to PBR for artists” article by John Hable to the PBR for Artists section.

Edit 23/02/2014 – Added “Introduction to PBR” article by Marmoset to the PBR for Artists section.

Edit 11/01/2014 – Added “Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs” technical report as well as Russell’s “Basic Theory of Physically-Based Rendering” article.

Edit 31/01/2014 – Added PBR for Artists video by Andrew Maximov

Edit 03/01/2014 – Added  “An Efficient and Physically Plausible Real Time Shading Model” ShaderX7 book chapter reference kindly suggested by Sébastien Lagarde

Edit 31/12/2013 – Added a few missing links kindly suggested by Sébastien Lagarde and Aras Pranckevičius

 

About these ads

10 Responses to “Readings on Physically Based Rendering”


  1. January 31, 2014 at 6:43 am

    Hey there Kostas. Great collection, thanks!
    Here’s something you might also find useful:

    cheers

  2. 5 Nes
    March 29, 2014 at 1:19 pm

    I’ve hosted a mirror of the Gamma correction WebGL demo here, for anyone interested: https://dl.dropboxusercontent.com/u/3017460/WebGL/index.src.htm

  3. 7 peter liu
    April 8, 2014 at 1:42 pm

    hello!

    in your “Linear Lighting and Shading” part

    there is an list “Devmaster has a nice WebGL demo on Gamma correction (EDIT: unfortunately this demo does not seem to work for me anymore. EDIT 2: there is a mirror of that demo here). ”

    the origin website link maybe comes from here(it looks ok)

    http://www.nutty.ca/?page_id=352&link=gamma_correction


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: