Performance and General Mapping Guidelines
Hello,
After my experience with Jambi, I figured I can post some helpful tips/guidelines to help all the mappers out there.
Performance Guidelines
1. Draw Calls
As a rule of thumb, each room should have less than 1300 draw calls. Each prop, light and texture generates its own unique draw call. To check this number, type r_stats 1. If you find yourself going over the limit, I recommend reducing the amount of lights/props in your room. Also keep this in mind when planning to create big rooms. It can be very hard to stay under 2000 draw calls with bigger rooms.
Ex: Hub on tram has over 1800 draw calls.
Gravity on Jambi has over 1800 draw calls.
I get performance drops in both of these rooms, especially when there are cysts.
2. Shadows
Every light that has shadows turned on, should have a shadow fade rate. If you set your shadow fade rate to 0, then the game will render the shadow throughout the entire map. 0.1 or 0.2 work well depending on how big the room is. If you really want your shadows to be on at a distance, I recommend 0.05. You should try not to go below that.
As a rule of thumb, each room should have less than 20 Shadows. For optimal performance, you should aim for less than 10. type r_stats 1 in console to look at the number of shadows generated.
3. Central Locations
In General, central locations tend to cause performance drops because the game may still render other parts of the map, even though you have proper occlusion. It is important to keep this in mind when designing centralized locations so FPS drops will not be a big issue. This is one of the biggest issues with Hub on tram. Thankfully, Hub is not a tech point so its not a huge deal. But if your map has a centralized tech point, then try designing the location so the adjacent rooms are not too close to the room so the game will not render the adjacent rooms.
4. Occlusion Geometry
This is very important. I recommend creating the occlusion geometry right after the entire map is grey boxed.
General Mapping Guidelines
1. Grey box Testing
THIS IS THE MOST IMPORTANT THING ANY MAPPER CAN DO. Grey box testing will allow you to change the design of your map very easily. Grey geometry is very malleable, and can be changed quickly. Once your map is textured, it can be very hard and time consuming to make changes to the design of your map. I recommend talking with Howser and getting your map in the Sunday Weekly Custom map PT sessions. Be sure to check the end of the post for a list of things to check when grey box testing.
2. Draw Distance
After a certain distance, NS2 will not render player/game play models. The max distance is roughly the distance between North and South Tunnels in Hub on Tram. Keep this in mind when designing rooms, especially large ones.
3. Commander Invisible and Vents
For some reason, when a vent has some textures in the Commander Invisible group, the entire vent may not show up Orange on the player map. To get around this, create a duplicate version of your map file, and get rid of all the commander invisible faces. Then render the mini-map and combined that mini-map file with your original map file.
4. Commander Invisible
You are much better off if you add all the faces that need to be in the commander invisible group while you grey box test. It can be annoying to add them later once you room is textured and has props.
5. Layer
Layer as you go. Do not wait to the last minute to add everything into a layered group.
6. Spacing - Howser
Spacing is something that's subjective and based on the context of the area/areas and where the room is positioned in the map and how its intended to play. However, somethings just don't work like, long tight corridors, huge empty open spaces, stupidly low ceilings or tiny tech point areas. I recommend loading up an official map such as tram, and follow its measurements.
Welding
I personally like to weld everything. There is a simple way to "Un-weld" your vertices so you can move faces around easily. Simply, cut a face and paste it. When you paste it again, the vertices should be disconnected.
Grey Box Check List
-Check Arc spots on tech points. If I had a dime every time a mapper had an unfavorable siege location, I could buy a few copies of NS2. The range is bigger than you think.
-Run distances between tech points. Everyone loves a balanced map.
-Hallway sizes. Are they too narrow? Too Wide open? Can an onos/exo fit in every hallway?
-Room Spacing
-Commander invisible - Is the commander's view clean?
-Occlussion Geo
-Drifer/cyst pathing
-RT locations - Are the res nodes spread out evenly? Try to maintain a TP-RT-TP-RT chain.
That is really all I can think of for now. I hope this was helpful. I learned almost all of this by studying official ns2 maps. I highly recommend loading one of them up in spark, and take a look around.
After my experience with Jambi, I figured I can post some helpful tips/guidelines to help all the mappers out there.
Performance Guidelines
1. Draw Calls
As a rule of thumb, each room should have less than 1300 draw calls. Each prop, light and texture generates its own unique draw call. To check this number, type r_stats 1. If you find yourself going over the limit, I recommend reducing the amount of lights/props in your room. Also keep this in mind when planning to create big rooms. It can be very hard to stay under 2000 draw calls with bigger rooms.
Ex: Hub on tram has over 1800 draw calls.
Gravity on Jambi has over 1800 draw calls.
I get performance drops in both of these rooms, especially when there are cysts.
2. Shadows
Every light that has shadows turned on, should have a shadow fade rate. If you set your shadow fade rate to 0, then the game will render the shadow throughout the entire map. 0.1 or 0.2 work well depending on how big the room is. If you really want your shadows to be on at a distance, I recommend 0.05. You should try not to go below that.
As a rule of thumb, each room should have less than 20 Shadows. For optimal performance, you should aim for less than 10. type r_stats 1 in console to look at the number of shadows generated.
3. Central Locations
In General, central locations tend to cause performance drops because the game may still render other parts of the map, even though you have proper occlusion. It is important to keep this in mind when designing centralized locations so FPS drops will not be a big issue. This is one of the biggest issues with Hub on tram. Thankfully, Hub is not a tech point so its not a huge deal. But if your map has a centralized tech point, then try designing the location so the adjacent rooms are not too close to the room so the game will not render the adjacent rooms.
4. Occlusion Geometry
This is very important. I recommend creating the occlusion geometry right after the entire map is grey boxed.
General Mapping Guidelines
1. Grey box Testing
THIS IS THE MOST IMPORTANT THING ANY MAPPER CAN DO. Grey box testing will allow you to change the design of your map very easily. Grey geometry is very malleable, and can be changed quickly. Once your map is textured, it can be very hard and time consuming to make changes to the design of your map. I recommend talking with Howser and getting your map in the Sunday Weekly Custom map PT sessions. Be sure to check the end of the post for a list of things to check when grey box testing.
2. Draw Distance
After a certain distance, NS2 will not render player/game play models. The max distance is roughly the distance between North and South Tunnels in Hub on Tram. Keep this in mind when designing rooms, especially large ones.
3. Commander Invisible and Vents
For some reason, when a vent has some textures in the Commander Invisible group, the entire vent may not show up Orange on the player map. To get around this, create a duplicate version of your map file, and get rid of all the commander invisible faces. Then render the mini-map and combined that mini-map file with your original map file.
4. Commander Invisible
You are much better off if you add all the faces that need to be in the commander invisible group while you grey box test. It can be annoying to add them later once you room is textured and has props.
5. Layer
Layer as you go. Do not wait to the last minute to add everything into a layered group.
6. Spacing - Howser
Spacing is something that's subjective and based on the context of the area/areas and where the room is positioned in the map and how its intended to play. However, somethings just don't work like, long tight corridors, huge empty open spaces, stupidly low ceilings or tiny tech point areas. I recommend loading up an official map such as tram, and follow its measurements.
Welding
I personally like to weld everything. There is a simple way to "Un-weld" your vertices so you can move faces around easily. Simply, cut a face and paste it. When you paste it again, the vertices should be disconnected.
Grey Box Check List
-Check Arc spots on tech points. If I had a dime every time a mapper had an unfavorable siege location, I could buy a few copies of NS2. The range is bigger than you think.
-Run distances between tech points. Everyone loves a balanced map.
-Hallway sizes. Are they too narrow? Too Wide open? Can an onos/exo fit in every hallway?
-Room Spacing
-Commander invisible - Is the commander's view clean?
-Occlussion Geo
-Drifer/cyst pathing
-RT locations - Are the res nodes spread out evenly? Try to maintain a TP-RT-TP-RT chain.
That is really all I can think of for now. I hope this was helpful. I learned almost all of this by studying official ns2 maps. I highly recommend loading one of them up in spark, and take a look around.
Comments
A point I'd like to stress is the importance of scale and spacing of a map. Through playing a lot of custom maps it seems to be the most common problem. Spacing is something that's subjective and based on the context of the area/areas and where the room is positioned in the map and how its intended to play. However, somethings just don't work like, long tight corridors, huge empty open spaces, stupidly low ceilings or tiny tech point areas. Think about every species and gameplay scenario when building your rooms.
I've also noticed several maps also feel scaled up/down. Next to each other the rooms and corridors look fine, but in gameplay you feel like a bug or a giant.
The best solution to this (for me personally) was to study the existing maps, open them up and make measurements, copy and place planes of the spaces you feel would work in your map. Using rules, and reference entities (ready room start etc) are all well and good but to develop a higher understanding of the interaction of space in NS2, you need to study what works and what doesn't.
Edit: Actually added to the guidelines & resources should be ok.
quick question: What exactly IS the range of ARCs, so I can play around with Circles in the editor to check for bad spots. The wiki just says "range 26". 26 WHAT?
I ended up just pulling an ARC in sandbox mode, look at the radius when deployed, and then load the map in the Editor to meassure the distance.
I'll use 1280" radius circles from now on. The real range seems to be a tiny bit smaller, but better be safe than sorry.
1280 seems about right... As a competitive player I was always able to eye ball it. Good luck on your map and I am glad this helped you (somewhat) haha
I haven't checked this in a while though.
Neat! I used to use circles polygons for that, even as far back as Valve Hammer time!