Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Assets AltTrees System [WIP] [AssetStore]

Discussion in 'Works In Progress' started by Diab1O, Sep 19, 2016.

  1. clamchoda

    clamchoda

    Joined:
    Jan 21, 2017
    Posts:
    11
    I was having problem with dark mesh in 5.6.0f3. For anyone else having the same issue, you may have auto-generate disabled in your project for light mapping.

    So even if you are not light mapping, and even if you have 0 static objects in the scene, you still need to let it generate a 0kb "non-existing" lightmap. Sneaky new Unity features :p

    [​IMG]
     
    Diab1O likes this.
  2. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Who has problems with the hue after importing trees from the terrain - I can send shaders with a disabled hue. Or you can wait for the next update - it will be able to change the hue for all trees or turn it off.
     
  3. The_Uber_Rasta

    The_Uber_Rasta

    Joined:
    Feb 25, 2014
    Posts:
    8
    is there any chance of getting a plant touch bending effect with altTrees vegetation in future? That would be really awesome.
     
  4. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Hi,
    Yes, I plan to do it in the future.
     
    The_Uber_Rasta likes this.
  5. clamchoda

    clamchoda

    Joined:
    Jan 21, 2017
    Posts:
    11
    Hello does Alt trees support baked lights on billboards now? I can't seem to get them lit with light probes in 5.6. The mesh will take the light from the probe, but not the billboard
     
  6. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Hello,
    No, at the moment it can not be done. In future versions I will try to fix this.
     
  7. clamchoda

    clamchoda

    Joined:
    Jan 21, 2017
    Posts:
    11
    Ok thanks for the reply. Is there any work around at the moment to get by in the meantime?

    Getting some great performance out of AltTrees, but having to use real time lighting is eating it up :/
     
  8. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    This is difficult and will take a lot of time. At the moment, there are more important things that I need to do.
    As soon as I get to this - I'll start to do it.
     
    clamchoda likes this.
  9. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,451
    What does Density Objects setting do? I tried using this in both editor mode and runtime and nothing happens differently even when the value is set to 0. I thought this would reduce the rendered density of trees, but it doesn't appear to affect anything.
     
  10. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Hi,
    This option only affects Objects. Reduces the density of Objects.
     
  11. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,451
    What do you mean by objects? I thought AltTrees only handled trees.
     
  12. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Objects - does not have far billboards. Objects are needed for small items - grass, stones, etc.
    See the "Is Object" checkbox
     
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,451
    I see. Thanks.

    Also, is there a way to cull far trees beyond a certain range instead of always having billboards at all distances?
     
  14. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    At the moment, you can not. But I plan to do this in future updates
     
    magique likes this.
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,451
    0.9.8.1 went live on the store. Looks like some great fixes/enhancements. I look forward to giving it a try.
     
    Diab1O and The_Uber_Rasta like this.
  16. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Update 0.9.8.1 is available on AssetStore!

    Changes:

    - extended the functionality of the "Patches" section
    - added "Shaders Configurator" in the menu "Window/AltSystems/AltTrees/Shaders Configurator"
    - processes of import and export of terrain are accelerated
    - improved crossfade billboards
    - fixed normals on the billboard
    - added the option of automatic tree conversion when importing from the terrain
    - fixed the bug of removing trees via Ctrl
    - "Ambient Intensity" parameter is corrected in the Billboard Generation Settings
    - in the API added function "getAllTrees"
    - the "Generate All Billboards on Start" option is removed
    - API function "editTree" replaced with "editTrees"
    - removed the change Hue when importing and exporting terrain.
    - fixed the bug of generating tree icons when using a large number of trees
    - accelerated the process of generating a billboard
    - optimized and accelerated the process of converting a tree
    - added options to the API "maxLODTreesAndObjects" and "useBillboardsWhenMaxLODTreesAndObjects" - You can turn off high polygonal LODs if the computer is weak.
    - added the option "Depending on Camera Speed"- the speed of checking the distance and the crossfade speed
    - added menu for converting several trees at once
    - fixed a bug with colliders when using "Density Objects"
    - "Stable Editor Mode" option added. Try to disable it if your editor lags
    - fixed tree conversion
    - fixed AO (and other image-effects) in forward mode
    - fixed shadows
    - optimizations...
    - bug fixes...

    I will update the documentation soon.

    If you find a bug, please write to me!
     
  17. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,451
    There is a bug in the new version at the end of the checkTreeOrObject function in AltTreesPatch.cs. You are accessing the AssetDatabase, which is only available in editor mode so when you build for stand-alone it fails. I just added it into the #if UNITY_EDITOR code right above it and got working again, but you should fix for next version.
     
  18. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Hi,
    Thank you! I will now send a fix to AssetStore
     
  19. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,451
    Unfortunately, I'm also see some crazy popping and disappearing trees issue. After upgrading my project it doesn't work correctly. The biggest issue is that I see trees disappearing and reappearing as I approach them. And then occasional random popping between LODs. I'm not sure what could be wrong. The only thing I did other than run the Upgrade Trees function was to recompile the shaders with no Hue feature.
     
  20. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    There is such a problem. It is only in the Editor mode. I will fix this in the next updates.
    Is there no problem in the game mode?
     
  21. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,451
    Yes, I see this in game mode and stand-alone build.
     
  22. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    178
    Version 0.9.8.1 still causes the Unity Editor application to crash on Mac. Downloading and installation of the asset works normally/as expected, but when Creating the AltTrees component from the Window menu, the application freezes for a moment and then crashes completely, just as 0.9.8 did. I tested in Unity 5.6.1p4 today, but have experienced this crash in all variations of Unity 5.6.x. When I get a chance, I'll try and set up a Unity 2017.1 test installation.
     
  23. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Can you make a video?
     
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,451
    I'll do that as soon as possible, but can't right at the moment.
     
  25. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    178
    This is interesting.... AltTrees 0.9.8.1 does appear to work on Unity 2017.1 b10. I can create the component and convert trees without any kind of crash. However the Generate Speedtree Wind parameters project does not work. I recall that there were some tricks needed to get that to work properly on Mac in the past, when I get some time between projects I'll try digging through the scrollback to find the code tweaks you'd given me.
     
  26. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Excellent! Probably in the Unity was a bug on Mac, and they fixed it
    In occasion of a wind - I corrected this bug. Perhaps there is another problem. Do you have any errors in the console? Can you describe what does not work?
     
  27. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    178
    There aren't any console errors, but when I open the Generate Speedtree WindParams project and hit play, this is what I get...

    Screen Shot 2017-06-20 at 8.14.59 AM.png

    When inspecting that scene, I noticed that the GenerateSpeedTreeWindParams gameobject has a script component that looks like it wants you to specify a wind zone, and there is none in the scene. I added one to the scene, and then dragged it into the empty field, then ran it again, but still got the blanked out Play screen.
    Screen Shot 2017-06-20 at 8.18.43 AM.png
     
  28. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Hello,
    Most likely a problem with standard fonts. Maybe this will be fixed in the release.
    This is an obsolete field. It is not necessary.
    I will send you a PM file, please check.
     
  29. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    178
    That file seemed to fix it. Trees now work and have wind (in 2017.1b10), but I'm noticing that as I move around in the editor trees seem to sporadically disappear and reappear. It's not distance-based, since I sometimes find trees closest to the camera appearing or disappearing out of thin air. That, and after moving position then sitting for a moment, I've noticed large groups of trees appearing/disappearing. I had thought that at worst, the trees would go billboard and not completely disappear.
     
  30. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,451
    This is exact same thing I reported earlier.
     
  31. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    This is a bug in the Editor. In the play mode, this should not be. I plan to fix this in the next versions
     
  32. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    807
    Will this speed up billboard grass rendering? I'd like to use dense fields of grass and Unity's system is quite slow.

    Thanks.
     
  33. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Sorry for late answer!
    I do not think that the grass will be faster than terrain grass. If you compare SpeedTree grass, then my system will be faster.
     
    Dwight_Everhart likes this.
  34. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    I have a problem when I load a scene with AltTree a second time. I mean the first time it works, the second time I load it, AltTree does not display any trees.

    This happens ONLY in a build. In editor everything is fine.

    To test the problem just add this to the Update() function in Alttree.cs

    Code (csharp):
    1.  
    2.                 if (Input.GetKeyDown("space")) {
    3.                   ReInit(true);
    4.                 }
    5.  
    If you press space in Editor, it will reinit Alttree correctly. But in a build, it will do nothing.
     
  35. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    Ok I think I have solved the problem I added this and it is working now. It may help someone else with the same problem.

    Code (csharp):
    1.  
    2.         void OnLevelWasLoaded(int level)
    3.         {
    4.             // in comment is the author's code for reference
    5.             //Log("OnLevelWasLoaded " + this.name);
    6.            // if (altTreesManager != null)
    7.            //     altTreesManager.destroy(true);
    8.            // isInitReady = false;
    9.            ReInit(true);
    10.         }
    11.  
     
  36. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Hello,
    Thanks, I'll look into this problem.
     
    jimburn likes this.
  37. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    104
    This looks great @Diab1O -- are the wind features already in?

    Is it fair to say there are performance benefits to be had, even in scenes that don't have a lot of trees and vegetation, i.e. <= 1000 items?

    // WildStyle
     
  38. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Hi,
    Sorry for late answer!
    The wind is ready for SpeedTrees and TreeCreator trees.
    Performance depends on the scene, I can not say without seeing the scene.
    Performance will improve only for SpeedTrees and Meshes.
     
    WildStyle69 likes this.
  39. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    104
    Thanks for reply, sounds good.

    So today I purchased your asset and have been setting things up. I converted my existing terrain trees and have been testing my scene with terrain meshes and Alt Trees vs. standard Unity terrain and trees. At the moment am noticing less performance with Alt Trees, perhaps I'm doing something wrong?

    EDIT: so disabling Alt Trees and re-enabling the trees on the Unity terrain results in faster performance, in the editor. Unity 5.6.2p1 (64-bit).
     
    Last edited: Jul 1, 2017
  40. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Hi,
    Thank you for your purchase!
    Which trees do you use?
    TreeCreator is initially very fast. Performance will be better only with SpeedTree and Meshes.
     
    WildStyle69 likes this.
  41. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    104
    I'm using only SpeedTree and there are not even many in the scene, like 200.
     
  42. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    104
    OK - looks like I didn't have GPU instancing enabled for the Alt Trees. I'll do some more testing and let you know the outcome.
     
  43. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    The performance increase will be noticeable with a large number of billboards. Show me please profiler.
     
  44. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    74
    200 shouldn't be a problem with the built in solution either, if it's slow it's not because of the inefficient billboarding.
     
    WildStyle69 likes this.
  45. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    104
    Not that it's slow currently... I'm just thinking forward as the game and levels will grow in size, so am trying to optimize things to get every last FPS possible for VR.
     
  46. Grendelbiter

    Grendelbiter

    Joined:
    Oct 14, 2016
    Posts:
    77
    Just wanted to show off a first test of my VR project with altTrees and @Baldinoboy 's Tropical Forest pack:


    The Terrain is 2kmx2km, streamed in 256x256 chunks. There are 177046 trees total, most of that ground cover plants. I hope I can get a little more fps by playing with terrain chunk size. Maybe if distant billboards would be culled that would bring the needed boost too.
     
  47. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    Looks good!
    What are the values in the "Size Patch" and "Max LOD Patch" settings?
     
  48. Grendelbiter

    Grendelbiter

    Joined:
    Oct 14, 2016
    Posts:
    77
    It's auto-configured. The greyed out values are 1000 for Size Patch, 4 for Max LOD Patch. Distance Patch factor is the only value I can change that's on default 1.5
     
  49. judah4

    judah4

    Joined:
    Feb 6, 2011
    Posts:
    216
    Quick question, does this support systems like World Streamer? I load my terrain by async loading scenes so I want to make sure I can still place my trees on the terrain and they load up properly in the main scene.
     
  50. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    317
    No, streaming is not available.