Sign in to follow this  
AntiGuy

Prespective view to Orthographic view transition.

Recommended Posts

Is there anyway to convert a perspective view to an orthographic view? Lowering the field of view seems to work but camera distance becomes a large issue. In case you wondering, no I have no clue what goes on behind the scenes when it comes to cameras and matrices.

Share this post


Link to post
Share on other sites
The basic idea is converting from a 3D view to a 2D view without the camera distance changing but the focus on the target remaining the same. I think I've gotten close by simply modifiying the perspective matrix but now I'm presented with a clipping plane issue.

Share this post


Link to post
Share on other sites
Just a though, have you tried element wise interpolating the matrices? I dont know if it will work, but you might be lucky.

Share this post


Link to post
Share on other sites
What are you using?

If you "modified" perspective matrix, it does mean you can change it, doesn't it? Why can't you modify it into a orthographic matrix?
Camera position and target are in view matrix, I don't think they would be affected by your perspective/orthographic matrix anyway.

I did the pipeline by software once, if you tell me what you are using I can probably help.

Share this post


Link to post
Share on other sites
Sorry completely forget about this thread, kinda gave up on the idea. I'm using XNA which uses the Matrix class for the projection. Lerping the matrix for whatever reason did not work. But setting M44 (row 4 column for) to the distance away from the target and setting M34 to zero gave me the proper distance from the target and an orthographic view but there is still the clipping plane issue.

I don't know why modifying the field of view makes the target look much much farther or closer but OpenGL gave me the same problem so I just assumed it was something normal.

Update:

Actually lerping does work! I think I was doing it in too large a scale before.
Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this