How to apply HeightMap to ProceduralMeshComponent at runtime with C++

Hi all,

I have created a procedural height map generator and i would like to make a procedural terrain using these height-maps. After some searching around online i think one of the best methods would be with the ProceduralMeshComponent but all i have seen so far with these is that they use vectors to generate the mesh.

So my main question is if there is anyway to actually apply a height map in c++ to the proceduralMeshComponent or if there is any method to convert the height-map into a 3d vertex array which can make the terrain?

Any help or ideas would be very much appreciated.

Thanks in advance

+1 Would also like to know how to use a Heightmap with a proceduralMesh.
Did you get any closer?

Hi sorry for the delayed reply to this. If you are still interest yes i did get it working. long story short i read the colour of the height map in Gray scale between 1 and 0 and multiplied that by my work scale which eventually worked a treat with the procedural mesh. I had to calculate the tangents and normal etc but this wasn’t too difficult. Here is the output i have so far

cant get the materials working on it yet more than a base colour but its a start!!

I don’t suppose you could show any actual source code?