Tuesday, April 26, 2011

Final Post

I'm just doing my final post with all of the links to everything now:

Saturday, April 23, 2011

Final Fluid Color Composite

I fix the final color composite this morning to add in all of the necessary pieces to get some decent looking water!

I also adjusted the blur function in order to shrink the artifacting happening around the screen-space fluid boundary, so that is a lot smaller. Although the blur isn't perfect its looking a lot better so if I have time next week I will decompose the blur function to make it a little better.

Next step will be to add in curvature flow to the normals calculation instead of just a basic blur, but I will see if I have time to do this as I really need to get finished with my senior design...

Friday, April 22, 2011

Seperate Rendering Passes

So today I completed all of the seperate rendering passes which I will need for my fluid simulation, this includes the addition of fresnel cube map reflections and a refraction approximation using the background texture, as well as a thickness map which I use to create color attenuation through the fluid volume. The video below illustrates all of the seperate passes:

My next and final steps for this project will be to come up with a final rendering equation using all of these different attributes blended together in different ways to get a realistic water surface, and to go back and fix some of the things which are not working perfectly: these are mainly the bilateral filter for blurring the depth field, which doesn't look perfect yet and has a lot of artifacts, and adjusting the normal distribution of the per-particle additive blending that I do to get thickness (even though the distributions look pretty good you can still tell they are discs so the gaussian distribution of color isn't perfect).

Thursday, April 21, 2011

Specular and Diffuse

After fixing both the normal depth computation and the way I retrieve the viewer positions (in order to get accurate reflections from fresnel, specular, environment maps, etc.) I am able to get some pretty good looking diffuse/specular lighting! In the following video I have also adjusted the light source such that the light is direction and the direction does not change with the view (the direction changes in eye space but remains stationary in world space) which leads to a more realistic lighting effect now that we have real lighting.

My next step (within the next day hopefully) will be to use this stuff to get accurate fresnel approximation reflections, and add a thickness pass with additive blending to get light attenuation through the fluid volume.

Wednesday, April 20, 2011

Moving Forward...

After getting the multiple textures to work, I worked on getting all of the rendering passes I would need to compute the final rendering image. This included a background "skybox" render texture, a blurred depth map, and a normal map computed using the depth map. Here are some videos of the results. Currently my bilateral filter which I used to blur the depth map is having a lot of artifact problems, and coming up with good functions to relate depth to blur radius is a bit of a problem.

I will definitely come back to that issue after I have set up all of the other render passes and gotten some sweet looking water.

Here are some videos of the current results.

Basic render-to-texture with normal map computation stuff + skyboxes.

Render to texture + blurred depth map resulting in normals which would define water which looks a bit more watery.

Psychadelic acid-trip normal map super bug. This happened because I was accidentally discarding the depth values for non-fluid pixels, which led to the texture never being cleared so that the normal map texture was only written on current fluid pixels. Whoops.

Tuesday, April 12, 2011

Point Sprite Rendering

The past week I managed to integrate my fluid simulation from CIS565 into a custom renderer which I am writing for this project. This custom renderer will house all of the required OpenGL calls and functions to render the fluid simulation.

So far I have completed being able to render point sprites and various pieces of information which I need, to a depth texture (also a color texture and a normal texture). The next step is to take the depth texture, perform a Gaussian blur pass (or multiple passes) and compute a normal texture based on the Gaussian blurred pass.