Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[NEW PATCH] uNature - GPU, Interactable Grass. Interactable Trees, MultiThreading and more!

Discussion in 'Assets and Asset Store' started by ElroyUnity, Apr 29, 2016.

?

Pre-release Integrations

Poll closed Nov 29, 2016.
  1. TerrainComposer2

    43.1%
  2. GAIA

    54.9%
  3. GENA

    49.0%
  4. World Creator

    13.7%
  5. World Streamer

    37.3%
  6. Map Magic

    27.5%
  7. Landscape Builder

    0 vote(s)
    0.0%
  8. SkyMaster ( Weather )

    7.8%
  9. InfiniGrass, AFS, DX11 (Integration will provide built-in shader support)

    33.3%
Multiple votes are allowed.
  1. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,070
    Hope so :) when is it online?
     
    ElroyUnity and lod3 like this.
  2. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Trying to get it out asap, so far all thats left is finishing compression, a small bug and polishings and that should be it :)
     
    julianr, mattis89 and lod3 like this.
  3. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,070
    Remastered verision? Release date?
     
    ElroyUnity likes this.
  4. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Not as of now, there will be a beta soon but still working on it :)
     
  5. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    So, an update - Added the new map management, optimized some systems, fixed some stuff, next is adding compression and then will submit and send it out! (should be tomorrow finally!)
     
    montyfi, mattis89 and lod3 like this.
  6. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    129
    OK when this patch gets live? :) Well I will rewrite some new features on different way like 2 prototypes per pixel max... I will rewrite it to 1 texture per 8 prototypes. And probably a wind map. If nevermind I would ask you for guidance assistance later where I can find things related to prototype density textures.
     
    ElroyUnity likes this.
  7. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Very soon, as promised I hope to finish and submit it today. And yep you can do a lot with it, didn't want to change too much because remastered already has it all working :)
     
  8. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    129
    I understand, unfortunately we have Early access game and cannot wait months (or players would not wait):(. So I will take whatever is and have to make it fit :)
     
    ElroyUnity likes this.
  9. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Absolutely, I understand :) That's why I am releasing this patch :)
     
    Kusras likes this.
  10. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Ok all done, I will go ahead and send the versions out today. Changes log:

    1) You can now disable certain chunks so streamed terrains won't render grass.
    2) Fixed lots of errors with the threading. (The "disappearing" grass for 1 frame issue, if you see any more of this let me know and I will push an hotfix!)
    3) Added an option on the manager to disable "Color Maps". If you aren't using it it will remove all the color maps from the memory. On default its disabled and so if you want to use color maps make sure to enable it first.
    4) Moved noise from individual density maps into the global height map
    5) Removed per-prototype density map and switched to 1 map instead (HUGE memory difference)
    6) Added the new map magic integration (I know it might still be broken but that's the best I can do with the current asset store version, the remastered has it working perfectly, but the way grass is rendered on the asset store version is wayy too different from the terrain grass and so all of those convertions sometimes look wrong)
    7) Fixed issue with noise and optimized shaders

    Next patch will come during this month (Seperated those two patches so the second one will also include fixes from this one) and it will include:

    1) Presets support
    2) More maps compressions (if this update won't help memory)
    3) Asset bundle maps


    and then the remastered will come in 2018, the beta will start soon, no exact date though.


    Note that the new update still stores maps on the scene as its the best approach (other than asset bundles that will come in the next patch) and the memory usage has been changed drastically. For example, before lets say you have a 2km terrain with 10 prototypes.

    Old approach:
    2k x 2k = 4 manager instances. (3 maps, 1 color, 1 normal and 1 height map) = 3mb * 4 = 12mb
    then 10 prototypes for each manager instance = 10mb * 4 = 40 mb
    total = 52mb

    New approach:
    2k x 2k = 4 manager instances. (2maps, 1 color and 1 height map [On default, color mask is disabled so I will not include it as its mostly not needed and so its only 1 map]) = 1mb * 4 = 4mb

    10 prototypes for each manager instance = 1mb (only 1 map) * 4 = 4mb

    total= 8mb

    So that means a 650% memory improvement!
    That should have been implemented long ago and so I am really sorry that you had to wait for it!

    Send me your invoice in a pm and I will send it over during today!
    Elroy
     
    lod3 likes this.
  11. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    620
    Send my invoice via email.
     
    ElroyUnity likes this.
  12. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Cool, going to send the version out in ~30 mins :)
     
    lod3 likes this.
  13. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Ok updates have been sent out and the asset has been submitted :)
     
  14. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    620
    2017.2, new project, only updated uNature installed. Empty scene, created Foilage Manager, but now when opening the Foliage Main Manager in the Hierarchy to manage chunks, Unity hangs for a good 5-10s, and will repeat these hangs so long as the Sector child gameobject is active.

    Right when each hang ends, the console is spammed 999+ with this error:

    Code (csharp):
    1. Optimized GUI Block text buffer too large. Not appending further text.
    2. UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    ElroyUnity likes this.
  15. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Uhmmm haven't seen that before, will check it out today and come back with a fix!
     
    lod3 likes this.
  16. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    620
    Duplicated the above with the current version of uNature, step by step, and no issues.
     
    ElroyUnity likes this.
  17. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    So just tested the exact same steps and it works well for me... could you record a video by any chance?
     
  18. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    620
    A video isn't needed. Are you using the package you linked to me via email, or your internal code? And not that it likely matters, but are you on Windows or Mac OS? Unity 2017.2.0f3?
     
    ElroyUnity likes this.
  19. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Using the same exact package on a new project, unity 2017.2.0f3 on Windows :)
     
  20. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    620
    Figured it out. I was trying to change chunk count in Sector child object from 1600 to only 4, which got rid of the hangs, but introduced a ton of other errors, so guess I'll have to leave 1596 chunks unused. How much memory do they take up, and if there's overhead to this wasted space, is there a way to make it work with less chunks?
     
    ElroyUnity likes this.
  21. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    There isnt really an overhead and the memory they take all together is literally just 1 mb so its not too bad :)
     
    lod3 likes this.
  22. ruff-fighterbase

    ruff-fighterbase

    Joined:
    Aug 8, 2017
    Posts:
    1
    Hi ElroyUnity,

    We are reproducing errors when grass disappear during a frame, makes it blinking effect. The build is 2.3 version from 28November.
     
    ElroyUnity likes this.
  23. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Hey!
    Could you please contact me privately with error logs? will have a new patch submitted this week with some more fixes, I want to include that too!
     
  24. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    I'm testing the new 2.3 version and it looks like when importing from the Unity terrain uNature is only using one prototype. I've started a new project (2017.1.1f1) with just uNature to reproduce the issue.

    Steps to reproduce:
    1. Open the ForestDemoScene_Terrain scene
    2. Apply the vegetation backup to the Unity terrain so we can add to it
    3. Add a new prototype to the Unity terrain
    4. Paint an area
    5. Delete and Create a new vegetation backup
    6. Copy Foliage
    7. Only one of the two prototypes will appear on the terrain
    However, you can paint on the terrain with the new prototype in the Foliage Manager. I use Gaia to create my foliage so this of course doesn't help me.
     
    ElroyUnity likes this.
  25. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Good catch! got another report like that actually.
    Will work on a fix tomorrow along with some other fixes and submit an hot fix!
     
  26. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,070
    After I copy foliage .. None of the grass will show.. it disappeaes... using Gaia too..
     
    ElroyUnity likes this.
  27. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Yep! On it :)
     
    mattis89 likes this.
  28. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,070
    I send the project in 30 min
     
    ElroyUnity likes this.
  29. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    833
    Quick question about using the package with custom shaders. What exactly are the requirements? Only Instancing support?

    I understand the touch bending and color map features would require more modifications to the custom shaders, but I'm mainly asking about getting the performance benefits ;)
     
    ElroyUnity likes this.
  30. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Hey -
    There aren't really any requirements, there are a few steps you need to follow as the shaders run a lot/ most of the logic behind the grass. You don't need to have instancing support, its an option but not a must.

    Its documented on the documentation and its a bit hard if the shader is super complicated but I am here to help if it gets to that. :)
     
  31. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    833
    Thanks for the reply, is there any chance I can view the documentation online?
     
    ElroyUnity likes this.
  32. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Yes send me a pm will send it when home :)
     
  33. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    648
    Been away from uNature for a while, and I decided to try the new release. I use Unity 5.6.3f1.

    It almost works, but as you can see, it will place grass on a flat surface at the edge of my terrain, even off the terrain, but it refuses to plant grass on the flat main portion of the test terrain? uNature will place grass "beneath" the main portion of the test terrain.
     

    Attached Files:

    ElroyUnity likes this.
  34. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Yep bug was reported, seems like there are issues with the placement, being worked on and should be fixed and submitted this week!
     
    wood333 likes this.
  35. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    3,695
    Hey, I was evaluating unature and I have some questions.

    The actual grass geometry seems to be massively heavy compared to native. I sampled similar grass densities and found that unature requires around 6x more tri than native. With dense grass in my use case, I'm pushing about a million tris worth of grass with unature, compared to around 200k with native.

    The main advantage is that it doesn't rebuild the grass meshes in the same way, so those massive performance spikes are gone. But I don't know what to make of the package overall.

    My scenes show lower FPS using unature compared to native, although it's seemingly more consistent (fewer spikes).

    Any advice on how to streamline unature? Should I skip lod0 or something?
     
    ElroyUnity likes this.
  36. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Hey!
    This is mostly because in order to not have spikes uNature pre-creates the patches as large squares, thats why it has a bigger impact on the tris and verts count but they don't actually get rendered. It's still heavy to send that much information to the gpu though and thats already fixed in the Remastered version but its still away from being beta-material atm. I will see if I can implement that into a close release. But can't guarantee will keep you updated :)
     
  37. BadUncleGames

    BadUncleGames

    Joined:
    Aug 10, 2015
    Posts:
    39
    Good morning,
    I have jumped back into uNature after focussing on some other pieces for quite a while. I have a very large scene and use gaia. I have also noticed the same issue when bringing in existing foliage, is there any update on when the fix may be submitted or available?

    Regards
     
    ElroyUnity likes this.
  38. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    What issue are you talking about?
     
  39. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    620
    Is this just for mesh grass (e.g., SpeedTree), or billboard grass as well?
     
    ElroyUnity likes this.
  40. BadUncleGames

    BadUncleGames

    Joined:
    Aug 10, 2015
    Posts:
    39
    The one back on 29/30 november about copy grass and only one prefab appears.

    (Copy of the post/response below.)

    I'm testing the new 2.3 version and it looks like when importing from the Unity terrain uNature is only using one prototype. I've started a new project (2017.1.1f1) with just uNature to reproduce the issue.

    Steps to reproduce:
    1. Open the ForestDemoScene_Terrain scene
    2. Apply the vegetation backup to the Unity terrain so we can add to it
    3. Add a new prototype to the Unity terrain
    4. Paint an area
    5. Delete and Create a new vegetation backup
    6. Copy Foliage
    7. Only one of the two prototypes will appear on the terrain
    However, you can paint on the terrain with the new prototype in the Foliage Manager. I use Gaia to create my foliage so this of course doesn't help me.
    Click to expand...
    Good catch! got another report like that actually.
    Will work on a fix tomorrow along with some other fixes and submit an hot fix!
     
    ElroyUnity likes this.
  41. BadUncleGames

    BadUncleGames

    Joined:
    Aug 10, 2015
    Posts:
    39

    It's quite possible I am just getting confused with the process -Please point me in the right direction if I am wrong:

    1. I have terrain etc with GAIA generated grass details
    2. I setup uNature (using the quicksetup)
    3. Check that the terrain has the uTerrain etc.
    4. I hit copy Foliage

    At this time it spins about doing it's thing and then the scene refreshes and has only the first detail asset visible and it is also in a rather uniform grid pattern (though guessing the second part might just be a setting I haven;t looked at yet)
     
    ElroyUnity likes this.
  42. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Both

    Uhmm interesting, will check! planning to release a version this weekend so I will include this fix :)
     
  43. BadUncleGames

    BadUncleGames

    Joined:
    Aug 10, 2015
    Posts:
    39
    magnificent answer ;--) and have to say loving your fast responses considering the time differences (One reason i grabbed unature and uconstruct :))
     
    ElroyUnity likes this.
  44. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    My pleasure :) Will keep you updated!
     
  45. Zymes

    Zymes

    Joined:
    Feb 8, 2017
    Posts:
    106
    Does this work with low poly trees that are game objects?
     
    ElroyUnity likes this.
  46. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    No, only terrain trees as of now :)
     
  47. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    89
    Hello I have been working on a procedural planet and I'm looking for a system of grass and trees, Can this system generate grass in runtime fast? And can I remove grass that's far away instead of hiding it?
     
    ElroyUnity likes this.
  48. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Yes and yes :)
     
    killer1171090 likes this.
  49. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    89
    Awesome thanks! One other thing, feature request. Would be very helpful for me and to anyone else working on procedural games. An auto placement of grass.
    For example:

    unature.Autoplace(Mesh, frequency, Scale, and other settings);

    Then have it automatically place grass on the mesh according to the provided settings.

    Not a big feature but would be that little bit more helpful to some people, such as myself :)
    ps: Very fast support! Love it!
     
    ElroyUnity likes this.
  50. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,580
    Hey,
    Yea! thats a feature in Remastered, will keep you updated when the beta is starting :)
     
    killer1171090 likes this.