Models vs brushes

From modwiki

Jump to: navigation, search
Visibility culling
Enlarge
Visibility culling

The Doom 3 engine uses an unified lighting model, which means that everything is rendered in exactly the same way. This requires that models and maps are well built to not waste resources. Map geometry is automatically optimized during the compile process while models require manual optimization.

Another consideration is that models behave differently with regards to visibility culling than level geometry. The top part of image on the right shows a corridor with r_showPortals 1, r_useScissor 0 and r_showTris 2. In the red circle area you can see that the portal is green (i.e. open) and that the engine is rendering the alcove on the right. However, the alcove is empty. If you strafe left a bit (the lower part of the image) you can see that two boxes (which are two func_static) show up.

Despite the above, this functionality is a double-edged sword. Although in the above example, models will not show up until they're nearly visible and thus an advantage, other situations arise where the vis portal is closed but models may still be "visible" to the engine because a very small part of them are on the other side of the portal. Since they are models, they are not cut by the visportal and that's why they show in their entirety, because they are being drawn relative to their bounding box limits (the 'box' that contains the object). This can become a problem with big models that span visportals.

Aside from the above remarks, the deciding factors as to what should be created with brushes and what should be modeled is up to personal preference and your needs.

  • Is it easier for you to construct a specific object with brushes or modelling tools?
  • Do you need to take advantage of vertex coloring? Brushes can not make use of vertex color.
  • Is this object integral to sealing the void or is it just decoration? Models cannot seal a map from the void. Caulk brushes have to be placed behind models that make up the border of a map.

It's also worth noting that you can not resize static meshes in the engine's editor: a model of a door for example, can't be resized to fit a doorframe (had you misjudged the sizing) so you'd need to either resize the model in your 3D application or change the surrounding brushwork to fit.

Personal tools
Main