Monday, September 28, 2009

Textures, textures, textures!

Something that has become more and more apparent to me through my experiences with games and other 3d mediums is the unbalanced (and largely unrecognized!) importance of textures.

When a designer decides they want to create a realistic looking 3d scene, they will no doubt first stress the detail of the model; is it accurate in shape and size? Are the nuances of edge, smoothing, thickness, curve, and definition being modeled correctly?

Next, the person will no doubt turn to lighting as the second ingredient in creating a real-looking scene. If there are no shadows or highlights, we'll end up with a very fake, flat-looking scene that won't look convincing at all.

So, once the model is built, and the lighting is cast, the creator steps back at the clay render and says "yeah, that looks great! Now I just need to slap a texture on."

And then they end up with something like this:


This is a case where the model is quite satisfactory, but the result still looks like Nintendo 64 crap. Why? Because a sword's textures look nothing like what we see.

In fact, textures appear to add to realism more than the model itself does. For example, take just a simple, basic hut model:


Now, what will this look like once it's textured? It's easy to imagine it going the route of the sword above. But instead, the artist here has paid extremely specific attention to the textures, no matter how simple they appear to be at first glance. And so the result we get is:

Stunningly realistic in its simplicity.

A HUGE pet peeve of mine is when people will put dark lines or shadows in their color maps in order to simulate depth (think of any crate from an old Quake game). That is the job of the lighting and shaders! In real life we don't find shadows "painted on" to objects... so why would we do this in a game? I can understand doing this maybe 5 years ago, but since then real time lighting and shader depth in games has improved to the point where there shouldn't be a need to fake color maps any more.

A great model with great lighting will look terrible if its texture doesn't accomplish the same look and interaction it would have in real life. Taking a picture of a bumpy wall in real life and importing it into a game will end you up with an unrealistic, flat, bad-looking wall. Why? In real life, objects are already being hit with light that wraps around their 3-dimensional attributes. When you throw a picture of something that already includes rendered light on a 3d surface into a game, that game is now going to treat it as a flat surface, and the result will LOOK like a flat photograph in the game. You don't want a bedroom with photographs of wallpaper glued to the walls; you want a bedroom with wallpaper. You don't want a treetrunk with photographs of a tree glued to it; you want a treetrunk!

This means thinking about textures in different ways. Use color maps for raw colors... use bump maps, models, specular maps, and lighting for depth and realism. Don't paint light onto color maps, or you'll end up taping photos to walls.

1 comment:

  1. One temporary amendment to this would be ambient occlusion, which does in fact make things look substantially better when baked onto a diffuse map than without. However, games are starting to implement better and better AO (see Unreal Engine 3.5, Cryengine 2, etc) so it's only a matter of a few years before this technique becomes unnecessary. (Besides, as of now it's somewhat strange for AO to be baked onto objects themselves, but to be absent on the seams between two different objects.)

    ReplyDelete