Modular Tree

I did use twigs. They were generated with MTree addon.

Currently working on showing my method. The trees are optimized for topology, but they are still full trees (geometry twigs instead of billboard branches).
I have a scene with 42,000 trees (according to particle system Number fields) comprised of 3 different tree models, each with its own particle system.
It takes up about 6GB of RAM, including an untextured landscape with ~52,000 tris.


This one has 3 different tree models. The 2 deciduous tree models are geometry down to hex leaves (8 verts, 6 tris per leaf), and the evergreen trees are ‘game hero’ level of detail (geometry down to twig fans).
The total memory cost of the scene peaks at 7659M (7.7G).

While the density may seem slightly low at first glance, this would look pretty realistic if you put a good ground texture under the trees, because normal forests have some clearings and/or meadows.
If you want a higher-density example, I can take out the Density maps for the different tree types, though it’ll have a bit more homogeneous distribution of species as a side effect.

You might consider using impostors, which is basically baking the tree from various angles and then in the shader determining which to render based on the incoming camera angle.

Much, much faster than complicated geo duplicated.

Agreed, but this is more of a stress test than an actual production scene, something that would rarely be useful beyond a few very specific edge cases (ex: a forest fly-through where the camera gets pretty close to a large number of trees), and even then you could use much lower-poly models for trees that the camera never gets close to.
No sense in giving background assets hero-level geometry unless you’re either literally Pixar, or you’re just doing a benchmark :wink:

This addon aim to implement a 1-click process to create impostors aka imposter cards aka LODs/billboard, with the same method of “Amplify Impostors” from the Unity Store.

That’s awesome! Is this compatible with 2.8 or is it 2.7x only (for now)?

This kind of scene rensembles what I tried to do. I already am above 11G memory with one single Base Tree and millions of instances.

Rendering large scene took 2 to 3 minutes on my machine.

Pre-baked impostor trees could be interesting to play with.

It is a different topic. For me, it is too early to follow this path, I like to get a more in-depth knowledge on instancing/duplication based forest.

Compatible with 2.8 only

Awesome! Gotta love future-proof plugins!

That’s not true, it’s available for 2.7x as well.

If you wanna use the older version without the new features & stability, sure…

Before working with the impostors, I wanted to see how far I could go with full geometry. In the end, I managed to fit this scene in less than 6GB of RAM (more than small enough to fit on my GPU!)
Peak memory usage: 5679.76M

My methodology was a bit of a hybrid approach.
The primary two tree types (deciduous) were implemented with hair, a large child particle count, and no density texture (because density textures don’t play nice with hair children for some reason).

I used 300-400 base particles and 40 child hairs with interpolated distribution.
To avoid visual repetition due to rotation clustering, I pulled a little trick. The hair particles were vertical (global z velocity instead of normal), and I used Velocity/Hair rotation for Collection instancing.
To add variation in the child rotation, all I did was add a bit of noise to the child particles. The collection rotation appears to follow the ‘elbow’ direction for hairs with 2 segments.

For the evergreen trees, I used a normal particle system, since individual hairs take more memory than standard particles. The main reason for this was that is the pine trees don’t look good without the density texture.


What was the render time for this image? Is it feasible for animations?

In terms of animation-readiness, it’s kind of meh. It’s okay if you have access to a production-grade render farm, but you will be rendering for months if you don’t.

I can’t find the render time in the metadata of the image, so I’ll re-render and update this as I finish re-rendering.

Hardware / software info:
Windows 10
Ryzen 2700x + GTX 1070ti (no overclock, for testing purposes)
Blender 2.8 (4/19 build)
Tile size: 32x32,
512 spp (sobol)
no denoising
Bounces: 12 diffuse, 4 glossy, 12 transparency, 12 transmission

Time distribution:
Build time: 6 min 22 seconds
Sampling time: 24 min 34 seconds
Total: 30 min 56 seconds

1 Like

Thanks for the times.

Is there any chance you would share the file so I could do some benchmarks on my system?

Sure! [Google Drive]

How did you make your leafs line up and point that way?.

I am loving this addon. I don’t know if this has been suggested before but I think it would be logical to have a UV unwrapped rectangle (or creased rectangle) for the leaves. That way leaf image files (diffuse, normal, roughness, ect) can be made in image editing softwares and brought in as leaves. I find the three types of leaves included in the addon lacking in customization. I assume there is a reason this hasn’t been done I don’t know about. I just wanted to share my issue on the off chance it hasn’t been suggested.

Is there any way to determine the angle between splits? I’m trying to make a pine, and I keep getting some weird holes in the branching pattern when looking straight down the parent branch.
Specifically, I’m going to try getting the angle between consecutive branches to be the Golden Angle, in order to avoid things like these holes.
If this angle is already an approximation of the Golden Angle, perhaps it isn’t precise enough…?

Any tips on how to avoid these kinds of holes is appreciated.