Make a MASSIVE forest with Godot – TerraBrush DevLog — Transcript

Learn how to efficiently create a massive forest in Godot using TerraBrush with LOD and multi-mesh techniques for better performance.

Key Takeaways

  • Painting individual tree instances is resource-heavy and reduces FPS.
  • Using multi-mesh with LOD significantly improves performance for large forests.
  • LOD allows displaying simpler meshes at greater distances to save resources.
  • Blender’s decimate function can quickly create LOD meshes but better models yield better results.
  • Proper terrain and mesh configuration is crucial for optimal performance.

Summary

  • The video discusses improving tree painting in Godot using TerraBrush after enhancing the grass intera brush.
  • Painting many individual tree instances reduces frame rates significantly, making it unsuitable for huge forests.
  • Each tree instance includes scripts and behaviors, which adds to resource consumption.
  • A new strategy using an oak tree multi-mesh with Level of Detail (LOD) is introduced to improve performance.
  • Four versions of the tree mesh are created with decreasing vertex counts to optimize rendering.
  • LOD settings define which mesh version is displayed based on the camera distance (10m, 50m, 200m, 1000m).
  • This approach allows painting large forests while maintaining high FPS and better performance.
  • Meshes were created using Blender's decimate function, but better meshes could improve results further.
  • The video provides a practical demo of setting up LODs and multi-mesh trees in TerraBrush.
  • Performance depends on terrain configuration, mesh detail, and LOD settings.

Full Transcript — Download SRT & Markdown

00:00
Speaker A
So in my last video, I talked about how I improve the grass intera brush. Now that this is done, I think it's time to talk about the trees. The easiest way to paint trees is to take your scene and drag it
00:12
Speaker A
into the object definition, update the terrain, and select the appropriate tool, and you're good to go. Bye, have a great time! All right, I'm kidding. Obviously, we can do more. We can continue to paint the forest here, but let's have a look at
00:25
Speaker A
what's happening when you add more trees quickly. We can see that the more trees you add, the less frame you have. Don't get me wrong, it's not a bad way of doing the trees here, but it's not suitable for
00:36
Speaker A
what I want to do: a huge forest. At this rate, I'm already below 60 FPS. It probably won't take long before my computer starts a fire. To be honest, I can't blame it. The way it works is that
00:48
Speaker A
one instance of this tree is placed everywhere on the map, so obviously that takes a lot of resources. For some use cases, that's perfect because I create the exact same tree we have here, and I add it to the terrain. So let's say you have
01:01
Speaker A
a script on this tree. Well, this script will also be created. This is good for something that is interactable or has some behavior in the game. The problem we have right now is the amount of trees we're creating. So what can we do? Well, I
01:15
Speaker A
created a new strategy to place the trees, and this is the oak tree multi-mesh. Right at the start, we can see that it looks a little bit different, but look at the frames we have here. It's way
01:26
Speaker A
different. We have a lot of frames available, and we can paint everywhere in the terrain. We have way more frames than before, and we are really far from hitting that 60 FPS mark. Okay, but how does it work? Well, remember the two we
01:39
Speaker A
had before? I took the same one, and I created four versions of it. Obviously, the first one is the original one. The second one has fewer vertices. The next one has even fewer vertices. Okay, it doesn't look that good, but this is mostly for the
01:53
Speaker A
sake of the demonstration here. And while the last one is just an image on the quad mesh billboard, it of course. So, let's see how we can use these with the terrain. The first thing to do is to set
02:03
Speaker A
up the LOD list in the terrain. Basically, this defines when to display which mesh. For example, here the first version of the tree, the most detailed one, will be displayed on the first 10 m. The second version of the tree will be displayed on
02:18
Speaker A
the first 50 m. The next one is going to be displayed on the first 200 m, and the last one on the first 1,000 m. Cool. So the last thing to do is to set up each mesh for each LOD level in the
02:30
Speaker A
example. Here I created four LOD levels, so I should set four meshes. So just like that, we have a huge terrain with a lot of trees. Obviously, the performance you're going to get will depend on what you configure on your terrain. If you use
02:45
Speaker A
a mesh with more details, more vertices, or of course the LOD list you're going to configure. This demo was a quick example of what you can do. It was only created using the decimate function of Blender. Much better meshes could be used here to
02:58
Speaker A
create even better results. Anyways, that's all I had to show for this video. I hope you enjoyed it, and we're going to see each other on the next one. [Music]
Topics:GodotTerraBrushforest generationLODmulti-meshgame developmentperformance optimizationBlendertree paintinggame assets

Frequently Asked Questions

Why does painting many individual trees reduce performance?

Each tree instance is a separate object with its own scripts and resources, which increases CPU and GPU load, lowering frame rates.

What is the benefit of using multi-mesh with LOD for trees?

Multi-mesh with LOD allows rendering simpler versions of trees at greater distances, greatly improving performance while maintaining visual quality up close.

How are the LOD levels configured in TerraBrush?

LOD levels are set by defining distance ranges at which different mesh versions are displayed, for example, detailed mesh up to 10m, simpler meshes at 50m, 200m, and 1000m.

Get More with the Söz AI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries, speaker detection, and unlimited transcriptions.

Or transcribe another YouTube video here →