FoliMesh

Ground cover for Babylon.js

Babylon.js loads GLB with the glTF loader in @babylonjs/loaders: ImportMeshAsync, or LoadAssetContainerAsync when you need many copies through instantiateModelsToScene. Fern, Grass Tuft and Reed ship with LOD0–LOD3 and a collision mesh, so a forest floor or shoreline stays light in the browser.

Link levels with lod0.addLODLevel(30, lod1) and addLODLevel(80, lod2); passing null as the mesh hides the object beyond that distance. Thousands of tufts render as thin instances (thinInstanceAdd with matrices) in one draw call per mesh — use createInstance only where each plant needs picking. Leaves are glTF MASK, so an alpha-tested PBRMaterial. Set the collision mesh to isVisible = false and hand it to checkCollisions or Havok's PhysicsAggregate with a MESH shape.

Models
3
Levels of detail
LOD0 – LOD3
Formats
GLB · FBX · OBJ

Using it in Babylon.js

Babylon.js loads GLB through the glTF loader in @babylonjs/loaders: ImportMeshAsync (or SceneLoader.ImportMeshAsync in older code), or LoadAssetContainerAsync when you need many copies via instantiateModelsToScene.

  • LOD: lod0.addLODLevel(30, lod1), addLODLevel(80, lod2) and so on; passing null as the mesh hides the object beyond that distance.
  • Thousands of trees: thin instances (thinInstanceAdd with matrices) render in one draw call per mesh; use regular createInstance when each tree needs its own picking or logic.
  • Leaves: glTF MASK maps to alpha-tested PBRMaterial (MATERIAL_ALPHATEST).
  • Collision mesh: set isVisible = false and use it with checkCollisions or Havok physics (PhysicsAggregate with a MESH shape).

Other categories

Same in other styles

Same for other engines