14 - Water and submerged objects¶
The examples in this chapter require LESS 3.1.1 or later. See Installation and setup.
Water uses an ordinary Object, just like vegetation and buildings. WaterBoundary defines its geometry. WaterSurface describes the optical interface, and HomogeneousMedium describes the optical water column. Thermal infrared and microwave sensing use their own properties.
| Sensing domain | Water model | Main inputs |
|---|---|---|
| Visible, near-infrared and shortwave infrared | Interface reflection and refraction, water-column absorption and scattering, bottom and submerged targets | Refractive index, absorption and scattering spectra, phase function, bottom and target properties |
| Thermal infrared | Opaque-water emission and environmental reflection | Skin temperature and spectral complex refractive index |
| Active and passive microwave | Opaque-water polarized scattering and emission | Water temperature, salinity or complex permittivity, surface roughness |
One water region can carry properties for all three domains. The sensor selects wavelengths or frequencies; the properties describe the physical response across that range. Thermal-only and microwave-only simulations do not need optical water-column inputs.
Water can be included in simulations of optical images, BRF, forward irradiance and absorption, thermal images, microwave brightness temperature and radar backscatter.
Extent, level and depth¶
water = less.Object("lake")
water.add_component("water", less.WaterBoundary(extent=(100, 80)))
scene.add(water, positions=[(50, 40, 10)])
The rectangular footprint is 100 m × 80 m. Its surface centre is at (50, 40, 10), with a water-level elevation of 10 m. Elevation is measured in scene coordinates. The component name water is your choice.
The top and four sides are physical water–air interfaces. The default depth=None adds no lower boundary. Setting depth=5 adds a water–air boundary 5 m below the surface. Soil, a lake bed or pool walls are separate terrain or mesh objects.
Use a closed OBJ for an irregular water volume:
water = less.Object("pond")
water.add_component("water", less.WaterBoundary("pond.obj", group="water"))
scene.add(water, positions=[(0, 0, 0)])
A closed OBJ retains its ordinary mesh origin, coordinates and placement transforms. Its vertices define a finite volume. Every boundary face, including sides and the bottom, is a water–air interface with its actual normal. Rectangular dimensions and an OBJ path are mutually exclusive; an OBJ does not take a separate constant depth.
Set scene.size to cover the complete water region. These boundaries describe physical water domains. A computational crop of an extended lake or ocean requires a separately defined continuation or periodic boundary model.
Waves¶
RegularWaves superposes one or more regular gravity waves into a surface with real elevation and slopes. The resulting geometry produces view-dependent reflections, solar glitter, refraction and occlusion.
waves = less.RegularWaves(
height=[0.18, 0.06], wavelength=[4.25, 2.8],
direction=[0, 70], phase=[15, 40], dispersion_depth=1.2,
)
boundary = less.WaterBoundary(
extent=(24, 24), depth=4, waves=waves, time=0.35,
)
water = less.Object("pond")
water.add_component("water", boundary)
water.set_property("water", less.WaterSurface(mode="interface", roughness=None))
water.set_property("water", less.HomogeneousMedium(
wavelengths=[450, 550, 650], absorption=[0.02, 0.06, 0.3],
))
scene.add(water, positions=[(20, 20, 1.2)])
height is the crest-to-trough height and wavelength is the wavelength, both in metres. direction is the propagation azimuth, north 0° and east 90°; phase is the initial phase in degrees. Scalars describe a single wave, and equal-length sequences describe multiple components. Scalar parameters can also accompany sequences. Directions are local to the water object, so rotating the object also rotates its waves.
dispersion_depth sets the depth used to calculate wave propagation speed, in metres. Its default, None, selects deep-water dispersion. It is separate from the geometric depth: the former describes wave propagation and the latter closes the water volume. Wavy water requires a finite depth; place the lower boundary below the actual bed or solid enclosure.
time selects the wave instant in seconds. Each simulation uses a static surface at that instant. Change the time and rebuild geometry to simulate another instant while retaining properties and instance placements:
The default mesh spacing follows the shortest projected wavelength. For a finer surface, set mesh_spacing=0.1, or use mesh_spacing=(0.2, 0.1) for separate horizontal spacings in metres. Compare results at smaller spacings to check geometric convergence. Scene files save the wave parameters and time, then regenerate the surface when loaded.
Wave geometry works with optical, thermal infrared and microwave properties. Regular waves describe small-amplitude, unbroken waves; ocean spectra, breaking waves and ship wakes need their corresponding surface models. A ship hull can be an ordinary Object, interacting with the water surface and column.
The bundled example includes waves, real-structure trees and their reflections:
Multiple water regions¶
Create separate Object instances for independent regions with different spectra, temperatures or salinities. Regions with identical geometry and properties can share one object's geometry through multiple placements:
ponds = less.Object("ponds")
ponds.add_component("water", less.WaterBoundary(extent=(10, 10)))
scene.add(ponds, positions=[(15, 15, 2), (50, 15, 2), (85, 15, 2)])
These three regions share component properties at different positions. Use separate objects when properties differ, then attach the appropriate domain properties as shown below.
Bottom, banks and submerged objects¶
Use ordinary Terrain or Object geometry for bottom surfaces, banks, rocks and buildings:
bottom = less.Object("lake_bottom")
bottom.add_component("soil", less.Mesh("bottom.obj", group="soil"))
bottom.set_property("soil", less.Lambertian(reflectance=0.15))
scene.add(bottom, positions=[(0, 0, 0)])
At a water level of 10 m, a bottom elevation of 7 m gives a depth of 3 m. Terrain above the water level is exposed land. A ray travelling through water interacts with a solid using that solid's assigned properties, without inserting an additional water–air interface.
Place artificial closure faces outside the actual bottom or walls so that rays encounter the real solid first. A solid surface takes priority at a coincident water boundary. Its reflection and transmission follow the assigned surface model; a water boundary does not automatically add a dielectric coating to soil.
Oblique-image pixel coordinates refer to the measurement plane, and refraction changes the apparent position of submerged targets. Set scene.measurement_plane = 0 to align pixels on the zero-elevation plane. The default reference plane is at the scene top.
Visible, near-infrared and shortwave infrared¶
water.set_property("water", less.WaterSurface(
mode="interface", roughness=None, refractive_index=1.333,
))
water.set_property("water", less.HomogeneousMedium(
wavelengths=[450, 550, 650],
absorption=[0.02, 0.07, 0.43],
scattering=[0.03, 0.03, 0.02],
g=0.85,
))
These values illustrate parameter entry. Wavelengths are in nm; absorption and scattering coefficients are in m⁻¹. g is the Henyey–Greenstein asymmetry parameter. Spectra are interpolated at the sensor wavelengths and must cover the requested range. Scalars remain constant across that range.
The explicit water-column model accounts for interface reflection and refraction, volume absorption and scattering, and submerged surfaces. It uses smooth optical interfaces (roughness=None). No prescribed water-leaving term is added to the calculated water column.
BRF includes reflected sky and diffuse returns from the water column and bottom.
A perfectly smooth interface has no finite point BRF in the exact mirror direction
of a directional sun. Use OpticalImager to view sun glint and the solar disc.
ForwardRadiationFieldSensor records absorption in layers. Its layer_heights delimit a recording grid, not the physical water domain. absorption_grid and outside_grid_absorbed retain absorption inside and outside that grid; full energy accounting includes both.
Thermal infrared¶
Temperature is in K. The opaque smooth-water model accounts for skin emission and reflected environmental thermal radiance. Default optical constants use the Hale–Querry liquid-water measurements at 25 °C; emission uses the specified skin temperature. Custom constants accept wavelengths, refractive_index and extinction_index.
Emissivity follows complex Fresnel reflection and Kirchhoff's relation and varies with wavelength and angle. Thermal-only sensing needs no optical water column. This surface model does not transmit bottom thermal radiance through the water.
The model applies when the water is opaque at the requested wavelengths. A very thin layer needs finite-thickness absorption, emission and transmission; changing the geometry's depth does not supply those processes.
Microwave¶
water.set_property("water", less.WaterMicrowave(
temperature=293.15, salinity=0, surface_model="specular",
))
Temperature is in K and salinity in parts per thousand. Sensors specify frequency and polarization. The property specifies dielectric response and roughness. The default Klein–Swift model covers 0–30 °C, salinity 0–40 and frequencies up to 8 GHz. Alternatively, supply complex relative permittivity with nonnegative imaginary part for loss.
Use surface_model="specular" for smooth water. Gaussian rough surfaces support "small_perturbation", "physical_optics" and "geometric_optics", with rms_height and correlation_length in metres. Select a model within its frequency, roughness and angular validity range.
Active and passive microwave sensing share this property and calculate polarized scattering and brightness, respectively. Water is an opaque surface; this model does not produce microwave bottom images.
Water temperature represents the effective near-surface temperature for microwave emission and can differ from the thermal-infrared skin temperature. Finite-layer transmission and underwater receivers require a separate volume model; this surface property describes sufficiently thick water.
Complete example¶
The bundled example places fresh and saline water over the same soil and provides optical, thermal infrared and microwave sensors:
Use show=False to return the simulated products:
Property updates¶
water.set_property("water", less.WaterThermal(temperature=305))
water.remove_property("water", "medium")
Property updates reuse the existing scene geometry. Removing an explicit component property retains ordinary Object default-property rules. Supply the properties needed by the requested observing domain.