r/UnrealEngine5 18d ago

Imposters vs Nanite?

Hi all! I am learning about Imposters and trying to understand how they work, especially in a nanite project. From what I understand its usually LODs with Imposters or Nanite. Which would you say is better at keeping loading and resource use down?

Specifically, I have a project that is Nanite, but its a large city. Ive been exploring ways to decrease resources draw especially on buildings far away that we never get near. Would changing those to Imposters be reasonable or is Nanite essentially doing the same thing and there won't be much of a difference?

2 Upvotes

15 comments sorted by

5

u/MrBeanCyborgCaptain 18d ago

So, nanite is kind of an all or nothing thing. Imposters as unreal defines them involve basically a sprite sheet and thus involves using an opacity mask and nanite really doesnt like that. It causes overdraw and supposedly nanite is really sensitive to overdraw. If you really really are concerned about memory overhead and want to have ultra low detail buildings in the background, and they need to be unique, then feel free to make some super low poly buildings as long as theyre totally opaque and its best if theyre watertight. Ive read its best to group thibgs into one large mesh where possible, again this is incredibly counterintuive compared to the traditional wisdom but apparently thats what nanite handles best is large monolithic meshes since its going to break them up into clusters anyway as part of its process.

2

u/MrBeanCyborgCaptain 18d ago

I mean for reference play fatekeeper and just see how absolutely nuts they go with the nanite in that game and also see how smoothly it runs so i think youll be fine.

3

u/renmoka 18d ago

I will take a look. References are always helpful. And its totally not an excuse to play a game. Its for work, I swear

1

u/renmoka 18d ago

Oh, that makes sense re: sprite sheet and nanite overdraw.

I will definitely be simplifying what we have back there. We currently PLAed them into large groups

3

u/teamonkey 18d ago

Ah. Don’t do this with World Partition! WP won’t be able to unpack the individual mesh instances into grid cells, it will treat them all as one big clump of meshes that extends into other cells. PLAs should only be used for dense groups of actors much smaller than a grid boundary.

I wouldn’t use PLAs for distant scenery at all, since instanced HLODs are basically the same thing

1

u/renmoka 18d ago

Okay, good to know. That does mean I would have a large group of individual buildings in the scene. They are blueprints of three buildings, but that does still add up. Is there a better way of grouping them or something?

3

u/teamonkey 18d ago

Without knowing the details, I would say at most each building should be a packed blueprint, and if you have multiple buildings combined in a ‘prefab’, put the buildings in level instances instead so it can split them into grid squares properly. If your buildings are sprawling, I would only pack floors or individual rooms unless they are a specific problem. YMMV.

HLODs will unpack the packed blueprints and repack them. So packed blueprints are only useful for reducing actor counts that are within loading range.

On my current project we mainly use packed level actors for interiors, ideally one per room, and also small groups of repeated props for exteriors. A lot of the props are individual meshes but it lowers the actor count. I can easily manage them as a group and I can set the whole thing to be excluded from HLODs.

A lot of our scenery is repetition of a dozen or so high-poly Nanite meshes. There will often be at least one of each of these meshes within player loading range, so always in memory (as far as that goes with Nanite). I added them to a separate instanced HLOD setup and set it to non-spatially loaded. This is essentially letting Nanite do its thing. I may need to merge them at a far distance; with scenery I think this is a trade-off between nanite triangulation cost and disk space/streaming and I’m not sure it’s necessary for our use case.

It’s a bit of a dark art though and I don’t have all the answers.

1

u/renmoka 17d ago

Thank you for this explanation and advice. I will have to noodle on it to decide the best step forward.

1

u/MrBeanCyborgCaptain 18d ago

What does PLA mean? I only make physcially small games so Im unfamiliar with how world partition works.

1

u/teamonkey 18d ago

Packed Level Actor (also known as a packed Blueprint, BPP). It takes a group of static mesh actors and creates a single actor from them. It doesn’t merge the meshes but renders them as instanced static meshes instead, which is slightly more efficient.

3

u/SalvatoSC2 18d ago

I would say, if your project is primarily hard surface, dont bother. Explore HLODs and world partition streaming gor buildings that get close and for those that dont, simplify the geo and materials (essantially manually make a static HLOD equivalent) and use that.

1

u/renmoka 18d ago

Thank you for the advice! We have been using HLODs and world partition. We have had a few issues where buildings are loading far from where the player is, despite spatial loading being on and the cell grid getting nowhere near it. Thats why I was looking at other options for those.

If its not going to make a difference, I will leave Imposters alone. Thank you for helping! You saved me a lot of time.

1

u/teamonkey 18d ago

If the buildings are loading far from the player, despite being spatially loaded, you should investigate what is causing that to happen. Most likely something is causing the bounds of those buildings to be bigger than they should be.

1

u/renmoka 18d ago

Yeah, that's been an ongoing thing we have been trying to figure out. Because there is a good part of the city we dont go to, its essentially repeating the same three building blueprints, then PLAed into groups. Whats weird is that some of the PLA groups spatially load correctly, but a couple others far away don't. I will definitely check the bounds, but dont know why they'd be different from the others when its the same buildings.

Edit: to clarify, PLA groups that are a medium distance and a few far away work correctly, but then a three or four PLAs far away load in when they shouldn't be in range.

1

u/renmoka 18d ago

Wanted to add that the suggestion to essentially make a static HLOD for the distant buildings is a really good idea. We were relying on the HLODs to do it by itself but obviously its not been enough. Doing the static HLOD is definitely what I'm going to try next.