Slopes steep.

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
lukasz1985
Route Supervisor
Route Supervisor
Posts: 429
Joined: 27 Mar 2013 08:58
Location: Strumien
Contact:

Slopes steep.

Post by lukasz1985 »

I'm trying to figure out what is the correct steep for slopes? And I can't find the solution.

The quesion is - what is the difference of height between level 0 and level 1 for example. I mean - if a tile is 1 unit long and 1 unit wide, what is the height difference? I've found value 0.41 pretty useful and I guess that is an outcome of the slope angle given in degrees - but still this is result of my guessing. Can anybody tell me the correct angles? Thanks!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Slopes steep.

Post by planetmaker »

At normal zoom, the difference between two height levels is 8 pixels.

http://newgrf-specs.tt-wiki.net/wiki/NM ... ile_slopes shows all slopes. If you want to render it, use the dimetric projection. The diagonals of the flat square tile is 64 pixels wide and 31 pixels high.
lukasz1985
Route Supervisor
Route Supervisor
Posts: 429
Joined: 27 Mar 2013 08:58
Location: Strumien
Contact:

Re: Slopes steep.

Post by lukasz1985 »

Thanks for that but could you specify a 3D angles and dimensions? The thing is I'm doing 32bpp stuff and I don't really care much about every pixel, yet counting that stuff.. I could figure out this but maybe you got the answer straight away. The things I need to know are explicitly displayed in the attached image.

I need to know:
- the angle
OR
- the height


Image
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Slopes steep.

Post by Alberth »

You may want to check what zBase is doing. Since it uses rendering too, it should have values for your dimensions.

Otherwise, people drawing sprites manually don't think in your dimensions, they think in amount of available pixels for drawing,and the 2:1 ratio horizontal/vertical.
lukasz1985
Route Supervisor
Route Supervisor
Posts: 429
Joined: 27 Mar 2013 08:58
Location: Strumien
Contact:

Re: Slopes steep.

Post by lukasz1985 »

@Alberth Yeah, good idea
lukasz1985
Route Supervisor
Route Supervisor
Posts: 429
Joined: 27 Mar 2013 08:58
Location: Strumien
Contact:

Re: Slopes steep.

Post by lukasz1985 »

Ok. So I've got the data form zBase, for anybody interested:
- Height is: 0,204155 units
- Angle is: 11,53856 degrees
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google Adsense [Bot], nihues and 77 guests