Architecture: Paying Attention To Details - Krunklehorn/io-scene-gzrs2 GitHub Wiki
Map generation doesn't work well with dense, thin or curved geometry. Don't stick a 300k polygon toothpick in a room full of exploding barrels.
More generally, objects placed in a map for ornament or clutter should be marked as "Detail". This prevents a mesh from cutting nearby geometry during bsptree generation. It should always be used for things like cars, telephone poles, statues, flower pots etc.
Let's see the problem in action...
- Add a new icosphere mesh to the scene and set it's type to "World".
- Position it hovering somewhere in the middle of the room.
- Save the project and export the map.
- Create an empty project and import the map with the "Bsptree" and "Bounds" switches enabled.
- Show the "<mapname>_Bounds_Bsptree" collection and note how many bounding boxes are clustered around the icosphere. This is bad.
- Take a look at the "<mapname>_Bsptree#" meshes and note any cuts in the walls surrounding the icosphere. See how they jut out at odd angles? We can do better.
- Open the project again, select the icosphere and enable the "Detail" switch.
- Save, export, re-import and test again. Much cleaner.
Pro Tip: World meshes marked as both Collision and Detail still contribute to the bsptree of the collision pass. To avoid long compile times and in-game performance problems, always create separate, low-poly collision meshes for complex objects. GunZ doesn't play well with curved surfaces anyways, so they should only be used for ornamentation.
Pro Tip: Empties marked as "Occlusion" planes can be used to specify bsptree and octree cuts manually, similar to Radiant/Hammer "Hint" brushes. Recommended for experienced mappers only.