Godot 4.6.1 stable
Title, the shadows work fine in terms of the model in blender, and when viewing from above you can’t see the eyeballs. Yet in this arrangement with the light is pointing straight down (DirectionalLight3D), it isn’t casting shadows from the upper eyelids or top of the head. Heck same with the nose on the lips. However I care more about the eyelids. Also the eyeballs when taken out of the head and moved below it get shadows cast on the. they are in an eye socket which does not intersect faces if that matters either. I am looking for a means properly have the cast shadows for the eyes from the lid and I do not think a normals approach would help given it seems to be ignoring the surrounding face planes entirely. the eyballs are not connected to the head mesh physically though keeping them in the same mesh or just in the group has changed nothing.
I also would like to understand how it works to resolve and abuse things like why the light isn’t working for the lips to intentionally ignore cast shadows from elements in some places.
Images for reference: top is a simple cell shader, middle is blender, bottom is the model straight from blender with no shader.
Still working at it and doing some tests with big simple shapes, I have found a few things. 1 the higher the gap the better the cast shadow casts properly on the sphere. Same direct light straight from above situation so it shouldn’t really matter. 2 distance matters for it showing up. at a certain distance it shows otherwise it doesn’t if too close.
From what I see you have two different setups.
First thing come to my mind is using omnilight node with masking only for face.
Did you tried increase or decrease amount of vertices to see if this makes difference in shadow projection ?
Use sky lighting and screen space ambient occlusion.
The only I changed is the shader which just segments the lights into different blocks and applied a different color. (that I have been using for other test models in godot) I haven’t tried specifically with this model increasing the geometry but I have tried other models people have made, gamerips and the only ones that avoid this so far for me are the Anime style hole in face + plane for eye set up. Most of the models are higher res than my current one. I even tried exaggerating how far forward the upper lid goes such that its more the front of a cap than an eyelid and it is still causing issues. OmniLight3D’s still cause this issue with the light affecting the eyes as if it’s not in a socket so even if I tried to isolate it I don’t think I could use it to replicate the proper lighting environment.
It kinda works, but it doesn’t work well with a cell shader (at all due to the soft shading), nor does it resolve the issues with using other light sources.
Just confirm it .
The middle image is showing desired result right ?
Could you show us then Blender scene setup ?
But I guess this will works only some angles like any shadows .
Yes the middle is what I want. The set up is just the default layout scene with overlays turned off in viewport shading: Material preview. Its just a cropped screenshot from that. The materials are just Principled BSDFs with the color changed. I’m telling you this instead of showing because I literally do not know Blender well enough to set up photo shoots and what not since I just need to model for Godot, not anything else. (I mean set up a few animations and rig, but aside from that I never bothered.) That said do you know of any models with traditional eyeball and socket eyes that don’t have this issue in blender with the 3 main light sources I can take a look at and test? To see if its my Godot set up or the model. Since so far I can change the model and it still is an issue, making me thing its a Godot issue not a model issue, aside from Blender rendering it right as well.
Edit: to clarify while the shadow is not super strong there due to lighting the shadow being cast from the eyelids is what I want.
That’s hard to achieve. Every shadow has a shadow bias, some distance from the surface where the shadow starts. You could try to reduce the bias a little bit, but at some point you’ll get self shadowing. The lids are so thin, that I guess it will not work as you expect. You have to fake it somehow, and maybe reduce the contrast in your lighting a little bit, you have very harsh shadows, there it is very obvious with the missing shadow.
Blender is a raytracer. With raytracing this would be easy, but not with shadow maps.
The view port there uses some other tricks to get the shadows right. They are not available features in Godot.
I see, so I guess then my best option would be to use the more anime style cavity + flat plane eye and try and work it to allow me to have it look like a more realistic eye then. Thanks.
Ambient occlusion maps or screen space ambient occlusion with appropriate lighting.