Search Unity

Texturing mesh terrain in a 3D 4X game

Discussion in 'General Graphics' started by barker_s, Sep 16, 2016.

  1. barker_s

    barker_s

    Joined:
    Jul 17, 2012
    Posts:
    29
    I am currently working on a hex-based 4X game and I'd like it to be similar in presentation to recent (and upcoming) Civilization games. My terrain is currently made of procedurally generated mesh chunks (see screenshot below), but now I'm trying to tackle the problem of texturing said meshes and I'm stumped.





    My first impulse was to go for a triplanar shader, but all implementations of triplanar I know of only allow for a maximum of three textures (e.g. top, side, botom). The problem is, a 4X game usually depicts a whole world with different biomes like desert, polar, jungle...

    Next I found this shader pack on Asset Store - https://www.assetstore.unity3d.com/en/#!/content/23425 - which can supposedly handle any amount of textures (as far as the performance allows), but it's limited to Unity terrains.

    I also own Honey Hex Framework and their solution seems to be to bake a separate texture for each chunk, but their shader doesn't support triplanar mapping (it also seems to be the reason why they don't support hexes at different elevations / cliffs).

    I've been trying to research this problem for the better part of the day and I'm still far from finding a solution. I suck at writing shaders, but I do own Shader Forge, so my next step is to try and combine a triplanar shader with splatmap shader with vertex coloring.


    My question is: did you guys ever face such a problem? What's the best way to create a big world for a strategy game with different biomes and good-looking transitions between materials using meshes rather than terrain? Perhaps there are some Asset Store solutions that might help with this?

    I appreciate any info / suggestions you can provide.
     
  2. barker_s

    barker_s

    Joined:
    Jul 17, 2012
    Posts:
    29
    Since there were no responses, I went for triplanar-splatmap combination. It's still not perfect and nowhere near finished, but seems like it will do:

     
    fffMalzbier likes this.