跳转至

08b - 统计植被(TurbidBoundary)

当场景中叶片数量非常多时,可以用 TurbidBoundary 描述冠层占据的空间,并用叶面积密度、叶倾角分布和叶片光学属性描述内部叶片。它适合大尺度森林、作物群体以及需要同时计算光学、热红外和生理过程的场景。

什么时候使用统计植被

表示方式 适用场景
Mesh 需要显式叶片形状、叶脉或局部几何细节
TurbidBoundary 叶片数量很大,关注冠层尺度辐射和生理量
Mesh + TurbidBoundary 树干、枝条使用 Mesh,叶簇使用统计植被

边界网格只规定介质的空间范围。真正参与散射、吸收、热发射和生理计算的是边界内部的统计叶片。

准备封闭边界

边界 OBJ 必须满足:

  • 三角面形成封闭、无自交的体积;
  • 面朝向一致;
  • 没有开口、重复面或零面积三角形;
  • 放置和缩放后仍位于有效场景范围内。
import less

crown = less.TurbidBoundary(
    less.examples.asset_path("mixed_canopy.obj"),
    group="crown",
    sampling=less.TurbidSampling(
        quality="standard",
        seed=7,
    ),
)

设置内部叶片

leaf = less.Fluspect(
    cab=40,
    car=10,
    cw=0.012,
    cm=0.009,
    fqe=0.012,
)

vegetation = less.OpticalVegetation(
    leaf=leaf,
    leaf_area_density=1.25,
    leaf_angle_distribution="spherical",
    leaf_size=(0.08, 0.04),
    leaf_shape="ellipse",
)

leaf_area_density 的单位为 m² leaf area / m³ canopy volume。常用叶倾角分布为:

名称 叶片方向特征
spherical 球形分布,常用于缺少实测信息的冠层
uniform 倾角均匀
planophile 水平叶较多
erectophile 直立叶较多
plagiophile 中等倾角叶较多
extremophile 水平和直立叶较多

构建混合 Mesh / Turbid 场景

plant = less.Object("mixed_plant")
plant.add_component("crown", crown)
plant.add_component(
    "stem",
    less.Mesh(less.examples.asset_path("mixed_canopy.obj"), group="stem"),
)

plant.set_property("crown", vegetation)
plant.set_property("stem", less.Lambertian(reflectance=0.10))

scene = less.Scene(backend="optix")
scene.size = (20.0, 20.0)
scene.terrain = less.Terrain(property=less.Lambertian(reflectance=0.15))
scene.illumination = less.Illumination(source=less.Sun(zenith=30, azimuth=150), atmosphere=less.SimpleSpectralAtmosphere(turbidity=2.5))
scene.add(plant, positions=[(5, 5, 0), (10, 10, 0), (15, 15, 0)])

同一条光路会处理显式 Mesh 表面、统计叶片、地形和多次散射,不需要分别模拟后再叠加。

光学影像

image = scene.simulate(
    less.OpticalImager(
        projection=less.Orthographic(image_size=256),
        bands=[550, 680, 850],
        quality=64,
    ),
    scattering_order=8,
)
image.to_brf().save("turbid_brf.tif")

结果波段顺序与 bands 一致。辐亮度产品可用 to_brf() 转为 BRF。

LAI 和叶面积

lai = scene.simulate(less.LAIMeasurement(group_by="component"))
print(lai)

统计植被的叶面积由边界有效体积与 leaf_area_density 决定。缩放边界会改变体积,从而改变总叶面积。

能量平衡与叶温

为冠层添加热属性、生物物理属性和气孔导度模型:

plant.set_property(
    "crown",
    less.ThermalProperty(emissivity=0.98, temperature="air"),
)
plant.set_property(
    "crown",
    less.BiophysicalProperty(
        leaf_width=0.04,
        stomatal_resistance=100.0,
        stomata_side="bottom",
    ),
)

microclimate = less.Microclimate(
    air_temperature=27.0,
    humidity=60.0,
    wind_speed=2.0,
)

energy = scene.simulate(
    less.EnergyBalanceProcess(quality="standard"),
    microclimate=microclimate,
)

结果同时保留阳叶和阴叶条件温度,并提供按组件汇总的叶温和能量闭合信息。

光合作用

plant.set_property(
    "crown",
    less.Farquhar(Vcmax25=60.0, Jmax25=120.0),
)

photo = scene.simulate(
    less.PhotosynthesisProcess(
        temperature_mode="dynamic",
        quality="standard",
    ),
    microclimate=microclimate,
)

for key, apar, assimilation in zip(
    photo.component_keys, photo.APAR, photo.An
):
    print(key, apar, assimilation)

APAR 的单位为 µmol photons m^-2 leaf s^-1An 的单位为 µmol CO2 m^-2 leaf s^-1。动态温度模式会联合求解叶温、气孔导度和净光合速率。

SIF 源项与成像

sif_source = scene.simulate(
    less.SIFProcess(mode="dynamic", photo=photo)
)

sif_image = scene.simulate(less.SIFImager(
    projection=less.Orthographic(image_size=256),
    bands=[687, 740, 760],
    quality=128,
    sif_result=sif_source,
))
sif_image.save("turbid_sif.tif")

SIF 图像单位为 W m^-2 sr^-1 nm^-1mode="dynamic" 使用光合结果;mode="static" 使用叶片荧光量子产率。

热红外成像

thermal = scene.simulate(less.ThermalImager(
    projection=less.Orthographic(image_size=256),
    bands=[10600],
    quality=64,
    mode="precomputed",
    eb_result=energy,
))
thermal.save("turbid_thermal.tif")

mode="precomputed" 使用能量平衡得到的阳叶和阴叶温度。若只设置固定 ThermalProperty,可以使用默认的 mode="auto"

采样精度

TurbidSampling 控制统计叶片池和空间场的精度:

sampling = less.TurbidSampling(
    quality="high",
    sample_budget=16384,
    seed=42,
    orientation_theta_bins=4,
    orientation_phi_bins=8,
    max_samples_per_leaf_cell=64,
)
参数 作用
quality 预设采样质量;可选 previewstandardhigh
sample_budget 每个放置实例的目标样本数;省略时由质量预设决定
seed 可重复随机序列的种子
orientation_theta_bins / orientation_phi_bins 叶片方向离散数
max_samples_per_leaf_cell 自适应空间单元的样本上限

先用 preview 检查场景和参数,再用 standardhigh 生成正式结果。相同种子和配置会保持样本前缀稳定,便于比较不同质量设置。

保存和复用

TurbidSampling 会随 Scene/Project 序列化。只修改光照、光学属性或微气候时无需重建几何;修改边界、实例位置、叶面积密度、叶倾角或采样种子后,下一次构建会更新统计叶片域。

完整示例见 scripts/08b_turbid_medium.py

相关 API

  • less.TurbidBoundaryless.TurbidSampling
  • less.OpticalVegetationless.Fluspectless.Lambertian
  • less.Meshless.Objectless.Sceneless.Terrain
  • less.LAIMeasurementless.OpticalImagerless.BRFSensor
  • less.ThermalPropertyless.BiophysicalPropertyless.Farquhar
  • less.Microclimateless.EnergyBalanceProcessless.PhotosynthesisProcess
  • less.SIFProcessless.SIFImagerless.ThermalImager

下一章介绍多光谱和高光谱模拟。