Some questions about terrain , scale , world dimensions

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
JonChaos
Posts: 15
Joined: Thu Aug 24, 2006 2:03 pm
Location: Saarland , Germany

Some questions about terrain , scale , world dimensions

Post by JonChaos »

Hi

I have some questions about the Irrlicht Engine and i hope someone here can help me.

The first question i have is about the world dimensions and especially what range they have.
In other words how "big" is the worldcube between Xmin,Ymin,Zmin and Xmax,Ymax,Zmax and what is the value range for these coordinates.

The other three questions are about the terrainnode.

When i load a 256x256 terrain and scale it ( like in the example (40,4,40) ) how big is the terrain mesh in the world if i view from above?

In other words if i want to have a terrain from (view from above ) worldposition(0,0) to worldposition ( 2560,2560) how do i have to scale it ?


If i move a terrain ( to display it at another position ) is at the position i use as the argument for the locate@ function the position of a corner of the terrain or the center of it?


The last question is about Freeworld3D and Irrlicht Terrain.
When i create a heigthmap with freeworld and display it in Irrlicht it seems completely broken regardless of the terrainsize i choose.
Can this be a problem with the scaling in both terrainrenderers ?
Or migth it be because i export the terrain as a 24bit bmp ?


Thanks for your time :)
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

There is not really a world size !!!
It depands on the size of Irrlicht's indices, but I don't know if it's using 16 or 32 bit indices...

The size of a terrain depands on the values you choos when creating it !!!
You can set the size of the squares the terrain is build off !!!
So if you use a small size the terrain is small and with a large size it's large...
So for example if you use a square size of 10 and the heightmap is 257*257 the terrain is 2560*2560 wide !!!
If you use a square size of 1 it's only 256*256 and you have to scale by 10 to get 2560*2560 ...
But I think you should not scale the terrain, use the square size for this instead...

The position of the terrain is at a corner (not in center), as far as I remember it's the upper left corner, but I could be wrong with this...

The heightmap has to be a greyscale bitmap (8 bit) !!!
Also every pixle of the heightmap is a vertex, so if you use a size of 256*256 the terrain is build out of 255*255 squares !!!
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply