Sign in to follow this  

Question on isometry

This topic is 1519 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

Hello everyone

Just recently, I've got a project of a game that is isometric, but not exactly isometric. I don't know how to exactly call this sort of camera view, and that's the reason for my question.

Basically, it's 2D with tilted vertical axis. Taking this picture as an example, it would be the middle dice. As an another example (taken from the same article, which, sadly, doesn't provide necessary information), it would look something like this. In principle of course, the art style will be different.

So, the question is - is there any specific information on how to program such a game? And how exactly is this style of isometry called?

Share this post


Link to post
Share on other sites

Pretty much so. Since you need to convert 2D to isometric coordinates and vice versa, it's the same here. So I wondered if there's a description on calculations and transformations that need to be considered for such game.

Share this post


Link to post
Share on other sites

You can achieve this effect a few different ways.

 

1. You can fake it with sprites. By drawing your sprites in a particular order it will give the illusion of 3d. There are plenty of "how to" resources for Isometric games that explain this concept.

 

2. You can do what Álvaro said and in 3d and write a matrix which will give you the camera view that you'd like.  In XNA, I think this might be as simple as using Matrix.CreateOrthographic with the appropriate values.

 

3. Use an isometric game engine.

 

- Eck

Share this post


Link to post
Share on other sites

Short answer:  The projection matrix you're looking for is exactly identical to a typical isometric projection matrix.

 

Your normal isometric projection matrix is effectively:  RotationMatrix(transform) * Projection, where transform is a ~45* rotation around the Y axis and a ~30*-~60* [depending on the specific case] rotation from the X-Z plane.  In your case, you'll just forgo the rotation, but still keep the rotation from the X-Z plane.  Projection would simply be something like this:

 

{  { xScale, 0, 0, 0 },

   {0, yScale, 0, 0},

   {0, 0, zScale, 0},

   {0, 0, 0, 0} }

 

Where *Scale is a transform from your view [which is effectively a bar-shaped region] to a -1,-1,-1 to 1,1,1 cube used for normal rendering.  You can effectively consider the zScale to be 1/infinity for all practical purposes, but sometimes it's nice not to quite go that far so as to preserve effective zBuffer behavior.

 

If you want the actual math behind it, or something more detailed, I can post that to, but it's long winded and if you don't care about the grit, there is no point in going into it.

Share this post


Link to post
Share on other sites

Not to detract from the op's question, but I'm aghast as to what to call this. My first thought was axonometric, as Alvaro mentioned. But I can also see how it could be an oblique projection. Keeping in mind I'm lacking a severe amount of sleep, am without coffee, and am working in an office that is currently about 46f, are there certain angles of rotation for oblique and axonometric projections that would result in the same 2 dimensional projection? Could an axonomic projection of an object rotated along only 1 axis be considered an oblique projection? Can the same be said of objects rotated on 2 axii? 3? If the latter is true, is there any real distinction between an axonometric projection and oblique projection?

 

After a large double double and some paper work, I can see now that it is not an axonometric projection at all, but for sure an oblique projection, as Anthony suggested.

Edited by Burnt_Fyr

Share this post


Link to post
Share on other sites

If the projection is such that the lengths along the directions x and y are preserved, it is indeed an oblique projection. This wasn't completely clear to me from the original examples, but I think you are right: It's an oblique projection, and not axonometric.

Share this post


Link to post
Share on other sites

Don't get too hung up on terminology. Just make the game you want to make. In this day and age, making a game for your particular projection is no different from making a game for any other projection: set up a projection matrix and a view matrix, and draw some geometry. All the rest is just details.

Share this post


Link to post
Share on other sites

This topic is 1519 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.

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