Search Unity

[RELEASED] Vegetation Studio

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

  1. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    There is no global mask. You could make a texture mask and set a exclude rule but you need to add it to every vegetation item.

    Lennart
     
    looki666 likes this.
  2. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    86
    Is it possible to get crossfade on lods? I'm not using the speedtree shader.
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,439
    To all asking for crossfade, it's quite performance expensive to do, so know what you're asking for. It's trivial to fade an object out using dither/screendoor but crossfade has to render both at the same time for the duration of that fade, you can easily get quite a lot of that happening at the same time should you move quickly with a narrow band and this means you probably want to restrict it to where it's most noticeable and even stagger it, but there would be a fair bit of work for staggering it.
     
  4. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,457
  5. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    86
    Yes it is a performance hit, but you can't have great vegetation without it. That's why we all are asking for it. It would be great to have at least an option for it which can be turned off for lower graphic settings.

    Also, is there a limit for three LOD's per vegetation item? Or am I doing something wrong?
     
  6. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    86
    Yeah I believe that is what they use for the crossfade in Unitys LOD system, but the problem is that you have to render both LOD meshes at the same time during the transition.
     
  7. DrewMelton

    DrewMelton

    Joined:
    Sep 24, 2015
    Posts:
    81
    Okay, I give up. Why do my trees not have wind?

    Everything else has wind. My grass has wind, my tree prefab does, everything else does, but my trees do not move at all with Vegetation Studio.

    I'm just using the speedtree that comes with Unity. I have no idea what setting makes trees have wind or not in this asset when everything else does. What setting am I even looking for here?

    Again, the trees move in the wind fine when brought into the terrain manually outside of this asset.
     
  8. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,108
    I use those all the time and I never did anything special, wind works perfectly. Have you tried in a clean project with only vegetation studio, the extended vs demo and the standardassets and see what's up?
     
  9. DrewMelton

    DrewMelton

    Joined:
    Sep 24, 2015
    Posts:
    81
    I haven't tried a clean project, but I tried bringing in a fresh tree prefab to see if I somehow messed up the old one. I'll tinker with it a bit more, but I was hoping there was just a simple setting somewhere that maybe I clicked when I shouldn't have. I don't know if re-importing vegetation studio would refresh all the settings, but maybe that's worth a shot if nothing else works.
     
  10. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    Do you have a WindZone in the scene?

    Lennart
     
  11. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    43
    Sorry If it has been answered or mentioned already (I couldn't find it)
    how is the performance on mobile? actually my target is GearVR /oculus GO
     
  12. DrewMelton

    DrewMelton

    Joined:
    Sep 24, 2015
    Posts:
    81
    Yes, I double checked to make sure. There is a wind zone, and everything blows in the wind fine outside of vegetation studio. Inside vegetation studio, only the grass blows in the wind. The trees do not. It would probably be easier for me to solve if everything didn't work rather than just the trees.
     
  13. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    All shaders has its own wind implementation. Some have an extra script that send a global shader vector with wind direction and speed, others like speedtree is a bit special. Speedtree has a hidden tree component that calculates wind and sets this in a Material Property block. Vegetation Studio samples the wind from this component and injects to the material of the instanced tree. With the standard shader this should have been detected and handled.

    do you mind joining the discord server and message me? Lets us debug. Easier with a text chat.

    Link in my signature.

    Lennart
     
  14. DrewMelton

    DrewMelton

    Joined:
    Sep 24, 2015
    Posts:
    81
    I'll check that out here in a little while.
     
  15. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    133
    Is there support for LWRP in 2018.3?
     
    Last edited: Mar 9, 2019
  16. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    115
  17. Jussukka

    Jussukka

    Joined:
    Feb 17, 2016
    Posts:
    22
    Hmm, I have a bit of a problem.. We are using deferred rendering and vegetation studio is updated to latest everything, but instanced indirect grass does not work with light probes. What gives?
    Will the rendering be much slower if we use plain old instancing instead? Light probes need to work for us since we use a lot of baked lighting.
     
  18. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    Lightprobes only work with instanced rendering. Settings on the advanced tab, but I guess you found it. Instanced rendering is a bit slower than indirect but it is currently only way you can get light probe sampling working.

    Lennart
     
  19. Jussukka

    Jussukka

    Joined:
    Feb 17, 2016
    Posts:
    22
    Thanks for the quick reply!
     
  20. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    670
    I'm starting to do builds. I have VS 1.4.0.0 in Unity 5.6.6f2. The vegetation shows during play, but not in the build. Can you help me?

    Did another build with my latest version of my project, everything working but VS.
     
    Last edited: Mar 14, 2019
  21. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    128
    the answer seems to be the project api needs to be .net 4, not 2
     
  22. BruceBarratt

    BruceBarratt

    Joined:
    Jun 20, 2015
    Posts:
    46
    I have the same problem. Did you find a solution? I'm using Speedtree 8
     
  23. DrewMelton

    DrewMelton

    Joined:
    Sep 24, 2015
    Posts:
    81
    No, I couldn't figure it out. I looked at the settings, even tried deleting the asset and reinstalling, plus bringing in a fresh tree prefab. I was going to post on the discord server, but since I was only toying with the asset, I decided not to use it for now. If you need a solution, I recommend you try what the author suggested to me a few posts up and join the discord server in his signature to chat with him directly. If you do find a solution, please post it here so I can see what it was.
     
  24. Prephonat

    Prephonat

    Joined:
    Mar 13, 2014
    Posts:
    4
    I've been using the Vegetation Studio for some time now and I absolutely love it, but there's one problem that I experience with it. My scene has 9 different terrains and there is a separate vegetation system with baked billboards and persistent vegetation storage for each terrain.

    The problem is that when testing a build, at first, my scene loads up without any foliage and after that there's a freeze for about 30 seconds during which it loads vegetation. Is there a way to reduce the loading time? Should I toggle sleepmode for vegetation systems ingame to reduce the initial loading time?

    I’m using Unity 2018.3.4f1 and Vegetation Studio 1.5.1.0. In a build vegetation system takes around 1.8 Gb of ram.
     
    Weendie-Games likes this.
  25. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    387
    Exactly ;) The same with crossfade/ dither smooth fade beetweend billboard and last LOD, this is almost impossible to get professionall trees without smooth billboard appear, cause in other case there is always that bad looking pop up of Billboards, Even if dither takes here more power to calculate transiiton it gives huge optimization cause billboards could be visible on much closer distance ;)
    Also It would be great to have instancing indirect tree shader with smooth speedtree LOD ;)
    Regards
     
  26. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    387
    For us on 2018.2.21 lightprobes works for grass and plants too. (instanced indirect)
     
    Last edited: Mar 21, 2019
  27. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    148
    Hi when moving around the level I get some slowdown coming from Vegetation Studio I'm working on an RTS so I have a fast moving free camera. I have 5 tree prototypes which are baked (around 4500 total) and 3 grass textures generated by VStudio.
    Is it a loading issue and if so how can I load them? Would you recommend a different cell-size for such a game?

    Tested in Unity player not Build version.
     
  28. DDDimanN79

    DDDimanN79

    Joined:
    May 30, 2014
    Posts:
    6
    Hi, Developers! I work in a bundle of Gaia + CTS + Vegetation Studio. In edit mode, the placement of plants and trees is controlled by "exclude terrain textures" and correctly displayed in the editor and in the camera. When activating Play Mode, vegetation ignores "exclude terrain textures" management. Please help solve this problem! Screenshots with an example attached!

    Edit mode:
    EditMod.jpg

    Play Mode:
    PlayMod.jpg
     
  29. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    CTS has a setting where it strips the splatmaps and textures from the terrain at run-time. disable this and it should work.

    Lennart
     
  30. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    Hi. Do you mind joining the discord server and message me there? I can help you look at the setup.
    Link in my signature.

    Lennart
     
    VictorKs likes this.
  31. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    191
    Hello I'm thinking about buying Vegetation Studio Pro, but I'm also using Aron Granberg Astar pathfinding.
    I want to have destroyable trees so I will need to generate navigationmesh without trees and than add the trees and cut the holes in navigation mesh. Also trees will have to have colliders.

    Has anybody got some experience with such a situation. I saw some support for navmesh but it was for unity built in one.
     
  32. LennartJohansen

    LennartJohansen

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

    How does the navmesh carving work?

    Vegetation Studio Pro has a collider system that creates colliders for trees when close to cameras. These are re-used from a pooling system.

    If you have a way to run-time carve these holes you can connect to events on the collider system and add your carving scripts to the colliders as they are enabled and added to the terrain.
    There is a similar built-in system that does this for the Unity navmesh with NavmeshObstacles.

    You can also access the tree positions with code, or bake them out as colliders GameObjects if you need to access the instances/positions for use in another system.

    If you want to cut a tree there is 2 options.
    1. Remove the tree with the storage API. This works for baked vegetation
    2. Use a vegetationItemMask componen (or the internal API) and mask out a selected tree. The info you need to mask it out is available from the collider object.

    Lennart
     
    JBR-games likes this.
  33. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    191
    Mesh carving works by specifying region and using cutting component. It works at runtime.

    Can I disable removing of colliders, I want to have all my colliders all the time, my terrain is not going to be huge. Ideally I would like to keep colliders for trees in gameplay region. And do trees without colliders for background region.

    Also I will have more than one collider for a tree. One group for physics (collision) and second ones for visibility (leafs).
     
  34. Ether141

    Ether141

    Joined:
    Jul 30, 2018
    Posts:
    12
    Hello. I've got a problem with Vegetation Studio. In few places i can see something like that:

    Szkic.png

    This problem only occurs in play mode. I refreshed heightmap, but it didn't solve the problem. Could anybody help me, please?
     
  35. Ether141

    Ether141

    Joined:
    Jul 30, 2018
    Posts:
    12
    Can anybody help?
     
  36. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    Hi. It looks a bit like a shadow. Is it moving?

    Lennart
     
    sebakujawski likes this.
  37. vrchewal

    vrchewal

    Joined:
    May 30, 2014
    Posts:
    14
    Thanks for a cool tool! I have a problem with VR performance that I'm hoping has a quick fix. With VS enabled, I get about 50-60 fps. When I disable it, I get >100 fps.

    I'm using Unity 2018.3.8f1, VS version 1.5.1.0 and my vegetation package is using the Trees Pack located here https://assetstore.unity.com/packages/3d/vegetation/trees/trees-variety-72855

    All vegetation items are using Instanced render mode, initial LOD set to 2. the Debug tab says cache tree count of 990, cache plant count to 23625 and cache size 1.5mb.

    Any help is appreciated. Thanks!
     
  38. zongzhi27

    zongzhi27

    Joined:
    Sep 3, 2018
    Posts:
    5
    1.I don't konw why trees billboard have no shadows......I have tried everything,I am crazy.So help me please!:( I use Vegetation studio.
    2.Is there any documents or Video for Map Magic and Vegetation studio together use? I've puzzled.Youtube's Video isn't enough.
     
  39. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    86
    What has the least amount of performance impact on a big amount of objects (I need to enable and disable them during runtime):
    Touch react collider, touch react mesh or vegetation area mask?
     
  40. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    The touch react collider and touch react mesh can easily be disabled. They will remove themselves from the TouchReactStystem and not render to the mask the next frame.

    VegetationAreaMasks does a bit more. When enabled/disabled it will respawn any overlapping cells in the VegetationSystem.

    Lennart
     
  41. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    If you message me on the Discord sever we can look at the profiler (link in my signature), but it does not sound that wrong. VR rendering renders normally at a larger resolution and you have more drawcalls since it renders for each eye. It is normal to get a lower framerate than a single camera.

    Lowering density, removing shadow cascades/shadows etc is probably the only way to increase FPS if you are GPU bound.

    Lennart
     
  42. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365

    1. What unity version do you use?
    2. I think map magic released some new videos on the integration a couple of weeks ago.

    Lennart
     
  43. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    643
    I'm having an issue where Vegetation Studio isn't "obeying" the texture exclusion rules. The following images show what's going on. The first is the terrain and its texture(s). The second shows the exclusion rule in the inspector. The third picture is with heatmap enabled, to show that the texture in the exclusion rule is still being populated with the vegetation.
     
  44. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    Hi. The heatmap only shows the steepness and height rules It does not know of all the other rules like texture masks and terrain textures.

    If you look at the final result is the grass be excluded?

    Lennart
     
  45. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,135
    Hello Lennart,

    I am working on my voxel/chunk based game which cannot use Vegetation Studio itself (or at least I believe so) because it has no terrain /landscape, only the dynamically created chunks.

    But I was Looking for a grass shader that helps my with my simple grass meshes that are just some vertical or sloped planes. The textures are on a huge Atlas with 8x8 grass textures in one big gras, the grass meshes have each texture/uv coordinates that Point to the correct part of the Atlas.

    I found one in Vegetation Studio and it Looks nice and seems to do just fine!

    My game also contains "Enviro", that has it's own wind Zone.
    Can I use the grass shader from Vegetation Studio with Wind, or does it require some additional scripts or something to configure?

    Thanks a lot :)
     
  46. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    375
    Is there a way to select/identify the individual trees/detail meshes and remove/modify them?
     
  47. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    643
    Yeah I later noticed that I didn't read the documentation closely enough to realize the heatmap doesn't reflect texture masks. The final result is correct.

    However, I've now run into an issue when trying to use VegetationStudio with the new Lightweight/High-Definition Renderer Pipeline. Specifically, when trying to convert materials to the pipeline, they don't convert because the pipeline doesn't support Nature/Tree Creator conversion. Is there a solution for this, or one in the works?

    EDIT - I've even tried to manually turn the materials into HDRP or LWRP materials, but the problem I'm facing is that the way my trees are built (speedtree, etc) they're required to use a material that is named bark or leaf. So If I try to change the material to let's say LightweightPipeline > Standard (Simple Lighting) it will change the material, but then the tree throws errors saying that the material has the wrong name.
     
    Last edited: Apr 25, 2019
  48. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    643
    I would edit my previous post, but since that one doesn't even have an answer yet I'm making a new one.

    What would be the cause of objects and plants not following the setting of the Vegetation Distance, the same way grass does? What I mean is that if I set the distance to 10 (the minimum setting, grass only renders right around my player, while rocks and flowers render a nice distance away.
     
  49. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    If you bake the vegetation to the persistent storage you can delete or move the instances. But then you can not change spawning rules anymore. An alternative is to remove the instances with VegetationMaskAreas or terrain texture spawning rules.
     
  50. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,365
    There is a global shader variable set with the wind direction and strength. I Am at home now and do not have any code on this computer. I think there is a wind script you can add to use the shader outside of Vegetation Studio.

    Lennart
     
unityunity