FoliMesh

Cacti & Succulents for Babylon.js

Desert levels in Babylon.js are a loading problem: how many plants you can clone before the frame budget goes. Five cacti and succulents — Saguaro, Barrel Cactus, Prickly Pear, Agave and Aloe — ship as GLB that goes through @babylonjs/loaders with ImportMeshAsync, or LoadAssetContainerAsync when you intend to scatter the same plant across a survival or western map.

Each model carries LOD0–LOD3, a collision mesh and a base pivot, so lod0.addLODLevel(30, lod1) and addLODLevel(80, lod2) thin the horizon as the camera pulls back, and null hides a plant beyond its last level. Leaf and spine cards use glTF MASK, which Babylon.js reads as an alpha-tested PBRMaterial. Thousands of agaves go in with thinInstanceAdd at one draw call per mesh; createInstance is for plants that need picking. Invisible collision meshes serve checkCollisions or a Havok PhysicsAggregate.

Models
5
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).

Packs

Other categories

Same in other styles

Same for other engines