Hey everyone.
I have a good few metahumans in my game as it’s a single player game, focusing on story hence multiple characters.
When I added them, perf went to the ground. Constant messages of “VRAM exhausted” and even proper crashes saying “DXGI_Device_Hang…” or something. My project never crashed before this.
So I looked up and adjusted the LODSync Component of all characters, while downloading them on lowest quality. (Setting just 1 LOD or forcing LOD 1/2)
That was not enough. So I found a video that mentioned using “r.HairStrand.Strands 0” to toggle b/w Strands and cards which saved performance but still not close to original perf. The problem is, on some Characters, this command makes the hair black instead of their actual color (blonde/red etc), while making it look flat (but that is accepted from HairCards I guess)
I wanna know, is there any other way to save performance on metahumans and still have decent looking Characters?
I can go so far and adjust a few of them to use the not-so-taxing groom components inside MH_Creator but is there anything else? (Like the Hair styles that don’t say “ONLY AVAILABLE IN LOD 0/1”)
I usually do then whenever it says “over streaming budget”
But that’s a different prompt. The one that says VRAM is Exhausted a different one I’m sure.
And I anyhow set it to 4000 whenever the game starts.
Sure. Here it is. Note → This is after using the command “r.HairStrand.Strands 0” to disable strands and use Hair Cards (after which perf was very stable like 45-55 FPS. Still not as good as outright deleting Groom from metahumans)
Okay, could you now post a video hovering over the colored bar values so I can see what each value means, as well as scrolling through the info log below.
So, just as I figured, it’s the lighting and shadows adding quite a bit of the load to your scene.
Lumen Scene Lighting
Shadow Depths
DIFFUSE INDIRECT AND AO
LIGHTS
Post Processing
These are the biggest hogs.
So, one of the ways you can dramatically reduce the cost of the lighting is to
Reduce the amount of lights
1a) Your scene doesn’t seem to have that many lights, so you can reduce the attenuation radius so that each light effects less of the scene. You can increase the exposure of the Post Process to compensate.
This one is going to hurt, but disable shadows on EVERYTHING that does NOT require a visible shadow. In fact, I would disable shadows on everything outside (assuming the scene is indoors), and if you do go outside, switch the shadows back on (via a blueprint function).
(Below is how you do it, if you don’t already know. I’m very much into saving EVERYONE time.)
Play around with this setting on everything (including the floors, walls, ceilings, doors, etc.) You’d be surprised how much extra shadowing you don’t need.
Double-check your materials and make sure that they are not all double-sided. If they are, then the scene is essentially rendered “twice”. Meshes that have materials that don’t need to be double-sided need to be single-sided. You can duplicate or create a material instance of a material and replace it.
First of all, I’m grateful you have been replying to me here. Thank you so much !
You have it correct. My game is story based and requires some assets due to the real connection of the place and the story. But the catch is, the lights in my main compounds are all disabled via code when it’s daytime. Only during the night time sequences, that they come alive.
Do not panic when you see the real amount of lights XD. Sadly, I cannot reduce any further.
I already have adjusted their draw distance and cone radius to atleast look decent. But no worries, I will reduce them further given my game also has night vision when night sequence happens.
Your points are valid. I have disabled shadows for a good few assets in my game as you’re right, not every assets necessarily needs a shadow. I cannot guarantee disabling shadows for all outside meshes as player spends more time outside than inside so I can actually disable shadows for objects inside the buildings. I can do it via code although it’ll require some proper thinking in my case. My buildings are all singular assets so roof etc are not separate for me to disable individually.
And lastly, yes. All my materials are my own custom so none of them is 2 sided.
I’ll keep these points in mind and will optimise further.
PS: About metahumans hogging perf, I messed around with LODSync and used HairStrandsCards and perf is way better and stable now. As you can see, 3 Metahumans and still almost 60 FPS.
I didn’t realize your buildings were solid meshes. If you are modeling, maybe for later points in the game, have them be more modular so you have more control over how they behave.
Your work looks great!
Good luck, and if I learn any other tip/techniques, I’ll post here again.
Thanks mate !
Fun fact, in the early stages (when 5.0 was released) Lumen had issues with thin meshes and all my walls/roofs were separate. So to overcome that, I remade all those buildings as 1 solid object. I have created all my assets now, whatever I need from this point will be common assets from sketchfab or Quixel.
I won’t edit the main building now, as it’s pretty well optimised and I can still disable shadows if the player is far away but I get your point. I’ll keep it in my mind for my next project.