6
$\begingroup$

I am trying to create real ocean waves that break on a shore in Blender. The three ways I know I could achieve this is the wave modifier, the ocean modifier or the fluid simulation. Don't know so much about Force Fields and thus can't say if that would help. I would like to create the ocean with the ocean modifier (to get the realistic rough ocean look) and then use this ocean in a fluid simulation as the fluid (or anything else that I can achieve my goal).

I have used obstacles to create the wave, but that never looked good/behaved like a real wave. The inflow/Outflow was similar. I would like the plane (modified with the ocean modifier) to behave like a real ocean and if I set obstacle (=shore) that this plane interacts with that shore. What is the best way to achieve something like this and are there any addons that do exactly this. Ocean Wave addon. I have baked a lot of fluid simulations and it never looked remotely realistic. Thank you very much !

$\endgroup$
20
$\begingroup$

You can generate a wave on a shore using a combination of a Blender fluid physics simulation and moving geometry. The moving geometry will displace water like in a wave pool. An inclined shore will cause the waves to rise and crest. The fluid particle system will simulate a foam on the surface.

rendered results


Step by step instructions (Blender 2.76):

  1. Add a cube and size it. This will be the domain for the fluid simulation. In the physics tab, set this up as a fluid domain. To get the floating foam on the water, in the particles panel, select 5000 particles and set generate to 1. Specify the location for the fluid domain cache. This location is needed later in step 4, remember it.

fluid domain

fluid domain settings

  1. Add a cylinder, scale it, rotate it, and move the origin away from the center. This cylinder will be animated to rotate and cause the water displacement. In the physics tab, set this up as a fluid obstacle.

cylinder with offset center

cylinder fluid settings

  1. Add a object which will be used to visualize the foam. A cube does this job nicely. Name this object 'fluid-particle-for-rendering'. Scale this object to the size desired for the foam particles. In general this will be very small. In this example a value of 0.01

  2. Add a small cube to hold the physics for foam particle. Put this object off screen. In the physics tab, set this object as a fluid particle. Select floating. In the particles tab, select the 'FluidParticles'. Set the path for the cache to the same path used for the fluid domain in step 1. In the rendering panel, set the rendering to object and select 'fluid-particle-for-rendering' as the object.

fluid particle settings

fluid particle system settings

  1. Add a cube a scale to become a plane for the beach. Rotate the beach to have an incline like a shoreline. In the physics tab, select Fluid an in the Fluid panel, set the Type to Obstacle.

shore geometry

shore fluid settings

  1. Add an object to the scene to initialize the water. This can be done by adding a large cube, then using Boolean operations to define a volume inside the fluid domain. In the phyics tab, select Fluid and set the Type to Fluid. Then select Volume for 'Volume Initialization'.

water initialization geometry

water initialization settings

  1. Select the cylinder and make sure the timeline is at 0. Set an animation keyframe. At a later time, use 100 frames for this demo, change the rotation about the cylinder's axis to a new value like 360 degrees. Set an animation keyframe. Open the graph editor, and set the extrapolation type to linear (use the menu at the bottom of the panel: Channel -> Extrapolation Mode -> Linear Extrapolation). This will keep the cylinder rotating forever.

animation for cylinder setup

  1. The fluid simulation requires baking to generate the meshes. Select the object used for the fluid domain. Hit 'Bake'. This may take several minutes to several hours depending on the Resolution of the fluid domain and the number of trace particles.

bake button

  1. Now the mesh is ready, and renderings or animations can be generated. The animation may require some tweaking to get the desired effect. The fluid domain panel has several settings which can be experimented with. Also, the waves may take a few rotations of the cylinder to behave consistently.

snapshot of wave


Download the demo blend here:

$\endgroup$
  • 1
    $\begingroup$ Wow! Thank you so much. This is a real awesome, detailed description. I will mark this questions answered just because of the complete walkthrough you give. And thank you for providing the blend file as well. I would like to get the same result now with a non shore wave. But you gave me the tools. Thanks so much again. $\endgroup$ – digit Jan 19 '16 at 8:42
  • 1
    $\begingroup$ Yes, this method works, but it should be noted that it is a bit of a hack, so don't be surprised if things don't work as expected. Floats and Drops are not really properly integrated yet. Values for size and numbers don't really work. Also they require, as mentioned above, a non-zero value of the Generate property, unlike Tracers, which will work just fine with a value of zero. One problem with this is that if you have a fluid sim and want fine droplets, you set the subdivisions to 2 and adjust the amount via Generate. So this one property controls two completely different things. $\endgroup$ – Jbergman May 29 '16 at 1:50
  • 1
    $\begingroup$ Continued: One more thing to note, the Fluid Particle object should be inside the domain when set up. After that it seems fine to move it outside the domain. Anyway, my main point is that these things might change with any new version of Blender, and if something does not work as expected, trouble-shooting should be done done with these things in mind. $\endgroup$ – Jbergman May 29 '16 at 1:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.