1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. We want to know how you learned Unity! Help us by taking this quick survey and have a chance at a $25 gift card
    Dismiss Notice
  5. Are you an artist or level designer going to Unite Europe? Join our roundtables there to discuss artist features.
    Dismiss Notice
  6. Unity 5.6 is now released.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    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:
    271
    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:
    271
    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:
    271
    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:
    271
    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,018
    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:
    271
    Hi,
    This option only affects Objects. Reduces the density of Objects.
     
  11. magique

    magique

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

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    271
    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,018
    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:
    271
    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,018
    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:
    271
    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!
     
    Pecek, Grendelbiter and jangomoose like this.
  17. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,018
    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:
    271
    Hi,
    Thank you! I will now send a fix to AssetStore
     
  19. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,018
    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:
    271
    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,018
    Yes, I see this in game mode and stand-alone build.
     
  22. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    115
    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:
    271
    Can you make a video?
     
  24. magique

    magique

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

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    115
    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:
    271
    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:
    115
    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:
    271
    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:
    115
    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,018
    This is exact same thing I reported earlier.
     
  31. Diab1O

    Diab1O

    Joined:
    Mar 31, 2013
    Posts:
    271
    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:
    765
    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:
    271
    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:
    25
    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:
    25
    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:
    271
    Hello,
    Thanks, I'll look into this problem.
     
    jimburn likes this.