Sunday, October 8, 2017

PROBLEM SOLVING WITH ALPHA TEXTURES


Creating VFX for video games it is a specific direction of CG. This direction requires a specific set of functions from the CG software. Which unfortunately is not yet fully create. That is why, VFX artists are forced to create custom solutions.
In this topic, I want to describe the approach to solving problems with mip levels and filtering alpha textures.
As you know, for game engine the alpha channel is nothing more than a mask for different maps. When you render transparent textures, most rendering software do not take into account the need to generate mip levels for these images or filter them. All those are essentially downsampling, which in most cases produce the appearance of visual bugs.
There are such :
- Unexpected outlines, at the edges of images;
- Color distortion in gradient alpha areas;
- Unexpected changes values in the maps of depth, normals, motion vectors...
I understand how the game engine handles the texture and I sugest an effective solution for this problem. The idea is to build-up the texture on the edges of the mask in such a way that regardless of downsampling, there shouldn`t be visual bugs. Build-up is accomplished by copying information from the edges of the mask and duplicating it to the edge of the image. In this case we will see the correct image until the last mip level.


Let's consider an example of using a solution in the case of a normal map. Below there are two images of normal maps, with extension edges and with regular edges. The last image shows the difference between two normal maps. In our case, we will encounter the most common visual bugs it is outlines at the edges of images.



No comments:

Post a Comment