Breakdown


Reference

Setup the ocean scene. Using ocean spectrum to adjust the detail and speed of the wave, make sure the scale and size of ocean is right based on the reference. The large ocean waves in the project are created by Ocean Wave node in Houdini. Using scatter transfer the grid to points for the ocean mask, so the waves of the ocean will look irregular and realistic.
Extrude the grid depth. This volume will create the ocean depth for the ocean render later, but there is also another way to do that. In the second way, grid is created below the ocean surface, and a shader is customized for the grid. So the grid reflects its color on the ocean surface, render time will be much faster.
Three new problems after the first simulation test:
1. The splash in front of the boat is quite big and makes the boat look small.
2. the small wave from the boundary may cause a new problem when the ocean sim is meshed.
3. There is no detail on both sides of the boat.
In order to fix the first problem, a VOP node is created and the particles with the highest velocity are used as a mask. This attribute is used in a POP drag node to slow down the velocity of the masked particles. Then, export the mask attribute and use POP Drag node to slow down the particles velocity in the mask.
The VEX code in the POP Drag node:
airresist *= @mask_area;
The second problem is the small waves on the boundary. In order to remove those particles on the boundary. Create a geometry that covers the boundary of the ocean simulation and transform it into a volume. Use POP Wrangle to import the geo volume. Here is the VEX node for samples the volume primitive’s value.
@vol_area = volumesample(@OpInput1, 0, @P);

The third problem, lack of detail on both sides of the boat. was resolved by creating curves and transforming the geometry. Extract Centroid node transfers the orientation attribute to a point and the curve geometry is copied to the point, so the geo will follow the boat movement.




use VDB from Particle Fluid node transfer the particles to VDB volume and increase quality for ocean surface. isolate the ocean surface and only take out the volume below the surface and erode a part of the volume. Use VDB Combine node to combine the high-resolution surface at top and the low-resolution volume at bottom. So later, there is enough space to flatten the boundary surface to get a nice ocean surface.
After converting the ocean volume to polygon, because the resolution of the surface at top is too high, it will slow down the speed of the computer. The right side of the workflow is to distinguish between the high-resolution range and the low-resolution range based on velocity. Reduces the resolution of low-velocity range.
Create VDB analysis, chose the length option, this represents the magnitude of the velocity field. Use the length of the velocity field and create a mask based on the length. In addition, the ocean sim may have vorticity, and vorticity is the curl of velocity field. So create another VDB analysis chose curl option make mask for both field, and mix the masks. The set Fit Range in the VOP will help to adjust range the velocity area.
Connect the ocean volume box to the first input of the VDBsmooth node and velocity mask for the second input. Open the Invert Alpha Mask in VDBsmooth node, so the high velocity mask will invert to the low velocity mask. Convert to the polygon and the first part of ocean mesh will be done.
Give the ocean mesh a black color and create a hollow geometry around the ocean mesh. Use Attribute Transfer node to transfer the color to make a color mask around boundaries of the ocean mesh. Use VEX to flat the edge area around the boundary
Attribute Wrangle node:
@P.y = fit01(@Cd.x,@P.y,-0.001);

There is still a problem with the edges after flattening, and they are not completely flat. Create an additional bounding box and cover the edge area of the ocean mesh border, then merge them by using VDB combine node.
In order to combine two different ocean mesh together, extrude the boundary box to all sides and make sure these two boundaries touch each other. Then using VDB combine node, change to polygon and delete bounding volume to make two meshes into one.


the whitewater was created using three layers. Connect the ocean simulation cache to the whitewater source node to calculate the velocity field of the particles around the boat.
The source of the first layer is the particles around the ship. The first layer of white water should be based on the reference to determine the dynamic shape and pattern of the overall white water. The source of the second layer of whitewater comes from the particles around the front half of the boat. The velocity and noise of the particles are increased in the whitewater solver node without changing the dynamic shape and pattern. The particles in the third layer come from around the bow, and the velocity and noise of the particles are increased on the basis of the second layer. The reason for doing this is to continually add detail to the whitewater layer by layer.
The bow is the part that collides most strongly with water, and the particles produced by the collision have the highest speed, so the whitewater details around the bow should also be high. then, use pop network and new pyro solver tool to make extra spray and mist on the bow


the difference between the renders can be seen. The one on the left only have one whitewater source, the one on the right have three different whitewater layers, spray and mist.