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
    You can turn this on to make sure the trees does not spawn in the same location as other trees. Trees are spawned from rules and in some cases they could end up in the same location.
    This internal grid in the cells will eliminate this.

    Lennart
     
  2. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Right, so not relevant with baked vegetation, I assume. For run-time spawning: are these colliders active at all times or just during a spawning phase?
     
  3. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    This is not colliders. What we do is have an internal grid in each cell where spawned trees register. Trees always spawn in the same order to make sure results stay the same and new potential trees are tested against this grid as part of the spawning process.

    If you have a combination of baked trees and real-time spawned the baked trees will all register on the grid before any run-time spawned trees are added.

    Lennart
     
    one_one likes this.
  4. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I just wanted to say that all my optimization issues and vegetation dont spawn fast enough when I turn around is GONE.. I installed 2x SSD and a GTX 1060 yesterday (unity have never been this fast and my game feels like AAA).. Anyone with a build FPS counter? I want to see what I have here :) Now I can finnish my game!
     
    LennartJohansen likes this.
  5. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    Hey, i have this problem with the billboard trees.There are some artifacts or black lines over them.Any idea how to solve this?Some grass textures have the same problem

    Thanks in advance

    Captura de pantalla 2018-03-29 18.51.02.png
     
  6. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    try to increase the shadow bias in your directional light
     
  7. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    thanks mattis89 but doesn´t work :(
     
  8. MaxWitsch

    MaxWitsch

    Joined:
    Jul 6, 2015
    Posts:
    114
    Hi,
    I think i found a bug. When you spawn Large-Objects with instanced indirect, it does not generate any colliders for them.
    I tried all types of colliders but... nope.

    In Edit mode it work as it should, and colliders are generated.
     
    mattis89 and llJIMBOBll like this.
  9. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Thanks for catching that. I will make a fix. The instances for instanced indirect is stored in a different way and the colliders system did not get them in the event.

    Lennart
     
    llJIMBOBll likes this.
  10. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. It looks like an issue with the texture repeating. I will have a look at it. As a possible workaround try to change the billboard mode to 3D. That will sample from the top also and probably not end out with the same uv wrap issue. You can find this on the billboard setting on each vegetation item. Rendering speed will be the same.

    Lennart
     
  11. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    Changing to 3d didn´t do nothing.I played a bit with the alpha cut and is a bit better, but still is visible.
     
  12. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Hello.

    This asset appears to be the perfect one for vegetation, but I have 2 questions. And I would be glad if you answer them.
    1) Is there already a built-in script or feature that makes it possible for the asset to support World Streamer? If no, would you please provide us an example to make WorldStreamer work with this asset?.
    2) Is there a feature to limit painting a terrain based on terrain heightmap and splat map?.
    Best.
     
  13. LennartJohansen

    LennartJohansen

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

    1. Depending a bit on how you use world streamer you do this several ways.
    • You duplicate the vegetationsystem object, one for each terrain and move it as a child of each terrain. Then assign the terrain on the component. The Vegetation System object will then load with the terrain from the scene and enable.
    • Another option is to assign the vegetation system object/component run-time. this can work if you only want procedural vegetation. Vegetation masks for roads and houses will still work. You then hook on to the https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadScene.html Event and search for any terrain in the new scene. Then instantiate a vegetationSystem object you made a prefab for and assign the terrain
    2. The procedural spawning of vegetation can use terrain steepness, height and splatmaps as rules for the spawning.
    For manual painting you can also use the height and steepness rules. Just enable the checkbox as seen on the image below. It will then use the steepness and height rules set on the vegetation item.

    Lennart

     
    imDanOush likes this.
  14. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hello! I have a question. I have to fool unitys resource file limit so is it possible to load vegetation system game object from another scene? Its so hard to explain but maybe you are familiar with this! I split up my scene on many scenes... Houses is one scene, terrain is one, vegetation is one..
     
    llJIMBOBll likes this.
  15. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    From Asset Bundles would be awesome, or a way to load materials from bundles.
     
    mattis89 likes this.
  16. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. I think this should work good. Just add the vegetation system to a different scene and load the scene additive.

    This should also work. Save the vegetation models, textures and materials to a asset bundle with the vegetation package. The vegetation package holds a reference to the models. Then load the package and assign to a vegetation system.

    Lennart
     
    mattis89 and llJIMBOBll like this.
  17. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    I'm having this same issue, Lennart mentioned texture repeating so I manually changed the billboard textures' wrap mode from Repeat to Clamp and this seemed to fix the artifacts, but it also causes some of my billboards to disappear when viewing from certain angles.
     
  18. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I can try to fix the missing billboards if you set it to clamp.

    Lennart
     
  19. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    hey lennart =)

    IndexOutOfRangeException: Array index is out of range.
    AwesomeTechnologies.VegetationSystem.UpdateVegetationInstanceLists () (at Assets/AwesomeTechnologies/VegetationStudio/VegetationSystem/VegetationSystem.cs:1325)
    AwesomeTechnologies.VegetationSystem.ExecuteRenderVegetation (Boolean forceRender) (at Assets/AwesomeTechnologies/VegetationStudio/VegetationSystem/VegetationSystem.cs:1979)
    AwesomeTechnologies.VegetationSystem.Update () (at Assets/AwesomeTechnologies/VegetationStudio/VegetationSystem/VegetationSystem.cs:1876)


    that happend when I added angrymesh rocks..
     
  20. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi.
    I will send you a pm to look at what happens.

    Lennart
     
  21. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    i change to clamp,the artifacts disappear,(grass too) but the same problem,some billboards appear and disappear depending the view.Is easy to fix the billboards?
     
  22. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Ah I encountered the same thing yesterday, I sent a PM bout it. When will you have a fix?
     
  23. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    The fix is done. It will be on the next update. I will try to submit the next couple of days.

    Lennart
     
    llJIMBOBll, Mark_01 and mattis89 like this.
  24. GingerDr73

    GingerDr73

    Joined:
    Sep 25, 2013
    Posts:
    21
    Hi,
    I just got the bug the mattis89 did, glad to hear a fix is on the way. Before I got this error though encountered the following error just in builds. Running 2017.1

    Platform assembly: F:\CloudBackup\Projects\Uni Sierra 19 - Sem 7\Uni ExpGameDes\Builds\59\10\ArtySwirlyColourful_Data\Managed\Mono.Security.dll (this message is harmless)
    ReflectionTypeLoadException: The classes in the module cannot be loaded.
    at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
    at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.Vegetation.TextureMaskTypeManager.<InitTextureMaskTypes>m__0 (System.Reflection.Assembly x) [0x00000] in <filename unknown>:0
    at System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator12`2[System.Reflection.Assembly,System.Type].MoveNext () [0x00000] in <filename unknown>:0
    at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[System.Type].MoveNext () [0x00000] in <filename unknown>:0
    at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[System.Type,System.Object].MoveNext () [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.Vegetation.TextureMaskTypeManager.InitTextureMaskTypes () [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.Vegetation.TextureMaskTypeManager..ctor () [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.Vegetation.TextureMaskTypeManager.ValidateInstance () [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.Vegetation.TextureMaskTypeManager.GetTypeFromMaskTypeID (System.String textureMaskTypeID) [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.VegetationSystem.RefreshTextureMasks () [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.VegetationSystem.SetVegetationPackage (Int32 index, Boolean resetCullingGroup) [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.VegetationSystem.SetupVegetationSystem () [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.VegetationSystem.Enable () [0x00000] in <filename unknown>:0
    at AwesomeTechnologies.VegetationSystem.OnEnable () [0x00000] in <filename unknown>:0
    (Filename: Line: -1)

    I saw the references to texture masks - I'm using a couple of those for guiding the grass, dunno if that helps at all. Any assistance would be greatly appreciated.
     
  25. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. Can you send me a pm with some more info about your setup? Windows/mac? what target platform. .net target version etc. The texture mask classes are loaded with reflection, to allow for 3rd party mask format. seems related to that.

    Lennart

    Edit: Setting the Api compatibility level from .Net 2.0 Subset to .Net 2.0 fixes this compile issue with reflection.
     
    Last edited: Apr 3, 2018
    GingerDr73 likes this.
  26. Tinder-Red

    Tinder-Red

    Joined:
    Dec 2, 2017
    Posts:
    19
    hello everyone.
    I just install the Vegetation Studio package, and i don't see any vegetation studio in the Window menu.
    I have Unity 2017.4.0f1.

    Thx for any answer.
     
  27. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Sent you a pm.

    Edit: It was a conflict with another asset having a Tools class without a namespace hiding the UnityEditor.tools class. Added a workaround for the next update.

    Lennart
     
    Last edited: Apr 3, 2018
  28. LennartJohansen

    LennartJohansen

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

    Hi. I am preparing an update. I will try to submit tomorrow or the day after. Still trying to get in some more changes.

    Lennart

    Improvements
    • Speedtree vertex LODFade is now working on Unity 2018.1+
    • Added LightProbeUtility to extract lighting components from SphericalHarmonicsL2
    • Trees and objects can now be painted on the peristent storage.
    • Max radius on painting tool increased.
    • Max sample distance on painting tool increased
    • Grass meshes generated with the GrassPatchGenerator now supports the wind in the HD.Lit shader of the HD SRP
    • Added single and Quadoption for billboard atlas (1x1 and 4x1)
    • Added a Gaia extention to easy add Vegetation Studio to scenes with Gaia terrain.
    Changes
    • Increased perlin noise max value to 500
    Fixes
    • Fixed error when trying to paint with an empty vegetation package.
    • Fix for washed out billboards in Linear mode on 2018.1
    • Fixed material refresh when changing some spawn rules not syncing accross multiple vegetation systems
    • Fix for computeshader link error on OpenGL on Windows.
    • Added fix for curve labels in wrong color on light skin.
    • Colliders now work for instanced indirect rendered vegetation items
    • Fix for error in Amplify Editor node for touch bend
    • Added workaround for another asset hiding the UnityEngine.Tools class
     
    FargleBargle, blitzvb, spso and 2 others like this.
  29. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @LennartJohansen . Has the colliders for Instanced indirect trees been fixed for the latest update? Also what would suggest is the best way to have a area around each tree spawned be blank (i.e. no grass directly around trees or just a specific type)
     
  30. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes. the colliders for instanced indirect included. It is there in the fix list...

    One option to is to make a exclude texture mask for the grass. Add colliders to the trees with the radius you wan to remove grass. Then bake them to the scene.

    Use the Obstacle Mask creator to make an exclude mask from the tree colliders and assign that to the grass vegetation items.

    When the mask is made you can remove the baked colliders from the scene.

    Lennart
     
    AndyNeoman and Mark_01 like this.
  31. LennartJohansen

    LennartJohansen

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

    Hi. We added a new section to the Vegetation Studio website today.
    There is now a guide to assets that works good with Vegetation Studio. For those with extra integration that is also listed there with links to setup guides, videos etc.

    We will continue to update this as new assts do integration or are tested. If you have any asset that should be on the list. Let me know.

    Have a look here

    Lennart
     
    ftejada, Akshara, Goodgulf and 8 others like this.
  32. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    Looks great!
     
  33. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Thanks.
     
  34. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    look up Angrymesh rock pack on assetstire, he says he made it compatible...

    question : can I spawn with gena and use rules and whatever and have VS as muscle?
     
  35. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. The angry mesh rocks is there on the rocks page.

    You can spawn with GeNa and use the Scene Vegetation Importer to get the instances in the persistent storage.
    I know @AdamGoodrich is working on a direct integration for GeNa but I do not think it is ready yet.

    Lennart
     
    AdamGoodrich, Mark_01 and mattis89 like this.
  36. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    allrighty :)
     
  37. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    Hey,

    I am using VS and unistorm, and have 2 windzones,one for normal weather and other for stormy weather.What should be the best way to make this work with VS?

    thanks
     
  38. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. You will have to switch between the windzones in code.
    The windZone is exposed on the VegetationSystem component.

    Code (csharp):
    1.  
    2. public WindZone SelectedWindZone;
    3.  
    Lennart
     
    AndyNeoman likes this.
  39. LennartJohansen

    LennartJohansen

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

    Hi. I have updated the vegetation masks. They now have an optional ground layer setting that can be used in additon to Unity Terrains to get the mask points to snap to the terrain. This is a part needed for mesh terrain support.

    Lennart

     
  40. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Hey everyone :) I will be putting a new GeNa out soon - the integration is essentially done, and it works great with VS.
     
  41. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    When Adam?

    I have quite a longway with me vegetation. First I set my prefabs up with AFS shader so I get nice lightnibg and wind and touch bending... Then I spawn them with Gena because somehow it spawns better on my terrain and dosent leave any empty squares, and then render it all with VS , I mean vegetation is important :)

    I looked at far cry 5 yesterday.. I started crying it looked to good!!! Damn you cry engine!!!
     
  42. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Since farcry 2 they are using their own Dunia Engine.
     
  43. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Cannot wait!
     
  44. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    aah okay.. looks cool
     
  45. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Power of integration

     
    Goodgulf likes this.
  46. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Ok so I know this isn't an issue with VS itself, but given that I doubt I'll get much of an answer from the water asset vendor thought I'd see if someone here might recognize what the issue is.

    I'm seeing artifacts like below the white vertical lines. These are instanced direct mesh trees using standard shader plus VS_indirect.cginc (same issue with just the standard shader also FYI). This is linear/deferred. Unity 2018 although it happens on 2017 also.

    I tried messing with everything I could think of, and the only thing that made an impact was TAA anti aliasing, which reduced most of the artifact. Although that's not really a viable solution.

    upload_2018-4-6_13-28-43.png
     
  47. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
    Aim is to deliver this in the next few weeks - have a lot of cool things that we have been working on all coming together at once - some awesome new content and configuration options in Gaia, a cool new path creator in Pegasus, the VS integration updates with GeNa, and of course our new release of CTS from the other day :)

    http://www.procedural-worlds.com/blog/glitters-not-gold-new-cts-release-v1-6/
     
    boysenberry, Mark_01 and mattis89 like this.
  48. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    awesome :)
     
  49. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    114
    Hello !

    As it is my first post, I will start by saying it's a great tool, I didn't even know I could get theses results... so thank you ! Pretty impressed by the fact you're already working with 2018.1 super cool improvements :)

    I am playing with MapMagic, CTS, and Vegetation Studio, on Unity 2017.3.1.f1 and I have theses errors :

    GarbageCollector disposing of ComputeBuffer allocated in -\AwesomeTechnologies\VegetationStudio\VegetationSystem\VegetationItemModelInfo.cs at line 363 (366, 369, 372, 378, 388, 398). Please use ComputeBuffer.Release() or .Dispose() to manually release the buffer.
    UnityEngine.ComputeBuffer:Finalize()​


    Culling group was not disposed. You have to call Dispose explicitly from the main thread. This will likely result in a crash.
    UnityEngine.CullingGroup:Finalize()​

    Did I do something the wrong way ?
     
    ajaxlex likes this.
  50. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    The VegetationModelInfo class holds a arguments buffer for each submesh of a model. Used for instanced rendering.
    It looks like it does not get released. Are you using the new MapMagic output node?

    Could you send me a pm with your setup?

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