Deferred Pipeline w/ Physically Based Shading

Hello everybody!

I would like to present my deferred pipeline, proudly based on Panda3D.
It is completely open source, you can find the code at https://github.com/tobspr/RenderPipeline (where you can also track my progress).

The pipeline uses physically based shading, aiming to get as realistic results as possible. You can find a list of all features at the github repo.
Keep in mind that this is a work in progress, I will regulary update this thread and add new screenshots.

Furthermore, I would like to thank rdb, for all his support and assistance, without him this project wouldn’t have been possible!

[size=150]Demo Scenes[/size]

Below you can find a few scenes I prepared to show the features of the pipeline. Please notice that most of the models are not mine, many are from Blendswap, the licenses can be found with the scenes. However, I modified that models to use physically based shading, and retextured almost everything.

[size=130]Terrain[/size]

[size=130]Reflections Test[/size]

(Full Res)

Full res

[size=130]Terrains[/size]
The terrain renderings use my P3DFramework to generate and render the terrain mesh:

Full Res

[size=130]Sponza[/size]

This is the Dabrovic Sponza scene, which is a simplified version of the Crytek Sponza scene. I converted all materials to use physically based shading, and also added normalmaps. The spona scene is rendered at 30 FPS currently on my GTX 670.


[size=130]Roaming Ralph[/size]

This is the roaming ralph demo (with some replaced models), running in my pipeline:

Some tests with atmospheric fog:

[size=130]Couch[/size]

This scene shows a couch, using different light types to try to achieve a realistic looking result. Additionally temporal occlusion is used to fake global illumination. There is no actual global illumination enabled, as screen space occlusion achieves better results for smaller scenes.

[size=130]Feature tests[/size]

Below you can find multiple screenshots which each demonstrate a certain feature. They are not aimed for realism, but to show that specific feature:

Transparency
With the newest version of the pipeline, order independent transparency is supported. This is still highly experimental, however here is a screenshot of the first results (I still did not figure how to render realistic glass):
NOTICE: Transparency is not yet supported in v2, but I am working on it.

IES Light Profiles

IES Light profiles can be downloaded from the manufacturers website, and represent the light spectrum/distribution. The pipeline supports loading .ies files directly.

Metallic Lighting
This demonstrates the lighting model used for metallic objects:

[size=150]Further Screenshots:[/size]

You can find a lot more screenshots at https://www.dropbox.com/sh/dq4wu3g9jwjqnht/AAABSOPnglDHZYsG5HXR-mhWa

1 Like

OMG you are using github :smiley:

The list of features looks… well, wow.

As I understand a recent devel build is needed? One that has a ComputeNode class… and also a recent gpu supporting glsl 440?

Oh, well, I look forward to the fallback solution :mrgreen:

Well, the features aren’t all implemented yet, I’ll implement them step by step and keep posting updates :slight_smile:
You’d have to get a recent devel build (rdb added Compute Shaders a week ago or so, big thanks for that!), and I think glsl 430 would be enough. The fallback solution
will get the same result, except it doesn’t profit from early light culling, which might give a 20-30% performance hit or so … I’d have to test that when I implement it :slight_smile:

That looks like more impressive work, especially given the list of intended features! :slight_smile:

Update

  • Compute shaders are no longer required. They were slower than using old-style fragment shaders :frowning:
  • Shadows added. Although I have some performance problems, but I’m working on that
  • Minor changes, for detailed information see github commits :slight_smile:

Update

  • Basic SMAA added (Todo: Reprojection). Screenshots will follow soon.

I like that car … Good job Tobias … God bless you :smiley: :smiley: :smiley:

I finally got myself a devel version and tried to run your code, but my gpu is no good (GL_ARB_gpu_shader5 and GL_ARB_shader_image_load_store missing, Version number not supported by GL2).

Any chance of making a even simpler version that could run on glsl 330?

Newer OpenGL version support usually comes with more recent drivers. Which drivers do you have, and which GPU do you have?

I’ve got a Radeon HD 3850 (or 3870? not sure here, codename RV670), the driver is from 2012-07-03. I’ll check if there is something newer, but looking at the wikipedia page on Radon it looks like it supports only up to OGL 3.3.

Right, that’s a very old card. You won’t be able to use the deferred pipeline as it makes heavy use of OpenGL 4 features. You would require a 5000 series card at the very least.

… In that case, I’m not even going to try: I have an even older card than Wezu’s, I believe (an HD 3650, to be specific). ^^;

Well, when I would disable per-tile light culling and some other features I actually could make it run on gl 3.3. The problem with that is, old cards are already much slower, and with that they would get even more slower … The opengl 4.0 features I use are mainly for performance …

If somebody really wants, I can try to make a 3.3 version, though :slight_smile:

It would have to be a much simpler version. If it supported point, spot and directional lights, some material properties (shininess if nothing else), some sort of shadows (2-3 sources, just 1 is also good) and some way to deal with transparancy, and run at 30-60fps on me good 'ol gpu, then I would LOVE it.

I’m not sure whats under the hood in unreal tournament 3, but that’s about the best my pc can run, and that’s what I’d expect in a deferred renderer (+aa, ut3 had none afaik).

For my computer it probably wouldn’t be worth it: I fully realise that this computer is somewhat weak for many new games, and don’t really expect shading such as you’ve demonstrated to work on it. ^^;

Good news … OpenGL 4.0 (or newer version) available on Intel HD graphic … But only windows and MacOS.

en.wikipedia.org/wiki/Intel_HD_and_Iris_Graphics

But I hope old computer and Linux user can run it … (almost support version 3.3).

Update:

  • Lots of minor changes
  • Scattering!
  • Added new screenshots

Interesting project.

Did you generate that Minecraft world or is it a simple mesh import?

Furthermore. What do you use for the UI (the one on the upper left)? Looks so neat and clean.

That really is lovely, and impressive–that Sponza scene in particular!