1
anekix
5y

anyone good with opengl/ 3d math here? i have a simple problem i am stuck on

Comments
  • 1
    Explain your issue and you might get help
  • 0
    @Codex404 the thing is i have spent a whole day understanding 3d transforms in opengl & the coordinate system but something is not clicking in mind.

    i understood the use of model matrix ,i.e to convert a vector in local space to the world space.
    but why on earth i need a view matrix? as i understand it its for converting the world space to camera space? but why everywhere i see peopole are using an identity matrix for a view matrix?
    for ex here https://solarianprogrammer.com/2013...
  • 2
    Totally nontechnical explanation:

    Imagine a forest scene with a camera in the middle, pointed at some trees or something. You see the rendered image of the camera.

    Now you want the camera to move forward through the scene. In real life, you'd pick up the camera and move it forwards. In computer graphics, you keep the camera where it is and move the entire forest backwards. See? That's the job of the view matrix.

    Instead of moving the camera around, the view matrix moves the world around to mimic camera motion. Having your camera fixed in a certain place makes projection, field of view, and other camera properties simple to calculate.

    It's identity only in basic stuff. Once you get the ability to move the camera around (i.e. move the world around to make it look like the camera has moved) you'll have to calculate the view matrix too.
Add Comment