Image Quality Explained

by Ga'ash Soffer on November 7, 1998 2:59 PM EST

Multitexturing, blending, etc.

Introduction

The second big thing in 3D is lighting. While 3D accelerators can perform gouraud shading, this form of shading is relatively inaccurate, and old. Many current 3D games such as Quake2 and Unreal use a better method of creating realistic lighting, multitexturing. What is multitexturing? Find out...

Multitexturing

Multitexturing is blending two textures to get the color or the pixel to plot. Multitexturing is very useful because programmers can blend a brick wall, for example, with a lightmap (a texture which acts as a light) and achieve a lighted brick wall using multitexturing. How are the two textures blended? That depends on the blending mode. There are quite a few blending modes available, and to be honest, I don't know exactly what a single one of them does, if anyone can help me out here, e-mail me. My engine actually supports a form of blending (the wooden wall in previous pages' snapshots is actually a wooden wall blended with a lightmap i made using lens flare.) , take the first color add the second color, and shift right 1 bit (i.e. divide by 2) Simple, and not only that, it works. (well, it does what I expected it to do) Here are examples of the effects of this primitive form of blending:

Original texture

+

Blended texture

=

Multitextured Polygon (smaller and crooked becuase i took snapshot from engine)

While this may not be the most accurate way of blending two textures, it gives you a good idea of how multitexturing works. There are numerous blending modes used in games like Quake2, Unreal, etc. These blending modes dictate how the two textures should be mixed, i.e. should the dominant color be perhaps the blue from the water? or maybe the brown from the wood? I'm sure there are many other blending modes which do all sorts of cool things.

Why Lighting using Multitexturing?

The reason the latest games use multitexturing effects to emulate lighting is because the lightmaps can be precalculated "perfectly" and when blended the lighting effect will be "perfect". Currently all real time algorithms for lighting calculations are approximations, and the latest games which want ultimate realism do not wish to settle for lame approximations! Using lightmaps and multitexturing, game programmers can precalculate the light as they would like it, blend the texture with the lightmap, and *poof* the texture is "magically" lighted. Multitexturing can be used for other cool effects, like what I did (err, what I tried to do, make the wall look like it was covered in water). The reason my wall turned out to be green is because my blending mode is not the one which I should have used. (Well, I could have fiddled with the colors of the water (i.e. make the water brownish) so that way it would keep the color of the wood somewhat)

So now we know that hardware can do some many things. What can't hardware do? Let's find out...

Advanced Texture Mapping Hardware Limitations
Comments Locked

0 Comments

View All Comments

Log in

Don't have an account? Sign up now