Making A Texture Set

From Team Blur SDK Wiki

Jump to: navigation, search


In old games, surfaces were given texture detail by applying color textures of varying scales and sizes to polygons. While primitive, they gave off a nice result when used in conjunction correctly with simple geometry. In OverDose, surfaces are made up with a bare minimum of three textures. It's possible to miss out on some of these stages, using the built-in textures for them instead; however, that may cause a very strange effect so it is always recommended that you make your own media. Sometimes you may wish to only use one texture for the entire effect. That's perfectly fine, however remember that it may produce a full bright image in-game. Let's get onto the textures and what they do:

Contents

Normal Map

Normal maps are quite difficult to understand on first glance; after all, they look like a mess of color, how could anything ever be obtained from them? Well, ignore it. Ignore what the texture looks like; once you have it, it's done. Making your normal map is the difficult part. I prefer to use renderBumpFlat from the Doom 3 or Quake 4 console. This takes a high poly model, and renders a normal map texture for use in-game. This will be the method the tutorial will focus on.

Normal maps use a _local suffix (ie: textures/common_floor/panel_local.tga).

Diffuse Map

Put simply, this is your base color of a surface. It doesn't matter if your model has insane local geometry. It wont look anything like your vision unless you give it base color. While many, many people prefer to work with a simple diffuse map with no lighting or shadowing on there at all (basic detail), you can vastly improve the overall look of the scene if you add little shadowing detail to your texture. This can appear to make your textures pop more.

Diffuse maps use a _d suffix (ie: textures/common_floor/panel_d.tga).

Specular Map

Vastly under rated, the specular map is one of the most important images in your set. While diffuse paints basic color information, specular is how your texture reacts to the light. A good specular map can make your texture look totally different under a different lighting or viewing angle. For example, take a look at metal. Dead on, it's a dull, slightly shiny surface, but look at it on an angle, and the texture suddenly comes to life. When coupled with good normal maps, specular maps will really make your texture stand out. Specular maps are made using either grayscale information or color, the former giving a slightly more fake plastic like look. The darker the pixel, the less it shines, and vice versa. This means for, say, rock, you would have an overall dark texture, but for tiles on a kitchen wall, you would have quite a bright one. It's always best to experiment with this stage and leave it last.

Specular maps use a _s suffix (ie: textures/common_floor/panel_s.tga).

Making A Basic Texture Set

Before you do anything, remember that all surfaces need to use material definitions. While OverDose is capable of generating a default material for most textures, it's always best to define a material yourself. So, before we even begin to make the texture, let's take a look at the material:

textures/common_floor/panel
{
    qer_editorImage textures/common_floor/panel_d.tga

    bumpMap         textures/common_floor/panel_local.tga
    diffuseMap      textures/common_floor/panel_d.tga
    specularMap     textures/common_floor/panel_s.tga
}

Obviously as you can see by the texture names, bumpMap points to your normal map, diffuseMap points to you diffuse map, and specularMap points to your specular map. The qer_editorImage keyword points to a texture for the level editor to display, so we can just re-use one of our other textures for this. It can be anything at all, even a blank texture.

Now that we have our material in place, let's get onto making the actual assets.

Making The Normal Map

3D View (With Floating Geometry)
Top-Down View

Before we begin, let me state that there is no set in stone order or method to working with any of this. Do whatever you feel easiest doing. This is one way and it happens to be easiest for me, so just remember that. There is also no order to doing things, however, again, this is easiest for me and many people so you may find it better.

The first thing we need to do is make a normal map. The reason I make this first is quite obvious. I can't make a diffuse map, if I don't know where the geometry is. And I can't make a specular map for the very same reason. So, without further ado, lets get cracking.

Open your model editor of your choice. Yes, model editor. If you got to this stage thinking you can just use the NVIDIA Photoshop filter then shame on you, because while it does produce on the odd chance some good looking things, it's also not for here. So, open your model editor of your choice. We need to think about what we are doing before we start, so before you even make a vertex, stop and think. Remember that Doom 3's renderBumpFlat takes information from directly in front of your surface, so if you hide things, they wont be seen, which can be a pain. However it's also a godsend, because it means you can float geometry above each other to save time. Why waste time in stitching it all together when it's the same result? I'm obviously not going to cover making the model here, but what I can do is show you the process.

One thing I will mention is that all engines these days use power of two textures. What this means is that you take a number from the list below as your X size, and then take a number from the same list and use that as your Y size. Don't use any other sizes, otherwise it will auto sample it down to the next available size from the list below. In other words, it will reduce texture quality and actually be a bit slower. It's actually much better and sharper to use a 128x128 texture instead of a 240x240 texture. The available sizes are:

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096

You should never ever really need to go over 2048, even 1024 is more than fine 99% of the time. Remember that textures are not cheap, a 1024x1024 TGA texture is 3 MB. And you need to use at least three of these (although specular maps can usually be saved as a grayscale image). So that's around 9 MB for texturing a single surface. Use texture sizes and space wisely.

Now the reason I hit on texture sizes is because when you're making your high poly model for rendering the normal map, remember that we will be using power of two textures. In other words, keep the scale of your model perfectly to the power of two at all times. Otherwise, the scale will be off when we render it.


Using Doom 3 RenderBumpFlat

Normal Map

