PDA

View Full Version : A fast and actual and beautiful ocean



Hamid Reza
09-22-2010, 02:01 AM
Hi , I want to make a fast and actual and beautiful ocean for my engine.
The distance between cammera and ocean surface is long in my engine.
I know 2 way to make my ocean but each way have a problem.
1. useing from a 'Perlin Noise Generator' and make a HeightMap & NormalMap by that and finally,make water surface via a shader.
But when i wrote a Perlin Noise Generator program (http://www.wikiupload.com/SL7R0JS2NY0N0ZM) , i understoond that generating noise is a very very slowly way and this is a heavy work for CPU.
http://up.iranblog.com/Files/b2af9bf5bc824d6dbf74.JPG
2. useing from a lot of clung triangles and moveing theme by a involved mathematical formula for simulating water surfaces.
But this way is suitable for a near view moreover, presumably this way is a heavy work for CPU.
Please quide me.
thank you for your attention...

Nicolas Lelong
09-22-2010, 09:50 AM
1. useing from a 'Perlin Noise Generator' and make a HeightMap & NormalMap by that and finally,make water surface via a shader.
But when i wrote a Perlin Noise Generator program (http://www.wikiupload.com/SL7R0JS2NY0N0ZM) , i understoond that generating noise is a very very slowly way and this is a heavy work for CPU.

Note that you can store your 2D noise data in bitmap textures, and start from there. You then only have to generate your noise once.

You could then combine multiple scrolling noise textures, at different scale levels, to start getting something.

FWIW, you should probably google for articles on this topic, there are a handful of them.

Cheers

JoshKlint
09-23-2010, 12:12 PM
In my experience, Perlin noise and scrolling height textures are terrible approximations of ocean waves. I'm researching another technique to generate the data.

Not to rain on your parade, but you probably won't be satisfied with the results after you implement this.

NeXEkho
09-23-2010, 01:35 PM
You might want to experiment with UDK's shader editor to figure out what works best and then implement it yourself.

RefleX
09-26-2010, 10:30 AM
This is a bit off topic, but did you know the water rendered in the new Command and Conquer games could have been rendered as a full screen pass. I ran into an article a while back explaining the effect, can't find the link though :(