Bakes every mesh under root (world transforms included) into a heightfield by rasterising its
triangles on the CPU — works for any geometry and avoids per-blade raycasts. Where surfaces
overlap, the highest wins. Returns a bilinear sampler that yields NaN outside the terrain.
Parameters
root: Object3D
maxResolution: number = 1024
Samples along the longer side of the terrain's bounding box.
Bakes every mesh under
root(world transforms included) into a heightfield by rasterising its triangles on the CPU — works for any geometry and avoids per-blade raycasts. Where surfaces overlap, the highest wins. Returns a bilinear sampler that yields NaN outside the terrain.