Search Unity

Assets [WIP] Broccoli Tree Creator

Discussion in 'Works In Progress - Archive' started by maldewar, Jan 15, 2017.

  1. maldewar

    maldewar

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

    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.
     
    Last edited: Jun 26, 2018
    terrapinbear, IrrSoft, DrOcto and 3 others like this.
  2. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    Any feedback, anyone please? ;)
     
  3. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    It's lovely!
     
    maldewar likes this.
  4. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    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?
     
  5. DrOcto

    DrOcto

    Joined:
    Sep 15, 2017
    Posts:
    79
    This looks really nice but can it swing or wave only the leaves? :)
     
  6. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    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/
     
    Neviah likes this.
  7. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    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???
     
    Last edited: Jun 21, 2018
  8. DrOcto

    DrOcto

    Joined:
    Sep 15, 2017
    Posts:
    79
    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 :D how about ivy?
     
  9. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    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.
     
    terrapinbear and DrOcto like this.
  10. DrOcto

    DrOcto

    Joined:
    Sep 15, 2017
    Posts:
    79
    I like where this is going :D
     
    maldewar likes this.
  11. Lune

    Lune

    Joined:
    Oct 20, 2012
    Posts:
    62
    id buy it
     
    DrOcto and maldewar like this.
  12. Bud-Leiser

    Bud-Leiser

    Joined:
    Aug 21, 2013
    Posts:
    93
    Was expecting more Broccoli, feel clickbaited! lol

    This is really cool man! Keep up the good work.
     
    maldewar likes this.
  13. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    Thanks!... No clickbait! This engine can create broccoli as well, as long as something looks like a tree it should handle it. ;)
     
  14. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Looks good. Do you include custom shaders? or do they use the unity tree shaders?
     
    maldewar likes this.
  15. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    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.
     
    Last edited: Jun 26, 2018
    DrOcto likes this.
  16. Undertaker-Infinity

    Undertaker-Infinity

    Joined:
    May 2, 2014
    Posts:
    112
    Very nice.
     
    maldewar likes this.
  17. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    Hi everyone! I finally submitted the project for reviewing! :)

    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:
     
  18. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    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. :D
     
    maldewar likes this.
  19. Robdon

    Robdon

    Joined:
    Jan 10, 2014
    Posts:
    141
    Looks great... good work!
     
    maldewar likes this.
  20. maldewar

    maldewar

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

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    Thank you!
    In the meantime I've been working on a billboard system based on the BillboardAsset component. This is speacially important for performance on terrains.
     
    terrapinbear and DrOcto like this.
  22. DrOcto

    DrOcto

    Joined:
    Sep 15, 2017
    Posts:
    79
    This looks better and better. So basically you could do some population of terrain with it. Something like a prefab placer. Will it have and I think it probably has then instancing also. Could then be used in 2D also if I am not mistaken.
     
  23. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    Thanks! The purpose it mainly to generate prefabs; the placement for these could be handled with any other tool. Instancing is possible as long as the shaders used support it (right now the factory defaults to the ones used on Unity tree creator). I haven't thought about generating 2D vegetation, but it is possible using the billboard system; there is an option too to use 2.5D with billboard mode leaves.

    As an update [July 06, 2018]:

    More options on the structure generator element: shared structure levels to let the process choose from possible levels to generate on every iteration.


    Billboard asset along with LODs is ready (on the images LOD0: 977 tris, LOD1: 556 tris).



     
    Last edited: Jul 7, 2018
  24. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    Hi folks!
    Broccoli Tree Creator has just been approved to the asset store!!
    http://u3d.as/1emq

    When a product gets released where do you keep the conversation about it? Do you keep it at WIP (as I'm going to keep working on it despite it being released) or do you move it to another forum??
     
    Last edited: Jul 19, 2018
  25. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. got your asset now :)

    Did not have time to test it yet, but I would like to make sure it works good with Vegetation Studio. Send me a pm to get a VS copy to play with.

    Talk to @hippocoder if you want to move the forum thread to finished asset folder.

    Looking great, looking forward to talk.

    Lennart
     
  26. maldewar

    maldewar

    Joined:
    Dec 21, 2016
    Posts:
    52
    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).
    So, here is the demo scene for the runtime API :)

     
    DrOcto and Inspeinre like this.