Search Unity

[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. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    oh and unconstruct on 5.5 has problems.

    That comment is very vague... doubt the developer or anyone can help you with that comment, what problems...?? May want to explain what issues your having, it would help the developer help you.
     
  2. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    You still have the extensions that you had before. TMS was very old and poorly coded. uNature is the successor of it.

    Also what problems does uConstruct have in 5.5? Haven't heard anything regarding that so far :)
     
  3. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    I'll most likely be picking up uNature very soon, as the performance improvements seem incredible, but I have a question, or maybe a problem...

    I've been spending quite a lot of time researching anti-aliasing methods for grass in Unity. This seems to be done on a shader level for grass, from what I can tell (I know very little about shaders.) By default, Unity's grass shader seems to have no Alpha-to-coverage or similar to deal with aliasing.

    I cannot, as of now, use any AA other than MSAA, as I'm targeting VR (SteamVR specifically.) So I feel like the grass shader must implement a solution. I've heard that the 'DirectX 11 Grass Shader' asset solves aliasing problems, but I think your asset is otherwise vastly superior, so I'm not fond of that option.

    So, in short, does uNature come with any ways to deal with grass aliasing?

    EDIT: Confirmed that alpha blending/alpha masking/a2c still works in 5.5 via a simple custom grass shader i put together.
     
    Last edited: Jan 23, 2017
    ElroyUnity likes this.
  4. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey
    Thank you very much for your interest :)

    And no, I actually haven't thought about this feature, will add it :)
     
    tapawafo likes this.
  5. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170

    Awesome, thanks so much! I'll be eagerly waiting :)
     
    ElroyUnity likes this.
  6. Mrkubaisi

    Mrkubaisi

    Joined:
    Apr 14, 2016
    Posts:
    14
    Hi there
    i am testing unature on an ios, i do get a 4 fps on an iphone 5 for dense grass but only around the camera in a small radius, how could i know if that due to the performance of the device or if its for that this tool is not for mobile yet.
    i also tried the same scene on an ipad air 2,but with no luck the grass didnt render at all , i tried metal ,gles3 , gles2,
    its the same build for iphone and ipad it shows on iphone but not on ipad what could be the problem?

    another question is how can i replace a terrain grass with unature grass , because my scene is already populated,using the copy from terrain only places the grass in the same position but density and size is all wrong, and i wonder how can you do that using terrain composer 2?
     
    ElroyUnity likes this.
  7. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    Answered on your email :)
     
  8. rsklnkv

    rsklnkv

    Joined:
    Sep 8, 2012
    Posts:
    62
    hey gus

    about TerrainComposer2 integration, I couldn't really find any - is there "real" integration which integrates into TC2 output and overrides it? Any other integration looks kinda pointless because, for example, to use Copy Foliage From Terrains I need to make high resolution Grass Resolution on Terrain, build TC2, click on Copy Foliage, wait for couple of seconds (1-15) and then remove grass on Terrain

    How I see TC2 integration - uNature gets data directly from TC2 Grass output node avoiding copy from/to Terrain

    If Elroy can provide me a simple example of how to add specific grass by specific world position I'd make TC2 integration (I mean something like FoliageManager.AddGrass(Vector3 position, int grassId, ...)
     
    ElroyUnity likes this.
  9. ElroyUnity

    ElroyUnity

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

    Its fairly simple and similar -

    uNature.Core.FoliageClasses.FoliageCore_MainManager.instance.SetDetailLayer(worldposition, int prototypeIndex, byte[,] data);


    so just put the world cords in that function (for instance transform.position) and it will be applied there :)
     
  10. rsklnkv

    rsklnkv

    Joined:
    Sep 8, 2012
    Posts:
    62

    Thanks for a quick reply!

    Do you have to make TC2 proper integration? As for now I can make a simple hack for TC2 and it should be fine, but switching to a proper solution later on would be better ))
     
    ElroyUnity likes this.
  11. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    I do plan on doing so, hopefully will come with V1.1 :)

    But for now you can simply use the copy foliage from terrain and it works perfectly as well :)
     
  12. rsklnkv

    rsklnkv

    Joined:
    Sep 8, 2012
    Posts:
    62
    I have another issue - if I use meshes as grass and then copy them to uNature I can't see any grass at all, but I have like 50kk polygons visible by camera. Is there any tutorial on how to add meshes to uNature properly?
     
    ElroyUnity likes this.
  13. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Absolutely!
    That's coming up very soon, but the quick solution would be to select the prototype in the foliage manager editor and click on that "L" button.

    Then, you should see the material instance of that prototype in the inspector. Change the shader to uNature/FoliageShader.

    (That's not done automatically in order to support custom shaders)
     
  14. rsklnkv

    rsklnkv

    Joined:
    Sep 8, 2012
    Posts:
    62
    The problem is - Copy From terrain takes more than 2 minutes, making this functionality useless - artists can't do iterations with 2 minutes delay )) (especially taking into account that the whole generation process in TC2 including all layers takes roughly 250ms)
     
    ElroyUnity likes this.
  15. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yep this has been improved in V2.0.5 from around 2 minutes (with about 9 prototypes on the terrain) to around ~10 secs.


    While definitely still needs adjustements to make it fully usable.

    Unfortunately unity doesn't expose many callbacks that could be extremely useful and make the whole copy process completely automatic.
     
  16. rsklnkv

    rsklnkv

    Joined:
    Sep 8, 2012
    Posts:
    62
    Elroy, is there beta access to 2.0.5 or it planned to be released any time soon?
     
    ElroyUnity likes this.
  17. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!
    No beta yet, but very very close to finishing it, been working all week on fixing some small but very annoying bugs. once I am done it will be released :)
     
    AndyNeoman likes this.
  18. KingLlama

    KingLlama

    Joined:
    Jul 18, 2015
    Posts:
    199
    Any news on the test yet?
     
    ElroyUnity likes this.
  19. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Uhm what do you mean ?
     
  20. KingLlama

    KingLlama

    Joined:
    Jul 18, 2015
    Posts:
    199
    My mistake for some reason my browser didn't load the newest page so therefore I didn't see the post about beta on 2.05
     
    ElroyUnity likes this.
  21. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey guys here's the video tutorial that many of your requested on how to apply generation masks - (Avoid/ Add heights layers for the terrain)





    Btw an update on the new version - about 90% done with the rendering pipeline feature, it's pretty much as perfect as it could be.

    Now the last thing I have to do is some polishing and it's done
     
    AndyNeoman likes this.
  22. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Hey ElroyUnity,

    I just lightmapped my scene using directional lightmapping. Then started to paint Unature grass on top of the terrain but the grass is not responding to the shadows of the lightmaps. Does Unature not work with lightmapping and only works with real-time shadows? Please say I'm missed a checkmark or something to make this work with unity's lightmapping system the way normal unity grass responds to lightmaps and baked shadows.
     
    ElroyUnity likes this.
  23. ElroyUnity

    ElroyUnity

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

    i can't see why it wouldn't work with lightmapping, it might be an issue on my side. Will check it out before submitting 2.0.5 and let you know asap!

    Edit: Just checked and yes! my fault!, fixing that now :)
     
  24. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Ok cool any updated scripts I can get my hands on when you get that all updated? Just whenever you get a chance no hurry would rather have it done good and right then in a hurry. Thanks.
     
    ElroyUnity likes this.
  25. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Will try my best :)
     
  26. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey guys - Here's uNature with the new asset Dynamic Nature which gives you the ability to apply snow all over your scene!



    Go check it out! :)
     
    Last edited: Jan 26, 2017
  27. tapawafo

    tapawafo

    Joined:
    Jul 25, 2016
    Posts:
    170
    Quick question: does your grass support receiving realtime shadows?
     
    ElroyUnity likes this.
  28. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yes :), and casting!
     
    tapawafo likes this.
  29. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    still no apk?
     
  30. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Nope, not yet, trying to get the version out this weekend and then try and get an apk out :)
     
  31. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi, i read about that its possible to use on any mesh with a collider, right?
    I never use terrains because of the performance issue. Some questions.

    * Can I simply draw on a mesh colllider? If not, would you so kind and explain how the workfow is?
    * How can I draw on a mesh with different kind of grasstypes at once?
    * Would it possible to set different range view setups for different grass types?
    Think about to use mais plants from about 2m height and small ground stuff at the same place. So i want to display the goundstuff in a small range for performance reasons.
    * Does unature is able to color the grass by the mesh material?
    I thought about while painting on the mesh then unature would store the material color into the vertexcolor and use it for coloring.

    Thank you.
     
    ElroyUnity likes this.
  32. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi again,
    I lost to ask, is dynamic nature is another asset?
     
    ElroyUnity likes this.
  33. ElroyUnity

    ElroyUnity

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

    Yes dynamic natue is a different asset which gives you the ability to have snow all over your scene :).

    1) Yes, any surface with a collider infact!
    2) Uhm what do you mean? If I understand you correctly, you can hold ctrl, select all of the prototypes you want to draw and simply draw them :)
    3) V2.0 is missing that feature but V2.0.5 which I hope to submit this weekend.
    4) Yes!, you can enable color maps on the prototypes you want and it will apply the colors based on your scene :).
     
    Quatum1000 likes this.
  34. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Yeah., currently I do not own unature and have no idea how to setup a prototype.
    From that video it looks like, its only possible to create a prototype graping from an existing terrain?
     
    ElroyUnity likes this.
  35. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey,
    You can add prototypes in 3 different ways:

    1) Copy from terrain
    2) Drag and drop textures/ prefabs into the prototype window (so you can add any prototype you want)
    3) Add it through code :)
     
    Quatum1000 likes this.
  36. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    hmm you've been saying that for months :(
     
    ElroyUnity likes this.
  37. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Honestly the new version isn't small so it should even be 2.1 as it has an insane amount of changes, more than I originally planned and that's why it takes so much time.

    I am trying to make sure it works the way I want to and not just release a new version because of time pressure :p

    But I am super close this time, promise it wont take more than a few days ( hopefully submitted on the weekend as promised )


    And yep android is bugged atm as specified on the post, if it won't get fixed there's no reason for me to upload it :) My hopes are that the new version will fix it which is why its essential.
     
    TeagansDad and recon0303 like this.
  38. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    agreed.
     
  39. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Another update guys - Everything works flawlessly !!!

    The new fade distance approach is so simple, just increase/ decrease it up to 512 and you are set to go, nothing more!
    Obviously the lower it is, the faster it is, but the way uNature works is that it pre-calculates and optimizes data for you so even if the distance is big it will not have a huge influence as unity might have for instance.

    What's left is fixing the world normals inaccuracy that many noticed, going to hope to submit tomorrow as planned :)
     
    Last edited: Jan 28, 2017
  40. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    @ElroyUnity Would it be possible to bump raycast-grass interaction to be higher on the roadmap?
     
    ElroyUnity likes this.
  41. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Probably yes, with the new approach I have for grass it will be a lot easier and faster to add, so yea, I will look into it in the next ver after V2.0.5
     
  42. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Okay going to need your opinion on this,
    the version is ready and I can send it out to you guys but still didn't fix the world normals issues.
    So I can send it tomorrow fully fixed or send it today without the world normals fix, what do you guys think?
     
    AndyNeoman likes this.
  43. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938

    I'd love to test it but if you can fix it and have it ready for tomorrow that would be my vote. Really hoping to spend most of Tuesday reworking my grass and getting some promo video/shots together for greenlight concepts page.
     
    ElroyUnity likes this.
  44. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I would think world normals are important ...? Not sure about the value if that's not in there, but perhaps I misunderstand it.
     
    ElroyUnity likes this.
  45. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yep they are, they work alright, they just have an inaccuracy issue in one of the axes.
    I will probably just send it out tomorrow when it's all fixed instead :)

    Thanks for your feedback guys :)
     
    magique and AndyNeoman like this.
  46. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Okay guys update is done!
    Want to ask you guys for your opinion, while fixing the world normals issue I made the normals rotate according to the grass billboard rotation, which I didn't see any of the other system doing, do you like the look or should I remove it?

    WITH:

    WITHOUT:



    In my opinion I think it only makes sense for it to happen, but also, I think that it adds more detail.
    What do you guys think?
     
    Last edited: Jan 30, 2017
  47. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I don't see a difference, but maybe I'm not sure what to look for either.
     
  48. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Updated the pics, try to look at the hill right next to the camera (To the right) you should see a noticable difference
     
  49. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Oh oops my quality settings were on fastest so it looks extremely bad. 1 sec

    Edited the original post above ^^
     
  50. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I see a difference, but I'm hard pressed to decide which is better. I will defer to others who have a more artistic eye. Maybe a sample with more than just generic grass textures would be easier to determine which is better. It would be nice to see images using Turboscalpeur grasses.
     
    ElroyUnity likes this.