Math for Game Developers - Normal Maps

Поделиться
HTML-код
  • Опубликовано: 14 окт 2024
  • Normal maps can be used to increase the detail in the lighting of a surface.
    Find the source code here: github.com/BSV...
    New video every Thursday. Question? Leave a comment below, or ask me on Twitter: / vinobs

Комментарии • 15

  • @yougotdirked
    @yougotdirked 10 лет назад +5

    I love this channel. In a couple of months i will have vector maths/graphics as a course on my university, but most of it's already explained here.
    thank you so much for the effort :)

  • @rafaelgpontes
    @rafaelgpontes 5 лет назад +1

    I just found out this video. I was really curious about learning more on normal maps! Great video!

  • @Bjarkediedrage
    @Bjarkediedrage 10 лет назад +2

    I keep watching your tuturials and i understand like 10% of it xD But i cant wait until your tutorials becomes relevent for me, they seem to be very very well explained.
    Thanks alot, and keep it up :)

    • @JorgeVinoRodriguez
      @JorgeVinoRodriguez  10 лет назад +1

      If you've not watched the videos in order they may be a bit tougher to understand. There are some more basic ones that you could benefit from. I'm also happy to answer questions. Also, the best way to learn is to try it out for yourself, that's why I include the source code. :)

  • @Sh-hg8kf
    @Sh-hg8kf 3 года назад +1

    why does does z axis in triangle space exist where y axis is in the local space?

  • @MustafaBerkeGureltol
    @MustafaBerkeGureltol Год назад

    What do you mean by the default [0,0,1] at 6:20 ? I always thought that normal maps used the range [-1,1] range for the R and G channels, and [0,1] for the B. Isn't that why the normal map is blue? Since we are trying to map negative numbers on R and G values, we use 0.5 as our baseline, but since we are not interested in mapping negative numbers to the B value, it utilizes the whole 1.0 range.

    • @JorgeVinoRodriguez
      @JorgeVinoRodriguez  Год назад +1

      "Default" in this case means the vector that points straight up away from the triangle, and in this case z is "up" so the vector (0, 0, 1) points directly away from the triangle. This converts to (0.5, 0.5, 1.0) to be stored in the normal map, which is a pale blue.
      The x and y components of this vector will sometimes be negative, but the z component will generally never be negative because it would be malformed for the normal to be facing "down" into the triangle instead of "up" above the triangle. Even though we generally don't use the whole range of the z/blue channel, we still perform the same calculation as the others, taking [-1, 1] to [0 1] for all three channels, since saving the extra bit of memory isn't generally worth it.

    • @MustafaBerkeGureltol
      @MustafaBerkeGureltol Год назад +1

      @@JorgeVinoRodriguez Thank you so much for your explanations

  • @anassrazik7506
    @anassrazik7506 9 лет назад

    hello jorge, your tutos are so usefull and i'm learning a lot of maths from you so thanks a lot
    one request if you want :) , can you make some tutos about glsl programming so that we can follow your tutos about fragment shaders.
    (why you skiped the vertex shaders?)

    • @JorgeVinoRodriguez
      @JorgeVinoRodriguez  9 лет назад +1

      Sorry don't have the time to do glsl programming videos. Vertex shaders are important, I'm going to cover them when I eventually do a video on animation.

  • @mauricioyaman570
    @mauricioyaman570 4 года назад

    love the video, is simply greatte

  • @mmankt
    @mmankt 10 лет назад

    how difficult would be changing this into parallax occlusion ?

    • @JorgeVinoRodriguez
      @JorgeVinoRodriguez  10 лет назад

      Some simple parallax mapping would be fairly straightforward but it's done a completely different way. With parallax you modify the uv coordinates that are passed in to the texture function according to the height of the texture and the viewing angle of the player. The occlusion usually involves some sort of raytracing step on top of that.

    • @mmankt
      @mmankt 10 лет назад +1

      oh thx:) and thx for the vids i always enjoy watching them and learning the basics. cheers!

  • @SomeGuy-nr9id
    @SomeGuy-nr9id 6 лет назад

    Your x or y on your normal map needs to be inverted.