Skip to main content

Timeline for Understanding view matrix

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Jun 3, 2016 at 4:45 comment added BRabbit27 To complement the answer, check this video
Jun 2, 2016 at 6:28 comment added v.oddou @BRabbit27 it's world-to-camera because "the view matrix changes space from world points to view points". If a point is far away, but your camera is also far away (close to the point) passing the point into the view matrix will make it close to zero. that is: a point visible in your view space. Another way to see it, is use the fact "view matrix = inverse of world matrix for the camera". The wold matrix for the camera would be the matrix to move it from zero in world, to its place in world (away from origin).
Jun 2, 2016 at 6:22 vote accept BRabbit27
Jun 2, 2016 at 6:22 comment added BRabbit27 The other thing I still don't get, is how can I convince myself that the view-matrix = camera-to-world? What kind of exercise can I do in order to visualize it?
Jun 2, 2016 at 6:18 comment added BRabbit27 Ok, now I think I am getting somewhere. So if I choose to have the direction as camPos-lookat to agree with the image, that's why the projection matrix has the -1 in the (2,3) entry to reverse this, right?
Jun 2, 2016 at 6:16 comment added v.oddou @BRabbit27 Yes that what it means, I think there is no mistake in their image. That just happens to be configurable by a -1 in the projection matrix later on. So any image would still be right.
Jun 2, 2016 at 6:14 comment added BRabbit27 In Scratchapixel the authors use row-major matrix and right-hand system. So actually when you say "camera looking along" it means the direction the lens points to? Maybe a mistake in the image? I think, if they say "looking along -z", the direction vector is as you just said lookat - campos ?
Jun 2, 2016 at 6:09 comment added v.oddou @BRabbit27 oh right, we can think of it this way: an identity camera matrix is the same as no view matrix. therefore we end up with the default basis of the API. In OpenGL we definitely see towards -z by default. In DirectX historically I've used LeftHanded systems I guess which made me reverse z.
Jun 2, 2016 at 6:07 comment added v.oddou @BRabbit27 your image is interesting, it does mention the default word which is important. I'm curious as to why the cam is pointing to -z, maybe a row matrix vs column matrix thing again ?
Jun 2, 2016 at 6:02 comment added BRabbit27 Yes, you are completely right, the direction vector from the camera has nothing to do with the world z-axis, my mistake. What confused me, I think it is silly but still, is this image where the +z-axis enters the lens and I think you mean the +z-axis exits the lens ... what are the implications of using one or the other? This is what I cannot seem to understand
Jun 2, 2016 at 5:43 history answered v.oddou CC BY-SA 3.0