Making a perturbation map


I have to make an image like this, except it has to have the green components average at 128 on the entire image, same for the red and 0 for the blue component.
Can somebody help how to achieve this?

Also, if somebody knows any tutorials about making a perturbation map, please tell me!


looks like a “Normal” map to me…maybe a search will help, theres quite a few threads on this over the forum

why does it have to be 128 average across each channel?


It’s a map that defines the pixel distortion on a water surface, in other words it makes the waves. The 128 average is needed for the calculated reflection, the mirror image on the water surface. This way the reflected image will connect with what is reflected. If the average is not 128, the mirror image will appear displaced in relation to what’s reflected.


looking at the histogram on levels will give you an idea of bias on a greyscale channel…if the hump isnt central then its got a bias away from 128.


Hi Xaint.

Your sample looks like the Clouds filter, applied differently for red than for green, with a little High Pass to make the pattern smaller. Beware once you use HP it isn’t a perfect tile anymore, the tiling will have to be fixed.

Make sure before saving to run it through Nvidia’s normal map filter to renormalize.


Eric, how would you make a perturbation map? I’m not sure it’s the best method, the map is made by an other guy. It works in the engine, but I’d prefer control over what will the waves look like. I’m not sure I want realistic waves, but before abstraction I have to understand realism. I have to know how can I create a texture that gives the result I want to achieve. How can it be predicted, what the waves will look like?


Use the Nvidia tool to convert a height map into a normal map.

I created a wave animated bump recently, by rendering Dreamscape ocean geometry from above, using a side-mapped gradient to make it into a height map. Worked great.


Thanx man, sounds cool!
I just wonder how many fames do you have for animating the texture? Let’s say 32 for 1 second, sounds pretty repeating. And how much does this animation adds to the overall look, since the pixelshader already gives flow to the water if it has a non animaing texture only?


Makes a big difference, since in my case I wanted rolling waves. Without the animation, the waves don’t roll, there’s some secondary motion in there that’s peculiar to waves, how the bumpy surface of the water slides across the swells. I ended up with 60 frames at 64x64, 8bit TGAs, the loop goes from crest to crest. Worth the memory cost in my case.

Here’s a really old render.

You can see it animating at the start of the video “Intro to GameToolkit Content Development.”
But with a better reflection map and specular it looks really nice. Wish I had some more recent videos to show you though, those captures are really out of date.


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.