Hello and welcome to the technical documentation of RAWR Absolute World Replacement. RAWR is a big project including landscape, tracks and roads so far, eventually adding more things to become a full base set one day (tm).

In general, the project is a big pipeline of one Autodesk 3DS MAX scene and one Adobe After Effects postproduction scene, with some helper objects from Adobe Photoshop. Even though it is all just one file, the documentation will be split into parts, treating each of the kinds of renders differently.

Globally important values

Camera setup and scale

  • I work in centimeters, each of the planes is 1000x1000 cm, with 50cm extra added edge, so 1100x1100cm total (50cm is more than enough, I would have to try to tell how much is the "safe minimum" but I am fine with leaving it as that.
  • height of the tile at the final-edge corner (shown as blue) is 224,589cm (- ish, someone around can probably dig the correct angle, but this works (: )
  • height of the tile at the inner-edge corner (shown as yellow) is 204,156cm
  • camera target is precisely at the center of the tile
  • relative camera position to target is x= 2090,702cm, y=2090,702cm, z=1707,052cm with camera Lens set to 86,8mm, FOV to 23,431 degrees, and of course camera is set to Orthographic projection
  • render to 256x256 or 256x320 for taller sprites (or moar? :) ) ... this is doable because the horizontal 256 always stays the same so it always fits

Overall System

Because RAWR is not just one kind of sprites, I found it convenient to split the project into various sprite-type groups. Each of the sprite groups is handled a bit differently during rendering, and each of them has it's own postproduction method.

The sprite groups are:
  1. Terrain tiles
  2. Farm tiles
  3. Roads
  4. Tracks
  5. Bridges
  6. More to come later :)

1. Terrain tiles

General things and preparation

Because there is a lot of textures which depend on each other (for example normal grass is also represented in half-bulldozed, half-snowy, or other textures, it is good to have some kind of interlinked infrastructure which would auto-update itself one I change just the one kind of grass.

That is exactly what I set up for my project - I have one composition for each climate, which then renders each texture in one frame on a timeline, sorted in some order that I constructed from the sprite IDs of ground types.

Project numbering order - outdated! I reorganized stuff

The whole project needs some organization what goes where and in which order. This order is simply taken from the sprite IDs, or somehow differently set up as it was convenient when I was discovering some extra needs as they popped up. Here you can find the list of my things though:

https://dev.openttdcoop.org/projects/rawr/wiki/Order

The textures are then all loaded (I also like to make them all square and 2048x2048, but that is optional.) into After Effects, they are dumped into various compositions, and in case they are used in multiple spot, their composition is duplicated to those places as well. In the end there is just one composition per climate which collects all of the texture compositions, allowing me to render them all from one composition into one PNG sequence in the order I like.

You can download the After Effects composition to have a look how it works, but you will not be able to download the textures as I buy them from cgtextures.com and they obviously do not allow to share them. You can still relink the file sources with your own textures and it will all work just fine.

3D Model arrangement

RAWR is created in 3ds max, rendered in Vray, and heavily edited in postproduction in After Effects ... I will be writing down the whole pipeline after I am done with the current version 0.0.2 but here is a short edition ...

Currently, one climate is done like this:

0. creating a model which has all 19 variations of sloped terrain - unwrapping the UVW mapping
- I work in centimeters, each of the planes is 1000x1000 cm, with 50cm extra added edge, so 1100x1100cm total (50cm is more than enough, I would have to try to tell how much is the "safe minimum" but I am fine with leaving it as that.
- height of the tile at the final-edge corner (shown as blue) is 224,589cm (- ish, someone around can probably dig the correct angle, but this works (: )
- height of the tile at the inner-edge corner (shown as yellow) is 204,156cm
- camera target is precisely at the center of the tile
- relative camera position to target is x= 2090,702cm, y=2090,702cm, z=1707,052cm with camera Lens set to 86,8mm, FOV to 23,431 degrees, and of course camera is set to Orthographic projection
- render to 256x256 or 256x320 for taller sprites (or moar? :) ) ... this is doable because the horizontal 256 always stays the same so it always fits
- that applies to all programs, not just 3ds max or blender

- note: each of the planes has 5% extra on every side, to allow cutting from the image without any transparency later

1. saving that mapping to png, mass-creating textures in after effects, with interlinking so e.g. if I change temperate grass, it will change everywhere it appears

2. separating the 19 tile models of the terrain

2. 19 separate cameras, each looking at that one plane

3. animating texture on all of the planes

4. 19 rendered cameras with (currently) 14 frames each (bulldozed lands, grass, rough grass kinds, rocky grass kinds, snow stages, water and water shores, city concrete tiles)

5. I take the separate images into After Effects, there I put them together into one large sprite sheet, cut them into non-antialiased sprites (important part; also, this is done twice - for x4 and x1 zoom, to make the hard edges correctly), colour-correct them (like manually adjust the brightness/darkness of hills, just for more clear look)

6. as an extra, my final output composition of each kind (like terrain, tracks, roads, farms, bridges, ...) comes in multi-frame animation where each climate/variation as one frame.

I think that is about everything you need to get landscape sprites done, for tracks I do some extra convenient stuff like I render tracks separately and compose actual terrain tiles under them, or for bridge heads I overlay them

I attach an example output sprite here (is too large for attachments) - 13 MB - https://dev.openttdcoop.org/attachments/download/7260/LAND_0000.png - hint: the order in which I sort sprites is the order in which the game sorts them so you can just load them by a template one by one and the sprite IDs will match (from my experience, it is useful to use same sorting as the game, saves a ton of re-ordering and re-sorting in postproduction etc.)

I personally think the postproduction is a must do, especially the cutting. Nobody cares if you got 1 file or 1000 separate sprites, but whether the edges of ground tiles are antialiased, matters a lot (alpha on ground tiles does bad things in the game). Also, if you have an option to render out perfect shapes without antialiasing, AND they will fit into the wtf pixel patterns that openttd accepts, you will not need the postproduction for cutting; I do not know such method however. Tell me if you discover it :P

I also add a zip with the tile masks. The x4 ones are originally from juzza1, the x1 ones are just taken from the original game just for that shape. They will be in the RAWR repository later, I just need to sort things out there, so I just attach it here so you could use it immediately :)

That is all for now, I think I will turn this into a quick and dirty wiki page on RAWR devzone, it is quite exhaustive what to do just to get things work.

P.S. Originally I had a different approach - I rendered a model of combined 19 tiles together, and then cut them from the whole render, but even sub-pixel imprecisions make the landscape look bad when put back together in the game, especially noticeable with tracks and similar precision-critical objects (RAWR 0.0.1 suffers from that)

P.P.S. NEVER ask me EVER how I got to those values XD [by testing and endless setting up]