- Home /
Terrain(using unity Mesh) colouring with LibNoise
Hello everyone, I have terrain generator based on unity mesh and Libnoise library. Also i can use mesh.colors and VertexColour shader to draw colours. My question is how better I can define which vertex should have, for example, green colour and which hould have red or any other colour. Now I use two noises and if value of first noise is bigger than value of second at some vertex then colour of this vertex is one, else the colour is other. It gives me such a result. Also it gives me the opportunity not to use height based colouring and i don't wand to use it because of its unrealism. But it is not a very good idea to use my method and I'm looking for a better method.
I'm ready to get any ideas from you. Thanks a lot.
Answer by Buckslice · Jan 29, 2018 at 08:37 PM
You could use your color noise value as a lookup into a Gradient of color. Just make sure to scale the noise to be between 0 and 1. IE ifits in range -1 to 1, you add 1 divide by 2.
Also, this article has some great examples if you want to get more detailed. He does height based noise but also adds in moisture maps and biomes and stuff!
Thank you, the article is really very interesting, it's very usefull for me.