Direct 3D - Izometric (no perspective) camera?

Started by
5 comments, last by streamer 15 years, 11 months ago
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!
Advertisement
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.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Thank you for such quick answer, please could you be more specific? Im C# programmer and just beginning with D3D, dont know much about it yet. Thanks
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.
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).
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
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.

This topic is closed to new replies.

Advertisement