Deferred Pipeline w/ Physically Based Shading

Return to Showcase

Deferred Pipeline w/ Physically Based Shading

Postby tobspr » Sun Jun 22, 2014 3:08 pm

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!

Demo Scenes

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.

Terrain
Image

Reflections Test

(Full Res)
Image

Full res
Image

Image


Terrains
The terrain renderings use my P3DFramework to generate and render the terrain mesh:

Full Res
Image

Sponza

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.

Image
Image

Roaming Ralph

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

Some tests with atmospheric fog:

Image

Couch

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.

Image

Feature tests

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.

Image

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.

Image

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

Image

Further Screenshots:

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



Image
Last edited by tobspr on Fri Apr 15, 2016 1:45 pm, edited 110 times in total.
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby croxis » Sun Jun 22, 2014 9:47 pm

OMG you are using github :D
David - Proud to be saving the world since 1984
croxis
 
Posts: 578
Joined: Thu Feb 12, 2009 4:13 pm
Location: Portland, OR

Re: Deferred Pipeline (Another WIP)

Postby wezu » Mon Jun 23, 2014 9:51 am

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:
I may be totally wrong, cause I'm a dancin' fool.

NameError: global name 'elf' is not defined
User avatar
wezu
 
Posts: 1004
Joined: Tue May 19, 2009 1:03 pm

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Mon Jun 23, 2014 9:58 am

wezu wrote: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 :)
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 :)
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby Thaumaturge » Mon Jun 23, 2014 4:40 pm

That looks like more impressive work, especially given the list of intended features! ^_^
MWAHAHAHAHA!!!

I have a website now! It holds information and a dev-blog for my nascent video-game, A Door to the Mists.
User avatar
Thaumaturge
 
Posts: 1518
Joined: Sat Jun 07, 2008 6:34 pm
Location: Cape Town, South Africa

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Fri Jul 04, 2014 10:08 am

Update

- Compute shaders are no longer required. They were slower than using old-style fragment shaders :(
- Shadows added. Although I have some performance problems, but I'm working on that
- Minor changes, for detailed information see github commits :)
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Sun Jul 06, 2014 1:59 pm

Update

- Basic SMAA added (Todo: Reprojection). Screenshots will follow soon.
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby thien0291 » Sun Jul 06, 2014 10:18 pm

I like that car ... Good job Tobias ... God bless you :D :D :D
Sorry About My English
from HCMUS
thien0291
 
Posts: 47
Joined: Sun Dec 09, 2012 5:31 am
Location: vietnam

Re: Deferred Pipeline (Another WIP)

Postby wezu » Thu Jul 24, 2014 5:12 am

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?
I may be totally wrong, cause I'm a dancin' fool.

NameError: global name 'elf' is not defined
User avatar
wezu
 
Posts: 1004
Joined: Tue May 19, 2009 1:03 pm

Re: Deferred Pipeline (Another WIP)

Postby rdb » Thu Jul 24, 2014 7:14 am

Newer OpenGL version support usually comes with more recent drivers. Which drivers do you have, and which GPU do you have?
rdb
 
Posts: 10846
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Re: Deferred Pipeline (Another WIP)

Postby wezu » Thu Jul 24, 2014 8:06 am

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.
I may be totally wrong, cause I'm a dancin' fool.

NameError: global name 'elf' is not defined
User avatar
wezu
 
Posts: 1004
Joined: Tue May 19, 2009 1:03 pm

Re: Deferred Pipeline (Another WIP)

Postby rdb » Thu Jul 24, 2014 8:21 am

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.
rdb
 
Posts: 10846
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Re: Deferred Pipeline (Another WIP)

Postby Thaumaturge » Thu Jul 24, 2014 2:55 pm

... 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). ^^;
MWAHAHAHAHA!!!

I have a website now! It holds information and a dev-blog for my nascent video-game, A Door to the Mists.
User avatar
Thaumaturge
 
Posts: 1518
Joined: Sat Jun 07, 2008 6:34 pm
Location: Cape Town, South Africa

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Thu Jul 24, 2014 3:18 pm

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 :)
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby wezu » Thu Jul 24, 2014 4:29 pm

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).
I may be totally wrong, cause I'm a dancin' fool.

NameError: global name 'elf' is not defined
User avatar
wezu
 
Posts: 1004
Joined: Tue May 19, 2009 1:03 pm

Re: Deferred Pipeline (Another WIP)

Postby Thaumaturge » Thu Jul 24, 2014 6:29 pm

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. ^^;
MWAHAHAHAHA!!!

I have a website now! It holds information and a dev-blog for my nascent video-game, A Door to the Mists.
User avatar
Thaumaturge
 
