Nanite Trees Foliage Rendering Issue

I can’t seem to figure out what is making Nanite do this to the trees. Using UE 5.8.2, a brand new project, download an asset pack from FAB and this is what it looks like. I’ve been messing with the LOD settings, all the settings in Nanite and it doesn’t fix it. The only fix is disabling Nanite on the mesh entirely, then it looks normal, but then the performance is bad. I’ve tried a bunch of different asset packs to see if it was just the asset, but its not. Any help is appreciated.

That asset is probably using a shading mode that nanite doesn’t support if there’s nanite trees from other packs that work fine. Try the Megaplants: Black Alder pack as a good reference to how nanite foliage should be setup. Megaplants: Black Alder | Fab

If that foliage isn’t working correctly either, make sure your hardware supports nanite and you’re using SM6, and check the log for errors.

Thanks. The highlighted is the Black Alder, just added it and placed it in level. I have an RTX 5080 and using SM6 in project settings. These assets have always worked previously in older UE versions 5.7, 5.6.. ect right out of the box. It’s something that’s happened with 5.8 because I can go back to 5.7 with the assets and they work. What’s the “shading mode” that Nanite wouldn’t support? Because this is a basic new project, download any Fab foliage asset only.

Hello there @chadsteingraber!

I think there’s one thing in particular that changed from 5.6 onwards, and could be related to this issue, assuming your assets have been migrated from said version. In 5.6, Nanite settings used to have a “Preserve Area” check. It’s function is to help preserve visual density at distance:

image

Then, from 5.7 and beyond, this was changed to a “Shape Preservation” dropdown, which includes the previous “Preserve Area” setting, plus a new one called “Voxelize”. That one turns triangles into voxels, with the same objective as before, preserve visuals. You usually set this one up when “Preserve Area” is not enough:

image

So, if these assets have data carried on from the old “Preserve Data” setting, it could cause conflicts. To reset it, open your assets in Editor, navigate to Details > Nanite, and set preservation to “None”. Then, save the assets, clear the project’s cache, and set it back to either “Preserve” or “Voxelize”. You could also re-import the assets from scratch via FAB.

The next thing to check, is if “Nanite Foliage” is enabled. As it remains an experimental setting, it has to be manually enabled per project. So, if it was enabled in 5.7, that doesn’t mean it will be enabled as well in 5.8. Please go to Project Settings > Rendering > Nanite, and make sure it’s on:

For further details on how to tinker with Nanite Foliage, I suggest checking the UE doc below:

Thank you for the response, I attempted your fix by setting it to None (Apply Settings) then setting it Preserve Data or Voxelize. This unfortunately didn’t work. It seems as though the only fix is to Disable Nanite in the Mesh (I have Foliage Nanite Project Settings Enabled). Pics here:

This is the tree with Nanite Disabled.

Then with Nanite Enabled, set to None, then Set to Preserve Area.

This is set to None, with Nanite.

And this is set to Voxelize - It’s like it using the furthest distance settings up close? No matter what numbers I change in the settings, they are still like this. Any help is appreciated, thanks.

Hello again!

Thanks for the follow up, the fact that disabling Nanite fixes the asset for a moment, that shouldn’t be possible. So I went and installed 5.7 to check how the trees are intended to work. Surprisingly, they looked just like yours in 5.8 on my end:

However, the isolated leaf/branch components do look as intended, they just break when being loaded on the tree Assembly:


And to bring even more confusion to the scenario, I then repeated the process using 5.8.2, an empty map, enabling Nanite Foliage and plugins, which resulted in this:

A perfectly working tree, using Voxelize to preserve it’s volume and detail. So, I was able to reproduce the issue, but with the versions witched. Yours works as intended in 5.7, but not in 5.8. Which brings me to this point:

These Nanite Assemblies not only require Nanite Foliage enabled, but also a plugin called “Procedural Vegetation Editor”. And it’s not enabled by default, so it could be missing from your 5.8 clean project.

If the plugin is disabled, that should be the cause of the whole thing. If it’s enabled though, then we need to go deeper. Please confirm that, and we will continue from there.

