Understanding the Order of Transformations in 3D Graphics

preview_player
Показать описание

Links:

🔥 I'm using the following books as background information for my tutorials and I highly recommend them for learning more about OpenGL and Vulkan.
These are affiliate links so if you use them to buy the books the price is the same for you and I will get a small commision (thank-you!).

Feel free to comment below.

Twitter: @ogldev

Enjoy,

Etay Meiri

#opengl #ogldev #opengtutorials
Рекомендации по теме
Комментарии
Автор

Nice video!!! But just in case anyone found themselves in the same situation i was:

The thing is glm::rotate does something different from what I personally think is intuitive.
When doing:
mMat = identityMatrix
mMat = glm::rotate(mMat, angle, axis)
The function returns a matrix which is the result of multiplying two matrices, the rotation you want ON THE RIGHT and the translation ON THE LEFT (mMat * rawRotation) so that results in first rotating a point over its origin and then translating, so we don't have translation, just rotation.

In order to make a rotation in glm we should make something like:
mMat = identityMatrix
mMat = glm::rotate(identity, angle, axis) * mMat
That way we first translate the point and then rotate it, and we get an orbit around the origin.

alaro
Автор

Very big thank you! You made things very clear.

kamalmoustafa
Автор

Thank you so much for the video, I think your explanation is clear and concise :), also, I didnt expect my post would lead to a video, haha.

kirikiri-san
Автор

Hi, great videos. How do you render the axis lines along with the cubes in this video?

userrand