HighMap library (C++)
Loading...
Searching...
No Matches
erosion.hpp File Reference

Implements hydraulic and thermal erosion algorithms for terrain modeling, including particle-based flow, sediment transport (Musgrave, Benes, Olsen), slope-driven diffusion, and procedural ridge formation. Supports GPU-accelerated methods and generates erosion/deposition maps for geomorphic analysis. More...

Go to the source code of this file.

Namespaces

namespace  hmap
 
namespace  hmap::gpu
 

Enumerations

enum  hmap::ErosionProfile : int {
  hmap::COSINE , hmap::SAW_SHARP , hmap::SAW_SMOOTH , hmap::SHARP_VALLEYS ,
  hmap::SQUARE_SMOOTH , hmap::TRIANGLE_GRENIER , hmap::TRIANGLE_SHARP , hmap::TRIANGLE_SMOOTH
}
 Procedural erosion angular profile type. More...
 

Functions

std::function< float(float)> hmap::get_erosion_profile_function (const ErosionProfile &erosion_profile, float delta, float &profile_avg)
 
void hmap::coastal_erosion_diffusion (Array &z, Array &water_depth, float additional_depth, int iterations=10, Array *p_water_mask=nullptr)
 Simulates terrain diffusion due to coastal erosion.
 
void hmap::coastal_erosion_profile (Array &z, Array &water_depth, float shore_ground_extent, float shore_water_extent, float slope_shore=0.5f, float slope_shore_water=0.5f, float scarp_extent_ratio=0.5f, bool apply_post_filter=true, Array *p_shore_mask=nullptr)
 Applies a coastal erosion profile to a terrain elevation field.
 
void hmap::coastal_erosion_profile (Array &z, const Array *p_mask, Array &water_depth, float shore_ground_extent, float shore_water_extent, float slope_shore=0.5f, float slope_shore_water=0.5f, float scarp_extent_ratio=0.5f, bool apply_post_filter=true, Array *p_shore_mask=nullptr)
 
void hmap::depression_filling (Array &z, int iterations=1000, float epsilon=1e-4f)
 Fill the depressions of the heightmap using the Planchon-Darboux algorithm.
 
void hmap::depression_filling_priority_flood (Array &z)
 
void hmap::erosion_maps (Array &z_before, Array &z_after, Array &erosion_map, Array &deposition_map, float tolerance=0.f)
 
void hmap::hydraulic_algebric (Array &z, Array *p_mask, float talus_ref, int ir, Array *p_bedrock=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float c_erosion=0.05f, float c_deposition=0.05f, int iterations=1)
 Apply an algerbic formula based on the local gradient to perform erosion/deposition.
 
