Generating trees in Blender

In this tutorial, I will be showing you how to create useful trees in Blender for your own game. To do this, it is preferred to have a little bit of knowledge about Blender and Roblox Studio. But I tried my best to explain this to everyone.

Advantages:

  • This will save lots of time when creating trees in general. I’ve seen people create trees manually and it takes way more time than just to simply generate a tree.
  • The trees look realistic for not having any sort of texture.
  • Better looking game and environment.

Disadvantages:

  • Some difficulties like keeping the triangle count below 10k for the branch or leaves depending on how triangle-expensive your meshes are.
  • Decimating a mesh is needed if there are too many triangles. This will eventually make the tree look worse but it Isn’t too bad.

Examples:

Step 1:

Make sure to install Blender v2.80 or above. In this tutorial, I will be using 2.80 since I’m not quite not sure how the newer versions look, but I doubt they are different.

Step 2:

Open up Blender, or to be more specific [blender.exe]. The file should be inside the folder that is installed. The program should look something like the image below.

Step 3:

Start by pressing the [del] button on your keyboard (delete button), which should delete the block in the center since we won’t be using it for this tutorial. You can also delete the block by doing: right-click → delete.

image

Step 4:

Point your mouse to the top left of the program and click [Edit] and then [Preferences], which should make a menu pop-up.

image

Step 5:

Click on [Add-ons] and then proceed to the top where it says [Community] and click it. Then at the top right side of the menu, you will be able to search: Sapling. Only one add-on comes up which is when you click on the empty square to enable it.

Step 6:

You can now safely exit the [Preferences] menu.

Step 7:

Proceed to click on the [Add] button on the top right side of Blender. Then click [Curve], and click on the last clickable button which is [Sapling Tree Gen].

Step 8:

A random tree should’ve now appeared after doing the previous step. You can now click on the button in the bottom left that says [Sapling: Add Tree].

Step 9:

A menu of changeable properties will now appear to the left and changing most of the values will change the appearance of the tree.

Step 10:

To prevent us from hitting 10k triangles immediately, I change [Curve Resolution] to 2. I also change [Handle Type] to Vector. You should now change properties in geometry and branch settings until you achieve a great branch structure.

image

Step 11:

We will now have to add leaves to the tree. To do that we go to [Settings] → [Leaves].

image

Step 12:

To get the leaves we check the box where next to [Show Leaves]. You can now change the properties until your leaves look good. The issue with this step is that it creates lots of Triangles, which won’t let us import it into Studio without being cautious of the triangles amount. Make sure to keep Triangles for the leaves and branch under [10,000] or [10k] each.

Step 13:

As you are done with the tree then you have to Select on the leaves mesh and click [Tab] on your keyboard or just click [Object Mode] in the top left and select [Edit Mode].

Step 14:

Click [A] (keyboard) to select every single vertex of the leaves. You can now click on [Face] → [Solidify Faces] which will solidify the leaves, which is needed to prevent invisible leaves in-game.

Step 15:

You can now choose the thickness of the leaves from the box that pops up. I used [0.015m] this time.

Step 16:

You can now get out of edit mode by clicking [Tab] or by clicking [Edit Mode] → [Object Mode].

image

Step 17:

The leaves will now probably be over [10k] triangles which means that we will have to decimate it. Go into edit mode like shown previously then select everything by clicking [A]. You now have to click on [Mesh] → [Clean Up] → [Decimate Geometry].

Step 18:

A box will pop up and we have to lower the Ratio property to get fewer triangles. I did this until the ratio became [0.435] and the triangle count became a little under 10k.

image

Step 19:

We are almost done in Blender. Get out of edit mode and select the Branch mesh/Tree root. [Right Click] then select [Convert to Mesh].

Step 20:

We now have to export the branch mesh and leaves mesh into Roblox. Firstly I select the Branch/root mesh and click [File] → [Export] → [Wavefront (.obj)] because that is a mesh type that Roblox supports.

Step 21:

