Search Unity

MTree - Tree creation

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

  1. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    465
    HDRP MTree is not baking billboards properly. I can't imagine how others have not noticed this, except perhaps because they are baking the billboards close to the lighting conditions they have... for the scene they baked in.... or perhaps because billbaords are not seen much intheir games, but in a top down game they dominate, and with a bright spot in the middle... of every tree when seeing hundreds at once ...its very noticable. Notice also how the left ones are brighter than the right ones. When rotated, this also causes weirdness in the way the forest looks, and causes color problems as well.

    Those roots really tie the tree together. Look awesome.

    EDIT: After lots of experimenting and changing of the billboard camera, (including putting in my own local volume and directional light rotated to face down on top of the tree instead of from the side) I finally got satisfactory billboards.

    EDIT II: I ended up not needing billboards of any real detail. Instead I modeled out low poly tree models, and the amount of savings in Tris, combined with the GPUInstancer Asset store asset, made it so I could have a map full of thousands of tree models, about 800 tris each, at about the cost of only 20 fps at most.
     
    Last edited: Feb 27, 2021
    mherpin likes this.
  2. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    465
    As well as the bright spots in the trees I mentioned in Discord many, many months ago, exporting to 4 LODs + 1 billboard is an unecessary noob trap. Jason Booth wrote an essay about it that I posted to the Mtree Discord, which explains why "Moar LODS!!" is not the answer to problems like popping, and often make the problems worse, because it creates more transitions, and because the difference in verts is not big enough from LOD to LOD to justify the constant LOD swap costs. It would be really nice if we could limit how many LOD's we want to export. I only need two models and a billboard, so that means I have to cull and rename everything for every tree I make.
     
    mherpin likes this.
  3. Ne0mega

    Ne0mega

    Joined:
    Feb 18, 2018
    Posts:
    465
    When a trunk is given a height offset, and you bake out the MTree to prefab, the billboard sets its pivot point at local-y-0, but the pivot points for the rest of the LODs are at local-y-0 +heightOffest , making the billboard taller by the amount of the height offset.
     
    Last edited: Feb 27, 2021
    mherpin likes this.
  4. leslviv

    leslviv

    Joined:
    Jun 22, 2019
    Posts:
    32
    After adding Mtree Asset to 2021b7 URP project:
    upload_2021-3-3_16-35-19.png
    We have switched from ppv2 to native URP post processing a while ago. ppv2 is discontinued.
    I think everything works if to remove ExampleSceneManager so far. Will update if anything else. Just wanted to let you know.
     
    Last edited: Mar 4, 2021
    mherpin likes this.
  5. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103

    Hi there, thank you for your comments on this, we are currently refactoring the LOD system and will we be sure to remember this! Have a great day :)
     
  6. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103
    That is very appreciated, thank you !
     
  7. Gamingbir

    Gamingbir

    Joined:
    Apr 1, 2014
    Posts:
    157
    are you able to make a low poly stylized tree with it?
     
    3uhox and mherpin like this.
  8. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103
    Hi there, yes of course you can control the level of poly you want in your tree when you are creating it. As for the style, you can personalize your tree (its leaves for example) so it matches what you have in mind.

    For instance you should theoretically be able to do a tree close to the image below using custom leaves that are shaped like spheres.
    upload_2021-3-15_13-44-57.png

    If needed don't hesitate to ask the community (here or on Discord) if anyone already did these kind of trees ! :)
    Have a great day
     
    wetcircuit and ledshok like this.
  9. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,455
    Hi @mherpin,

    Am a user of Unity MTree but have a question about Blender MTree. Sorry for posting that here but have messaged here before so figure I might as well. Is there is a way in Blender 2.8+ to load in leaf collections instead of just a single object. This way have more variation? Thinking of using 2 tree parameter nodes to add the main leaves and then the smaller leaves to extremities only. Figured I would ask though.

    Edit- Figured out it is using the particle system and the settings can be changed to using a collection in the particle settings.
     
    Last edited: Mar 21, 2021
  10. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    609
    Hello,

    Will this (a) work properly with HDRP 2020LTS and (b) allow use of wind out-of-the-box, or are there any issues to know about?
     
    Last edited: Apr 27, 2021
  11. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    609
    Is this product dead, or are you around?
     
    dan_wipf likes this.
  12. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103
    Hi there, I believe I have answered by email - sorry for the delay, this is unusual.
    Here the answer for everyone else :

    Yes. I have just released Mtree 2.5.1 : there is full compatibility with all versions of Unity HDRP pipelines (as of today).
    For Unity HDRP 2020LTS, you will need to use Mtree SRP called "HDRP 11+".

    In any case the wind is always out of the box, you'll just need to create an empty object and add the Mtree Wind to a scene.

    It will work right away.
     
  13. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103
    Again, my apologies for the delay. Mtree is still active, I am working on bug fixes, new features and updates for new Unity pipeline versions.
     
    capgeti, Mark_01, ledshok and 5 others like this.
  14. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,120
    Don't forget the folks (like me) that still use the built-in render pipeline! (because it's just better)
     
  15. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103
    No worries! Mtree is developed on the built-in render pipeline so it will always be compatible for it :)
     
  16. marlukasz1992

    marlukasz1992

    Joined:
    May 26, 2021
    Posts:
    2
    Hello,
    I have a strange problem when using Mtree component inspector window. Every time I'm changing any value on functions like "Branch" or "Leaves" it keeps switching to the "Trunk" function.

    Have you guys encountered that kind of problem before? Is there any solution for it?



    Unity: 2020.2.2f1
    HDRP: 10.2.2
     
    victorkin11 and Duffer123 like this.
  17. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103

    Hi there, I believe you had this issue with Mtree 2.5.1. I have made a hot fix with Mtree 2.5.2 that is available now and is going to fix this. Tell me if you get other issues! Thanks
     
  18. marlukasz1992

    marlukasz1992

    Joined:
    May 26, 2021
    Posts:
    2
    Thanks for the response!

    Unfortunately I was testing in on the recent version. (2.5.2 from yesterday)
     
  19. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103
    Hi, I've just tested with 2020.2 (last version is using HDRP 10.3) and it seems to work, I would advise to re-import Mtree, and test again if possible! In the meantime I'll do further tests (with HDRP 10.2 specifically), you can keep me up to date :) thanks
     
  20. capgeti

    capgeti

    Joined:
    Mar 5, 2017
    Posts:
    1
    Hello mherpin,

    I'am using MTree version 2.5.2 with Unity 2021.1.11f1 in an URP-Project on Windows 10.
    The leafshader is flickering on a specific distance. It's hard to descripe, so I hope this GIF will help.

    mtree_shader_problem.gif
    https://capgeti.de/mtree_shader_problem.gif

    Steps to reproduce:
    - Start a new URP Project
    - Import MTree Asset v2.5.2
    - Open example scene
    - Import Assets/MTree/SRP/SRP 10.5+/URP 10.5+.unitypackage

    This behaviour does not appears on HDRP.

    Can you help please?

    best regards, Michael
     
    Last edited: Jun 15, 2021
  21. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103
    Hi there, as answered on Discord I don't have a solution for now but I will keep investigating. Thanks for your comment!
     
  22. SKNKanimation

    SKNKanimation

    Joined:
    Feb 24, 2017
    Posts:
    12
    Logged in just to say that MTree is freaking rad. I spent days hating on various trees in how they ran on the Quest. Thanks to MTree and the easy-to-edit shaders and options, I can get 72FPS in a forest with plenty of headroom for gameplay on Quest 1. So cool. Thanks for making this.
     
  23. mherpin

    mherpin

    Joined:
    Oct 1, 2013
    Posts:
    103
    So glad to hear! Thank you for the support :)
     
    Mark_01 likes this.
unityunity