Heightmap image pysical location

I have created a terrain in terramonkey. I couldn’t able to find the pysical path of heighmap image. Alpha blend files are present in folder “Textures/terrain-alpha/alphablend0.png”. Where I can find heightmap data?

There is no heightmap “image”, its stored in the j3o file.

Thanks norman,

So as I understand terrain data is stored as mesh data. So for these two approaches:

  1. Create terrain in terramonkey. Load the mesh. To get height at particular location, use the ray test.
  2. Load terrain using heightmap ie. terrain = new TerrainQuad(“my terrain”, patchSize, 513, heightmap.getHeightMap()); To get height at particular location, use getHeight(x,z) method.

I guess 2nd method will be faster. Am I correct?

No the terrain isn’t stored as a mesh and no that won’t be faster. Picking on terrain uses the height map data directly already and its also always accessible even if you loaded the terrain from j3o.

1 Like