Is there a way to get the world coordinates of a given pixel in a terrain’s heightmap image? I’ve read through the source (Terrain.cpp) and I think I can do something like this if I have an access to the private member patchWorldOrigin_ then interpolate with this and the terrain’s node transformation but I’m not sure if this is the best approach.
Just to add, what I want to do is to add an overlay to the terrain that is aligned with the heightmap vertices. These overlayed quads will display a visualization of some sort using different colors that depends on the height of the terrain where the 4 vertices of the quad touches.
Example:
h1, h2, h3,
h4, h5, h6
h7, h8, h9
Above is a simple representation of the heightmap image’s pixels. What I want to do is overlay a quad per cell from h1 to h8. Note that these quads must be aligned with the vertices of the heightmap. TIA.