Advertisement

[3DSMAX] Rendering Tiles for 2D RTS [includes small guide]

Started by December 14, 2010 11:46 AM
12 comments, last by d h k 14 years ago
I have a strong interest in RTS games (think StarCraft: Brood War) and been starting a ton of attempts at creating them. Most of the later ones actually turned out pretty okay. I used to rip art for testing purposes but have tried to learn how to make my own units and buildings in 3DS MAX and render them properly and that was a blast, not hard to do but very rewarding.

What I absolutely fail to understand, however, is how to use 3DS MAX to render out tiles to be used in a 2D RTS. I don't even care if it uses isometrical or square tile proportions, but how do I model terrain in general (I find tons of "terrain modeling tutorials" on the net, but they never apply to game terrain or anything like I would need it) and how do I render these out properly? I know how to set up an orthogonal camera (did that to render out the units and buildings) but how can I get usable output for the terrain? If I do isometric for example, the tiles come out like this:



If you try and copy this shape into a map, you'll notice it doesn't work, there's overlap.

For reference, this is a screenshot of StarCraft: Brood War and the basic direction I'd like to go in (doesn't have to be as polished of course):



I know StarCraft: Brood War uses an isometric angle but actually 64x64 square tiles (you can see this in the editor), so, if I were to copy that method, how would I model terrain like that to begin with and then, how would I get 3DS MAX to render out 64x64 square tiles for me that I can then put together in my game into a proper looking map.

Is it all done "in post" (ie. touched up in Photoshop) or is there some way to be smart about this that I'm not seeing currently. Or are terrains like that never even rendered at all and hand-drawn instead? All help is appreciated.

[Edited by - d h k on December 15, 2010 2:21:58 PM]
Drawing a cliff tile does not mean the cliff has to be drawn in a single tile. Many surrounding tiles are manipulated to form smooth transitions between different elements in Starcraft's terrain. Many, many, images are used. The more elements you have, the more transition tiles are required.
Advertisement
Oh yeah, I am aware of the fact that a tile only makes up part of a cliff (and if I had a cliff image, say 3x2 tiles, I can easily cut out the individual tiles of course). This is a shot of a couple of StarCraft: Brood War tiles from the ScmDraft 2 Editor:



The question is: how would I get 3DS MAX to render out these kind of "floor" or cliff graphics in the first place? Is that even possible or would I have to handpaint somehow.
Well... i´ve never done something like this before but is suspect:

Modelling each thing on the normal axis (no rotating ore something)
set up a default camera and lighting project with the right direction for EVERYTHING in the game. Save that project as your "got-to" project so you dont lose it.

Go on modelling something. Then render out big, import into photoshop, scale it down until it fits yout tiles. Then blend it (maybe if you made a cliff ore something) with your desired terrain texture surrounding. Add some other painted details etc. Tile it down, finished.

I don´t think there is a much easier way to do :)
You are going about this backwards. 3DS Max isn't a replacement for actual skill.

I suggest this: http://www.petesqbsite.com/sections/tutorials/tuts/tsugumo/

@MA-Simon: Yeah, camera orientation, lighting and all that has to be the same, that's a given of course. :D I also considered rendering the tiles out at a much higher resolution and then scale them down and Photoshop them so they actually tile but I thought there might be an easier way. I will give that method a try and let you guys know how it went in a couple of hours.

@Daaark: I'm not in a very good mood (due to finding out just now I'm not getting that place where I wanted to study), so please forgive me for sounding extra-aggressive if I do come across that way.
Anyways, you are not helping. I never claimed or implied anywhere that I believe that a tool such as 3DS MAX can cover or mask a lack of skill. Since you linked me to that very popular pixel art tutorial, I will let you know that I've been working on pixel art for a very long time and consider myself somewhat decent at it. I'll attach a couple of samples. I wonder how you come about judging people without actually knowing jack sh** about them.









The only thing that I can retrieve out of your post that is even slightly related to this topic is that you seem to believe that 2D RTS tiles have to be pixel art or at least hand-drawn and not pre-rendered. I do know for a fact that this is not the case and that there are great looking 2D RTS that do use 3DS MAX or equivalent programs to render environments out into tiles somehow.


