Overview

Mesh uses .obj and .mdl files for static elements - meaning content that is not level architecture. This could be, for example, a crate, some plants, heath items, maybe a car on the side of the road. Trenchbroom is great for making architecture, but it winds up with too many triangles if you wanted to make more complex models.

Any object that is not an NPC (non playable character) that needs physics, or needs to be moveable will likely be an .obj model created with blender

Triangulate Faces

To use an .obj file in mesh, or rather to have the textures work correctly, you’ll need your object to have all it’s faces triangulated.

You do this by:

  • selecting edit mode
  • selecting the whole object by pressing the key a
  • then pressing ctrl+t

triangulate

Assigning Textures

NOTE: TBD

This section is not complete as I am still not 100% sure how I do it. I often just click around until it works :-/

Basically you need to create a texture and a material and assign it to the object. The following screen shot is where you can find most of these options.

Additionally you need to ‘unwrap’ the texture - which I have no clue how I did that.

Unwrap for Textures

In Edit mode, press U

Exporting Textures

There are a number of settings to get the texture mapping to export from blender to the obj file. Here are a few things to make sure you have ticked in the the File > Export > Wavefront (.obj) menu:

  • Apply Modifiers
  • Include Edges
  • Write Normals
  • Include UVs
  • Write Materials
  • Objects as OBJ Objects