Add Color to Terrain
Hello!
Ive got my terrain that I create and paint in runetime.
I want to add some color to it (RGBA), like a little bit of red with low alpha on some places, some blue over there, etc.
How can I achieve this? (please dont recommend me assets)
Thank you
Answer by DougRichardson · Nov 19, 2017 at 10:18 PM
In the UnityEngine.TerrainData class, you can define the set of colors by setting TerrainData.splatPrototypes, where each SplatPrototype has a texture, which in your case will contain some solid RGB color.
You then generate a set of alphamaps (one for each SplatPrototype) to blend the different colors together. Once you have this set of alphamaps, call TerrainData.SetAlphamaps.
Your answer
Follow this Question
Related Questions
Help with terrain texture and grass blending 1 Answer
How to convert splat map to regular ol' map of terrain 0 Answers
Splitting Terrains and getting the textures to match up. 0 Answers
Texture color difference between terrain tiles,Texture seam between terrain tile group 0 Answers
Real-time terrain texture painting 0 Answers