# 洋面修改器¶

The Ocean Modifier is an ocean simulation tool to simulate and generate a deforming ocean surface, and associated texture, used to render the simulation data. It is intended to simulate deep ocean waves and foam.

The Ocean Modifier is a port from the open source Houdini Ocean Toolkit.

## 选项¶

### 几何数据¶

Creates a tiled mesh grid that exactly corresponds with the resolution of the simulation data.

When generating a mesh surface, the existing mesh object is completely overridden with the ocean grid. A UV channel is also added, mapping the (0.0 to 1.0) UV space to the simulation grid.

When generating a mesh surface, controls the number of times the grid is tiled in X and Y directions. UVs for these tiled mesh areas continue outside of the (0.0 to 1.0) UV space.

The time at which the ocean surface is being evaluated. To make an animated ocean, you will need to insert keyframes RMB and animate this time value. The speed that the time value is changing will determine the speed of the wave animation.

The internal grids are powers of two of the resolution value, so a resolution value of 16, will create simulation data of size 256×256. The higher the resolution, the more detail will be produced, but the slower it will be to calculate.

Note

When using the Generate modifier geometry option, this resolution value also determines the resolution of the generated mesh surface, equal to the resolution of the internal simulation data.

The width of the ocean surface area being simulated, in meters. This also determines the size of the generated mesh, or the displaced area, in Blender units. Of course you can scale the object with Ocean Modifier in Object Mode to tweak the apparent size in your scene.

### Wave¶

When using Alignment, this will define the amount that inter-reflected waves are damped out. This has the effect of making the wave motion more directional (not just the wave shape). With damping of 0.0, waves are reflected off each other every direction, with damping of 1.0, these inter-reflected waves are damped out, leaving only waves traveling in the direction of the wind.

### 模拟数据生成选项¶

Tweaks the amount of foam covering the waves, negative values will reduce the amount of foam (leaving only the topmost peaks), positive values will add it. Typically ranges from (-1.0 to 1.0).

Optional name for the vertex data layer, used by the Ocean Modifier to store foam maps as vertex colors. This is required for accessing the foam data in the renderer.

## 烘焙¶

Rather than simulating the ocean data live, the ocean data can be baked to a file on a drive. When a simulation is baked, the simulator engine is completely bypassed, and the modifier/texture retrieves all information from the baked files.

• It is faster to use the stored data rather than re-calculating it.
• Allows rendering ocean data in external renderers.
• Enables more advanced foam maps.

### 数据文件¶

Simulation data is stored on a drive as sequences of OpenEXR image maps, one for each of displacement, normals, and foam (if enabled to be generated). Upon loading the data from these baked files, when a frame of the bake sequence is read from a drive, it is cached in memory. This means that accessing loaded frames subsequent times is fast, not incurring the overhead of drive access.

Since these baked files are plain OpenEXRs, they can also be opened and rendered in any other application or renderer that supports them.

### 烘焙水沫¶

Baking also provides improved foam capabilities. When simulating live, the ocean simulator retrieves data for that current frame only. In the case of the foam map, this represents the tips of wave crests for that given frame. In reality, after foam is created by wave interactions, it remains sitting on the top of the wave surface for a while, as it dissipates. With baking, it is possible to approximate that behavior, by accumulating foam from previous frames, leaving it remaining on the surface.

## 内置模拟¶

The simulator itself uses FFT methods to generate 2D grids of simulation information internally, very similar to 2D texture maps. The simulator can generate three types of data: displacement, normals, and extra data, that is used to calculate wave crest intersections (i.e. foam). After simulation, these maps are used to displace the ocean surface geometry in 3D, and also can be used for shading via the Ocean texture. The internal simulation engine is multi threaded with OpenMP to take advantage of multiple cores.