Search Unity

[New Product] Tree Master

Discussion in 'Assets and Asset Store' started by mcbauer, Sep 16, 2022.

  1. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    I want to introduce you to my latest product, Tree Master.




    This culminates all of my previous work from ForestVision and Mobile ForestVision and is my most robust and optimized tool yet.

    Tree Master is the ultimate tree/vegetation creator and is ready all platforms. I include a simple wind shader to make sure your leaves don't look dead or frozen in your game, but the point of this tool isn't the shaders, it's generating an unlimited number of vegetation meshes for your games--while maintaining the smallest hit to your draw calls as possible.



    What you an see below is the starting point of Tree Master. I am just adjusting the Tree Type slider which cycles through all of your saved tree templates. We ship with 16 templates, but this scales as you add more.

    Each tree is sized based on the species it is modeled after.

    TreeMaster Types.gif

    Next up is where the real power of Tree Master comes in, adjusting the Foliage.

    By default, every tree you create/edit has access to 64 different texture variations via the slider, couple that with adjusting the Leaf Material slider to the second position and you just doubled it to 128! But we ship with 5 Leaf materials so the total number of foliage options alone comes in at 320! Don't forget that you also have access to 21 different bark materials right away so technically, every single tree you create there is a possible 6,720 different visual options at your disposal!

    TreeMaster Foliage.gif

    Keep in mind, these 64 texture varieties represent a single texture, once you switch the Leaf Material to another option, you just loaded up a different texture. Tree Master is very optimized to make sure that there are no unnecessary draw calls for your creations. A basic tree consists of a trunk, branches and leaf meshes, all of which are a single draw call. Then you have your bark and leaf materials which bring your total up to 3.

    So, if you keep the same bark and leaf material and only change the tree type and foliage, you can add an unlimited number of vegetation creations to your library and add into your game and will only cost you 3 draw calls!

    Speaking of bark....you can swap out the bark material on the trunk and all of the branches with a slider as well!

    Below you can see I just scaled down the foliage so you can better see what's happening with the bark change. No matter how many branches you add, Tree Master handles a uniform application of the bark across all of them.

    TreeMaster Bark.gif

    Now you also have the option of adding flowers with a single click... and then adjusting the size and variety.

    TreeMaster Flowers.gif

    Of course adding flowers will add a new draw call to your stack, but keep in mind, if you do add flowers, you still have 9 different types of flowers available within that single draw call.

    You can also add Roots in the same manner!

    Last thing I want to show you is that all of this prepares you for exporting your trees as prefabs, or as collapsed trees ready for use on Unity's terrain.

    What you see below is the Mesh Analysis tool being used to quickly adjust the scene so you can examine the actual draw call count on your creation by turning off shadows, and disabling the skybox so all that is left is your geometry, and the single draw call from the engine. You can see when I show the Stats window, Set pass calls shows 3, but the tool shows 2--this subtracts the single call for the engine.

    Next the Exporter tool is used to quickly examine how many vertices your final exported mesh will contain, and then by using the Reduce Foliage buttons you can easily hit vertex counts.

    TreeMaster Saving.gif

    You can then export your creation as a prefab to use later, export the collapsed mesh for terrains, or if you really love what you made, save it out as a new Tree Template that will immediately be available in your Treey Type slider at the top!

    This tool developed from my own game development needs, and I just knew I had to share this with the community!

    What do you think?

    Any Questions?
     
    Last edited: Nov 21, 2023
  2. oleg_v

    oleg_v

    Joined:
    Nov 10, 2017
    Posts:
    68
    @mcbauer do you have plans to publish it to store? Looks good!
     
    mcbauer likes this.
  3. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Yes, been very busy with my job, but I hope to push this up within a week or 2.
     
    oleg_v likes this.
  4. oleg_v

    oleg_v

    Joined:
    Nov 10, 2017
    Posts:
    68
    Sounds great! Happy publishing, will wait for it!
     
    mcbauer likes this.
  5. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Uploading to the store now! I spent alot of time these past few weeks tweaking alot of the tools and customizations, but I'm ready to release the initial version.
     
  6. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
  7. FadelMS

    FadelMS

    Joined:
    Nov 20, 2020
    Posts:
    2
    I've just purchased the asset it looks great but I couldn't make trees respond to wind.
    How can I make trees respond to wind?
     
    Last edited: Nov 15, 2023
  8. Rodakai

    Rodakai

    Joined:
    Apr 3, 2014
    Posts:
    9
    I've also been trying looking at capabilities in regard to wind for this asset before purchasing. :)
     
  9. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    First off thank you for your support, it means everything!

    To make the trees respond to wind, unfortunately you will need to use a 3rd party wind based shader. Wind shaders isn't really what this tool is about. It is about generating an unlimited number of vegetation meshes for use in your games. That's why I opted to just use the built in Speedtree shader ( they also upgrade to URP and HDRP easily ) I assume at this point, almost everyone has some kind of wind shader they use.

    I have tested it with various other plugins, Vegetation studio, Vegetation Engine, Advanced Foliage Shaders, etc., and they all work fine--seeing as how the end result of TreeMaster is just a mesh anyway.

    If it's something you really need I can add it in for the next update.


    Sidenote: 1.1 update is pushing up tonight as I've added more Leave materials which has increased the total foliage options to 320.
     
    Last edited: Nov 17, 2023
  10. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
  11. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Working on wind shaders now. Will be in the 1.2 update
     
  12. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Just a quick example of the kind of foliage you can create with the latest update.
    Again, no hit to your draw calls having these 7 different foliage branches on this tree.

    Screenshot 2023-11-20 095943.png
     
  13. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Wind shaders for Built-in, URP and HDRP are done. Granted they are simple and do match the power of Vegetation Engine, but they for sure get the job done. Decent controls and I also added in Mobile compatible shaders as well.

    Submitting update now

    Wind TreeMaster.gif
     
  14. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    208
    Brand new install, using BIRP and this is what I have on the leaves.

    upload_2023-11-25_14-34-59.png

    Above you mention that you are using Speedtree shaders, ahead of the messages on adding your own shaders. I switched to Speedtree8 and it works.

    There is only a bark shader under the TreeMaster category of shaders - I assume the update mentioned above is not live yet.
     
  15. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    208
    Another bug for you, clicking the button upload_2023-11-25_15-0-51.png results in the following error:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Bauervision.TreeMaster.TM_ChangeMesh.ConfigureSceneForDrawCalls () (at Assets/TreeMaster/Scripts/TM_ChangeMesh.cs:533)
    3. Bauervision.TreeMaster.TM_ChangeMesh.OnGUI () (at Assets/TreeMaster/Scripts/TM_ChangeMesh.cs:403)
    The cause is that you are using "Find" with a hard coded name of "Directional Light" but your demo scene has changed the lights name to "Sun". You should probably look for the DirectionalLight by component rather than name.

    upload_2023-11-25_15-0-1.png
     
  16. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    208
    After further investigation I found that you have ShaderGraph files for the new shaders, but in Built-In Shader Graph is not present. Installing ShaderGraph from the package manager means your shaders are compiled and become available. You need to mark ShaderGraph as a dependency, you can do this when you package your asset so that it will be automatically installed when needed.

    You also need to test your releases in a new install before pushing them to the store. This is guaranteed to get you poor reviews (as can be seen by your one review so far). It's a shame, because on second impressions I like what you have done here.
     
    Last edited: Nov 26, 2023
    mcbauer likes this.
  17. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    208
    There's something funky going on with Foilage Scale. Try this:

    - Load you demo scene
    - Ensure tree type is 1 (same behaviour on all test, I don't think tree type matters)
    - Foilage Scale is set to 0.2 by default
    - Set Foilage Scale to 0.25 the foilage gets SMALLER, not larger
     
  18. SorraTheOrc

    SorraTheOrc

    Joined:
    Jun 11, 2016
    Posts:
    208
    The workflow here is very confusing. I'm trying to fine tune my tree, moving the branches. Twice now I have spent a good 30 minutes tuning the position of the branches and leaves. Then, for whatever reason, I decided to go to the Edit Tree Window. This window causes changes to the tree structure. For example, I have some disabled branches, clicking on one with the Edit Window active it is enabled and possibly moves it in hierarchy (and possibly more changes). It also renames the object so I can't set my own preferred names.

    I cannot understand why it is doing this, it doesn't seem to follow any logic I can understand. Since this tool is not a procedural tree generator I would not expect it to make changes unless I request them. Am I missing something?
     
  19. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Thanks for the feedback @SorraTheOrc
    First thanks for the suggestion on the ShaderGraph as a dependency, that was a last minute add to get moving leaves and I rushed it out the door before Thanksgiving break.

    Second all of your points are noted and will be reflected in the next update.

    As far the workflow, the key is to uncheck the toggles for Adjust Tree Type and Adjust Variety when selected on the Treemaster root, before diving down into the branches for specific adjustments. That way when you come back to Edit tree it wont automatically apply the current settings.

    As seen in the video below starting at the 30 second mark



    Also, I wouldn't recommend changing any of the names in the structure as long as you want to use the Edit Tree tool. Feel free to save out a prefab once you're happy and then change it around and name things how ever you want, but the tool is expecting things a certain way.
     
  20. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    One more thing...

    I'm probably going to remove this because it only applies to the BIRP, and honestly it's not something incredibly useful to the tool as a whole. It's more about proving that TreeMaster assets don't bloat your draw calls.
     
  21. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Unfortunately I am not seeing this behavior. When I load Edit Tree, Foliage scale value defaults to 1.0. Hand typing any values always go in the direction expected.
     
  22. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Update submitted
     
  23. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    I'm actually removing shadergraph all together, so another quick update is on the way. No sense adding dependencies if its not needed.
     
  24. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524
    Rushing to make these updates, I overlooked a big one, pushing hopefully my last hotfix for a while so I can get back to actually working on the update I want to do.
     
  25. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    524