Thursday, 1 October 2009

Creating metal surfaces

 wrote this short text some time ago to help people when they were creating metal surfaces and thought it could do with being reposted here. I've also added a section on reflections at the end so without further ado...

Creating metal surfaces

This is just a couple of things I keep in mind when creating metal surfaces. They are by no means set in stone, it's just a few things I've noticed might help when creating metal surfaces for next (well, current really) gen use.

The most common problem with normalmaps for metal is that it's easy to overdo it. Depending on the engine you are using, you might not be able to get sharp, crisp normalmaps unless you use fairly large texture sheets so for the most part, the fine grainy detail will have to be left to the specular. Scratches and such do work however and usually need to be in the normalmap to make it look convincing (just keep in mind that texture compression might ruin the really fine scratches, those that are just one or two pixels wide).

Below is a compilation of different types of painted metal surfaces:

As you can see, painted metal can look very different depending on what type of paint it is and what it has been subjected to. It's important to decide what type of paint your surface has been painted with since it will affect both the normal and the specular maps. Having a history in mind when you create the textures is useful since it will help you decide how to treat it. Is it an old surface with lots of scratches, new with a few dents, so old the paint has started to flake, was it painted without being cleaned up first so you have really lumpy paint, has it been polished often? Having a history will also make the object look a bit more interesting rather than "generic metal box #6". This is of course not mandatory, it's just a mental exercise that might help when creating the textures. I should add that having a history in mind works for any kind of texturing, not just metal surfaces.

A common mistake is to create a normalmap that has a lot of noise in it but this makes the surface look more like leather/elephant hide than metal. If the texture is a 2048 instead of say, a 1024, the noise might have looked more like the grainy paint above but in most cases, it won't look like convincing metal. What I would do is to tone the noise down considerably and just keep the scratches where the paint has been scratched away to reveal the metal. What we need to keep in mind however, is that scratches that are just a few pixels wide will most likely look lumpy and not very pretty once the texure has been compressed. So keep larger scrathes, dents etc in the normalmap but be careful with the finer detail.

In addition to that, a specular with fairly high contrast can work well since paint is usually fairly matte and non-reflective (there are of course exceptions, it is as always down to what type of surface you want to mimic) whereas scratches can be very shiny since the metal surface beneath the paint shows through. Another little tweak can be to make the diffuse colder. Sometimes a texture can have a fairly warm feel, with brown and almost light orange tones as a base which can make it feel slightly wooden. By simply changing the hue on the base colour layers so they are more blue-tinted it can feel more metal-y. It's a cheap trick but it works. It is also important to tweak the specular curve of your material since the way a game engine renders the light shining on your material can have a large impact in addition to your textures.

When it comes to the specular, it's almost better to put a lot of the fine detail there rather than in the normalmap for the reasons outlined above. Some detail needs to be in the normalmap and mimicked in the specularmap, such as scratches while otheres shouldn't be in the specular at all. One such example is if you have a plain metal surface that has been dented. Again, this depends on what kind of effect you want. If it's a recent dent, there won't have been time for dirt and dust to collect so it hasn't become dull yet. If it's an old dent, it will be less shiny than the surrounding areas since it won't have been cleaned as well as the rest of the surface. And just to add to the confusion, some things should be in the specular but not the normalmap such as oily surfaces, grease marks, handprints etc. This is where the idea of having a history of the objects comes in handy again. Has the object been manhandled a lot, dropped, left to stand in an oilslick etc. All these things combine to make the surface look interesting and if you put the right detail in the right map, it will look fantastic.

Of course, metals need to reflect something so having a good reflection map is the last piece of the puzzle. Here is where it can come down more to what looks good than what it would realistically reflect. Unless your surface is very clean you can get away with using a reflection that doesn't have anything to do with the setting. As long as it looks good, that's all that matters. It's also down to memory usage. If you take a cubemap for example, it's made from six separate images so the memory usage is fairly large for just a single cubemap. If you can reuse one cubemap on many surfaces you'll save memory which can then be spent on other things, such as higher resolution textures on selected objects. As always it's a trade off between what looks good and how much memory you have left for the shiny stuff. That's also why slightly dirty, painted metals is a bit easier to cheat with, you won't get a clear image of what the reflection looks like. Clean environments are always harder to get to look good and interesting in my opinion. By the way, a very good example of succesful clean environments is Mirrors Edge, it has great usage of lighting and a very clean style. Well worth a look for the visuals alone (apart from some of the fighting sequences, it's a good game in my opinion).

Since this whole text is about metal surfaces, I have to mention Dead Space. It has a very well designed look and the way they use specular and normalmaps in that game is almost exemplary of how to do metal surfaces right. The normalmaps are clean, crisp and there is very rarely any noise in them. It is a very well made game, excellent design on pretty much all levels. Great atmosphere, lighting, texturing and a good story with good voice acting. Speical mention goes to the integrated HUD and the sound design as it is, in one word; amazing. Playing it with headphones late at night was an expereince I won't forget any time soon. As an example of Dead Space texturing (and a cheap way to get more images into this post), here are two screenshots that show their restrained normalmaps and nice use of specular. It looks a lot better in motion, and the lighting is pretty much all dynamic so you'll see some really nice effects all through the game

Until next time...

No comments:

Post a Comment