Quiz
- Can we go over the perspective projection section?
For sure! That is unintuitive. Here's the link the the perspective projection reading.
The essentials are:
- We will place the EYE at the origin, (0,0,0)
- With the EYE at the origin, projection is a matter of similar triangles
- We need to divide by Z/near, where Z is the Z coordinate of the vertex/point.
- The perspective matrix puts 1/near where it will get multiplied by Z
- A later operation
- What is the difference between using lookAt() and rotating the camera manually? Is lookAt() a more convenient method?
Good question! Yes, we can certainly rotate the camera ourselves, and for some animations and such, that might be exactly what you want to do. So, this is a great point.
What the
lookAt
method does is compute a rotation matrix that will point the camera at a given location. Since that's often how we think about using a camera, it's a convenient interface. But it is specific to that particular rotation.So your general point is well taken.
- i don't have a specific question, im excited to learn about how we should choose camera parameters (or should this be more of a trial and error situation)
This is a wonderful question! It's a matter of well-informed trial and error. You want to look carefully at the image you want (or imagine it), and infer where the camera has to be and how it is pointed to get that image. This is what a film's cinematographer does.
You also see this in detective movies and such.
Once you have an image, you then compare it with what you want and make adjustments:
- do certain objects in the world "line up"? If so, that puts the camera on a line/plane
- With several such alignments, you can triangulate to infer where the camera is
- do I have to move the camera up/down? left/right?
- do I have to move the camera back/forward? How does that change the image?
- what's at the center of the image? (That's typically your lookAt point.
- no questions! / thank you for the readings! / Thank you :)
Glad you liked them!