Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Not sure what is happening with latest version but all my height maps are black. Copying grass from terrain has all the grass flat way under the terrain. It may be me I have been out of the loop for few days.
     
    ElroyUnity likes this.
  2. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey, did you make sure that the generation mask in the foliage manager includes the layer of your terrain ? :p
     
    AndyNeoman likes this.
  3. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Had a feeling it would be me. Thats what happens for not reading updates....

    I am getting worse performance unfortunately though. I copied across grass (8 types - no meshes) change one type to 500 distance, removed terrain grass but my fps has dropped from 100fps to 29fps :-(.

    I am wondering if it is possible to have terrain grass on for the distance and uNature up close. I wonder if anyone knows if you can disable terrain grass a radius around the player?

    I have not really got that thick of a coverage either at the moment, so not entirely sure what the problem is but the tris jumped to 30m
     
    ElroyUnity likes this.
  4. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    500 distance is quite a lot, its expected you would get such performance impact lol

    about coverage there's a fix coming for that very soon, especially when copying from terrain. I hope to release it somewhere next week as part of V2.1.5
     
    AndyNeoman likes this.
  5. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    I have turned it down to 80 and it is better but the popping problem and bare distance will need a solution. I am going to see if you can turn off terrain grass close to player and just have it for distance because that would solve everything.
     
    ElroyUnity likes this.
  6. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    popping issue and bare distance ? I am not following :p
    Could you possibly make a video? maybe theres a simple fix
     
  7. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Popping distance is the same as fade. So if I have that lower the grass pops into view. Bare distance is anything after the fade distance which of course is bare or empty. I don't think it is an error just a restriction - I either have high fade and low fps or vice versa.

    Ideally I will have terrain grass above 50 (to 500) and unature below 50 with the extra graphics, touch bending raycasting in the future etc...
     
  8. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    But you can't really get 500 with unity terrain, only 250. or am I missing something?

    Frankly the whole point of uNature is not resorting back to unity grass. Maybe I've made a mistake in the generation that makes it more expensive than it should be? although 500 view distance would explain the big performance hit. But I wouldn't understand if you would get such a big hit at 150-200
     
    Last edited: Feb 20, 2017
    AndyNeoman likes this.
  9. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Yeah i understand the 500 was just one type to test but 250 is perfectly fine like unity terrain that is enough distance. Considering I did not overfill it though i was surprised by fps drop.

    I am more interested in getting nice thick looking foliage close up anyway but just wanted to test limitations. I may look at some distance fog to blend instead.
     
    ElroyUnity likes this.
  10. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Ohhh I see, I just thought I maybe did something wrong and was worried as I only have 1 thing to fix before submittion. I do plan to allow 500 distance to be usable and it will be introduced with the mesh lods update in the next version which will introduce the ability to possibly even use 1000 draw distance with the performance of around ~200 draw distance :)
     
    AndyNeoman likes this.
  11. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Another update regarding that matter, I have the concept all ready. Once I fix the bug I currently have I might implement that specific feature (which should take around 30 mins at most to implement) and you will be able to use huge amount of draw distance :)
     
    AndyNeoman and Seneral like this.
  12. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Okay guys just finished up the version. Delayed LODs to the next version as I didn't want to push it too much. On the version I sent out there was a huge performance leak many of you noticed which is fixed now.

    Note that next version will come a lot faster, V2.1 allowed me to rewrite a lot of the grass aspects so it will be a lot faster and better.

    As always you can get the latest version by messaging me with your invoice :) [This time its the last one]
     
    Stormy102 likes this.
  13. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Cool! Nice to see lots of optimisations at work here. Netcode rewrite all finished so hopefully will be implementing uNature in the next few weeks :)
     
    ElroyUnity likes this.
  14. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Thats awesome!
     
    Stormy102 likes this.
  15. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey guys - here's the first tutorial of the new tutorial series, there will be 2 of them (1 for grass and 1 for trees)




    Took your feedback regarding the old tutorials, this one is a lot shorter and straight to the point. The new tutorials will be covering more aspects so stay tuned :)
     
  16. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Hey!

    I watch the old tutorials, all of them are Editor-ready, but I have questions about how to implement Unature with out editor (procedural), I´m still watching this asset thinking about buying it or not, previously you said about the api/script functionalities of uNature, but there is no documentation about it, Can you give us some information of how unature works with non-editor grass placement?

    Thanks in advance.
     
    ElroyUnity likes this.
  17. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey - Yes that will be covered in vid 3/4 (in 2-3 days )
     
    buronix likes this.
  18. buronix

    buronix

    Joined:
    Dec 11, 2013
    Posts:
    111
    Thanks!
    :)
     
    ElroyUnity likes this.
  19. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi Elroy,

    Seems to be a nice improvement on framerate with the latest version. :)

    I have started to get an error though.

    I will remove uNature and try to reimport later to see if that fixes if but if you have already seen this and have a fix let me know.

    NullReferenceException: Object reference not set to an instance of an object
    uNature.Core.FoliageClasses.RenderingQueue.UpdateDensities () (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:170)
    uNature.Core.FoliageClasses.RenderingPipielineUtility.CreateRenderingQueue (uNature.Core.FoliageClasses.RenderingQueueReceiver receiver, System.Collections.Generic.List`1 renderingQueue, System.Collections.Generic.List`1 fetchedQueueInstances) (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:67)
    uNature.Core.FoliageClasses.RenderingQueueReceiver.CheckPositionChange () (at Assets/uNature/Scripts/Core/Utility/RenderingPipelineUtility.cs:609)
    uNature.Core.FoliageClasses.FoliageMeshManager.DrawEditorCameras () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageMeshManager.cs:499)
    uNature.Core.FoliageClasses.FoliageMeshManager.Update () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageMeshManager.cs:489)
    uNature.Core.FoliageClasses.FoliageCore_MainManager.Update () (at Assets/uNature/Scripts/Core/Foilage/GPU_Utilities/FoliageCore_MainManager.cs:270)
     
    ElroyUnity likes this.
  20. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey Andy,

    Oh, yes I fixed that issue but forgot to include it in that download link. Sorry for that, I will resend it to anyone who encounters that issue. Will send you a fix in few mins Andy :)
     
    AndyNeoman likes this.
  21. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938

    Thanks, looking very nice otherwise.
     
    ElroyUnity likes this.
  22. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Thanks! V2.1.5 will bring the new lods approach and will allow you to use a high view distance with a much smaller performance impact :)


    Sent you the new version privately :)
     
  23. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    @ElroyUnity can you send me a download link to the new version (2.1)?
     
    ElroyUnity likes this.
  24. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Sent ;)
     
    Stormy102 likes this.
  25. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey guys let me know if you have any suggestions on the upcoming tutorials:


    --------------------------------------Grass-------------------------------------

    01: Quick Start
    02: Foliage Manager
    03: Mesh Grass & Optimizations
    04: Coding: Set&Get detail layers
    05: Coding: Creating and accessing manager instances
    06: Coding: Interactions
    07: Coding: Runtime brush
    08: Coding: Integrating Shaders


    --------------------------------------Trees-------------------------------------

    01: Quick Start
    02: UNTerrain
    03: Pooling & Pool Components
    04: Integrating UFPS
    05: Integrating networking integrations (UNet, Forge Networking, Photon Cloud, Photon Bolt)




    Any more suggestions or is that enough ? :p
     
    Stormy102 likes this.
  26. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    @ElroyUnity A few points I'd like to bring up
    1. "Fade Distance" doesn't seem to work. It cuts off rendering at a certain distance. Could you not fade out the alpha for a more smooth transition?
    2. Can we have the option for more LODs? Maybe you should display it in a Reorderable List?
    3. There aren't any textures included for testing out the Advanced Foliage Shader? Could you include these?
     
    ElroyUnity likes this.
  27. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    I would like to see networked procedural generation if at all possible?
     
    ElroyUnity likes this.
  28. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    1. Are you using the latest version I sent you? if so, could you send me a picture or something? it should work great. (I know in V2.0 it had issues and didn't work, but in the V2.1 I sent you it should work well)
    2. Yes, currently the lods are more or less useless as they only happen on the shader side, I am now working on implementing a new faster approach for lods that should allow you to use an incredible amount of draw distance without worrrying about performance. Should hopefully be out in the first beta on V2.1.5 in the next week or so.
    3. Uhm Advanced Foliage Shader is made mostly for meshes. So like SpeedTrees but can indeed be used for billboards. I will try to get some better demo assets for the next version including a better demo :)
    Absolutely possible, all you have to do is stream over the data you want to assign on your scene to your clients and it should work well, so I am not sure if it will be a tutorial. I will probably write a section about it in the docs for V2.1.5 :)
     
  29. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    I'm using the default uNature scene to get my bearings. Yeah I'm using 2.1 but at around 50 fade distance it's more popping than fading. It's better at distance but still looks a bit poppy. Maybe you should rename the "Fade Distance" slider to "View Distance" and then have a slider that fades the alpha over a set distance, like a range of 1 to 5?
     
    ElroyUnity likes this.
  30. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Oh I see, great catch, will fix the popping issue, and regarding the fade - will add as well most likely :)
     
    hopeful likes this.
  31. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Okay guys some more updates - It came to my attention that there are problems with copying foliage from terrains (the spread isnt accurate and the grass is a lot higher than normal, and when I say a lot, I mean literally giant grass)

    I fixed all of these issues + added fading as per Stormy's request and it looks a lot better and smooth now :)


    Will send out the version again later today. You know the drill ;)
     
    Seneral, Knightmore and Stormy102 like this.
  32. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Gimmie! :)
     
    ElroyUnity likes this.
  33. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    +1 please. :)
     
    Stormy102 and ElroyUnity like this.
  34. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Done!
     
    Stormy102 likes this.
  35. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Also Elroy, if you change the default grass width from 1-1.5 to 0.5-1 it looks a LOT nicer. Also if you change the alpha cutoff to 0.8 it creates a really nice thin grass effect
     
    ElroyUnity likes this.
  36. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Also, maybe you should speak to @turboscalpeur and see if he will provide a free grass texture to make it even prettier ;)
     
    ElroyUnity likes this.
  37. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    That's pretty cool hehe, I like it :)

    Absolutely, didn't expose it till now but a new test scene is in the works for V2.1.5 which is more appropriate for uNature and I am going to start speaking to some creators for assets for the demo and @turboscalpeur is absolutely one of them :D
     
    John-G and Stormy102 like this.
  38. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    I'm seeing great improvements. Unature is shaping up nicely Elroy. :) getting around 100fps in my game now with 250 distance on 8 grass/fern textures. 2K Turboscalpeur's. Last week it was around 30fps for this scene.

    One slight thing i have noticed is sometimes the grass is fading in out of order. I.E grass closer to my char/camera has not faded in but some further away has.

    Other than that - great guns. You've really improved it this week. Appreciate all the work!
     
    John-G and ElroyUnity like this.
  39. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hehe happy to hear :rolleyes::rolleyes:

    V2.1.5 will even increase your performance by 2-3 times ;)

    Regarding the fade distance - could you upload a gif? Really strange...

    Cheers! I've got more coming soon :)
     
    AndyNeoman likes this.
  40. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    The varying fade distance is probably due to the fact that it is set inside each prototype. Could you make a global fade distance @ElroyUnity ?
     
    AndyNeoman and ElroyUnity like this.
  41. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yep, could do, I am going to add it now and probably submit, going to make it so you can set custom fade distance on a prototype as well :)
     
  42. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Also, is it possible to add the option to only paint on an object that exists. I've had a few issues where grids of foliage have been generated in mid-air :/
     
    hopeful and ElroyUnity like this.
  43. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Uhmm yea can't see why not, will add :) Also the global fade distance is implemented.

    Edit:

    Actually you would be better off just disabling the "Create new manager instances toggle" as it will provide more or less the same thing in your request
     
    Stormy102 likes this.
  44. Yoko_

    Yoko_

    Joined:
    Apr 17, 2014
    Posts:
    11
    Hi Elroy,
    I can't make the projector works with you grass, it projects on the ground but not on the grass itself. Can you tell me if it's normal or if I missed something in the settings?

    Thanks a lot !
     
    ElroyUnity likes this.
  45. Yoko_

    Yoko_

    Joined:
    Apr 17, 2014
    Posts:
    11
    There is actually another problem.
    I have several scenes and my player is not destroyed while switching. And I found out that I get a lot of errors after loading a scene without any grass. It's actually kind of hard for me to get into your code (no offense, I just don't have the time to do this kind of stuff) and I'd like to know if on your side you could add some "test before use" on your UN Seeker.

    If the problem is on my side please let me know, anyway, thanks again !
     
    ElroyUnity likes this.
  46. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Regarding projector - I think I disabled it in the shader so it should be an easy fix.

    Now, about the errors - not able to reproduce so I think its smth in your side, what errors are you getting?
     
  47. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Hi late to the party - how do trees work please?
     
    ElroyUnity likes this.
  48. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    The trees aspect use the terrain trees, while the system does its magic and gives you the ability to interact with them.

    A tutorial series regarding trees is coming up next week ( will be out of town from tomorrow )
     
  49. Yoko_

    Yoko_

    Joined:
    Apr 17, 2014
    Posts:
    11
    QQ图片20170227161919.png
    QQ图片20170227161933.png
    These are the errors I get.

    And about the shader, where should I start looking?
     
  50. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Looks like the gameobject is being deleted. This shouldn't be happening. Does it work in the default uNature scene?
     
    ElroyUnity likes this.