• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Level Design The map optimization thread

Okay, going to throw some questions out now:

If I exceed the zone limit, will that cause for certain zones to go back to a default ZoneInfo setting? It's a bit of a problem I've been getting and it occurs seemingly at random to different zones. If I fix it at one it is bound to appear at another. What happens is it defaults its ambient lighting, fog settings, just about everything. Rather peculiar. Alternatively, it could just be a bug because I'm almost certain I haven't gone over 64 zones...

Additionally, I suppose I should take all of the window meshes I have and merge them in to one big mesh on a per-building basis? I've seen that mentioned somewhere and I know DrGuppy did it in Leningrad, but what are the benefits and reasoning behind this?
 
Upvote 0
You can see how many Zones you have by checking the Build menu's Build Options dialog, Stats tab.
It starts combining zones when you go over 64.
You are better off making sure you don't exceed 64, and perform the combining yourself manually so that you get the proper zone setup that you want.
Or simply determine whether all current zones are actually necessary.

Combining window meshes will depend entirely on the design of the building.
I haven't seen your map.
If the meshes are quite far apart, and culling can occur with them as individual meshes, you should leave them that way.
If a large building with many window meshes are all combined, when one triangle of that is in view, they all render. Plus other speed benefits from single meshes such as shared vertices cannot be realized by simply combining multiple detached meshes since they share no vertices.

How do you plan on "merging" them?
To do this properly it would have to be done externally in your 3D software (Max/Maya) and then imported as a single unit for the building.
I don't recommend using the Editor's Convert functions for CSG or StaticMeshes unless you understand the consequences of the action.
 
Upvote 0
Okay, going to throw some questions out now:

If I exceed the zone limit, will that cause for certain zones to go back to a default ZoneInfo setting? It's a bit of a problem I've been getting and it occurs seemingly at random to different zones. If I fix it at one it is bound to appear at another. What happens is it defaults its ambient lighting, fog settings, just about everything. Rather peculiar. Alternatively, it could just be a bug because I'm almost certain I haven't gone over 64 zones...

Additionally, I suppose I should take all of the window meshes I have and merge them in to one big mesh on a per-building basis? I've seen that mentioned somewhere and I know DrGuppy did it in Leningrad, but what are the benefits and reasoning behind this?

I'm not sure about the first question, I'm not even aware of any limit on the zones. Sounds like a pretty strange bug, I would have to see it to comment on it.

The benefit of using large meshes is to keep the actor count down. When DrGuppy was optimizing Leningrad I suggested he do this because the actor could was huge. Large actor counts really bring down the performance.
 
Upvote 0
64 Zones maximum in UE2/UE2.5, then the build starts combining zones.
Does the bug actually change the properties of the ZoneInfo in question back to defaults? Or does it just end up "looking" this way in the zone after a build?
The "bug" could be the editor combining zone, zone leaks (force all ZonePortals to Order->Last, but make a map backup first), or some map glitch (BSP errors, etc.).

High actor counts can bog down when Editing.
Combining meshes can have a negative impact in-game however if it prevents optimal object culling.
 
Upvote 0
How do you plan on "merging" them?
To do this properly it would have to be done externally in your 3D software (Max/Maya) and then imported as a single unit for the building.
I don't recommend using the Editor's Convert functions for CSG or StaticMeshes unless you understand the consequences of the action.


Well, being as I have no grasp of using Max/Maya (although my mapping experiences reveal it to be a "must have"), I have had to find myself using the editor's convert functions, so obviously, I have no grasp of the consequences, if you could enlighten me.

The benefit of using large meshes is to keep the actor count down. When DrGuppy was optimizing Leningrad I suggested he do this because the actor could was huge. Large actor counts really bring down the performance.

Well I've certainly outdone DrGuppy in this regard, so that probably explains some of my performance woes...

EDIT: Sorry, I'd begun typing this out before DG posted answers, so anyway,

I would imagine that it has something to do with the editor combining zones. After a handful of rebuilds and then manually combining some zones, I check the Stats tab and it continues to read 63 as the number of zones. So, I suppose I will need to do yet more work to cut down on these, which might involve having to do away with a good portion of my map while I'm at it. And yes, the ZoneInfo that I place within the problematic zones seems to get overridden and, while it still has the values I input to it, it displays the properties of a default ZoneInfo.
 
Upvote 0
Yes, it is getting to the point in game design where learning Max/Maya is a definite plus.
Being able to create whatever meshes you require is a real benefit.

Maya PLE (Personal Learning Edition) is totally free and fully supported by Epic.
Maya PLE can be downloaded from Autodesk's website. The Plugins can be downloaded from UDN. Note that the last Epic PLE Plugin is for version 7.x, while Autodesk has 8.5 (?) online, meaning you require a copy of 7.x.

Anyway... :)

The consequences vary by what you are converting to/from and which direction, and vary from minimal impact to major impact, usually in the areas of rendering speed and collision, loss of instancing, but also smoothing support and object lighting if CSG is involved, etc.

However... :)

In your case, if you must decrease Editor object counts due to slowdown in editing, personally I would look at only combining windows on each side of the buildings. And if the window layout can support it, use the one combined mesh version to replace the others on the alternate sides or the similar buildings (in other words, if the windows are 2x2 layout, and all are the same layout and spacing on all four sides of the building, make one combined version and duplicate that around the alternate sides, deleting those individual windows and replacing it with the 2x2 set).
Especially if the buildings are CSG walls, are zoned, or contain cube block Antiportals (dummy facade/shell buildings), etc.
Simply because if a player is standing on the south side, chances are none of the windows on the other three sides are necessarily rendering (you can check this). But if you combine all windows all the way around, they will all always render when even one is in view.


