Search Unity

Toon Shader Receiving Shadows

Discussion in 'Open Projects' started by SimpleTek, May 16, 2021.

  1. SimpleTek

    SimpleTek

    Joined:
    Oct 8, 2020
    Posts:
    2
    I'm pretty new to all things game dev. I'm at a point right now where I'm trying to lock down visuals and settled on going with a cel shaded look. I absolutely love what you all are doing with Chop Chop, so decided to utilize the toon shaders from Chop Chop into my own project.

    The problem I'm having is objects not receiving shadows. Every tutorial I've followed for creating a toon shader ends looking good, but with objects not receiving shadows. I loaded up Chop Chop and found that many objects are casting shadows the way they should but don't understand how. I recreated the toon shader and it's required sub graphs, as well as the toon ground shader and it's required subgraphs. The shading looks fantastic, but once again objects are not receiving shadows. How is this accomplished?

    I've found exactly 1 toon shader tutorial which ended with items receiving shadows, but did not look as good as Chop Chop's shading and I was limited to using plain colors instead of being able to apply textures. I wouldn't begin to know where to insert a texture 2d into that graph to be able to apply textures.

    My brain just refuses to understand what I'm doing with shaders. I've checked out unity documentation and understand a tiny portion of what some of it is teaching me. I've followed along with 4 tutorials now for creating toon shaders but have a very -limited- understand of why I'm doing the things I'm doing in these tutorials lol.

    Any advice would be greatly appreciated!

    On a side note, I noticed that Chop Chop, like many assets I've experimented with on the Unity asset store, seem to use planes instead of terrain when creating the ground. Is there a reason plane seems to be the go to?
     
  2. SimpleTek

    SimpleTek

    Joined:
    Oct 8, 2020
    Posts:
    2
    So I found another tutorial from "Ned Makes Games" and found that he did something none of the others I watched had. He went into the debug mode and assigned the keywords there, which then allowed the items to receive shadows. I tried it on my project, using the toon shader from Chop Chop and sure enough it started working. But I also found that this is not the route taken to enable the receiving of shadows in Chop Chop, so I'm still unsure how it's receiving shadows. Nor do I understand why putting the keywords in the material vial debug mode works, when the keywords are already part of the shader graph. But at least I have objects receiving shadows.