Sign in to follow this  
Blizna

Direct 3D - Izometric (no perspective) camera?

Recommended Posts

Hi, Im starting with D3D and Im curious how to make isometric camera, also one that doesnt "use"perspective. To be accurate, I want to create semi-top down game, where the camera is, 45 degrees only on one axis. Is there any solution? Here is the view Im talking about: http://img505.imageshack.us/img505/5807/camerarm3.jpg Thanks!

Share this post


Link to post
Share on other sites
Since view and projection matrices are separated a simple D3DXMatrixLookAtLH should work for the camera (make sure the up vector is perpendicular to the look vector).

The projection matrix ought to work with a D3DXMatrixOrthoLH or similar. Just choose a matrix without perspective here.

Share this post


Link to post
Share on other sites
Hi. That is not isometric perspective, it is simple top down. Best solution for this kind of perspective is to simply make one tile based engine and draw pre-rendered tiles.

Share this post


Link to post
Share on other sites
Quote:
Original post by streamer
Hi. That is not isometric perspective, it is simple top down. Best solution for this kind of perspective is to simply make one tile based engine and draw pre-rendered tiles.


I guess he wants to use 3D objects and all their advantages, not prerendered sprites.

Blizna - have you already made any working simple D3D testing applications with perspective camera (which can be taken as a "default" in D3D)? If yes, then you already probably know about World, View and Projection matrices and all you need to change to get isometric view is the Projection matrix.
As Endurion said, use D3DXMatrixOrthoLH instead of D3DXMatrixPerspectiveFovLH.
If you have no experiences yet, you should look for some tutorial (can be with perspective camera, you'll just use another function, see above).

Share this post


Link to post
Share on other sites
Thanks,
Yes, Im just beginning, I only created small app showing X model.
I dont understand one thing - where the "world" coordinates start? If I load a mesh and need to set cameras position, I have no clue from where it counts XYZ..
Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by Blizna
Thanks,
Yes, Im just beginning, I only created small app showing X model.
I dont understand one thing - where the "world" coordinates start? If I load a mesh and need to set cameras position, I have no clue from where it counts XYZ..
Thanks


From center XYZ(0,0,0) [smile] and coordinates go to plus and minus ie xyz(-30,20,4).

Just set models coordinate to some position, camera position near model position and turn camera eye toward model.

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