So you have your ultra sexy high poly model, and it's to the power of two, and you're ready to rock. Well, the next step requires Doom 3 or Quake 4. The process is the same between the two, so I'll refer to Doom 3 only from now on. Open your model, and save it as either ASE or LWO under Doom3/base/models. Anywhere will do, it can even be right there. In fact, I'll presume that you called your model panel.ase or panel.lwo and that it's saved as such: Doom3/base/models/panel.ase or Doom3/base/models/panel.lwo. Now that this is done, we're nearly complete with the normal map stage.

Open Doom 3, pull down the console with the ` key and type:

renderBumpFlat -size 256 512 models/panel.ase

Or:

renderBumpFlat -size 256 512 models/panel.lwo

Now press enter. The process should take a little time, nothing too much, it all depends on the model polycount and texture size.

NOTE: The -size 256 512 is the X and Y scale of your texture. This is your choice, but please, remember to keep it the level that's really needed. We don't want to waste memory.

Now, the resulting normal map will be located in Doom3/base/models and will be called panel_local.tga. That's pretty much it for the normal map stage, but not for our model. We can use quite a few tricks using the model now to get geometry detail to the diffuse and specular maps.


Making The Diffuse Map

Different Geometry Shapes

Remember how I said we can use the model from before to get general geometry detail? Well, I managed to do this. The method is up to you.

Now thanks to the amazing side effects of JPEG compression, the image on the right looks a bit naff. But my actual image is 512x1024 in resolution and 100% pixel perfect. I used four times the resolution because when I sample it down a bit, it will soften slightly and give a finer, more pixel perfect look.

Unfortunately, this isn't an actual "how you make the textures" tutorial, so I won't be going into detail on how you make them as such. But I will give you a general idea on the process you should be following, at least how I follow it. So if you're confident on how to actually make the textures, please by all means skip this and move onto the next step. Otherwise, carry on reading.

Now the way I see it, this model is split into three sections. We have our metal base, we have our central section, and we have our screws. Or, in other words, from the outside in, we have the black and red as the metal base, then we have the white and black as the inner central section, then we have the blue as our screws. So, let's work on the metal base.


Metal Base

First of all, pick a decent metal texture, and make sure that it tiles correctly. Because this texture doesn't have any edges, it needs to tile, otherwise it just looks odd.


Metal Base With Basic Shadow

Now we need to paint some basic shading. This is to give us a very simple area to know where our actual bends, and as I said before, a tiny bit of paint shadow looks quite nice in-game. So, using our red layer, we can darken the section slightly (when working with normal maps and fake lighting like this, we give it a uniform, lit from front light, so anything that dips into the model, or lowers, is darker and anything that sticks out, or higher, is lighter).


Metal Base With First Buff Layer

Our next step, is to buff up the outline ever so slightly. Metal, as a rule, has slightly lighter edges right on the corner as well as scratches. So first, lets add our first buff layer.


Scratches

Now lets add our scratches. Now the way I prefer to do scratches, is to paint them as white on a black canvas, and load them into a separate layer. This means that you're not painting directly onto the surface, and you can make the scratches lighter or darker depending on your need. The other benefit is that with it being a separate layer you can make this a very bright section of your specular map later.


Diffuse Map With Scratches

Using this, I load the texture into alpha and highlight the scratch areas on the diffuse map. I then expand the selection by 1 pixel, and darken it slightly to fake a little depth.


Final Metal

Let's finish up this section. Just clean it slightly, adding a little more height and texture variation if you like. For this tutorial I simply highlighted it a little more and removed the redundant section. Remember that the diffuse map is a simple texture for color mostly.


Final Center

I'm moving onto the actual center part now. I wont cover everything again, I used the same stuff as before.


Outer + Inner

Now we need to combine the two. I find that giving the highest layer a slight shadow onto the lower usually results in more fake depth, which can be good.

So let's look at where we are so far. We have our outer metal trim, that tiles so that the texture won't look out of place when on a larger scale surface, and we have our inner metal section, all of which is, so far at least, detailed enough for a diffuse map.


Screws

Adding the screws is actually quite a simple thing to do. Because normal maps tend to distort smaller detail, we don't need to detail the screws at all really. Let the normal map take care of that for you. All we need to do, is texture the correct area where the screws are, and give them a bit of fake shadow again.


Diffuse Map

Finally, let's add a bit of dirt to it as well to get it looking a bit more dirty and life like. Again, the method you use is your call, I tend to use a slight brown color to simulate dirt and wear:

That's probably as far as I'm willing to take the diffuse map.


Making The Specular Map

Specular Map

Once again, you're probably getting fed up of me saying this, but it's up to you how to make things. Use what method you work with best. I'll just point out things I found that give me slightly better results, so you can test and mess with them.

Remember that specular maps tell the engine how much a given pixel shines. White is bright, black is no shine at all. So using that basic principle, we should set up our specular map according to how much metal should shine. We should also highlight edges, because they tend to shine a little bit more and it tends to give off a sort of fake curve. Plus, we should also as strange as it may sound, brighten any indents, because it seems to give them a little bit more oomph. Lastly, we want to add a little bit of extra detail not contained in the diffuse map so that it can shine a little differently in the light.

There really isn't much left to do. You may notice it's slightly tinted blue, that's because metal tends to look slightly better when it shines with a tint of blue at extreme angles. Again, feel free to mess with this.


Finishing Up

Well, we're done making a basic texture set. I suppose it's best to check it in-game, so let's give it a go. Place all the textures that you made (normal, diffuse, and specular) in your base/textures/common_floor directory. Now everything is done and ready to go, so go ahead.

Final Result

The term "final result" is a bit of an odd one, because always remember that textures are never final, you can always go back and improve. The texture example here is used only as a quick example, I can always go back and polish.

Personal tools