Search Unity

Blend Material with mask setup?

Discussion in 'Universal Render Pipeline' started by ridethefader, Aug 27, 2020.

  1. ridethefader

    ridethefader

    Joined:
    Jun 17, 2019
    Posts:
    44
    I have a pretty large object in my game, that I need to setup a material that blends 3 or so different materials together using masks. Similar to how large rocks are textured. I only know how to do this using Unreal Engine, I have not done this using Unity. But I'm also using URP for our project and it seems limited so im not sure what to do.

    Is this possible in URP? What would be the best approach to texture a large object? Using a single tiling texture shows too much repeating, which is why the mask approach would usually be the workflow here.
     
  2. ridethefader

    ridethefader

    Joined:
    Jun 17, 2019
    Posts:
    44
    Bumping this.

    Does anyone have any techniques for texturing large cliffs or large objects with tiling textures with URP? I guess using Detail Maps would be a good way to go, but Im not sure how to go about this in Unity or if its possible in URP (I come from using UE4). Thanks
     
  3. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    We use vertex painting and heightmaps to blend different set of textures. It works really well.
    We made the shader using Shadergraph.
     
  4. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    639
    You need to have a map which controls where the 2 materials will go. This is similar to the splatmap that a terrain uses. So for that so could use a black and white texture, or vertex colours of your mesh.

    Once you have that, you need the maps for your 2 materials in the same shader, and you simply lerp between the texture maps for each material, using the control map.

    If you don’t want to code shaders, try ShaderGraph or Amplify SE, plenty of good tuts.

    Good luck!