Тёмный

Computer Graphics Tutorial - PBR (Physically Based Rendering) 

Victor Gordan
Подписаться 12 тыс.
Просмотров 32 тыс.
50% 1

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

Опубликовано:

 

23 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 90   
@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 2 года назад
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 !
@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.
@cory99998
@cory99998 9 месяцев назад
thank you! Very comprehensive
@unexpectedbehavior
@unexpectedbehavior Год назад
Best explanation I've found thus far! Thank you so much!!
@VictorGordan
@VictorGordan Год назад
You're welcome! ^-^
@seanpreston4023
@seanpreston4023 2 года назад
This content is absolutely fantastic keep up the good work bro!
@VictorGordan
@VictorGordan 2 года назад
Thanks! :3
@atljBoss
@atljBoss Месяц назад
Perfect video! Thanks, I was able to implement it using WebGPU
@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 :)
@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
@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 ;)
@danielgmjr
@danielgmjr 2 года назад
What an underrated video, you're a chad and a savior! Thanks for the vídeo!
@VictorGordan
@VictorGordan 2 года назад
Thank you! 😎
@Will-Eves
@Will-Eves 2 года назад
Amazing video! I loved the explications!
@VictorGordan
@VictorGordan 2 года назад
Thank you for the compliment :)
@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! :)
@hatsunishimura9875
@hatsunishimura9875 2 года назад
Truly amazing!
@VictorGordan
@VictorGordan 2 года назад
Thx! :d
@dontbealoneru
@dontbealoneru 2 года назад
It is Amaizing!
@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
@paulooliveiracastro
@paulooliveiracastro 9 месяцев назад
This video is gold
@mr.hashundredsofprivatepla3711
@mr.hashundredsofprivatepla3711 2 месяца назад
It’s exciting to think about how happy the original mathematicians (e.g. Lambert, Fresnel, Phong etc.) would be to see all of their work finally come to life like this
@orocimarosay1447
@orocimarosay1447 2 года назад
the best explanation of this topic
@VictorGordan
@VictorGordan 2 года назад
I'm glad you found it useful! :)
@tansakdevilhunter9462
@tansakdevilhunter9462 2 года назад
Great tutorial..👍👍👍 Please do an Image Based Lighting tutorial
@VictorGordan
@VictorGordan 2 года назад
Thank you! I will do IBL, don't worry ;)
@danicl93
@danicl93 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
@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 ;)
@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...
@cipherjoe9
@cipherjoe9 Месяц назад
I really want to see a PBR renderer with Oren-Nayar shading.
@Test-iv4pm
@Test-iv4pm Месяц назад
How can we add subsurface scattering to the implementation?
@bob_frazier
@bob_frazier 2 года назад
Whoa.
@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 RU-vidrs 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 ❤️❤️❤️
@paulooliveiracastro
@paulooliveiracastro 9 месяцев назад
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 9 месяцев назад
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 9 месяцев назад
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...
@user-ru9rm3rc7u
@user-ru9rm3rc7u 5 месяцев назад
Love your tutorial! Thanks! Could you share your slides?
@VictorGordan
@VictorGordan 5 месяцев назад
They are not slides, just images/videos in a video haha
@mr.hashundredsofprivatepla3711
@mr.hashundredsofprivatepla3711 2 месяца назад
@@VictorGordanIn that case could you share the images?
@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)
@akriminsoe5527
@akriminsoe5527 2 года назад
Pls upload tutorial about physics with bullet physics library. There are a little tutorials about physics in RU-vid
@akriminsoe5527
@akriminsoe5527 2 года назад
I really want to learn physics. But I can't find great tutorials. So
@SAMUSTORM
@SAMUSTORM 2 года назад
😻
@VictorGordan
@VictorGordan 2 года назад
🐶
@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
@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.
@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.
@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.
@josephbyers3899
@josephbyers3899 2 года назад
"okeh" lmao
@VictorGordan
@VictorGordan 2 года назад
👌
@valerymayatskiy9306
@valerymayatskiy9306 9 месяцев назад
12:06 what do you mean by that?
@VictorGordan
@VictorGordan 9 месяцев назад
I just said that using those variables you can calculate the BRDF. I explain what that is around 04:00
@valerymayatskiy9306
@valerymayatskiy9306 9 месяцев назад
@@VictorGordan I mean what means "don't forget to omit Ks"
@VictorGordan
@VictorGordan 9 месяцев назад
Around 07:00 I explain the reason
@VictorGordan
@VictorGordan 9 месяцев назад
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 9 месяцев назад
@@VictorGordan Thanks!
@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
Далее
Physically Based Rendering // OpenGL Tutorial #43
17:31
doing impossible challenges✅❓
00:25
Просмотров 5 млн
Physics and Math of Shading | SIGGRAPH Courses
38:35
Просмотров 97 тыс.
High Dynamic Range (HDR) and Tone Mapping
7:35
Просмотров 46 тыс.
Shader Fundamentals - Image Based Lighting
11:43
Просмотров 46 тыс.
The Secret Behind Photorealistic And Stylized Graphics
35:00
We Need to Rethink Exercise - The Workout Paradox
12:00
Painting a Landscape with Maths
42:00
Просмотров 700 тыс.
doing impossible challenges✅❓
00:25
Просмотров 5 млн