3
$\begingroup$

I have a node group, that make texture of an object look like low-poly pixel perfect (was taken from here). Just texture

Texture with shadow

Shadow look normal, but if it possible, i want to "snap" it on the surface of object to these "pixels" on the texture, so that the shadow line will be pixelated too (like green border, not red).

Shadow line "visualisation"

Here's scene

And sorry if anywhere something written wrong, my English is not that good.

$\endgroup$
1
  • $\begingroup$ Wouldn't it be enough to just Shade Flat instead of Shade Smooth to get a more pixelated effect? Or do you want a harsh transition from full color texture to full shadow? $\endgroup$ Commented Jul 15 at 7:42

2 Answers 2

4
$\begingroup$

Right click > Shade flat to make the shadow follow the geometry, however on it's own the sphere has too little detail to match the image. You can fix this, and gain some control of the "pixilation" detail by adding a Subdivision Surface Modifier and changing the levels (level 2 looks pretty good):

Pixel

$\endgroup$
1
  • $\begingroup$ This is a reasonable solution, just beware of the light falloff: i.imgur.com/Is0ghBM.png so ideally use a sun light, and obviously you need to also align the texture with the topology. $\endgroup$ Commented Jul 15 at 10:54
4
$\begingroup$

Since you are in EEVEE, you can use a Shader to RGB node which is not available in Cycles.

Then you can take a Geometry node's True Normal output (which ignores smooth shading contrary to the Normal output) and use it as Vector in a pure white Diffuse BSDF. This plugged into a Shader to RGB node assigns basically a greyscale texture according to the lighting, which you can then modify with a Color Ramp node for more contrast.

Multiplying this with the original texture in a Mix Color node then darkens the surface with a pixelated shadow. But I have also used a Subdivision Surface modifier on the planet as the original resolution was a bit low.

The main problem might be to match the pixelation of the object and the texture to make it look as if they were the same. But a perfect match might not even be possible.

By the way, in the setup below I've plugged the Mix Color node into the original Diffuse BSDF from your file, but since the Shader to RGB node takes care of the shadows you could simply plug the Mix Color directly into the Material Output node.

shader to rgb

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .