[WIP] Broccoli Tree Creator

Hi everyone!

I’ve been working for the last couple of months on a game about growing bonsai. The scripts to generate and manipulate the trees have been steadily growing on parameters to play with; so I’m planning to build an editor extension out of them and eventually offer it on the asset store. Although I know there are plenty of options to build trees and nature elements out there I still want to make this mostly for the learning experience.

The extension aims at providing “tree factories” to spawn tree objects using randomized parameters, so that every product out of it looks unique and still the same kind of tree. The tree builder is based on Lindenmayer systems to generate the branch structure for the tree, then other functions modify it to make it look more naturally disperse (or not) and then a mesh is created around the structure. I’m looking for some references, posts, tutorials, documentation or best practices that might help me to come up with an intuitive and easy to use extension (I really need to make the custom editor better organized).

Anyway, here are some screenshots on some of the trees it can produce. These still don’t have leaves, there are some features I want to add on branches before moving to the leaves part.

Update [Feb 06, 2017]
The factory settings custom editor was cramming with options, so I worked on a modular pipeline to process the tree.
Pipelines could be created from nodes providing different options to model the trees, from creating the structure, to modify it to mesh it. For the next update I’m aiming at getting nodes to add leaves.
The node editor uses the wonderful Node Editor framework for Unity3D project!

Update [Jul 08, 2017]
All the parameters assigned to create the trees are contained in nodes. The tree creation process is based on Unity’s tree creator, but adding more customization to the pipeline. The nodes now create sprout groups to work as leafs or fruits and receive materials on them.

Update [Dec 13, 2017]
Wow! it’s been a year since I started working on this project. I’m actually pretty close to release it to the asset store (or at least I believe it is mature enough). Over the last months I’ve added many more options to the tree creation process (modularized of course) including a node hierarchy tree for structure and optimized modes to export the resulting trees as prefabs. I still have some heavy optimization to do using the editor profiler though.

Update [July 17th, 2018]
Ok, I’m almost ready to release the extension to the asset store. Lately I’ve been working on getting the trees to work with WindZones, tweaking and adding improvements here and there and of course looking for bugs to smash. The video shows how switching elements on the pipeline reflect on the preview tree (this tree can be then used to create a prefab out of it).

Another update, now testing low poly processing.

Update [July 24th, 2018]
Testing with Unity terrain tools and effect shaders.

Your feedback about the project will be very much appreciated. :slight_smile:

Features on version 0.9:

  • 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 the mode, alignment, scale, mapping and wind properties on sprouts along the tree branches.
  • 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.
6 Likes

Any feedback, anyone please? :wink:

It’s lovely!

1 Like

Results do seem really good! Also love to see the editor in use, good stuff:)
Can you maybe upload a video of the general workflow?
Also, what do you think are the main differences to other tree generators out there?

This looks really nice but can it swing or wave only the leaves? :slight_smile:

I’m working on a video showing the features the extension has to offer (in preparation to submitting to the asset store), I’ll post this video here when available; meanwhile I’ve updated the thread listing the current features. I’ve also prepared a site with the documentation required to used the extension, covering the workflow; I guess posting a video there with the workflow might also be helpful, right?.

The extension offers assets customization within the Unity Editor, every node in the pipeline is specialized in an aspect of the creation process for every tree. Modifying these nodes let creators get prefabs more tuned to their needs; and for programmers the code is there to extend these elements (other solutions require monthly subscriptions and you don’t really own the code to modify/learn from the product). For future releases there’s scene content awareness (like the branches avoiding a wall or roots grasping around rocks). Spawning trees at run time is a potential feature as well.

Right now I’m a little uncertain about how the Unity community might take this product; but, like many other extensions out there, this project is aiming at making the game development process easier.

Just in case someone wants to check the documentation: http://sonorain.com/broccoli-tree-creator/

1 Like

The trees branch structure and leaves react to WindZone components; removing the leaves mesh would give a naked tree swinging with the wind as well. Besides branches and leaves what other kind of element might be included???

Nice but I was thinking about that only leaves swing and trunk and branches are fixed. Something like breeze only would give you. Well you asked :smile: how about ivy?

It would be possible to generate ivy moving with the wind using the components on the engine. It would just require a new structure generator to dictate the path to mesh (around obstacle objects). It is possible as a future feature.

2 Likes

I like where this is going :smile:

1 Like

id buy it

2 Likes

Was expecting more Broccoli, feel clickbaited! lol

This is really cool man! Keep up the good work.

1 Like

Thanks!.. No clickbait! This engine can create broccoli as well, as long as something looks like a tree it should handle it. :wink:

Looks good. Do you include custom shaders? or do they use the unity tree shaders?

1 Like

They use unity tree shaders; the extension also has a settings option to use custom materials (and shaders) on the leaves and the branches if desired.

1 Like

Very nice.

1 Like

Hi everyone! I finally submitted the project for reviewing! :slight_smile:

Do you know (considering the nature of this project) how many days does it take to receive confirmation or modification requests from Unity when submitting an asset??

I also have the promotional video to be used on the asset store:

4 Likes

hmm… Nice! I read on some threads that sometimes it can take a week or two to get approval. I can only imagine how wonderful it would be if this sort of system can also be applied to Creature / Character creation. :smile:

1 Like

Looks great… good work!

1 Like

Hi! Thanks for the info!
Considering the nature of this system it might also receive requests for changes from Unity before being ready for the asset store. I hope it gets to the asset store soon :slight_smile: