• 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 Brest Fortress needs expericenced optimizer(s)

Six_Ten

Grizzled Veteran
Mar 12, 2006
1,382
400
aztecmod.darkesthourgame.com
Historically correct map of the heroic Brest Fortress is nearly ready. I need to optimize it: add antiportals and bsp to cull, etc. The map is eye candy and historically accurate as far as I've been able to make it, but runs slowly. I want to release it very soon.

Reply in this thread if you are qualified and able to help.
 
Last edited:
Historically correct map of the heroic Brest Fortress is nearly ready. I need someone to optimize it: add antiportals and bsp to cull, etc. The map is eye candy and historically accurate as far as I've been able to make it, but runs slowly. I want to release it very soon. If I have to learn optimization from scratch it will delay release.

Reply in this thread if you are qualified and able to help. I can get you the map today.

Not to be a downer, but optimization IS mapping. If the optimization isn't done, the map isn't done. I could crank out maps like crazy if they don't have to run on anyone's machine. :)

I urge you to take the time to learn and do the optimization yourself.

a) It will make you a better mapper
b) It will ensure your map doesn't dissappear 5 seconds after it's released.

I don't mind providing assistance and advice, but I won't do the work for you.

Good luck.
 
Upvote 0
Question to help us all:

Culldistance.
Does this HELP? I added a good number of statics to 'Berezina', 90%+ inside houses or tunnels. I set all of the 'culldistance' settings at either 1024 or 2048, depending on where they were. Is this setting better than '0'???

It seems that the '0' setting might cull better on its own.

Is there a logic here? Suggestions?

I have zone portals in all doors and windows and they work, tested them with far shorter fog plane than 'outdoors'.

Thanks!
 
Upvote 0
Brest-Livotsk

Brest-Livotsk

Heres the way I did it so far: is this the right and best way? The attachment is a cross-section. The main features of the map are flat rolling hills intersected by rivers and moats, with the main terrain feature being a ten-meter high earth fortification ringing the entire fort. I've read that having too many antiportals slows performance, but the only way to really do it is to put a BSP and antiportal section (see drawing) in each section of rampart, and also in each building. Right?


BFOverhead.jpg



Optimix.jpg
 
Upvote 0
Yes that's a pretty good illustration of how BSP / Antiportals should be set up

As for cull distancing static meshes etc - cull distance (certainly for open terrain maps) should be set equal to the fog distance you've set in zone info at - this ensures that objects blend out correctly without the noticable 'pop-up - however, I usually set cull distancing on meshes a little bit over what the fog end numbers are because the frustum view is actually spherical so objects pop into view on the extreme left & right sides of your view as you turn - purely for cosmetic reasons

Zero cull distance means the mesh will be rendered to an infinate draw distance (not good)

Lruce
 
Upvote 0
Ok, so further hijack...

What about statics that are inside buildings or under ground and not visable say, over 2048 units away?? Is it better to set them to fog plane distance or to set them lower? Is this in itself causing more lag because more items are 'popping' server-side as it decides what to draw and what not??

The outdoor elements are not a problem. It seems to be the indoor stuff.

Thanks!

By the way, Six, that is the way I did 'Berezina' as well and it works pretty good, but it's tough over long sight distances.
 
Upvote 0
It is usually good to set indoor statics to have a cull distance thats not zero, depending on the complexity of the rest of the map however, as with all optimizations. No map is the same.

Interior elements that can't be seen from outside should best be set to the smallest possible cull distance. This will aid the engine into deciding quickly on what not to render. Zero means NEVER cull unless culled by an AP or zone.

It does howver depend on the map itself, there's a golden rule, but like any rule, you can create a map that breaks it.
 
Upvote 0
Ok, so further hijack...

What about statics that are inside buildings or under ground and not visable say, over 2048 units away?? Is it better to set them to fog plane distance or to set them lower? Is this in itself causing more lag because more items are 'popping' server-side as it decides what to draw and what not??

Cull distance is a visual render thing.. it's simply used to lower the amount of drawable triangles on the client. If you go into wireframe mode (rmode1 iirc), you can see that triangles that are not 'seeable' (ie: obscured by terrain, etc..), are still drawn.. unless you cull them, or they are culled by Zoning or Distance Fog, or behind an AntiPortal.


So.. for this thread's UDN link, I recommend the aptly named:
"Introduction to Level Optimization"
http://udn.epicgames.com/Two/LevelOptimization
 
Upvote 0
Spend some time learning what the different modes are because they're very useful for optimization. Use Wireframe mode and the 'Fixedvisibility' command in console to see exactly what is being rendered. This is very useful because you can look across the map, type in that command, and then walk forward and see if anything is being rendered that shouldn't be. Depth Complexity and Zone/Portal are two other modes that visually help you right inside the editor.

