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
    I did the changes, will be in the next beta.

    Lennart
     
  2. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    Hi, in my game I have 17 Level Scenes and 1 persistent Master Scene where camera+UI are. Should I have an instance of Vegetation Studio in each scene and camera auto-assigns, what is the standard approach?? Every Level scene contains only 1 terrain
     
  3. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I would have a Vegetation Studio setup in each scene. They can all share vegetation packages if wanted for updating rules only one place.

    Lennart
     
    VictorKs likes this.
  4. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    Thanks a lot! I was about to do this too but wanted to be sure.
     
  5. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Not much to go on but I see this error some times.

    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. AwesomeTechnologies.Billboards.BillboardSystem.GenerateBillboardCell (AwesomeTechnologies.Billboards.BillboardCell billboardCell) (at Assets/AwesomeTechnologies/VegetationStudio/BillboardSystem/BillboardSystem.cs:804)
    4. AwesomeTechnologies.Billboards.BillboardSystem.PreloadPotentialBillboardCells () (at Assets/AwesomeTechnologies/VegetationStudio/BillboardSystem/BillboardSystem.cs:333)
    5. AwesomeTechnologies.Billboards.BillboardSystem.SetupBillboards () (at Assets/AwesomeTechnologies/VegetationStudio/BillboardSystem/BillboardSystem.cs:364)
    6. AwesomeTechnologies.Billboards.BillboardSystem.CreateBillboards () (at Assets/AwesomeTechnologies/VegetationStudio/BillboardSystem/BillboardSystem.cs:354)
    7. AwesomeTechnologies.Billboards.BillboardSystem.Init () (at Assets/AwesomeTechnologies/VegetationStudio/BillboardSystem/BillboardSystem.cs:192)
    8. AwesomeTechnologies.Billboards.BillboardSystem.OnEnable () (at Assets/AwesomeTechnologies/VegetationStudio/BillboardSystem/BillboardSystem.cs:78)
    9. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    10.  
     
  6. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    After the Run Game, can I spawn some new trees at some time?
     
  7. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. If you change the spawing rules or seed and clear the cache, vegetation will respawn.
    Or you can add or remove trees with the persistent storage API

    Lennart
     
  8. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Thanks. I will look at it.

    Lennart
     
  9. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Beta update.

    Hi. There is a new Vegetation Studio Pro beta available for download.

    Lennart
     
  10. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    How can I spawn different trees/grass on the different parts of my terrain? If there is a way, is there a guide that explains it in detail?
     
  11. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Also I noticed today that wind is only working in scene view.
    Doesn't work on camera during and non during runtime.
    Only have one camera on this scene.
     
  12. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Hi @LennartJohansen, just wanted to say thanks for making out of Vegetation Studio Pro such a big improvement when dealing with multi tile terrains. Currently testing the latest beta and it brings a smile on my face because of the ease of use. Nice work!
     
    LennartJohansen and Vagabond_ like this.
  13. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
  14. LennartJohansen

    LennartJohansen

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

    The new 2018.3 terrain changes is about making a faster dynamic terrain mesh. It lowers the CPU use and reduces the drawcalls with the new instanced render mode. There is no new changes that affect vegetation or tree rendering.

    Vegetation Studio replaces the tree and detail system of the terrain but uses unitys terrain mesh. This way the 2018.3 will benefit you when using Vegetation Studio also.

    These changes are great and does not reduce any benefits of using Vegetation Studio for rendering.

    Lennart
     
    DeepShader likes this.
  15. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Could you send me a pm with some info on the scene. What trees and shaders etc. All shaders have their own wind implementation and do work a bit different.

    Lennart
     
  16. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Depending on your workflow you can use terrain texture rules, make custom texture masks that defines areas you want to spawn.

    The new Vegetation Studio Pro beta also have a dedicated biome system for this. To define areas that each have a separate vegetation package.

    Lennart
     
  17. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    Thank you :)

    Any timeframe for the Pro-Version?

    And if I buy the Standard version right now, can I upgrade to Pro on the AssetStore with a discount or will I've to buy it on your website to get a discount for upgrading to Pro?
     
  18. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. Vegetation Studio Pro will be available on the asset store in the beginning of November. Vegetation Studio users can get access to the beta now. It is stable and getting close to release state.

    There will be an upgrade path for Vegetation Studio users on the asset store. You only pay the difference in price. There is no extra cost of buying Vegetation Studio now and upgrading compared to getting Vegetation Studio Pro direct later.

    Lennart
     
    dsilverthorn likes this.
  19. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Signed up for it! By using the beta, does that essentially mean we are now upgraded to pro and can keep using as is for the foreseeable future?
     
  20. DeepShader

    DeepShader

    Joined:
    May 29, 2009
    Posts:
    682
    That sounds great! Thank you :)
     
  21. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    The beta downloads on the website will be updated and available until I submit Vegetation Studio Pro to Asset Store in a couple of weeks. All updates after that will be on the asset store only.

    If you want to continue using Vegetation Studio Pro after the beta period you can upgrade from standard Vegetation Studio to Pro on Asset Store.

    Lennart
     
  22. INSANE_BR

    INSANE_BR

    Joined:
    Sep 10, 2009
    Posts:
    142
    Hi @LennardJohansen, I have relatively large Vegetation Mask Area (4000x4000).
    Whenever I try to move a node it lags and freezes for about 10 seconds. If I select the mask, change the inspector to debug view, and change the nodes position adjusting the vector3 data, it updates instantly without any lag. Are you aware of this issue? I hope it helps you to nail this.
    Also: These systems you created are top notch! Thanks for sharing it with us! :)
     
  23. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    When you change in debug mode the event to clear the cache for the changed are is not called and no vegetation would change before you enter playmode. But I see the need for something for huge masks. I will add a disable updates setting that allows you to move the masks without respawning for every node change.

    Lennart
     
  24. INSANE_BR

    INSANE_BR

    Joined:
    Sep 10, 2009
    Posts:
    142
    Hey @LennardJohansen thanks for your reply!
    In another topic, I noticed the vegetation painting and precision painting doesn't take into account the vegetation scale. Am I doing something wrong or is there a fundamental reason for the precision painting not use vegetation scale?



    Edit 1:
    I think I found out why.. When you paint using these tools, it samples the simple vegetation scale, however, I'm using the advenced vegetation scale to make some of them not only bigger, but also wider.

    Edit 1 update: I've temporarily added to my project a conditional in PersistentVegetationStorageEditor.cs (AddVegetaitonItem method ~ line 1130) where I check vegetationItemInfo.VegetationScaleType, and adds a proper lerp between MinVectorScale and MaxVectorScale. Similar to VegetationCell.cs:903

    Edit 2:
    Also found out that the position is not being randomized when vegetations "randomize distribution" toggle is ticked.

    Edit 2 update: I've also added to my source file a conditional, checking vegetationItemInfo.RandomizePosition, and adding a random value using the same logic used in VegetationCell.cs:608.

    Edit3: And now it works as excepted
     
    Last edited: Oct 19, 2018
  25. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Biome packages

    Hi. Here is a small preview of the first of a series of pre configured biomes/vegetation packages assets we are making together with NatureManufacture. It works with the new biome system in Vegetation Studio Pro.

     
  26. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
    looks great .. is it rendered in HDRP ?

    looking forward this pack and the ones to come :)
     
  27. DrHeinous

    DrHeinous

    Joined:
    Jun 25, 2013
    Posts:
    19
    Hi Lennart,

    First, VegetationStudio is awesome. It works, and works well. Anyway, here's my problem:

    I have the vegetation in my scene baked into persistent storage. I want to hide trees/objects when they are between my player object and the camera. I can identify them easily via raycast with the collider system. However I can't identify a way to hide a particular instance. If the items weren't persistent I could mask them easily enough (VegetationItemInstanceInfo has a handy MaskVegetationItem())... but since they are persistent items masking doesn't work on them.

    Is there some simple way to temporarily not render a single instance?
     
  28. marcmantraunity

    marcmantraunity

    Joined:
    May 31, 2014
    Posts:
    21
    Hi Lennart and Community,

    We are working on our first game and we have the situation where we a more or less, open world. 9 terrains as one where we have, assets and many Vegetation Studio. Now, I'm trying to optimize the scene and I customize the shaders to use all of them as Instance Indirect, it goes great and the culling from vegetation is amazing.
    With all this, I'm searching on the profiler and I can see we have many mseg invested on the Vegetation System scripts. Is there any way to optimize it? I try to bake the assets and it's worse.

    I attach an image to show which is the challenge usign a simple scene with one terrain and one tree with 2 shaders (bark and foliage).

    Thanks in advance
     

    Attached Files:

  29. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Hello Lennart,

    upon changing vegetation distance at runtime, for a few frames all vegetation items disappear. And that's a problem for me as I would really like to change distance i.e. while exiting a meadow and entering the forest to gain some frames. Can this be done seamlessly some other way than changing SetVegetationDistance? If not can this issue be addressed in future updates?
     
  30. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Can you tell us what types of Biome assets the NM package will include?
     
  31. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    This is standard Unity rendering. The SRPs are still in early preview. To much changes every release. I will begin to look at it when it gets a bit more stable.

    Lennart
     
  32. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. Do you mind joining the Discord server and send me a message there? It is much easier to debug with a text chat.
    The link is in my signature.

    Lennart
     
  33. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    How it reacts depends a bit on when in the frame you set the distance. Internally there is cullingGroup used to to the cell culling used for loading. When you set a new distance it has to be re-initialized with new distanced bands distances to load the correct vegetation for the cells.

    If you do this late in the frame after the rendering is done you should be able to do this with no "blinking"
    The vegetation system has a scriptorder of 100 and render in LateUpdate.

    Set a scriptorder higher than this on your code and set the new distance in LateUpdate. I think that should work. If not, send me a message or talk to me on discord and we look at it.

    Lennart
     
    DrInternet likes this.
  34. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    The first biome package will be the "Meadow Biome" it will contain 2 configured vegetation packages for a meadow and a light forest area as seen in the video. They have grass, plants, rocks, trees and terrain textures.

    We will post a bit more detailed info in a few days.

    Lennart
     
    mons00n, Rowlan and SickaGames1 like this.
  35. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
    nice .. the shadows are very soft
     
  36. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I have this weird dark issue that pops up. It used to do it every 10 run times in the editor but now its doing it always. Its not that cliff shadowing the land. It tints the grass in a weird color too only if I point my character/camera in that direction


    https://i.postimg.cc/7Y4CP77q/wierd-darkness.png
     
  37. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I have wind during Run time now. idk what was going on before.
     
  38. StevanJay

    StevanJay

    Joined:
    Feb 5, 2014
    Posts:
    80
    Hello! I want to change the seed for the Perlin noise on my vegetation, but neither the global random vegetation seed setting nor the position seed setting seem to have any effect on the Perlin - is there a way to change that Perlin pattern?
     
  39. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. Perlin noise itsef does not have a seed value. Changing the pattern is done by offsetting the sample value.
    There is a vector2 Offset value exposed on the perlin noise rule you can change.

    Lennart

     
  40. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Got your message also.

    Lennart
     
  41. StevanJay

    StevanJay

    Joined:
    Feb 5, 2014
    Posts:
    80
    Ahhh, thanks, I think I see now... So the Perlin noise is a pre-calculated texture already, and If I wanted variety that goes beyond the offset and scale options available (that scale and offset that fixed texture), I would define my own Perlin function, and then use that to overwrite the existing texture, right?
     
  42. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Perlin is calculated, not a texture. But perlin noise only takes a vector2. in this case position that is modified by scale and offset.

    https://docs.unity3d.com/ScriptReference/Mathf.PerlinNoise.html

    Lennart
     
  43. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Can't wait for the new Pro to go live with the new NM packages!
     
  44. StevanJay

    StevanJay

    Joined:
    Feb 5, 2014
    Posts:
    80
  45. INSANE_BR

    INSANE_BR

    Joined:
    Sep 10, 2009
    Posts:
    142
    @LennartJohansen is there a private repository where I can submit pull requests?
    I've added some features here and I think a pull request would be a good way to show you the implementation so you can decide if it makes sense to add them to your pack.
     
  46. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. I do have a git repo. Do you mind joining the discord server and send me a message there? Easier with a text chat.

    Lennart
     
  47. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
    Is it still possible to get a copy of the Beta for VSPro?
     
  48. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes. Just sign up on the website

    Lennart
     
    dsilverthorn likes this.
  49. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    839
  50. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Next week VS Pro releases?
     
Thread Status:
Not open for further replies.