Posts: 1518
Joined: Sat Jun 07, 2008 6:34 pm
Location: Cape Town, South Africa

Re: Deferred Pipeline (Another WIP)

Postby thien0291 » Fri Jul 25, 2014 9:47 pm

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

http://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).
Sorry About My English
from HCMUS
thien0291
 
Posts: 47
Joined: Sun Dec 09, 2012 5:31 am
Location: vietnam

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Tue Aug 05, 2014 7:39 am

Update:

- Lots of minor changes
- Scattering!
- Added new screenshots
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby unixfan » Tue Aug 05, 2014 4:30 pm

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.
unixfan
 
Posts: 32
Joined: Wed Feb 12, 2014 7:08 am

Re: Deferred Pipeline (Another WIP)

Postby Thaumaturge » Tue Aug 05, 2014 4:51 pm

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

I have a website now! It holds information and a dev-blog for my nascent video-game, A Door to the Mists.
User avatar
Thaumaturge
 
Posts: 1518
Joined: Sat Jun 07, 2008 6:34 pm
Location: Cape Town, South Africa

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Wed Aug 06, 2014 12:08 am

unixfan wrote: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.



Simple mesh import :) That was just for testing rendering & occlusion :) I use DirectGUI for the gui
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Sun Aug 10, 2014 12:11 pm

Update


- Directional Light shadows (no PSSM yet)
- Global Illumination! (very experimental)
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Sun Aug 17, 2014 4:23 am

Update:

- I've ported the Roaming Ralph sample to my pipeline. However, sorry, but the model is really bad, which is why the result doesn't look very good. I replaced the textures, but didn't alter the geometry:

Image
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby Thaumaturge » Sun Aug 17, 2014 10:13 am

Nevertheless, that looks very good: even with the dodgy models, there's an impressive sense of solidity to the scene (with the result that those trees look somewhat like papercraft).

By the way, in your "lighting only" screenshot, I note what looks like inaccurate shading at the base of the nearest column on the viewer's left--although I confess that I'm no expert in this, and so I may well be mistaken in my understanding of what I'm seeing.
MWAHAHAHAHA!!!

I have a website now! It holds information and a dev-blog for my nascent video-game, A Door to the Mists.
User avatar
Thaumaturge
 
Posts: 1518
Joined: Sat Jun 07, 2008 6:34 pm
Location: Cape Town, South Africa

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Sun Aug 17, 2014 11:59 am

Thaumaturge wrote:Nevertheless, that looks very good: even with the dodgy models, there's an impressive sense of solidity to the scene (with the result that those trees look somewhat like papercraft).

By the way, in your "lighting only" screenshot, I note what looks like inaccurate shading at the base of the nearest column on the viewer's left--although I confess that I'm no expert in this, and so I may well be mistaken in my understanding of what I'm seeing.


Yeah, you're absolutely right, that's because I'm working with a voxel grid, and the resolution is limited .. however, I'm working on that :)
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Wed Aug 20, 2014 4:48 pm

Update

- I've changed the GI to voxel cone tracing, this allows me cheap ao and reflections
- VIDEO: https://www.youtube.com/watch?v=dHBLPNNjkrg
- Notice this is an early beta!
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby tobspr » Sun Sep 21, 2014 6:48 am

Update

- More GI screenshots
- Another GI Improvement, the GI is now somewhat stable, and I have ~65 FPS with all features enabled. I'll see If I can get even more fps with some tweaking ..
User avatar
tobspr
 
Posts: 393
Joined: Wed Apr 10, 2013 11:03 am
Location: Germany

Re: Deferred Pipeline (Another WIP)

Postby ninth » Tue Sep 23, 2014 1:04 am

Just wanted to express my admiration. Excellent work!
Unfortunately at now I can seen only screenshots. A little later I'll try run it on the discrete video.
btw, Ithink It would be great if you include scene with different materials in the first sample.
Vodka, bears, balalaika... hmm... sorry for my English =)
ninth
 
Posts: 660
Joined: Fri Jan 23, 2009 9:06 am
Location: Russia

Re: Deferred Pipeline (Another WIP)

Postby spencere » Sat Sep 27, 2014 1:50 pm

Excellent work on this project.
- spencer
spencere
 
Posts: 2
Joined: Sun Sep 07, 2014 11:33 am

Re: Deferred Pipeline (Another WIP)

Postby veveve » Mon Dec 01, 2014 4:33 am

Awesome project! What version of Panda can I use to run it?
veveve
 
Posts: 4
Joined: Mon Dec 01, 2014 4:25 am

Next

Return to Showcase

Who is online

Users browsing this forum: No registered users and 1 guest