Search Unity

[RELEASED] Vegetation Studio

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

  1. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    As far as I know Unity has not made a HD/LW version of the tree creator shaders. They might do at some point.
    I think you might have more luck using vegetation from assets that already support the SRP. NatureManufacture has some packages with trees that does that.

    For speedtree I think there is a plan to support it. I saw changes in the HD SRP changelog but nothing released yet.

    is this still in using the SRPs? What mode are you rendering the grass in.
    Instanced indirect does a per item distance/frustum culling while instanced does a cell culling. For instanced rendering the culling has to be done on the CPU and it is to expensive to test every item.

    In Vegetation Studio Pro there is per item LOD selection and culling on grass and plants also when rendering instanced. The extra power and multithreading of the job system allows for that.

    Lennart
     
  2. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    643
    Yes this issue is while using the SRP. I've tried rendering the grass using both instance indirect and instanced, but I seem to get the same result. The only way I seem to get the desired result is to switch the grass to "Normal" rendering.
     
  3. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    141
    Hi Lennart - I've just purchased this and I'm afraid I'm a bit stuck right at the beginning. I have multiple terrain tiles. I am using Microsplat. Nothing is showing on the terrain. I set up a vegetation package with no textures Added a speedtree. Nothing appears.. (P.S. I have hit the big green button!)

    UPDATE: I have found the vegetation! It was on a random tile. I have now turned off 'auto select terrain', so can now select a single tile to have vegetation on. So how do I render vegetation on multiple tiles?
     
    Last edited: Apr 30, 2019
  4. DRRosen3

    DRRosen3

    Joined:
    Jan 30, 2014
    Posts:
    643
    Hi @LennartJohansen having a new "issue" today. Is there any way to extend the "perimeter" of the texture exclusion? As you can see in the images below that texture is set up as an exclusion, and for the most part it works, but there are some edge-cases.
     
  5. KennyGuillaume

    KennyGuillaume

    Joined:
    Mar 7, 2014
    Posts:
    8
    Hi. Really liking the asset so far. Bumping into an issue though. Using a custom grass shader made with Amplify, and followed the instructions to make it useable for instanced indirect. But that's not really the issue.
    It seems that the grass is not ending up in the depth buffer? That's why the fog is interacting so weirdly with the grass.
    When I place the grass without Vegetation Studio Pro, there's no issue.
    Any ideas?



    EDIT: Okay, I've tracked down the issue. It's because in my Amplify shader I use the node 'World Normal' somewhere. (used for a ramped lighting effect). (using instanced render mode, when putting it on normal render mode it works fine, but that's not an option because of performance of course).

    So, is there a way around this so I can use this node?
    Or won't this be possible at all?
    The visual style we're going for heavily relies on it though.
     
    Last edited: May 5, 2019
  6. Ftech

    Ftech

    Joined:
    Oct 24, 2016
    Posts:
    2
    Hi everyone

    has anyone tried to make an Android build on Unity 2018.2.x? the game just crashes on loading the scene. i thought it might be the instanced rendering causing the issue, but i get the same result no matter what settings.

    edit: nvm, got it resolved. apparently it works with IL2CCP
     
    Last edited: May 8, 2019
  7. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    141
    I asked this question a week ago and no response from developer. Any help would be appreciated! I have multiple tiled terrains. How do I run VS across them all?
     
  8. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Hi. You need to duplicate the Vegetation System object for each terrain. They can use the same Vegetation Package for rules. Then assign one terrain for each.

    For Vegetation Studio Pro you can assign multiple terrains to a single vegetation system component.

    For fastest support try the discord server. Usually a good crowd online if I am not there.
    Link in my signature.

    Lennart
     
  9. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Any error log? Could you send me in a private message? What android device. Does it support shader model 5.0?

    Lennart
     
  10. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Not really sure what is happening with that node. Could you message me on discord? Easier to debug with a text chat.
    Link in my signature.

    Lennart
     
  11. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    What probably happens here is that the center/pivot point of the tree is outside of the texture area. There is no way to extend it. What could work is to draw a almost transparent wider road on the terrain with a wider brush. This would give an area with a small % of road that almost does not show but can be tested with the rule.

    Lennart
     
  12. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    141
    That sounds like a lot processing cost. Is it more optimised in PRO?
     
  13. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Cells out of visible range are not processed. The overhead is not that bad.

    In Vegetation Studio Pro they share a single internal cell structure. You define a "world size" and can add multiple terrain to that. The upside here is that loading terrain run-time is faster and vegetation of the same type will batch between terrains also.
     
  14. twalterDD

    twalterDD

    Joined:
    Jun 13, 2018
    Posts:
    1
    hey there
    i am trying to run vegetation studio the first time an get a lot of this errors:

    Assets/AwesomeTechnologies/VegetationStudioPro/Runtime/VegetationMasks/Areas/PolygonMaskArea.cs(380,65): error CS1503: Argument 2: cannot convert from 'Unity.Collections.NativeList<byte>' to 'Unity.Collections.NativeMultiHashMap<int, int>'

    i run unity 2019.1.1f1 on mac and imported gaia first. all dependecies are installed and scripting runtime / api comp are set to .net 4.x

    what am i doing wrong?
    best regards
     
  15. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Hi. Have a look at the setup guide here There is a requirement for the Job package version.
    There is also a forum thread for Vegetation Studio Pro here.

    I think that should fix your problem.

    Lennart
     
  16. dinisd

    dinisd

    Joined:
    Nov 6, 2018
    Posts:
    3
    Hi, i am having this issue search told me it related to Veg Studio.

    TERRAIN PAINT FUNCTIONALITY IS DISABLED IN SECOND INSPECTOR WHEN YOU CLOSE INITIAL INSPECTOR.

    Is there a way to bypass this til an update comes?
     
  17. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Delete the extendedTerrainEditor.cs file

    Lennart
     
  18. dinisd

    dinisd

    Joined:
    Nov 6, 2018
    Posts:
    3
    Thanks
     
  19. gghitman69

    gghitman69

    Joined:
    Mar 4, 2016
    Posts:
    81
  20. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    691
    Latest 1.2, getting bunch errors now. Its complaining of NullReference Exceptions with anything that has a terrain mask component added.
     
  21. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Do you mind messaging me on Discord tomorrow. We can look at it. I do not think that is related to the upgrade.
    Late here, not in the office anymore.

    Lennart
     
  22. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    691
    Looks like its erring out on Instance_RemoveBiomeMask, in the Editor. The other masks throw errors at run-time.
     
  23. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
  24. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Do you have the scene set up correct with a VegetationStudio Manager etc.

    Lennart
     
  25. tcourbet

    tcourbet

    Joined:
    Oct 5, 2017
    Posts:
    46
    Hi, any update on potential hdrp support?
    I'm planning on moving over to hdrp and I would love to be able to continue using Vegetation Studio.

    If I did update my project to hdrp, what issues would I potentially encounter with VS?
     
  26. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    108
    If I want to use a custom grass shader made with amplify, do I need to use the "VS_indirect.cginc" like said in the readme (which I can't find in the whole project) or the "a_indirect.cginc" in the "GrassSystem" folder? Because the newest readme advices me to use the VS_indirect.cginc"..?
     
  27. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Hi. You can find the files you need here.

    Lennart
     
    Zyblade likes this.
  28. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    108
    Thanks for the quick reply, so I don't include the a_indirect.cginc at all? (just want to be sure)
     
  29. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Hi. I have done some protoyping but the HD SRP is still in preview and they did not add the new shader Node API yet. They removed the old after LW/HD 4.x .

    Not sure how the SRP integration will end out. It needs refactor of code and I will not do changes that can break current projects.

    The render loop itself and spawning should work in the SRPs but the included grass shader, billboard system and heatmap will not work.

    Lennart
     
  30. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    No. Just follow the github guide.

    Lennart
     
    Zyblade likes this.
  31. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    108
    Everything works now. Do I need to make my own wind calculations using sin/cos or can I use the wind, which is also used in the default grass shader from vegetation studio pro package? If I include TerrainEngine.cginc and use "WavingGrassVert(v);" it won't move.
     
  32. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    with a custom shader you need to make your own wind. If you use the meshes from the GrassPatchGeneratior there is phase and bend info in the vertex colors.
     
    Zyblade likes this.
  33. tcourbet

    tcourbet

    Joined:
    Oct 5, 2017
    Posts:
    46
    Thanks for the answer!
     
  34. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    108
    What could be the reason, if the grass, which only renders on a specific texture, doesn't update if I paint in realtime using the terrain tools? I need to refresh the terrain each time, but I saw in the videos, it can update on the fly.
     
  35. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    What Unity version are you using? From Unity 2018.3 Unity changed the internal terrain inspector and I have not been able to get the events I need for this update yet.

    Lennart
     
  36. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    108
    2019^^ Alright, it's not a must have right now. I just wanted to go sure my settings are correct.
     
  37. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    108
    Do you guys have a quick idea for the following problem?
    I go a terrain, 500x500m. The whole terrain is covered by grass right now. But strangely, every 100m, there is grass missing in a horizontal line from one terrain edge to the other. Vertically, the grass spawning has no gaps. The horizontal lines where the grass is missing, are 2m wide. It has nothing to do with my custom terrain shader, as it happens also without it. I looks like the gaps are where the terrain is segmented into smaller "chunks", hm..

    edit: it has to do with the cell-size. If I change it to 50, the lines will appear every 50m. But it's not recommended to increase the cell size to the whole terrain, is it?

    edit: fixed it by disabling "use sample point offset"
     
    Last edited: Jun 2, 2019
    Willbkool_FPCS likes this.
  38. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi,

    I want to paint grass, trees and objects on walls and upside down, so I have to use precision painting.
    But in the precision painting tab only the grass is there.
    Is it possible to precision paint trees and objects ?

    My levels are only meshes, no terrain needed. Is there a way to paint on objects without the need of having a terrain underneath ?

    Can't wait to have your asset fully hdrp compatible. :)
     
  39. LennartJohansen

    LennartJohansen

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

    1. The trees and rocks are just filtered out in the inspector for the precision painting. You will have to edit the inspector code and add the trees and rocks enum to the function also.

    2. Vegetation Studio need a terrain in order to define the world and set up the internal cell structure.
    In VS Pro there is MeshTerrain support where you can add meshes to a virtual terrain.

    Lennart
     
  40. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Thx for the quick reply.

    Is there a reason for filtered out the trees and rocks ? It could be handy to precision paint those elements.

    When painting, I only have Y random rotation, not XYZ as setup in the edit biomes tab. Is it possible to have the same position settings than in the edit biomes tab, when painting and precision painting ?

    It also would be super great if we could have more control on the rotation randomness. Like the slider we have for the Min/Max scale but for each axis individually.
    I could be usefull, for instance if we want to have our trees, plants or crystals not to be absolutly vertical and not totally random on the 3 axis.
     
    JBR-games likes this.
  41. wigglypuffs

    wigglypuffs

    Joined:
    Aug 10, 2015
    Posts:
    67
    The trees aren't being removed by the Vegetation Mask Line. I'm using Unity 2019.1.4f1, a standard 3D project, MapMagic, EasyRoads3D and Vegetation Studio Pro latest.

    Note: The vegetation around the trees is being removed correctly though.

    https://i.gyazo.com/86a0c475ae2b5e08af2d61c45b392610.jpg

    Any ideas? Thank you.
     
  42. alexrau

    alexrau

    Joined:
    Mar 1, 2015
    Posts:
    52
    Am trying to use the runtime prefab spawner along with another 3rd party tool to Mesh Destruction tool (Exploder) to make it so that you can destroy vegetation.

    It is really helpful that the runtime system includes a reference to the parent vegetation, so that you can manipulate. Thank you.

    Is there a function in Vegetation Studio that I can use to delete/disable the parents using one of the variables from VegetationItemInstanceInfo (like VegetationItemID) ?
     
    Last edited: Jun 10, 2019
  43. jeuwn

    jeuwn

    Joined:
    Apr 30, 2018
    Posts:
    2
    I have grass and trees being instanced by VegStudio Pro and it looks fantastic when I am using a prefab player dragged directly into the scene, but if I use an instantiated player the clone doesn't seem to activate vegetation. Is this a known item with any fix possible? Or do I just need to avoid using clones with a camera attached? Any idea?
     
  44. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Hi. You will need to add the camera to VS Pro in code when loaded. There is a CameraLoader component you can add to the Camera GameObject or do this yourself with VegetationStudioManager.AddCamera(camera);
     
    jeuwn likes this.
  45. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    You can create a VegetationItemMask component to remove the trees. Have a look in the harvesting demo script.
     
    alexrau likes this.
  46. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    Could you contact me on the Discord server. We can look at this. Easier with a text chat.
    Link in my signature

    Lennart
     
  47. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,353
    I will think about this the next time I do work on the painter.

    Lennart
     
  48. alexrau

    alexrau

    Joined:
    Mar 1, 2015
    Posts:
    52
    Thanks, will have a look at. Went onto the Discord and was able to find the answer. (actually also turned me onto DIscord for Unity which is an excellent tool).
     
  49. jeuwn

    jeuwn

    Joined:
    Apr 30, 2018
    Posts:
    2
    Works perfectly, and such an easy solution. You are my hero
     
    LennartJohansen likes this.
  50. sunseeker1988

    sunseeker1988

    Joined:
    Jul 10, 2014
    Posts:
    416
    How do I change the layer the plants are on? I read somewhere it was the Default layer, but I would like to put it in its own custom layer.
     
unityunity