Sunteți pe pagina 1din 23

A Quick Start Tutorial

for the Blender 2.56


Ocean Simulation Branch Build

By: Todd McIntosh


Date: March 14, 2011
www.savetheoceansim.com
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

Mesh/Camera Setup
1. Open a recent build of the Blender 2.5 Ocean Sim branch, which can be downloaded at http://www.savetheoceansim.com/builds/

2
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

2. Launch the Ocean Sim version of blender and delete the default cube.

3
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

3. Add a plane mesh object.

4
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

4. Scale the plane to 4 blender unit by 4 blender units. 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
5. Change to camera view (0 on the numpad). mesh fills most of the camera (see reference image).

5
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

7. Select the plane mesh. Choose the Object context and change the name of the mesh to OceanMesh.

6
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

Ocean Modifier
8. Keeping the ocean plane mesh selected, choose the Modifiers context, and add the Ocean Modifier.

7
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

9. With the modifier added, the mesh changes it’s size dra- 10. There is a range of waves sizes and levels of choppiness
matically (this will hopefully be fixed). Hit the S key and the that can be realized. We’re going to go for medium to large
0.04 to resize the mesh back down to it’s approximate size. waves with a fair amount of choppiness in this tutorial.

8
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

11. On the Ocean Modifier, ensure 12. For efficiency we’re going to leave 13. Change the resolution to 20,
that the default settings are chosen. the RepeatX and RepeatY to 1. This Choppiness to 2, and the scale to 4.
We leave the Geometry dropdown on feature replaces the functionality of
the Generate setting. This keeps the the Array modifier as we weren’t able
mesh resolution in sync with the wave to get the two modifiers playing nicely
sim data resolution which we want. together.

9
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

Animation

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 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 I to insert a second keyframe for the time factor.

10
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

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.

11
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

16. The default motion graph for the two keyframes has an acceleration and deceleration at the beginning and end that we need
to change.

12
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

Open the graph editor, select the Time(Ocean) factor and change the interpolation mode to Linear.

13
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

Materials

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.

14
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

18. With the ocean mesh selected, change to the Material 19. Change the Specular setting to 0.2
context, add a new material. Change the Diffuse colour to
Hex#143649. (Use any colour you want, this is what I used 20. Enable Mirror and set the Reflectivity to 0.1. Ensuring
in the tutorial) Ray Tracing is enabled in the Render settings and do a test
render.

15
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

21. Add a Sun lamp object positioned according to the reference image.

16
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

17
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

22. Enable the Sky checkbox in the Sky & Atmosphere section of the Sun lamp settings. Do another test render.

18
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

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
1920x1080, 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! : )

Your file should look something like Ocean Sim Tutorial Video 1 (Vimeo) - http://vimeo.com/20231926

19
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

Foam Mask Effect just going to bake 1 frame for testing. viewport. To see the foam mask, posi-
Check the Cache path to make sure it’s tion the cursor in the viewport, press the
25. With the ocean mesh selected, click set. The default is //ocean_cache/. Click N key. Open the Display tab, and en-
the Generate Foam option on the Ocean Bake Ocean. able Textured Solid. The mesh will turn
Modifier. Ensure the Coverage setting a black and white colour, but the foam
is set to 0. Change the End frame for 26. Once the foam frame bakes, there mask area will be apparent as the white
the Bake Ocean section to 1. We’re will not be a noticeable change in the area on the wave peaks.

20
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

27. With the ocean mesh selected tab and select the OceanMesh object. from the modifier.
choose the Texture context. Add a new Change the Output dropdown to Foam.
texture and choose the Ocean type. Choosing the Modifier Object is critical 29. In the Mapping section, choose UV
Name the texture FoamMask. as this ensures that the Ocean Modifier for the Coordinates dropdown. Leave
and the Ocean texture is using the exact the Color setting at 1, and change the
28. In the Ocean tab of the FoamMask same OceanSim data, which will sync Colour selection to pure white.
texture, click in the Modifier Object the texture with the wave displacement

21
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

30. Do a test render of frame 1.


32. When the bake completes, you should now have 250
31. If you are happy with the test render, change to the Ocean displacement EXR files and 250 foam mask EXR files in the
modifier panel, and click Free Bake. Change the End number ocean_cache folder.
to the last frame of the animation (250 in our case). Save your
blend file, and click Bake Ocean. 33. You should now be able to render the file with the foam

Your file should look something like Ocean Sim Tutorial Video 2 (Vimeo) - http://vimeo.com/20231977

