CAP 203 - Computer Animation III

Polygon Blog lesson: 3D Water


This lesson covers material from a lesson at Polygon Blog. We will create a water effect and sunshine that you can adapt to your own work. Objectives important to this lesson:

  1. Creating a base for the water
  2. Water material
  3. Adding a daylight system
  4. Modifying the look of the water
  5. Placement of the sun
  6. Sun and sunset effects
  7. Special effects

Christian Matsoukis recommended the Polygon Blog web site for some practical lessons. I agree, we can learn something there. Let's add a little to our scenes with the ideas in the lesson the author called 3D Water. The author actually called this on 3D Water - The Ocean, but you can modify the settings along the way to make it more like a lake if that's what you need.

Water and Sun

This exercise is on one web page, so open the link above and follow along, I will make some comments along the way to clarify and give you some screen shots the author missed.

  1. Assign rendererOpen 3DS Max, set a project folder, and save a new scene. The author skipped that, probably assuming you know to do it every time.

    As the author does In step 1, change the selected renderer to mental ray.
    a. Open the Render Setup dialog, go to the bottom of the Common panel, and open the Assign Renderer rollout. Click the ellipsis button for Production, as shown in step a on the right.

    b. Select the mental ray Renderer, as shown in step b on the right.

    c. Click OK as shown in step c on the right.

  2. Create a plane in the Top viewport. Why in the Top viewport? That way it automatically aligns with the grid defining the "floor" of your scene. This is going to be the surface of your water.

    The author suggests setting the length and width of the plane to 500. Do that on the Modify panel, and zoom as needed to see your scene better. The plane will have four segments each direction by default. The number of segments will not be important, so leave them alone.

  3. Did you zoom like I told you to in the last step? Good. (If not, do it now, so you can see the outer edges of the plane.)

    Select the Create panel, Camera subpanel, and Target.
    In the Top viewport, drag from the middle of the bottom edge of the plane toward the center of the plane. The author provides a picture like the one below, but gets the direction wrong in the text.

    Place camera

    This is a view of the camera placement from the Left viewport. The camera should be moved in this viewport so it is a bit above the water. The target should be moved so it is a bit below the water. Ignore the markers in this image for North and South. They will appear in the scene with a new object in a few steps.

    Don't fuss over the camera and target placement too much right now. You will want to adjust them once there is something for the camera to see.

    The author does not get around to setting a viewport to the camera view. Let's do that now. Click the word Perspective in the current perspective viewport, click Cameras, and choose Camera001. (That is the default name for your first camera. If you are working in a scene that already has cameras, choose the one you just made and placed.)

  4. Step 4 adds a material in a way we have not used. Let's enjoy this one.

    1. Open the Material Editor and choose an empty sample slot. They should all be empty if you are in a new scene.
      Arch and DesignThe first button on the horizontal toolbar is Get Material. Click it.

    2. On the panel that opens, find the mental ray section, and double-click the choice for Arch & Design.

      You may wonder why we are not choosing the selection for Autodesk Water, which appears lower in the mental ray list. The short answer is that the choices available there won't be as pretty as this one. After this lesson is over, pick another sample slot and add the Water material to it to compare the results for yourself.

    3. Water templateThe Material Editor will now show a dark red rectangle on the Templates rollout that says arch+design. Just above that rectangle is a dropdown list.

      Open the list and choose Water, Reflective surface.

    4. Apply the material to the plane in your scene. We are not done yet, but we need light in the scene next.

  5. The author now expands our lighting experience.

    Select the Create panel, and the Systems subpanel. (It is the last button on on the subpanels toolbar.)
    Click the button for Daylight, and drag a Daylight object in the center of the Top viewport.
    Accept the recommendation 3DS Max gives you to use mr Photographic Exposure Control with EV=15.

    Don't worry about the position of the Daylight object. We will move it in a minute. By default, the object is meant to show the real angle of the sun at the system's time of day, unless we change that as we are about to do.
    Daylight parametersThe first three parameters to set for the Daylight object are easy to find: they are on the top of the rollouts.
    • set Sunlight to mr Sun
    • set Skylight to mr Sky (and accept the suggestion to use mr Physical Sky)
    • set Position to Manual
      The Manual setting will allow you to move the Daylight object to the position shown in the author's image for step 5.

      By the way, the Daylight object is not the actual stand-in for the sun. It is more like an astronomer's tool that points at the sun. The dome part of the object should be positioned as the author has it, facing where the sun would be if the scene was at the equator and the time was noon.

  6. Step 6 is easy. Select the viewport set to Camera view. Render one frame. The author takes stock of the project so far and decides to change some things that we probably agree with: the position of the gray horizon, the size of the waves, the color of the ocean and the sky. Your render may lead you to the same choices, or it may not. Let's follow this advice in the next several steps.

  7. set Horizon value Fix the horizon with the author's adjustment. Find the mr Sky Advanced Parameters rollout, which is about half way down the list of rollouts for the Daylight object. On the Horizon parameters, set the Height to a small negative value. Render again to determine if your value lowered the horizon below the water line as desired.

    (Note that the author is using commas for decimal marks. For those of you who have not seen this notation, the use of a period, a comma, or another symbol varies from one country to another. Follow the link to a Wikipedia article with a map that will help you think more globally.

  8. Water color settingIn step 8, we make the waves smaller and bluer.
    Open the Material Editor again. The author falls a little short on this one.

    Ocean color
    Find the Main material parameters rollout for the material we are using.
    Click the color swatch for Diffuse color.

    Try the author's suggestion of changing only the Hue value to about .62. The actual value to choose will vary with your preference and the actual colors you see on your screen.

    Ocean Lume Wave size
    Next, find the Special Purpose Maps rollout, which is the next to last rollout for this material.

    There is only one map channel that is populated at this time. The button for that channel (shown in the image on the right) is the one the author wants you to click. Click it, and you will see a new screen of parameters.

    • Set the Largest value to 2.5
    • Set the Smallest value to 0.12
      (Are the commas bothering you? Read the Wiki article.)

  9. Colors also come from the Daylight object. Its properties should still be on the Modify panel. If not, click the Daylight object and open the Modify panel.
    • Find the mr Sky Parameters rollout and set the Multiplier value to about 1.1
      (You may have noticed that it is impossible to get some of the numbers the author specifies with the spinner controls. You can highlight the current value and type a value of your choice, or you can get a number with the spinner that is close the the desired value. Close works well for this lesson.)
    • Find the mr Sky Advanced Parameters rollout. It should be two rollouts below the one you just used. That's the easy part.
      You may not see the Red/Blue Tint setting. It is below the color swatch fro the Night Color.
      Once you find it, set the value for Red/Blue Tint to about -0.1.
      Set the Saturation value to 1.3
      (The author mentions, a bit late, that these values are a personal choice. Feel free to make your own choices in this step. Render between changes to fine tune your choices.)

  10. Sampling qualityThe author observes that the waves are aliasing toward the horizon. (They look pixelated.) We will correct this now.

    Open the Render Setup panel.
    Click the Renderer tab.
    Find the Sampling Quality rollout, and change the settings.
    Set Minimum to 4, set Maximum to 64.
    Note that this will increase the render time from now on.

    As an added part to this step, the author wants you to create a torus knot in the scene. Okay, let's do that, It is a pretty object, and we can place it in the water so we will see shadows and reflections from it. Use the parameters from the tutorial: base curve radius set to 23, segments set to 300, cross section radius set to 2.5

    Ignore the reference to Photoshop. It is unnecessary. Save the scene incrementally.

  11. The author wants to play with the lights for the remaining steps. You can learn something in each step in this section.

    First the author tells us to select the camera viewport. (Good thing we set one a while ago, right?)

    The next instruction is to press shift-F3. This may have no effect, if you are already in Realistic mode. The command sets the viewport to Realistic mode, which shows shadows, which is the desired result.

    View background settingsThe next command will be new to most of you.
    Open the Views menu, hover over Viewport Background, and select the ridiculously named Viewport Background, which opens the settings dialog screen shown on the right.

    Turn on the checkboxes indicated in the image on the right:
    Use Environment Background
    Display Background

    These settings apply to the viewport that is selected. When you click the OK button, you will see a version of the sky appear as the background in the camera viewport.

  12. That was all good, but the author has forgotten to tell us to move the light source. If we want to see a sunset, the sun needs to move to the horizon.

    Select the Daylight object, then select the Move tool.

    In the Top and Front viewports, move the Daylight object so it points toward the horizon. Watch the lighting change in the camera viewport.

    At this point you will believe what I told you earlier. The DaylightAssemblyHead is not the sun. It is pointing at the sun in the scene. Galileo may rise from his grave, but as you move the object, the sun in the scene will follow it, which allows you to move the sun to a sunset position like the one the author is using at this point it the tutorial images.

    Position the Daylight object so you can actually see the sun in the camera viewport. Place it low in the sky, but not on the water.
    Change the mr Sky Advanced Parameters: Red/Blue Tint to 1.0 and Saturation to 2.0
    Save the scene incrementally.
    Render again, and wait for it to finish. Sunset on Mars, when we give it an ocean?

  13. Glare effectThe next special effect is glare. The author thinks the sun is too easy to look at in the scene at this time.

    Open the Render Setup panel again.
    Click the Renderer tab.
    Find the Camera Effects rollout, which is about two thirds of the way down the panel.
    Scroll down the rollout to find the Camera Shaders section. Turn on the checkbox for Output, and note that the default effect in the box next to it already says Glare.
    Click the Render button again. The effect is realistic enough that your eyes may hurt from the illusion.

    The author offers two tips for adjusting the glare shader. I recommend that you do not use them. My scene became unusable when I tried it.


This feels like a long lesson. The author has three more useful variations: fog, moonlight, and sprites over the water. Pick one, if there is time, and add the effect.

Try some of this for a project you are working on.