What on earth is happening here? (isometric question)

Discussion in 'Game Development (Technical)' started by Chris England, Jul 3, 2010.

  1. Chris England

    Chris England New Member

    Joined:
    Sep 22, 2009
    Messages:
    81
    Likes Received:
    0
    EDIT - problem has been solved. Thanks oNyx and everyone else who helped out.

    Hi all,

    The lead artist on my team and I have been trying to set up an isometric camera in Maya for hours now, and we're both completely stumped.

    I KNOW that an accurate 2d isometric tile looks like this - these are very common across the internet, and are made by taking a PS square tile, rotating it 45 degrees and then halving the hieght:
    [​IMG]

    But, according to Wikipedia (and other places), isometric projection in Maya should be as simple as creating a new camera at the origin, rotating the camera -35.264 degrees vertically, then 45 degrees along the horizontal, then zooming out to the desired distance. At least accoring, to Wikipedia, it does. Maya has a feature where you can flick an Orthoganal tickbox and it produces tiles like the grey box shown below.

    But if I superimpose what wikipedia thinks is a isometric tile onto what I know (or what gaming has traditionally considered) an isometric tile, I get this:

    [​IMG]

    This is the problem we've been having. What's going on? What explains the difference between the two?

    My problem is that our game is configured to use the green tiles above, and now we're rendering 3D objects into tiles we're really struggling to set up a camera so that it can produce them in this format - we keep ending up with ones like the grey box, and you can see the alignment issues there.
     
    #1 Chris England, Jul 3, 2010
    Last edited: Jul 3, 2010
  2. hippocoder

    Indie Author

    Joined:
    Mar 18, 2008
    Messages:
    591
    Likes Received:
    0
    You sure wikipedia is accurate? no-one ever said wikipedia was accurate. Check it is first.
     
  3. hippocoder

    Indie Author

    Joined:
    Mar 18, 2008
    Messages:
    591
    Likes Received:
    0
    And umm, it doesn't matter dude. What matters is that they match up in the game.
     
  4. Chris England

    Chris England New Member

    Joined:
    Sep 22, 2009
    Messages:
    81
    Likes Received:
    0
    Of course it matters - they're not going to match up in game if they don't match up there. I wouldn't be asking otherwise. I'm looking for an explanation as to why, rather than being told one of the methods is wrong (I can tell that just by looking at it).
     
  5. Jack Norton

    Indie Author

    Joined:
    Jul 28, 2004
    Messages:
    5,130
    Likes Received:
    0
    I remember having a similar problem a while ago using Poser. If I remember correctly, it was a setting to apply to the CAMERA object to produce an orthogonal rendering. I'm not familiar to Maya but I believe the problem might be the same.
     
  6. Jon Hellebuyck

    Jon Hellebuyck New Member

    Joined:
    Apr 13, 2010
    Messages:
    24
    Likes Received:
    0
    Jack's got it right. In Maya, go into your camera settings (in the cameraShape node) and expand the "Orthographic Views" section. Get the camera set as you've described, click the "Orthographic" check box, and Maya will remove the perspective distortion that normally comes with a perspective camera. I think this should get you where you want to be.
     
  7. Chris England

    Chris England New Member

    Joined:
    Sep 22, 2009
    Messages:
    81
    Likes Received:
    0
    Hi Jack - yup, Maya has a feature where you can produce ortho tiles using that camera mode. That produces tiles like the grey cube shown on Wikipedia.

    The problem is that conventional iso game tiles are made by taking a square in PS, rotating them 45 degrees and then halving the height of the resulting image. This produces the tiles in green.

    The problem is that our game engine is set up to use the tiles in green, and we need to find a way to set the camera up so it automatically renders 3D models in that format. I've edited the first post with this info to make what I mean a bit clear.
     
    #7 Chris England, Jul 3, 2010
    Last edited: Jul 3, 2010
  8. Ratboy

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    222
    Likes Received:
    0
    You're going to have to adjust the camera angle and zoom manually until you match the existing tiles. Not much else to it, really.
     
  9. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,212
    Likes Received:
    0
    "Thus, the isometric projection used by most games tilt the x- and z-axes with approximately 27 degrees (the exact angle is "arctangent(0.5)")."

    http://www.compuphase.com/axometr.htm
     
  10. Chris England

    Chris England New Member

    Joined:
    Sep 22, 2009
    Messages:
    81
    Likes Received:
    0
    Thanks very much oNyx - that put me on the right track. Turns out 26.6 degree is the angle that is used. That, coupled with the Orthographic tickbox, gives you the correct set-up. Before the Orthagraphic tixbox was being coupled with a 35.265 angle, which gave me the grey squares seen above.

    Thanks very much for the help everyone, much appreciated.
     
  11. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,212
    Likes Received:
    0
    >Turns out 26.6 degree is the angle that is used.

    It's 26.565051177077989351572193720453..., actually. ;)
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer