a quick question on HeightMap Exporting/Importing

Users who are viewing this thread

When I export a single-node terrain of 64x64 HeightMap resolution, say all of height 0, I get a 65x65 png file starting with an extra row of 0.8134432 values and with an extra column of zeroes except a single extry of 0.8134432. Thus when I import the very same height map file, the first row of the square terrain is bumped up by a height of 0.8134432.

1) What do these extra row & column represent?
2) What's the correct range of 64x64 out of the 65x65 shape that I should use as the correct height map? Would it be [:64, :64]? or [1:, 1:]?
3) It's my first time trying to get involved in the modding community. Was I supposed to ask this type of quick question as a reply to an existing thread, or just look up the documentation?

Thank you.
 
Okay it looks like I could've replied to the existing Modding Q&A thread there. I would gladly do that if someone could tell me how to erase this thread ? I don't see a delete button.

Of course I would appreciate it if someone leaves an answer to the question here though.
 
I played with it a little with small resolution and sort of get that we get +1s to the resolution size because the number should represent the number of vertices whereas the resolution size represents the number of cells.

Did I infer correctly???
 
I played with it a little with small resolution and sort of get that we get +1s to the resolution size because the number should represent the number of vertices whereas the resolution size represents the number of cells.

Did I infer correctly???
The scene editor as a one pixel border probably to allow stitching of tiled heightmaps.

Multiply your number of nodes by the nodes vertex resolution and add one to get the required size for imported heightmaps. So, for an 8x8 node scene with 256x256 vertices per node you'd need a 4,097 x 4,097 heightmap (8 x 256 + 1 = 4,097) to supply one pixel of height data to each vertex in your scene's terrain mesh.

BTW you don't need any maths. Just save a heightmap from your scene and the red text that pops up in the bottom left of your screen will tell you the correct dimensions that you'll need to import a heightmap (i.e. same size as the editor exports).
 
Last edited:
Back
Top Bottom