With that out of the way...I feel like I'm getting this stuff (since I've already made a few 3D games before in XNA 3.1 my ideas here are somewhat clear, but I was really just trail n erroring my way through most of the 3D stuff) because it makes a lot of sense in retrospect. BUT...the book is not very clear on the following and I'd like come help to clear it up:
1. Since XNA uses a right-handed coordinate system objects with a negative Z values are what would be visible if the camera was at the origin. What I'm a bit confused on is this functions parameter and how it works:
Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), aspectRatio, 1.0f, 10.0f) // parameters: FOV, Aspect Ratio, Near View Plane, Far View Plane
The book explains it like this:
... then create a perspective projection matrix, "looking" in a 45-degree angle as the field of view. The rendering happens for objects from 1 to 10 units from the screen (z values from -1 to -10).[/quote]
I'm confused because it seems to me if the near view plane is set to be 1.0f, it should be at 1.0f along the z axis, which would be behind the screen, going further out behind the screen to 10.0f at the far view plane. However, it's saying this isn't the case, and I have a few ideas about why that might be but none seem obvious enough to not warrant asking for clarification.
2. What are these matrices {'view', 'world', 'projection'...etc} It lists the following as definitions of each matrix:
View: defines the camera position and direction. Usually created using Matrix.CreateLookAt.
Projection: used to map the 3D scene coordinates to screen coordinates. Usually created through Matrix.CreatePerspective...etc
World: used to apply transformations to all objects in the 3D scene.[/quote]
This gives me a great idea of what they are used for but I'm fuzzy on what they are. Here's my foggy understanding of each:
View: My understanding is that this is the camera "in concept." In other words, every frame a camera matrix (which is a hard idea for me to get, a camera is just a matrix? Not that it would be able to do anything just as matrix, but you know what I mean maybe?) at origin, and then it's translated, rotatated, or whatever by matrix multiplcation with this view matrix.
Projection: This seems to be the "functionality" of the camera. I have no idea what gets multiplied by this matrix or how it's used, REALLY foggy on this one.
World: I'm also really foggy about this one. It almost seems like if every objects position matrix is multiplied by the world matrix then that is what sets up the scene for rendering, but, if that's the case then you aren't really using cameras you are just using a camera at origin and moving the entire world to fit your scene? Confusing.
Sorry about the length of the post, trying to be as concise as I possibly can be.