Nanite performance




Why that happening? performance drop by half if camera is middle, WPO is off, I use Virtual Shadow, no LUMEN.

Are you using a masked material or are the leaves modeled out? Do you get any better performance with the trees from the Electric Dreams Environment?

1 Like

I try also using Quixel European Hornbeam, but same problem

I could be wrong, but that looks like masked leaves, in which case this performance is to be expected. Nanite likes everything to be opaque and individually modeled for culling purposes, and masked performance tends to be quite terrible and result in significant overdraw, as illustrated by just how bright your overdraw visualization is. Individually modeled components should help with that.

2 Likes

First of all, Nanite has worse performance over traditional LOD methods. And you’re getting tons of overdraw.

And I know exactly why you’re get better performance when you’re zoomed so far away.
Your GPU knows how many pixels each tree (or any nanite object) has on screen.

At a certain point, when a nanite objects are showing very few pixels, nanite turns the mesh into an imposter (I think) or something not really intensive.
You can see this happening when viewing the cluster view. As you pull out the camera you will see object clusters turn into Blue/Pink clusters, then gray. Those gray clusters are easy to render.

If you raise r.Nanite.MaxPixelsPerEdge above 1.0, It increases how much faster or aggressively Nanite crunches down to get to the gray clusters. Resulting in achieving the gray clusters much faster when the camera is closer.

So here’s how I see it.

Pic #1: 60fps because most of the trees are probably gray clusters because of the extreme distance.

Pic 2# 30fps since a lot of those trees are close enough(have enough pixels on screen) that the gpu is still rendering tons of triangles and not many have been “gray clustered” for performance.

Pic# 3 60fps because most of the trees in the background are being culled completely since the tree visible/closer to the camera/screen are complete hiding/occluding the trees in the far distance.

Pic#4 Well pretty much Pic #3 but the profiler is seeing it.

Pic #5…Everything I just said is visible in the cluster view, overdraw view and Holy crap the WPO is completely red which means a bonus problem!
(Red is good)

You need to learn how to evaluate WPO based on distance from the camera. Fortnite only has tree’s WPO turned on when the tree is close enough to the camera to see the movement

I don’t have a link, but this post has 100% of the answers you’re looking for.

Also, with this knowledge, I think it’s is clear we need a more specific kind of mesh to enable Nanite on. Big meshes or small ones? The Nanite documentation is wrong,

It should not “be enabled on everything possible”-Epic

Plenty of people have tested the optimized LOD workflow vs converting it to Nanite. Every time Nanite has WORSE perf.
Also, I want the LODs (like LOD3 or LOD 4) to have the option of Nanite. Maybe small meshes are the way to go with Nanite.

2 Likes

Start with unplugging WPO and setting if performance is acceptable. If it’s still horrible, try migrating one of the tree from the Electric Dreams Environment because they are already optimized for nanite, unlike trees from older packs. You then can copy techniques those trees use and apply it to different trees. (For the electric dreams trees, you need to make sure virtual textures are enabled in your project, also you may need to enable substrate materials or open the parent material and skip the substrate nodes).

Ok, Thx guys for helping, I try this Electric Dream trees and tested

I try Electric Dreams foliage but same problem I also disable WPO in master material nothing help, how fix this overdraw nanite?

Stop using Nanite. <— An eye-opening presentation why you SHOULDN’T use Nanite because of it’s poor performance.

Make LODs instead. Tree type objects will always have overdrawn issue since it overlaps so many times on its self(branches on branches).

This isn’t an overdraw issue. Its just appearing like that because the geometry is so dense and naturally overlapping. The same thing happens with the dead winter trees in the City Sample. They appear completely white.

You could possibly put small thin cards (flatened cubes ) inside the trees to prevent any of the background trees to fix and of them being not completely occluded completely. (resulting in Nanite not removing them from the scene, aka overdraw).

2 Likes