10/28/2007

Texture atlas gaps filling

I've come to change my gaps filling default algorithm for my generated atlas textures (mainly light maps).

I was not satisfied of my previous algorithm that did some dumb iterative texel replication of the nearest non-empty texel. This process lead to visually satisfying results when using the resulting textures, but the iterative process was too long on big textures (above 4M texels).

I tried to implement something like pull-push method, which turns out to have a better performance.

I'm quite glad with the results, except for the first texels at the immediate border of the charts boundaries. As my rasterization process is not exactly perfect for texture generation (it was designed for screen rasterization, and the rounding rules does not match texture access rounding rules), those texel are unfortunately visible during rendering...

I suppose I will try to mix both worlds : have a few iterations of border "fattening" followed by the pull-push gap filling...

Eventually, when I have some time, I'll change my whole texture atlas rasterization process to improve accuracy ; I'll perhaps follow the leads open by Casey Muratori's work for Granny 3D.

No comments: