SponzaPBR2

Base color, Roughness and Metallic textures for Sponza

A few weeks ago I decided to start using PBR in my engine. I used the same equations as in my PBR viewer, so the implementation was not relly comlicated. The part that took me most of the time was creating the Base Color, Normal, Roughness and Metallic textures for each materials in Sponza, so I thought it might worth sharing it if it can save someone some time. I used the textures provided as base, and created the missing ones with Substance Designer. So that’s why I should use “PBR” with quotes, the textures are far from being calibrated or scanned, it was mainly made to look ok and being able to test a quick PBR environnement. And I’m not an artist, so It may be better to consider this as “programmer art”.

February 5, 2015 · 2 min · Alexandre

DrawIndirect performances

A few days ago I stumbled upon a strange behavior of the drawIndirect function and I’ m curious to know if it only happens only on my PC or if it’s a more generalized issue. Currently in my engine I have a lot of objects drawn with drawInstanced(). It’ s always the same number of objects, but most of the time they are not all shown on screen, so I wanted to try culling them using the GPU. ...

October 25, 2014 · 3 min · admin

Integrating RenderDoc

A few days ago a new version of RenderDoc was released, and while reading the changelist I discovered that Temaran has made a really cool plugin which integrate RenderDoc directly in Unreal Engine 4. This is extremely useful. More than once I launched debugging from Visual Studio, found a weird bug, and had to launch it again from RenderDoc, trying to reproduce the bug. So I looked at the source code uploaded on Github by Temaran, removed the UE4 related code and only kept a single class to be able to load RenderDoc and trigger a capture directly from my engine. ...

September 26, 2014 · 3 min · admin

Improved shadows using dithering and temporal supersampling

To be able to implement volumetric lights I had to start with shadows for the sun light. As it wasn’t my primary focus I went for a straightforward shadow map implementation on a 2k texture. It’s easy and quick to code, but yeah, the results are ugly. I didn’t planned to implement a more advanced shadow map technique anytime soon, but I also didn’t want to stay with those ultra pixaleted shadows, so I tried to apply my two current favorite techniques: dithering and temporal supersampling :). Let see what it can do !

September 4, 2014 · 4 min · admin
VolumetricLights4

Volumetric lights

While waiting for a new computer that will make my experiments with voxels more comfortable (even a 64x64x64 grid is slow on my laptop) I decided to try some less expensive effects, starting with the volumetric lights as described in GPU Pro 5 by Nathan Vos from Guerilla Games.

August 16, 2014 · 6 min · admin
Shadows using a voxel grid

Dynamic shadow casting point lights for tiled deferred rendering

A while ago, I started to experiment working with voxels. More precisely, my idea was to test what could be possible if we had our scene fully voxelized. Dynamic shadows is one of those tests. For my tests I implemented a tiled deferred rendering engine, and one of the difficulties with tiled deferred is shadows. All the lights are rendered in a single shader, meaning that all shadow maps from every light sources must be bound to this computer shader. The last years have seen a lot of techniques increasing the number of simultaneous dynamic light sources (deferred, clustered, tiled deferred, forward+), but always ignoring shadows. Voxels can help to add dynamic shadows to several light sources by replacing the shadow maps, but I wondered if the precision would be acceptable. I described in a previous blog post the technique I used to dynamically voxelize a scene. I think there might be some ways to optimize this process, but that will be for an other blog post ! All the following screenshots and timmings are from a GTX 780, and the resolution is 1280x720. There is 32 point lights in the scene. First of all, here what the voxelized scene looks like with a 256x256x256 grid:

August 1, 2014 · 7 min · admin
Disney4

Implementation of the Disney principled BRDF

After reading the papers from the 2012 siggraph shading courses I really wanted to try the BRDF described by Disney. It’s possible to use the awesomeopen source tool BRDF explorer, but I really wanted to try it in my own renderer. You can download it here: PBRViewer. In his talk, Brent Burley describe the BRDF adopted by Disney and used for every materials in Wreck-it Ralph, except for hairs. He also explain how they come up with this BRDF, the tools they used, etc. The course notes are full of informations, it’s really something anyone interested in physically based shading should read. ...

April 22, 2014 · 3 min · admin
marble2

Tweaking the Cook Torrance BRDF

I’m still learning things about physically based shading using my PBRViewer, and this time, I wanted to be able to experiment the variations of the Cook Torrance BRDF. The Cook Torrance BRDF looks like this: This equation is composed of three distinct terms: F: The fresnel, represents how the reflectivity change at grazing angles. G: The Geometry term, represents the probability that a microfacet will be visible from the light and view directions. D The normal distribution term, defines the distribution of the orientation of the microfacets. For more infomations you can read the very interesting " Physics and math of shading" by Naty Hoffman. For each term there is more than one possibility, and you can choose according to your need, and your budget the terms of your BRDF. Even if GGX is becoming the new standard, I wanted to experiment the other possibilities. ...

April 11, 2014 · 2 min · admin
diffspec

Physically Based Shading, Metallic and Specular workflows

Physically based shading is more and more adopted and even if the core mechanism is pretty much always the same, the workflow may differ from an engine to another. For example let’s compare two common ones, often called Metallic and Specular. The metallic workflow uses a color input, the base color, and two scalar parameters, rouhghness and metallic. On a specular workflow there is two color inputs, an albedo and a specular, and a scalar, the roughness. ...

April 4, 2014 · 4 min · admin
Physically Based Rendering

Physically based rendering viewer

Physically based rendering is becoming the new standard for materials. It was already used a lot in AAA productions, and it’s now in Unreal Engine, Cry Engine and Unity. As a graphic programmer I’ve read a lot of papers and seen lots of presentation on that topic, but I never had the chance to try it. That’s why I made a small software, to be able to experiment both on a code and data point of view. ...

March 30, 2014 · 3 min · admin