Introduction to Phong Lighting

Поділитися
Вставка
  • Опубліковано 24 січ 2025

КОМЕНТАРІ • 57

  • @justanotherhotguy
    @justanotherhotguy Рік тому +11

    Tomorrow exam in real time computer graphics, thank you very much!

  • @Byynx
    @Byynx Рік тому +14

    It seems the best lightning tutorial so far.

  • @AstrusHD
    @AstrusHD 3 місяці тому +1

    Honestly, i think your teaching style is awesome, everything was so clear and understandable. This is awesome man!

  • @stoup8778
    @stoup8778 3 місяці тому

    dude i have not been able to process the learnopengl tutorials on this topic, this made it so much easier to understand!

    • @SuboptimalEng
      @SuboptimalEng  3 місяці тому

      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 9 місяців тому +2

    Liked and subscribed! The most clearer explanation for this difficult topic. Super helpful. Many thanks

    • @SuboptimalEng
      @SuboptimalEng  9 місяців тому

      I made the video because I was learning phong lighting and struggled to understand it. Glad it helped!

  • @Iridium.
    @Iridium. Рік тому +9

    You can use a halfway vector instead of reflect for better performance

    • @SuboptimalEng
      @SuboptimalEng  7 місяців тому +2

      Recently learned about this watching Cem Yuksel’s Utah course!

  • @ksalarang
    @ksalarang Рік тому +1

    Exactly what I was looking for, thanks. Keep up the good work

  • @glebaltfromrovia9898
    @glebaltfromrovia9898 5 місяців тому

    insanely simple and straight to the point! thanks

  • @pingwinek_1337
    @pingwinek_1337 Рік тому +1

    your voice is so soothing oh my gawddd

    • @SuboptimalEng
      @SuboptimalEng  Рік тому +1

      Guess I’ll have to start an ASMR channel now jk… unless 🤔😂

    • @pingwinek_1337
      @pingwinek_1337 Рік тому

      @@SuboptimalEng UNLESS

  • @online.python.dersim
    @online.python.dersim 7 місяців тому

    Thank you very clear simple but enough detailed explanation especially graphics of the calculations are very useful thank you again for this great video

  • @OrgStinx
    @OrgStinx Рік тому +2

    Thanks, I appreciate this.

  • @thesituation5315
    @thesituation5315 Рік тому +2

    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?

  • @MichaelPohoreski
    @MichaelPohoreski 3 місяці тому

    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.

  • @calderarox
    @calderarox Рік тому

    this is a really good video! thanks

  • @irice7
    @irice7 5 місяців тому

    awesome video. also, what theme did you use for vscode?

    • @SuboptimalEng
      @SuboptimalEng  5 місяців тому

      Thanks! I mainly use a customized version of gruvbox dark. The exact details are in my GitHub dotfiles repository.

  • @susussususuususuusuuususussusu
    @susussususuususuusuuususussusu 7 місяців тому

    life changing lesson :0

  • @janreinsch9725
    @janreinsch9725 9 місяців тому +1

    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  9 місяців тому

      Yea that’s a good question. I think a better name for the variable would be direction to light source from origin.

    • @janreinsch9725
      @janreinsch9725 9 місяців тому

      @@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  9 місяців тому

      @@janreinsch9725 That's great to hear! Happy to help a fellow graphics enthusiast.

    • @janreinsch9725
      @janreinsch9725 9 місяців тому

      @@SuboptimalEng Thank you for these tutorials!

  • @MrMariozzz78
    @MrMariozzz78 9 місяців тому

    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?

  • @AllianceHalifax
    @AllianceHalifax Рік тому +2

    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 Рік тому +1

      Yes but not explaining how to show the duck model ......
      @@SuboptimalEng

    • @ku16610
      @ku16610 Рік тому +2

      Click on the glslCanvas left most icon at bottum to change object

    • @EliasWolfy
      @EliasWolfy 3 місяці тому

      this is a shader being applied to the duck

  • @nexusplus4960
    @nexusplus4960 2 роки тому

    Hi when I import model in three js. model load with light what should I do??

  • @EliasWolfy
    @EliasWolfy 3 місяці тому

    kind of off topic, but what theme do you use?

    • @SuboptimalEng
      @SuboptimalEng  3 місяці тому

      A customized version of gruvbox dark 😎

  • @nebuladevelopments
    @nebuladevelopments Рік тому

    awesome!

  • @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  Рік тому +1

      I fake the eye direction in the code, setting it to -1 in the Z axis.

    • @MichaelPohoreski
      @MichaelPohoreski 3 місяці тому

      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.

  • @konigsberg72
    @konigsberg72 2 роки тому

    what's the song? 00:00

  • @javifontalva7752
    @javifontalva7752 2 роки тому

    Wonderful vid!! Can you make more vida on shaders?

  • @kevinto8955
    @kevinto8955 2 роки тому +1

    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  2 роки тому +2

      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 😊

  • @misspps_
    @misspps_ Місяць тому

    thanksss

  • @alberoDiSpazio
    @alberoDiSpazio Рік тому

    There's a Monopoly Game app that has that duck, fully shaded.

  • @inhtrungkien3745
    @inhtrungkien3745 5 місяців тому

    I’ve discovered that this method was made by a Vietnamese man, and his name is Phong

    • @SuboptimalEng
      @SuboptimalEng  5 місяців тому

      Computer graphics legend.

    • @inhtrungkien3745
      @inhtrungkien3745 5 місяців тому

      @@SuboptimalEng btw your accent is so attractive, I would say it’s totally nothing like a typical indian accent

  • @singlebw4065
    @singlebw4065 3 місяці тому

    Ничего не понятно, но очень интересно. Это не для начинающих.