Hello all i have a few questions about the heightmaps for irrlicht..
After doing the terrain example i was looking to swap the heightmap for the one i have, but when i tried to launch it i got some access violations i believe..
It may have been caused by the size and/or the format, so what i want to know is
*What is the maximum size for a heghtmap in irrlicht?
*and what format should it be in....
Terrain Heightmap Questions
-
- Posts: 42
- Joined: Sun Nov 16, 2008 11:23 pm
- Location: Melbourne, Australia
- Contact:
it must not be a square, but it must have dimensions with POT+1 (65, 129, 257, ...) !!!Valmond wrote:Guess you should use a square image with the size power of two (64x64 , 128x128 , 256x256,...) also...
also the heightmap must not be too big, the buffer holds only an u16 amount of vertices...
well, the latter should be solved in the last release (u32 buffer) so you could use larger heightmaps as well, but I don't know how well this works...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
The standard heightmap uses a grey image (256 colors in a supported image format). But you can generate an empty terrain scene node and call the raw map loader, where you can also pass some parameters to get the proper encoding for your heightmap (int/float and byte count). The dimensions should be 2^n+1 as Acki said, in order to simplify the work of the LOD system and get proper texturing, although some of those errors have also been resolved in 1.5