Tree Generator Plugin

Introduction

Hey guys! In most of my time scripting, I’ve just been doing it as a hobby/passion, so I don’t have any front page games to speak of or much of a name for myself in the public, but I’ve been scripting for about 4 years now and now present to you a plugin that allows you to automatically generate trees (that I made a year ago).

image


Step-by-Step Explanation

Alright so this is kind of a tricky plugin to use, so bear with me here.

Step 1:

Create two parts, one with the material/color of the trunk and one with the material/color of the leaves

Step 2:

Select the trunk part first and then ctrl click the leaf part

Step 3:

Adjust the numbers in the plugin and generate it

  • MaxBranchHeight is the max y coordinate of the branch? I think? Now that I think about it that's probably what was messing it up before. If your trees are generating really short just set this to some big number like 99999.
  • MaxBranchAngle is the maximum angle a branch can turn away from it's "parent" branch
  • BranchLength is the length of each individual branch part (I thought it randomized but maybe it doesn't)
  • BranchWidth is the width of each branch/trunk part
  • GroupingDistance determines how close leaves have to be in order to "group" together into bigger leaf parts. Think about it like the leaf size, but it also lowers leaf counts.
  • Rotate is an on/off option that determines whether or not the leaves will have randomized rotation (versus just being orient 0,0,0)

Things to note

Note 1:

Creating a tree doesn’t create a Ctrl + z waypoint. In other words, don’t ctrl z to undo the tree, because it’ll undo whatever you did a step before pressing generate as well. If you wanna retry the tree, just delete the model and reselect the template parts.

Note 2:

Each property has default values, so you can just try the defaults and go from there.

Note 3:

If you’re making a tree at a high y position and it makes it unusually short, just up the MaxBranchHeight. I think I did it as a global y position rather than a relative y position. Woops.

Note 4:

I may not ever continue development on this plugin or further polish it, since I mainly just made it as a tool to accelerate the map production of a project I’m working on.

Conclusion

I don’t know if this plugin will be useful for anyone in particular, but I noticed it got some downloads even without me saying hardly a word about it, so I figured I’d put this post up as a usage guide.

Plugin Link

11 Likes

Could you include some images of what a tree looks like from your plugin?

1 Like

Yeah, sure! Just give me a sec and I’ll add some in.

2 Likes