UPDATE: A PDF version of the tutorial is now available for download. Useful for offline viewing. Click the image above.
Well, it’s seems as though there has only been a few people able to figure out the entire process of using the new ocean sim tools along with the foam mask option. Obviously we need a basic “getting started” tutorial so that more people can start getting basic results in order to allow more people to experiment with this new toolset.
I’ve put together the basic steps to create an animated ocean mesh with the foam mask material texture added. This is not meant to show users how to create the most realistic material or wave settings, but just to give everyone a baseline or a starting point to using this great new tool.
Blender 2.5 Ocean Sim Branch QuickStart Tutorial
1. Open a recent build of the Blender 2.5 Ocean Sim branch, which can be downloaded here
5. Change to camera view (0 on the numpad).
6. Select the camera and adjust it’s position to achieve a low angle view on the plane mesh, and close in so that the mesh fills most of the camera (see reference image).
10. There is a range of waves sizes and levels of choppiness that can be realized. We’re going to go for medium to large waves with a fair amount of choppiness in this tutorial.
11. On the Ocean Modifier, ensure that the default settings are chosen. We leave the Geometry dropdown on the Generate setting. This keeps the mesh resolution in sync with the wave sim data resolution which we want.
12. For efficiency we’re going to leave the RepeatX and RepeatY to 1. This feature replaces the functionality of the Array modifier as we weren’t able to get the two modifiers playing nicely together.
13. Change the resolution to 20, Choppiness to 2, and the scale to 4.
14. Using the default 250 frames setting, move the current frame to frame 1, change the Time field on the Ocean Modifier to 0 and press enter to confirm. Then hover the mouse cursor over the Time field and press “I” to insert a keyframe for the Time factor. Change the current frame to the last frame (250 in our example).
Change the Time field to 5 and press enter to confirm. Then hover the mouse cursor over the Time field and press “I” to insert a second keyframe for the time factor.
15. Click play on the timeline controller and you should see motion on the ocean mesh. We’ve set the resolution pretty high at 20, so you may want to reduce this resolution to get decent playback in the viewport.
17. We’re just going to start with a basic blue colour. Depending on the look you are going for, you’ll need more or less Mirror Reflection. Photorealistic ocean material is almost a black with full reflection, getting all the colour from the sky reflecting in the material.
18. With the ocean mesh selected, change to the Material context, add a new material. Change the Diffuse colour to Hex#143649. (Use any colour you want, this is what I used in the tutorial)
19. Change the Specular setting to 0.2
Rendering a Test Animation.
23. At this point, we can render a test animation to see the wave motion. I’ve set my render output options to 35% of 1920×1080, 250 frames, and PNG output.
24. BlenderArtists.org is back online! Go to the forums and browse around while waiting for your frames to render! : )
Foam Mask Effect.
25. With the ocean mesh selected, click the Generate Foam option on the Ocean Modifier. Ensure the Coverage setting is set to 0. Change the End frame for the Bake Ocean section to 1. We’re just going to bake 1 frame for testing. Check the Cache path to make sure it’s set. The default is //ocean_cache/. Click Bake Ocean.
26. Once the foam frame bakes, there will not be a noticeable change in the viewport. To see the foam mask, position the cursor in the viewport, press the N key. Open the Display tab, and enable Textured Solid. The mesh will turn a black and white colour, but the foam mask area will be apparent as the white area on the wave peaks.
28. In the Ocean tab of the FoamMask texture, click in the Modifier Object tab and select the OceanMesh object. Change the Output dropdown to Foam. Choosing the Modifier Object is critical as this ensures that the Ocean Modifier and the Ocean texture is using the exact same OceanSim data, which will sync the texture with the wave displacement from the modifier.
29. In the Mapping section, choose UV for the Coordinates dropdown. Leave the Color setting at 1, and change the Colour selection to pure white.
31. If you are happy with the test render, change to the Ocean modifier panel, and click Free Bake. Change the End number to the last frame of the animation (250 in our case). Save your blend file, and click Bake Ocean.
32. When the bake completes, you should now have 250 displacement EXR files and 250 foam mask EXR files in the ocean_cache folder.
33. You should now be able to render the file with the foam mask added to the base material.