Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] Vegetation Studio

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

  1. Dev-A

    Dev-A

    Joined:
    Oct 11, 2013
    Posts:
    28
    Thank you. It's as I thought, maybe there is a way to map the hair instance to the vertex, possibly with this skinned vertex mapper. Or since the hairline technically doesn't move after character creation, the hairline could be saved as a mesh cap that's parented to the head bone...
     
  2. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    @LennartJohansen did I miss anything? As I want to get the maximum performance out of VS.
     
  3. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Okay :D thanks!
     
    blitzvb likes this.
  4. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Can I bake it ALL? Trees, stones etc? Will it improve my performance?
     
  5. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    This is a bit of the topic for the thread. Send me a pm and lets continue there :)

    Lennart
     
    antoripa likes this.
  6. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    What exactly is the difference between a Vegetation Mask Area (Include) and a Vegetation Beacon.
    With both you can define an area where trees / flowers etc. are spawned. The objects in both can be adjusted: Vegetation Mask Area through Spawn / Position rules of the Vegetation Object, and Beacon through the Curve.

    I wanted to create a graveyard spawning spooky trees in this area. That's why I was asking myself if its better to use the Mask Area for tree spawning or the Beacon.
     
    blitzvb likes this.
  7. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    Let me try to explain.

    The vegetationMaskArea component allows you to select an area using a polygon. In this area you can remove vegetation based on type. Grass, plants, trees, objects or large objects. In addition to this you can add "localized" vegetation that will be spawned in this area.

    The VegetationBeacon can not exclude vegetation. You add it to a location, set a radius and what vegetation to spawn there. This will be added in addition to any other vegetation in the area. You can also configure a fallout curve that controls the density of the spawned vegetation from the center to the edge(radius).

    Lennart
     
  8. NotQuiteSmith

    NotQuiteSmith

    Joined:
    Oct 27, 2013
    Posts:
    65
    I had the issue described in https://forum.unity.com/threads/released-vegetation-studio.479244/page-22#post-3336390 .
    I changed all vegetation to use "Instanced" instead of "Instanced Indirect" and it fixed the issue - is there any performance hit or other side effects I should be worried about?

    I was getting "phantom" vegetation instances, on a regular "grid" pattern that would only appear, intensely bright, when there was a nearby point light (in my case, attached to an object and associated particle effect). Screenshot shows the weird grid pattern in red - the blue is the source light/object).

    Thanks
     

    Attached Files:

  9. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    It seems like some kind of unity bug where a reflection camera or similar from another asset somehow sees the instanced indirect grass but with missing buffers. It seems to happen on Forward rendering only but I have not been able to reproduce it.

    Instanced Indirect is a better solution for grass since it has a lot of instances. It does not need to prepare the render lists on the CPU and can do bigger drawcalls than 1023.

    Send me a pm if you want some help debuging a bit more.

    Lennart
     
  10. NotQuiteSmith

    NotQuiteSmith

    Joined:
    Oct 27, 2013
    Posts:
    65
    Sent a PM - hope it helps.
     
  11. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    334
    @LennartJohansen
    could you please check your inbox? I reported some stuff, haven't heard back in a while
     
  12. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    I will get back to you when I am in the office.

    Lennart
     
  13. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    What Unity verision is best to have if you using these more advanced assets? Like VS..gaia..cts.. aqua... in the end its anyway down to the engine.
     
  14. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Hello everyone =)

    So Im gonna post a screenshot from my singel player survival game. So you guys actually see something :D

    No image effects. Only materials and shader as is .

    Mountain Terrain.jpg

    The rock with moss, I have actually made myself :D
     
    Last edited: Jan 26, 2018
  15. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    For Vegetation Studio all features is available from Unity 5.6.4 +
    In general I like to wait until at least the first or second update of a new version is available before I upgrade.

    2018.1+ is going to change things quite a bit with the new Job system. But that requires custom code and assets will have to do a rewrite to use this.

    Lennart
     
  16. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Sounds like we should stick to 2017 :D
     
  17. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Question:

    I have Parent prefab and then a few childs... (big stone and a few smaller around)... Why is VS only rendering the first one ? (parent)
     
  18. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    110
    Hello. I'm thinking about buying this asset for grass, but I can not find answers to some of the questions:
    Can I easily use shaders created in amplify shader?
    I use voxeland & mapMagic in my game, I need to draw the grass not on the terrain component, but on the mesh. On large stones that mimic rocks (a single mesh). On the mountain and under this mountain (in several layers). Is it possible to do this in "Vegetation Studio"?
    The site has a compatibility guide with mapMagic. Can I use this package directly with Voxeland grass?

    Thx!
     
  19. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    Hi. You can use grass shaders you make with amplify with Vegetation Studio. They need to support instanced rendering. I added a small guide here to add instanced indirect rendering for amplify shaders. It is easy to add, only a include file and a couple of custom #pragmas

    Currently the procedural spawning only works on Unity terrains, but you can paint manually on rocks that has colliders that is on the terrain.

    I am working on mesh terrain support but that is not finished yet. When that is done you could do multiple layers but your "underground" layer would have to be set up as an additional mesh terrain and using a 2nd VegetationSystem component.

    Lennart
     
    blitzvb likes this.
  20. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    Vegetation Studio use single mesh vegetation/rocks. You it can have submeshes and multiple materials but all in the same mesh.

    Using prefabs with multiple child objects like this would also give more drawcalls.
    There is assets that can help you to combine this to one mesh. This will give better speed and less drawcalls.

    Lennart
     
  21. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Aah okay. Thanks! Yes I have one of those.. but I figured I want more different rocks so I unparented them
     
  22. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    But Lennart, what about rocks with lods? How can I use them? I have only seen lod on grass,plants,trees...
     
  23. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    355
    Which Trees and Plants Assets Work Well with Vegetation Studio?

    I’m not sure which vegetation assets “Work Well” with Vegetation Studio and by “Work Well” I mean take advantage of the Vegetation Studio system with its efficiencies etc.

    eeermm not even sure what I’m talking about lol

    I have the Tropical Forest Pack by Baldinoboy and in the beginning I wasn’t getting the performance increase I was hoping for..
    I’ve received the very best support from Lennart (VS) and Baldinoboy messaging back and forth while the shaders were changed and the difference is Dramatic, there is a major performance increase with more vegetation and farther into the distance.
    I think there is even more performance to be had once I’ve figured out how to use VS

    I so was greatful for the support I did a comparison video to show them the difference. I’ll stick it at the bottom:

    So…
    Tropical forest Pack works great with VS and Lennart posted @NatureManufacture asset. Mountain Trees - Dynamic Nature.

    So that’s 2 assets that I know of the “Work Well” are there others? is there a way to check? or a list somewhere?

    Cheers

    Roy

    The Comparison Videos

    *note Although I coppied the project for the comparison they’re not the same. there is always differences plants are not in the same places its just a rough idea.
    PS. I did them at 1080p 60fps which took ages to upload so you see the quality better.

    The test is a 2km Thick Jungle with a 24 day night cycle in 30 seconds that’s a lot of changing Light and shadows aka the Stress Test from Hell.

    The improvement was roughly 25fps (33ms) to 58fps (17ms) and reduced the long load time.
    Before


    After
     
    Goodgulf and boysenberry like this.
  24. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    By change you mean they added the support of instancing?
     
  25. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    355
    I'm not the best guy to answer that I don't enough about shaders and Vegetation studio, fortunately I know some people that do...

    Here are some excerpts from a PM's with Baldinoboy which I think are relevent
    (hope its not bad practice quoting Peraonal Messages)

    Hope that answers your question.


    Roy
     
  26. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    Baldinoboy did some general changes to the latest version, added a new version of the CTI (custom tree importer) shader that is used with the Tropical Forest Pack. I think there was some polygon reduction also.

    The shaders now supports Vegetation Studios Instanced Indirect implementation. In addition to this we added a custom billboard atlas render shader for the CTI shaders matching the trees better.

    Lennart
     
    Dark-Muppeteer and boysenberry like this.
  27. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Hi Lennart
    any news regarding the Unity Bug using Trees / Bushes with more than one material?
    I wanted to use some of Barts Trees of his graveyard pack but right now I only get Pink Shader bugs when using normal or missing branches when using Intanced or Instanced Indirect.
    He send me to you:
    "This is engine bug. If object have more then 1 material it have such issues. Unity soon will fix that. Ask lennart (we coop) he fallow this issue."

    Right now its impossible for me to use other trees than Speedtrees because all have more than 1 material.

    Also did someone get to work the Touch Collider on a Character using 2D Grasses like all Turboscalpeur Grass Assets? They don't want to bend for me.
     
  28. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,394
    Not meaning to advertise on this thread but yes @LennartJohansen & @larsbertram1 updated the shaders to support VS better including support for Instanced Indirect. So The trees can be instanced and all the plants and grass can be instanced indirect. It helped a lot. I did not expect such a performance improvement.
     
    blitzvb likes this.
  29. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    Hi. With instanced multi material trees should work. The issue is instanced indirect. I will do a workaround for this when I have finished mesh terrain.

    Can you send me a PM with some info on the trees that has problems and I will test.

    Lennart
     
  30. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Hello!

    I cant get this Vegetation Mask Line to work where I want to INCLUDE grass..

    I have Remove Grass, -.- Plants -. - Trees ..

    And Inlcude Item 1 and the Vegetation Type 1 .. And on the water grass itself I set to use with Vegetation Type 1 ... What have I forgot?
     
  31. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    I'm working with VS and WorldStreamer, which this forum suggests can be used together even if there isn't much information either here or in the WS forum pages.

    My first question straddles both: with VS, is it best best to stream vegetation connected to Unity terrains or instead to stream the vegetation as a separate WS 'minor element streamer'?

    Thanks for any guidance for those who have worked with both VS and WS!
     
  32. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Screenshot mondaaayy!!! @NatureManufacture Im looking forward next set of trees (leafy ones) :)

    Desktop Screenshot 2018.01.29 - 02.46.53.73.png
     
  33. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,807
    We have them done but unreleased yet. Hmm we have like always 3-4 projects at the same time :/. Tommorow we finish one.
     
    Mark_01, Goodgulf, treshold and 2 others like this.
  34. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    355
  35. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    I will make a section on the website with info and links to assets that is confirmed to work good with Vegetation Studio.
    If anyone see anyone missing there let me know and I will add.
    It is also a good place to add configuration guide links.

    Lennart
     
    Mark_01, blitzvb, nomax5 and 2 others like this.
  36. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Cool! Busy guys :) Notice me when they are out. I will buy them right away. I would really want to swe some dead/fallen trees. And stumps too !
     
  37. KevinCain

    KevinCain

    Joined:
    Nov 8, 2016
    Posts:
    85
    Hello, @LennartJohansen and @NatureManufacture,

    I've been working on combining Vegetation Studio and WorldStreamer and would love a little feedback.

    First, I assume that I need to add an instance of the Vegetation Studio Components (Select the menu ‘Window/Awesome Technologies/Add Vegetation Studio to scene’) to both the WS terrain editor and player scenes. There are two main areas where they seem to be in conflict:
    • The field ‘VegetationStudio/VegetationSystem/Settings/General Settings/Terrain' can only contain a single terrain object, but WS terrain streaming creates a scene assembly from many terrains. How can I connect a VS instance to these multiple terrains?
    • In the WS player scene, as terrains are streamed into the Unity hierarchy at runtime, how can VS connect to these transient terrains in the same ‘VegetationStudio/VegetationSystem/Settings/General Settings/Terrain' field?
    Thanks for any help putting in using VS and WS together. If any tutorials or sample files exist, I'd be interested to try them.
     
    ftejada likes this.
  38. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    355
    Great stuff, thankyou.
     
  39. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    Hi.
    Let me try to explain the setup.

    Each terrain in a unity scene needs its own VegetationSystem object. For a normal setup with multi terrains find the VegetationSystem gameobjec and duplicate it. one copy for each terrain. Then uncheck autoselect terrain and assign 1 terrain to each.

    This you can also do in a world streamer setup. Make sure each terrain is set up with a VegetationSystem object. This can be set as a child of the terrain to make it save and load with the scene.

    Another approach would be to save the VegetationSystem GameObject as a prefab. Then instantiate a copy of this when a new terrain loads and assign the terrain.

    you can connect to the SceneManager.Loadscene event that will notify you when a new scene is loaded.
    Then search the new scene for terrains and instantiate a VegetationSystem object for it.

    Just send me a pm if you need more info.

    Lennart
     
    Mark_01 likes this.
  40. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    51AAC7F9-1F98-41BF-8EE0-121712DECFA8.jpeg AE6C7ED8-1F85-4263-A144-9BD71965BD21.jpeg
    Creating forest template for my game project with the help of VS :) trying to achieve nordic feel :D
     
    mattis89 and boysenberry like this.
  41. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
  42. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    treshold likes this.
  43. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    NatureManufacture’s advanced foliage pack 1 , i like his assets support VS directly. Dragndrop instant gratification
     
    Mark_01 likes this.
  44. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    334
    I would like to get some input on these screenshots.
    The density of vegetation is slightly lower than I would like and the billboard distance is a bit shorter but thanks to VS I can run this in VR.
    Grab 20180131033114 w1920h1080 x-413y89z-247r359.jpg

    Grab 20180131033755 w1920h1080 x-11y57z-356r65.jpg Grab 20180131025210 w1920h1080 x-257y99z-208r320.jpg Grab 20180131033013 w1920h1080 x-415y58z-503r88.jpg Grab 20180131025000 w1920h1080 x-15y56z-337r61.jpg
     
    Mark_01, Goodgulf, blitzvb and 6 others like this.
  45. Jinppa

    Jinppa

    Joined:
    Apr 11, 2016
    Posts:
    6
    Hi,

    First I want to thank you for this literally Awesome asset which I have found to be super useful! :D
    However, I have few problems with it.

    1) I have multiple terrains on my scene and get crashes especially when all of the vegetation systems are active.
    2) Also, why does VS leave an empty border around terrains? Seams between terrains get double wide empty zones without vegetation. I'm using terrain texture rules btw.
    3) I have Microsplat, how do I use the shadow map (mask?) with it?

    Thanks in advance & Best regards,
    Jinppa
     

    Attached Files:

  46. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    1. I will send you a PM. let us try to find out what happens.
    2. I just got the border reported from another user, probably a small bug to fix. I will get on it.
    3. Need to make a small guide for this.

    Add the shadow mask creator component to the same gameobject as the vegetation system component.
    Select the resolution and generate. This will ask you to save a texture in the project folder.

    On microsplat enable the vegetation studio shadow mask module. You can not drag and drop the mask texture to the microsplat component on the terrain.

    Next make sure that there is a directional light assigned on the Render Tab of the Vegetation System component.

    Press play.

    There is also some shadow settings on the microsplat material.

    Lennart
     
  47. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,100
    Oh thats right lol! I actually have that pack :D
     
    Mark_01 likes this.
  48. Baraff

    Baraff

    Joined:
    Aug 16, 2014
    Posts:
    251
    I thought the shadow mask / Microsplat functionality was broken currently and a fix was coming in the next patch release, or is that just on my setup?
     
  49. Jinppa

    Jinppa

    Joined:
    Apr 11, 2016
    Posts:
    6
    Hi,

    The border issue seems to be related to the cell size, since I increased the cell size, the empty areas increased too. The cells next to the border of terrain do not get populated with vegetation but stay empty.

    I generated the shadow masks, enabled the feature on MS shader, but it does nothing, so perhaps Baraff is correct?
     
  50. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,384
    Hi.
    I found the problem with the border spawning. It could happen on terrains with a non 0 y position.

    Find line 251 in UnityTerrainData.cs and do the following change.

    Code (csharp):
    1.  
    2. terrainDataBounds.center = terrainDataBounds.center +  terrainPosition;
    3.  
    4. change that line to.
    5.  
    6. terrainDataBounds.center = terrainDataBounds.center +  new Vector3(terrainPosition.x, 0, terrainPosition.z);
    7.  
    This should fix the spawn on edge issue.

    Lennart
     
    Last edited: Feb 1, 2018
unityunity