22
Quick Start Tutorial for Blender 2.5 Ocean Simulation Branch Build

About the Project Author Bio


While searching for methods and techniques for rendering realistic ocean scenes for his personal project, Todd Todd McIntosh is a freelance web
grew frustrated with the lack of workable solutions currently available at the time. In fact not only were there designer/developer based out
no realistic ocean tools, but there was an Ocean Sim build developed a few years earlier that was forgotten of Markham, Ontario, Canada. A
about. It never made it into the new 2.5 Blender re-code, and it was even difficult to find old 2.4x builds with professional freelancer for the last
the Ocean Sim patch. On top of that, there were definitely no Mac OSX builds, which was his preference. 5 years, he is continually amazed
Todd contacted Matt Ebb, an Australian 3d artist with Blender coding experience, who also had first hand at the rapid development that
experience with the original Ocean Sim project. He enquired at the real-world development cost of porting the Blender has undergone over the
old tools into a Blender 2.5 branch. Because his animation project was a personal project, there was no budget recent few years. While constantly
to pay for the development out of his own pocket. However, buoyed by the wide spread interest by many other looking for ways to take advantage
Blender artists, Todd decided to open the project up for community funding. Investing time and effort into of Blender’s creative power in his
designing a web site and blog for the new project, http://www.SaveTheOceanSim.com was born! The initial professional design work, he is
estimate of a straight port of the old Ocean Sim into 2.5 was approximately $350. After launching the site, that most excited about using Blender
funding goal was reached within an amazing 24 hours from generous donors around the world. Encouraged by in his creative personal projects.
the response, Todd discussed new options with Matt and raised the donation level to $1500. The community, He is passionate about the ongoing
obviously excited about the project, met that funding level in less than a week. Eventually the community process of learning new techniques
would raise over $2500US to put toward this project, including new research and development. This resulted in for 3d animation and is working on his first short film project
the new Ocean Sim Blender 2.5 branch, with realistic displacement and animated foam mask effect! “Reign of Fury” (Production Blog - http://www.reignoffury.com).

About 3D Ocean Simulation


One of the most apparent things learned during this project was the discovery of how commercial projects achieved the realistic ocean renderings that they did. Obviously, a physics-based
fluid simulation or a purely particle based solution with millions and millions of particles yield the most realistic effect (ie. Realflow, Naiad, etc.). However they are extremely computationally
expensive, and decent results can be achieved with simpler methods. A mesh-based simulation has many benefits, not the least of these is rendering speed. In order to achieve the final
results, there are a number of effects usually layered together to get the desired effect.

Base Ambient Ocean Waves Foam Effects Peak Spray Object Interaction Wave Rigs (“Hero Waves”)
This is the base effect needed for all Most foam effects are usually achieved This effect is generated by dynamically This effect simulates the interaction Finally, the ability to have real control
ocean shots. Using real-world based via a particle system, the foam is a emitted particles from the peaks of the between an object, such as a ship, over a specific wave, such as a surf
algorithms for generating the wave bubbly substance that floats on the waves using the wave direction and and the ocean mesh. It generates wave or tidal wave is achieved with a
displacement, the water motion, waves and disperses away from the velocity. This is currently impossible the wake displacement surrounding “Wave Rig” which has more specific
and wave crests could be displaced wave peaks and crests. Although in Blender until the particle system the object. Jerry Tessendor’s iWave controls for manipulating the way the
out of the base mesh plane. This Blender’s limited particle system is is updated to work dynamically. The implementation is a well known version wave is animated.
was what the bulk of our project not able to allow us to generate foam source of the particle emission is of this feature. Although on our wish http://www.vimeo.com/4698477
was concerned with. The FFT noise in this way, we were able to fake the based on the wave peaks and velocity list, we were not able to get to this
algorithm is a substantial improvement effect fairly effectively with a texture and needs to change continually on feature. Thankfully Daniel Salazar and
over the current procedural textures mask, that is pre-baked to achieve a per-frame basis. Exciting work on Miika Hämäläinen have begun work on
such as the Cloud Texture because the dispersion effect. Hopefully in the particle systems will hopefully allow us this feature, and it looks like it is being
it accommodated multi-directional future, this foam mask will enable us to access to this effect in the near future. rolled into the Dynamic Paint project.
waves moving on a per-frame basis. generate the mesh locations for spray. http://www.vimeo.com/8036664 http://www.vimeo.com/16710091
http://www.vimeo.com/20231926 http://www.vimeo.com/20231977

23

S-ar putea să vă placă și