Page 1 of 1

Rectangular terrain

Posted: Wed Sep 30, 2009 9:14 pm
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.

Posted: Thu Oct 01, 2009 5:26 am
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.