OceanModifier(Modifier)

base classes — bpy_struct, Modifier

class bpy.types.OceanModifier(Modifier)

Simulate an ocean surface

bake_foam_fade

How much foam accumulates over time (baked ocean only)

Type

float in [0, inf], default 0.98

choppiness

Choppiness of the wave’s crest (adds some horizontal component to the displacement)

Type

float in [0, inf], default 1.0

damping

Damp reflected waves going in opposite direction to the wind

Type

float in [0, 1], default 0.5

depth

Depth of the solid ground below the water surface

Type

float in [-inf, inf], default 200.0

fetch_jonswap

This is the distance from a lee shore, called the fetch, or the distance over which the wind blows with constant velocity. Used by ‘JONSWAP’ and ‘TMA’ models

Type

float in [0, inf], default 120.0

filepath

Path to a folder to store external baked images

Type

string, default “”, (never None)

foam_coverage

Amount of generated foam

Type

float in [-inf, inf], default 0.0

foam_layer_name

Name of the vertex color layer used for foam

Type

string, default “”, (never None)

frame_end

End frame of the ocean baking

Type

int in [-inf, inf], default 250

frame_start

Start frame of the ocean baking

Type

int in [-inf, inf], default 1

geometry_mode

Method of modifying geometry

  • GENERATE Generate – Generate ocean surface geometry at the specified resolution.

  • DISPLACE Displace – Displace existing geometry according to simulation.

Type

enum in [‘GENERATE’, ‘DISPLACE’], default ‘GENERATE’

invert_spray

Invert the spray direction map

Type

boolean, default False

is_cached

Whether the ocean is using cached data or simulating

Type

boolean, default False, (readonly)

random_seed

Seed of the random generator

Type

int in [0, inf], default 0

repeat_x

Repetitions of the generated surface in X

Type

int in [1, 1024], default 1

repeat_y

Repetitions of the generated surface in Y

Type

int in [1, 1024], default 1

resolution

Resolution of the generated surface for rendering and baking

Type

int in [1, 1024], default 7

sharpen_peak_jonswap

Peak sharpening for ‘JONSWAP’ and ‘TMA’ models

Type

float in [0, 1], default 0.0

size

Surface scale factor (does not affect the height of the waves)

Type

float in [0, inf], default 1.0

spatial_size

Size of the simulation domain (in meters), and of the generated geometry (in BU)

Type

int in [-inf, inf], default 50

spectrum

Spectrum to use

  • PHILLIPS Turbulent Ocean – Use for turbulent seas with foam.

  • PIERSON_MOSKOWITZ Established Ocean – Use for a large area, established ocean (Pierson-Moskowitz method).

  • JONSWAP Established Ocean (Sharp Peaks) – Use for sharp peaks (‘JONSWAP’, Pierson-Moskowitz method) with peak sharpening.

  • TEXEL_MARSEN_ARSLOE Shallow Water – Use for shallow water (‘JONSWAP’, ‘TMA’ - Texel-Marsen-Arsloe method).

Type

enum in [‘PHILLIPS’, ‘PIERSON_MOSKOWITZ’, ‘JONSWAP’, ‘TEXEL_MARSEN_ARSLOE’], default ‘PHILLIPS’

spray_layer_name

Name of the vertex color layer used for the spray direction map

Type

string, default “”, (never None)

time

Current time of the simulation

Type

float in [0, inf], default 1.0

use_foam

Generate foam mask as a vertex color channel

Type

boolean, default False

use_normals

Output normals for bump mapping - disabling can speed up performance if its not needed

Type

boolean, default False

use_spray

Generate map of spray direction as a vertex color channel

Type

boolean, default False

viewport_resolution

Viewport resolution of the generated surface

Type

int in [1, 1024], default 7

wave_alignment

How much the waves are aligned to each other

Type

float in [0, 1], default 0.0

wave_direction

Main direction of the waves when they are (partially) aligned

Type

float in [-inf, inf], default 0.0

wave_scale

Scale of the displacement effect

Type

float in [0, inf], default 1.0

wave_scale_min

Shortest allowed wavelength

Type

float in [0, inf], default 0.01

wind_velocity

Wind speed

Type

float in [-inf, inf], default 30.0

classmethod bl_rna_get_subclass(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The RNA type or default when not found.

Return type

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The class or default when not found.

Return type

type

Inherited Properties

Inherited Functions