The first time I tried the .NET Framework was for a "throwable" GUI project ; I then decided to test the brand new MS Visual Studio 2005 beta 1. The development went pretty smoothly, and I was quite nicely surprised.
Then came MSVS 2005 beta 2, I decided to continue the development with this shiny new toy, hoping that it would fix a few quirks with the GUI Designer - I mainly remember that I had to spend much time to change my code, as some of the API changed between beta 1 & beta 2...
The same reproduced for the final MSVS 2005... I thought it funny to change an API this late in a product life...
I'm now working on another project with .NET Framework 2.0, just started a few weeks ago. Last week, I checked in my changes before leaving the office - everything running smoothly ; the following morning, I run my project to freshen my memories, and... crash...
Huh.
After many rollbacks, head scratchings, reboots, rebuilds, came an idea... what if... what if the message I saw the night before was not so iniquitous - you know the Windows Update message, that tells you not to worry, that your computer will shut down as soon as the updates are installed...
One uninstall of .NET Framework 2.0 SP1 later, everything was up and running smoothly again...
A few hours after that I figured a workaround for the brand new bug (or feature?) in SP1 that reads 'Unable to cast object of type 'System.Reflection.Module' to type 'System.Reflection.Emit.ModuleBuilder'. in the inner code of mscorlib's System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule()
I'm not sure I'm only enjoying toying with .NET...
1/29/2008
11/14/2007
SH experiments continued
My first spherical harmonics experiments were quite interesting ! I managed to include them in production quite quickly, in the form of irradiance volumes.
I currently use a set of volume textures to encode 3rd order RGB SH coefficients. This allowed me quickly have a convincing diffuse lighting on the animated entities in my project. As the lighting in smooth enough, the SH encodes both direct & indirect lighting with good enough results.
I also experimented with SH for other purposes :
I currently use a set of volume textures to encode 3rd order RGB SH coefficients. This allowed me quickly have a convincing diffuse lighting on the animated entities in my project. As the lighting in smooth enough, the SH encodes both direct & indirect lighting with good enough results.
I also experimented with SH for other purposes :
- obtaining convincing specular colors. The preliminary results were interesting but I lacked time to properly integrate this feature.
- obtaining lighting for volumetric lighting effects. While I managed to have some nice atmospheric effects, this method is not directly applicable to reconstruct clearly visible "light beams". Moreover, the ray marching code in fragment shader is quite costly, so for now, I discarded it.
- lighting vegetation planes. This is a nasty hack, but the vegetation now have a subtle view dependent lighting that contributes to reduce a tiling effect ; and the vegetation now better integrates with surrounding geometry.
Libellés :
lighting
11/06/2007
FreeImage lib clumsiness
I've been using FreeImage lib for some years now, always with a bad feeling about the architecture and the scalability of its features.
I keep on using it as I didn't find another more convincing image loading library ; but today I had the proof that my feelings were right !
While loading a small 11x11 32bits TGA file, FreeImage reported it as being FIC_RGB and not FIC_RGBA, thus leading my wrapping code to remove the alpha channel... After a quick investigation, I found out that the 'FreeImage_GetColorType' function, when called, actually scans all pixels of RGBA images, and reports FIC_RGB if the alpha channel of every pixel is 255 !
Uh...
I keep on using it as I didn't find another more convincing image loading library ; but today I had the proof that my feelings were right !
While loading a small 11x11 32bits TGA file, FreeImage reported it as being FIC_RGB and not FIC_RGBA, thus leading my wrapping code to remove the alpha channel... After a quick investigation, I found out that the 'FreeImage_GetColorType' function, when called, actually scans all pixels of RGBA images, and reports FIC_RGB if the alpha channel of every pixel is 255 !
Uh...
Libellés :
image
11/05/2007
Adobe/boost GIL vs. image resampling
After my first experiments with GIL a few months ago, I'm quite convinced that I'll have to take a closer look at it.
My first experiments allowed me to cleanup somehow my image support libs, and the wrapping of FreeImage library.
Having now the objective of a total makeup of my texture generation/compression pipeline, I'd like to have a solid framework to back up my algorithms, that would allow me to be more "data-format agnostic".
I've got to refresh my C++ template metaprogramming tricks as I'll have to face horrendous error messages ; I'll make sure not to drink too much coffee and have some aspirin nearby !
I'll tackle first with some image resampling algorithms, I hoped to find someone kind enough to publish something... Apart the limited resample extension to GIL, I didn't have any luck so far...
I hope GIL will be worth the time I'm going to spend with it ! If anyone who happens to read this have some GIL user experience to share, I'd be glad to be enlightened !
My first experiments allowed me to cleanup somehow my image support libs, and the wrapping of FreeImage library.
Having now the objective of a total makeup of my texture generation/compression pipeline, I'd like to have a solid framework to back up my algorithms, that would allow me to be more "data-format agnostic".
I've got to refresh my C++ template metaprogramming tricks as I'll have to face horrendous error messages ; I'll make sure not to drink too much coffee and have some aspirin nearby !
I'll tackle first with some image resampling algorithms, I hoped to find someone kind enough to publish something... Apart the limited resample extension to GIL, I didn't have any luck so far...
I hope GIL will be worth the time I'm going to spend with it ! If anyone who happens to read this have some GIL user experience to share, I'd be glad to be enlightened !
Libellés :
image
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.
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.
Libellés :
image
10/14/2007
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....
10/12/2007
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 !
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 !
Libellés :
lighting
10/10/2007
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 !...
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 !...
Libellés :
lighting
Subscribe to:
Posts (Atom)