Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some question about the Perspective projection #13

Closed
RazorBach opened this issue Mar 14, 2018 · 3 comments
Closed

some question about the Perspective projection #13

RazorBach opened this issue Mar 14, 2018 · 3 comments

Comments

@RazorBach
Copy link

RazorBach commented Mar 14, 2018

In the chapter four:

So, if we want to compute a central projection with a camera (important!) camera located on the z-axis with distance c from the origin, then we embed the point into 4D by augmenting it with 1, then we multiply it with the following matrix, and retro-project it into 3D.

When it comes to chapters six,our eyes are based on (1, 1, 3) which is not the z-axis.And I wonder why this projection matrix is so simple.So I looked for some other materials,then found a more complicated matrix:
projection

After scanning articels,I replace ur matrix with the new ones(include changing the lookat matrix's fourth column).But I get a strange pic.Could u explain the difference between the matrix above and yours?

@ssloy
Copy link
Owner

ssloy commented Mar 15, 2018

Well, for starters, in my code I do not have any fancy stuff like far/near planes. In my application the camera is always placed (by the means of lookat()) at the axis Z facing the origin; the projection is made onto the plane Oxy.

In real OpenGL the camera is always placed at the origin and the projection is made onto the near plane. Also check this tutorial.

@RazorBach
Copy link
Author

@ssloy
thx!
I'm reading <tricks of the 3d game programming gurus>,which seems too old for today's computer.So I wonder if you can recommend me some easy-read material of texture and sampler (Better online).I've already got a huge to-read book list which I'm working on :(

@ssloy ssloy closed this as completed Mar 20, 2018
@ssloy
Copy link
Owner

ssloy commented Mar 20, 2018

Sorry, I was not checking recent books. If you find anything good, do not hesitate to share the link :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants