Virtual Shadow Maps are slightly broken

Hi,

I have a UE 5.0.1 C++ Thirdperson project.

When I start the project, the normal mannequin is running and all is good.

I then hit a key and stream in a ReadyPlayerMe avatar and can start moving that character. Everything is fine with movement and materials etc, but as the character is moving, it starts to deposit shadows behind it, like foot tracks.

I can also eject from the editor and move the character and the shadows stay where they are:

These disappear with some camera movements, but it looks like something isn’t right at all.

Speaking to ReadyPlayerMe folks, this is not something they have seen either.

I can stream their avatars straight into a character and the issue doesn’t appear either. It looks like it is only happening when I perform a switch of the meshes from the streamed avatar onto the mannequin.

Any thoughts?

2 Likes

The culprit appears to be the virtual shadow maps

Turn this off and it all goes away.

2 Likes

I noticed the same thing in one of my projects. It only occurs when I use a specific character mesh. I am not sure what causes it, but surely there has to be another solution that does not involve turning of Virtual Shadow Maps?

There has to be something specific about the character mesh that can be rectified instead.

1 Like

Did you do any duplicating of an animation blueprint or retargeting of animations when you imported the mesh?

Run this: r.Shadow.Virtual.Cache.DrawInvalidatingBounds 1

When you move around your mesh and it’s animations play does the volume dynamically resize around the animations or does it seems generally static. I ran into this and found that when I tried to import and retarget stuff to try to reuse some things that for whatever reason it broke something and the bounds were not updating. I reimported the asset and tried again without retargeting and the issue no longer happened with that mesh.

1 Like

Following up on this. I figured out that specifically whenever a mesh doesn’t have a physics asset applied the cache invalidating bounds volume in the command I shared in my other reply does not get updated. Hence all the problems with the shadows. Check if the mesh has a physics asset. I’m not sure if this is intentional, I was removing physics assets from skeletal meshes for performance reasons and saw it start reappearing.