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
    Just make sure the culling mask on your camera includes the layer you have the character on.
     
  2. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    Vegetation Studio's Touch React System is awesome :)

     
    Last edited: Feb 23, 2018
    ftejada, Malbers, Lex4art and 4 others like this.
  3. Mlackey

    Mlackey

    Joined:
    Dec 5, 2014
    Posts:
    41
    Hey, having a problem with shadow popping when the trees are out of view. I'm using TENKOKU Dynamic Sky. Performance is good but one thing I noticed was when objects are culled or disabled from view, the shadows vanish until it is within range of being seen and spawned back into the game.

    Is there any workaround to where objects within a certain range are visible to prevent popping? This would be within say a 50 meter distance including behind the character to prevent that?
     
  4. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394

    There is a setting on the render tab. Make sure the directional light (sun) is assigned there. You can also set the range tree shadows are evaluated for visibility.

    Lennart
     
  5. Mlackey

    Mlackey

    Joined:
    Dec 5, 2014
    Posts:
    41
    So, oddly enough with Tenkoku, I followed what you stated and everything was correctly followed already. I tried different culling ranges, different settings, etc. It appears that when I removed the "directional light" object from being followed in Veg. Studio, the shadow popping stopped.

    I'm wondering why there is conflict there but it appears to have solved my issue.

    You might want to add that in your documentation for now that if you have Tennoku Dynamic Sky version 1.1.7b, set the object value under "Sun directional light" in the rendering option to "none" to prevent shadow popping.

    Weird but it works.

    https://imgur.com/dyqJidG
     
    Last edited: Feb 25, 2018
  6. LennartJohansen

    LennartJohansen

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

    Lennart
     
    Mlackey likes this.
  7. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @Lennart.Johanesen,

    Have you thought about doing an integration for this asset with GAIA?
     
  8. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    192
    It already works well with Gaia, from what I have heard Gaia 2 will be fully integrated.
    Have a good day.
     
    Duffer123 likes this.
  9. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Amplify Shader Editor

    Hi. I just finished a custom node for Amplify Shader Editor. It allows you to easy add the Vegetation Studio touch react functionality for grass to custom shaders.

    Here is an example of a small shader using the Touch React node. No extra include files or settings needed.

    Lennart

     
  10. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @LennartJohansen I've sent you a PM, some concerns but also I was wondering that if your adding mesh terrain support for trees and foliage is it possible that you might be able to make the terrain mesh chunks/splits load in efficiently like trees and grasses in the distance? I would love to at least have mountains areas only facing the camera load in the distance.

    Also is there any timeline when the mesh terrain compatibility release date might be?
    Thanks.
     
  11. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. I have a few messages left from the weekend to answer. Will be done soon :)

    The mesh terrain support will allow you to spawn vegetation on meshes, like you do on terrain today.
    It does not handle any of the terrain rendering or management, just uses it as a source for sampling the terrain/mesh topography.

    I hope to the mesh terrain support ready in 2-3 weeks but there is a bit of rewrite needed for finishing the integration, and I do not know if any new issues will show up. It has to be general and even the editor tools for the Vegetation Mask has to use the new interfaces to position the masks on only included terrains/meshes.

    We have another project in development, terrafirma that is a new dynamic terrain mesh, that will also work direct with Vegetation Studio when done. I will post some more progress on this soon...

    Lennart
     
  12. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Thanks for adding this.
     
    blitzvb, LennartJohansen and Rowlan like this.
  13. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    766
    Hi, I've recently bought this asset and was wondering how it's setup with multi tile support. I have 256 tiles so I added a Multi-terrain -> Add additional vegationSystem but nothing seems the by rendering. Looked at the included manual but didn't find any reference towards tile nor multi tile. Do I have to setup 256 individual vegation systems and syncing all settings (a very tremendous task). Any pointers?
     
  14. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    766
    Nobody has ever tested this with manually placed terrain tiles? Just did all the steps over and over again (as explained in the setup video), assigned a VegaterionSystem on the tiles themselves ... alas no vegetation for me :(

    Did some debugging and indeed there is something missing: the active terrain is not selected (because of multiple tiling) so I can get vegetation on the start tile (where the player spawns) when assigning it myself in the studio properties but that's it, only one tile gets populated. Something I'm missing?
     
    Last edited: Feb 27, 2018
  15. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,200
    I got so used to Vegetation Studio that I totally forgot how awesome it is and how much it adds to the atmosphere. I had to create another comparison video in case you don't mind me spamming this :D



    Thank you very much, Lennart!!! You're awesome :)
     
  16. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    a few posts or so he explains this in more detail, many of us , use this with multi tile and even tools like World Streamer, I been using VS since beta with World Streamer, never had to many issues.. even during beta, but you can't just add to one tile and expect , VS to work...

    Edit may be few pages now. but its there.
     
    cygnusprojects likes this.
  17. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. I got your email also. I will answer that, and help you set up.

    Lennart
     
  18. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    766
    Nice to hear it's working and I don't expect it to be easy (hence I was debugging) but at least it should be documented somewhere and not buried within the forums.
     
  19. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    766
    Thank you for getting back to me, Lennart.
     
  20. Lol, that little dragon on the head of the large dragon is hilarious. :D
     
    Rowlan and Candac59 like this.
  21. StormchaserZA

    StormchaserZA

    Joined:
    Nov 13, 2016
    Posts:
    30
    98% Vegetation Studio! (Second Scene) This tool is AWESOME!

     
    ftejada, LittleMike, Mark_01 and 8 others like this.
  22. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I do agree it should be on his docs. Maybe he can add it.
     
  23. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    very nice work if this is your game.
     
    StormchaserZA likes this.
  24. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I agree. After I get mesh terrain support out I will do a better guide, also see if there is any easy setup functions that should be added.

    Lennart
     
    recon0303 likes this.
  25. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Development update

    Hi. I will do an update for Vegetation Studio this week. It is including some API extentions needed for integrations with EasyRoad3D and MapMagic. @raoul
    @Wright
    In addition to this a list of other fixes and improvements.

    Improvements
    • Added VegetationSourceID for Voxeland
    • Added static functions to Add a Vegetation System to a terrain in run-time
    • Added static functions to set up VegetationStudioManager
    • Advanced setting for automatic starting vegetation system when loading a scene or exiting play mode
    • Added ThreadUtility class
    • ShadowMaskCreator can now handle "unlimited" number of vegetation item instances when generating the hadow mask.
    • VegetationMaskLines can now have disabled segments and per segment width
    • Added Amplify node for Touch React system, for 3rd party grass shaders.
    Integrations
    • Added some API changes for integration with MapMagic.
    • Added some additional Vegegetation Mask line options for EasyRoad3D integration.
    Changes
    • Changed Additional mesh max distance from 700 to 1000 meter.
    • Small render loop optimization on computeshaders.
    • PersistentVegetationStorage package can now be set to auto init.
    • Changes for multi threaded access to PersistentVegetationStoragePackage
    • Added static functions on VegetationStudioManager to set sunlight on VegetationSystems
    • Changed default layer for touchbend from 31 to 29 to fix a problem with enviro
    Fixes
    • Fix for error when PersistentVegetationStoragePackage is in memory only
    • Persistent storage component not getting reference to VegetationSystem if created in playmode
    • Fixed small issue with normals on billboards. needs regeneration.
    I will try to submit the update tomorrow.

    Lennart
     
  26. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    FYI just in case you didn't know, VS breaks in 2018 using .NET standard 2. One was a using of something not in 2 but wasn't even being used. The other is DynamicMethod from System.Reflection.Emit. Guessing it's just gone to some other namespace, possibly nuget package now?
     
  27. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Ya looks like they just moved. https://github.com/dotnet/core/issues/139.

    So probably easiest to just have people install those themselves if they need standard 2. Would be nice if Unity added runtime settings for dll's similar to the platform/OS settings so you could just include the nuget dll's in VS.
     
  28. LennartJohansen

    LennartJohansen

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

    you can delete the ListExtention.cs file that uses it. The function was part some beta functionality and is currently not in use. This should fix the System.Reflection.Emit use.

    I have updated for the next version.

    Lennart
     
  29. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    very nice work, Lennart you sir are a machine. Keep up the good work.
     
    LennartJohansen likes this.
  30. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @LennartJohansen , ive noticed there is a wet option on grass now. Is there an api call to alter it at runtime? I Cant find it in the change logs.
     
  31. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    It is not finished yet. I am working on a general API that can pass wetness and snow parameters to shaders that support this. I will add more info when it is done. It is part of the shader integration extention that will allow 3rd party shaders to register with Vegetation Studio. Expose parameters in the API, inject its own wind etc...

    Lennart
     
    nirvanajie, Vondox, Mark_01 and 3 others like this.
  32. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924

    Thank you Lennart for making such an amazing asset!!!
     
    Akshara, Vondox, Goodgulf and 5 others like this.
  33. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,591
  34. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
  35. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @LennartJohansen I'm not sure if its a UI bug or deliberate but if you want to alter masks etc on trees you have to enable billboards in order for the tab to show.
     
  36. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    It was an UI bug. Fixed it now for the next update. Thanks.

    Lennart
     
    recon0303 likes this.
  37. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    I'm setting up a test scene to learn the ins and outs of VS. Looks good on my Mac and in a Mac build, but I did a Windows build and put it on that computer, and there's no vegetation rendered at all, just the terrain and a test cube. 2017.2 on Mac 10.12, then running on Windows 7. Anybody seen this or got a suggestion?
     
  38. briank

    briank

    Joined:
    Mar 25, 2017
    Posts:
    74
    Is there a way to clamp the rotation applied to grass from the touch react system? I find that grass bends through the terrain most of the time, making my characters more like temporary lawn mowers than bipeds walking through a grass field.
     
  39. briank

    briank

    Joined:
    Mar 25, 2017
    Posts:
    74
    Also, is there a way to prevent grass from being placed below other vegetation system 'plants', 'trees', 'objects' etc?
     
  40. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. I will send you a pm.

    Lennart
     
  41. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    The shader does not know of the terrain and can not clamp to terrain height. You need to move the collider up a bit to not intersect with the terrain.

    Lennart
     
  42. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    You can use the obstacle mask creator to make masks of gameobjects with colliders in the terrain. This mask can be applied to the grass vegetation item.
    Have a look here.

    Lennart
     
  43. briank

    briank

    Joined:
    Mar 25, 2017
    Posts:
    74
    I was able to get the obstacle mask working for non-veg objects outside of my scene, so that's a start. Thanks!

    It doesn't seem to work though even if the prefab I'm using for a vegetation system object is in the layer used to bake out the mask and has a proper mesh collider.

    To add onto this, another thing I'm trying to avoid is overlapping ferns ("plants") and tree stumps ("objects"). Is there an option to have the vegetation system check for collisions between different types of plants/objects/etc while generating placements?

    EDIT: Through trial and error, the intersecting plants seems to be by-design. If I treat the ferns as objects, they do not intersect other objects.
     
    Last edited: Mar 4, 2018
  44. vampir26

    vampir26

    Joined:
    Mar 29, 2010
    Posts:
    108
    Hello Lennart

    I just saw your asset and perhaps it's exactly what I'm looking for. I have some small questions... I'm sure you answered them already in the past, but I can't find them.

    1. Most important thing for me is the future compatibility with Unity. My game is in early access since 1 year and lot's of good assets gone deprecated since this time. Mostly of these assets are complex and very hard to keep alive after deprecation (like Ceto Ocean, SSAA System, ...). Vegetation Studio seems also complex and it's risky for me to use it, because if you deprecate it and I'm not able to keep it alive it can ruin my game. Do you need patches every Unity update to keep compatibility or is it stable for the future?
    2. In my game, I use lot of trees and vegetation. Everything is fully interactable (chop down trees). Is it correct, your asset offer full interactable vegetation with better preformance than Unity's system?
    3. Do you think it's difficult to integrate your asset in an existing game? My game is complex and I have thousands of lines of code. Can I use regular functions like Instantiate to create new trees or use your asset complet different approach and I need huge changes?
    Thank you!

    PS: My english is only version 0.1 Beta
     
  45. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    192
    This asset isn't going anywhere,
    That is correct,
    you should be able to take your existing maps and convert it to VS persistent vegetation easily.
     
  46. LennartJohansen

    LennartJohansen

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

    1. While I do not know of any upcomming changes to the Unity API that will require changes I am sure they will show up. I started developing Vegetation Studio on Unity 5.6 and for almost every big release there has been some changes that needs some special treatment. Most of it warnings for events that is in the process of changing names, but also a couple of API changes that needed code changes in order to run.

    This is the same for all assets that contain code.

    2. You can access the vegetation in Vegetation Studio in several ways. There is a real-time masking system where you can mask out areas with polygons or even down to a spesifc tree. Have a look here.

    There is also a API on the persistent storage that allows you to Add and remove spesific vegetation instances.

    To allow the trees to have scripts you can use the RuntimePrefabSpawner or connect to the events of the collider system to add this manually.

    3. I know many people have integrated in existing games with good results but without knowing your game and structure it would only be a guess. You can not use Instantiate to add trees as they do not exist as GameObjects. This is part of the optimization of using instanced rendering. You will need to use the API of the persistent storage to add new instances.

    Lennart
     
  47. vampir26

    vampir26

    Joined:
    Mar 29, 2010
    Posts:
    108
    Thank you, this was very helpful! :)
     
  48. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    I am getting similar, but its not actually completing the build.

    Shader error in 'AwesomeTechnologies/Terrain/TerrainHeatMap': '' : syntax error at line 74 (on vulkan)
    Shader error in 'AwesomeTechnologies/Terrain/TerrainHeatMap': '' : syntax error at line 75 (on vulkan)
    Shader error in 'AwesomeTechnologies/Terrain/TerrainHeatMap': '' : syntax error at line 77 (on vulkan)
    Shader error in 'AwesomeTechnologies/Terrain/TerrainHeatMap': '' : syntax error at line 78 (on vulkan)

     
  49. LennartJohansen

    LennartJohansen

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

    I managed to reproduce the error on 2017.3 and Vulcan API.

    Open TerrainHeatMap.shader and edit.

    Code (csharp):
    1.  
    2. find line 35 and replace
    3. #pragma exclude_renderers gles
    4.  
    5. with
    6.  
    7. #pragma exclude_renderers gles vulkan
    8.  
    The shader is used in editor mode when setting spawn rules.
    This should fix the problem

    Lennart
     
    MostHated likes this.
  50. Alexey1B

    Alexey1B

    Joined:
    May 15, 2017
    Posts:
    26
    Hi, is it planned to add posibilty to paint trees on meshes, not only grass? For now i found only way to edit tree for this, but it snapping to terrain when moving on x,z after moving up, so a bit not easy to place correctly
     
Thread Status:
Not open for further replies.