After getting into the final stages of optimization for my game, I am happy to report that I was able to get a stable ~94-96FPS at native 1440p in the editor with TAA in 5.4. Before, I was only able to get about ~72FPS at native 1440p in editor with UE 5.3.
My scenes are extremely heavy with nanite masked foliage (trees, grass, and other plant life). Optimization with nanite was a feat but wasn’t impossible. What this now shows me is that Nanite is more than capable of handling complexities IF you know how to use it properly. Nanite has so many cvars available that you really have to dive deep into figuring out what will and will not work.
If you want to know what these settings are, you can go here or type the commands into the console like this
r.Nanite.MaxPixelsPerEdge ?
r.Nanite.MaxPixelsPerEdge=4
r.Nanite.DicingRate=0.5 ; This seems to go hand and hand with the above CVAR as per my digging around in the engine source. Play with this value as well. Lowering it did seem to provide me with a boost in frame rates.
In my game, 2 is the lowest this setting can get without running into nanite memory issues due to the other settings below. I stick with 4 as the minimum to ensure there are no issues and to improve performance. (Note: DO NOT increase this value without monitoring the same setting on individual static meshes. This will cause nanite to agressively LOD all nanite geometry in the world. You can control the effect per static mesh as of 5.4)
r.Nanite.MinPixelsPerEdgeHW=8.0
Lowering this value improved my performance stats greatly. I am unsure why but I have speculations based on reading some of the source code. I’m no expert with Epic’s code so I won’t put those speculations here. Just play around with this value.
I lowered these by extreme amounts to be used with ‘r.Nanite.MaxPixelsPerEdge’ >= 4. Another developer by the name of ‘AirSickLowLander’ let me know that some of the defaults and more extreme values were causing EXTREME performance loss on low end GPU’s. This was unaccaptable to me. So I reduced these to the minimum. Use with caution as you could potentially have issues with nanite running over budget which stops triangles from being drawn at all. This is another reason why I increased my MaxPixelsPerEdge to 4
Here are the other settings. You can also try different values for these, but these worked best for me.
r.Nanite.PrimaryRaster.PixelsPerEdgeScaling=10.0
r.Nanite.ShadowRaster.PixelsPerEdgeScaling=10.0
r.Nanite.FastTileClear=1
r.Nanite.FastVisBufferClear=1 ; 2
r.Nanite.MaterialSortMode=2
; This one I'm 98% sure is about how you've built your scene. Look it up in the link above to confirm that.
r.Nanite.UseSceneInstanceHierarchy=1
r.Nanite.AsyncRasterization=1
r.Nanite.AsyncRasterization.ShadowDepths=1
r.Nanite.ShadeBinningMode=1 ; 2
r.Nanite.Bundle.Shading=1
r.Nanite.ImposterMaxPixels=5
r.Nanite.PrimShaderRasterization=1
r.Nanite.VSMMeshShaderRasterization=1
; I noticed a better boost when using these settings as well. I made assumptions about these and am still experimenting. But, I tried thinking about Nanite how I think about Virtual Textures which led me to these settings.
r.Nanite.Streaming.StreamingPoolSize=256
r.Nanite.Streaming.MaxPageInstallsPerFrame=4
r.Nanite.Streaming.MaxPendingPages=128
r.Nanite.CoarseMeshStreaming=1
r.Nanite.CoarseMeshStreamingMode=1
r.Nanite.CoarseStreamingMeshMemoryPoolSizeInMB=100
r.Nanite.ViewMeshLODBias.Min=0
; TSR
r.TSR.AsyncCompute=3
r.TSR.History.SampleCount=2
r.TSR.History.R11G11B10=1
r.TemporalAACurrentFrameWeight=0.1
; VIRTUAL TEXTURING:
r.VirtualTextures=True
r.VT.EnableAutoImport=False
r.VT.MaxUploadsPerFrame=4
r.VT.MaxUploadsPerFrameInEditor=4
r.VT.MaxContinuousUpdatesPerFrame=1
r.VT.MaxContinuousUpdatesPerFrameInEditor=1
r.VT.RVT.TileCountBias=-1
r.VT.PoolSizeScale=1.0
; Found these thanks to another dev: vfXander
AllowAsyncRenderThreadUpdates=1
AllowAsyncRenderThreadUpdatesDuringGamethreadUpdates=1
AllowAsyncRenderThreadUpdatesEditor=1
AllowAsyncRenderThreadUpdatesEditorGameWorld=1
; GREATLY IMPROVES MASKED FOLIAGE PERFORMANCE
r.EarlyZPass=2
r.EarlyZPassOnlyMaterialMasking=True
; These depend on the type of game and art style you're going for. This helped me squeeze more quality while also decreasing some of Lumens defaults.
r.GBufferFormat=3
r.DefaultBackBufferPixelFormat=4
r.PostProcessing.PropagateAlpha=0
I haven't experimented with these yet but I am using them. So again, use with caution or find values that work best for you. Thank AirSickLowLander for these as well.
r.MinScreenRadiusForDepthPrepass=0.300000
r.MinScreenRadiusForLights=0.100000
r.GenerateLandscapeGIData=False
r.VelocityOutputPass=0
This can be indeed fixed in 5.4 directly within a Static Mesh Detail panel. Look for "Max Edge Lenght Factor and push it to 1 (default is 0 for all meshes).
If you notice “spikes” coming from foliage, then disable “Use MikkTSpace Tangent Space” in Buld Settings underneath.
Not only are the clouds TAA dependant( and that’s ridiculous since they look worse than Decima’s implementation and look normal without TAA ), lowest settings it’s costing 8ms+ on LOWEST engine scalability with the actors default trace distance.
1080p on a 3060(13 taraflop)
Meanwhile PS4 HFW has this done looking better and more performant.
Complete disregard for top voted feedback.