Simple question: Height of tile
Moderator: Graphics Moderators
Simple question: Height of tile
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?
Coders wanted:
DSB Litra E in 2cc -
DSB Litra A in 2cc
Unless stated otherwise all works published by me on these forums is covered by a Creative Commons Attribution Non-commercial share-alike License. Please PM me if you are interested in obtaining a different license.
Re: Simple question: Height of tile
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.
I believe the height scale even differs between houses.
Re: Simple question: Height of tile
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.
Coders wanted:
DSB Litra E in 2cc -
DSB Litra A in 2cc
Unless stated otherwise all works published by me on these forums is covered by a Creative Commons Attribution Non-commercial share-alike License. Please PM me if you are interested in obtaining a different license.
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: Simple question: Height of tile
I had the same question when I tried to code a bridge. 

Sorry if my english is too poor, I want learn it, but it isn't too easy.
- [list][*]Why use PNG screenshots in 8 bpp games.
[*]Caravan site New Industry. · Spain set. · Some spanish trains for locomotion[*]Favourites:GRVTS · ECS · FIRS
Re: Simple question: Height of tile
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.
Obviously, I am not an authority on this matter.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: Simple question: Height of tile
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
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.
-
- Tycoon
- Posts: 5954
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Simple question: Height of tile
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à.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.
regards
Michael
Re: Simple question: Height of tile
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.
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.
Who is online
Users browsing this forum: Amazon [Bot] and 5 guests