Im having a hard time understanding the concept of moving the eyespace/camera around the globalspace mathematically. Ive checked out a lot of videos/articles etc., but tbh at this point Im just confused (embedded software background, no experience with opengl or similar APIs).
So assuming I have one triangle in each quadrant of the globalspace (2D) I would essentially like to move any of the 4 triangles in front of the camera, or the other way around, and then project the visible side onto a 1D screen space (I interpret screen space as an led-strip). Here I was taught to have -y as the viewing direction of the eyespace and x as the screen space.
Up until now im familiar with what needs to be done before using the viewmatrix and after having something in front of the camera, or to be more specific, inside the clipping window:
- Homog. Coords
- Modelmatrix
- Move points between global- and eyespace (viewmatrix + its inverse)
- Projectionmatrix
- Viewportmatrix
- Rasterization
What I dont understand:
- How to setup the viewmatrix with eyespace origin, up-vector and the desired viewing direction. Here I dont get the concept. How do I decide what to look at and from which position etc. if the viewing direction is towards -y for the eyespace?