hi this is yet another post about my 3d fursona because i can't stop messing with it >:3
when i decided to ditch the pixel style for this more cel-shaded polygonal look, i really wanted full control over the shading and the colors specifically. so, at first, i decided to just... manually select some polygons and make them a different color, which looked neat but also meant that the lighting was completely static.
but then i remembered this really cool tutorial on how to create a custom toon shader, and it inspired me to try something similar! i know it's nothing groundbreaking but god damn i'm so happy with how it looks so i want to share it anyway!
breakdown woo
i started by creating two textures. the first one is the base texture. and the second one is a copy that uses a darker color palette. it also removes details like the shading of the pocket or the highlight on the eye.

enter my new bff, ✨shader to rgb✨
shader to rgb is a really cool shader node in blender. it basically turns the output of a shader node into color data, which you can then manipulate and use however you want!
i've placed a diffuse bsdf shader, set its color to white, and i also made my world color pitch black so that there's no ambient light at all. this essentially gives me a black and white representation of how my model would be lit:

i can then use the shader to rgb node to transform that into color data, which is sent into a color ramp. the color ramp is set in such a way that my shading is turned into something binary, where it's either lit (white), or unlit (black), with a sharp boundary between the two to give that signature cel-shaded look:

it's maskin' time
now it's time to combine the aforementioned textures. i'm using a mix shader node for that. it has two inputs that i plugged my textures into, as well as a factor value, which tells it how much it should blend the inputs together. the factor is a number between 0 and 1, where 0 means "only show the first input", and 1 means "only show the second input".
this is where my cel-shaded doodad comes in. if i plug the color output from my color ramp into the factor input of my mixing node, then it'll look at the brightness of that color input to determine what the factor should be. the bright areas are like a factor of 1, and the dark areas are like a factor of 0. this essentially makes it act like a mask, that'll show one texture in the lit parts of my model, and another texture in the unlit ones!

and that's how i made my own version of a toon shader to get my model looking exactly how i want! 💖
