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

[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
    My guess here is that you have vegetation baked to the persistent storage and are using the same storage on all of the vegetation systems. The storage is for each terrain. Check this and make a new persistent storage for each pinned terrain.

    Lennart
     
  2. jrackley

    jrackley

    Joined:
    Jan 26, 2017
    Posts:
    55
    Thank You, that worked perfectly.
     
  3. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    On-q creations trees looks super weird.. when I drag them to tree object spot and they spawn.. the far aways are fine.. but the close ones have no leaves? Its like occlusion culling the other way around and only leaves :D (not using O culling)
     
  4. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    "This can be added in any mesh modeling tool that supports vertex painting " trying to make mesh grass work like it should..

    Modeling tool tips? @Lennartos
     
  5. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Jason (Microsplat) has a fee vertex painting tool that works in Unity. You can get it on github here.

    Lennart
     
    mattis89 likes this.
  6. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Do you have a link to the package on asset store?

    Lennart
     
  7. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Thanks!
     
  8. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
  9. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    In unity, stone etc, material and the shader is "Standard" does it support indirect instancing?
     
  10. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    No. But you can make a simple shader in systems like Amplify Shader Editor that does the same. Just drag in the texture types you need to the output. The guide on the VS website has a Amplify section.

    Lennart
     
    mattis89 likes this.
  11. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Cool! I own Amplify Shader Editor =)
     
  12. zelgo

    zelgo

    Joined:
    Jun 26, 2016
    Posts:
    39
    does that work with shader forge?
     
  13. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I never tried. What you need is to add a include file and 2 new pragma lines.
    If Shader Forge does not support that in the UI you can add that to the shader file after it is done.

    Have a look here for info on the changes needed.

    Lennart
     
  14. zelgo

    zelgo

    Joined:
    Jun 26, 2016
    Posts:
    39
    it has an option "enable GPU instancing"

    not sure if that is the same as indirect instancing
     
  15. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    No. Instanced Indirect requires instanced support. It is a way to store multiple instances in a buffer on the GPU and render them faster, less wait time between each mesh drawn.
     
  16. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hellooo :) I have tried many ways but I cant get my grass to completely cover my terrain.. like really cover.. is it possible or is it always some chunks uncovered?
     
  17. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    You need to disable the perlin noise. and probably the steepness and height rules on the vegetation item. Then it should grow everywhere.

    Lennart
     
  18. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I have tried that but it dosent work.... I think it has to do with the cts texture blending... because when I say grow on grass not mud theres still grass on the mud not ridiculos much but its there... is there any option for "texture strength somewhere? Spawn on this texture if strength is 25?
     
  19. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    In case anyone needs a new SpeedTree for their Vegetation Studio, SpeedTree give away their Christmas Tree for free currently in their store. Not usable now, but there's next Christmas :D

    Here's it used in Vegetation Studio:

    christmas-trees.jpg
     
  20. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    What grass are you using?

    Somehow 2D grass looks better on my system than mesh grass..thats weird..
     
  21. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Vegetation Studio grass with PostProcessing effects.
     
    mattis89 likes this.
  22. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92
    Is it possible to get some more documentation about this part of the API?

    Thanks
     
  23. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Ambient occlusion at the max or color grading ?
     
  24. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Sure. I will write a doc on the API to add and remove instances. I will post here when it is ready

    Lennart
     
  25. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    Does vegetation Studio allow difference viewing distances for different grass types, e.g. a greater viewing distance for crops like wheat compared to normal grass?
    Thanks
     
  26. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    no
     
  27. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    It does not do that now, but I can add that easy as a max distance setting on the LOD settings per Vegetation Item.
    It will work on any grass that is rendered with instanced indirect and with compute shaders turned on.

    In the compute shader I can do this calculation on the GPU in the pre pass before rendering. It would be slow to do this calculation on CPU per grass patch.

    Lennart
     
  28. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    No idea, using Lighting Box and dragging around sliders until I'm happy :D
     
    mattis89 and blitzvb like this.
  29. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    could you also add this for other items such as trees and large objects?
     
  30. Goodgulf

    Goodgulf

    Joined:
    Jan 12, 2016
    Posts:
    59
    Hi Lennart, Vegetation Studio a great asset and I haven't had so much fun working with terrains since Gaia's release. One quick question: when I load a scene it takes a little bit of time (max a few seconds for a scene with lots of trees and grass and objects) while you see the empty terrain before the trees and grass are shown. Is there a way to check if the scene is "fully shown" with trees and all? Perhaps by subscribing to an event? That way I could show an image or black overlay first and only show the scene once fully loaded/rendered.

    p.s. I tried SceneManager.sceneLoaded but that one finishes before everything is shown/rendered.
     
  31. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I will have to make an event for that.
    Added it to the list...

    Not a big job I will try to get it in an update soon.
    Send me a pm if you want me to help you hack in an event now.

    Lennart
     
  32. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    For objects and large objects it would be easy. The issue is trees. What to do with billboards. Add them closet to the camera? Remove them if distance is reduced?

    Lennart
     
  33. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Hi Lennart

    Is it possible with VS to put grass (or grass meshes) on top of meshes (such as rocks)?

    Thanks
    Dimitri
     
  34. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. With the painter on the persistent storage you can paint on any rock, or mesh with a collider. There is also a precision painting tool that does not need colliders and will paint on any mesh in the scene.

    Lennart
     
    blitzvb likes this.
  35. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Ok, i see. What about procedural placement? I work with Map Magic and a fully procedural workflow.

    Thank you!
     
  36. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    No. Procedural on meshes is not supported. I am working on MeshTerrain support, when that is done i think it would be possible to feed aditional meshes into the base terrain mesh. This could be combined with unity terrain. Not 100% sure how it will end out as this is a work in progress.

    Lennart
     
    WildStyle69 and Lars-Steenhoff like this.
  37. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Webserver

    My webhost has a problem, the website with all documentation will probably be down for a couple of hours+. There is a pdf version of the documentation in the package.

    EDIT: And we are online again.


    Lennart
     
    Last edited: Jan 6, 2018
  38. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    422
    Hi.

    This is probably silly question but i have not had a chance to go trough every post in this thread. How is VS working together with TerrainComposer2? I am in love with the TC2 non destructive workflow. I am able to control every minor detail and easily make changes in late stages. I am just so used to it that i am reluctant to change my workflow.

    Can i use VS together with TC2? Get all the VS performance benefits and only use TC2 for controlling masks, splats and etc. Is this possible or is there some limitations in the system that makes this kind of workflow hard to achive?

    Thanks.
     
    gecko likes this.
  39. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    How do you make the trees wave in the wind? I found the option for the grass, but none for the trees.
     
  40. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    This depends a bit on the tree shaders. You usually only have to add a WindZone to the scene. Some tree shaders like AFS also need you to add a manager component to the scene.

    Lennart
     
    Rowlan likes this.
  41. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. Vegetation Studio works good with TC2. TC2 produces unity terrains and this works good with VS.
    If you want TC2 to do the tree spawning you would have to import the results to the persistent storage when you update the terrain, but if Vegetation Studio is handling the vegetation spawning rules it will update direct to the terrain changes.

    Rules can be set up to spawn based on splat masks or any other mask TC2 can produce.

    Just send me a pm if you have any promlems or need more info.

    Lennart
     
  42. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Thanks! Got it to work :)
     
  43. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    One question regarding Billboard for trees specially for Speedtrees:
    Normally in AAA games like The Witcher3 you see that when getting near a tree and the billboard is changed to the normal LOD 3 model that the model is faded in in the billboard faded out nicely. So you have a Fade In Effect when switching from Billboard to LOD Models. Right now in Vegetation Studio there is not a fade in / out feature and the switch is pretty harsh. You see simply the Billboard popping in or out very strong. Could this be changed in an update?

    Like making the switch from and to billboard more smoothly?

    Right now I am using LOD 0 in High for the Billboards.
     
    blitzvb likes this.
  44. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes. I am talking with unity for a way to set the unity_LODFade parameter that the shaders use for LOD fading. This is currently not possible to set without the use of a LODGroup component. If that takes time we will have to do a small change to the shaders to get a proper fade.

    I do not want to have to update the shaders, but the change is small and I will be providing a speedtree shader that supports instanced indirect anyway. I will decide on the solution soon.

    Lennart
     
    nirvanajie, Rowlan, blitzvb and 3 others like this.
  45. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Divide to conquer. Long term let unity fix it and short term propose a solution.

    Cause betting on a fast fixes from unity seems to me, unreliable.
     
  46. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
  47. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hello,

    vegetation with Vegetation Studio looks awesome! I'm using speedtree trees already, they must be separate GameObejcts in my scene for interaction purposes. That works fine, due to the LOD system on speedtree trees.

    Speedtree also provides grasses and bushes. Is there any advantage using them in vegetation studio? I don't need them as GameObjects in the scene, so in your vegetation studio the grasses and bushes are well kept. One of the interesting feature in speedtree is, that at instantiating trees on different positions the color changes, that gives us more differences between same trees. But for grasses you already have this feature.

    1. Are there any advantages with speedtree grasses/bushes in Vegetation Studio? Maybe for mesh based vegetation you don't have the feature changing the color?
     
  48. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Speedtree Inc. have a has OFF for trees/vegi and tree/vegi boundles. Tree desktop packs 159$ to 115$ (you have to log in to see the OFF price). If you have the christmas pine tree and 20$ for their tool, you can make nearly all the pine trees you wish, by changing the color of the pine branch image. Then you have also the 4 free trees, which are already included in Unity environment pack. But carefully, if you use their tool and roll different type of trees, you will try to recreate all your trees to have the same quality and performance... Then they have also LOD's, so you don't have to use Unity tree system for optimization. The trees also have the feature to change the color after instantiating automatically, like grass in vegetation studio.

    bandicam 2018-01-09 06-21-02-242.png
     
    Rowlan likes this.
  49. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    SirTwistedStorm and MarkusGod like this.
  50. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. You can use speedtree grass with Vegetation Studio. Just add the prefabs and set up your spawning rules. It will then render with Vegetation Studio.

    The position HUE adjustment in speedtree is supported by Vegetation studio. If you add a tree it will render with the color changes and the billboards will also adapt the same color. This also goes for speedtree grass.

    I added a github project with a modified version of the speedtree shaders that supports Vegetation Studios instanced indirect implementation. This will give you faster rendering with a large amount of grass instances as well as GPU frustum culling etc. You can find the shaders here.

    You said you needed the trees for interaction purposes. There is a couple of built in systems that allows you to do this in Vegetation Studio even if the trees are not GameObjects. You can connect to the ColliderSystem events to add any scripts to the objects holding the temporary colliders or use the RuntimePrefabSpawner component.

    Have a look at the documentation.

    Lennart
     
    Mark_01 likes this.
Thread Status:
Not open for further replies.