Importing foliage from 3Ds Max / ForestPack

Hey Guys,

I recently imported Foliage into Unreal (4000+ instances) from 3Ds Max / Forest Pack.
I noticed that it comes with a huge cost of performance.

it slows down the scene to 10 fps from previously 80…

My question am I trying something impossible with imported meshes ?

any suggestions to improve the performance or should I use the foliage system in unreal & recreate it ?

honstely I have to say I’m pretty new to unreal :see_no_evil:

3D Game engines use draw calls which are a command by the CPU to the GPU to render a thing. When it needs to render a 3D model it has one draw call to render the 3D object and another for each material that the 3D model uses. The commands are very simple but having to execute so many is very slow for a CPU.
Unreal has some helpful tools that can batch these commands in situations where you’re reusing a mesh. There’s the Foliage system which is built specifically for you to place foliage and have it handle displaying it. There’s also some degree of automatic instancing it can do when you reuse a mesh, but you can also manually do it using Instanced Static Mesh within a Blueprint in Unreal.
In general, these are things you need to set up within Unreal though, you would export one of your trees and then use the Foliage tool to place them.
Also, there are things you can do to further optimize things, like using a level of detail (LOD) where it would switch to a lower detail version of your tree mesh when it is further away.

1 Like

Thanks a lot for your reply :slight_smile:

maybe I should say I’m not a complete beginner with unreal.

I created a new Project on this with UE5 and Imported the folliage via Datasmith step by step (as instances)
with nanite I was finally able to import most of the foliage without huge performance costs.

If I understood correcly with nanite its no longer needed to create LODs ?

But ferns & autumn leaves on the ground still kills my performance…, I guess its about my video memory and because its displaying too much.

any idea what else I could check to improve my performance ?

This for me like a test to find out what’s possible and whats not.

I dont know whats happening there but suddenly I couldn’t open the file with imported foliage files (I had to delete them othwise UE5 crashs)

any idea ?

Maybe I should also say that I’m working on a 24/48 Core machine with 2080TI (11 GB) & 32 GB Ram

You should still be using the Foliage system for foliage, with Nanite if it’s using textured planes for the leaves then it can’t really decimate those down without losing them, and with Lumen it doesn’t support opacity masks, so the leaves will render lighting as if the whole textured plane was a solid material so it will make lighting darker than it should be. For Foliage the LOD needs to switch to completely different meshes rather than just a lower poly version of the mesh, so you’d still need to use the foliage system with LOD’s.
Even then, I’m not sure that Nanite does anything to reduce draw calls.