Right Tools for the Job

I have a rich set of tools that I use for game development. I love making 3D games. One of the most fulfilling (and some would say hardest) elements of this is the creation of good original 3D models. More difficult still is the colouring (texturing) of those models. In fact it is the later stage that I enjoy most. 

So I thought for this blog I'd share with you a recent attempt I've made to create some 3D content for my current game project "Vindex". It's an arcade first-person combat sim. And, of course, I need some good looking weapons for the game!

To begin with, I use Blender to create the basic 3D model. It has been around for a long time. Its Open Source and (as far as my usage is concerned) has been one of the most stable open-source software packages I've used.  

I tend to start with a simple primitive (in this case a cylinder) and use the extrusion modifiers to get the basic shape I want.

 Plasma Blaster - Extrusion of a core cylinder shape

Plasma Blaster - Extrusion of a core cylinder shape

There are plenty (1000's) of tutorials on using Blender. I can't short-cut your learning curve, but try and use tutorials that a recent (open source packages do change and I have found some of the older tutorials on-line a little misleading against the latest version of Blender). People often criticise the software for the less than intuitive user interface. I must admit, you do need to practice and try to remember some choice short-cut keys! follow those tutorials and basically tough it out.

Blender has an extensive capability beyond my simple uses for in-game models - Just check out the web site. Truly amazing what can be achieved (when you know what you are doing).

The trick is to try and keep the face (polygon) count low. The fewer facets your graphics card has to draw in the game, the faster it will be. Once you have finished modelling, you then need to UV map the model...

 Plasma Blaster - Ready for UV mapping

Plasma Blaster - Ready for UV mapping

UV mapping is where the vertices (the corners) of your model's faces (polygons) are mapped in 2D to a texture map (a flat image). Thankfully Blender gives you a few tools to do this (See "UV Unwrapping"). You can also manually tweak the automated UV mapping to get the best results. One of the key tricks here is to indicate where you want the "seams" to be. If you can imagine the surface of your model as a garment (a skin), you can select certain model edges (The lines that join up vertices) and indicate they are a "seam". The idea is that the algorithm that unwraps the skin will flatten and split (cut) the mapping using the seams. Just like a garment dress pattern, the texture mapping is a collection of 2D segments that (when stitched together) become 3D.  

With the UV's mapped to a 2D texture map, you can then think about drawing (painting) the texture. This is where things get damn complicated. Drawing straight on to the texture is really hard. If you can imagine a dress pattern with lots of 2D segments. When you draw on to those parts, you have the unenviable challenge of matching the shapes and colours across the seams - So when it is all stitched together, it looks (of course) seamless.

Instead, you can use a 3D painting tool to paint directly on to the model (which in turn is drawn on to the underlying texture). It is the model and the texture images that you later pull in to the game to render with. Now you can do such painting in Blender. Once again, there are lots of tutorials to see how this is done. I've endeavoured to use a different tool (that inspired me to write this blog). The new tool (to me) is called "3D Coat". 

 3D-Coat - Paint the UV mapped surface of the model

3D-Coat - Paint the UV mapped surface of the model

3D-Coat makes painting objects with PBR materials really easy (As wikipedia describes it;  Physically based rendering (PBR) is a subset of computer-generated imagery that aims at the production of pictures while making use of physically based shading derived from empirical shading models.). You can create your own or (like me in this example) use one of the many PBR "Materials" that came with 3D-Coat.

Layering is the key. This particular model was first painted with a base metal looking layer. Then, using the layering capabilities of 3D-Coat, painted using PBR based "paint" coatings. These use procedural noise routines to automatically weather sharp edges. Awesome!  Layered over this are various choice decals. Finally, I manually "weather" the paint layers, erasing to make scratches, add dirt, etc. 3D-Coat also helps with normal and height-mapping. This is where light reflection tricks are used (in a game) to add more surface detail (bumps and divets) without increasing the face (polygon) count. In essence, as you paint, the brush you are using adds or subtracts height from the surface. So, panels, rivets, and undulations are easily added to the model. I've found the tool has (for me) taken my content creation and game development pipeline processes to another level. 

The final look (when in the game) is pretty awesome?... 

 Vindex - Screen grab showing the PBR shaded model in-game

Vindex - Screen grab showing the PBR shaded model in-game

So, I think these are the right tools for me. I hope this has also given a few pointers to anyone else starting out in game development. 

Links to the tools used:

Blender - for Creating your 3D model, UV mapping and texture painting (open source)
The Gimp - for 2D image creating and editing (open source)
3D-Coat -  A commercial (paid for) software package for PBR model painting

Happy modelling :)