It sounds like you are running into Zone issues then.
In this case, I wouldn't just throw away portions of the map, I would selectively decide which areas can best benifit from the use of zones.

Zones essentially provide optimization through culling those areas out of the rendering if none of the ZonePortals are in view.
In most cases, for maps such as RO style, the zones will be on individual buildings. Or if the map is outlined with faced buildings around the edges, the zones may be for each room facing the play area.

Are any ZonePortals always directly stacked in view with a ZonePortal on the other side(s) of the room/building? These can be a waste of a zone as it may always render (you always see through it).

Are your buildings full 3D and do they have interiors (versus facades or shells)?

Which interiors have the most detail and staticmeshes inside of them?

Can you replace some Zoning optimization simply with AntiPortals?

So choose which areas of the map will benefit most from zones.

- If your buildings are full 3D with interiors, zone those which have the most detail inside of them, as this is the most benefit.
Empty rooms benefit less than rooms full of meshes and detail.

- If there are multiple rooms in each building, and you are zoning the rooms individually, simply combine some of the adjacent rooms into just one zone (remove the ZonePortal between them).
You may have a rendering speed penalty when these rooms are viewed from certain directions, but at least you fix the max-out zone limit.

- If any buildings are simply cube shells or facades or have no detail inside of the rooms, you may be able to use AntiPortals in the walls instead of zoning.
Just be sure that the AntiPortal cube protrudes down below the building CSG into subtractive space or it won't work.
You usually don't want the AP in the visible rendering view, so don't have it behind open windows or you may see a HOM or black space. It should be embedded in solid CSG or under terrain, where it cannot be seen.

Other than this, I would have to see the map.

Hope it helps... :)
 
Last edited:
Upvote 0
It seems you and I are on the same level in regard to the course of action necessary.

In regard to my buildings, I have a lot of "hybrid" structures if you will. I realized that a full BSP building would be too costly in regard to performance, so I had to determine how much I wanted to be accessible (BSP) and how much I wanted to be a Static Mesh facade, so I generally split it up such that the first 2-3 floors were fully accessible BSP while the remaining 3-4 floors were just a Static Mesh facade ranging from 230-450 tris depending on the height and width of the structure. Luckily, a lot of structures have just one face showing because the layout of the city is based upon a system where you have blocks of buildings with a courtyard in the middle (which I oh-so wanted to do but realized performance wise I couldn't), so when combining my windows and other facade decors in to one mesh, it should render on just the one POV. For buildings with two faces (corner buildings), then I would split it up on a per-face basis.

In regard to zoning, the size of my map has come to the point where I had to go to a per-floor basis as opposed to per-room. Additionally, I view the inclusion of more anti-portals as being a hindrance on performance since, I take it, if they "overlap" it causes CPU issues no? I've gathered enough AP knowledge through experience to know how they work and the like, so I try to take that in to account, it's just that my map is rather massive and in some cases I fear an AP might not work because I might have to delete several rooms or something to that extent. I've done the best I can with them, but I'll keep working to keep the numbers of active APs down by using Cull Distances and fog.

I'll keep trying. Optimizing a map on the scale of mine is no easy task, that's for sure...
 
Upvote 0
Yeah I wouldn't delete parts of your map. Just make the zones bigger, sure it's not ideal but better than nixing parts of your map. GL on your map. Big urban maps are probably the most difficult to accomplish. BTW I've got my urban map I've been working on since, well, forever! (keep getting sidetracked & derailed by other things, "no really this is the last sidetrack dammit!!!!" ARGGGHH!). I feel the pain for sure. Looks like people are going to get some nice urban surprises soon;)
 
Upvote 0
Yeah I wouldn't delete parts of your map. Just make the zones bigger, sure it's not ideal but better than nixing parts of your map. GL on your map. Big urban maps are probably the most difficult to accomplish. BTW I've got my urban map I've been working on since, well, forever! (keep getting sidetracked & derailed by other things, "no really this is the last sidetrack dammit!!!!" ARGGGHH!). I feel the pain for sure. Looks like people are going to get some nice urban surprises soon;)

Urban maps means more art work usually, but as far as optimization goes they are easy to plan. The reason for this is that you have BSP, Zone and AP opportunities all over the map due to the massive amount of buildings present. All you need to be able to do is combine smart optimization schemes with cool gameplay.

Rural maps usually have very little opportunities to optimize if you want to keep it 'real'. You'll have to work with small raised sections of hillside or rubble, stone walls and small buildings to hide BSP and AP's in etcetera, and you are usually suffering from larger view distances, many players/vehicles in the network fustrum at once and loads of vegetation using masked textures causing dangerous overdraw issues.

So while art wise rural maps might be less demanding, optimization wise they offer a big challange.
 
Upvote 0
Urban maps means more art work usually, but as far as optimization goes they are easy to plan. The reason for this is that you have BSP, Zone and AP opportunities all over the map due to the massive amount of buildings present. All you need to be able to do is combine smart optimization schemes with cool gameplay.

Rural maps usually have very little opportunities to optimize if you want to keep it 'real'. You'll have to work with small raised sections of hillside or rubble, stone walls and small buildings to hide BSP and AP's in etcetera, and you are usually suffering from larger view distances, many players/vehicles in the network fustrum at once and loads of vegetation using masked textures causing dangerous overdraw issues.

So while art wise rural maps might be less demanding, optimization wise they offer a big challange.
Yeah I totally agree. Each style has its own challenges to overcome. What I meant by "difficult to accomplish" is like you said just the sheer amount of art and stuctures and zoning, BSP errors etc etc etc. Completing a huge urban map can be a nightmare that can overwhelm you (it's overwelming me). I know I've been jabbering about my map for along time now so maybe I'll actually get it done soon? I hope I hope.... "Poland 1945" is all the hints I'll give.;)
 
Upvote 0