Rectangular terrain

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
RodrigoAmazonas
Posts: 24
Joined: Mon May 25, 2009 2:18 pm
Location: Brazil
Contact:

Rectangular terrain

Post by RodrigoAmazonas »

Hi,

in my project of drawing different countries, I got stuck with this requisite of terrain maps having to follow the rule 2^N + 1.

For Brazil, height map get about 588x585 pixels. So I stretch it to 1025x1025 (2^10 + 1), no problem.

The problem arrives with Indonesia. Its height map get about 686x252. If I stretch it to 1025x257 or 1025x513 it will get completely distorted. If I stretch it properly (not using part of the available terrain), it will display a strange and useless portion of land. Is there any other solution?

Thanks in advance,

Rodrigo.
I feel, therefore I am.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

You could either, instead of stretching the terrain, scale the image so that the aspect ration is maintained and then just add low level values to get it to a correct size, or you could scale it in the way you did and appy different scaling values in Irrlicht (e.g. your terrain is 257x192, scale the image to 257x257 and then scale it to x=1.0 and z=0.75). I guess that could help.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Post Reply