   3D Perlin Noise fpr ocean
  Hi,I'm trying to make hight-map for my ocean scean...I've wrote 2D perlin and it looked more like fog and not waters...I moved on to the 3D perlin, for motion of the water but it looked like fade-in fade-out of the 2D images...1) How can I make Perlin-Noise look like waves, not fog.?2) How do I make it move, not fade-in fade-out, or even more like morphing noise?Thanks   
  Perlin noise for an entire ocean is going to be much to hard for a game.It's great for generating things like cloud cover and adding some bumps to terrain, but it's very compute intensive for a real-time large ocean.You might enjoy reading The Water Articles that cover two useful bits of code: rendering using cg/HLSL and motion to adjacent cells using a convolution kernel.Adding 'wind' to disturb the surface of the water is simply a matter of adjusting the kernel a tiny bit to draw more from one (or two) sides.  You can make it an 8-way kernel rather than the simple 4-way kernel, but the effect will be a bit nicer.  Further refining the kernel can limit the water flow between cells, and adding some additional 'previous frame' values will increase the memory demands, but let you include things like stronger water currents.It is not compute intensive like Perlin noise is, and it looks nicer.It doesn't cover things like big waves as they come crashing down on the beach, but neither does Perlin noise.frob.   ;  You generate some number of slices (say, 3), and then scroll them in different directions, and add them together. Once they're generated, you don't necessarily need to re-generate them.A slight variation is to scroll a slice through 3D space, and slowly (slower than you scroll it) sweep that slice through the third axis; this makes it look like a non-repeating ocean.I e, to generate the wave surface for a single point in time, given the function noise3D(x,y,z) which takes coordinates in the range [0,1] and returns a value in [0,1]:float xscroll = 0;float yscroll = 0;float zscroll = 0.5;float xscroll2 = 0;float yscroll2 = 0;float zscroll2 = 0;draw_a_frame() {xscroll += 0.01f;yscroll += 0.02f;zscroll += 0.0003f;xscroll2 -= 0.02f;  // counter-chopyscroll2 += 0.01f;zscroll -= 0.0007f; // swirls a little morefor( int x = 0; x < xsize; ++x ) {  for( int y = 0; y < ysize; ++y ) {    vertex[x][y].height =  (noise3D(frac(float(x)/xsize+xscroll),frac(float(y)/ysize+yscroll),frac(zscroll)) * 0.75 + noise3D(frac(float(x)/xsize+xscroll2),frac(float(y)/ysize+yscroll2),frac(zscroll2)) * 0.25) * height;  }}}Now, these aren't tuned values, but should give you an idea of what you can do.   