Search Unity

Help Wanted Weird posterized normal effect

Discussion in 'Shader Graph' started by Mad_ed7, Mar 26, 2020.

  1. Mad_ed7

    Mad_ed7

    Joined:
    Jun 25, 2018
    Posts:
    7
    Hi Everyone,

    I'm trying to make a smoothly lit-shader that uses vertex color and no textures for models made in VR using Quill. Models made in Quill tend to come out very sausage-y like this:
    Screen Shot 2020-03-26 at 12.10.26 AM.png

    To fix this, I attached a posterize node to the Lit Master's normal. I got some good results.
    Model Lit.png

    However, something's wrong with the shadows. I can only get darker shadows when viewing the models at certain angles.
    Shadows.png
    Quillit Graph.png
    I'm new to making shaders so I'm not sure how to fix this. Any help would be much appreciated!
     
  2. Elizabeth_LeGros

    Elizabeth_LeGros

    Unity Technologies

    Joined:
    Jan 7, 2020
    Posts:
    39
    You are passing in an empty vector to the normal, since its always evaluating posterize(0). I think you were intending to take the vertex normal and pass it in as input to the posterize, but I am not certain that's going to give exactly what you are looking for either
     
    Last edited: Mar 26, 2020
  3. Mad_ed7

    Mad_ed7

    Joined:
    Jun 25, 2018
    Posts:
    7
    Thanks for your response! How would I go about attempting that?
     
  4. Elizabeth_LeGros

    Elizabeth_LeGros

    Unity Technologies

    Joined:
    Jan 7, 2020
    Posts:
    39
    Something like this upload_2020-3-27_10-25-20.png
    Although you will also need to renormalize the vector so really you would need to throw a normalize node onto the output of the posterize node
    upload_2020-3-27_10-30-21.png
     
    Last edited: Mar 27, 2020
  5. Mad_ed7

    Mad_ed7

    Joined:
    Jun 25, 2018
    Posts:
    7
    Thank you! I'll try this out and continue to play with the shader. I feel like I'm close to solving it.
     
unityunity