Hi.
I am trying to render many hierarchically instantiated static meshes (grass and moss) on top of a heigt map I created. On a plane, these meshes are placed randomly, but with some average surface density that can be adjusted. I am looking for a way of calculating the correct height for every mesh, given its x-and y-coordinate.
I am aware that I could convert the world x- and y-coordinates of each mesh to uv-coordinates that correspond to the height map, and get the heigt from the height map. The problem is I don’t know how to do this.
Is there perhaps a simpler way of doing this? If not, how do I get the world-coordinate to uv-coordinate transform?
Thanks in advance.