decrease tesselation triangle density based on distance/screensize with nanite

Hi
I finally managed to add displacement with nanite but I notice that
adding displacement tessellation to a landscape or static mesh doesn’t reduce the amount of triangles , is basically invalidate all the nanite performance boost?
There is any way to optimize this by editor or editing the naniteTesselation.sh shader?

NO DISPLACEMENT:


ADD TESSELATION

unfortunately using r.Nanite.MaxPixelsPerEdge command doesn’t reduce the tessellated triangles

Nanite tesselation does reduce triangle density with distance, but because it is dynamic, and not pre-computed, the simplification technique is much less intelligent and can’t cull triangles nearly as aggressively.

Hello,

I do not think Nanite is supposed to behave the way you think it should.

If I’m wrong, I hope someone could clarify, but for tessellation to work (from what I’ve seen anyway), Nanite requires that density of polygons to do what it needs to do. You can Google images of Nanite tessellation triangles, and you’ll always see images similar to yours.

To put your mind at ease, you can test the performance of this process, but I’m very confident that tessellation will always be more performant than an actual 3D landscape.

1 Like

thanks for your reply
I saw the videos you linked and seems it’s the same issue also I know the displacement tessellation is still in development but do you think it’s a waste or resource have such crazy amount of triangles for something so small and distant, the displacement tessellation should get such amount where it’s closer to camera and switch to non tessellated when go far?

The core concept behind Nanite is that triangle density should be consistant across screen-space. To back up what’s been posted above, the ideal for Nanite is one triangle per pixel. In a perfect test case for Nanite, triangle density should not change at all as you move throughout the scene, so your second image is actually entirely correct.

1 Like

thanks for the clarification,
so the only way to reduce the amount of tesselation with displacement is increase the dicing rate i presume
but this is a global solution there is a way to set up the dicing rate for each single actor/staticMesh?

Is the tesselation giving you significant performance problems?

I don’t want to say there’s nothing you can do because you probably can manually edit the shading rate someway or another, but you’d likely be stepping outside of the bounds of intended behavior and I can’t guarantee strange problems won’t occur.

I’ve got 2 different dev machines one wit a t rtx370 and another one with a 3090
where I testing a build game without tessellation landscape in the 3090 i’ve got 56-60 fps and with 3070 i’ve got 30 fps
with tesselation ON I’ve got 6-8 fps drops in the 3070 it’s quite a lot , i will add an option in the setting menu of game to disable the tesselation with less performance machines but the performance lost is still something

Tesselation is an experimental feature after all, I’m not surprised it runs so poorly. Fortnite shipped with baked tesselation, but it wasn’t doing any runtime work besides Landscape. I’d check on the status of it at 5.5, but your best bet is probably baked tessellation, it should get those perf numbers in line.

thanks but what do you mean for baked tessellation? you mean import a high density mesh and use nanite with displacement but how I can do it for the landscape?

Unreal Engine has the ability to bake a displacement map onto a low-poly mesh and then stream the resulting high-poly asset as if it were a normal nanite object, it’s documentated by Epic under their nanite docs.

The landscape should tesselate on its’ own. If you’re using Nanite tesselation for landscape, then I have no idea.

oh you mean assign the displacement map in the asset editor, gotcha, unfortunately there is no one for the landscape, and yes I’m using nanite tesselation for my landscape, no idea either how bake it to the landscape

There’s a engine modification to set a min edge length that helps a lot with performance when zooming in really close with Nanite displacement. There’s a dicing rate ini tweak that limits the tessellation density, but doesn’t really help with performance.

https://www.reddit.com/r/unrealengine/comments/1f5mgt1/comment/lkttak0/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

1 Like

Thanks ZacD I saw the post it’s interesting , have tesseleation in the landscape but not the option to bake it it is really klll the performance , ideally have a dicing rate per object will give us much more control to the optimization, it’s really something to consider it for the next editor version