Gamasutra: The Art & Business of Making Gamesspacer
The Power of the High Pass Filter
View All     RSS
December 10, 2018
arrowPress Releases
December 10, 2018
Games Press
View All     RSS






If you enjoy reading this site, you might also want to check out these UBM Tech sites:


 

The Power of the High Pass Filter


May 23, 2001 Article Start Previous Page 3 of 4 Next
 

Using High Pass with Tiling Textures

If you've ever worked on textures, especially those needed for large, open 3D landscapes, you most certainly know how tedious it may be to get together a texture that not only tiles seamlessly, but also doesn't repeat very visibly. (Hayden Duvall shows some excellent tricks to break 3D scenes' repetitive textures in his "The Right Kind of Beauty" feature, but that ground has already been covered.) No matter how perfectly seamlessly you manage to tile the texture's edges, the problem often is that any larger dark or bright area in the texture (that is, low frequency detail) will repeat very visibly if the texture is tiled many times over.

Hunting these flaws in the texture is known to have driven many an aspiring texture artist crazy. It may have been necessary to Burn here, Dodge there, review the result, try again, over and over again, until you conclude you've spent too much time and must move onto the next texture. Or, you can save yourself a lot of work hours, gray hairs and headaches by simpy using the High Pass filter followed by the brightness/color restoration procedure.

It is actually recommended to apply the High Pass filter before you begin making the image edges tile seamlessly, since very often the large low frequency detail clips at the edges of the texture - which, if offset and wrapped around before high pass, creates high frequency detail the filter doesn't fix. High Pass filter ensures that all the edges of the texture are roughly of the same luminosity. This makes the wrap-around tiling process much easier.

FIGURE 7. While the texture may tile seamlessly at the edges, it may still repeat when tiled several times over, due to low frequency detail.


FIGURE 8. The same texture after high pass treatment.


FIGURE 9 (left to right). 50% offset texture without High Pass; same texture offset after High Pass.

Not only textures benefit from this, but also web page wallpapers. Every self-respecting web page designer knows that too repeating and high-contrast wallpaper makes the text on top difficult to read.

NOTE: Keep in mind that High Pass only works with relatively homogenous texture surfaces. If the original bitmap has very large, sharp-edged brightness differences or a prominent piece of detail, such as a very dark sign on a bright wall, the filter does more harm than good.

FIGURE 10. A warning example: as you can see, High Pass won't work in every situation.

Also, if you've taken a photo of a very shiny surface head-on with a flash, no filter in the world can remove the blaring highlight.

Removing Flash Highlights from Texture Photos

Using digital cameras to grab textures from real life introduces a whole new set of problems. Let's say you find a wonderfully filthy concrete wall in a dark parking garage, which would work perfectly in the gritty urban setting of your game, and want to take a picture. The problem is, that due to the lack of light (and a tripod), you need to use the flash. Knowing that the flash may cause bright flaring reflections if you take the picture facing the wall straight, you shoot at a slightly odd angle. While the results are now bright and crisp, there is still a very visible gradient-like highlight in the middle of the picture, reducing the usable area of the texture.

FIGURE 11. A highlighted wall photograph.

What many people would think to do in this situation, would be to:

  • Create a selection with a gradient tool, and adjust the luminosity of the selected area, or
  • Painstakingly Dodge the edges of the picture, until the overall luminosity of the texture is evened out

However, both these approaches mean a lot of work, and do not always provide perfect results unless you're willing to spend hours.

This is where the High Pass filter comes in handy. Simply run the filter on it, using a large radius. The rule of thumb is that the radius of the filter should be larger than any detail you want to preserve. Since in this case the detail to be removed (the highlight) is almost the size of the whole picture, feel free to use a radius well above 70. Note that the larger the radius, the longer it takes to process - just as with Gaussian Blur.

FIGURE 12. The same wall texture after High Pass (pale).

As you can see, the High Pass filter not only reduces brightness differences, it also reduces the contrast of the image, paling the colors (this is actually a side effect of filtering, as only part of the signal remains). This often undesired effect can easily be removed by selecting "Fade High Pass" from the Filters menu (or Edit menu in Photoshop 6), changing the layer mode of the fade to Luminosity, then clicking OK. This applies the brightness-changing effect of the filter while retaining the colors. Also at the same time, if you find the effect of the high pass filter too drastic, you can reduce its Opacity.

FIGURE 13. The texture after Fade High Pass.

Since a lot of contrast was lost in the process, finalize the picture by increasing the contrast (or adjusting the Levels, depending on the case) until it looks good, then Fade the contrast effect once more with Luminosity to retain the coloring of the original image. See the difference? Feel the difference of not having had to do extra work?

FIGURE 14. A much more manageable source picture.

Creating a texture out of this picture is much easier than the original.


Article Start Previous Page 3 of 4 Next

Related Jobs

Petroglyph Games
Petroglyph Games — Las Vegas, Nevada, United States
[12.09.18]

Sr. Technical Artist - Rigger, Command and Conquer
Sucker Punch Productions
Sucker Punch Productions — Bellevue, Washington, United States
[12.07.18]

Cinematic Animator
Cignition
Cignition — Palo Alto, California, United States
[12.07.18]

Game Programmer
Charlie Company
Charlie Company — Culver City, California, United States
[12.07.18]

Senior Unity Programmer/Artist





Loading Comments

loader image