Username
Password
Auto-login
Show my name in the online users list
Not a member?
Please register.
Forgot your password?
(2) May 2008
(1) January 2008
(1) November 2007
(2) September 2007
(7) August 2007
(2) July 2007
(1) June 2007
(3) May 2007
(4) April 2007
(8) March 2007
(9) February 2007
(2) January 2007
Making an ocean from a simple fractal texture
Posted: Aug 01, 2007 - 06:05 PM
Category: tutorials
Creating an ocean is relatively easy in Maya Unlimited. However if you only have Maya Complete you can still get a workable ocean using an animated fractal displacement map with the right settings. Create a nurbs plane and on the shape turn "off" feature based displacement. Now assign a blinn shader to the plane and on the shader create a displacement map with a fractal texture (a bump node should have also been automatically created... this is only created when "feature displacement" is off on the geometry).

From the hypershade render utilities create a heightfield node and connect the outAlpha of your fractal to the heightField. The heightfield is only to preview the displacement, and does not render. Make the heightField resolution around 150 and keep the height scale at 1( this way it should match the displacement on the nurbs plane ). Instead lower the alpha gain on the fractal texture so the waves are not too high. If you scale up the nurbs plane and height field then make sure to only scale the height field in x and z, not y, as the displacement is computed in worldspace not local space.

Now edit the fractal texture. Turn on animated and inflection. In the attribute editor type the following into the time attribute edit cell:
" = time * 0.02"
This will animate the waves. Use a lower value than 0.02 for very large scale waves( like a big ocean) and a larger value for a faster waves (like a bathtub). Also to look at just a section of the ocean so that we can better preview the attributes lest make the repeatUV = .2,.2 on the texture placement.

Make the alphaGain = -0.05. The negative value flips the waves such that the peaks( due to "inflection") point up, not down.

Getting the right ratios are critical. Smaller waves have proportionatly smaller amplitudes. Try the following:
ratio = 0.53
frequencyRatio = 1.5
level Max = 15
time ratio 1.4

A bit of bias can help with the peaking look of the waves:
bias = 0.3

When done adjusting the settings you can then increase the repeats value on the texture placement based on your ocean scale and as well adjust the alphaGain.

The tessellation on the nurbs plane will need to be increased depending on the detail you need. Turn on advanced tessellation on the nurbsPlaneShape and increase the numuberUV under primary tessellation ("display render tessellation" will allow you see the triangulation).

For the final shading you should either map an enviroment texture that matches you overall sky lighting to the blinn reflected color attribute, or raytrace the reflections. Make the reflectivity = 1, the specularColor white, and the specular rolloff around 0.2( this will make it reflect more at glancing angles in the fashion of real water ).The shader color should be a relatively dark blue, as most of the shading should be due to reflection( depending on the ocean ). In some cases you may also wish a little translucence (translucenceFocus = 0 ) or bluegreen incandenscence.
In order to post any comments, you must be logged in!
  Posted by fedayee  on  05/10  at  06:03 PM

I know this is about a year old, but what do I connect the outAlpha too, in the heightField?
i have the fractal, middle click drag to the heightField, chose “other” and in the connection editor, I chose outAlpha, but what do i connect it too?

thanks.

 
Page 1 of 1 pages