Search Unity

Building a custom terrain generator, need help understanding splatmapping.

Discussion in 'Scripting' started by Edvard-D, Jul 26, 2014.

  1. Edvard-D

    Edvard-D

    Joined:
    Jun 14, 2012
    Posts:
    129
    Hey everyone!

    I'm currently working on a custom terrain generator that builds custom meshes without using the built in Unity Terrain feature. I've got the mesh part of it working nicely, but now it's time to texture the terrain. I've been looking around and have gotten suggestions to use splatmapping. I think I understand the basics of how you get the splatmap data, but I don't understand how that data is then used to actually apply the textures to a custom mesh. Again, I'm not wanting to use the Unity Terrain feature.

    Up until now I've worked with meshes that have a single texture, but for terrain splatmaps you need to blend several textures together to create a seamless terrain. How exactly is this done? Through apply textures using UV coordinates based on the splatmap somehow? Maybe a shader?

    Any insight is appreciated.