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. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    84
    So, it looks like not an issue with your particular settings after all, but an issue with the old shaders (which are indeed pretty old and haven't really been updated since the initial release).

    I highly suggest that you and *all* other Mtree active users get the Addons installed which include newer and better shaders, and to see if you can find settings with the newer shaders that fix these issues!

    https://github.com/danwipf/MTree-Addons/

    Once again, all these Addons are intended for addition in the new release as soon as Maxime gets some time to help us integrate them officially.

    This is absolutely impossible to do if your tiling is not a whole number.

    Think about it: If your texture is cut in half or a quarter it's not seamless anymore.

    Much as I know this isn't the answer you probably want, there's nothing wrong with the current UV's - Mtree UV's are set up to be as seamless as possible if your textures are seamless. If they are not seamless, or if your tiling is not a whole number, there will be seams. This isn't a problem with the MTree technology or our UV's; it's simply how texture tiling works. You'll generate seams on most Unity objects if you don't use whole-number tiling (unless they're doing something very advanced).

    I get the sense you turned the tiling down to half because you want the texture to look "bigger" on your trees from a distance? You're going to have to generate a seamless texture at the right size if you truly want to have that look with no seams - take the one-quarter of the texture you're using (that's what 0.5, 0.5 tiling is, after all) and make it into its own seamless texture:

    https://creativepro.com/creating-seamless-textures-in-photoshop/

    These are great ideas, but also very advanced ideas and really not feasible for us to undertake in the next version or two. We're a small "team" right now and dan and I are unpaid volunteers on this project.

    However, we are also a project that absolutely wants to support user contributions to MTree (that's how dan and I got started!) and if *you* want to research these things, I encourage you to join the Discord for the project and we'll chat!

    https://discord.gg/fC6kt5

    Many things might be more possible if Maxime is able to meet with us soon and/or allow us to become official publishers on the package!
     
  2. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    174
    Is this a good place to request features for this? I really like how it can so easily generate some pretty cool trees, but there are some issues that hinder them being used on my project.

    I need two things:
    * A "growth" slider, from 0 to 1. This would cap the length and width of the trunk, how many branches grow, and how many leaves grow on the branches. Something as simple as setting the scale of a 'not-to-grow-yet' branch to 0 would suffice. This would be used to enable players to plant trees and watch them grow over the days, there is no need for this to be fast, since they don't really need to grow in real time, I would just randomly select 3-5 trees to grow each frame, and eventually they would all grow nicely, especially if I can somehow put the tree mesh generation code in another thread.
    * A "Fruit hardpoint". Create a bunch of empty gameobjects (or gimme a list of positions, so I can use ECS for the fruits instead) on the branches, it's like how leaves work, but being able to access from code so I can spawn fruits, the player then can collect them, they would generate flowers -> fruits over time and whatnot. A big plus is being able to tell the tree how many hardpoints I want, and it always generate them on the same relative (the third fruit always spawn on the tip of the 11th branch) places, even better if it could even tell me which ones were not generated because the branches are too young because of the growth slider asked above

    The biggest issue I face on implementing or simulating this myself is that the tree randomizes itself every single change I make, so, although I can see a tree growing, the leaves and branches are teleporting all over the trunk every frame
     
  3. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    84
    You can always simply scale the tree object in the GameObject values - but that's probably not a great solution if you want to actually do a growing-plants game with "sprouting" branches, etc.

    Right now MTree doesn't support a genuine growing-plants feature, and probably isn't going to anytime soon because as cool as it is, it's also *very* hard.

    The fruit hardpoint idea is more feasible - Mtree already does something similar internally for leaf generation, and it's possible we could work on exposing a list of spawnpoints for fruit or other hanging objects - but I can't promise that we can do it soon!

    Again, these are great ideas, and things we'd love to do one day.

    I can't promise anything on these at all without help from Maxime himself, however - who has still been unable to get free to help us with the new version yet.

    What I'd suggest is possibly joining dan and I on the Discord - you guys will hear this a lot in coming weeks - so that if *you* want to start researching some of this, you have the benefit of the community and its expertise when it comes to looking at the code yourself.

    https://discord.gg/fC6kt5
     
  4. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    174
    How do I lock a tree to a specific seed instead of having it regenerate every single small modification?
    That alone would help making the whole feature feasible
     
    dan_wipf and CaliCoastReplay like this.
  5. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    84
    You can't, yet - and it has to do with MTree's internal algorithm. The same seed will produce different leaf placements, et cetera, with different values of the main algorithm instead of keeping things "stable", because that kind of stability wasn't an assumption made and specifically coded for in MTree's initial version.

    I agree that it's an amazing feature request, and I myself am having some similar issues with the difficulty of how hard it is to keep Mtrees "stable".

    Support for it would need support from Maxime Herpin, however, who is this app's actual developer. (Dan and I are just volunteers, and unpaid at that.)

    Dan and I *have* however made some inroads into looking at the tree generation code; again, we're happy to share what we know if you want to join us on Discord one day.
     
    dsilverthorn, dan_wipf and Guedez like this.
  6. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    The reworked Standard Märe Shaders built with Amplify (Function Nodes included). Btw. if you do any improvement we're happy to know! =)

    Avialable aswell on Github: https://github.com/danwipf/MTree-Addons
     

    Attached Files:

    Efpariah and hasantayouji like this.
  7. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    Allright according to maxime the SRP are ready to launch for the Update! Just keep in mind it’s still an unstable thing to use, and in preview! So it was maybe a fault to support it and we should have waited for that like dynamic advanced shaders or vegetation studio did..

    but as it says in the assetstore description, we will support all srp’s with the next update!

    dan
     
    CaliCoastReplay likes this.
  8. PierrotOrkeis

    PierrotOrkeis

    Joined:
    Apr 1, 2019
    Posts:
    1
    Hi, thanks for this good tool for creating trees. I saw that it's not yet possible to change tree parameters in runtime. Do you know if it will be implemented shortly or not ?

    Thanks,

    Pierre
     
  9. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    Hi Pierre

    i will say right now no, it wont be implement in the near future. But i’ll discuss this!

    Dan
     
  10. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    174
    Is it because of the billboard generation?
     
  11. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    127
    I love this tool thank you very much.
    With some improvements on the realism front, especially when it comes to the positioning of the leaves, you have a unique opportunity to become the topmost preferred tree creation tool on Unity. Especially now that SpeedTree has become so slow and stupid. :p

    Please if you haven't already, start working on 2019.3 support.
    It is in advanced beta, soon to be released, and it throws quite a few errors. Such as:


    Assets\MTree\Editor\LeafWindNode.cs(23,10): error CS0246: The type or namespace name 'Slot' could not be found (are you missing a using directive or an assembly reference?)

    Assets\MTree\Editor\LeafWindNode.cs(23,10): error CS0246: The type or namespace name 'SlotAttribute' could not be found (are you missing a using directive or an assembly reference?)

    Assets\MTree\Editor\LeafWindNode.cs(21,18): error CS0103: The name 'Binding' does not exist in the current context

    and other similar related to Wind.
     
    CaliCoastReplay likes this.
  12. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    hi @soleron, this is due to unsuported srp pipeline in 5.x,6.x and 7.x!

    i’ll let you know when and what exactly the next update includes!

    dan
     
  13. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    127
    They look like minor API issues. The materials work just fine.
    Unfortunately I can't compile or even preview because of this, even though there is nothing wrong with the trees or their features.
     
  14. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    most likely you’ll have an error in the windnode script :)
     
  15. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    84
    Just wanted to check in - been continuing to work with Mtree, and developing my own normal-mapped photoscans!



    Full res: https://imgur.com/a/OBuLr1j

    Mtree is capable of some REALLY amazing visual fidelity when using photoscans!

    The custom shaders I've been developing with Fresnel support don't hurt either!

    Hope everyone is doing well and making some wonderful stuff!
     
    Last edited: Oct 11, 2019
  16. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    Good news ahead!

    We’re testing the Mtree 2.2 Version which has right now some bugs to get rid off!

    We will reveal the full changelog ASAP! Maybe not every wish and feature request is involved, for example the bezier addon wont be included yet, the reason is easy we want to push this update as fast as possible with maximum compabilty!

    dan
     
  17. CaliCoastReplay

    CaliCoastReplay

    Joined:
    Mar 26, 2017
    Posts:
    84
    100% Mtree plus my personal photoscans and community shaders (shaders to be released in MTree 2.2 hopefully!) - plus a bit of Substance and of course the Unity Postprocessing Stack - in this shot.



    Keep working!

    Let's see a hit game made using this technology in 2020! :p
     
    Last edited: Oct 14, 2019
  18. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    Back with some news! Update as planed will be delayed due to troubles implementing hdrp on 2019.2 and above. Unity failed at good support and included some bugs which are game-breaking!

    i’ll give further news when we know more and i am around on discord! almost everyday! (link in my signature)

    dan

    PS: Any requests, wishes and feedback :), feel free to post them below or directly on discord!
     
  19. MartinWorker

    MartinWorker

    Joined:
    Feb 24, 2015
    Posts:
    4
    Hi,

    We sucked too with the new unity HDRP, I see, they simple removed the functions what u used. Their support is terrible, and the whole HDRP stuff is a hardly unstable, and an unusable thing. :(
     
    CaliCoastReplay and dan_wipf like this.
  20. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,073
    I've learned to stay out of the .1 and .2 versions of Unity. I can't take the frustration when everything breaks. :(

    to be fair, this is how Unity numbering works now..., but of course customers complain if experimental betas aren't supported, much less official releases. Sorry this happened to you. Seems like a no-win situation.

    In the meantime, for those of us on 2018.4 LTS, what's the recommended downloads? Mtree from the asset store and then all the add-ons from the discord?
     
    CaliCoastReplay, hopeful and dan_wipf like this.
  21. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    yes indeed Mtree shaders 2.2 are good to go! the rest of the shaders are more what can be done stuff!

    the tutorial folder is also recomended to exclude :)

    and be aware of reading the manual of bezier addon, requires some setup in mtree code!

    thanks for your supporting words!!!

    dan
     
    CaliCoastReplay likes this.
  22. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    A4BBD1A0-8685-4816-BE10-7519C656975A.jpeg 1671919E-729A-4CC9-9A8F-FE0CAF6A1374.jpeg Hdrp 6.9.1 is finished!

    Here i post two photographs of the result. The Birch is from Mtree and i placed a Fir from Nature Manufacture next to it as Reference.

    On the picture looking towards the sun you may see white dots on the Leafs of both tree. We can not get rid of them, you need to use Post Processing on this case!

    dan
     
    CaliCoastReplay and Flurgle like this.
  23. ManiaCCC

    ManiaCCC

    Joined:
    Aug 15, 2015
    Posts:
    40
    Hello, two questions , with new update, will be my trees compatible or will need to rework them due to new shaders?

    Also, is possible to make more control over wind feature in mtree? Like direction, turbulence strength and frequency etc.?
     
    CaliCoastReplay likes this.
  24. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    Hi there,

    Are my old Trees compatible with the new Update?
    -
    Yes they are! I tested it with Prefabs and after you click upgrade tree, your tree should be displayed correct!

    Is it possible to add more function how Wind affects my Trees?
    -
    Yes! We add in next release more options to control the wind!

    Dan
     
    CaliCoastReplay likes this.
  25. Efpariah

    Efpariah

    Joined:
    Feb 3, 2019
    Posts:
    2
    Hey there, So I've been working with Mtree for a couple weeks now, and thank you all for making such a cool tool for speeding up vegetation. I am particularly stoked on the amplify shaders! I have a quick question, if I wanted to use the Mtree wind displacement amplify shader function on one of my own shaders/models would it work?, also What vertex colors should I be using? Cheers, Erik
     
    CaliCoastReplay likes this.
  26. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    Nice that you like it!
    Hm, cant tell you if it works, wind displacement is based on vertexcolor channel red and green. ambient occlusion uses alpha channel.
     
    CaliCoastReplay likes this.
  27. Apollo11_1969

    Apollo11_1969

    Joined:
    Nov 20, 2018
    Posts:
    1
    I'm new to Mtree and also to Unity. I've made my first tree, how do I export it as a game ready asset so that I can use it in my other Unity projects please?
     
    CaliCoastReplay likes this.
  28. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    Hi there:
    1. Select your Tree and hit in Inspector the third tab of Mtree Component (save as Prefab).
    2. Select the Path (preferable in Project) and Name of your Tree and hit Save as Prefab.
    3. Select now the saved tree. For example "Oak" and the Folder "Oak_mesh".
    4. Export as an Asset package, or manually Import it all from the Finder/Explorer to your next Project.

    See the Picture for what Needs to be exported, so the trees work in your other Project.

    Explenation for Export.PNG

    EDIT: VS_Indirect.cginc has to be included aswell!
     
    Last edited: Nov 2, 2019
  29. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    Hey, some quite nice updates to share! We’re now in Beta testing of Mtree 2.2!

    Well here’s the full changelog, in comparison with Mtree 2.1:

    Code (CSharp):
    1. Mtree Editor:
    2. - Enhanced Branch Editor (Normalmaps compatible)
    3. - Tree Templates replaces Prefabs
    4. - Instant Ambient Occlusion
    5. - Procedural Leaf Type
    6. - Global Wind Controller
    7.  
    8. Mtree Shaders:
    9. - Amplify made Shaders(full source files)
    10. - New Wind System
    11. - Billboard Wind
    12. - Full reworked shaders
    13. - Full SRP support from 2018.3 upwards with latest, confiremd SRP versions
    Want to test it out? Send me your Invoice / Receip number on our Discord Channel!

    https://discord.gg/pqKqazJ

    dan
     
    soleron likes this.
  30. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    127
    Tried to join the support server but the discord link has expired. Maybe make a non expiring one?

    Thanks!
     
  31. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
    well this is a non expiring one :/
     
  32. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    127
    Then maybe you have blocked me? :p

    upload_2019-11-12_14-36-20.png
     
  33. dan_wipf

    dan_wipf

    Joined:
    Jan 30, 2017
    Posts:
    206
  34. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    127
    looks like this is a Discord bug. if you are not logged in on the browser it doesn't allow you to accept the invitation. after logging in on the browser it worked.

    Thanks.
     
    dan_wipf likes this.