Search Unity

Adding leafs and other details on roads

Discussion in 'General Graphics' started by SomerenV, Dec 7, 2018.

  1. SomerenV

    SomerenV

    Joined:
    Dec 20, 2011
    Posts:
    83
    Hey all, what's the best practice of adding decals onto roads? Patches of leaves on a road for instance, or cracks here and there. The road follows the terrain so it isn't flat. So adding planes with a transparant texture won't work.

    I've been looking into decal assets but I have no idea what asset is the best for what I need. Any tips you guys can give? :) Thanks!
     
  2. Torbach

    Torbach

    Joined:
    Jan 3, 2013
    Posts:
    10
    I think? can you blend leaves onto terrain with texture2dArray inside your shader using pre-mult

    Terrain.out =

    terrain_input * (1 - (saturate[50*leaves.rgb]) + leaves

    author leaves scatteted on black and dont paint darker then rgb 6,6,6


    If you make progressive densities you could probably blend them using another swatch.r to lerp which density in the array

    I _think_ this is possible.?