Computer Graphics Tutorial - PBR (Physically Based Rendering)

  Рет қаралды 29,815

Victor Gordan

Victor Gordan

Күн бұрын

In this video I will show you the basics of PBR and how to implement it into your 3D renderer.
Discord Server
/ discord
Patreon
/ victorgordan
Timestamps
00:00 Intro
00:10 PBR Traits
01:51 The Rendering Equation
03:57 The BRDF
05:21 Diffuse Lighting
06:05 Specular Lighting
07:16 Normal Distribution Function
07:59 Geometry Shadowing Function
09:06 Fresnel Function & Overview
09:20 Rules of thumb
09:56 Implementation
12:23 Metals
13:03 Implementation Overview
13:16 Outro & Questions
References
learnopengl.com/PBR/Theory
www.codinglabs.net/article_phy...
en.wikipedia.org/wiki/Bidirec...
en.wikipedia.org/wiki/Oren%E2...
www.gamedev.net/blogs/entry/2...
computergraphics.stackexchang...
blog.selfshadow.com/publicati...
graphicrants.blogspot.com/2013...
en.wikipedia.org/wiki/Oren%E2...
google.github.io/filament/Fil...
#computergraphics #CG #PBR

Пікірлер: 85
@fudgeracoon2529
@fudgeracoon2529 2 жыл бұрын
Never thought I'd find a well explained video or article of PBR. Thank you!
@VictorGordan
@VictorGordan 2 жыл бұрын
I'm glad you find it well explained! :)
@thedebapriyakar
@thedebapriyakar Жыл бұрын
Absolutely fucking incredible. I learnt more in this 13 minute video than I could in the past 3 months.
@grandpabazi3332
@grandpabazi3332 Жыл бұрын
Spectacular bro! Definitely the most explicit video I have watched about pbr !
@cory99998
@cory99998 7 ай бұрын
thank you! Very comprehensive
@iamarugin
@iamarugin Жыл бұрын
This is the best explanation of PBR I've ever found, thanks! It would be great to get IBL, GI and other stuff explained as well.
@unexpectedbehavior
@unexpectedbehavior Жыл бұрын
Best explanation I've found thus far! Thank you so much!!
@VictorGordan
@VictorGordan Жыл бұрын
You're welcome! ^-^
@sotrh7974
@sotrh7974 2 жыл бұрын
This is a really well done explanation. I particularly like that you explained this like why certain terms are moved out of the function or excluded entirely.
@VictorGordan
@VictorGordan 2 жыл бұрын
Thanks! :3
@seanpreston4023
@seanpreston4023 2 жыл бұрын
This content is absolutely fantastic keep up the good work bro!
@VictorGordan
@VictorGordan 2 жыл бұрын
Thanks! :3
@CodeParticles
@CodeParticles 2 жыл бұрын
Bravo! Absolute genius my friend. I've been using the phong shader model for months now and this makes it much less dreadful to jump into PBR based rendering, thank you~ 👏👏👏
@VictorGordan
@VictorGordan 2 жыл бұрын
You're welcome :)
@starklosch
@starklosch 2 жыл бұрын
Long time waiting for this. Well done. 5:42 it's not what I expected but I'm satisfied.
@VictorGordan
@VictorGordan 2 жыл бұрын
Thanks Starklosck :) What do you mean it's not what you expected? You thought I'd cover them both in the same video :-? If I would have done that then it would have been a short comparison. This way if I make a whole video on them I can go a bit more in depth ;)
@VinodSV
@VinodSV Жыл бұрын
For the first time, I felt PBR is not that difficult! Great tutorial!
@VictorGordan
@VictorGordan Жыл бұрын
Thx, good to hear it was easy for u to understand! :)
@danielgmjr
@danielgmjr 2 жыл бұрын
What an underrated video, you're a chad and a savior! Thanks for the vídeo!
@VictorGordan
@VictorGordan 2 жыл бұрын
Thank you! 😎
@hatsunishimura9875
@hatsunishimura9875 2 жыл бұрын
Truly amazing!
@VictorGordan
@VictorGordan 2 жыл бұрын
Thx! :d
@Will-Eves
@Will-Eves 2 жыл бұрын
Amazing video! I loved the explications!
@VictorGordan
@VictorGordan 2 жыл бұрын
Thank you for the compliment :)
@dontbealoneru
@dontbealoneru 2 жыл бұрын
It is Amaizing!
@paulooliveiracastro
@paulooliveiracastro 7 ай бұрын
This video is gold
@tansakdevilhunter9462
@tansakdevilhunter9462 2 жыл бұрын
Great tutorial..👍👍👍 Please do an Image Based Lighting tutorial
@VictorGordan
@VictorGordan 2 жыл бұрын
Thank you! I will do IBL, don't worry ;)
@gregwaste2594
@gregwaste2594 2 жыл бұрын
Easiest and fastest sub on a yt channel EVER. for once yt recommendations worked like a charm.
@VictorGordan
@VictorGordan 2 жыл бұрын
Good to see the algorithm is on my side :3
@bovineox1111
@bovineox1111 Жыл бұрын
This is super. Thank you so much. I have custom lighting in my game and I would like to explore adding some elements of PBR in my game as cheapily as possible. Adding metallic property looks very cheap. It makes me wonder if this is how a lot of fakery is going on in things like Red Matter 2 for instance.
@VictorGordan
@VictorGordan Жыл бұрын
I think the metallic property looks cheap because you need to add some nice textures and normal maps on top of it + proper ambient lighting ;)
@orocimarosay1447
@orocimarosay1447 2 жыл бұрын
the best explanation of this topic
@VictorGordan
@VictorGordan 2 жыл бұрын
I'm glad you found it useful! :)
@DaBretema
@DaBretema 2 жыл бұрын
Just a side note to this amazing video: - Fresnel tend to be VdotN not VdotH to get that rim effect. - You could set the max of dot product to 0.005 instead of 0.0 to avoid some artifacts on the border of rounded meshes. Cheers ✌
@VictorGordan
@VictorGordan 2 жыл бұрын
Do you have any sources for the VdotN for Fresenl? I believe most I've seen are VdotH 🤔
@VictorGordan
@VictorGordan 2 жыл бұрын
I did google it but most of the sources I found used VdotH 😅 But yeah, this source does indeed use VdotN. I'm still not convinced since this is from 2003, while the articles I reference in the description (UE4 & some Google thing) are much newer and use VdotH. But I'll look into it further 🤔
@VictorGordan
@VictorGordan 2 жыл бұрын
Here is another interesting source on the topic: www.gamedev.net/forums/topic/697139-pbr-fresnel-color-bandingwrong-formula/5380998/ So what I'm getting is that VdotH is usually more realisticish, but VdotN gives that "aura" effect which might be desirable in some cases 🧐
@HylianEvil
@HylianEvil 2 жыл бұрын
Omg I'm in love
@letssee9151
@letssee9151 2 жыл бұрын
Hey Victor! Super elegant explanation! Thank you!!!!!! However, I am confused about the terms of geometry obstruction and Shadowing in the BRDF equation. They are both described if you can see a piece of geometry from the camera. Why keep them both?
@VictorGordan
@VictorGordan 2 жыл бұрын
Thank you! To be honest I can't give you the exact reason for which they are both important. It's because of some mathematical thing with statistics I think (might be wrong). Sort of how you have a probability for something to fail and for something to pass, and in some equations you need both (like the binomial equation of probability for ex). I hope that slightly clears things up...
@user-li3zl8uz9t
@user-li3zl8uz9t 2 жыл бұрын
Hey I noticed that you are planing to make a series of videos about physics with opengl in your q&a video. but in my opinion there are KZbinrs who already have tutorials on physic using bullet. What about physics but fluid physics and cloth with tearing. It would be nice if you can include them
@VictorGordan
@VictorGordan 2 жыл бұрын
Yeah, I plan on covering multiple Physics stuff
@user-li3zl8uz9t
@user-li3zl8uz9t 2 жыл бұрын
@@VictorGordan ❤️❤️❤️
@user-ru9rm3rc7u
@user-ru9rm3rc7u 3 ай бұрын
Love your tutorial! Thanks! Could you share your slides?
@VictorGordan
@VictorGordan 3 ай бұрын
They are not slides, just images/videos in a video haha
@bob_frazier
@bob_frazier 2 жыл бұрын
Whoa.
@paulooliveiracastro
@paulooliveiracastro 7 ай бұрын
Question: GLTF materials also specify an occlusion factor (usually in the form of a texture). How do we take it into account using this model? How does it affect the final equation?
@paulooliveiracastro
@paulooliveiracastro 7 ай бұрын
If I understood correctly, it just affect ambient light. So we just multiply Li by (1 - acclusion) if the light i is ambient. Is that right?
@VictorGordan
@VictorGordan 7 ай бұрын
If that's what you've read, then I guess that's how you should apply it. To me "occlusion" sounds like something in which it's hard for light to get into, like the space between two planks or a crack in a rock. To me for those it would make more sense to simply multiply occlusion (assuming 0= no light 1=lots of light) with the final result...
@akriminsoe5527
@akriminsoe5527 2 жыл бұрын
Pls upload tutorial about physics with bullet physics library. There are a little tutorials about physics in KZbin
@akriminsoe5527
@akriminsoe5527 2 жыл бұрын
I really want to learn physics. But I can't find great tutorials. So
@guidocampuzano4665
@guidocampuzano4665 2 жыл бұрын
Hi Victor! Please make a roadmap yo become a rendering engineer!!
@VictorGordan
@VictorGordan 2 жыл бұрын
Maybe if I was a rendering engineer I could haha From what I've read online though, it seems that you should just do a lot of personal projects with computer graphics, get to know about a lot of random rendering techniques, start a job in programming (not CG), and after you got a few years of professional programming on your back, apply for CG roles. They are quite rare and usually look for Senior CG programmers, so it seems kinda hard to get into it :c
@yooyooman3d
@yooyooman3d 2 жыл бұрын
👍
@VictorGordan
@VictorGordan 2 жыл бұрын
👌🏻
@manasraut9825
@manasraut9825 2 жыл бұрын
Can someone plzz explain why did we use summation instead of integral?
@VictorGordan
@VictorGordan 2 жыл бұрын
At the end of the day an integral is basically an infinite summation as I said in the video. The only way to add up an infinite amount of numbers is by spotting a patern that then allows you to reduce that summation to a simple formula. Sadly some integrals cannot be reduced to simple formulas, and these are called "nonelementary functions". So in order to solve these sort of integrals, numerical methods are used. In this case I use a simple method where I simply assume the integral to be formed of a finite amount of elements... and so I use a sum :) Another reason would be that I use point lights in this example, so there will of course be a discrete amount of light rays affecting one pixel (one light ray per light). In the next video with IBL you'll see that this won't be the case anymore ;)
@manasraut9825
@manasraut9825 2 жыл бұрын
@@VictorGordan Now I got it !! Btw great video 👍
@kingclare9202
@kingclare9202 2 жыл бұрын
And in the code, where does the viariable F0 come from?
@VictorGordan
@VictorGordan 2 жыл бұрын
It is user defined, it's the value for the Fresnel effect at a normal angle (90 degrees)
@blasttrash
@blasttrash 2 жыл бұрын
what programming language is that? c#?
@VictorGordan
@VictorGordan 2 жыл бұрын
As I said in the video, it is pseudocode that uses a syntax similar to C. Def from google: "Pseudocode is an artificial and informal language that helps programmers develop algorithms"
@CodAv123
@CodAv123 2 жыл бұрын
It's so more or less exactly GLSL syntax, as the built-in functions and types are identical to what's shown in the pseudocode. Need to use proper uniform and in/out declarations though as well as using texture samplers instead of using constant values for the whole object. Using this in the example would be specific to a single shading language and though less generic.
@SAMUSTORM
@SAMUSTORM 2 жыл бұрын
😻
@VictorGordan
@VictorGordan 2 жыл бұрын
🐶
@austinkim9402
@austinkim9402 2 жыл бұрын
PBR - Peanut Butter & Rjelly
@VictorGordan
@VictorGordan 2 жыл бұрын
If u search pbr on google, the first result will likely be Professional Bull Riders lmao
@pifre3051
@pifre3051 2 жыл бұрын
@@VictorGordan lmao, I get that result so much when searching it, I think it's dumb, gotta give Professional Bull Riders some credit anyway for being the first search result.
@valerymayatskiy9306
@valerymayatskiy9306 7 ай бұрын
12:06 what do you mean by that?
@VictorGordan
@VictorGordan 7 ай бұрын
I just said that using those variables you can calculate the BRDF. I explain what that is around 04:00
@valerymayatskiy9306
@valerymayatskiy9306 7 ай бұрын
@@VictorGordan I mean what means "don't forget to omit Ks"
@VictorGordan
@VictorGordan 7 ай бұрын
Around 07:00 I explain the reason
@VictorGordan
@VictorGordan 7 ай бұрын
But basically, in this case I use the Cook-Torrance function for specular lighting (not the only function that can be used) and this function includes kS (named F in the Cook-Torrance function) within itself. So then kS must be taken out of the BRDF equation since otherwise u'd have kS^2 doubling the Fresnel effect for no good reason
@valerymayatskiy9306
@valerymayatskiy9306 7 ай бұрын
@@VictorGordan Thanks!
@josephbyers3899
@josephbyers3899 2 жыл бұрын
"okeh" lmao
@VictorGordan
@VictorGordan 2 жыл бұрын
👌
@kingclare9202
@kingclare9202 2 жыл бұрын
Why isn't the halfway vector divided by 2
@VictorGordan
@VictorGordan 2 жыл бұрын
In general or where exactly?
@akriminsoe5527
@akriminsoe5527 2 жыл бұрын
but how we load PBR models. pls upload about that. I am having problems with loading PBR models.
@chevlonmacguinstudios
@chevlonmacguinstudios 2 жыл бұрын
Seems pipeline engines are niche, great illustration surprised your subscriber bases so low, maybe it's to fast passed for some not sure, or maybe unreal engines monopoly on the term Free's eroded the hard work.
@kushagra64
@kushagra64 2 жыл бұрын
Well actually, in the original paper there was a pi
@beaumanVienna
@beaumanVienna 2 жыл бұрын
k_d + k_s + k_metal = 1
Physics and Math of Shading | SIGGRAPH Courses
38:35
ACMSIGGRAPH
Рет қаралды 96 М.
Which one will take more 😉
00:27
Polar
Рет қаралды 81 МЛН
Did Blender Just Change Animation Forever?
11:17
Smeaf
Рет қаралды 479 М.
How do Video Game Graphics Work?
21:00
Branch Education
Рет қаралды 3 МЛН
How Ray Tracing (Modern CGI) Works And How To Do It 600x Faster
32:06
Josh's Channel
Рет қаралды 538 М.
How Big Budget AAA Games Render Clouds
10:45
SimonDev
Рет қаралды 251 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,3 МЛН
What Is A Graphics Programmer?
30:21
Acerola
Рет қаралды 356 М.
Coding Adventure: Rendering Text
1:10:54
Sebastian Lague
Рет қаралды 528 М.
This Is Ray Tracing Supercharged!
8:17
Two Minute Papers
Рет қаралды 147 М.
Intro to Graphics 17 - The Rendering Equation
59:27
Cem Yuksel
Рет қаралды 10 М.
100 Hours Of Graphics Programming
6:48
Tantan
Рет қаралды 141 М.