How to simulate shadows in eevee with shader editor

how do you simulate shadows in eevee. For instance if I have a cube above a plane, lit by a sun, how can I get it to cast shadows on the plane with the shader editor in eevee 4.2

Eevee handles shadow casting by default, they are not visible in solid nor material view, you must switch to rendered view (shortcut Z, choose rendered view) or use panel in the top right.

I know. The thing is, I have this whole thing going on with a character that i amworking on which means i can’t use eevee’s default shadows. So i need to make them procedurally.

And the whole thing with character is? Can you share more info?

ok… long story short, i have made a toon shader that is quite unique, and i am having trouble with my shadows, getting weird artifacts and stuff. It was the normals playing up, but i don’t want to get rid of the painterly normals because I am really happy with the way it looks. so i want to try and create the shadows in the shader. if you need me to send any pictures or the blend file or anything, just let me know.

I’m curious:
How does the surface shader influence the shadow of the object (when not displacing ?) ???

I was playing with npr shaders myself, you can peek there, maybe something will help:

(remove solidify from susane)
I was struggling mostly with strange edges of the shadows.

Show as the artifacts you have.

I wish I knew

show us? the artifacts you have. there is another post detailing the issue:

In this case i really meant ( because mostly the result of some “error” does not show any hint): how does this look like.

I am confused, what do you mean?

You said you have problems with the shadows in eevee because of your shader and i simply can not imagine how this might look like because the shadow is usually not influenced by the shader.

Attach sample file with the shader, no model needed.

the problem stems from the normals, and the shadow resolution.

And geometry.

I have added subdivision to object and turned off temporal reprojection:

so… what now?

You tell me. Its your third topic related to shader issues…

It was before:

i am sorry, this sounds really dumb, but still i don’t get it

Hi, i think you will save yourself and everyone else lots of waisted time if you find the look you are after and show example of it. there could be a short solution to this unless you just want to carry one experimenting without an end goal.

2 Likes