Performance: Essential Must-Knows: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Fidcal (talk | contribs)
New page: ''written by Fidcal'' ==Caulk== Textured brush surfaces that are hidden by patches or behind beams etc. still add to the rendering complexity. So to improve performance those surfaces sh...
 
Fidcal (talk | contribs)
Added extra sections
Line 1: Line 1:
''written by Fidcal''
''written by Fidcal''
All mappers should know the following but remember not to blindly follow every rule but consider the balance between performance and presentation on a case by case basis. Don't spoil a beautiful view or an interesting interaction to gain efficiency unless it is worth the trade.


==Caulk==
==Caulk==
Line 6: Line 11:


There is no need to use ''caulk'' texture on on any surfaces on the outside of the map in contact with the void because these will automatically be unrendered.
There is no need to use ''caulk'' texture on on any surfaces on the outside of the map in contact with the void because these will automatically be unrendered.
==''func_static'' v ''worldspawn'' Brushes==
By converting ''worldspawn'' brushes to ''func_static''...
* You can add the property noshadows = 1 so that it doesn't cast shadows, improving frame rates.
* It avoids creation of millions of polys in certain situations where the engine converts a brush into loads.
* It reduces pathfinding complexity (see ''Preventing and Reducing Pathfinding Complexity in Select Locations'' in [[Pathfinding]])
==Lighting overlaps==
Generally be cautious about the light from more than one source falling into the same geometry triangle. This overlapping lighting makes the rendering calculations more complex and reduces game performance resulting in slowdown. The console command '''r_showtris 2''' shows what is currently rendered (as triangular wireframes) so you can check any suspect areas. Often you can add trim and other detail to split up large triangles to reduce this.
==Patches, Fixed Tesselation==
Setting patches to fixed tesselation instead of automatic can significantly decrease the number of polygons.
==Pathfinding Complexity Reduction==
see ''Preventing and Reducing Pathfinding Complexity in Select Locations'' in [[Pathfinding]]
==Shadow Casting Removal==
Where appropriate, remove shadows from lights, entity brushes, and models by settings the property noshadows = 1 (see ''func_static'' v ''worldspawn'' Brushes'')





Revision as of 14:06, 11 June 2007

written by Fidcal

All mappers should know the following but remember not to blindly follow every rule but consider the balance between performance and presentation on a case by case basis. Don't spoil a beautiful view or an interesting interaction to gain efficiency unless it is worth the trade.


Caulk

Textured brush surfaces that are hidden by patches or behind beams etc. still add to the rendering complexity. So to improve performance those surfaces should be textured with common > caulk because that texture is not rendered at all.

There is no need to use caulk texture on on any surfaces on the outside of the map in contact with the void because these will automatically be unrendered.


func_static v worldspawn Brushes

By converting worldspawn brushes to func_static...

  • You can add the property noshadows = 1 so that it doesn't cast shadows, improving frame rates.
  • It avoids creation of millions of polys in certain situations where the engine converts a brush into loads.
  • It reduces pathfinding complexity (see Preventing and Reducing Pathfinding Complexity in Select Locations in Pathfinding)


Lighting overlaps

Generally be cautious about the light from more than one source falling into the same geometry triangle. This overlapping lighting makes the rendering calculations more complex and reduces game performance resulting in slowdown. The console command r_showtris 2 shows what is currently rendered (as triangular wireframes) so you can check any suspect areas. Often you can add trim and other detail to split up large triangles to reduce this.


Patches, Fixed Tesselation

Setting patches to fixed tesselation instead of automatic can significantly decrease the number of polygons.


Pathfinding Complexity Reduction

see Preventing and Reducing Pathfinding Complexity in Select Locations in Pathfinding


Shadow Casting Removal

Where appropriate, remove shadows from lights, entity brushes, and models by settings the property noshadows = 1 (see func_static v worldspawn Brushes)


Render-Sectioning using Visportals

If visportals are not used then the entire map will be rendered at once wherever the player is - greatly reducing performance to the point where most maps are not likely to be playable at all. It is crucial that the map should be compartmentalized using visportals. Study the Visportals tutorial for details.