Dynamic Character Shadows

Hey guys!

So this has probably been asked more than you’d care to think about,
but I appear to be having an issue.

All of my static lighting works exactly as I had imagined, and I always spend a lot of time making sure that my lightmaps are a reasonable even green.

For the most part, I have mainly been working off of the basic directional light, but now that I’m tweaking post process, etc, for dark and dank scenes, I’ve been noticing issues with Stationary Point Lights.

Here is the scene I am working on:

As you can see on the right, everything is nice and even, except the blue CSG in the background,
and the higher res floor. (An attempt to fix the issue)

The only light affecting this scene is the Stationary point light on the left.

And here is the annoying result:

I actually don’t even know what is happening.
Depending on the closeness to the light, or the rotation of the actor, the shadows appear, flicker in and out, or just disappear altogether.

(Also the feet never look like they’re on the floor because the shadows are accurate!)

Any ideas on what the issue could be?

Thanks again guys!

-Peace

I’m not sure about the flickering, but have you tried adjusting the shadow bias of the light source to correct the position of the shadow in relation to the character model?
Best wishes,

Matt

Hey Matt!

Its using the base content from the sidescroller C++ template.
I’ve double checked all the settings, and it’s definitely movable!

I don’t know what the problem is :confused:

-Peace

Hey Matt!

The shadow bias has fixed the issues with the shadows not starting at the contact position!

12924-fixedshadowstart.png

However, I’m still having the issue of shadows disappearing depending on my rotation. (How is that even possible??)

12925-rotationalissues.png

Thanks again for helping me out!

-Peace

That’s great. I’m glad that worked at least. Unfortunately I’m not sure about the other problem. Is your character definitely set to ‘moveable’ as opposed to ‘static’?

See if the skeletal mesh has a physics asset assigned to it. Physical assets are used to optimize dynamic shadows for skeletal meshes.

Hey Denny!

You are actually a godsend!

Since I was using the Mesh from a UE Template, I didn’t even consider it not having a physics asset!

For the most part, the issues are gone now, especially with tweaks to the shadow bias.

I still get the odd shadow disappearance, but that may just be due to being too close to the light.

Thank you so much!

-Peace