Jump to content
  • Advertisement
Sign in to follow this  
Blizna

Direct 3D - Izometric (no perspective) camera?

This topic is 3785 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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.

Share this post


Link to post
Share on other sites
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

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!