[Episode 20] OpenGL Math 2 - Matrix Transformations (with GLM code demonstration) - Modern OpenGL
Автор: Mike Shah
Загружено: 2022-10-29
Просмотров: 4562
►Full OpenGL Series Playlist: • Introduction to OpenGL
►Find full courses on: https://courses.mshah.io/
►Join as member to get perks: / @mikeshah
►Lesson Description: In this lesson I continue to show you a little bit more of how to use the glm mathematics library by showing you 4 of the special matrices we use in computer graphics: identity, scale, translation, and rotation (which has 3 versions). I'll also provide a little bit of intuition as to why we need a 4x4 matrix due to the use of the 'w' coordinate. If you can remember w=1 when working with points, that will be useful, and w=0 for working with vectors, that will get you quite far. Eventually you'll want to derive these matrices yourself as an exercise, but hopefully the intuition after this lesson is there.
00:00 Introduction and recap
1:21 Representing a point in 3D with glm::vec4
3:00 The 'w' coordinate
4:55 Vectors have a '0' for w. points have w=1
6:30 Creating a 'model' matrix to transform from local to world space.
7:55 What is a matrix
11:20 Reading a matrix
12:20 Scale, translation, and rotation matrix references
13:49 First code example -- scaling using glm::scale
16:04 Trick for printing out matrices neatly
17:20 model * vertex (transforming a vertex to world space)
18:40 glm::rotate example
21:57 glm::translate example
23:20 Applying multiple transformations (right-to-left) - ORDER MATTERS!
26:44 Review of what we covered
27:35 Conclusion
►Please like and subscribe to help the channel!
►YouTube Channel: / mikeshah
►Join our free community: https://courses.mshah.io/communities/...
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: