Foliage is one of the most expensive runtime costs in any open-world game. Trees, bushes, and grass blow through your draw call budget in seconds if they're not set up correctly — and most artists do not know where the real bottlenecks are until it's too late. SpeedTree solves a lot of the hard problems automatically, but only if you export, configure, and integrate it the right way.
Exporting SpeedTree Assets for Unity and Unreal Engine 5
SpeedTree ships with dedicated export pipelines for both Unity and Unreal Engine 5. The workflows differ in key ways, so do not use a generic FBX export for either engine.
For Unreal Engine 5, export as a `.spm` (SpeedTree Model) file and import using the built-in SpeedTree importer. This preserves wind data, LOD chains, and collision geometry in a single pass. In SpeedTree's export dialog, set Mesh Type to *Unreal*, enable Smooth LOD transitions, and make sure Generate Lightmap UVs is checked — UE5's Lumen indirect lighting still benefits from a clean second UV channel.
For Unity, export as `.fbx` with the SpeedTree Unity shader package enabled. Unity's SpeedTree importer (available since Unity 2018 LTS) reads embedded LOD data from the FBX and auto-generates a LOD Group component. Use the Best Speed wind preset during export unless you are building a cinematic — the full wind simulation is too expensive for real-time at scale.
```bash
# Verify your SpeedTree CLI export (SpeedTree Modeler 9+)
speedtree_cli --export-preset=unreal5 --output=./exports/oak_tree.spm ./source/oak_tree.sptw
```
After import, always inspect the LOD chain in the engine before painting into your scene. Both Unity and UE5 auto-generate LODs from SpeedTree data, but the transition distances often need manual tuning per asset.
Optimizing SpeedTree LODs and Wind for Real-Time Performance
LOD configuration is where most foliage pipelines fall apart. SpeedTree generates 4–6 LOD levels by default, but the transition distances the engine assigns are conservative and should be tightened for performance.
![]()
Target poly budgets per LOD level:
| LOD Level | Distance (UE5 default) | Target Tris | Wind Mode |
|-----------|----------------------|-------------|----------|
| LOD 0 | 0–15m | 3,000–8,000 | Full |
| LOD 1 | 15–40m | 1,000–2,500 | Full |
| LOD 2 | 40–80m | 400–800 | Simplified |
| LOD 3 | 80–150m | 100–250 | None |
| Billboard | 150m+ | 2 tris | None |
Wind shader cost is significant. At LOD 0 and 1, SpeedTree's branch wind runs per-vertex on GPU — for a scene with 5,000 tree instances, this compounds quickly. Switch to fast wind (single frequency, no secondary motion) at LOD 2, and disable wind entirely at LOD 3 and billboard level. In UE5, configure this inside the SpeedTree LOD settings panel in the Static Mesh editor. In Unity, the LOD Group's `animateCrossFading` flag causes GPU stalls when enabled on large foliage counts — disable it for background trees and reserve it for hero trees within 30m of the player.
Foliage Painting and GPU Instancing in Unity and Unreal Engine 5
Once your LODs are dialled in, how you place foliage matters as much as how it is built.
Unreal Engine 5 uses the Foliage Tool (Shift+3) to paint instanced static meshes. Each foliage type is automatically batched using GPU instancing, but only if all instances share the same material. If you have split your SpeedTree into separate trunk, branch, and leaf materials, UE5 will issue separate draw calls per material per instance cluster. Merge materials into a single multi-layer material, or use Nanite (available for SpeedTree .spm meshes since UE5.2) to sidestep the polygon budget entirely for distant trees.
```cpp
// UE5: Enable Nanite on foliage type (UE5.2+)
UFoliageType_InstancedStaticMesh* FoliageType = Cast<UFoliageType_InstancedStaticMesh>(FoliageType);
FoliageType->bNaniteEnabled = true;
FoliageType->bEnableStaticLighting = false;
```
Unity uses the Terrain Foliage system for grass and small plants, and Prefab instancing for trees. Enable GPU Instancing on every SpeedTree material — it is a checkbox in the material inspector. For large open worlds, Unity's Streaming SpeedTree system (introduced in Unity 6) streams LOD data from disk to reduce VRAM pressure at runtime.
Always profile with RenderDoc or Unreal Insights before and after foliage changes. Draw call counts and GPU frame time are the metrics that matter — not polygon count in isolation.
Texture and Material Setup for SpeedTree in PBR Pipelines
SpeedTree generates its own textures (diffuse, normal, roughness, opacity mask) and packages them per material. Default texture sizes are 2048x2048 for bark and leaves. For background foliage at LOD 2 and beyond, downscale to 512x512 with no visible quality loss at distance.
![]()
Leaf transparency is handled via opacity masking, not alpha blending. Use Alpha Coverage (DX11+) in UE5 (`r.CoverageAA=1`) and Alpha-to-Coverage in Unity to get smooth leaf edges at distance without the depth-sort artifacts that plague alpha-blended foliage.
For subsurface scattering on leaves, SpeedTree bakes a transmittance map into the green channel of the subsurface texture. In UE5, wire this into the Subsurface Color input of a SubsurfaceProfile material. In Unity HDRP, use the Translucency input on the Lit shader with the SpeedTree subsurface mask. Even subtle backlit glow on leaves dramatically improves visual quality with minimal performance cost.
Channel-packing tip: combine roughness, AO, and subsurface maps into a single RGB texture to cut your sampler count in half. Use R for roughness, G for ambient occlusion, and B for the subsurface or translucency mask. This mirrors studio-standard practices and reduces texture memory by roughly 33 percent per foliage asset, which compounds fast when you have dozens of unique tree species in your scene.
Packaging and Selling Foliage Assets on Game Marketplaces
SpeedTree models are licensable for redistribution under the SpeedTree Indie or Pro license — verify your tier before packaging assets for sale. Buyers on marketplaces expect pre-built LOD chains for both Unity and UE5, separate export packages per engine, wind presets documented in the README, and a demo scene with foliage painted at realistic densities alongside profiling stats.
Assets that include screenshots showing draw call counts and GPU frame times consistently outsell those that do not. Buyers are purchasing a performance budget as much as they are purchasing art. You can browse production-ready foliage packs on BitSoul Marketplace, or upload your own optimized SpeedTree assets and reach thousands of indie developers actively looking for quality environment art.
If you are building a foliage library, treat your BitSoul Marketplace page as a portfolio piece. Ship clean, documented, well-optimized assets and your conversion rate will follow.