After seeing this tutorial, it seriously frustrates me why most other tutorials don't explain this subject as clearly. In other words, really nice tutorial!
In reality what happens with the projection matrix is to transform coordinates to clip space, then from that they will be diveded to w to get to the NDC system. After having had NDC, there is even one more transformation to screen space, and that is when fragment shader start to execute.
Good tutorial. Just wanted to mention one thing. The result of the multiplying the projection matrix with the modelview matrix is actually in clip-space. gl_Position therefore is in clip-space. After the vertex shader, OpenGL will perform perspective divide (dividing by w) to transform to NDC (followed by viewport transformation to map from NDC-space to screen-space). See www.khronos.org/opengl/wiki/Vertex_Post-Processing .
I think we forgot to talk about the screen matrix...that projection matrix eventually has to end up on the screen. Seems we need another matrix to change projection to actual screen pixels.
When you see any "movement" in world space (or even rotating the camera), it's the world that moves around the camera. I would say "It's not the spoon that bends, but you" - but that's been done :)
@@jeffchastine although there is still something i struggle to understand. does the camera have world coordinates ? Before referencing every object according to camera space, we need to set where the camera is situated in the world space ? am i right ?
@@sherminatorex Technically, the camera is always located at (0, 0, 0) and the world moves around the camera. But yes, if you think in the world coordinate system, your camera can have a location/rotation. For example, if you want your camera to be at (x=0, y=10, z=0) - or 10 units high - you would achieve this by shifting the entire world down by 10 units. It's a bizarre concept, but mathematically how things are working (if I understand your question correctly)
@@jeffchastine the thing i don’t understand is how do we do to set the camera at a certain point in the world space ? i understand that the camera has (0,0,0) coordinates in camera space but what about in world space ? If we place the camera at a certain point in the world space (can we ?), will it keep its « position » when we pass to camera space ? I don’t know if we can translate the camera juste like any vertex.
@@sherminatorex Remember, everything translates to camera space in the end. However, I understand what you're asking. If you want to move the camera around in world space (or give the illusion of it), then you have a separate camera matrix that represents the position/orientation of the camera. Then, multiply your stack by that. The end result is that you're moving the world around the camera.
This is the best OpenGL tutorial I have ever seen.
Glad you guys like it!
This is the best introductory tutorial for OpenGL. Can't believe others couldnt elaborate it that easily.
Amazing. Describes the most important concepts in a graphics class in 7 minutes rather than several hours of lectures.
I have seen many tutorials on this subject but, this one is the most clean explanation among them. You deserve more attention. Bravo.
This is the best tutorial for learning openGL even I am now study this in 2021. Thanks a lot Jeffry
Clean, clear, and really gives understanding. 10/10, especially considering the time you did it in.
After seeing this tutorial, it seriously frustrates me why most other tutorials don't explain this subject as clearly. In other words, really nice tutorial!
Your videos are real good, keep up the good work.
You're awesome you compressed a long text tutorial into 7min video!
Seriously a very good tutorial ! Will watch your other vids as well. Thanks!
+Vikramaditya Kukreja Thanks!
Great tutorial , it helped a lot , thank you
Great tutorials, thank you.
In reality what happens with the projection matrix is to transform coordinates to clip space, then from that they will be diveded to w to get to the NDC system. After having had NDC, there is even one more transformation to screen space, and that is when fragment shader start to execute.
Good tutorial. Just wanted to mention one thing. The result of the multiplying the projection matrix with the modelview matrix is actually in clip-space. gl_Position therefore is in clip-space. After the vertex shader, OpenGL will perform perspective divide (dividing by w) to transform to NDC (followed by viewport transformation to map from NDC-space to screen-space). See www.khronos.org/opengl/wiki/Vertex_Post-Processing .
Thanks really helpful!
Clearly! Thank you!
Thanks,it is the best tutorial
Sun Sunshine Glad you liked it
I think we forgot to talk about the screen matrix...that projection matrix eventually has to end up on the screen. Seems we need another matrix to change projection to actual screen pixels.
Thanks,man!
Very well made tutorials! You should make tutorials on the recent Vulkan API as well.
Thanks! I'll leave the Vulkan tutorials to you :)
Hey Jeffrey, Thank you so much for these tut, only one question why have you stopped making more tutorial?
you rock \m/
I get that the camera never moves in the camera space, but the camera has a world space position, so does the camera actually move within world space?
When you see any "movement" in world space (or even rotating the camera), it's the world that moves around the camera. I would say "It's not the spoon that bends, but you" - but that's been done :)
i am astounded at the intelligibility of is this video
Glad you liked it!
@@jeffchastine although there is still something i struggle to understand. does the camera have world coordinates ? Before referencing every object according to camera space, we need to set where the camera is situated in the world space ? am i right ?
@@sherminatorex Technically, the camera is always located at (0, 0, 0) and the world moves around the camera. But yes, if you think in the world coordinate system, your camera can have a location/rotation. For example, if you want your camera to be at (x=0, y=10, z=0) - or 10 units high - you would achieve this by shifting the entire world down by 10 units. It's a bizarre concept, but mathematically how things are working (if I understand your question correctly)
@@jeffchastine the thing i don’t understand is how do we do to set the camera at a certain point in the world space ? i understand that the camera has (0,0,0) coordinates in camera space but what about in world space ? If we place the camera at a certain point in the world space (can we ?), will it keep its « position » when we pass to camera space ? I don’t know if we can translate the camera juste like any vertex.
@@sherminatorex Remember, everything translates to camera space in the end. However, I understand what you're asking. If you want to move the camera around in world space (or give the illusion of it), then you have a separate camera matrix that represents the position/orientation of the camera. Then, multiply your stack by that. The end result is that you're moving the world around the camera.
What happened to tutorial #8?
It's there - it's an Index Buffer code example. Tutorial 8 - Index Buffer Code Example in OpenGL (code)