Page 1 of 1
Simple question: Height of tile
Posted: 04 Feb 2009 17:07
by Wotan
I wanted to make a try at modelling some bridges and tunnels. However to do that I need how much the difference in height is on a sloped tile if the tile is 12,5m x 12,5m wide. Anyone who knows?
Re: Simple question: Height of tile
Posted: 04 Feb 2009 17:12
by Eddi
the length and height scales in TTD are not easily comparable. E.g passenger wagons are much too high for their length, or much too short for their height.
I believe the height scale even differs between houses.
Re: Simple question: Height of tile
Posted: 04 Feb 2009 17:17
by Wotan
I know that. The reason I ask is that I need to know the slope of a sloped tile to make a tunnel or a bridgehead.
Re: Simple question: Height of tile
Posted: 04 Feb 2009 17:22
by maquinista
I had the same question when I tried to code a bridge.

Re: Simple question: Height of tile
Posted: 04 Feb 2009 17:32
by DaleStan
I'd say to keep the pixel-ratio the same -- if a flat tile is twice as many pixels across, make the height difference on a sloped tile also twice as many pixels.
Obviously, I am not an authority on this matter.
Re: Simple question: Height of tile
Posted: 04 Feb 2009 17:37
by Rubidium
A tile height is 8 pixels high, which means something between 5 meter (height of truck) and 250 (aircraft flight level) meters in real life.
Re: Simple question: Height of tile
Posted: 04 Feb 2009 17:49
by Eddi
problem with tunnel entrances is that tiles are 8 pixels high, while vehicles are 12 pixels high. the game hides this fact with some magic perspective trickery.
Re: Simple question: Height of tile
Posted: 04 Feb 2009 18:31
by michael blunck
Eddi wrote:problem with tunnel entrances is that tiles are 8 pixels high, while vehicles are 12 pixels high. the game hides this fact with some magic perspective trickery.
According to my experience, a (train) vehicle is 6 (/,|,\) or 7 (_) px high, and there´s no "magic trickery" involved (or needed) with the perspective. They just move under the tunnel portal et voilà.
regards
Michael
Re: Simple question: Height of tile
Posted: 04 Feb 2009 20:02
by GeekToo
In my Blender models (for grass slope ao) I always use an angle of 16 degrees (steep slope), and that works out rather good after rendering.
If you want a little more background information, here's my reasoning:
In sprite 3982 you can see that the height difference is 8 px for a slope (compare middle left with middle right)
The width of half the sprite is 32 px.
The angle between level tiles and the camera (viewpoint) is 30 degrees -> sin (30) = 0.5 -> y value is half the x value.
That means that a height of 8 px (vertical) corresponds to 8/cos(30) = 9.23 px 'real' height.
So the angle = atan ( 9.23/32) = 16.1 degrees
Applied on the 12.5 m scale ( but be careful, different objects are scaled different in OTTD: a sky scraper is one tile, but a house too)
x = 12.5 * 0.5 sqrt (2) = 8.84
Then y (the height in the real world ) : y/x = 9.23/32. So y = 8.84 * 9.23 / 32 = 2.55 m.