# 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.0

  `choppiness`

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

    Type: | float in [0, inf], default 0.0

  `damping`

    Damp reflected waves going in opposite direction to the wind

    Type: | float in [0, 1], default 0.0

  `depth`

    Depth of the solid ground below the water surface

    Type: | float in [-inf, inf], default 0.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 0

  `frame_start`

    Start frame of the ocean baking

    Type: | int in [-inf, inf], default 0

  `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’

  `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 0

  `repeat_y`

    Repetitions of the generated surface in Y

    Type: | int in [1, 1024], default 0

  `resolution`

    Resolution of the generated surface

    Type: | int in [1, 1024], default 0

  `size`

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

    Type: | float in [0, inf], default 0.0

  `spatial_size`

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

    Type: | int in [-inf, inf], default 0

  `time`

    Current time of the simulation

    Type: | float in [0, inf], default 0.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

  `wave_alignment`

    How much the waves are aligned to each other

    Type: | float in [0, 10], 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 0.0

  `wave_scale_min`

    Shortest allowed wavelength

    Type: | float in [0, inf], default 0.0

  `wind_velocity`

    Wind speed

    Type: | float in [-inf, inf], default 0.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

`bpy_struct.id_data` `Modifier.name` `Modifier.type` `Modifier.show_viewport` `Modifier.show_render` | `Modifier.show_in_editmode` `Modifier.show_on_cage` `Modifier.show_expanded` `Modifier.use_apply_on_spline`

Inherited Functions

`bpy_struct.as_pointer` `bpy_struct.driver_add` `bpy_struct.driver_remove` `bpy_struct.get` `bpy_struct.is_property_hidden` `bpy_struct.is_property_overridable_library` `bpy_struct.is_property_readonly` `bpy_struct.is_property_set` `bpy_struct.items` `bpy_struct.keyframe_delete` | `bpy_struct.keyframe_insert` `bpy_struct.keys` `bpy_struct.path_from_id` `bpy_struct.path_resolve` `bpy_struct.pop` `bpy_struct.property_overridable_library_set` `bpy_struct.property_unset` `bpy_struct.type_recast` `bpy_struct.values`