Select a location where you want the mesh files to end up. I select Desktop and delete the mesh after it’s been imported into Roblox. Give the mesh a name.obj, then Select the unmarked box in the bottom right that says [Selection Only]. Lastly, we click [Export to OBJ] which is in the top right. Do the same with both meshes so you have the leaves mesh and (tree root/branches) mesh.

Step 22:

Open up Roblox Studio and select [MODEL], then click [Insert Object], then search [MeshPart] in the Insert Object menu and add two MeshPart’s into your game.

Step 23:

Select one of the MeshParts and click the Yellow Folder icon in the properties menu. Then find the location where you saved your meshes, select it, and click [Open]. Do this for the leaves and branches.

Step 24:

A pop up will show and you should definitely click [Yes].

image

Step 25:

After both meshes are added, then they should look like this. Select both meshes and click [CTRL + G] to group the meshes into a single tree.

image

Step 26:

Select the model and use the [Scale] tool to make the tree larger.

Step 27:

You should now color both meshes and give each its own material. First, hold [ALT] then select the Branch mesh. Give it a wood texture and brown color. Do the same with the leaves and give it the grass material and green color that fits with the grass.

Step 28:

Select both meshes from the model and click the [Anchor] in the top middle of your screen for both meshes.

Step 29:

I now get these realistic-looking trees for my island as you can see.

:trophy: That was it, I hope you understood!

97 Likes

Jesus Christ man, life saver! :slight_smile:

3 Likes

Heads up, you can also export as a .fbx file, it works as well. I honestly prefer fbx over obj.

7 Likes

Great tutorial, I recommend you make a youtube tutorial on it so that more people know how to do this!

4 Likes

Great tutorial, saving this for later reference.

1 Like

I think I’ll make a showcase game with this tutorial, Thanks! :smile:

1 Like

I’d love to play it when it is done. Just message me :slight_smile:

1 Like

I’ve done all of the steps so far it won’t let me import it, it says that I have 45k triangles. I can’t import the leaves. :frowning: :thinking:
I have followed every step so far.

EDIT: I have fixed the issue.

1 Like

You have to make sure to decimate the geometry on the leaves or branch. If you already have done it then I would advise you to decimate it again. Check how many triangles both of the meshes have and decimate the ones with over 10k.

1 Like

I really really like this tutorial a lot. I used to dread making trees, and I haven’t made one in over a year and a half until now. Thank you so much! Although I do have a question, is there a way to check how my triangles the leaves have in blender before exporting? It gets annoying playing the guessing game.

I think you meant [File] → [Export] [Wavefront (.obj)]

Thanks you so much for this tutorial yet again! I’m bookmarking this thing! :100:

2 Likes

Really helped me out! I’m new to using blender so it was really easy to toy around with some of the ratios in this method.

2 Likes

Thanks for correcting me! I appriciate it a lot. You simply edit the leaves [TAB], then click [A] which will select all verticies and count the total amount of triangles on the bottom right of Blender.

1 Like

Thank you so much! I wish roblox would have a higher triangle max, I need more leaves!! :sweat_smile:

Wow the leaves were just under 10k triangles!

damn

Treee

Thanks again for this awesome tutorial!

1 Like

Although I find this to be a pretty easy and clean way of doing it, this method results in a bunch of tris/faces. Even with the decimate feature it still nearly topples at 10k.

I’m not disliking the tutorial however, I’m sure that there are other better methods like simply using a decal:

Although it may not give 3d leaves/more realsim, it does decrease face/tri usage. (There isn’t a need to do the node part in the tutorial, UV unwrapping is neccessary though.

However though, I’d say this is a pretty nice tutorial for beginners :ok_hand:

5 Likes

Thanks dude! This helped me out a lot.

But yeah, after 2 years of using Blender 2.79 I had to upgrade.

2 Likes

Modular trees addon is an even better way of generating highly customizable trees, it’s my favorite.

2 Likes

Is this possible with blender 2.79?

Also great tutorial!

1 Like

I’m sure this exists in Blender 2.79, yes.

2 Likes

Yeah - I’ve started exporting as .fbx too as it’s just… idrk - it’s an option I like.

1 Like

Does it work importing the model from blender to studio with the textures and images?

2 Likes