Search Unity

[RELEASED] Vegetation Studio

Discussion in 'Assets and Asset Store' started by LennartJohansen, Jun 23, 2017.

Thread Status:
Not open for further replies.
  1. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Unity 2018.1 Beta

    Hi. I just did some initial testing on the new Unity 2018.1 beta. There is a small issue in the compute shader render pipeline. Unity changed some things but that is an easy fix. With compute shaders turned off on the render tab the rest seems to work as it should. Also 3 line ending warnings. Compiler seems to test cginc files also now :)

    I will have the compute shader changes done for the next update.

    Lennart
     
    elbows, blitzvb and FargleBargle like this.
  2. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hello... Unity crash when I start the vegetation systems.. I click once in the scene window and they are shown.. If I carefully start to look around unity crash.... :/
     
  3. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I will send you a pm to see what could be wrong.

    Lennart
     
  4. Goodgulf

    Goodgulf

    Joined:
    Jan 12, 2016
    Posts:
    59
    Hi All, I've been trying to get the grass touch bend to work on my terrain with a sphere rolling down the hill (and on my FirstPersonController with same result). It doesn't seem to do anything (no trail on the grass, no grass bending when the sphere rolls over it). I must be doing something wrong but can't figure out what. Anyone has some suggestions?

    Here's what I did:
    Converted the grass (Rustic Grass from Turboscalpeur) using Grass Patch Generator. Added these to the VS Vegetation.
    Added Touch React Collider to the Sphere.
    Ensured TouchReactSystem is enabled and use touch bend is switched on in the grass materials.
    Tried switching on compute shaders.
     
  5. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Not at the office now. I will make a post explaining a bit tomorrow.

    Lennart
     
    Goodgulf and mattis89 like this.
  6. Vagrod

    Vagrod

    Joined:
    Aug 4, 2017
    Posts:
    82
    Hi! I am getting weird artifacts when using grass prefab with Instanced Indirect rendering mode. When I switch to Instanced, fps drops a little, but these strange things disappear. I have Compute Shaders turned off right now. When I turn them and Instanced Indirect on, I'm starting to get even more annoying artifacts on the screen.
     

    Attached Files:

  7. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    What Unity version? Does it still show if you switch to deferred rendering?

    Lennart
     
  8. Vagrod

    Vagrod

    Joined:
    Aug 4, 2017
    Posts:
    82
    Unity 2017.1. It's gone on Deferred, thank you for tip, Lennart!
     
  9. deliberative

    deliberative

    Joined:
    Dec 22, 2016
    Posts:
    12
    Hello! Started using Vegetation Studio yesterday and so far looks great; I think it will be extremely useful for us.

    Having one small challenge with a projection-based decal system I'm using. I'm using Dynamic Decals to project pathways and other details on the terrain. These decals are set to project only on a Unity layer which only has the Unity terrain in it. When I use Vegetation Studio to fill the terrain with SpeedTree trees (in this case, for testing, I'm only using the Broadleaf_Desktop tree), these decals would appear over top the trees, even if they should be occluded by them.

    For the most part, I was able to fix this by changing the render queue of the SpeedTree shaders. This worked for everything except billboards. The billboards, which I believe are being generated by Vegetation Studio since I have "Enable Billboards" turned on, still appear below the decals. I tried changing the Render Queue of the ATree and ATrees materials, and ultimately tried changing it in the ATree shader itself, but to no avail. I also ensured that, in VS's Render settings, the trees are being rendered to their own layer, which is not set to be affected by the decal projection. Is it possible that despite that setting, the billboards are being rendered to the terrain layer?

    I tried this with other types of trees (specifically NatureManufacture's Mountain Tree Pack) and it similarly occurs when Vegetation Studio generates billboards for these. I should also note that when I don't use Vegetation Studio, and just use Unity's terrain tools to paint SpeedTrees normally, using their own built-in billboards (albeit with an increased render queue), there's no issue -- the billboarded trees appear in front of the decals as desired.

    I'm by no means a shader expert, so it's very possible there's a simple shader fix in either VS or Dynamic Decals, that would overcome this... Has anyone encountered this or something similar, that could at least maybe point me in the right direction?

    Much thanks!
     

    Attached Files:

  10. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi.

    It is probably render queue related. The billboards are rendered by a surface shader and write to the z-buffer like a normal mesh. Do you think you could make a small test project for me? I can try to see what needs to be done to get the assets to work together.

    Lennart
     
  11. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    105
    Hey Lennart,
    I've been testing out the Grass Patch generator and was curious if there's a way to get the grass to billboard like the default Unity grass?
    Your plugin has been super good from what I've seen so far!
     
  12. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Part of the idea with the patch generator is to get away from the billboards. They do not behave good in VR and in general does not look good. The patch generator will build 3 LODs or you when you.

    What do you want the billboards for?

    Lennart
     
  13. deliberative

    deliberative

    Joined:
    Dec 22, 2016
    Posts:
    12
    Thanks! Just shot you a PM.
     
  14. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    105
    I had wheat-field w/ Unity grass that I liked, and was hoping to make it look similar to get a baseline for performance.

    But after my last post I was playing a bit more with the settings and got something similar, so it's all good.

    Can't believe how fast this renders grass and everything else, it's insane!
     
  15. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I dont understand.. I just added 2 trees(ForestVision) to VS.. and I made rules so theres not so many at all.. And the FPS dropped from 40 to 20-12.... ? . I only have 2d Grass (not patched using the generator) and some stones and logs and sticks laying on the ground.. And using Occlusion...

    Any tips how I can configure so it has great performance like I have seen in videos..?
     
  16. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Hi again, small question about tiled-terrain.
    In surrent state we should mnually add vegsystem to each tile and assign it?
     
  17. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I understand that speedtrees works best ? And I found a speedtree modeler that looks easy to use and only 19 bucks a month.. Im gonma buy that :D like why would I pay 140 bucks for a tree pack lol.
     
    LennartJohansen likes this.
  18. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    Do You set trees as instanced? Do trees have lods ? If yes, play with "Lod" settings in the instance settings. You can set the lod distances. Also be sure to use instanced indirect grass, since even instanced grass has a hit on performance. Also if u set the grass to be dense as hell it will also decrease the performance because of overdraw, i think. :)

    @mattis89

    Yes speedtrees are good, sadly the smooth lod doesnt work atm (Unity's issue), also @LennartJohansen is working on speedtree instanced indirect shader ? Correct me if i am wrong.
     
  19. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I just subsribed to the Speed Tree modeler.. So its all good.. I just filled my world with trees.. no problem =) ...
     
  20. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Yes he is working on that.. Quite easy to do it self.. I made a new shader for osme rocks that support indirect instancing..
     
  21. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I just recieved a really strange problem tough with my build verision...

    dfdfdf.png Untitleddf.png Whats going on ? :S
     
  22. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    422
  23. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    105
    Here's a script that removed the vegetation on EasyRoads3d Roads, until official support is added.

    Just attach it to a road mesh and press Refresh to update the Mask.
     

    Attached Files:

  24. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Good it works. The patch generator is quite flexible. You have a lot of settings to get the patch the way you want.
     
  25. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes, that would work. Or if you have a streaming setup you can make a prefab of a configured VegetationSystem GameObject and instantiate a copy when a new terrain is loaded. You then assign the terrain to the VegetationSystem component and vegetation will initialize.

    Lennart
     
    MarkusGod likes this.
  26. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes. You can find a copy of the modified shader here. It works great for speedtree grass.

    Lennart
     
  27. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    It looks like some missing texture or messed up material. What grass/shader are you using?

    Lennart
     
  28. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Last edited: Jan 11, 2018
    P_Jong, mkgame, Mark_01 and 3 others like this.
  29. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Everything looks perfectly fine in the editor... all materials are fine... the grass is 2d so nothing can be messed up... I just hit the 4gb limit in the resource folder... piece of S*** engine....
     
  30. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
  31. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
  32. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Some performance problems!!

    Unity 5.64p4 GPU_GTX1080 CPU_i7 6700
    Check VS ,Grass and tree all density are 0 and empty storage ,FPS119.8(8.3ms)
    Uncheck VS ,Grass and tree all density are 0 and empty storage ,FPS171.5(5.8ms)

    How do i Improve performance with VS ?

    EmptyVS.jpg NoVS.jpg
     
    Last edited: Jan 12, 2018
  33. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Can you send me a pm with some profiler screenshots?

    Lennart
     
  34. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi.

    I updated the guide. The step to select the microsplat background is not needed anymore. I implemented a alpha bleeding/padding algorithm that gives the same effect on the edge areas as blending against the terrain background would do.

    Lennart
     
    boysenberry and Akshara like this.
  35. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I sent you a temporary workaround in pm. I will expose a renderqueue override for the billboards for special cases like this.

    Lennart
     
    blitzvb and boysenberry like this.
  36. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Great because I am planning to use dynamic decal too.
     
  37. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    I am getting a black splat map when I click Generate vegetation color mask. I have Include Grass and Include Plants checked. I haven't setup my vegetation yet though, figuring I'd get the preliminary dependencies taken care of first. Do I need to setup my vegetation first or something? I am not sure the correct order. I did follow the directions on your support site though.

    All of the MapMagic directions worked flawlessly, btw, thank you!
     
  38. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes. You need to set up the vegetation first. What the component does is render out all the grass and plant instances to a mask. This mask is then blended on the terrain at the distance you set Vegetation Studio to remove grass giving the effect of grass in the distance also.

    Lennart
     
    Mark_01 likes this.
  39. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Ah, that makes sense. Thanks for the hand holding, hehe.
    Awesome product. I am looking forward to getting to know it intimately.
     
  40. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hi,

    is there a way to bend SpeedTree bushes and grass?

    bandicam 2018-01-13 00-47-39-843.png
     
  41. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Looks awesome!
    But! The grass color is far too bright (hurts in the eyes) and the dirt too dark. Also everything is a bit blurry. For the fresh green grass I would increase the cutout, that helps to remove the blurry effect and makes the grass more realistic. Also entering and leaving the forest gives no atmosphere effect. Like darkening and coloring the light green at entering the forest. A real forest does it automatically ;)
    Like the idea to make a dirt way with grass. It wouldn't work well with just the terrain textures.
     
    Last edited: Jan 13, 2018
  42. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
  43. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    boysenberry likes this.
  44. jlpeyton

    jlpeyton

    Joined:
    Dec 22, 2017
    Posts:
    59
    Hello,

    I was recommended this asset by someone but who uses both Gaia and Vegetation Studio. I have Gaia, but is there a benefit to using this tool instead of the vegetation stamping Gaia has? Just curious.

    Thank you
     
  45. LittleMike

    LittleMike

    Joined:
    Jan 12, 2014
    Posts:
    101
    I use Gaia as well and I can tell you that it works with Gaia, not instead of it. It will take all of your existing vegetation and do amazing things with it (like GPU rendering, culling, etc.) Someone else here can give better details than I can, but trust me when I say that this is worth the price. Performance with it is amazing compared to not using it if you have a lot of vegetation.
     
  46. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    It's still coming up blank for me. ☹
     
  47. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    look at the page again and try the link.

    Lennart
     
    boysenberry likes this.
  48. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Yay, success, thank you!

    Thanks again for the help!
     
    Last edited: Jan 14, 2018
  49. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hi, I'm using the newest VS version from asset store, got some questions here:
    1. I found no "from object" collider option on the vegetation prototype panel.
    How can I set multiple colliders for one prototype of my trees and how can I use trigger for some of them and others not?
    2. About biomes. Are you going to implement a biomes system into vegetation system?
    As on the same kind of altitude and texture I can have different major vegetation in different biomes, this will allow us to create a more complex environment with fewer terrain textures.
    3. Any suggestions on how to put multiple prototypes of trees scatter in the same area with a fixed proportion of them?
    Like in a pine forest I'll have 60% pines, 30% cedars and 10% broadleaves.
    4. About the persistent database, if I wrote my own script to scatter trees on random generated terrains in runtime, where can I find the API to add trees into VS system, and how does it work? I'm imaging there should be one database for each terrain tile but I can't create asset file in a built game, any suggestions on runtime generated terrains with external object scattering methods?
    Thanks in advance :)

    BTW, here is the results I tested last night with MapMagic, Microsplat, Tenkoku, Unity's Post Processing stack and Vegetation studio.
    Used 3 textures on terrain, two texture grass prototypes, two cedar speed tree prototypes and a basic noise node in MapMagic terrain generation.
    upload_2018-1-14_19-43-55.png

    upload_2018-1-14_19-44-20.png

    upload_2018-1-14_19-47-43.png

    upload_2018-1-14_19-48-22.png
     
    Last edited: Jan 14, 2018
    Rowlan, dsilverthorn, mkgame and 4 others like this.
  50. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. Vegetation Studio replaces the vegetation rendering of the Unity terrain.
    It does rendering using the new instanced and instanced indirect APIs, has custom culling, and a set of tools for vegetation spawning and run-time manipulation of Vegetation.

    If you want to use Gaia for procedural placement of trees, rocks etc you can do this and import the result from the terrain and scene. Gaia is also adding direct spawning to Vegetation Studio.

    Lennart
     
    BackwoodsGaming and Mark_01 like this.
Thread Status:
Not open for further replies.