This is the second part in my series of blog posts, where I outline a tree creation tool that I've developed inside of Houdini. The first part is here.
It's been 4 Months since I wrote the first part, and the reason for the delay is simply that I've been too busy finishing the project that spurred me to build the tool in the first place. I'm very excited to share the details of this project, and will be doing so soon, but I can say that all of the screenshots in this post were taken in-game, running at 60fps on rtx2080ti.
All of the foliage in the project larger than a small bush was produced with my Houdini tools, using scans that I collected during a trip to Germany.
One of the reasons that I decided to build my own tools rather than using an existing foliage solution, is because i wanted to be able to produce assets which were extremely detailed up-close, whilst also being able to render enough trees to fill a forest which stretched as far as the eye can see. To achieve this, I needed complete control over every step of the LOD generation process.
Below is an example of the typical 4-stage tree lods which I generate in my tools.
A typical set of lods is as follows.
- LOD0: ~ 80,000 tris
- LOD1: ~40,000 tris (~50%)
- LOD2 ~ 6500 tris (~0.16%)
- LOD1 ~ 2 tris (~0.003%)
The Imposter incorrectly reads as 1 tri, this is because numeration starts at 0 instead of 1, meaning that every lod level reads out 1 less tri than it should. There are also still some improvements to be made to ensure that branches silhouettes remain more consistent between lods.
I decided that in order to preserve the apparent density and silhouette of the model from afar, it was important to retain all of the branches and leaf cards right up until the Imposter transition at the end, so there was no loss of volume. Despite this constraint, I was able to achieve huge reductions at each stage, and i did this by taking a completely different route to traditional mesh decimation, and building the system with efficient lodding as a core principle of the tools.
Houdini generates each lod simultaneously using user determined parameters. A tree is built using a simplified node-network, which will be familiar if you use a software like Speedtree.
Each node has its own optimisation parameters such as number of edge loops, vertical axis, mesh reduction %, curve simplification % and a switch that toggles between polygonal branches, or 2 dimensional planar branches.
Foliage card baking is an optional step that contains its own simplification parameters.
To begin with, the system ensures that whatever leaf card is generated, it never moves outside of the confines of a triangle (or has minimal overlap), this means that the lowest lod is always a single tri, each subsequent lod can have more geometry, which more accurately contains the shape of the card, and reduces overdraw. It is also possible to completely foregoe the card baking process, and use the geometry itself for a cinematic quality asset.
In a future iteration of the toolset, I plan to use the empty space on either side of the main leaf card for 2 additional foliage cards, which will enable a higher degree of variation and visual interest in the end result.
The final, and arguably the most important stage of the optimisation process is the generation of Impostors, which are Octahedral hemisphere impostors. These types of impostors are superior to billboards, since they much more correctly match the source 3d mesh when viewed from different angles, and especially from above, they also require only a single card, which makes them more efficient when rendered in huge numbers.
There are some downsides to Imposters however, such as increased Shader complexity and texture memory requirements. But in this case I found the benefits outweighed the negatives significantly.
The tool does not assume that a tree contains only a single stem, and as a result, it is possible to batch a small stand of trees into a single imposter card, In some cases, the denser canopies produced by multiple overlapping trees actually made them a more suitable candidate for imposter baking, and this step enabled the already enormous number of trees to be multiplied by several factors.
In total, the landscape contains millions of trees, comprised of over 50 different variations and 5 species.
Of course, it will be possible to take this even further in future revisions to the toolset, and I am especially excited about the possibilities of UE5 and Nanite. Although currently WPO and masked materials are unsupported (which in some ways I am glad for, since it does not make all of my work redundant), I will be interested to experiment with importing cinematic quality variants of these trees to unreal.
For those interested, you can read more about Octahedral Imposter here: https://www.shaderbits.com/blog/octahedral-impostors

















