I wanted to show how I go about creating characters for computer games, so I created a bust of a fictional character to show you how it can be done. In this example I use 3ds Max, ZBrush and Photoshop, but the workflow is pretty universal and would work for most game engines and 3D software.
I have worked with real-time rendering for the past 10 years, but it have always been inside some in-house developed engine, like IO Interactive’s Glacier engine. So I thought I would try to play around with the real-time DirectX® 9.0 viewport render options within 3ds Max, just for fun.
Step 1: Getting Started
Gather as much reference material as possible, find pictures online of the clothing you need to model, take your own pictures if possible. Gather ideas and inspiration, great reference is priceless.
The idea for this character was to create the result of an Army experiment creating low cost amphibious mutants soldiers. Original eh? 😉
Step 2: Modeling
One of the more fundamental parts of current generation games is normal mapping.
To create normal maps we need the character to be built in a high polygon and a low polygon version for rendering in-game. I prefer to start by creating a somewhat detailed model in 3ds Max of the various parts that make up the character.
In 3ds Max I define the basic proportions and I model the parts that I find are more difficult to do in ZBrush like seams and non-organic parts. I try to keep the polygons evenly distributed across the model and avoid triangles. At this stage I don’t bother with UV mapping.
Once I’ve modeled all the parts I put them together in Zbrush and start sculpting.
Sometimes it’s a good idea to exaggerate the details in ZBrush to make sure they stand out. Subsurface scattering shaders and normal maps tend to washout the detail a bit, so don’t be afraid to really go for extremes.
Result of the sculpting:
Once I’m happy with the ZBrush sculpture I will then export the lowest subdivided version from ZBrush into Max and use that as a base for my low polygon in-game model. This way I will get a low-poly model that have the exact same proportions of my high polygon model which will help a great deal when generating normal maps.
I then reduce the number of polygons; how low you have to go depends on the game you are developing for, in this case I have reduced to about 13K triangles. I always keep in mind that the model needs to be animated, so I make sure to have a good edge flow and keep detail where it’s needed.
Step 3: Creating UV coordinates
Unwrapping a character is usually a bit of a chore for game characters because you want to make sure you make best use of the texture space available. When unwrapping you also need to think about where your seams are, certain shaders and normal maps can be a bit temperamental so put UV seams where you can hide them. Use the natural seams in the model and for organic parts put the seams where they are least likely to be seen.
Keep a little bit of space for edge padding/extrusion between all elements, otherwise the parts will start to bleed together when the texture is displayed in lower resolution with mipmapping.
Further more, try to keep all the UV coordinates same relative size to avoid parts of the character looks more low-res than others.
To make UV mapping easy there are a bunch of tools and plugins out there, personally I make good use of UV Master plugin for Zbrush when I Unwrap and just tweak using the tools that comes with 3ds Max.
Step 4: Creating and baking textures
When you have a high polygon model there is a bunch of ways to help get great textures for your character. I will usually start by painting basic color map inside ZBrush directly on the high polygon model.
You might also want bake out Cavity, Ambient Occlusion maps to help you create your texture. You can bake these maps out from inside ZBrush using Multi Map Exporter Plugin, or do it inside 3ds Max using the Render To Texture option.
Here is a examples of maps I baked out to create the skin texture… color, ambient occlusion and cavity map.
These maps can be a great help to get started on the textures, and once your normal map have been generated it can sometimes be useful to multiply a little bit of the the green or red channel into your diffuse map to further enhance the details. Be careful though, baking in too much information will work against the in-game lighting and shadow.
Step 5: Generating normal maps
In this example I generated the normal maps using 3ds Max’s Render to Texture option. The most important when generating normal maps is that your renderer uses the same tangent space as your normal maps were created for. With Hotfix 4 for 3ds Max 2011, normal maps created with Render to Texture now renders correctly within the viewport using DirectX shaders.
It’s not always easy to get great normal maps in the first try, so be prepared to go back and forth tweaking the low polygon model, UV coordinates until you get the result you want.
Some fine details like rough fabric I don’t paint into the ZBrush model, so to get that detail into the normal map I use Photoshop. I simply create the fabric detail as a 2D map and use NVIDIA Normal Map filter to convert that to normals and overlay that into my final normal map. Other tools like ShaderMap and xNormal have similar options.
Here you can see the final maps I created for the Shirt and vest:
Step 6: Viewport render setup
Using DirectX shaders in 3ds Max is very easy, you simply assign a DirectX shader to your model instead of a regular material and it’s renders real-time in your viewport. However, getting it to look good is a completely different task all together.
First of all, DirectX shaders don’t work with the Scanline or Mental Ray renderer. They only work directly in your viewport. They are also highly dependent on your graphics card, particular if you want to render with hardware shading.
The shaders that come with 3ds Max are not very good… instead you should look for some of the 3rd party tools and shaders out there designed specifically for this. Like the 3point Shader, Shader FX or if you feel adventurous and know a bit of programming FX Composer. This way you can build a shader to match your needs. It’s hard to find one shader that does it all, so be prepared to create several different ones.
Here you can see the final renders, which is simply a screen capture from 3ds Max viewport.
Video capture of the viewport in 3ds Max. (frame drop caused by capture tool)
Once you you’re happy with the result, it’s time to setup a skeleton, face animation, blending normal maps, LOD and all the other stuff that makes it actually work inside a game… But I’ll save that for another time.
Thanks for reading, and please leave a comment below if you have questions or remarks.