Keep your texture useage in check periodically as well. You should aim for only 100 textures being rendered at any given time. You can check this by typing 'stat all' in the Editor or right in the game. This will give you a ton of information that will really help you keep everything running smoothly. Additionally in your texture browser it tells you how many times each texture is being used throughout the level. If the number is very low you should consider removing it or replacing it with another more commonly used texture.

If you guys need any help with optimization or Level Design in general hop on the #RO-LevelDesign IRC channel. There's so much more that could be said about optimization and IRC is probably your best bet to get a quick response. :)
 
Last edited:
Upvote 0
Correct, I only used anti-portals because they seemed to do what I was after. I suppose bsp would be fine as well but only under the terrain. I used the anti-portals by placing them inside the tree groups, running floor to ceiling. They are invisible, unlike bsp would be, and cull apparently fine enough.

The issue I have is with detail mesh, I believe. Thanks Sasquatch for those answers. That confirmed my perception.

Is there a way to display the number of triangles being drawn while IN-GAME? And if so, what is the target limit for max tris per view?? In CoD my target was 60,000 as one player, 100,000 max with full server load.
 
Upvote 0
I just looked at Berezina and Ogledow: They don't use BSP under the ridges in terrain as in the illustration above, just antiportals. I thought that BSP was also necessary to occlude network actors. Should I just use antiportals?

You fix the bottlenecks.. I don't think either of those have alot of network relevent actors aside from the obvious players and tanks. So the biggest bottleneck would be triangles or so.

You can Use 'Stat All' will tell you, simply, everything.. look at what it taking the longest in ms to render, and see if you can shorten it.

Stat Hardware will tell you total triangles iirc.
For reference count of triangles.. best I can suggest is check out offical maps sometime while playing to get an idea.
 
Upvote 0
I added antiportals to the Citadel and fortifications: 127 in all. Framerate went from 8 to 22 in most open areas, and up to 34 near the antiportals. Considering that in-game official maps fps is usually about 15 for me, thats a good improvement. I checked the wireframe (rmode1 in console) and they're culling lots of the map.

Another area I see I can improve is that the Citadel is one model (about 20,000 tris) and the Fortification is one model (also about 18,000 tris). Since they each cover so much territory, and if any part of the model is visible it is all visible, by cutting these into smaller parts, more will be occluded.
 
Upvote 0
I used the anti-portals by placing them inside the tree groups, running floor to ceiling.

The issue I have is with detail mesh, I believe. Thanks Sasquatch for those answers. That confirmed my perception.

Is there a way to display the number of triangles being drawn while IN-GAME? And if so, what is the target limit for max tris per view?? In CoD my target was 60,000 as one player, 100,000 max with full server load.

If you check out the official maps most of them have BSP + APs go from well under the floor to the ceiling. This is to make sure that everything gets culled by giving the BSP/AP the most surface area without sticking out anywhere.

To check the triangle count in-game press the 'Play Map!' icon at the top of the editor (looks like a joystick) and then once in-game type in 'Stat All' in console. Look under the Static Mesh list for Trianges and this will tell you exactly how many triangles are being rendered. The ideal number is probably 100 000 but some official maps go up to 200 000 in some areas. I would spend some time looking through the official maps and compare their stats to your own map. Also note that you can type in the 'Stat All' command in the editor and press the 'Realtime Preview' icon (Hotkey P) to get similar results but this does not factor in zoning so your triangle counts will be larger than shown in-game.
 
Upvote 0
I added antiportals to the Citadel and fortifications: 127 in all. Framerate went from 8 to 22 in most open areas, and up to 34 near the antiportals. Considering that in-game official maps fps is usually about 15 for me, thats a good improvement. I checked the wireframe (rmode1 in console) and they're culling lots of the map.

Another area I see I can improve is that the Citadel is one model (about 20,000 tris) and the Fortification is one model (also about 18,000 tris). Since they each cover so much territory, and if any part of the model is visible it is all visible, by cutting these into smaller parts, more will be occluded.

If your framerate went up youre pretty lucky. Did you use culldistances on the antiportals? If not, you can achieve better performance by using less antiportals. Twenty (20) is usually a nice amount to aim at, but each map has it's own rules.
Antiportals also occlude eachother, further more, if many antiportals are in the players fustrum, the sheer amount of occlusion calculations can rather hamper then help your performance! Antiportals are used for RENDER occlusion.

BSP is used and nessecery for NETWORK occlusion. Antiportals do NOT occluede network actors and traffic, BSP does. That is why you should use large Antiportals and BSP nicely planned through the map.
This goes also for terrain maps!
 
Upvote 0