Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

MTree - Tree creation

Discussion in 'Assets and Asset Store' started by mherpin, Aug 31, 2018.

  1. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    259
    Hello, I am running the trees created for mobile and when i test in the editor i can see artifacting on the trees. Is there a way to fix this?
    Thanks
     

    Attached Files:

  2. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    do you have antialising on?
     
  3. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    69
    Hi, this is the LOD dithering, if you are on mobile I would recommend to deactivate it since it can be expensive (select the tree prefab, and on the LOD group component set the "Cross Fade" to None). If you want it to be less noticeable, and also a bit more performant, toggle on "Animate Cross Fading".

    In the next version, the LOD fading will be set to animate automatically.
     
    CaliCoastReplay likes this.
  4. NorbertoSanders

    NorbertoSanders

    Joined:
    Dec 7, 2017
    Posts:
    20
    These trees I've researched do not support the Unity wind zone. Is there any update for this?
    In my project I use the Unistorm that works with Unity wind zone, but its shader seems to only touch the trunk of the tree, while the leaves stand still. I'd like to see this all working with WindZone, since it's a great feature.
     
  5. daniel-griffiths

    daniel-griffiths

    Joined:
    Jun 14, 2016
    Posts:
    27
    @mherpin @dan_wipf Thanks for the replies guys will apply the changes suggested , thanks!
     
    CaliCoastReplay likes this.
  6. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    Zeichenfläche 1.png Some sort of Ivy made with Mtree
     
  7. Waterlane

    Waterlane

    Joined:
    Mar 13, 2015
    Posts:
    143
    Oh... Ivy... now that's interesting... any more details on how it can be placed/modified.
    There was a great ivy generator on the Asset store before (I suggest you take a look - it had many cool features), but sadly it's depreciated atm...
     
  8. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
     

    Attached Files:

    Waterlane and Lars-Steenhoff like this.
  9. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    it looks ok, but it has a problem with the normals, you cant override them, resulting in a bit lack of of depth to the ivy, i know ivy generator, but do not have a copy :( there’s some ivy solution on github, but it’s rather complicated and not friendly in its ui, and settings
     
    Lars-Steenhoff likes this.
  10. Wonderm

    Wonderm

    Joined:
    Apr 18, 2014
    Posts:
    6
    hi , is there a way to change wind direction ?
    it just bend in Z direction now .
     
  11. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    259
    really loving your asset
     

    Attached Files:

    mherpin likes this.
  12. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    69
    Since I now used Amplify to create the shaders, adding support for Wind zones should be no problem !
     
    CaliCoastReplay and dan_wipf like this.
  13. TomTumbler

    TomTumbler

    Joined:
    Dec 1, 2014
    Posts:
    187
    Question / feature request: Is it possible to place any type of 3d mesh (for example an 3d model -> stones, houses, obstacles and so on) in the tree editor, in ordner to build the tree and his parts - like roots or branches - around and over the obstacles? What do I want to achive? Think about wastelands where trees / roots growing over houses and so on.

    This could also help for projects that's discussed above: ivy and similar types of vegetation / climbing plants.
     
  14. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    well, I guess it's possible => I did some testing, for more customized deforming. => have a look at the picture. this should be a some sort of Mountain Pine Tree and to go thunder I'll investigate more like If it'd be possible to change the shape of a tree with a collider

    Bildschirmfoto 2019-05-10 um 10.15.28.png
     

    Attached Files:

    Last edited: May 10, 2019
    Lars-Steenhoff likes this.
  15. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    69
    Man you stay killing it on this thread lately...how was this made?
     
    dan_wipf likes this.
  16. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    have you seen the asset file? there’s an example tree as fbx and mtree file
     
    CaliCoastReplay likes this.
  17. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    69
    Oh my gosh, I didn't even see you released it. This is a gem.
     
    dan_wipf likes this.
  18. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    69
    It probably wouldn't be too hard to create a Unity windzone interface script that hooked up with MTree. You'd just need to funnel the active WindZone values into the MTree Wind value somehow. But it's not supported yet...maybe the community here can brainstorm.
     
  19. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,072
    Having used both (SG and ASE) on HDRP, I'm not 100% convinced this was all that great move. ASE will get it's templates updated only when next full release arrives. So if you ever use Unity betas, alphas or any experimental version, only SG will work properly there if the HDRP shader templates have changed since last major release.
     
  20. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    69
    But if Unity keeps changing SG, nothing developed for it early will ever work late without constant, life-destroying time commitments by devs. Unity badly needs to stabilize its Shader Graph stuff, or the tech - as well as the new render pipelines - are going to languish. Shader dev is real and time consuming and nobody wants to have to rewrite all their shaders even once a year, much less two or three - a good shader can take weeks. Many devs I know are on Amplify right now just to get some protection from the shifting tectonics.
     
  21. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,072
    Afaik there's been only one major custom code related change for SG and new system should still work for most users.

    As for older SG's itself if we don't talk about the custom code api change, usually you just open the SG done with earlier version and save in place and it's upgraded. SG is also always updated for the SRP you use which is not what you get with ASE.

    Don't get me wrong, ASE is great, but it comes at it's own cost when dealing with SRPs as it's always playing catching up.
     
  22. kazil

    kazil

    Joined:
    Jan 10, 2010
    Posts:
    4
    just picked mtree up and really like what i saw from playing around with it for a bit. i did see a few things were missing that would make it even more powerful, this is from comparing to unity tree editor mostly. i know mtree is still new and so doesn't have full features yet, so if there is a way to do these or a workaround for them id like to know. if not and if any aren't yet on the to do list, could they be added if still taking requests?

    better control over where splits and branches are placed. kept getting trees that were quite flat looking (all branches on opposite sides leaving 2 without any) or had all the branches grouped together.

    control on how to place the branches (single, alternate, opposite, in groups of x number) with eventual manual editing to move / adjust specific branches, splits, leaf clusters for the perfect tree.

    using curves for more artistic control on shaping and placing. many unity tree values have a curve for a value depending on the individual branch / leaf placement with a slider for how much that value influences the branch / leaf. it allows easy setup for drooping branches in one height, straight in another, and ones reaching up at another spot on all one node.

    allowing broken branches when designing, static ones that is. with being able to set the break length from right up at the trunk / branch to anywhere along the length. would need an end cap texture to make them look right.

    per node control over wind movement with wind zone support. maybe a toggle to disable it per node if you want it stationary (such as a tree where only the leaves move) with a start height or radius and a max movement value for the tips.

    ability to toggle node visibility on and off. be able to work on specific nodes after setting up the tree without having to try finding a view through all the foliage
     
    CaliCoastReplay and dan_wipf like this.
  23. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    69
    I'm quite confused by this. There's an official Unity Shader Graph that works with the SRP?

    I thought, by definition, that SG *only* works for HDRP/LWRP.

    See under: https://forum.unity.com/threads/does-shader-graph-work-with-default-render-pipeline.559132/
     
  24. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,072
    By SRP, I mean HDRP and LWRP as those are only implementations Unity provides for us. PBR graph and unlit graph work for both of the mentioned SRPs.

    I'm going to stay here splitting hairs about the terminology though, just wanted to point out using ASE means you got less amount of compatible SRP (LWRP or HDRP) releases you can use it with. But of course it does make it easier to support non-SRP shaders along with the SRP ones with it as ASE works on all.
     
  25. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    69
    The demos from HDRP/LWRP look great for R&D in preparation for upcoming years, but most devs I see are struggling to work with the technology for production this year because the ground keeps shifting under their feet, so to speak. I'll stick with Amplify and the Default Render Pipeline, which I believe is the proper name for the pre-HDRP/LWRP approach, until Unity locks in the API. I just don't have time to be supporting a multiplatform approach to my shaders with unstable API tectonics right now.

    Maybe in 2020 if Unity really commits to providing a stable and universal set of Shader Graph features intended to be locked in for at least a multi-year cycle, including easy compilation for both LWRP/HDRP off the same graph if possible as long as only LWRP-compatible nodes are used, and/or other features to help cut down on the need to rewrite every shader twice.
     
    Last edited: May 12, 2019
    Lars-Steenhoff likes this.
  26. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,069
    Default Render Pipeline is were I will stay as long as possible
     
    CaliCoastReplay likes this.
  27. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    well. as for stable releases. LWRP is out of preview in 2019.1+

    HDRP remain in preview atleast until 2019.3+. but if this means that they change the main api with each new release i cant tell..
     
    CaliCoastReplay likes this.
  28. vcroye

    vcroye

    Joined:
    Jun 3, 2018
    Posts:
    2
    trying ou the asset. i really like it but i'm having problems with the Billboard Material.
    Unity 2019.1 - HDRP 5.13
    does anybody have a solution? Screenshot_1.png
     
  29. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    hdrp does not work with 5.x yet => either you create your own shaders, or wait until maxime releases the final hdrp shaders. (but maybe you need to wait until its out of preview, dunno. he will release in the next update shder stuff)
     
  30. vcroye

    vcroye

    Joined:
    Jun 3, 2018
    Posts:
    2
    thanks for the answer
     
  31. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    but anyway, what the problem is for the billboard hdrp shader, just checkt it and the cutout function is mostlikely not connected / not setup properly..
     
  32. AdamQ

    AdamQ

    Joined:
    Dec 2, 2016
    Posts:
    2
    Just imported latest mtree and noticed a few warnings in version 2019.1.2f1
    In MtreeComponent.cs:
    ReplacePrefabOptions is obsolete
    PrefabUtility.ReplacePrefab is obsolete

    Apparently this should be replaced with PrefabUtility.SaveAsPrefabAsset[AndConnect]
     
  33. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    582
    Is there a way to add a mesh collider to just the trunk? when i make the prefab it's all collapsed into one mesh per LOD so it makes life a bit difficult.

    If that's not possible, could I request that as a thing? :)
     
  34. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    i’d say in general it will not happen. because of that the trunk is generated with it’s whole texturing as a mesh. but couldn’t you use a sphere / capsule collider?
     
  35. sylon

    sylon

    Joined:
    Mar 5, 2017
    Posts:
    242
    I second this request :)
     
  36. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    582
    Sorry, I mean trunk and branches etc. Just not leaves.

    Good example of this being Zelda BOTW, you can climb up trees and walk along the branches up to a point. Manually placing colliders for this wouldn't be good enough to be honest.
     
  37. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    just a little add-on unity the official release of custom shape trunk =>
    (there's a bug in the branch creation, trying to get rid of) when it's gone I'll upload a version to work with

    how it works. you can build with a custom spline too(integrated) any shape you want =) / there's a switch between normal editing and bezier spline based editing.
    Bildschirmfoto 2019-05-13 um 18.31.24.png
     

    Attached Files:

    Lars-Steenhoff likes this.
  38. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    ok works now, quite well. =) just waiting for Maxime to give green light to share the code Bildschirmfoto 2019-05-14 um 00.45.55.png
     
  39. TomTumbler

    TomTumbler

    Joined:
    Dec 1, 2014
    Posts:
    187
    MTree should have a discord channel. ;)
     
    dan_wipf and Player7 like this.
  40. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    Some other tests.
    Nr.1 added more manual control in which direction the Branches grow. (Vector3 directions).
    Nr.2 added Collider based grow direction.

    Tree below => with Collisider based direction

    Bildschirmfoto 2019-05-14 um 17.07.15.png
    without
    Bildschirmfoto 2019-05-14 um 17.06.45.png

    Connected Bezier curve around a Pilar
    Bildschirmfoto 2019-05-14 um 14.13.01.png Bildschirmfoto 2019-05-14 um 14.12.52.png
     
  41. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,069
    super cool!
    Will it be possible to grow the branches at runtime?

    Thats one amazing thing the deprecated ivy asset had.
     
  42. TomTumbler

    TomTumbler

    Joined:
    Dec 1, 2014
    Posts:
    187
    mherpin said, yes - in a later version.
     
    Lars-Steenhoff likes this.
  43. TomTumbler

    TomTumbler

    Joined:
    Dec 1, 2014
    Posts:
    187
    Hm... it has potential. The branches and leaves are not really realistic in their placement. In some parts it looks like the leaves were flying in the air - without connection to the branches. ;)
     
    dan_wipf likes this.
  44. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    yes.. that’s for sure an issue. aswell that it can draw dead / broken branches.. i investigate further how to fix that
     
    Lars-Steenhoff likes this.
  45. TomTumbler

    TomTumbler

    Joined:
    Dec 1, 2014
    Posts:
    187
    @dan_wipf The way to create custom trunks and branches with splines is great. As far as I know, that's the way Speedtree does. With splines you have maximum flexibility. On this point - one wish: Could you optimize the way, sub branches have been placed? It could have a more natural look if there could be more options/silders (for manually tweaking). I speak of "branch hierarchy":
    > trunk
    > > main branches
    > > > sub branches
    > > > > sub sub branches
    ...and so on - each manually tweakable (how many sub branches, type of randomize, length of branches/subbranches...). I hope you can follow me. ;)

    Btw. do you develop MTree with @mherpin as a team or do you create add ons for the asset?
     
    dan_wipf likes this.
  46. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    well as for your last question. i do just in my opinion usefull addons, which i,d like to have included, for better varity in trees => some older posts you can see some tools. one is a randomizer, which allows you full controll over what you want to randomize (will be included, approximatly after the next update is live)

    for more controll over branch distributing / deleting branches maxime is on it and has done some tests.

    and one final thing is, that i do not want to make alot of source code available due to we paid for the tool and i think to honor the work it’s good if it’s protected and just for purchase.. (the shaders are some sort of open for every one, that was when i last checked with maxime) so to come to a point. making a addon which modifies mtree from the out side and not changing alot of the original files is kind of hard...

    i’ve done now a manual for the bezier addon, which results in 2.5 sides of how to manipulate the mtree files to get it work => i believe it’s a bad work around but well maybe i find some sort of other way..
     
    StevenPicard and Lars-Steenhoff like this.
  47. TomTumbler

    TomTumbler

    Joined:
    Dec 1, 2014
    Posts:
    187
    Ah, okay.

    Okay.

    Uh... this special point I didn't ask you. ;) Because I'm a designer, not a coder. I do not need any sort of code. I hate it! I love it to delevop my needed things visually. My mouse and my digital pen are one of my best friends. :D

    I didn't know, "how" you extend MTree. I can imagine, that's not easy. Maybe maxime could create an API, like others do. So you - and others - could extrend MTree easy.

    Uh...
     
  48. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,069
    Its great progress! love the new features they look so good
     
    dan_wipf and StevenPicard like this.
  49. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    just a little info / example, you are able to create sub / sub sub branches.

    fulltree:
    Fulltree.png

    level 1
    Branchlevel_1.png
    level 2
    Branchlevel_2png.png
    level 3
    Branchlevel_3.png

    Edit:

    Solitproba stands, as far as i know split propability => if its Value is 0 you’ll get a single branch, as seen in level 1. if increased there will be multiple splits on a level
     
    Last edited: May 16, 2019
    StevenPicard likes this.
  50. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    168
    i have created one.. some people are on it from the forum
    https://discord.gg/pqKqazJ
     
    TomTumbler and Lars-Steenhoff like this.