No Shadows From World Space Representation First Person Rendering

Hello! I’ve been trying to work with the new FPS pipeline they added in 5.5 (I’m using 5.7 personally). But I’ve noticed that the only way World Space Representation shadows will be cast is by either having Nanite or HWRT Shadows enabled (oddly specific, right?). It doesn’t render shadows in any other way though (VSM or CSM don’t render them either). But since both HWRT Shadows and Nanite cost an arm and leg in performance, I can’t have them enabled for a tactical FPS. Anyone have any thoughts? Here are the images.

This is just VSM

And this one is HWRT Shadows, it looks completely identical to having Nanite enabled instead. I don’t know what the two have in common but it seems to force the world representation mesh into the shadow pass. Why though is beyond me, when it should work fine without it I would’ve thought…

I’m staring at the exact same problem right now, thought I was going insane.
Did you arrive at anything else than Nanite or RT?

Same problem. There is no shadow. How to solve the problem?

As of right now the only solutions I know of is using Nanite or HWRT. VSM works well with Nanite but it should in theory also work well without so unsure if it is intentional, planned to be fixed or just a plain out bug.

You can also opt to not use the World Representation setting and gain full control over bOwnerNoSee and bCastHiddenShadow but it’s unclear what issues that may bring as opposed to the built in solution.

1 Like

Well, sort of. I have a bit of a work around but it certainly has its flaws. I found that if you duplicate the world representation mesh hierarchy (the body, gun, magazine, etc. whatever it is that you have set as world space rep) and turn the first person primitive type to none and check owner no see and owner only see and cast hidden shadow, you do get the shadow, but sadly it also casts shadows onto the gun if you look down to where the gun intersects the mesh. If anyone can build off that let me know. But as of now, this is as good a solution as I have.

And @sciko_logic, that’s sort of okay, but the issue with that is reflections, as you can see your own world rep mesh in reflections, so if you check owner no see without having a proper world rep mesh, you become like a vampire and you can’t see your reflection. (But I guess you could make a vampire shooter to get around that :sweat_smile: and even still it’ll have the shadow casting on the gun when it intersects). And world rep mesh can’t cast shadows on first person primitives, so that’s kind of why my personal solution may not work long term as it casts shadows on the first person mesh.

Haha, yeah I was suspecting issues like those to make themselves known :sweat_smile:
Personally we’ve opted to use Nanite due to other parts of our systems already relying on it anyway so the overhead is sort of paid already.

Still hope to see if this gets sorted somehow, I know Nanite is not always viable for certain projects. Best of luck going forward!

1 Like

Best of luck to you as well! I’ll keep this open for a few more days to see if anyone has more ideas though.

Whoa! Nevermind, I think I found a solution, I’ve yet to test it thoroughly though. But try keeping nanite on in the project settings and calling r.Nanite 0 in the command prompt. For me it disables Nanite geometry but preserves the shadows. Might be worth looking into more.

EDIT:

Not sure entirely why, and I’m too busy to check this. But this does seem to be a viable solution. On a blank template without nanite (completely off) I get around 7ms per frame, with it fully enabled with nanite geometry I get about 16ms per frame. With nanite on but then calling “r.Nanite 0” the performance hits around 11ms on the same scene but I do get to keep the world rep shadows. So I guess this is as close to a solution as I can find. If y’all want to build onto this further, feel free to message me!

1 Like