Physically Based Rendering // OpenGL Tutorial #43

preview_player
Показать описание
This video is (hopefully) a gentle introduction to Physically Based Rendering (PBR) using OpenGL. The topic itself is complex and relies on many years of research (by other people ;-) ). I tried to explain the mechanics and give some intuition into why they work this way.

Resources:
* 'OpenGL Shading Language Cookbook - 3rd Ed' by David Wolff

Timecodes:
0:00 Intro
0:49 What is PBR?
1:56 Simplified PBR equation
2:58 The BRDF
4:25 The Diffuse BRDF
6:47 The Specular BRDF
8:03 The Normal Distribution Function (GGX)
10:26 The Geometry Function (Schlick GGX)
12:11 The Fresnel Function (Schlick approximation)
14:23 Last two pieces of the PBR equation
14:44 Fragment shader code review
17:00 Outro

If you want to get the same version that was used in the video checkout the tag TUT_43_PBR.

Credits:
Images:
* kordula vahle from Pixabay (lago federa)
* Pau Llopart Cervello from Pixabay (ring)
* Clker-Free-Vector-Images from Pixabay
* OpenClipart-Vectors from Pixabay
* Anja-#pray for ukraine# #helping hands# stop the war from Pixabay
Videos:
Music:

Feel free to comment below.

Instagram: @ogldev1
Twitter: @ogldev

Enjoy,

Etay Meiri

#opengl #ogldev #opengtutorials
Рекомендации по теме
Комментарии
Автор

I must say this is the most clear PBR explanation with actual working code. How about add IBL in the next video~

claymans
Автор

very clear and applicable, great work! I had to read the book for it in my project.

furkanunsal
Автор

Im finding researching the topic with papers so difficult and this is just the perfect gateway for the subject

liorsky
Автор

Amazing tutorial, thank you so much for making this.

roness
Автор

Great content as usual Keep going and thanx for

asimovf
Автор

Hey, i have a question
Now, usually when calculating the reflection
We usually dont have the "light" vector
We would have a reflection vector, but that doesn't necessarily mean that the reflected ray would bounce of toward a light source.
Is it still what you meant by "light" vector?
Or do i have to somehow calculate the direction of the closest emitting material or something?
Thanks in advance!

hajjex_
Автор

nice tutorial and great explanation!! :)

xphereSpz
Автор

@OGLDEV, Thank you for this upload. I have a question on the reflection of objects you briefly mentioned @ 12:53? How would you reflect other objects when using PBR? When I was working on blinn-phong, I had to render a framebuffer object of my scene and then use that as a texture for my reflective objects to simulate reflection. Is it the same for PBR too or is it much easier to do? I've done PBR as well, but couldn't figure out how to reflect objects only the skybox, thank you!

CodeParticles
Автор

In your experience how much performance would cook Torrence cost compared to say just doing blinn phong?

jefferyduncan
Автор

When explaining the halfway vector, it looks like the light vector arrow is backwards. If I sum and normalise the two on screen, I'd get something below the surface.

Hector-bjls
Автор

one thing I don't understand, you say that alpha(roughness) = 0 means a perfectly smooth surface, that means it reflects all light, but when alpha is 0 than the whole normal distribution function D computes to 0 (since the numerator is 0*0), hence making the whole BRDF specular equal to 0, since D is multiplied for G and F .. Something I'm missing here?

MrFacciolone
Автор

Hi,
First of all thanks a lot for providing us these videos. I have a doubt in half vector calculation. Taking the direction of light vector into consideration, shouldn't the equation for calculating half vector be: half = normalize( view-light). As light + view would be more horizontal. Or the direction of the light vector should be opposite ( by which I mean that it should be multiplied with -1).

sumitmakkar
Автор

Hello, can you update the link to source please?

ToPGoP
Автор

How does shadow mapping work with PBR? Where do you apply the shadow value?

progfix
Автор

can you share the cpp file for this code

Deku-qb
Автор

For an ideal perfectly smooth surface, alpha=0. This makes D=0 because D is proportional to alpha^2. That makes SpecularBRDF=0. But I thought for smooth surface, Specular BRDF should be high

alakhaggarwal
Автор

Is the metallic shine of video games due to pbr or raytracing?

MrMariozzz
Автор

Wish math was explained more with code, as math guys like to have random function short names which sometimes you need to guess what it is...

spider