[RELEASED] Broccoli Tree Creator (procedural vegetation assets)

Hi everyone,

I would like to show you this editor extension for Unity.

It’s a procedural vegetation generator/modeler to create highly customized/randomized vegetation assets. The package offers a catalog of pre-made pipelines (vegetation instructions) to begin with, so that you can start generating assets right the way without the need to dive into specifics.

Features:
Two structure generators to select from (one similar to Unity’s Tree Creator and a Lindenmayer system based one).
Sprout modes: plane, cross, tricross, planeX, billboard and mesh.
Sprout groups: to set leaf mesh modes and mapping (material or texture based).
Modifiers for length, girth, branch sparse, twirl and bend points.
WindZone component support.
LODs (optional with two levels).
Prefab creation with texture atlas creation.
Controls for texture areas, mapping options and custom materials on branches and sprouts.
Persistence system (save, load, share) your tree pipeline.
Catalog with pre-made tree pipelines (so you get trees ready out of the box and pipelines to work with).
Global scaling for the final tree (to adapt to your game proportions).
Documentation and source code with comments.

I hope this tool will help you making beautiful natural environments !

Thanks!

9 Likes

Wow, I’ve been waiting for something like this for years! Can’t wait to download & play around a bit.

I’m having a great time, this is very cool.

I have found some bugs though. To be expected in something that’s only been in the wild one day, obviously. Is there, like, a slack or a discord or some other place I should make bug reports? Or is this forum thread the best way?

Pictured: a missing prefab in the example scene, a bug with setting a custom material that has broken the material of the preview, and some exceptions.

1 Like

Hi Brisingre!
Thanks for supporting the product! I’ve just created a discord server for general discussion and bug hunting.
https://discord.gg/Hpa4sDa

If there are messages about missing references it is probably due to the factory destroying the preview tree game object (sometimes when going to play state). In the “advanced options” the “Regenerate Preview” button should restore this object without generating a new randomization of it. This is a case where the factory should take care itself of restoring the object, I’ll fix this for the next release.
I’ll still need to see what’s the matter with the missing assigned material.

1 Like

Update [Aug 05, 2018]
Hi folks!!
I’ve been working on the runtime API to let Broccoli generate its trees while on play mode/player build. I’m releasing this feature as experimental, mostly because I feel there are still a lot of aspects to improve on the dynamic mesh generation and these runtime products lack some of the optimization options only prefabs can have (like mesh baking, instance rendering, etc). This should be available as soon as the Asset Store team approves this update.
So, here is the demo scene for the runtime API :slight_smile:

2 Likes

Hi, I want to purchase Broccoli Tree Creator
Could you tell if this is possible with your plugin?
Can I achieve the result from video with it?
And would it be possible to control the grow progress manually, like from mouse click count?

1 Like

Sorry Macode, it is not possible at the time with the built-in features. Getting sometimes like this, right now, would require modifying some of the extension functions on your side.

It would be awesome if you could implement some kind of geomorphing, so that lod levels can be smoothly transitioned between without having to draw both lods at the same time with crossfading.

Hi!

Just bought and installed Broccoli Tree Creator. It doesn’t work - lots of exceptions are thrown concerning Node, NodeCanvas, NodeEditorState etc… As if this Node*classes would miss.

After looking closer into it, it turns out to be an incompatibility with the Megasplat asset. Here something really strange happens, when installing Broccoli Tree Creator: Many classes within the Megasplat folders get replaced by files of Broccoli, e.g. the NodeCanvas script and many others node related. What’s strange, even though the files from Broccoli (with the Broccoli namespaces) are there (in a Megasplat Editor folder), the classes (and namespaces) are not found from within the Broccoli scripts that would need them. Also, after uninstalling Broccoli Tree Creator, Megasplat starts throwing lots of exceptions instead, due to missing classes and namespaces (since the Megasplat Nodeclasses which originally are within the megasplat namespaces have been replaced with the broccoli files.)

It can be reproduced. Reainstalling both, Megasplat and then the Tree Creator, cause the same file chaos again.

Any way to work around this?

whisp

Edit:
Importing the Asset in within a new project and then dragging the folder to the actual project works. The file chaos only happens when importing the package.

Edit2: Even though it compiles now, it still doesn’t work. When opening the Tree Editor, an console error displays: Node Editor: Not installed in default directory…

Hi Whisp!
Let me look into this… indeed the extension has its own folder and namespace for classes. Can you tell me which version of Unity are you using??

Hi maldewar!
I’m using Unity 2018.3.9f1

Hey! I’ve found a quick fix…
Turns out that Simple Node Framework sets the path to the editor folder (when a default is not found) by calling the AssetDatabase utility and looking for framework related specific classes:

string[] assets = UnityEditor.AssetDatabase.FindAssets ("NodeEditorCallbackReceiver"); // Something relatively unique

It tries twice to locate the path, first by looking for “NodeEditorCallbackReceiver”, then for “ConnectionTypes” classes. If Megasplat is using Simple Node Framework or have classes with those names, then Broccoli will try to use the path related to those files as the default editor path, causing the wreckage…
Fortunately Simple Node Framework uses a default editor path before trying to locate the path calling the AssetDatabase. As a quick fix you’ll need to edit the script at /Assets/Waldemarst/Broccoli/Node_Editor/Node_Editor/Framework/NodeEditor.cs (or relative to the new location) and set the variable:

public static string editorPath = "Assets/Plugins/Node_Editor/";

to:

public static string editorPath = "Assets/Waldemarst/Broccoli/Node_Editor/Node_Editor/";

(or the new path for the extension).
This should solve the “Node Editor: Not installed in default directory…” error.
Sorry for the inconvenience, I’m issuing an update to set the default editor path to reflect the extension’s and then for the lookup method to use even more particular class names (something using the Brocco prefix).

Thank you maldewar, now it works!

I just bought this and running it in 2019.3.9 it is refusing to render the leaves / petals the billboard shows grey squares if i zoom out. Any idea whats going wrong? I am using the flower catalog example chrysanthemum. The bark / branches render okay.

Thanks! I’ll look into this issue as soon as possible!

I’ve found that generating a prefab while in preview mode (colored materials for leaves and branches, asset on the right) outputs grey pixels to the render that generates the billboard texture (asset on the middle). Generating the prefab on textured preview mode renders the billboard texture as expected (asset on the left). I need to fix this by not using the preview material when rendering to the billboard texture. In the meantime I would ask you to generate the final prefab using textured mode; please let me know if this describes/solves your issue.
5751139--604900--brocco02.png

when i try to generate a tree using a load from catalog i seem to not generate or render the leaves?
am i doing something wrong? i tried changing the shader of the sprouts but still nothing?

this is what is happening when i run it.

Hi,maldewar,great work.
I am searching a way to to control the tree grow progress at runtime,like the video above.Is it possible now?
I want to control the growth speed and at some situation the tree will die.
At runtime,how many aspects I can control the tree,like leaves?

Hi @algic ! Thanks!
Broccoli does not provide a way to go trough animated steps to grow a tree. The runtime demo actually creates full grown trees and just scales them on their position. You can control almost every aspect of the tree, but you end up creating a new mesh every time changes are commited and processed.