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. Yoko_

    Yoko_

    Joined:
    Apr 17, 2014
    Posts:
    11
    As I said I need to change scene and my character prefab is kept all the way through the game, that's why the foliage manager is destroyed since there is one in each scene.
     
  2. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Get a refernce to the foliage manager and then call DontDestroyOnLoad()

    My bad didn't see your earlier post
     
  3. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Ohhh I might know why, will fix. Regarding the shader - go into the shaders folder ( uNature/Shaders ) and in the basic and advanced shaders remove the "ignore projector" part :)
     
  4. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Okay fixed it - messaged you a fix, let me know if it works :)
     
  5. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Okay guys going out of town till Friday - wanted to submit today but didn't get the chance, will submit when I am back :) I will still be able to provide support but no code stuff till Friday :)
     
    Stormy102 likes this.
  6. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Don't worry Elroy I'll be on hand to help ;)
     
    ElroyUnity likes this.
  7. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hehe cheers appreciated! :)
     
    Stormy102 likes this.
  8. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey guys I am finally back! :)

    Going to start working on the tutorials again now and also submit V2.1, if you want it, as always make sure to pm me with your invoice :)
     
    Knightmore, Stormy102 and John-G like this.
  9. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Welcome back :)
     
    ElroyUnity likes this.
  10. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Thanks! Happy to be back :D
     
    Stormy102 likes this.
  11. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Sorry for the double post but -

    V2.1 has finally been submitted.

    The reason I wanted to make this post is because uNature will be raised to its full price - $50 when its accepted, so if you are hesitating on buying it, make sure to decide before its accepted!


    Full changelog:

    https://trello.com/b/I4kqOpDC/unature
     
  12. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    186
    Not to be a party pooper but Im getting a lot of weirdness when I try to paint grass. Sometimes everything works fine - but intermittently the grass shows up in the air. it can be erased as expected but painting on particular spots on the map just makes the grass y axis + 10 for some odd reason. is there a setting that will make the grass only paint on the surface of the selected object?
     
    ElroyUnity likes this.
  13. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey BryanO, dont worry about it, that's why I am here :)

    Not sure if you have 2.0 or the early 2.1 but you can see how to paint on certain layers here:
     
  14. dwaldrum

    dwaldrum

    Joined:
    Jun 20, 2015
    Posts:
    48
    Just bout your asset, looks great. Have a quick question I haven't seen an answer to.

    You have a harvestable tree script in the asset, but do you have something similar for grass? Is there any way to do something similar for harvesting grass when you're near it?
     
    Stormy102 and ElroyUnity like this.
  15. ElroyUnity

    ElroyUnity

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

    Uhm no, not at the moment. Physics for grass will be implemented in the near versions (look at the trello page for more details: https://trello.com/b/I4kqOpDC/unature)

    But you have "Touch Bending" instead that lowers the grass when you step on it :)
     
  16. ElroyUnity

    ElroyUnity

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

    Just released 5 new tutorials:








    Also check out the playlist here.

    Tutorial road map: ( Getting updated regulary on the trello page )

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

    01: Quick Start - DONE
    02: Foliage Manager - DONE

    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 - DONE
    02: UNTerrain - DONE
    03: Pooling & Pool Components - DONE

    04: Integrating networking libraries (UNet, Forge Networking, Photon Cloud, Photon Bolt)
    05: Customizing Pool Items.
     
    docsavage, wahyuway, John-G and 2 others like this.
  17. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Elroy, I'm just wondering as we are using authoritative multiplayer with shooting... is there any way of ensuring that projectiles will impact upon trees. Also, the UNSeeker component requires a camera - if we need that for detecting hits, can you make a separate component that we can put on projectiles?
     
    ElroyUnity likes this.
  18. ElroyUnity

    ElroyUnity

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

    Uhm well you can use UNSeeker on projectiles and not assign a camera (its only for attacking trees and foliage) so basically disable the foliage and attack trees toggles :)
     
    Stormy102 likes this.
  19. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    @ElroyUnity
    Hey there, finally got a chance to import uNature and start messing around. Unfortunately I'm running into a few issues that I hope are just user error.

    1) I've used Gaia to generate ground details, I've then used copy foliage to grab it from the terrain. Once it finishes, it seems to create a lot of grass that wasn't there which isn't really so much an issue until it starts putting it in places it wasn't before like on slopes, and it also results in putting grass up the side of trees, and floating way up in the air in some random cases though I think that may be on the edge of a tile. And it's definately putting grass where it wasn't before on the terrain originally. I've tried from 10 to 40 on the sector resolution with no differences really.
    2) When trying to use the "remove foliage from terrain" option, it sometimes removes some of the grass, but not all of it. In fact the only way I can delete it all is to delete the sector entry under the foliage main manager which it then instantly recreates empty. Which I can then apply my backup to get back to where I started with original gaia grass. This feels like a bit of a runaround, and I assume the button should be taking care of all of this.
    3) I've added the UN Seeker to my player, and disabled tree colliders on the terrain (and obviously added UN Terrain to it), but I am still able to walk through trees. Seems like the runtime colliders aren't enabling, probably something simple but I've overlooked it in the docs...
    4) I see mention of integration with Gaia, but as far as I can tell even with foliage manager created before generating there is no actual integration here yet? Please correct me if I'm missing something in the Gaia integration workflow, thanks.

    If some of this is actually fixed in 2.1 I don't mind holding off for it to pop up on the store, but I figured I'd better check. I can post some screenshots if neccessary (before/after/floating/treeclimbing)...
     
    ElroyUnity likes this.
  20. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey Astaelan!

    1) Yep that's a known V2.0 issue, fixed :)
    2) That setting removes the terrain grass, not uNature, in order to remove the uNature grass you need to select the prototypes on the Foliage Manager window and click "R" OR disable the checkbox at the top of the window to temporarly disable uNature on that scene.
    3) Yep also a known V2.0 issue that was fixed in V2.1 :)
    4) The integration with the terrain engines is partialy broken. That means you can use Copy Foliage From Terrain but it doesnt automatically updates. Automatic updates is coming in V2.1.5 :)

    Please send me your invoice privately and I will send you V2.1 to solve your issues :)
     
    wahyuway likes this.
  21. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey guys - an update regarding the long awaited map magic integration fix:

    Currently been playing around with Map magic and started fixing the integration and its going really well. Should be done by the end of the week and will be sent out to any one who needs it :)
     
    llJIMBOBll and Stormy102 like this.
  22. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    Hah, don't I feel smart now, all my problems are fixed in the next version lol.
    As for number 2, that makes sense now why only some was disappearing. That big button was misleading, versus that little R elsewhere that I wasn't really exposed to during importing from terrain (other than making the foliage manager quickly). As expected, some user error :)
    Now that I know where each thing is, it'll stick. My 2 cents though... and something a lot of asset authors skip over in documentation that would help new adopters is a maintained screenshot breakdown of the different components and windows used for the asset, and explanations of buttons and settings marked in screenshots and listed with a little detail below.
    Then again, I enjoyed the excuse to come engage the author too! :)

    I'll send ya my invoice number shortly, but I'm honestly in no rush as I literally just imported it last night after having it for a week or more already. Heck, I might even wait for 2.1.5 integrations with Gaia to simplify my life, I'm waiting on Gaia 2.0 anyway. Actually this raises a question, as I noticed that you have some form of sector/tiling system now for breaking down sections as well. Any thoughts about integrations matching this up with Gaia 2.0's coming system? I know it's a bit early to say, just curious if it's maybe part of the wait on Gaia integrations and already in the back of your mind.
     
    Stormy102 and ElroyUnity like this.
  23. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    No problem haha, and I agree, I added that in the documentation for V2.1 :)

    Yes absolutely, need to wait for it to be released, but once it is, it will be integrated :)
     
    Astaelan1 likes this.
  24. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    Awesome.
    It is a great time to be developing a game in Unity, there are so many fantastic assets, and a real push unseen before towards these integrations with each other. It makes all the difference to us indie devs.
     
    Stormy102 and ElroyUnity like this.
  25. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    I agree. With quality assets indies giving things back like @ElroyUnity, @AdamGoodrich @sonicether and @eskovas Unity is more powerful than ever
     
    ElroyUnity likes this.
  26. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    Woo, 2.1 on the store now guys :)
     
  27. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    @ElroyUnity
    So, I wiped out the old uNature, imported 2.1... most of the issues were fixed, woo. However, grass is still spawning up the side of trees when importing from terrain.
    Despite the significant increase in density just pulling from the terrain, still a steady 30fps, love it. Until I turn on casting shadows, and then I lose like 15-30FPS depending where I am looking. Casting shadows is still really expensive and currently impractical to use even with relatively light density grass.
    One more thing, I've cranked up the global settings on terrain grass wind, but it just doesn't move like it did before. Obviously new rendering and whatnot, so I'm just wondering if there is any way to crank up the wind behaviour for events like storms? Otherwise maxxed out right now it looks like a light breeze.

    Edit: Ran into one more thing, I'm noticing a lot of patterning with the grass placement after importing. The original stuff was good, but once imported it shows up in a lot of patterned lines where grass is just placed in random rotations down the line. I'll get a picture of this up when I can if needed.
     
    Last edited: Mar 8, 2017
    ElroyUnity likes this.
  28. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Thanks for testing as always and yes! V2.1 is on the store :D

    About spawning on trees, make sure to disable Trre Colliders on the Tree Collider and then regenerate the height map (In the foliage manager section of the docs)

    Regarding shadows casting - yes its very expensive but I have a way to make it faster for next version.

    About tiling - that would be great, will be waiting for your pic and fix asap :)
     
  29. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    I also ran into a few more errors, which has slowed down my ability to get you that image. I have started having issues where patches are randomly appearing and disappearing, not sure why. It seems like it might be related to when I started over, generated 4.5 million grass with gaia, and then imported that into uNature. Not absolutely sure on this. I'll have to regenerate again to show the weird tiling, I started trying to work around it with the range of width on generation, which helped a bit, but it's still just too noticable. Really all it takes, is to start a terrain with Gaia, randomize the terrain, spawn the textures, and then spawn some grass and you'll immediately see when converting this to uNature, that patches of the grass closer to the beaches that don't overlap with ferns or any other grass, tend to just have some straight lines of grass generated. It's even more noticable if you drag the spread down, it just turns into the original source points, and as you drag the spread out it just spreads across those lines, without jittering an offset from those lines. WHich is to say, spread basically only goes 2 directions, it doesn't really spread out radially.
    Or at least that's the behaviour I'm seeing on that part, still struggling with some issues, so if you can reproduce it yourself it might be a bit faster than me at the moment.

    Regarding the trees, the colliders are disabled (and now they do collide too woo), but I guess I forgot to regenerate that height map, I'll look into that for the next time I try this. Should I regenerate the heightmap before I copy from terrain, or after?
    I have to paint some grass down, activate the tile, recalculate the heightmap, then copy from terrain? or do I copy from terrain, then just regenerate the map for the sectors and the grass will fall to the ground?
    copy from terrain was done with tree colliders disabled, so not sure why trees are being included in the initial heightmaps for each sector... more on this soon.

    Edit: Included some images of the tiling situation.

    Before (Gaia placed grass)

    After (uNature copied from terrain and original foliage removed


    In fact, I was fortunate in this second screenshot, you can see the dark green patch of ferns behind the first tree in the center? If I move around, more patches will appear around and in front of that tree. And depending where I move, that patch you see might disappear too. It's really weird. Anything to do with copying 4.5 million original terrain detail density?

    Edit2: I was able to capture an image to show what I mean about the disappearing ferns, I moved to the left a bit from this original spot and got a good example.



    Final note. between these two scenes, when I start with that character, turn around, walk up the hill a little bit, the original 4.5 million terrain grass, I get about 45FPS pretty solid. With uNature I'm usually seeing around 30FPS. The denisty might be much higher but it's difficult to tell, particularly with patches disappearing when I'm standing right in them, or get close to them, it's really random.
     
    Last edited: Mar 8, 2017
    ElroyUnity likes this.
  30. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hi, Elory
    I see you updated uNature to 2.1, does this version support MapMagic?
    I need the runtime generated trees be choppable ;)
     
    ElroyUnity likes this.
  31. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey,
    Thank you so much for taking the time and testing it! I see the issues clearly and will try to reproduce it today when I am back home. About grass disappearing - it has to do with the culling, interesting. Will check :)


    Hey!
    Not yet but its my first priority now :)
     
  32. Astaelan1

    Astaelan1

    Joined:
    Sep 29, 2015
    Posts:
    192
    No problem, I really want uNature to fill out the terrain with that grass, but still want it to run and look good on a meager 710GT, so performance is pretty important to me. I'll be testing a lot with every asset I grabbed before I start the main scene, so just let me know if you need me to test a new build. Probably pick uConstruct up soon too and really keep ya on your toes :)

    Oh, and another issue came up that I forgot to mention. Sometimes after stopping a project, the grass doesn't regenerate in the editor. If left without moving the camera, it'll eventually turn into a bunch of errors that spam the log until you run and quit the game again which 80/20 will usually regenerate the grass. In addition to this, you need to move the camera when you do stop the game to get the grass to usually regenerate, again about 80/20 that this will work before the errors start if you're quick enough. But sometimes, just fails no matter what and you gotta rerun to regenerate something. I haven't quite narrowed this down yet.
     
    ElroyUnity likes this.
  33. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Good to know, about what time do you think the next version can come out? It's a bit urgent for me to use uNature with MapMagic in a few weeks. :)
     
    ElroyUnity likes this.
  34. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Absolutely, I am still improving performance as we speak, V2.1.5 should definitely be a huge performance improvement (Including the betas before that)

    Interesting about the errors and initialization of the grass, will add to trello and fix :)
     
  35. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Probably will come in the first beta of V2.1.5 in a week or so :)
     
    zmaxz likes this.
  36. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    That's great!
    Can't wait to test how they work together!
    upload_2017-3-8_22-10-57.png
    Here is a random generated terrain I made with MapMagic.
    When player hit a tree I'll need to replace it with a preset model that can be chopped down step by step.
    Can uNature let me do that or it can provide a more advanced way to do the chopping?
    And will I be able to allow players harvest the grass with uNature?
     
    ElroyUnity likes this.
  37. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Looks good!

    Regarding the trees - yes, you will need to do some coding but it's very easy as the system is super generic and easy to customize.


    Regarding the grass harvesting - that's not yet implemented unfortunately, but will come probably in V2.2 or so :)
     
  38. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    I can do some scripting :)
    Just wait for the 2.1.5 now
     
    ElroyUnity likes this.
  39. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Awesome! :D

    Also guys here's the tutorial for mesh grass -


    As you can see uNature can handle them pretty well and that will be further improved in V2.1.5 :)
     
  40. masa045

    masa045

    Joined:
    Nov 22, 2016
    Posts:
    35
    Hi there
    I'm learning unature recently
    I have few question now :)
    1. I'm update to unature 2.1 and check documentation
    I think documentation not detail enough now
    Especially tree and some new function version 2.1

    2. I learning optimize grass unature
    I want to know how optimize tree

    3. I'm try copying foliage from terrain and success to copy grass
    I also using gena and gaia that put grass and tree on terrain
    I want to copy tree to
    what should i do that?

    sorry for bad english :oops:
    best regard :D
     
    ElroyUnity likes this.
  41. ElroyUnity

    ElroyUnity

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

    1. Yes some aspects on the docs are missing, feel free to check the new tutorial series that I posted above ( both trees and grass )
    2. Trees arent optimized by the system a lot, it mostly makes them interactable.
    3. The tutorials above cover it, its mostly a matter of updating the pool :)

    Np!
    Lmk if you have any more questions :)
     
    masa045 likes this.
  42. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Will you make some tutorials on optimization? Because it's quite hard for me to get decent fps. I always get around 4 millions of polygons from the grass no matter how I set up the LOD.
     
    ElroyUnity likes this.
  43. ElroyUnity

    ElroyUnity

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

    Yes. the next version will include the new approach for LODs which will improve the performance a lot, but just to note - uNature uses a different method than unity grass to render so even if it shows 4 millions of polygons, it doesn't actually draw them all on the GPU, so that number isn't accurate :)
     
    Kolyasisan and Stormy102 like this.
  44. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Today I attempted to upgrade uNature to v 2.1. The upgrade notes instruct me to, "Please completely remove uNature from your project before importing!!!!"

    When I attempted to remove uNature 2.0, new items appeared in the scene folder and new console cautions appeared for a missing script in a GO called BrushProjector(clone), a GO that does not appear in the project or scene folders.

    I have all traces of uNature removed, but the warnings on the BrushProjector(clone) game object persist. these warnings are not present in my backup copy, so they are something new somehow related to the removal of unature assets.

    Would you kindly describe with specificity, what items to remove, and in what order, and, do you know what this BrushProjector(clone) GO is? I am stuck here, because if I attempt to remove uNature from my backup, the same issues will repeat themselves.
     
    ElroyUnity likes this.
  45. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey, that's something I overlooked! my bad.

    Sending you a fix privately and will submit an hotfix soon! :)
     
    wood333 likes this.
  46. masa045

    masa045

    Joined:
    Nov 22, 2016
    Posts:
    35
    Hi ElroyUnity :)
    thanks for quick response
    I'll check tutorial soon
    btw I try touch bending but not working now
    I check touch bending enabled and touch bending strength both
    is there some another setting somewhere?
    best regards:oops:
     
    ElroyUnity likes this.
  47. ElroyUnity

    ElroyUnity

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

    Does it say anything on the component? Make sure theres a UNSeeker near it :)
     
    masa045 likes this.
  48. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    294
    Is there a way to reduce the size of the data it generates?
    This asset is great and all. But the size of the data it generates is huge. Multi-GB per map huge.
     
    Kolyasisan and ElroyUnity like this.
  49. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    It shouldnt generate that much data, what uNature version do you have?
     
  50. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    294
    2.1.... The maps data is storing 1MB/512^ ... Looks like the map data store in the asset files is in an uncompressed format.

    2000x2000 which is my smallest map runs to ~600MB .... My open world area of 64^km runs to ~3.5GB. All this extra data has a huge impact on load times.

    Could we please get an option to save the images in the map .asset files in a compressed texture format?
    It would help considerably. As it currently stands this doubles the size of my entire project!

    Otherwise, I really like uNature. It works well and I'd like to keep it in my project
     
    Kolyasisan likes this.