How do I set a Render Texture as the HeightMap for a Terrain?
How do I set a Render Texture as the HeightMap for a Terrain?
I'm looking at this method: https://docs.unity3d.com/2019.2/Documentation/ScriptReference/TerrainData.CopyActiveRenderTextureToHeightmap.html
I have a camera facing the bottom acting as a heightmap. I have a particle system attached to my player, emitting black particles on top of a white plane. The camera can see only those two. The plane and the black particles. Now the render texture attached to my camera is acting as a heightmap.
The image below shows what I have to deal with...
I'm only left with an option to import a still image, or export the terrain's heightmap. I was expecting a Texture2D input somewhere like you would usually find on a material.
I think one guy managed to pull something off here: https://forum.unity.com/threads/understanding-copyactiverendertexturetoheightmap.706679/
Help is much appreciated! If anyone can figure this out for me, hats off to you! :D