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
    Hi.
    I did some testing with the ForestVision trees now. They seemed to work good with Vegetation Studio. Just drag and drop the trees to the inspector. I used sample trees from the Optimized folder in ForestVision.

    Lennart
     
  2. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Ultimate Survival harvesting

    Hi. I got this script to share with you from one of the Vegetation Studio users.
    It is a MinableManager where you can add a reference to the ColliderSystem component. It will then add the scripts needed to harvest in Ultimate Survival.

    Code (csharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using AwesomeTechnologies;
    6. using AwesomeTechnologies.Colliders;
    7. using AwesomeTechnologies.Vegetation;
    8. using UltimateSurvival;
    9.  
    10. public class MinableManager : MonoBehaviour {
    11.     MineableObject mObject;
    12.     public ColliderSystem colliderSystem;
    13.  
    14.     [Header("Tree")]
    15.     public LootItem[] treeLoot;
    16.     public FPTool.ToolPurpose treeTool;
    17.  
    18.     [Header("Rocks")]
    19.     public LootItem[] rockLoot;
    20.     public FPTool.ToolPurpose rockTool;
    21.  
    22.     void Start()
    23.     {
    24.         colliderSystem.OnCreateColliderDelegate += OnCreateCollider;
    25.     }
    26.  
    27.     void OnCreateCollider(Collider collider)
    28.     {
    29.         VegetationItemInstanceInfo vegetationItemInstanceInfo =
    30.             collider.gameObject.GetComponent<VegetationItemInstanceInfo>();
    31.      
    32.         //Tree
    33.         if(vegetationItemInstanceInfo.VegetationType == VegetationType.Tree)
    34.         {
    35.             collider.gameObject.AddComponent<MineableObject>();
    36.             mObject = collider.GetComponent<MineableObject>();
    37.             mObject.AddLoot(treeLoot);
    38.             mObject.AddRequiredTool(treeTool);
    39.         }
    40.  
    41.         //Rock
    42.         //Replace The Ids with the Ids of your own rocks.
    43.         /*
    44.             if (vegetationItemInstanceInfo.VegetationItemID == "1dff56a0-feee-476c-ac1f-43cd761109eb" || vegetationItemInstanceInfo.VegetationItemID == "0fc089c3-95d6-4155-835e-a71343e440d1")
    45.             {
    46.                 collider.gameObject.AddComponent<MineableObject>();
    47.                 mObject = collider.GetComponent<MineableObject>();
    48.                 mObject.AddLoot(rockLoot);
    49.                 mObject.AddRequiredTool(rockTool);
    50.             }
    51.         */
    52.     }
    53. }
    54.  
     
  3. AnneDraaisma

    AnneDraaisma

    Joined:
    Jul 14, 2014
    Posts:
    14
    Hey, I am considering purchasing VS and I am wondering if the following is possible.

    I create splat maps in an external editor. I would like to use one set for texturing, but a different set just for vegetation placement.

    Can I load splat maps in VS, which are not used to texture the terrain?
     
  4. LennartJohansen

    LennartJohansen

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

    Yes, that works good. What you do is add the extra splatmap as a texture mask. This way you can select it as an include or exclude rule on each VegetationItem.

    If you add it as a RGBA texture mask, you can select the channel on each item.



    See here for some more info about masks.

    Lennart
     
  5. AnneDraaisma

    AnneDraaisma

    Joined:
    Jul 14, 2014
    Posts:
    14
    Ah great. Thanks for the quick reply!
     
  6. Kathar3D

    Kathar3D

    Joined:
    Aug 24, 2014
    Posts:
    8
    Sorry if this has been covered before, searched the thread but couldn't see it mentioned - basically I seem to have an issue where there's an odd version of my grass prefab floating at the centre of each 'cell'. It appears crazy bright and is really distracting. Don't think I've got any odd settings enabled, basically kept most at default. I can grab a screengrab if it needed, but appreciate any help, ta!
     
  7. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. My guess is that the grass shader did not compile properly. Did you move the AwesomeTechnologies folder? Find the folder with the AGrass.shader and the ATrees.shader and right click/reimport. This will probably fix it. Unity does not like moved folders with shaders that have include files.

    If not see if there is an error message on the shader.

    Lennart
     
  8. GF2012

    GF2012

    Joined:
    Oct 28, 2017
    Posts:
    1
    Is there a way to "bake" the procedurally created vegetation into Unity terrain compatible vegetation in case I want to use VS only to "design" my vegetation and have everything else done by a different product?
     
  9. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. There is a utility component called the SceneVegetationBaker. You can add it to the same GameObject as the VegetationSystem component and bake all vegetation to gameobjects in the scene.

    Have a look here for more info.



    Lennart
     
    GF2012 likes this.
  10. Kathar3D

    Kathar3D

    Joined:
    Aug 24, 2014
    Posts:
    8
    Thanks for the help! I haven't moved any of the folders, so they're all where they should be by default. I tried reimporting those you mentioned anyway, but no luck. I can't see any specific errors from the shaders, however I've just noticed in the VegetationSystem that the grass has a warning, stating Instanced Indirect only works with the custom grass shader. So when I change this option to Instanced it works fine, and the dodgy/bright grass elements disappear. Confused as to why it's not liking the Instanced Indirect option though, I created the grass using the inbuilt grass generator, and appears to be using the correct shader (AwesomeTechnologies/Grass/Grass), which looks fine when I try to edit its parameters etc. I'll have a bit more of a play and see if I can figure out what's up with it - thanks for your help!
     
  11. mattis89

    mattis89

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

    So I bought this, havent yet spawned anything.. When I set up the package and choose 8 texture based and drag my terrain to the slot.. All splatmaps except 1 (sand) that I added to last didnt show.. it turned black? .. Using gaia & cts.. Works fine before VS is "awake"
     
  12. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    841
    Lennart,

    Thanks for doing that.

    I've got to do some testing with VS and I am LOVING IT!!!

    You have done a great job and done a great service for all of us!

    Happy New Year!

    David
     
    Last edited: Dec 29, 2017
  13. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    What Unity version are you using? Forward or deferred rendering?

    Lennart
     
  14. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Sound like some kind of sync issue with CTS. Could you try to make a VegetationPackage with no textures. You can still use CTS and 8 textures. It just tells Vegetation Studio to not try to manage terrain textures.

    Lennart
     
  15. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Thanks. Great you like it. Happy New Year for you also.
     
    dsilverthorn likes this.
  16. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92
    Hi,

    I got some serious lag when using VS. (When moving around in the scene) Any idea what can cause it? I'm using Unity 5.6.3p2
    upload_2017-12-29_16-37-47.png

    I have the vegetation distance on the lowest distance, there's less tris rendered now than I had with Unity grass system.

    Also another thing, I'm trying to use LOD's on some objects. Some have been made with the VS grass maker thing, but it never switches to a lower LOD? This might have to do with the grass distance being set to 10, but I really don't need the extra details at a high distance.
    The LOD distance slider makes no difference. It says "Active LOD bias is 2.00. Distances are adjusted accordingly", what does this mean?

    Thanks!

    (Except those issues above, this is an amazing plugin! Really pushing Unity to the next level)
     
  17. LennartJohansen

    LennartJohansen

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

    The LOD Bias is a LOD setting Unity has in Quality settings. It allows you to adjust a factor for the distance where the LODs should switch. This way a build started with the fastest profile will change to lower LODS faster and render less polygons.

    I will send you a PM for some info of the LOD setup and profiler.
     
  18. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I got it working ,and this IS AWESOME! :D

    Im using texture details (grass,flowers) They are really bright tough..Is it normal? Or is anything really wrong?...Or is it just some adjustments on the "Tint" settings?

    If I want to use mesh trees (those that dosent use billboard) do you recommend to reduce the polygons and use lod level?

    EDIT: Is there anything more to this VS than just drag them there and BAM they appear on your terrain? some optimizations?
     
  19. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Do you use aquas?

    If so there are a couple of steps you need to do for it to work properly. It is posted in this tread somewhere. Does it run normally when you disable compute shaders?
     
  20. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    If you can CC me, I would appreciate.

    For aquas, it’s only if we use the compute shader in VS that there is a problem right?

    Personally when I turn it on, it goes infinite FPS and I have to kill unity.
     
  21. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I will do a LOD setting post tomorrow. Explain a bit better how it is configured.
     
  22. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Is there anyway I can change the tint on stones etc? .. What happends if I change textures on my terrain when I use terrain splat rules? (Using cts & Gaia too)

    @LennartJohansen
     
  23. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    hey,

    In order to learn VS, Scene composition and cinemachine in unity, I just did a scene that includes all of that... here the result:



    NB1 : just the fact to record make me loose 20 fps :/
    NB2 : I have some very high poly assets ... that I should have decimate it but I am lazy ;)

    I am unity noob and I am an engineer ... so don't except something incredible ;) but please if you have feedback or suggestion especially on unity stuff like how to optimize even further this whole scene or for the visual how to make it more aesthetic.

    I am using those assets :

    - VS : obviously :)
    - VS terrain splat mapping : It's really cool.
    - Aquas : Almost 50% of of my render time is due to that water reflection ... if anyone have an idea how to reduce that? and it's jitterring :/
    - Megascan rocks and grass (Imported by the VS generator)
    - Rusty Grass
    - Speedtree
    - Amplify Texture 2 for those 8k rocks and logs.
    - CTS : for my real project I am using microsplat but for a show off like that, I prefer CTS blending. Compared to Microsplat I am loosing about 15 fps :/
    - Post processing stack and beautify
    - Mixamo animation along with uMotion and Cinemachine
    - Music : yeah I know :/

    For VS when I am enabling compute shader, it goes haywire and I got at best 1 FPS. Cf screenshots. GPU-compute.PNG aquas.PNG
     
    Last edited: Dec 30, 2017
  24. LennartJohansen

    LennartJohansen

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

    1. I would make sure the grass and plants render to a layer that does not reflect on the reflection camera of Aquas. That will help a lot.

    2. Have a look at this setup Guide. Aquas uses some coustics projectors, and unity has a problem with instanced indirect and this. I think this should fix your compute shader problems.

    Lennart
     
  25. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    1. Thanks. I will take a look.
    2. I removed aquas during the test. so I don't think it's related.
     
  26. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92
    I don't use aquas.
    I baked the vegetation and now the hiccups are gone. It runs really smooth.
    I've still got a random hiccup every 3-5 minutes or so but I haven't tried it in a build yet so I can't tell if it's just in the editor.

    Disabling compute shaders doesn't make a difference.

    Right now I have 21 plants and grasses in VS so I should probably make a new vegetation package and see when the lag starts.
     
  27. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. You would need a shader that has a tint color for the rocks. just adjust that on the material.

    The generated splat map is stored in the terrainData of the terrain. You can swap out textures without affecting the splatmap itself.

    Lennart
     
    mattis89 likes this.
  28. DrussAxeLegend

    DrussAxeLegend

    Joined:
    May 4, 2017
    Posts:
    6
    Hello,
    When using the ultimate survival harvesting script you will also need to add some code to the ultimate survival MineableObject script. first you will have to add:

    using AwesomeTechnologies.Vegetation;
    using AwesomeTechnologies.Vegetation.Masks;
    using AwesomeTechnologies;

    Then you need to add these to the mineableobject class:
    Code (CSharp):
    1.         public void AddLoot(LootItem[] lT) {
    2.             m_Loot = lT;
    3.         }
    4.         public void AddRequired(FPTool.ToolPurpose rI) {
    5.             m_RequiredToolPurpose = rI;
    6.         }
    Finally you need to add the MaskVegetation function to the mineableobject class and call mineableobject() above Destroy(gameobject) in the DestroyObject function.
    Code (CSharp):
    1.         private void MaskVegetation()
    2.         {
    3.             GameObject mObject = gameObject;
    4.             VegetationItemInstanceInfo vegetationItemInstanceInfo = mObject.GetComponent<VegetationItemInstanceInfo>();
    5.             if (!vegetationItemInstanceInfo) return;
    6.  
    7.             GameObject vegetationItemMaskObject = new GameObject { name = "VegetationItemMask - " + mObject.name };
    8.             vegetationItemMaskObject.transform.position = vegetationItemInstanceInfo.Position;
    9.             vegetationItemMaskObject.AddComponent<VegetationItemMask>().SetVegetationItemInstanceInfo(vegetationItemInstanceInfo);
    10.         }
    I have also altered my harvesting script so that objects can be added from the inspector.
    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using AwesomeTechnologies;
    5. using AwesomeTechnologies.Colliders;
    6. using AwesomeTechnologies.Vegetation;
    7. using UltimateSurvival;
    8.  
    9. public class MineableManager : MonoBehaviour
    10. {
    11.     MineableObject mObject;
    12.     public ColliderSystem colliderSystem;
    13.  
    14.     [Header("Mineable Loot by Type")]
    15.     public MineableType mineableByTypes;
    16.  
    17.     [Header("Mineable Objects by ID")]
    18.     public MineableVegetation[] mineableVegetation;
    19.  
    20.     void Start()
    21.     {
    22.         colliderSystem.OnCreateColliderDelegate += OnCreateCollider;
    23.     }
    24.  
    25.     [Serializable]
    26.     public class MineableVegetation
    27.     {
    28.         public string name;
    29.         public string itemID;
    30.         public LootItem[] loot;
    31.         public FPTool.ToolPurpose requiredItem;
    32.     }
    33.  
    34.     [Serializable]
    35.     public class MineableType
    36.     {
    37.         public bool grass;
    38.         public LootItem[] grassLoot;
    39.         public FPTool.ToolPurpose grassItem;
    40.         public bool plants;
    41.         public LootItem[] plantsLoot;
    42.         public FPTool.ToolPurpose plantsItem;
    43.         public bool trees;
    44.         public LootItem[] treesLoot;
    45.         public FPTool.ToolPurpose treesItem;
    46.         public bool objects;
    47.         public LootItem[] objectsLoot;
    48.         public FPTool.ToolPurpose objectsItem;
    49.         public bool largeObjects;
    50.         public LootItem[] largeObjectsLoot;
    51.         public FPTool.ToolPurpose largeObjectsItem;
    52.     }
    53.  
    54.  
    55.     void OnCreateCollider(Collider collider)
    56.     {
    57.         VegetationItemInstanceInfo vegetationItemInstanceInfo =
    58.             collider.gameObject.GetComponent<VegetationItemInstanceInfo>();
    59.  
    60.         //Grass
    61.         if(mineableByTypes.grass)
    62.         {
    63.             if (vegetationItemInstanceInfo.VegetationType == VegetationType.Grass)
    64.             {
    65.                 collider.gameObject.AddComponent<MineableObject>();
    66.                 mObject = collider.GetComponent<MineableObject>();
    67.                 mObject.AddLoot(mineableByTypes.grassLoot);
    68.                 mObject.AddRequired(mineableByTypes.grassItem);
    69.             }
    70.         }
    71.         //Trees
    72.         if (mineableByTypes.trees)
    73.         {
    74.             if (vegetationItemInstanceInfo.VegetationType == VegetationType.Tree)
    75.             {
    76.                 collider.gameObject.AddComponent<MineableObject>();
    77.                 mObject = collider.GetComponent<MineableObject>();
    78.                 mObject.AddLoot(mineableByTypes.treesLoot);
    79.                 mObject.AddRequired(mineableByTypes.treesItem);
    80.             }
    81.         }
    82.         //Plants
    83.         if (mineableByTypes.plants)
    84.         {
    85.             if (vegetationItemInstanceInfo.VegetationType == VegetationType.Plant)
    86.             {
    87.                 collider.gameObject.AddComponent<MineableObject>();
    88.                 mObject = collider.GetComponent<MineableObject>();
    89.                 mObject.AddLoot(mineableByTypes.plantsLoot);
    90.                 mObject.AddRequired(mineableByTypes.plantsItem);
    91.             }
    92.         }
    93.         //Objects
    94.         if (mineableByTypes.objects)
    95.         {
    96.             if (vegetationItemInstanceInfo.VegetationType == VegetationType.Objects)
    97.             {
    98.                 collider.gameObject.AddComponent<MineableObject>();
    99.                 mObject = collider.GetComponent<MineableObject>();
    100.                 mObject.AddLoot(mineableByTypes.objectsLoot);
    101.                 mObject.AddRequired(mineableByTypes.objectsItem);
    102.             }
    103.         }
    104.         //LargeObjects
    105.         if (mineableByTypes.largeObjects)
    106.         {
    107.             if (vegetationItemInstanceInfo.VegetationType == VegetationType.LargeObjects)
    108.             {
    109.                 collider.gameObject.AddComponent<MineableObject>();
    110.                 mObject = collider.GetComponent<MineableObject>();
    111.                 mObject.AddLoot(mineableByTypes.largeObjectsLoot);
    112.                 mObject.AddRequired(mineableByTypes.largeObjectsItem);
    113.             }
    114.         }
    115.         //Mineable by ID
    116.         foreach (MineableVegetation MV in mineableVegetation)
    117.         {
    118.             if (vegetationItemInstanceInfo.VegetationItemID == MV.itemID)
    119.             {
    120.                 collider.gameObject.AddComponent<MineableObject>();
    121.                 mObject = collider.GetComponent<MineableObject>();
    122.                 mObject.AddLoot(MV.loot);
    123.                 mObject.AddRequired(MV.requiredItem);
    124.             }
    125.         }
    126.     }
    127. }
     
  29. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Nice. :)

    Does Ultimate Survival have a compiler define when installed? Maybe we could extend this script and make a component with Vegetation Studio. With UI selection of Vegetation items where you can add loot and a % chance.
     
  30. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I would like to use Advanced Terrain Grass for the grass.
    I guess that "baking to gameobjects" is not what I would need here, right?
    VS generates the grass procedurally, right? So it doesn't really exists on the terrain, and thus Advanced Terrain Grass can't use it, is that right?
    If this is true, is there any way to turn the procedurally created grass into "painted grass"?
    I like the way that I can create grass and make it adapt to game objects (so that grass goes away when I place a stone at the same place or things like that), but I would like to leave the rendering and everything else to Advanced Terrain Grass.
    As I haven't seen any tutorial or video about it yet, I would like to ask here how to handle this scenario.
    Even if my question is really stupid, and I'm missing something, perhaps other people have the same question.
     
  31. LennartJohansen

    LennartJohansen

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

    Vegetation Studio has generates the grass and plant instances run-time from the included rules, masks, vegetation masks etc. This can be baked to a persistent storage.

    There is also an component called SceneVegetationBaker that can bake out all these instances to GameObjects in the scene. This can be used for baking trees to GI lighting etc, but you can also use it to get access to get gameobjects if you want to use the instances to something in code.

    As I understand Advanced Terrain Grass uses the detail mask on the Terrain to generate instances run-time. This mask holds a density value per location in the grid and instances are generated from this and a seed.

    This mask can not hold instances of grass patches just a general density per location. The final result will not be the same as the instances you try to input.

    If you want to give it a try to make a system that converts it I would start by looking at the code in the SceneVegetationBaker, use that as a base and where GameObjects are created try to find a way to add instaces to a grid similar to the detail map and try fill the density map. Then add this to the TerrainData detail map on the index of a new grass instance you create there.

    Just send me pm if you have any questions about reading instances from Vegetation Studio.

    Lennart
     
    BackwoodsGaming likes this.
  32. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Hi! Unfortunately I think I don't have the skills to accomplish this in a timely manner by myself. Currently the only option would be to use yet another asset for placing the grass like TC2. It would be great if we didn't have to use so many different tools:

    - Shading and instancing grass by another asset because the shaders are better and grass rendering is better - Ok.

    - Placing grass (and trees) by yet another asset and not VS although VS was built for just this purposes - Wow!

    Currently I think VS is mainly good for tree instancing.

    I don't profit from Vegatation Studio's other options that were advertised in the demo videos. It only works when you stay entirely in VS. That's a pity because I liked very much what I saw.
    Opening VS in the form that you described would be a big first step to change that.
     
  33. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Thanks :) ..
     
    Last edited: Dec 30, 2017
  34. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Advanced terrain grass? Is it a shader or what? You know you can use custom shaders... ? ...

    What are you really trying to accomplish? I mean, VS has it all.. like literally.. grass, trees, objects.. its amazing.
     
    Mark_01 and BackwoodsGaming like this.
  35. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    192
    Just got this today and have only played with it a bit, am I missing a step here because with grass I have double the FPS without Vegetation Studio?...
     
  36. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Send me a pm with some info on your setup and I will help you configure.
     
  37. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Hmm, it's not as simple as you think when you try to achieve maximum speed and best looking vegetation.
    Advanced Terrain Grass is a combination of shaders and instancing. Grass instancing is faster than VS instancing, therefore I need to use Advanced Terrain Grass for grass.

    There should be a way to make these 2 assets work together in order to stay more in Vegetation Studio.
    Unfortunately, as I explained, I'm not skilled enough to do what Lennart proposed.
     
    Last edited: Dec 30, 2017
  38. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    192
    Do they work together? Can I use VS just for trees and ATG for my grass?
     
  39. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. You could if you want to, just do not add any grass to Vegetation Studio. You would not get to use any of the Vegetation Studio features like spawning rules. Vegetation Masks, touch bend, API access to vegetation etc. But there is no technical issue stopping you from combining systems.

    If it is related to the look of the shader, ATG just released an update with a grass shader that supports Vegetation Studio.
    You can use that with VS to get any extra features you want from the shader.

    Lennart
     
    mattis89 and SirTwistedStorm like this.
  40. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    " If you have a 3rd party shader like MicroSplat or CTS create a package with no textures."

    When I started I chose 8 textures...so I can have texture based rules "dont plant on road things"... Do I have to start over now because I have CTS?

    EDIT: If I ad 2d texture grass to the Veg system, does it change the shader and use awesomeness? I dont have to set up the 2d grass like it is a mesh?
     
    Last edited: Dec 31, 2017
  41. LennartJohansen

    LennartJohansen

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

    1. You can change the texture count of an existing package. Select the Vegetation Package in the project folder. In the inspector you will see a texture count. In this case set it to 0 and press the button.

    2. When you drop texture 2D grass directly in the inspector of Vegetation Studio it will use a generic grass patch with 3 LODs and the included Grass Shader. This is the same kind of grass patch you would generate with the GrassPatchGenerator component.

    Lennart
     
  42. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Thank you =)

    Im not fully getting this collider system or touch bending neither... When I spawn grass it still spawns everywhere, it dosent go around houses?...

    grass dosent bend for meshes, or get bent when I walk on it .. ? I have checked all the boxes :p
     
  43. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394

    Hi.

    There is a few ways to get the grass to grow around houses.

    • You can add a VegetationMaskArea component to the root of the house model. There is a button to automatic calculate the hull area but you probably need to adjust this a bit. With the mask on the house the vegetation will adapt automatic. This will follow the house if you move it and can be saved with the prefab. You can also do different settings on grass and trees. Having trees removed in a larger distance.
      See here for more info.


    • Another option can be to generate a obstacle mask that you then add as an exclude texture mask on the spawning rules. There is an included utility component that will generate a mask like this from colliders in the scene. You can select what layers to use and an optional buffer distance.
      See here for more info on how to create one.

    • Yet another option is to use a terrain texture rule. Set an terrain texture exclude rule for a texture you use for built areas and paint it where you add the houses.
    For grass bending you need to add a TouchReactCollider to the collders that you want to affect the grass, you also need to make sure the TouchReactSystem is enabled and that the grass is using the Vegetation System Grass shader. Se here for more info.

    Lennart
     
    mattis89 and blitzvb like this.
  44. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    Great performance :D (@Lennart tested himself :D), in 'forrest' there are like 9-12 mln polys to render ;)









     
    BackwoodsGaming likes this.
  45. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
  46. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Looks good :)
     
  47. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    HAPPY NEW YEAR!

    I want to wish everyone here a Happy New Year!

    Lennart
     
  48. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    blitzvb likes this.
  49. froslie

    froslie

    Joined:
    Apr 20, 2015
    Posts:
    18
    Reading about the collider system and Navmesh... could I use the same process with A* [AStar]?

    I continue to love this asset more and more!
     
  50. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Happy new year @LennartJohansen

    First I want to share what I've created with VS. VS is properly revolutionary for unity.



    But secondly, if you don't mind me asking something off topic, do you have any idea on why leaves on the speed trees I made myself look so dark. I'm sure it must be the shader at some level. It looks great on the speed tree editor, it's actually very pretty leaves. But in the unity editor it takes a lot of light just to illuminate.

    I suspect because the quads used for the leaves are intersecting with each other block light?
     
    mattis89 likes this.
Thread Status:
Not open for further replies.