Introduction to Phong Lighting

  Рет қаралды 17,247

Suboptimal Engineer

Suboptimal Engineer

Күн бұрын

Пікірлер: 56
@Byynx
@Byynx Жыл бұрын
It seems the best lightning tutorial so far.
@AstrusHD
@AstrusHD 2 ай бұрын
Honestly, i think your teaching style is awesome, everything was so clear and understandable. This is awesome man!
@SuboptimalEng
@SuboptimalEng 2 ай бұрын
Thanks Astrus 🫶
@justanotherhotguy
@justanotherhotguy Жыл бұрын
Tomorrow exam in real time computer graphics, thank you very much!
@SuboptimalEng
@SuboptimalEng Жыл бұрын
Good luck!
@stoup8778
@stoup8778 Ай бұрын
dude i have not been able to process the learnopengl tutorials on this topic, this made it so much easier to understand!
@SuboptimalEng
@SuboptimalEng Ай бұрын
Thanks! I feel that the learn OpenGL tutorials focus more on teaching the graphics API itself. I try to focus on teaching the math and theory behind shaders.
@JackLeiLing
@JackLeiLing 7 ай бұрын
Liked and subscribed! The most clearer explanation for this difficult topic. Super helpful. Many thanks
@SuboptimalEng
@SuboptimalEng 7 ай бұрын
I made the video because I was learning phong lighting and struggled to understand it. Glad it helped!
@Iridium.
@Iridium. 11 ай бұрын
You can use a halfway vector instead of reflect for better performance
@SuboptimalEng
@SuboptimalEng 5 ай бұрын
Recently learned about this watching Cem Yuksel’s Utah course!
@pingwinek_1337
@pingwinek_1337 Жыл бұрын
your voice is so soothing oh my gawddd
@SuboptimalEng
@SuboptimalEng Жыл бұрын
Guess I’ll have to start an ASMR channel now jk… unless 🤔😂
@pingwinek_1337
@pingwinek_1337 Жыл бұрын
@@SuboptimalEng UNLESS
@glebaltfromrovia9898
@glebaltfromrovia9898 3 ай бұрын
insanely simple and straight to the point! thanks
@SuboptimalEng
@SuboptimalEng 3 ай бұрын
🫡
@ksalarang
@ksalarang Жыл бұрын
Exactly what I was looking for, thanks. Keep up the good work
@online.python.dersim
@online.python.dersim 5 ай бұрын
Thank you very clear simple but enough detailed explanation especially graphics of the calculations are very useful thank you again for this great video
@SuboptimalEng
@SuboptimalEng 5 ай бұрын
Glad you found it useful!
@irice7
@irice7 3 ай бұрын
awesome video. also, what theme did you use for vscode?
@SuboptimalEng
@SuboptimalEng 3 ай бұрын
Thanks! I mainly use a customized version of gruvbox dark. The exact details are in my GitHub dotfiles repository.
@OrgStinx
@OrgStinx Жыл бұрын
Thanks, I appreciate this.
@thesituation5315
@thesituation5315 Жыл бұрын
Hi. I've been trying to learn how lighting works, and I'm having a really hard time with this. I understand the base of the whole idea, but the part I'm having a hard time with is how to make it work in 2D. I was wondering if you know how to port it to two dimensions? I can't really find anything online specifically regarding 2D phong shading.
@OrgStinx
@OrgStinx Жыл бұрын
Do you mean lighting in 2D world (e.g. for 2d games) or how to cast 3D world to 2D screen?
@MrMariozzz78
@MrMariozzz78 7 ай бұрын
i use opegl in dev c++ gl library i guess it pre 2.0 so it dont use GLSL ...can i use phong light with 2.0 pre.version?
@nexusplus4960
@nexusplus4960 Жыл бұрын
Hi when I import model in three js. model load with light what should I do??
@janreinsch9725
@janreinsch9725 8 ай бұрын
So, what I found confusing is that the vector is named lightSource... Isn't this actually the lightDirection and the lightSource is at a point infinitely far away, so that all light rays hit the scene at the same angle?
@SuboptimalEng
@SuboptimalEng 7 ай бұрын
Yea that’s a good question. I think a better name for the variable would be direction to light source from origin.
@janreinsch9725
@janreinsch9725 7 ай бұрын
@@SuboptimalEng Thanks for your answer! I named it relativeLightPos in my exercises, because that gives me the intuition that the light is always coming from the same direction for all objects of the scene
@SuboptimalEng
@SuboptimalEng 7 ай бұрын
@@janreinsch9725 That's great to hear! Happy to help a fellow graphics enthusiast.
@janreinsch9725
@janreinsch9725 7 ай бұрын
@@SuboptimalEng Thank you for these tutorials!
@diddy_dante
@diddy_dante Жыл бұрын
If fragment shaders work on a pixel by pixel basis, does the rasterizer also give eye-direction vector values for each pixel? I can't understand how else you could pull off specular lighting.
@SuboptimalEng
@SuboptimalEng Жыл бұрын
I fake the eye direction in the code, setting it to -1 in the Z axis.
@MichaelPohoreski
@MichaelPohoreski Ай бұрын
In the fragment shader you usually pass in the eye position as a uniform. Reading the Z Buffer you can reconstruct the fragment’s x, y, z position.
@calderarox
@calderarox Жыл бұрын
this is a really good video! thanks
@EliasWolfy
@EliasWolfy Ай бұрын
kind of off topic, but what theme do you use?
@SuboptimalEng
@SuboptimalEng Ай бұрын
A customized version of gruvbox dark 😎
@kevinto8955
@kevinto8955 Жыл бұрын
Yes more shaders! Curious, what was your roadmap for learning all this? I'm reading through the book of shaders, but once I'm off it, I feel totally lost :(
@SuboptimalEng
@SuboptimalEng Жыл бұрын
I started with the book of shaders and got stuck as well. Good to hear I’m not the only one who felt this way tbh. SimonDev’s GLSL shader course helped me learn a lot more quickly! I’ve talked about this more extensively on Twitter. And yep, I plan to make more videos on shaders 😊
@susussususuususuusuuususussusu
@susussususuususuusuuususussusu 5 ай бұрын
life changing lesson :0
@MichaelPohoreski
@MichaelPohoreski Ай бұрын
1:23 Phong lighting _hasn’t_ been common for the past decade. The problem with Phong is that it isn’t energy preserving. Using a physically correct BRDF replaced it.
@SuboptimalEng
@SuboptimalEng Ай бұрын
Gotta learn BRDFs next 🤓
@AllianceHalifax
@AllianceHalifax Жыл бұрын
where is the duck model in the code?
@SuboptimalEng
@SuboptimalEng Жыл бұрын
The duck model is included in the VS Code extension! I made a video explaining how to set it up 🙂
@ku16610
@ku16610 11 ай бұрын
Yes but not explaining how to show the duck model ...... @@SuboptimalEng
@ku16610
@ku16610 11 ай бұрын
Click on the glslCanvas left most icon at bottum to change object
@EliasWolfy
@EliasWolfy Ай бұрын
this is a shader being applied to the duck
@konigsberg72
@konigsberg72 Жыл бұрын
what's the song? 00:00
@javifontalva7752
@javifontalva7752 Жыл бұрын
Wonderful vid!! Can you make more vida on shaders?
@SuboptimalEng
@SuboptimalEng Жыл бұрын
That’s the plan!
@nebuladevelopments
@nebuladevelopments Жыл бұрын
awesome!
@alberoDiSpazio
@alberoDiSpazio Жыл бұрын
There's a Monopoly Game app that has that duck, fully shaded.
@inhtrungkien3745
@inhtrungkien3745 3 ай бұрын
I’ve discovered that this method was made by a Vietnamese man, and his name is Phong
@SuboptimalEng
@SuboptimalEng 3 ай бұрын
Computer graphics legend.
@inhtrungkien3745
@inhtrungkien3745 3 ай бұрын
@@SuboptimalEng btw your accent is so attractive, I would say it’s totally nothing like a typical indian accent
@singlebw4065
@singlebw4065 Ай бұрын
Ничего не понятно, но очень интересно. Это не для начинающих.
Introduction to Signed Distance Fields
9:00
Suboptimal Engineer
Рет қаралды 28 М.
What is Ray Marching?
10:57
Suboptimal Engineer
Рет қаралды 18 М.
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 101 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 138 МЛН
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 240 МЛН
I Made a Graphics Engine
6:42
Zyger
Рет қаралды 261 М.
I made this 3D game with ONLY code
9:06
Carter Semrad
Рет қаралды 445 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 1 МЛН
What is WebGPU?
14:09
Suboptimal Engineer
Рет қаралды 68 М.
What Is 𝓖𝓸𝓸𝓬𝓱 Shading?
7:07
Acerola
Рет қаралды 90 М.
Coding Adventure: Ray Marching
5:06
Sebastian Lague
Рет қаралды 1,1 МЛН
How Real Time Computer Graphics and Rasterization work
10:51
FloatyMonkey
Рет қаралды 94 М.
Why Unreal Engine 5.5 is a BIG Deal
12:11
Unreal Sensei
Рет қаралды 1,1 МЛН