Home Technical Talk

Rendering isometric tiles with 3ds max

polycounter lvl 18
Offline / Send Message
Snowfly polycounter lvl 18
The tiles for the game have to be 48 px wide and 24 px high. How do I set up the camera so I render out the tiles at the exact dimensions needed?

I'm using an orthographic camera, but I can't figure out what FOV to use. Can anyone help?

Replies

  • neolith
    Options
    Offline / Send Message
    neolith polycounter lvl 18
    You'll have a very hard time to render out your tiles with the exact dimensions fitting your tiles. Better render about twice the size, create a mask for the proper dimensions in Photoshop and resize your images there. That's easier I think.
  • Eric Chadwick
    Options
    Offline / Send Message
    Try setting up a "Free" camera, checking the Ortho checkbox, turning on the Safe Frame, then setting the render to be the dimensions you need. The safe frame adopts the aspect of the render. Then move/rotate the camera so your model is within the safe frame.
  • AstroZombie
    Options
    Offline / Send Message
    AstroZombie polycounter lvl 18
    Will render to texture work?
  • Snowfly
    Options
    Offline / Send Message
    Snowfly polycounter lvl 18
    posm, that's exactly the setup I'm using. It's the guesswork in the move/rotate camera part that I'm trying to eliminate. i.e. I know the render width needs to be exactly 5 1/2 iso tiles wide, with a render resolution of 176 x 208. I'm working on a mobile game, as you might've guessed.

    The irony in all of this is the art direction seems to be gearing towards a Final Fantasy Tactics-ish style, so rendering in 3D might not even be necessary. But I'd sure like to use it as a guide, cause drawing isometric pixel art is bloody complicated.
  • HarlequiN
    Options
    Offline / Send Message
    HarlequiN polycounter lvl 18
    It's been a while since I had to do this, but here goes nothing, it should at least put you on the right track...

    To get a correct isometric render in max set up a free camera, click the orthographic button in its modify panel and then select the rotate tool while the camera is selected. Then right click the rotate tools Icon to bring up its type-in transforms panel.

    In the absolute world area make X = 60, Y = 0, and Z = 45. You now have an isometric camera. Use Pan to move the view around and adjust the FOV of the camera to zoom in and out.

    Now, that's the easy part. Rendering the pieces to size is... Almost impossible frown.gif Almost...

    Print screen your max screen and then paste that into a new photoshop document. Crop your image until you only have one of the max viewports left (crop out the yellow or black border, you're only interested in what's inside this). Make a note of the size of the image (mine was 542x419), and then head back over to Max.

    What comes next is a bunch of trial and error, and it'll probably drive you nuts. You need to set your Max render output to the same size as the Max window size you just pulled out of Photoshop, and make a Plane that's 24x24 units in size, or square as seen in the top view. Render an image from the Ortho Camera view, save it,then pop over to photoshop and load it up, use the rectangular marquee tool to measure the size your plane came out. Back in Max and sdjust the FOV up or down depending on whether the plane was to big or to small. Keep doing this until your plane is 48x24 - Simple!

    Or, you could just set your FOV to 99.00 because I just did all the hard work for you - 1 unit will now equal 1 pixel vertically and 2 horizontally as long as you render using the scene using the render size you found from the max viewport (it might work at other render sizes, but I promise nothing), then crop it in Photoshop to the size you mentioned. Say thank you Harl and go about your business.
  • Snowfly
    Options
    Offline / Send Message
    Snowfly polycounter lvl 18
    Harl, I can't believe you did all that, so I bit the bullet and went through the FOV's decimal by decimal (since apparently we're using different unit systems). I got my value, it's 84.5
    Really, thanks for the effort.
  • HarlequiN
    Options
    Offline / Send Message
    HarlequiN polycounter lvl 18
    Dang, that's a bummer. Maybe we're using different FOV settings (Max has 3, vertical, horizontal, diagonal).

    Anyway, I did a bit more fiddling, and on my version of max with the horizontal FOV setting (that's set by the small arrows right next to the FOV setting)the FOV needed for your actual output size is 41. Of course if our systems differ than it'll be useless to you that I worked that out, but I was interested smile.gif
    I also tried to work out a formula that would be able to give the FOV required for any given image size, but Maths is not my strong point, so I failed. Ho Hum, back to the drawing board. wink.gif

    Good luck to yah!
  • Snowfly
    Options
    Offline / Send Message
    Snowfly polycounter lvl 18
    Thanks. Believe me if I were more clever I would've tried to figure out a fancy never-fail geometric equation. Maybe someone's sussed it out, but I sure haven't come across it yet.... oh well, on with the show.
Sign In or Register to comment.