S
S
Stanislav Silin2014-11-19 22:28:20
Unity
Stanislav Silin, 2014-11-19 22:28:20

How to dynamically paint a planet whose relief can change?

I'm making a planet, the relief of which can be changed on the fly... a mountain grew there, and water flooded everything there, etc. The planet itself is ready, but now you need to apply the texture correctly, or rather 4 textures:
- sand
- earth
- grass
- rocks
I would like to do this depending on the current height of the terrain for a given point. Here I managed to achieve a similar effect (better to look at the dragon). I tried to do the same in Unity3D and for some reason it didn't take off. I'm still working on this, but for now I'm wondering what other ideas there are for a similar effect?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2014-11-20
@byme

You need splatmapping . First make a heightmap and a splatmap. A height map is a regular single-channel texture, each pixel of which contains a height. In different channels of the splatmap, there is information about the presence of a certain type of terrain at each point. When you need to change the relief, draw on two textures. Or you change only the height map, and use it to create a map of the area. Then you stuff all the maps and terrain textures into the shader, check with the maps and blend the textures in the right proportion. On the picture below on the left is the finished result, on the right is the splatmap.
In general, it's better to take a ready-made solution in the store, there are height maps, and splatmaps, and a planetary shader. I also recommend playing with World Machineto better understand how different cards are related.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question