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.


CEDEC 2007 presentations

Following the Lost Planet technical presentations, I found out some other presentations on Tri Ace research web site. Unfortunately, I don't have the slightest notion of japanese....


VRay exposure control formula

While browsing some code, I remembered that I wanted to share some code reproducing VRay exponential exposure control.

I had to work out the formula myself as I did not find any documentation about their 'dark multiplier' and 'bright multiplier'.

This is what I eventually found out (GLSL code) :

uniform float exposure_gain;
uniform float exposure;
uniform float dark_multiplier;
uniform float bright_multiplier;

vec3 exposure_control(vec3 base_color)
vec3 dark = vec3(0.5) - base_color;
dark = 0.25 - (dark * dark);
vec3 bright = base_color - dark;

vec3 color = dark_multiplier * dark + bright_multiplier * bright;
color = exposure_gain * (vec3(1.0) - exp( -exposure * color ));

return color;

Edit:: to those you that come here by accident, looking for 'vray' and 'sea', all I can tell you is to look at this, even though it is probable that it won't help you !


Spherical harmonics tryout

Today, I finally took some time to experiment with spherical harmonics ! It is a logical progression as I was toying with irradiance cube maps.

For now, SH only permitted me to build those cube maps faster, and to get rid of the noise generated by GI sampling, but, hey ! It's a start !

I mainly referred to 'standard' SH resources ::
Hm, I really gotta keep moving towards more data driven rendering code to have, hm, let's say, SH compressed signal as a mesh attribute !...