I apologize once again for lashing out, but I feel that your post there deserved it.
Advertisement
I think modeling in 3DS Max and touching up in photoshop is a good idea. 3DS Max will give you the correct depth & angle perception of objects while photoshop can manipulate & resize according to what scale you need.

Obviously, the more you scale down, the more detail you loose. But I think you'll come up with great results. Goodluck! Post pictures! n_n
Alright, thanks to your input and a couple hours worth of toying around I have managed to come up with a workflow that seems to work fine for the moment.


GUIDE

(1) Model your cliff, terrain object, ramp or whatever. For my cliff I worked within a cube of size 100 to make sure I got a proper result, not quite sure just how important that is though at the moment. Once you're done and about to render, copy it twice and put it into a position like as if it was in your game already and tiling. For my cliff this means I made a copy of the tile and shifted it left, made another copy and put that to the right, you can see it in the first picture below.

(2) Render the model in isometric perspective (plenty of tutorials on how to do that in 3DS MAX out there) and make sure your camera is set to be orthogonal (so objects further away do not actually become smaller as they would with a real perspective). I rendered my cliff at 512x512 and I also disabled anti-aliasing (seems to look better in the end).


My render straight from MAX, very crude man-made cliff model...

(3) Open the render in Photoshop and add in guides where you want your tiles to loop, this process is hard to explain but should be clear immediately when you do this yourself.


These are my guides, I went by the upper front part of the cliff...

(4) Select the part of the image within these two guides and copy it into another document (or crop it so whatever is outside gets deleted). We now want to size it down to its real size so that it can be used in our game. The dimensions you want to choose depends on the game you want to make, I'm doing a 640x480 game with 32x32 square tiles (StarCraft: Brood War specifications). Since I want this cliff to consist of two horizontal tiles, I size it to 64 pixels horizontally and let the program calculate how "tall" the document has to become in order to remain true to its aspect ratio. I also selected "Bilinear" mode because it seems to look the best for this.



My cliff, down to scale at 64 pixel width...

(5) You then want to fill the vertical space, I increased its height so the image was exactly 2x5 tiles (you will have to blend this into your ground tile, for this test I could just fill the new space with black).

(6) And now it's very easy to just select 32x32 squares out of this file and save these as individual tiles. You don't have to save tiles that don't include anything relevant to your object (in my case there is a tile that would be entirely black, the left lower corner).


What it looks like tiled in my game...


PROBLEMS

I suspect this approach might become an incredible hassle once you are working with actual ground tiles and more complicated tiles but it looks like this is the way to go anyways.

One problem I am actually experiencing however is lighting. In my example I'm working with a simple Sky Light and Light Tracer which gives it a "clay-like" look, this seems to work fine. As soon as I add any spot or point light my render doesn't tile properly anymore, which does make sense in some way. I think the only options are to get creative with simple directional (or sun/sky) lights. Shadows should still be possible.


IDEAS

If you are working with a set of cliffs for all directions, several ground tiles and so on, maybe it would be best to render it all out in one giant, say 4096x4096 image and then just crop tiles out, not sure but it seems easy and doable.
This is what I was going to say to you, but you seem to have made it out already. Notice that in that tileset you posted from the original game you have real square tiles, and you need 4 of some to build up an isometric, "game-view" tile.

All you need to do is split your game objects, "quantize" them into these square tiles that are used to build up bigger objects. Take your time to find the best way to split them.

Although not with the same angle (and definitely not a complex shape as that isometric, starcraft style ground), there are many RPG chip\tilesets out there that quantize bigger objects (or smaller ones that are abnormally shaped, but add variation to your composition) into game-tiles - these game-tiles can NEVER change in size.

Check these out:




Many more: http://www.gdvclan.de/projekt/pchipsets2.htm

Best of luck, although you don't need much as I can see you are talented enough to pull this off.

EDIT - About the lighting: I'd advise to render your stuff with that Light-Tracer setup which brings an interesting ambient occlusion shade, and leave lighting to be handpainted in Photoshop (so you have a pixel-level control of how things will seam - no pun - and look).

[Edited by - Kryzon on December 15, 2010 3:45:01 PM]
Quote: Original post by Kryzon
...leave lighting to be handpainted in Photoshop...

+1. not to mention any texture changes as well.

btw, dhk, the tiles look great so far! keep up the good work.

This topic is closed to new replies.

Advertisement