2

I'm trying to achieve screen space fluid rendering, but I've run into a few issues with blurring. From what I understand, I'm supposed to be blurring the normal map using Bilateral Filter so that the lighting does not act as if it was bouncing off the sphere particles that I began with. I'll show some images to explain what I mean

Stage 1: Depth Map/Normal Map

enter image description here

I create the depth map and normal map. Depth map is simply the z-distance from the camera. Normal map is just the normals saved out as a colour.

The next step is the problem - the blurring. I'm trying to achieve Bilateral Filter to achieve Blurring. The depth map blurs perfectly. However, no matter how much stress I put the normal map through, it won't give me the type of blur I'm looking for:

enter image description here

Is this step the wrong step? To ensure it isn't just my code screwing up, I deleted my shader and tried to use OpenCV's bilateral filter function. Obviously it destroyed the frame rate, but I just wanted to make sure the blur wasn't my fault.

Am I supposed to do something else with the normals instead? I want to get rid of the obvious appearance of spheres, however no amount of blurring works for me - so when I apply diffuse shading using the normal map, it still looks like a bunch of spheres

Any help would be greatly appreciated, I'm truly stuck at this point! Thanks

Matt
  • 175
  • 2
  • 12
  • 2
    How are you computing the normals? From the depth-map? I believe you don't want to blur the normal-map but to blur the depth-map and then compute the normals of the smoothed surface – BRabbit27 Dec 10 '14 at 11:36

0 Answers0