UE正在渲染nanite回退网格体.当nanite遇到不支持的着色模式时会强行渲染回退网格体,请确保设置
r.Nanite.AllowMaskedMaterials=1
r.Nanite.AllowVoxels=1
r.Nanite.AllowAssemblies=1
r.Nanite.AllowSkinnedMeshes=1
World Settings - Allow Masked Materials Ture
或者你可以把树木的三个材质Blend Mode设置为Opaque

I don’t speak English, so I’m using Google Translate for the following:

UE is rendering a Nanite fallback mesh. When Nanite encounters an unsupported shading mode, it will force a fallback mesh to be rendered. Please ensure that the following settings are set:

r.Nanite.AllowMaskedMaterials=1

r.Nanite.AllowVoxels=1

r.Nanite.AllowAssemblies=1

r.Nanite.AllowSkinnedMeshes=1

World Settings - Allow Masked Materials True

Alternatively, you can set the Blend Mode of the three tree materials to Opaque.

Thank you for the help, I attempted this fix. Installed that plugin (restarted of course) and set the tree back to No Nanite (which looks correct), then Enabled Nanite, set to None. Then set to Voxelize and I still get this. I’m sure there is got to be a setting somewhere.

I also included the other post suggesting of adding the r.nanite* settings. This also doesn’t work.

I’ve also noticed that it’s not just Trees/Foliage. It’s all static meshes, Nanite is destroying the mesh. If I disable Nanite they look fine.

Nanite desteoys meshes by design - what are you folks complaining about?

Re the trees, I would assume that nanite kicks in at distances where the “voxelation” or whatever makes them look better than regular impostors (because of lighting cardboards and obvious LOD pops) and gives you a supposed net savings to performance by aggregating/precompuring or running stuff on the CPU rather than the GFX - then piping in that global leaf shader onto the overall precomputed tree shape.

Focus on figuring out if there is any way to make it happen only about 30m away from the camera.

Even if epic didn’t consider this a valid way to use nanite and its currently some bug, it could end up working out.

I doubt it, it’s epic afterall… but still.

It’s true that Nanite destroys stuff and turns in into triangles, but something is not operating as intended here.

The fact that Nanite being disabled shows the tree as intended, then turning it back on breaks everything, it could be that Nanite is not rendering as intended, and what it’s showing is the fallback mesh. And while it’s off, what’s shown is the regular LOD0 geo.

So, if Nanite is not working as intended, there are a few steps to confirm it:

  • Go to the viewport and check at View Mode > Nanite Visualization > Overview. If the result is blank, then Nanite isn’t running properly

  • Use cmdlet r.Nanite, it should report it’s current setting. If it’s 1, it’s enabled, yet if it’s zero, then Nanite is off from project settings

    image

  • You can also run stat nanite, and check the stat count, there should be non-zero values

  • I would also check the engine’s scalability settings, if you are running below “Epic” settings, then Nanite could be affected

  • If you haven’t tried already, a GPU driver clean up could help. Use DDU to remove your current set, then install the latest version for nVidia’s Studio drivers, as those are the most stable for engine work

Thank you for the help. r.nanite is set to “1”, I also set scalability to Epic. Screenshot of stat nanite and it’s all 0’s.

And here is r.nanite set to “1”

So it’s true that Nanite is enabled, but not running properly. What is the possible fix for this? Thanks!

Thanks for the update! It’s strange though, your Nanite stat has a single entry. If there are Nanite meshes on scene, you should also get “CullingContexts”. Make sure there are Nanite assets in that scene, and go for the “View Mode > Nanite Visualization > Overview” step from the previous message. Here’s an example from my test build in 5.8:

That way we will know for sure if Nanite is doing something, or nothing at all.

After that, the first thing I would, from the previous post as well, is doing the driver clean up. Use the DDU tool to remove your current driver set, then install the latest version for nVidia’s Studio drivers. After that, re-open your project and check the trees again.

Also, in your main project, please make sure that DX12 is in use. To confirm that, go to Project Settings > Platforms/Windows > Default RHI, confirm it’s set to DirectX 12:

Thank you very much, the RHI was defaulting to DX11 even though I had DX12 set in the .ini – that was the issue!

So this is hiding Nanite meshes, and yes everything is working. Now I just need to disable Nanite on anything with translucency. Thanks a ton, this was driving me crazy LOL