u/palapapa0201in r/GraphicsProgramming • Recommends
On “Help me understand the projection matrix”
#perspectiveprojection#projectionmatrix#vulkan
31K subscribers • 2 videos on Hallway
Intermediate. Assumes working knowledge.
570K views5 years ago3 recommendations
Graphics and audioComputer scienceRenderingMath for programmers
Brendan Galea provides an animated derivation of orthographic and perspective projection matrices, focusing on the Vulkan API.
Perspective matrices have been used behind the scenes since the inception of 3D gaming, and the majority of vector libraries will have built-in helper functions to construct them for you. But what if you wanted to know the reasoning behind how these matrices are constructed. I start off with a brief introduction of computer graphics and the key ideas behind 3D rendering. I differentiate between Image Order Rasterization typically used by Ray tracers, and object order rasterization as used in most video games. I then present an animated walkthrough showing the full derivation of both the orthographic and perspective projection matrices. My derivation here is focused on the Vulkan API, but the reasoning applies just as well to other API's such as OpenGL or direct X, with the only notable differences being the size of the canonical viewing volumes, and the handedness and conventions of the xyz coordinate systems. How does 3D graphics work? Image versus object order rendering The Orthographic Projection matrix The perspective transformation Homogeneous Coordinate division Constructing the perspective matrix Non-linear z depths and z fighting The perspective projection transformation ** Resources ** Fundamentals of Computer Graphics by Peter Shirley & Steve Marschner songho.ca/opengl/gl_projectionmatrix.html matthewwellings.com/blog/the-new-vulkan-coordinate-system/ insider.com/pixars-animation-evolved-toy-story-2019-6 ** Attributions** Ray tracing graphics cards - Photo by Nana Dua from Pexels Rubiks cube - Photo by Mathias P.R. Reding from Pexels Ray tracing in video games - digitaltrends.com/gaming/battlefield-v-dxr-ray-tracing-teste… en.wikipedia.org/wiki/Line%E2%80%93plane_intersectionWhat people say. Engineers recommend this video as one of the clearest and most accessible explanations of how projection matrices are mathematically constructed.
u/palapapa0201in r/GraphicsProgramming • Recommends
On “Help me understand the projection matrix”
u/therpgmasterin r/GraphicsProgramming • Recommends
On “The projection matrix in vulkan”
u/shakinMyShakein r/GraphicsProgramming • Recommends
On “Trouble Understanding a Critical Step in Perspective Projection”