洋面修改器

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.

选项

../../../_images/modeling_modifiers_simulate_ocean_panel.png

Ocean Modifier.

几何数据

几何数据
生成

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.

置换
Uses the existing geometry rather than replacing it. Vertices are displaced along the local Z axis.
重复X,重复Y
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

翻滚度
波峰的翻滚程度。当值为0时,海洋表面只是在Z方向上做上下置换。而较高的翻滚度值则会让波浪产生X向与Y向的置换效果,来产生较为尖锐的波峰效果。
缩放
这是对波幅的总体缩放控制。它能够通过正负值控制波浪的高度或深度。它不仅能够对洋面物体进行Z向缩放,而且可以对各个模拟面进行缩放,包括X与Y向的置换,以及对应的水沫与法线。
对齐
它控制着波形随风而动的方向性。当值为0时,风和波浪的面向是随机而均匀的。定向值越高,则风吹的方向就越恒定,这使得波浪看起来在单一方向上更扁平,更对齐。
方向
当使用Alignment(对齐)时,它指定的是波浪所对齐的方向。
衰减
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.
最小波浪
指定所生成波浪尺寸的下限。与低通滤波器功能相仿,这会将高频波浪的细节移除。
风速率
以米/秒为单位的风速。风速较低时,表面会形成会相应较小的波浪。

模拟数据生成选项

../../../_images/modeling_modifiers_simulate_ocean_foam-layer-name.png

Using foam vertex colors with a named data layer.

默认情况下,模拟器只会生成置换数据,因为这样的工作量最小,也会获得最迅捷的反馈。附加的模拟数据也可以为渲染而生成。

生成法线
用来模拟附加的法线贴图数据。当贴图作为凹凸贴图映射到法线时,并在烘焙的时候启用了生成法线贴图图像序列时,它可以被Ocean(洋面)纹理调用。
生成水沫
用来模拟附加的水沫数据。在烘焙的时候启用了生成法线贴图图像序列时,可以被Ocean Texture(洋面纹理)调用并作为纹理使用(可能用作蒙板)。
水沫覆盖度
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.

烘焙选项

开始 / 结束
这里设定的是用于烘焙(包括)模拟的帧范围。当从烘焙范围外进行烘焙时,始帧与末帧将被重复执行烘焙操作。
缓存路径
指定了所烘焙的EXR文件的存储路径。序列格式为disp_####.exr,normal_####.exr,以及foam_####.exr,这里的####代表四位数的帧数值。如果窜出路径文件夹不存在,将会被新建。

内置模拟

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.

示例

在Blender中模拟和烘焙贴图,在3Dlight里面渲染。 历史 History 模拟器的核心开发者是Drew Whitehouse,源自 Houdini Ocean Toolkit。由Hamed Zaghaghi转换为C语言并集成在Blender 2.4系列的一个补丁中,由ProMotion Studios/Red Cartel在短片《Lighthouse(灯塔)》的制作过程中提供资助。 在此项目中,Matt Ebb将核心模拟器再次引入到Blender 2.5版本中,同时增加了功能,并进行了修复与优化。由'Save the Ocean Sim(拯救洋面模拟器)'项目提供资助。