3 ms·
Very nice, I've tried looking at a couple other tutorials in the past but they always assume more prior knowledge than I have. This really hits the sweet spot
by dakom 3y ago
Very nice, I've tried looking at a couple other tutorials in the past but they always assume more prior knowledge than I have.
This really hits the sweet spot for me.
Would love to see tutorials on more topics. In particular, a very basic lighting model but with a detailed breakdown on how normals and dot product work together.
Yes, there's plenty of info out there, but I think your teaching style would still make it worthwhile
- mjburgess 3y agoAs a general rule, the third article/book/tutorial you read is the one where you "get it".
- superMayo 3y agoThat's really nice to hear and it gives motivation to continue! Next article will probably go 3D, but it adds a lot of difficulties. I still need to find out a good small-scale but playful shader project to cover!
- Buttons840 3y ago> a detailed breakdown on how normals and dot product work together Normals point away from faces, straight out from faces. A surface normal is the direction the surface is facing. The dot product of 2 vectors measures how "aligned" they are, indeed, one definition of the dot product is defined in terms of the angle between the two vectors. Also, remember that the vector opperation (A - B) results in a vector going from B to A. Thus (light_direction - face_center) is a vector from the face to the light, and (light_direction - face_center).dot(face_normal) gives us a numeric value that is higher when the face is pointing towards the light source. You'll have to look to linear algebra for a deep understanding: https://youtu.be/LyGKycYT2v0?si=lWr38mH34yGRSJpv https://youtu.be/LyGKycYT2v0?si=lWr38mH34yGRSJpv I also recommend an informal (but rigorous enough) textbook called "Linear Algebra: Theory, Intuition, Code" which teaches through conversational written explanations, mathematical notation, and code. GPT4 is also quite competent at teaching linear algebra and, in my experience, is able to distinguish between correct and incorrect mathematical proofs; a good textbook is still a better primary source though.