Search Unity

[Released] Advanced Terrain Grass

Discussion in 'Assets and Asset Store' started by larsbertram1, Sep 11, 2017.

  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it is way more faster... edit: but in order to be more precise: it does not produce the spikes on the cpu you know from the built in grass.
     
    Last edited: Nov 2, 2017
  2. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    It would be great to have some sort of performance comparison, using the same mesh and shaders. Of course I understand that your shaders have more features, so this has a cost about speed.

    Also I have Advanced Foliage Shaders. What difference between the 2. Is there an upgrade path to Advanced Terrain Grass since they are quite similar?
     
    SiDuGames likes this.
  3. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    OK great my last 2 questions before I buy it are,
    1.when I paint new part of grass using terrain editor willl it be automatically udpated and work as your shader? Please record video showing as you piant grass on terrain then some few seconds tutorail how you set it up in your shader is that possible? i think it will make less people ask many questions :)

    2. This grass has great shadows, Is there possiblity to bake then that shadow on terrain as static lightmap, to make it visible also on longer distance? I udnerstand that grass is moving, and then shadows will be static, but is that possible?
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    this is a bit tricky because both systems just work completely differently. but the image below shows the cpu profiler for a fly over the same terrain using the same grass meshes, the same grass distribution and density but of course slightly different shaders.
    while the built in grass spikes about 15ms from time to time (whenever new grass patches have to be generated) atg runs pretty constantly at around 0.6ms. raising the grass density will increase the spikes using the built in grass while atg will stay at its cost of 0.6ms.
    the dark green curves btw. show the time the cpu has to wait for the gpu to finish the frame: both built in grass and atg are more or less the same.
    the final results as far as fps are concerned (cpu and gpu performance) may vary of course due to your settings – like mixing 20 different grass types per cell does not effect the performance of the built in grass as the whole cell or patch is merged into one single mesh whereas atg would have to queue 20 different draw calls. this may be addressed using (soft) merging layers as described in the atg docs.



    i looked into offering something like this – but unfortunately the asset store does not allow to create updates between different packages.
     
    SiDuGames likes this.
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    atg does not render grass while you are in edit mode. it reads in the needed (and up to date) data as soon as you enter play mode – or in order to speed up start and support streaming – it uses baked data which you would have to re bake in case you do any changes to the distribution or the shape of the terrain. using baked data is only recommended on final builds.

    this is not possible. just imagine the light map resolution it would require to bake shadows from alpha tested grass...
     
  6. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    Of course the asset store allows to create updates from another product!

    Ex: Fog Volume 3 which is a different product than Fog Volume 2: https://www.assetstore.unity3d.com/en/#!/content/81802

    or Ultimate Water that has an upgrade price from Playway water again 2 different products:
    https://www.assetstore.unity3d.com/en/#!/content/100669

    I will buy an upgrade if you find the way to do it.
     
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i would call it "one" product but 2 versions – just like the update from afs 4 to afs 5 works.
    that might be a better example. but i think that an upgrade always works like a replacement.
    and the advanced terrain grass does not replace the advanced foliage shaders: atg does not handle tree creator trees and billboards. it does not ship with any tools like the foliage tool or the combine children script.

    but probably the most important problem: the asset store admin interface simply does not let me create any update for afs 5.0. – as it is simply too new...
     
  8. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    Actually I purchased it at $27
     
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    and i hope you will love it!
    do not hesitate to contact me or post here in case you have any questions.
     
  10. Paxew

    Paxew

    Joined:
    Apr 8, 2014
    Posts:
    30
    Hi, just bought your asset and playing around with it.

    I was wondering about the Translucency map, is there any easy way of auto generating those? E.g. can I copy/invert some existing roughness map to get the needed/close enough result. Or do I have to manually paint the translucency map?
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    that depends on your textures. usually i take one interesting channel from any texture, change contrast and paint some details like stems, veins etc.
     
    Paxew likes this.
  12. Paxew

    Paxew

    Joined:
    Apr 8, 2014
    Posts:
    30
    Thanks. I'll test that, for the plant I have the gloss map looks closest to the translucency maps in your demo assets. So I'll try with that one.
     
  13. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Ok, bought it today to give it a try, my experience has not been good.
    I have a gtx1080ti, unity 5.6.4, default unity grass runs at 620 fps on my game.
    Using this system it runs at 200fps :/
    Also I need to check "ignore visibility" or it won't display any grass.

    Any ideas? Performance is definitely not better.
     
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
  15. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    Have you tested your asset with a lot of prototypes and grass on a terrain? Because as soon as I drag and drop the Grass Manager on the terrain, Unity Editor becomes unresponsive and I have no other choice than kill the application.
    Please try to use 50 different grass with millions of them on a terrain and see if you are not having a tasks that is blotting the system.
     
    Last edited: Oct 24, 2017
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    50 different grass types are way too many, sorry.
    i have successfully tested 18 different prototypes – but i do not recommend to use that many as well.
    the number of instances is irrelevant as the grass manager does not store any per instance data.
     
  17. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    64
    What you say is that I cannot use more than 18 different prototypes? Right now, Unity's grass can handle my terrain no problem.

    Your asset is blocking the editor.

    1) you initialize everything when the terrain is selected, why not doing it with a button, so that we can decide when we block our computer for 10 min and not everytime we select the terrain? I am using a terrain generator, everytime I change something on the terrain I select it -> waiting 10 min?

    2) you are displaying the grass in editor in update() which is really slow, why not testing if we are in editor and let Unity doing it in that case, you say you are doing that in the description of the product, but in fact in the source, there is no is in Editor testing?

    Having more than 20 prototypes is standard (or maybe you are still living in the 80's). Stress test your asset before asking money to people.

    Take a terrain with mountain and a lake. 10 Prototypes for the underwater, 10 prototypes for outside the water.

    Are you going to improve this?
     
  18. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i have not said this. but i would not recommend to use such a large number of prototypes.

    i can not confirm this. what gets initialized? the editor gets drawn and prototypes eventually updated – something one would expect i think.
    and if 18 or 20 prototypes haven't slowed me down i wonder how 50 can do that with you.

    sorry, but that is not correct – at least not unless you hit play: the grass manager only renders the grass in play mode.

    i will test adding more than 20 prototypes. if i run into problems i will of course fix those.
    as far as anything else is concerned: you would have to be more precise so i knew what to look for.
     
    Last edited: Oct 25, 2017
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i have quickly tested the grass manager with 30 prototypes on a 3500x3500m terrain and a detail resolution of 2048:
    i do not get any lag in the editor at all: selecting the terrain brings up the editor including the grass manager instantly.
    so i really wonder what might cause your problem – as you were talking about lags of up to 10 min (assuming that this was not just an exaggeration :) ).

    which terrain generator do you use? which version of unity?
    does this terrian generator always switch to play mode – for what reason ever?

    and btw: using 30 grass textures and the built in grass already reduced the resolution per texture in a way that each single texture was not really more than a blurred something. not to mention all the little artifacts you get at the edges of the textures where the neighboring textures from the atlas leaks in.
     
    Last edited: Oct 24, 2017
  20. Weendie-Games

    Weendie-Games

    Joined:
    Feb 17, 2015
    Posts:
    75
    Another great asset! :)

    How the built in shaders from ATG compare to AFS? These new shaders is looking way better than AFS..

    EDIT: Using AFS i always find hard to setup new models (Combine all those texture,etc)
    EDIT: Work on deferred rendering path?
     
    Last edited: Oct 25, 2017
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    thanks!

    ATG uses a slightly new wind and bending function — especially for the grass, which also supports specular highlights.

    Here ATG and AFS are more or less the same — except for the fact that ATG allows to set the wind strength in the material.

    ATG's lighting is fully deferred.
     
  22. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    So it does mean that ATG dont work in forward Path. Also one more, How is ATG work on Virtual Reality?
     
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it support forward and deferred of course.
    i can't say, as i do not have any VR set. but i can't think of any reason why it should not work.
     
  24. ChrisDorn

    ChrisDorn

    Joined:
    Feb 24, 2016
    Posts:
    5
    One hour of modifying the FullDemo-Scene, just ATG, the OpenSource Full Volumetric Lighting and Unity's Post Proccesing Stack. Runs on 80-90 FPS WQHD utilizing AMD'S RX470 and Intel i7 7700k. FPS are always a lot lower when running on higher resolutions then FHD. (UHD 30-45FPS)





















    Now we want to put up a vote for some sort of touch bending soluting. Pretty much anything that can do something to cause a reaction on the "touched" foliage would be greatly appreciated.
    So far thanks for playable Pseudorealism : )


    *EDIT: Maybe it is possible to do something like/with the wind bending maps with their red-green channels, or just a "wiggle around the worlds y-pivot". Or even both? :D And a global offset possibility for the foliage position on the worlds y-axis.;)
     
    Last edited: Nov 2, 2017
  25. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    518
    Would you recommend using ATG over AFS? Is it compatible with a system like Vegetation Studio ?
     
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it depends on what you want to do: if you are using unity's terrains and want to render a vast amount of grass (and smaller foliage like ferns) ATG would be best. if you use tree creator trees and want advanced billboarding or you want touch bending on manually placed foliage you need AFS.

    ATG "replaces" vegetation studios grass rendering – although it needs you to paint the grass and does not support procedurally placed grass (you would have to use 3rd party tools like terrain composer or gaia to procedurally "paint" grass). unlike vegetation studio ATG does not handle speed trees or game objects – as it is dedicated to grass only.
     
  27. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    518
    Thanks for the answer then. I'll probably keep with vegetation Studio then and take over with AFS for when I need higher rendering quality.
     
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    what makes you stick with vegetation studio?
     
  29. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    518
    For now, simply the fact it's already setup in our scenes ;), if we see any limitations we might try other things. The placement system is also pretty handy.
     
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    speed, memory usage, shading quality? :)
     
    Whatever560 likes this.
  31. Weendie-Games

    Weendie-Games

    Joined:
    Feb 17, 2015
    Posts:
    75
    Discount price for who own AFS 4 / 5 is out of question?I want it ATG so much but spent my budget already :(
     
  32. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it would be rather fair to do so but unfortunately i do not know any way i could create such a discount.
    all i know are paid mayor updates. but afs 5 is less than a year old, so i simply can't create an update for this package.
    any hint to create some kind of discount is pretty much appreciated.
     
    Weendie-Games likes this.
  33. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    touch bending please... pretty please... it's very important if you have lot of vegetation and a vehicle moving through it, otherwise it looks way too fake and ruins the otherwise great vegetation system
     
    Weendie-Games likes this.
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i am looking into it.
     
    Weendie-Games likes this.
  35. AntonBertelsen

    AntonBertelsen

    Joined:
    Oct 13, 2014
    Posts:
    37
    Something like this, where it is driven by particles in a buffer would be amazing, even though that might be too ambitious.
     
    Weendie-Games likes this.
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it is not too ambitious – it is just a little bit expensive as using additional cameras in unity produce some very noticable overhead and costs. but basically touch bending will work like this.
     
  37. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    339
    Hi,larsbertram1.
    Your shaders are awesome all the time,i have both AFS and CUTS 3.0.
    Before i buy this one,i just have few questions of your grass shader.

    Is there a way make a little area of the terrain's grass turn burned black and turn back to normal after few seconds?
    Is there a way make a little area of the terrain's grass been cut down and turn back to normal after few seconds?
    Or will these be in your roadmap?

    You can find the same effect in the game "the legend of zelda breath of the wild".

    Thank you!
     
    Weendie-Games likes this.
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    hi there,
    i haven't added any functionality like this yet – as it is quite special.
    but you may add it yourself like so:
    - create a global burn map for the terrain (dop down projected)
    - read that texture in the vertex shader using world position of the given vertex (you have to take the terrain's position into account – or better – the origin and size of the global map)
    - cast the read value to the pixelshader
    - do something in the pixelshader e.g. lerp albedo towards black

    this would work the same way.

    touch bending is on my road map – which will use a similar approach.
     
  39. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    339
    Thanks for explaining,i had bought the plugin today and will try what you said.

    Another question is will this one surpport your the dynamic weather effect in lux in the future?
     
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    if there are a lot of requests: yes.
    but you can already add it yourself: the grass shaders are written as regular surface shaders :)
     
  41. SiDuGames

    SiDuGames

    Joined:
    Sep 28, 2017
    Posts:
    4
    Do you think you could perhaaaaaaaaaps release one completely new product, let's say "Advance Everything" which includes licenses to all your paid content AND the upcoming allround solution (I think I read that somewhere?).
    Because currently I go a bit crazy with your packages and thinking over and over again which one will suite me best (as @jimburn wrote).
    I guess there would be many people purchasing it because they see that you're around for such a long time and keep working like a maniac. At least for me that would make it easier. I always dig around looking if you got anything new. The "all include package" would make it lots easier for me.
    And I even already have 3 of your paid assets.
     
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i am working hard on bringing it all together :)
    although all of them work independently – and most of them work well when used together.
    afs and atg share the same lighting functions as they are derived from Lux plus.
     
    SiDuGames likes this.
  43. SiDuGames

    SiDuGames

    Joined:
    Sep 28, 2017
    Posts:
    4
    Did you set yourself a date when this could be completed?
     
  44. SiDuGames

    SiDuGames

    Joined:
    Sep 28, 2017
    Posts:
    4
    Is that FullDemo-Scene included in ATG?
     
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    yes.
    no. but basically it already works.
     
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    do you think of anything special which does not work well right now?
     
  47. SiDuGames

    SiDuGames

    Joined:
    Sep 28, 2017
    Posts:
    4
    No, I was just hoping there would be some way to bring everything together... like the Standard Shader so that I don't have to fiddle around so much.
    And because I'm already tempted to buy ATG. :)
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    this will be a good decision anyway.
     
    SiDuGames likes this.
  49. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Does ATG work with Lux Plus (Custom Lux Deferred Shading + Custom Lux Deferred Screen Space Reflections)?
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    atg's translucency works right out of the box – even if you use the lux plus deffered lighting and reflection shaders. atg's grass specular lighting will be supported with today's update.
     
    OfficialHermie likes this.