Using Lumen/Nanite/VSM/PLA with low polygon meshes...

RE: VSM

In a semi-populated area with lots of decorations (standalone game) and multiple shadow casting lights (probably 9 or so, plus the sun):

I’m seeing barely any framerate difference between CSM and VSM, even when moving around. And all my meshes are non-nanite too.

CSM has slightly higher highs, but it also dips a lot more. VSM seemed to average the framerate more consistently. This could vary based on hardware/settings though.

VSM hits the GPU a little more (obviously) and increases the draw calls a fair bit (obviously.)

VSM looks vastly better though. I could not get any good CSM settings to match.

I’m not sure if the claims of it being “worse performance” (especially with non-nanite) is just exaggerated, or it’s based on higher polygon counts and first person or third person views. For this style of game, it seems barely a problem. Low-medium poly meshes, with overhead view. I suppose even 4% slower could be deemed as “bad” to some people.

I do have nanite “enabled” (because in 5.6 it’s required for VSM to even work), but not on any specific meshes right now. I could test VSM performance with everything on nanite, but thats a pain to do, and I don’t think I care enough yet to go that far.

nice. one consideration i have with vsm is their high usage of vram. and if you move the camera violently in a 3d game the cache could be invalidated and then you have some stutters. not sure if it applies to your game, but wanted to raise it.

you can enable the vsm cache visualization to take a look.

also there are some consideration to vsm cache invalidation, you can set up this on actors and/or materials, so there is a way to set it up incorrectly that will cause issues. i don’t recall exactly, but i think that animating trees with WPO can trigger vsm invalidation every frame. same for changing the sun position, changing it on tick will invalidate the whole vsm and send your fps to the 10-20 range.

tangential:

9 lights seems a bit too much, if they overlap. seems like a point to optimize. either channels, or which objects cast shadows (e.g. floors). if the floor is too big, it might create problems on the shadow maps. any too big object would i think.

“best” is whatever you choose imnsho.

that corresponds to my knowledge of vsms’ too. which makes me think, if you have nanite enabled, then enabling nanite on a mesh won’t really change the perf much.

so perf wise, i wouldn’t make a ton of difference with nanite vs low poly. maybe the vsm will be faster, in that case i personally would use nanite meshes.

but a good test for that is actually setting all meshes to nanite and using insights to record the difference. also it’s recommended to measure in a packaged shipping build and not editor.

unfortunate because i think that test would be interesting.

most people say that is usually better to have a low poly (with good lods) than nanite for perf. but i haven’t noticed a perf drop just by using nanite. maybe the system overhead, but you already have to do that for vsm. you personally maybe won’t get the most benefit from nanite (high mesh details). and you’re restricted in terms of translucency and foliage.

that seems like a good solution to me. i have an interaction system, and when i do chapter transitions i disable the interactor in the pawn. which is similar to disabling the mouse.

this might interest you Virtual Shadow and Local Lights Performance - #6 by ZacD

The 9 lights is mostly a test area (some overlap), altho I don’t see it being a problem. That’s one of lumen’s benefits, and I haven’t even tried megalights yet to see if they gain any performance. I’d probably say an average screen-area will have 0-4, plus sun.

I have tried a few things tho… the VSM performance does start to decrease when you’re at 100% screen percentage and the video resolution goes up. It may be more drastic for players in higher res… but they probably shouldn’t be playing at 100% percent anyway. Even then, this seems acceptable for having quite a lot of junk and lights on the screen.

Honestly, this is up to the player though. The game looks pretty good at 70% even, and I haven’t even done any tests with that type of stuff yet, nor optimized lights or texture sizes. Luckily, overhead view is easier to deal with controlling “how much junk is on the screen at once.”

edit: Actually, its more like 20 shadow casting lights in the area. I forgot about some of my fake lights in the area. And the framerate was still decent. I wonder if megalights would make a difference.

1 Like

yeah, in my experience, bumping the resolution has an overall rather exponential cost. that’s why going from 1080p to 2kp (4k) is actually really expensive.

and vsm that cost raises quickly.

just a comment, you might know about this, but you can use light channels to avoid processing all objects for all lights. maybe that helps with the fake lights.

maybe this helps you.

they go into a bit of details of lumen and vsm and a bunch of tweaks they’ve done in terms of perf and mem