Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

[RELEASED] Broccoli Tree Creator (procedural vegetation assets)

Discussion in 'Assets and Asset Store' started by maldewar, Jul 19, 2018.

  1. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    28
    Hi everyone,

    I would like to show you this editor extension for Unity.
    http://u3d.as/1emq

    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!
     
  2. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    274
    Wow, I've been waiting for something like this for years! Can't wait to download & play around a bit.
     
  3. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    274
    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?

    upload_2018-7-19_7-35-23.png

    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.
     
    maldewar likes this.
  4. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    28
    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.
     
    Last edited: Jul 19, 2018
    brisingre likes this.
  5. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    28
    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 :)

     
    HXCMAN likes this.
  6. Macode

    Macode

    Joined:
    Nov 28, 2013
    Posts:
    12
    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?
     
    Juexe likes this.
  7. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    28
    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.
     
  8. Arycama

    Arycama

    Joined:
    May 25, 2014
    Posts:
    93
    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.
     
  9. whisp

    whisp

    Joined:
    Jun 21, 2014
    Posts:
    16
    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...
     
    Last edited: Jun 27, 2019
  10. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    28
    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??
     
  11. whisp

    whisp

    Joined:
    Jun 21, 2014
    Posts:
    16
    Hi maldewar!
    I'm using Unity 2018.3.9f1
     
  12. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    28
    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:
    Code (CSharp):
    1. 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:
    Code (CSharp):
    1. public static string editorPath = "Assets/Plugins/Node_Editor/";
    to:
    Code (CSharp):
    1. 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).
     
  13. whisp

    whisp

    Joined:
    Jun 21, 2014
    Posts:
    16
    Thank you maldewar, now it works!