In-Game Models

From Mod Wiki

These are the models that are displayed by the engine.

Low-Poly Modelling Conventions

Tips and techniques for low-poly modelling.

UVW Unwrapping Conventions

  • Use a checker pattern image while unwrapping to check for texture stretching.
  • Trade off texture stretching with having more continuous UV's between adjoining faces; this will help prevent ugly specular seams.
  • Try to keep UV edge breaks along an intended hard edge; again, this helps prevent obvious seams.
  • Try to cluster adjacent model components in similar areas in UV space; it makes the texture easier to work with.
  • If you can't see both sides of an identical set of faces at the same time, mirror the UVs!
  • Try to maintain consistent UV space usage on all important areas of the model, so that texture scale is consistent.
    • With special-case models such as first person weapons or cockpits, if part of the model is always particularly close to the screen then more UV space should be used.
  • Where UV space is limited, try tiling textures as much as is possible. In most cases this will mean subdividing the mesh but generally texture space is more precious than polygon count.
  • Pack UVs as tightly as possible (while still leaving a 4 or 5 pixel gap around each part, to prevent seams showing up due to mip-mapping).

Collision Meshes

Overview

Collision meshes are used to improve in-game physics performance. They can also be used to stop players or vehicles catching on small protrusions from meshes, and generally smoothing out player movement over complex shapes.

Collision Meshes for Mapobject Models

When you make a model to be used as a mapobject, by default all the triangles are used as collision parts. This means that bullets, projectiles, players and vehicles collision all have to be calculated against every polygon in the model. Most of the time this is unnecessary (especially for player and vehicle collision) and reduces run-time performance in the game.

Therefore, we can make optimised versions of the mesh, and store them in the same model file with a specific "collision" materials so that the game will only calculate collisions against the optimised versions.

For a full explanation, see Collision Meshes.

Making Shadow Hulls

Overview

Shadow hulls are used to improve in-game graphics performance. They should be used on more complex meshes, to keep the shadow count down. This is especially valuable in areas with many shadow-casting lights.

Tips

  • Shadow hulls should be "watertight" meshes wherever possible - open edges will result in lower performance.
  • Shadow hulls should always be inside the main visible mesh. Any parts which clip through the visible mesh may produce odd-looking shadow artifacts.

Vertex Colouring

Vertex Texture Blending in Lightwave

  • First you need to make a vertex color map. Click the Map tab at the top, then New Color Map on the left of your screen, and press Ok.
  • Using the surface editor (F3) click the Advanced tab for each of your blends and set the vertex color map to the color map you just created.
  • Using W, select your polys with the blend and the polys that they blend to, for example "textures/sand/sand01torock01" and "textures/rock/rock01".
  • Cut and paste these 2 sets of polys into a second layer (press x to cut and v to paste, or CTRL-x and CTRL-v in Lightwave 8).
  • Make sure the points of these 2 sets are merged (press m, then Ok)
  • Now select the blend polys and hide them by pressing -.
  • Now in point mode select all the remaining points and press Shift+| .
  • You should now have all the points of the blend polys selected, click the map tab at the top, then point colour on the left of your screen. In the drop down menu select Vertex Color. Change alpha to 1 and make sure the color is black (should be by default).
  • Now unhide everything by pressing \.
  • Cut and paste the second layer back into your first layer.

All done! Now repeat steps 3 to 10 for your other blends

Simple Vertex Colouring in Lightwave (for STUFF models)

  • First you need to make a vertex color map. Click the Map tab at the top, then New Color Map on the left of your screen, and press Ok.
  • Using the surface editor (F3) click the Advanced tab for each of your blends and set the vertex color map to the color map you just created.
  • Select the points you want to have vertex coloured, click the Map tab at the top, then Point Color on the left of your screen. In the drop down menu select Vertex Color. Make sure you set Alpha to 1.0, then set your desired vertex RGB colour:
    • Note: With STUFF models, black means it will not animate at all while white will animate as much as possible.