# orthogonal view matrix

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

## Recommended Posts

I am developing an fake isometric game(diamond shape map in Direct3D) and the map looked fine(just base grass tiles), until I added the models to the scene(the perspective makes It look crap). I have switched from using a perspective matrix to a orthogonal matrix, in an effort to keep the models in my scene the same size. However the view of the map now just looks flat. anyone know how I can achieve the isometric look in 3d.

##### Share on other sites
Rotate the camera 45 degrees around the vertical and ~35 degrees above the horizontal, use an orthogonal projection, and voila. Isometric view.

##### Share on other sites
I've been messing around with this for a while now but I still cant get it right. here is what i have tried.

this setup gave me the fake iso view, but with perspective
	device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4, this.Width  / this.Height, 1.0f, 10000.0f);	device.Transform.View = Matrix.LookAtLH(new Vector3(0,0, 40.0f), new Vector3(), new Vector3(1,1,0));

and here is the orthogonal setup that has the diamond shape but appears to be a top down view.
        device.Transform.Projection = Matrix.OrthoLH(this.Width / 10, this.Height / 10,1.0f, 10000.0f);	device.Transform.View = Matrix.LookAtLH(new Vector3(0,0, 14.0f), new Vector3(0,0,0), new Vector3(1,1,0));

thanks for the help.

##### Share on other sites
Quote:
 Original post by dazscottand here is the orthogonal setup that has the diamond shape but appears to be a top down view. device.Transform.Projection = Matrix.OrthoLH(this.Width / 10, this.Height / 10,1.0f, 10000.0f); device.Transform.View = Matrix.LookAtLH(new Vector3(0,0, 14.0f), new Vector3(0,0,0), new Vector3(1,1,0));thanks for the help.

That is a top down view. Your camera is positioned 14 units above the z=0 plane looking straight down the z-axis. Your up vector provides the 45 degree rotation around the z-axis, but you are still looking straight down. You will need to rotate down away from the z axis to get the angled view simulated by isometrics. You could do some trig to get the correct eye position, or drop the look at call altogether and use simple rotations to build the matrix.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 9
• 9
• 14
• 12
• 10
• ### Forum Statistics

• Total Topics
633270
• Total Posts
3011159
• ### Who's Online (See full list)

There are no registered users currently online

×