Math for Game Developers - Triangle Mesh Normals

  Рет қаралды 19,545

Jorge Rodriguez

10 жыл бұрын

Wherein we apply normal vectors to our triangle mesh so that it can be rendered with light and shading.
Find the source code here: github.com/BSVino/MathForGameDevelopers/tree/trimesh-normals
New video every Thursday. Question? Leave a comment below, or ask me on Twitter: VinoBS

Пікірлер: 28
@Cinarbayramic
@Cinarbayramic 11 күн бұрын
thank you man, i really needed this.
@SinTh0r4s
@SinTh0r4s 10 жыл бұрын
Man you are AWESOME! You need one and a half Minutes to explain me, what my professor fail one and a half hours long :P Keep it up! +1
@sayochikun3288
@sayochikun3288 3 жыл бұрын
very fast and good. I had no idea about this subject and understood everything u explained
@thejolv
@thejolv 4 жыл бұрын
You just made my day
@bamsgian9759
@bamsgian9759 4 жыл бұрын
thanks man, you aiding my curiosity
@martinmazanek3549
@martinmazanek3549 10 жыл бұрын
Hi, do you really need when calculating vecAverage to multiply it by 0.5f before normalizing? It should work without it :) Great videos btw. I really love them :)
@JorgeVinoRodriguez
@JorgeVinoRodriguez 10 жыл бұрын
Haha good point I guess you dont!
@DommageCollateral
@DommageCollateral Жыл бұрын
ahhhhhhh i think i finalloy learned something here. you generate a normalvector from the triangles vectors in order to project light ontoo the face
@kevin-hw6er
@kevin-hw6er 5 ай бұрын
thanks
@7GIGEO7
@7GIGEO7 10 жыл бұрын
Amazing tutorials..!
@fraserglasgow5735
@fraserglasgow5735 2 жыл бұрын
THANK YOU!!!
@NeilRoy
@NeilRoy 8 жыл бұрын
Or "flat shading" and "smooth shading" (which is what most rendering software will call it).
@Luixxxd1
@Luixxxd1 10 ай бұрын
C4D be like: *asian last name*
@Nick_fb
@Nick_fb 5 жыл бұрын
This is top stuff. If you wanted to do more, you could do area & angle weighted normals for the alien isolation / star citizen look.
@duality4y
@duality4y 3 жыл бұрын
w8 is this a series? sounds awesome
@jRsqILVOY
@jRsqILVOY 5 ай бұрын
How do you choose the tangents for the triangular mesh btw?
@aL3891_
@aL3891_ 10 жыл бұрын
Love these videos :) i have a question though, if you use flat shading, two vertices that share a point have different normals, but then how does that work with indexed rendering? Maybe it doesn't? I suppose you could use different indices for the flat shaded faces(so that they don't actually share points) but that seems do defeat the purpose
@JorgeVinoRodriguez
@JorgeVinoRodriguez 10 жыл бұрын
Yeah, notice how I didn't show the indexed rendering step for this one. You can still use indexed rendering but your faces won't be sharing verts anymore. Most hi res models these days are smooth shaded though, and creases are handled with normal maps or other tricks like that.
@undefBehav
@undefBehav Жыл бұрын
Do you have to calculate the average? Wouldn't it suffice to add all the surface normals together that are shared by the same vertex, and normalize that sum?
@JorgeVinoRodriguez
@JorgeVinoRodriguez Жыл бұрын
Yes, same thing. Probably I decided to show it this way for pedagogical purposes, or possibly it didn't occur to me that the extra division was unnecessary.
@undefBehav
@undefBehav Жыл бұрын
@@JorgeVinoRodriguez Makes sense. Thanks for the clarification!
@liam6550
@liam6550 10 ай бұрын
Latecomer here, but there are issues with situations where similar faces that share the vertex will bias the result
@undefBehav
@undefBehav 10 ай бұрын
@@liam6550 Yeah, but that would also happen if you took their average as well. It's algebraically the same whether you took the average and then normalized it, or normalized them without averaging.
@liam6550
@liam6550 10 ай бұрын
@@undefBehav I know what normalizing does. Accounting for the bias that came from similar faces is a problem I've only recently successfully solved using a combination of angle weights and area weights. I was looking for some help on how to fix it here
@vishnubharathit6192
@vishnubharathit6192 9 жыл бұрын
"Triangle mesh normals" Can you share refence book here? I want to know more about triangle mesh normal concepts
@JorgeVinoRodriguez
@JorgeVinoRodriguez 9 жыл бұрын
***** Try the book 3d Math Primer for Graphics and Game Development by Dunn and Parberry.
@themeliskalomoiros4368
@themeliskalomoiros4368 4 жыл бұрын
@@JorgeVinoRodriguez That's a great book, thank you very much!
@dionyzus2909
@dionyzus2909 3 жыл бұрын
that was the most ugly lamp I've ever seen! haha thanks for the class! (:
iPhone or Chocolate??
00:16
Hungry FAM
Рет қаралды 54 МЛН
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27
Epic Reflex Game vs MrBeast Crew 🙈😱
00:32
Celine Dept
Рет қаралды 9 МЛН
iPhone or Chocolate??
00:16
Hungry FAM
Рет қаралды 54 МЛН