Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question cell shading - does every color need to be its own object?

Discussion in 'General Graphics' started by Bluelattice5555, May 22, 2022.

  1. Bluelattice5555

    Bluelattice5555

    Joined:
    May 8, 2020
    Posts:
    34
    I followed this tutorial:
    and got great results, but my understanding of how this works is that it is not texture based. Near the end of the video, it shows a model of Link from Zelda where he is wearing a blue tunic. If the tunic were all blue, it's simple - just choose blue on the shader and it works. But, the tunic has white lines on it. Would these individual white lines actually be their own objects with a white version of the shader applied to them? I don't see how this would work with putting a texture on the tunic.

    Just wanting to make sure I understand how this works. The answer does not have to be specific to the shader used in this video, but can be based upon common cell-shading techniques.

    Thanks in advance!
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,002
    I didn’t watch the video, but it probably is textured. The thing to do is to store in the alpha a mask that indicates which parts of the texture should be affected by the color.
     
  3. Bluelattice5555

    Bluelattice5555

    Joined:
    May 8, 2020
    Posts:
    34
    Thanks for the reply. I actually just tried something and got it to work. For anyone searching for this in the future, the solution is pretty simple: For the diffuse group, simply replace the diffuse color node with a texture node. Tack on one last multiplier node to the end of the group, with the second input to it being a float that you can name Diffuse Intensity to control the brightness.

    Do the same for the specular group. I have yet to do anything to the fresnel effect, but I assume something similar can be done. Works like a charm.