Search Unity

Question Vertex Displacement only at the bottom of the object

Discussion in 'Shader Graph' started by KrzBz, Aug 14, 2019.

  1. KrzBz

    KrzBz

    Joined:
    Mar 4, 2019
    Posts:
    1
  2. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    197
    What you need to do is take the position node and split it. You can then take the x and z (or r and b as they are listed in the split) and feed those unchanged into a vector3 node. Take the g of the split (which is the y value of the vertex position) use that as a mask by feeding it into a smooth step node. There are a number of tutorials on youtube that use this technique. I'm attaching two screen grabs of a graph I made that hopefully will help. The first shows the set up for the gradient noise I'm using for displacement. The second shows how that ties into isolating the the vertices I am displacing. In my case I am doing the opposite of what you are trying to achieve, so you could add a one minus node after the leap near the end.

    Hope this helps.
     

    Attached Files:

  3. frozenmangotree

    frozenmangotree

    Joined:
    May 2, 2020
    Posts:
    14
    im confused why did you transform from world to object on the end instead of just using object mode during each position node in the graph?