Problems with making a pixelated shading material (Something like a toon shader but pixels)?

Hi, im trying to make a pixelated shading effect. But i keep running into the same 2 issues each time:
First, the shadows cut the pixels off.
And second, the pixels get smoothed color (one side is one color, other side is other color), the pixels can be seen, but they are smoothed

I use a node setup like this:


The light i use is a diffuse only, so that it would not interfere with the principled bsdf

Welcome :tada:…

…i’m a bit puzzled where you get the ide to use a diffuse shader to convert it to RGB and then use it again as color for a BSDF shader to make it pixelized… ??

Also using the voronoi position ??? Well… if you use this as the color for the BSDF with your already un-random ( Randomness set to 0) voronoi you will already get some stepped colored pixels … also using the color as color gives you… “random” colored pixels in the size of the scale you use…

You may have to elaborate this to get a more suited answer.

Well, basicaly i dont have any idea how shaders work. However, the idea i was going for was pixel-perfect shadows.

Well then maybe you might have a look at some basic shading tutorials… and i also do mean some written ones to dive into the supject… likes for example:

…so for the start you might wann look into somethign like this… :

…or any other…

Woah, that response was very quick. Thanks a lot for the response :slight_smile:
About the video above, I have watched it before when researching the subject. I dont really know how i can apply that to making a pixelated shadows shader.

Hmmm…

You may have to elaborate this to get a more suited answer.

…maybe… if i understand this correclty this isn’t possible via shader…

Something like this ? The ape is not but the shadow is ???

PixledShado

Well not sure if it’s possible with materials, maybe i need to make geo-nodes but i dont even know where to get started in them.
I want it to be exact(no diagonal lines), including not only the shadow but the light.

Something like in this picture (made in blockbench in a minute) but procedural.
image

here’s a quick pass with geometry nodes:


pixel shade.blend (1.0 MB) - (cc0 license)

Woah, thanks a lot! :slight_smile:
I found slight issues with this (when moving the lightsource it kind of breaks at times, it mirrors the objects and casts their shadow


)
But overall it’s exactly spot on.
Thank you so much

Ah, I see what’s happening there.

If you connect the vector length node to the ray length input on the raycast node it should fix those artifacts:

You’re a legend. Will definetely learn geo nodes after this, they are so powerful holy moly…

1 Like

Knowing geonodes is a superpower. Definitely worth learning!

Interesting… was wondering about wanting to have a pixelized shadow… but then:

…based on this GamMaker thread :

https://www.gmlscripts.com/forums/viewtopic.php?id=1657

and in there… stateting this:

Oh No!

Not Another Idiotic Light and Shadow prototype!

Yep.

:joy_cat:

I like this kind od thinking…