Search Unity

[RELEASED] FREE Grit Buildup Shader (Two layer texture buildup with vertex displacement)

Discussion in 'Assets and Asset Store' started by LuneInteractive, Oct 13, 2017.

  1. LuneInteractive

    LuneInteractive

    Joined:
    Nov 27, 2016
    Posts:
    26
    Grit Buildup Shader
    Get Grit Buildup Shader Here FREE



    What is Grit Buildup Shader?
    'Grit Buildup Shader' is simply a shader that allows users to combine two textures for a layered effect as can be seen above in the gif demo. For example, users might wish to combine a rock and lava texture on an environment mesh, then choose to animate the exposed values in the lava to give a pulsating effect.

    The shader allows users quite a bit of control, such as displacement of vertices based on textures as a slider and a bunch more which you can find listed below.

    How does it work?
    The shader has a number of variables that can be tweaked to alter the appearance of the final product. I've attached images below showing the inspector with the 'moss' example selected. Below the images I've broken down what each map/ value changes.


    Albedo, Normal, AO and Height are textures that influence the “main” material.
    Gloss and metallic are standard PBR variables which can be scaled here.
    AO Scale: adds or removes AO to the model.
    UVs: handle the texture UVs for the Albedo, Normal etc.
    Layer Direction: the direction (unnormalized) to ‘build up’ the second layer.
    Layer: The texture supplied for the second built up layer.
    Layer Gloss and Layer Metallic are the standard PBR variables for the second layer.
    Displacement: How much the the vertices are displaced.
    Layer Tint: Color tints the second layer.
    Tessellation Value: how much the model should tessellate in general.
    Layer variables: Amount = Level of the second layer based on the Layer Direction (Will update based on World_on_Local_off variable). Crevice: Adds overall level based on the crevices of the first material. Disp: a second variable to only control the displacement of the vertices affected by the second layer.
    Power: This is emulated Falloff, for sharper crevices a higher value might be required.
    Displace Base: Is there displacement on the base layer? (Y/N)
    Displace Layer: Is there displacement on the second layer? (Y/N)
    World_on_Local_off: (ticked = world, unticked = local) This variable controls if the direction is in local space of the model or if it is in worldspace.
    Distance Tessellation: This variable is the ‘high quality’ tessellation while the variable ‘Tessellation Value’ is the tessellation at larger distances (see below).
    Tessellation Fade: At which point the tessellation switches from high to low fidelity.


    What are some potential use cases?
    We feel Grit Buildup Shader will benefit people who want to combine two seamless textures on an object, then scale the properties of the shader to customise the end result. Users could animate many of the shader values for varied use cases, such as the pulsing of lava described above, or the rusting of metal objects over time, etc...
    Known limitations
    We've found that the main limitation lies in the displacement of vertices in certain meshes. Where a mesh becomes complex, if the displacement values are too high, certain vertices will tend to 'split' apart, causing visual artefacts. This is simply a limitation of this shader and can be avoided by using little or no displacement.

    Meshes that intersect, such as rocks in a cliff face are a wonderful use case where displacement can be used and artefacts can be naturally hidden along seams.

    Thanks for checking it out!






    Documentation

    Support Email

    Website

    Twitter

    Kind regards,

    Jair McBain
    Co-Director of 2Ginge​
     
    TeagansDad and sylon like this.