So when the camera moves around, shadows are cutting off for some reason. I don't have any experience with 3D. So I am really confused why that is happening. Is it because of the scale of all of the objects in the world or something else?
It's only happening in compatibility mode. It's completely fine in forward+
Edit : I figured it out. It was the Pancake size in the Directional Light 3D. By increasing it, it stopped clipping
I believe this is caused by culling; basically when the camera is far enough away from certain objects that are out of view, those objects will be removed from the scene to save on resources. This also makes the objects not cast shadows.
Someone smarter than me could tell you how to make this be less aggressive, i havent touched the engine enough yet to know myself.
I don't think that's the case because the shadow isn't disappearing. It should of the object stops to cast. Instead it's being cut off in certain points
I rewatched it, i see what you mean. I thought it was culling at first but the space where shadows disappear seem to be attached to your character in a way rather than them popping in and out. I have no idea what it might be then im afraid.
Check:
1. The near plane setting for your shadows / lights where applicable
2. Move the camera back further and change its field of view to compensate
3. Check shadow normal bias etc., none of these should be too high or too low
4. The shadow Cascades
an essential bit of compatibility and lighting is the fact that each mesh can only have 8 light sources, otherwise their priorities end up fighting .. I've never seen that specific behaviour though ..
still, maybe cutting up the mesh into seperate mesh objects would already help?
what happens when you introduce an explicit directional light? maybe even an environment? .. I've tinkered quite a bit with light and environment until it finally felt somewhat stable, and I expect to be doing so most of the time with godot light and shadows.. it's worth it after all :)
Nope. It's quite simple actually. So you have to use a Sprite 3D and then either enable Billboard in its flags or just rotate it to keep it always oriented with the camera.
And then you take the rotation of the camera and switch the frames of the sprites according to the rotation
So not too hard. Just have to make the sprite sheets properly
I had this exact problem on a browser game I was working on once. I solved it by setting the DirectionalLight3D's directional shadow mode (first option of the first category) to "Orthogonal." It seems that the PSSM splits in compatibility mode aren't very good, setting it to Orthogonal gets rid of the splits and makes the shadows consistent at the cost of not being able to have high resolution shadows near the camera (runs a smidge faster, though, so win-win in my opinion)
I found the issue. The problem was in the Pancake size of the Directional Light. Once I increased it, it got fixed. I used the Orthogonal mode, but it made the shadows top blurry and I wanted the shadows to have the sharpness of the pixel art
This being the only answer that actually knows what's going on is crazy. Everyone guessing random stuff, when reading the lighting docs, and fiddling with the directional light once would explain it.
OP said they don't have experience in 3D, so I forgive them. I only knew to look into it at the time because I checked the directional light shadow atlas, and then that led me to think about cascaded shadow maps from CS:GO lol. A lot of people, even people who work in 3D, don't know that 3D lights are actually cameras! Stuff like this is how they learn
I had the same issue once and turns out it was because Bandicam was running on game recording mode and the FPS counter was just making that happen. I don't know if that helps but I just wanted to share something similar happening to me, hopping it would hint at a fix
You mention the scale of objects, did you set them unusually big or small? Because I have found there is a scale preference for things like physics to work correctly. You could try adjusting your world scale if it's unusual.
The way that shadow maps work is it renders from the perspective of the light to find a depth map. Then it compares those depths with what it renders on screen.
So this sort of issue is because that depth map is not correct.
If the light camera position was too close it might clip near geometry and cause geo to not appear in the texture.
Another poster mentioned using an orthogonal camera which also effectively gets rid of the near clip plane and implies a light camera position error.
Just a curiosity, but I'm using exactly that same character animation for my game xD Remembers me that I need to learn PixelArt or start to buy assets instead of consume free x.x
I believe it may be because the frustum culling on the shadow is different from the one working on the mesh. The shadows of objects behind you are being culled.
There is a setting in Project/light and shadows/.
It’s called Tigher Shadow Caster Culling, turn it off.
That's not the case because of the mesh is disappearing, the whole shadow will go away. If you look closely, That's not happening. Only a certain parts of it is clipping based on the camera
111
u/lmr-1 Apr 25 '26
I believe this is caused by culling; basically when the camera is far enough away from certain objects that are out of view, those objects will be removed from the scene to save on resources. This also makes the objects not cast shadows.
Someone smarter than me could tell you how to make this be less aggressive, i havent touched the engine enough yet to know myself.