void hmap::hydraulic_algebric (Array &z, float talus_ref, int ir, Array *p_bedrock=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float c_erosion=0.05f, float c_deposition=0.05f, int iterations=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::hydraulic_benes (Array &z, Array *p_mask, int iterations=50, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float c_capacity=40.f, float c_erosion=0.2f, float c_deposition=0.8f, float water_level=0.005f, float evap_rate=0.01f, float rain_rate=0.5f)
 Apply cell-based hydraulic erosion/deposition based on Benes et al. procedure.
 
void hmap::hydraulic_benes (Array &z, int iterations=50, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float c_capacity=40.f, float c_erosion=0.2f, float c_deposition=0.8f, float water_level=0.005f, float evap_rate=0.01f, float rain_rate=0.5f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::hydraulic_blur (Array &z, float radius, float vmax, float k_smoothing=0.1f)
 Apply cell-based hydraulic erosion using a nonlinear diffusion model.
 
void hmap::hydraulic_diffusion (Array &z, float c_diffusion, float talus, int iterations)
 Apply cell-based hydraulic erosion using a nonlinear diffusion model.
 
void hmap::hydraulic_musgrave (Array &z, Array &moisture_map, int iterations=100, float c_capacity=1.f, float c_erosion=0.1f, float c_deposition=0.1f, float water_level=0.01f, float evap_rate=0.01f)
 Apply cell-based hydraulic erosion/deposition of Musgrave et al. (1989).
 
void hmap::hydraulic_musgrave (Array &z, int iterations=100, float c_capacity=1.f, float c_erosion=0.1f, float c_deposition=0.1f, float water_level=0.01f, float evap_rate=0.01f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::hydraulic_particle (Array &z, Array *p_mask, int nparticles, int seed, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float c_capacity=10.f, float c_erosion=0.05f, float c_deposition=0.05f, float c_inertia=0.3f, float drag_rate=0.001f, float evap_rate=0.001f, bool post_filtering=false)
 Apply hydraulic erosion using a particle based procedure.
 
void hmap::hydraulic_particle (Array &z, int nparticles, int seed, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float c_capacity=10.f, float c_erosion=0.05f, float c_deposition=0.05f, float c_inertia=0.3f, float drag_rate=0.001f, float evap_rate=0.001f, bool post_filtering=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::hydraulic_particle_multiscale (Array &z, float particle_density, int seed, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float c_capacity=10.f, float c_erosion=0.05f, float c_deposition=0.01f, float c_inertia=0.3f, float drag_rate=0.01f, float evap_rate=0.001f, int pyramid_finest_level=0)
 Apply hydraulic erosion using a particle based procedure, using a pyramid decomposition to allow a multiscale approach.
 
void hmap::hydraulic_procedural (Array &z, uint seed, float ridge_wavelength, float ridge_scaling=0.1f, ErosionProfile erosion_profile=ErosionProfile::TRIANGLE_SMOOTH, float delta=0.02f, float noise_ratio=0.2f, int prefilter_ir=-1, float density_factor=1.f, float kernel_width_ratio=2.f, float phase_smoothing=2.f, float phase_noise_amp=M_PI, bool reverse_phase=false, bool rotate90=false, bool use_default_mask=true, float talus_mask=0.f, Array *p_mask=nullptr, Array *p_ridge_mask=nullptr, float vmin=0.f, float vmax=-1.f)
 Generates a procedurally eroded terrain using hydraulic erosion and ridge generation techniques.
 
void hmap::hydraulic_spl (Array &z)
 
void hmap::hydraulic_stream (Array &z, float c_erosion, float talus_ref, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, int ir=1, float clipping_ratio=10.f)
 Apply hydraulic erosion based on a flow accumulation map.
 
void hmap::hydraulic_stream (Array &z, Array *p_mask, float c_erosion, float talus_ref, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, int ir=1, float clipping_ratio=10.f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::hydraulic_stream_log (Array &z, float c_erosion, float talus_ref, int deposition_ir=32, float deposition_scale_ratio=1.f, float gradient_power=0.8f, float gradient_scaling_ratio=1.f, int gradient_prefilter_ir=16, float saturation_ratio=1.f, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, Array *p_flow_map=nullptr)
 Apply hydraulic erosion based on a flow accumulation map, alternative formulation.
 
void hmap::hydraulic_stream_log (Array &z, float c_erosion, float talus_ref, Array *p_mask, int deposition_ir=32, float deposition_scale_ratio=1.f, float gradient_power=0.8f, float gradient_scaling_ratio=1.f, int gradient_prefilter_ir=16, float saturation_ratio=1.f, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, Array *p_flow_map=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::hydraulic_stream_upscale_amplification (Array &z, float c_erosion, float talus_ref, int upscaling_levels=1, float persistence=1.f, int ir=1, float clipping_ratio=10.f)
 Applies hydraulic erosion with upscaling amplification.
 
void hmap::hydraulic_stream_upscale_amplification (Array &z, Array *p_mask, float c_erosion, float talus_ref, int upscaling_levels=1, float persistence=1.f, int ir=1, float clipping_ratio=10.f)
 Applies hydraulic erosion with upscaling amplification, with a post-processing intensity mask.
 
void hmap::hydraulic_vpipes (Array &z, Array *p_mask, int iterations, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float water_height=0.1f, float c_capacity=0.1f, float c_erosion=0.05f, float c_deposition=0.05f, float rain_rate=0.f, float evap_rate=0.01f)
 Apply hydraulic erosion using the 'virtual pipes' algorithm.
 
void hmap::hydraulic_vpipes (Array &z, int iterations, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float water_height=0.1f, float c_capacity=0.1f, float c_erosion=0.05f, float c_deposition=0.05f, float rain_rate=0.f, float evap_rate=0.01f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::sediment_deposition (Array &z, Array *p_mask, const Array &talus, Array *p_deposition_map=nullptr, float max_deposition=0.01, int iterations=5, int thermal_subiterations=10)
 Perform sediment deposition combined with thermal erosion.
 
void hmap::sediment_deposition (Array &z, const Array &talus, Array *p_deposition_map=nullptr, float max_deposition=0.01, int iterations=5, int thermal_subiterations=10)
 
void hmap::sediment_deposition_particle (Array &z, Array *p_mask, int nparticles, int ir, int seed=1, Array *p_spawning_map=nullptr, Array *p_deposition_map=nullptr, float particle_initial_sediment=0.1f, float deposition_velocity_limit=0.01f, float drag_rate=0.001f)
 
void hmap::sediment_deposition_particle (Array &z, int nparticles, int ir, int seed=1, Array *p_spawning_map=nullptr, Array *p_deposition_map=nullptr, float particle_initial_sediment=0.1f, float deposition_velocity_limit=0.01f, float drag_rate=0.001f)
 
void hmap::sediment_layer (Array &z, const Array &talus_layer, const Array &talus_upper_limit, int iterations, bool apply_post_filter=true, Array *p_deposition_map=nullptr)
 
void hmap::stratify (Array &z, Array *p_mask, std::vector< float > hs, std::vector< float > gamma, Array *p_noise=nullptr)
 Stratify the heightmap by creating a series of layers with elevations corrected by a gamma factor.
 
void hmap::stratify (Array &z, std::vector< float > hs, std::vector< float > gamma, Array *p_noise=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::stratify (Array &z, std::vector< float > hs, float gamma=0.5f, Array *p_noise=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::stratify (Array &z, Array &partition, int nstrata, float strata_noise, float gamma, float gamma_noise, int npartitions, uint seed, float mixing_gain_factor=1.f, Array *p_noise=nullptr, float vmin=1.f, float vmax=0.f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::stratify_multiscale (Array &z, float zmin, float zmax, std::vector< int > n_strata, std::vector< float > strata_noise, std::vector< float > gamma_list, std::vector< float > gamma_noise, uint seed, Array *p_mask=nullptr, Array *p_noise=nullptr)
 Stratify the heightmap by creating a multiscale series of layers with elevations corrected by a gamma factor.
 
void hmap::stratify_oblique (Array &z, Array *p_mask, std::vector< float > hs, std::vector< float > gamma, float talus, float angle, Array *p_noise=nullptr)
 Stratify the heightmap by creating a series of oblique layers with elevations corrected by a gamma factor.
 
void hmap::stratify_oblique (Array &z, std::vector< float > hs, std::vector< float > gamma, float talus, float angle, Array *p_noise=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::thermal (Array &z, Array *p_mask, const Array &talus, int iterations=10, Array *p_bedrock=nullptr, Array *p_deposition_map=nullptr)
 Apply thermal weathering erosion.
 
void hmap::thermal (Array &z, const Array &talus, int iterations=10, Array *p_bedrock=nullptr, Array *p_deposition_map=nullptr)
 
void hmap::thermal (Array &z, float talus, int iterations=10, Array *p_bedrock=nullptr, Array *p_deposition_map=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::thermal_auto_bedrock (Array &z, const Array &talus, int iterations=10, Array *p_deposition_map=nullptr)
 Apply thermal weathering erosion with automatic determination of the bedrock.
 
void hmap::thermal_auto_bedrock (Array &z, float talus, int iterations=10, Array *p_deposition_map=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::thermal_auto_bedrock (Array &z, Array *p_mask, float talus, int iterations=10, Array *p_deposition_map=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::thermal_flatten (Array &z, const Array &talus, const Array &bedrock, int iterations=10, int post_filter_ir=1)
 Apply modified thermal weathering of Olsen.
 
void hmap::thermal_flatten (Array &z, float talus, int iterations=10, int post_filter_ir=1)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::thermal_olsen (Array &z, const Array &talus, int iterations=10, Array *p_bedrock=nullptr, Array *p_deposition_map=nullptr)
 Apply thermal weathering erosion.
 
void hmap::thermal_rib (Array &z, int iterations, Array *p_bedrock=nullptr)
 Apply thermal erosion using a 'rib' algorithm (taken from Geomorph).
 
void hmap::thermal_schott (Array &z, const Array &talus, int iterations=10, float intensity=0.001f)
 Applies the thermal erosion process to an array of elevation values.
 
void hmap::thermal_schott (Array &z, const Array &talus, Array *p_mask, int iterations=10, float intensity=0.001f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::thermal_schott (Array &z, const float talus, int iterations=10, float intensity=0.001f)
 Applies the thermal erosion process with a uniform slope threshold.
 
void hmap::thermal_schott (Array &z, const float talus, Array *p_mask, int iterations=10, float intensity=0.001f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Array hmap::watershed_ridge (const Array &z, float amplitude=0.5f, int ir=1, float edt_exponent=0.5f, FlowDirectionMethod fd_method=FlowDirectionMethod::FDM_D8)
 Carves watershed ridges using basin-wise distance transforms.
 
Array hmap::watershed_ridge (const Array &z, Array *p_mask, float amplitude=0.5f, int ir=1, float edt_exponent=0.5f, FlowDirectionMethod fd_method=FlowDirectionMethod::FDM_D8)
 
void hmap::gpu::hydraulic_particle (Array &z, int nparticles, int seed, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float c_capacity=10.f, float c_erosion=0.05f, float c_deposition=0.05f, float c_inertia=0.3f, float c_gravity=1.f, int radius=2, float drag_rate=0.001f, float evap_rate=0.001f, bool post_filtering=false)
 See hmap::hydraulic_particle.
 
void hmap::gpu::hydraulic_particle (Array &z, Array *p_mask, int nparticles, int seed, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, float c_capacity=10.f, float c_erosion=0.05f, float c_deposition=0.05f, float c_inertia=0.3f, float c_gravity=1.f, int radius=2, float drag_rate=0.001f, float evap_rate=0.001f, bool post_filtering=false)
 See hmap::hydraulic_particle.
 
void hmap::gpu::hydraulic_schott (Array &z, int iterations, const Array &talus, float c_erosion=1.f, float c_thermal=0.1f, float c_deposition=0.2f, float flow_acc_exponent=0.8f, float flow_acc_exponent_depo=0.8f, float flow_routing_exponent=1.3f, float thermal_weight=1.5f, float deposition_weight=2.5f, Array *p_flow=nullptr)
 Simulates hydraulic erosion and deposition on a heightmap using the Schott method.
 
void hmap::gpu::hydraulic_schott (Array &z, int iterations, const Array &talus, Array *p_mask, float c_erosion=1.f, float c_thermal=0.1f, float c_deposition=0.2f, float flow_acc_exponent=0.8f, float flow_acc_exponent_depo=0.8f, float flow_routing_exponent=1.3f, float thermal_weight=1.5f, float deposition_weight=2.5f, Array *p_flow=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::gpu::hydraulic_schott_erosion (Array &z, int iterations, float c_erosion=1.f, float flow_acc_exponent=0.8f, float flow_routing_exponent=1.3f, Array *p_flow=nullptr)
 See hmap::hydraulic_schott.
 
void hmap::gpu::hydraulic_stream_log (Array &z, float c_erosion, float talus_ref, int deposition_ir=32, float deposition_scale_ratio=1.f, float gradient_power=0.8f, float gradient_scaling_ratio=1.f, int gradient_prefilter_ir=16, float saturation_ratio=1.f, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, Array *p_flow_map=nullptr)
 See hmap::hydraulic_stream_log.
 
void hmap::gpu::hydraulic_stream_log (Array &z, float c_erosion, float talus_ref, Array *p_mask, int deposition_ir=32, float deposition_scale_ratio=1.f, float gradient_power=0.8f, float gradient_scaling_ratio=1.f, int gradient_prefilter_ir=16, float saturation_ratio=1.f, Array *p_bedrock=nullptr, Array *p_moisture_map=nullptr, Array *p_erosion_map=nullptr, Array *p_deposition_map=nullptr, Array *p_flow_map=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::gpu::hydraulic_vpipes (Array &z, float water_height=1e-2f, bool maintain_water_volume=true, float evap_rate=0.1f, int iterations=50, float dt=0.5f, float k_capacity=0.5f, float k_erode=0.001f, float k_depose=0.01f, float k_discharge_exp=1.f, bool flux_diffusion=true, float flux_diffusion_strength=0.001f, Array *p_rain_map=nullptr, Array *p_water_depth=nullptr, Array *p_sediment=nullptr, Array *p_vel_u=nullptr, Array *p_vel_v=nullptr)
 See hmap::hydraulic_vpipes.
 
void hmap::gpu::rifts (Array &z, const glm::vec2 &kw, float angle, float amplitude, uint seed, float elevation_noise_shift=0.f, float k_smooth_bottom=0.05f, float k_smooth_top=0.05f, float radial_spread_amp=0.2f, float elevation_noise_amp=0.1f, float clamp_vmin=0.f, float remap_vmin=0.f, bool apply_mask=true, bool reverse_mask=false, float mask_gamma=1.f, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const Array *p_mask=nullptr, const glm::vec2 &center={0.5f, 0.5f}, const glm::vec4 &bbox={0.f, 1.f, 0.f, 1.f})
 Applies a "rift" deformation effect to a heightmap array.
 
void hmap::gpu::strata (Array &z, float angle, float slope, float gamma, uint seed, bool linear_gamma=true, float kz=1.f, int octaves=4, float lacunarity=2.f, float gamma_noise_ratio=0.5f, float noise_amp=0.4f, const glm::vec2 &noise_kw={4.f, 4.f}, const glm::vec2 &ridge_noise_kw={4.f, 1.2f}, float ridge_angle_shift=45.f, float ridge_noise_amp=0.5f, float ridge_clamp_vmin=0.f, float ridge_remap_vmin=0.f, bool apply_elevation_mask=true, bool apply_ridge_mask=true, float mask_gamma=0.4f, const Array *p_mask=nullptr, const glm::vec4 &bbox={0.f, 1.f, 0.f, 1.f})
 Applies stratification to a heightfield using directional noise and multiscale gamma transformations.
 
void hmap::gpu::thermal (Array &z, const Array &talus, int iterations=10, Array *p_bedrock=nullptr, Array *p_deposition_map=nullptr)
 See hmap::thermal.
 
void hmap::gpu::thermal (Array &z, Array *p_mask, const Array &talus, int iterations=10, Array *p_bedrock=nullptr, Array *p_deposition_map=nullptr)
 See hmap::thermal.
 
void hmap::gpu::thermal (Array &z, float talus, int iterations=10, Array *p_bedrock=nullptr, Array *p_deposition_map=nullptr)
 See hmap::thermal.
 
void hmap::gpu::thermal_auto_bedrock (Array &z, const Array &talus, int iterations=10, Array *p_deposition_map=nullptr)
 See hmap::thermal_auto_bedrock.
 
void hmap::gpu::thermal_auto_bedrock (Array &z, Array *p_mask, const Array &talus, int iterations=10, Array *p_deposition_map=nullptr)
 See hmap::thermal_auto_bedrock.
 
void hmap::gpu::thermal_auto_bedrock (Array &z, float, int iterations=10, Array *p_deposition_map=nullptr)
 See hmap::thermal_auto_bedrock.
 
void hmap::gpu::thermal_olsen (Array &z, const Array &talus, int iterations)
 See hmap::thermal_olsen.
 
void hmap::gpu::thermal_olsen (Array &z, Array *p_mask, const Array &talus, int iterations)
 
void hmap::gpu::thermal_inflate (Array &z, const Array &talus, int iterations=10)
 Apply thermal weathering erosion to give a scree like effect.
 
void hmap::gpu::thermal_inflate (Array &z, const Array *p_mask, const Array &talus, int iterations=10)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::gpu::thermal_rib (Array &z, int iterations, Array *p_bedrock=nullptr)
 See hmap::thermal_rib.
 
void hmap::gpu::thermal_ridge (Array &z, const Array &talus, int iterations=10, Array *p_deposition_map=nullptr)
 Apply thermal weathering erosion to give a ridge like effect.
 
void hmap::gpu::thermal_ridge (Array &z, const Array *p_mask, const Array &talus, int iterations=10, Array *p_deposition_map=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::gpu::thermal_scree (Array &z, const Array &talus, const Array &zmax, int iterations=10, Array *p_deposition_map=nullptr)
 Performs thermal scree erosion on a heightmap.
 
void hmap::gpu::thermal_scree (Array &z, const Array *p_mask, const Array &talus, const Array &zmax, int iterations=10, Array *p_deposition_map=nullptr)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void hmap::gpu::valley_fill (Array &z, const Array &talus, int iterations=100, float gamma=2.f, float ratio=0.8f, float zmin=0.f, float zmax=0.f, float elevation_max_ratio=1.f, bool preserve_elevation_range=true, const Array *p_noise=nullptr, Array *p_deposition_map=nullptr)
 Fill valleys using thermal scree deposition and height-based blending.
 
void hmap::gpu::valley_fill (Array &z, const Array *p_mask, const Array &talus, int iterations=100, float gamma=2.f, float ratio=0.8f, float zmin=0.f, float zmax=0.f, float elevation_max_ratio=1.f, bool preserve_elevation_range=true, const Array *p_noise=nullptr, Array *p_deposition_map=nullptr)
 
Array hmap::gpu::watershed_ridge (const Array &z, float amplitude=0.5f, int ir=1, float edt_exponent=0.5f, FlowDirectionMethod fd_method=FlowDirectionMethod::FDM_D8, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr)
 See hmap::watershed_ridge.
 
Array hmap::gpu::watershed_ridge (const Array &z, Array *p_mask, float amplitude=0.5f, int ir=1, float edt_exponent=0.5f, FlowDirectionMethod fd_method=FlowDirectionMethod::FDM_D8, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr)
 See hmap::watershed_ridge.
 

Detailed Description

Implements hydraulic and thermal erosion algorithms for terrain modeling, including particle-based flow, sediment transport (Musgrave, Benes, Olsen), slope-driven diffusion, and procedural ridge formation. Supports GPU-accelerated methods and generates erosion/deposition maps for geomorphic analysis.

Author
Otto Link (otto..nosp@m.link.nosp@m..bv@g.nosp@m.mail.nosp@m..com)