Back to the Glossary     Submit a Suggestion     RT3D Links     Revision History     About the Author    
 

An Artist's Real-Time 3D Glossary

Texture Blending Examples

 
 
Texture samples
 
                    
base map                   tiled base map                                    light map
These textures are being used to represent the different ways texture blending works. The first is a simple brick tile (left), which is being used as the base map. It has been tiled to create a brick wall (center). The color gradient (right) is being used as the light map, since a color gradient will show more clearly the differences between blending methods.

One of the beauties of texture blending is that the base map can be a really small tiling texture. If you've designed a good light map, it will provide enough variation to the surface that you won't notice how much the base map repeats.
 
Additive
 
The values of the light map ADD to the values of the base map, using the additive color model. Notice how the lighter colors at the top of the light map brighten the base map, but the darker colors have less effect.

Here is the math formula to help you figure out what is happening. If you have a base map that is pure green (0,1,0) and a light map that is pure red (1,0,0), the blended map will be pure yellow (1,1,0).


 (0,1,0) green
+(1,0,0) plus red
=(1,1,0) equals yellow


But the numbers never go above (1,1,1). If you blend pure yellow (1,1,0) with pure pink (1,0,1)-- the result won't be (2,1,1) --instead it will just be pure white (1,1,1). No RGB values can go over 1.

 (1,1,0) yellow
+(1,0,1) plus pink
=(1,1,1) equals white, not (2,1,1)
 
Average
 
The values of the light map are averaged with the values of the base map.

Here is the math formula to help you figure out what is happening. For example we have a base map that is pure green (0,1,0) and a light map that is pure red (1,0,0). If we blend the red at 75%, then the green will show 25%. The result is a dull orange (.75,.25,0).


100% red
100% green

  (0.75,0.00,0.00) 75% red
+(0.00,0.25,0.00) 25% green
=(0.75,0.25,0.00) dull orange

 
Invert
 
The values of the light map invert the base map values. The brighter parts of the light map invert the colors more. Black doesn't invert at all.

I don't fully understand invert blending. Why does this sample look wrong? I am trying to simulate it with the Photoshop layer effect "difference." Is the light map usually only grayscale, because colors don't work with the math? What effect does a colored light map have when it is invert-blended?


 (1,0,0) red base map
+(1,1,1) white light map
=(0,1,1) cyan result?


What math formula is used to invert the colors?
 
Multiplicitive
 
     
I'm not sure if I understand the multiplicative blending method. I think it is similar to the additive method, except you add in a third value that cranks up the "heat" to make colors even hotter than straight addition would do. How is this value usually expressed? A straight 0 - 1 scale?

Or is it just a straight formula to multiply the colors? What is the difference between subtractive and multiplicitive?
 
Subtractive
 
The values of the dark map subtract from the values of the base map, using the subtractive color model. Notice how the darker colors at the bottom of the light map darken the base map, but the lighter colors have less effect.

Here is the math formula to help you figure out what is happening. If you have a base map that is pure green (0,1,0) and a light map that is pure red (1,0,0), the blended map will be pure black (0,0,0).


 (0,1,0) green
-(1,0,0) minus red
=(0,0,0) equals black

Doesn't make sense with this formula. What calculation is used to figure it out?

A good use of subtractive blending is to be able to use a color other than black for an explosion's blast-mark, while insuring the mark is always darker than the floor. For instance, say I use a dark red color for my blast-mark, and I use Average blending. It would look fine on a light-colored floor, but as soon as I make an explosion on a black floor, the mark would be brighter than the floor. I could just use a black mark, but that's boring. On the other hand if I used Subtractive blending, the dark red blast-mark would always darken the floor under it. On a nearly-black floor, it would be darker than the floor, but it would still have some red in it. Cool.
 
 
Back to the Glossary     Submit a Suggestion     RT3D Links     Revision History     About the Author