Using it in PlayCanvas
PlayCanvas treats GLB as a container asset. In the Editor, upload GLB (FBX is converted to GLB on import) to get a template with the model hierarchy; in engine-only code use app.assets.loadFromUrl(url, 'container') and asset.resource.instantiateRenderEntity().
- LOD: there is no built-in LOD component, so a small script compares camera distance and toggles the render components of the LOD0–LOD3 entities.
- Static trees can share a batch group to merge draw calls; for large forests use hardware instancing with
meshInstance.setInstancing()and a vertex buffer of transforms. - Leaves: glTF MASK sets
alphaTeston the StandardMaterial; use cull mode none for two-sided leaves. - Collision mesh: a collision component of type mesh plus a static rigidbody, with its render component disabled.