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. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    The problem doesn't exist in Deffered render mode
    Yes I use Post Processing stack v2 with AO, I'll test later with forward rendering and no Post processing and let you know but it's strange to me...
    The Shader is the Unity Tree creator shader.. should I change that?

    Another issue and it's super annoying to me because I've tried in many ways but I can't figure out how to make Megasplat control mask to work properly with rules

    Image 138.jpg

    Image 136.jpg

    That's an example (each item has the proper index texture), I've tried also with just a spot on the map painted with 2 textures of sands (to break tiling, it's the cluster mode in Megasplat)

    With the rules as above (if only two textures of course I've set only two masks) it doesn't work. My trees spawn on the sand:
    Image 137.jpg

    I've a similar issue with the include rule where my trees would spawn all around the area painted with the texture index but not in the middle of it...

    Am I using those masks rules in the wrong way?

    thanks
     
  2. DrussAxeLegend

    DrussAxeLegend

    Joined:
    May 4, 2017
    Posts:
    6
    Hello,
    I'm trying to use VS with Map Magic and I am getting the following errors:
    - VegetationStudioManager does not contain AddVegetationStudioManagerToScene()
    - VegetationStudioManager does not contain AddVegetationSystemToTerrain()
    - billboardSystem does not contain RefreshBillboards()

    Fixed: VS wasn't updated.
     
    Last edited: May 6, 2018
  3. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Do you have the latest version of Vegetation Studio installed? The API was extended a bit when MapMagic added the output node.

    Lennart
     
  4. DrussAxeLegend

    DrussAxeLegend

    Joined:
    May 4, 2017
    Posts:
    6
    yeah it wasn't updated, so obvious haha.
    thanks.
     
  5. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    nvm, in a few weeks quixel will release the new bridge with full unity support :)
     
  6. MarcopoloR

    MarcopoloR

    Joined:
    Feb 4, 2015
    Posts:
    114
    Hi, quick question about this product. Do this system allow you to interact with your vegetation? If so, how easy/difficult is it? For example, if making a game where the character chops down trees and harvests fruit from plants, etc.
     
  7. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    I did some more troubleshooting and found out what the issue is with the Megasplat control mask.

    It uses only the bottom layer as reference to place or not vegetation using rules.

    Is there a way to have more control over that? Because the advantage of Megasplat is the blending between textures over two layers; sometime I could have most of my "base texture" on the top layer thus Vegetation Studio won't use it as a rule and it become some kind of jigsaw to see what texture is above/under there...

    Because the Heatmap doesn't work at all with the Megasplat mask; it shows everything as "green" on the heatmap even though I can clearly see it spawn only where I asked it
     
    ftejada likes this.
  8. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    There is a few way of interacting with vegetation run-time

    • There is an API for the persistent storage where you can remove and add instances. You have control of position, rotation and scale of each.
    • You can use the line and area masking system. This will allow you to mask out vegetation for new objects you place in the scene. Have a look here
    • The collider system has events that allows you to add custom scripts to the run-time generated colliders. With this you can add your custom harvesting logic and mask out vegetation if needed. Your code will create a VegetationItemMask component that removes the tree/rock as long as it exists. There is a harvest example doing this in the demo scene.
    Lennart
     
    ftejada likes this.
  9. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. The mask itself does not know about the clusters. It only holds 2 indexes (0-255) of textures and the blend factor between these. If you want to mask out the entire cluster you will have to add multiple include/exclude rules.

    I will check with @jbooth if there is any easy way to get the cluster info without direct integration with the MegaSplat code.

    The heatmap works with height and steepness rules only, it does not show terrain texture or texture masks.

    Lennart
     
  10. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Ok thanks, but to me it's not about the cluster here, it's just that if something is painted on the bottom layer it's fine, everything else isn't considered at all. I could paint single textures (not via cluster) the result is the same. only the bottom layer is considered by VS
     
  11. jmpedros

    jmpedros

    Joined:
    Jun 19, 2017
    Posts:
    11
    Hi. I have a tree i made with unity tree generator which uses billboards for the leaves. The thing is that when i set up the render mode to Instanced for this tree, the leaves stop being rendered. Also when i bake the tree to create its billboard it appear without the leaves too. Could anyone help me with this?
    It only happens when i use billboard for the leaves in the tree generator.

    Thanks in advance!
     
  12. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I had a look at the code. MegaSplatTextureMask.cs line 62+

    It does test for both the lower and higher layer and returns the blend value between them. I will have to make a test project and test.

    Could it be related to some height based blend? Where what you see is not actually the blend% in the mask file?

    Lennart
     
  13. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. sent you a pm. lets look at it.
     
  14. Pescu

    Pescu

    Joined:
    Jun 7, 2014
    Posts:
    17
    Hello Lennart, first thanks for the great asset. I have some questions for something that i didnt find, or understand how to do it. Is there a way to use different packages on different parts of the same terrain as for Gaia? And is there a way to spawn clustered objects?
     
  15. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    I've just started using Vegetation Studio and noted that when you create a vegetation package (I think that's the term), under "Copy textures from terrain", it's looking for "Source Terrain" and "Source Terrain Data". I've tried using circle select, as well as drag and drop, to add my terrain, but the field always shows None. Am I missing something simple?

    Ben
     
  16. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Hello,

    I have to issues with VS.
    1) integration with megasplat is bugged. If I set the rule to include certain object only on megasplat texture index N, then it won't be spawned in places where splat map color in N;N;255

    2) when the VS documentation will be updated? Right now it does not cover like half of the options.
     
  17. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. You can map vegetation items to terrain textures, or texture masks if you want to define biome areas.
    There is also possible to add spesific vegetation to areas using the Vegetation Mask Areas and Vegetation Beacon components.

    I am doing some more biome prototyping but that is a post for later when I know how it will work out.

    Lennart
     
  18. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    This is just an option to copy the terrain textures from a terrain. This can be usefull if you want to set up a Vegetation Package that will manage your terrain. It does not create any connection to the terrain. To use the Vegetation Package assign it to a VegetationSystem component. The terrains are also assigned to that.

    For more info about the VegetationPackage see here.

    Lennart
     
  19. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    1. I will send you a pm about this Lets try to see what is wrong.

    2. What settings do you want more info for? In addition to the pdf there is more guides and documenation on the website. This is updated between unity releases also.

    Have a look here.

    Lennart
     
    twobob likes this.
  20. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    Thanks very much :)
     
  21. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    I was having a hard time getting VS to do what I wanted, so I deleted it from my sample project and tried to paint trees with Unity's built-in system. For some reason, I am unable to do so. Is there a project setting that I need to change?

    Ben
     
  22. DevS0L0

    DevS0L0

    Joined:
    Feb 10, 2017
    Posts:
    12
    fixed
     
    Last edited: May 9, 2018
  23. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hi Lennart,
    I'm wondering when will the next update come out, really need to remove the 64 prototypes cap for my project.
    And where can I check the roadmap of VS future updates?
     
  24. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. I had a look at the code again today and found a bug. If the mega splat control texture had the same textureindex on both the bottom and top layer the blend of the 2nd would be ignored.

    Here is a patch. Fix included in the next update.

    Lennart
     
    ftejada likes this.
  25. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    You probably need to enable draw for trees and details on the settings of the terrain. Those are disabled by Vegeation Studio when you add it to the scene.
     
  26. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. I have a version ready that does that now. You can get it for testing today if you want.
    It can be enabled as a setting on the advanced tab now, but will be set as default in a future update.

    I do not have a public roadmap yet, but I will try to set up trello or something similar to give you all access to my current Vegetation Studio tasks.

    Lennart
     
    lawsochi likes this.
  27. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    You rock :)

    thanks a lot!
     
  28. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    1. What's the difference between "add vegetation items": grass vs plant vs tree and object vs large object?
    2. What does "Position > random distance" do?
    3. How does "Texture mask rules > min/max texture mask density" work?
    3a. What's "return color tolerance" for?
    4. What's "vegetation item instance info" component for and how do I use it?
    5. What's the cons of using instanced indirect mode? Or should I use this one whenever I can?
    6. What's the "best" default (standard, nature/tree creator or tree soft) shader to use with plants / tree creator?
    6a. Should I manually use any of the shaders under "awesome studio" category?
    7. Manual contains few notes like "XYZ will be changed after beta". Is VS still in beta phase or that's just remains after beta?
    8. Sugestion: as far as I understand online manual is the one more often updated. I find this form very inconvenient; not because it's online, but because it's divided into separate sections and I can't ctrl+f through it. Maybe add i.e. google docs version?
     
  29. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Looks like a post to long for my phone. I will get back to you tomorrow when I am in the office.

    Lennart
     
  30. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Hi Lennart

    One more request for the Runtime Prefab Spawner. Would it be possible to have the Spawner object match the sizing of the object that it is attached to?

    I have been making prefabs of collectable items that basically lay overtop of the original item. To do this I:
    1: drag the original item in the the scene view with the transform values all set to 0, 0, 0.
    2: make a duplicate of the game object and remove the model
    3: add the collectable item with necessary scripts to the duplicated game object
    4: align the collectable game object to the original (say for example, a tree branch attached to a tree)
    5: make a prefab of the collectable object.

    I then add the collectable game object prefab to the Runtime Prefab Spawner and it works great if the collider values of the original are appropriately set and the size of the original size is maintained at a value of 1. However, if the size of the spawned item has variation, say the original item is doubled in size, the prefab component is still at a scale of 1, thus hiding the collectable component within the collider of the original and making it not collectable.

    So, along with the matching seed value to original item I requested before, would there be a way to also match the size of the spawned item to the original item?


    Ok, and one more thing now that I think of it. Having a Spawn chance value for Spawned Prefabs would be amazing. So say, for example, only 25% of a given tree would have collectable items added to them.

    Thank you,
    Nathan
     
    Last edited: May 10, 2018
  31. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Great to know that the cap is already removed!
    I definitely would like to try this out, but I'm planning to open my game's early access on steam before the end of this month, it's a bit risky to update VS for now, so I shall wait for the official release. :)
    BTW, is there any notifications about Awesome Studios should I make in my game if I'm going to publish it with VS integrated? I can make a splash screen that shows off the core assets I've used in my game.
     
  32. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    For my map, I don't want trees placed by height/slope algorithms, I would like to mask certain area as "Trees" and have VS put trees only in those places. Does anyone know if this is possible?
     
  33. LennartJohansen

    LennartJohansen

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

    There is several ways you can do this.
    • Map vegetation to terrain textures. This way it will spawn based on what texture is used
    • Use the VegetationMaskArea component and the localized vegetation option on that. Have a look here.
    • You can also make your own distrubution mask and use that as a rule. Have a look here. There is also a component that will help you to make a background to paint the mask on. You can find it here.
    Lennart
     
    Mark_01 likes this.
  34. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Send me a pm about the splashscreen. I can get you a logo.

    Lennart
     
  35. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    As the company name says: AWESOME! You provide amazing support; thank you.

    Ben
     
  36. LennartJohansen

    LennartJohansen

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

    1. There is 5 types of vegetation items.
    Grass and plants mostly behave the same. Grass follow the terrain normal by default while plants grow up. You can also set separate render layers on each group. (on the render tab)

    Objects have the same render distance as plants and grass (vegetation distance) but in addition to this you can set up colliders for objects.

    Trees and Large objects are both rendered until Vegetation Distance + Additional mesh distance. Trees have billboard options, Large Objects does not.

    2. When calculating spawn points based on a grid a random distance from the grid point is added (when randomize distribution is checked) this setting can adjust that random distance. Default max random distance is 0.5x the sample distance.

    3. Texture masks Include/exclude have a cutoff value for when the rules should be valid. a setting of 0.1-1 will make the rule work when the density of the selecyed channel/pixel (depends on mask type) is from 10-100%
    For density rules the same 0-1 value is used as a 0-100% spawn chance multiplyer. giving you a density based on the mask. Other rules enabled also applies.

    3a. When makeing a color mask texture you can set a color and a tollerance for sampling the color. The tollerance is the allowed difference on each channel when matching. If you select return tollerance it will return a float 0-1 based on how close the match is to the selected color. This can be used for gradual density etc.

    4. The VegetationItemInstancInfo component is added to all run-time spawned collider and objects from the Runtime Prefab spawner. It holds some info about the VegetationItem it is connected to. VegetaionItemID etc. This can be used for your custom game logic. Or when creating VegetationItemMasks to mask out trees/rocks when harvesting

    5. Instanced indirect is faster. it has no 1023 item per draw call limit as instanced rendering has. In addition to this frustum culling and LOD selection is done on the GPU. Use it when available. This willl be supported on trees soon also. I just need to finish a GPU version of the shadow culling (for drawing visible shadows of trees outside of the frustum)

    6. Nature/Tree Creator Leaves works good instanced. The "Optimized" version does not support instancing good and can give some transparent issues. VS replaces the optimized version run-time on meshes if used.

    7.VS is out of beta since release. Just items I missed. I will remove as I update those sections.

    8. The online website is where everything is updated. The pdf is generated from this with a script. I do this when bigger releases is done. Updating several places manually takes to much time and gives mistakes. I would recommend the online version since videos are linked in and animated gifs are used also. These does not work with the pdf. I will see if I can find a better search plugin for the website. for your searching needs...

    Lennart
     
    ftejada likes this.
  37. LennartJohansen

    LennartJohansen

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

    There is options for this today.
    • Add vegetation item scale will scale the prefab with the scale of the vegetation item
    • Spawn frequency is the spawn chance I think you are looking for. 0.25 will spawn on 25% of the instances.



    Is this what you was looking for?

    Lennart
     
    nathanjams likes this.
  38. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Thank you, that's almost all I wanted to know; just few more clarifications:

    By "optimized" you mean "tree creator leaves fast"?
    What about "tree soft occlusion" versions? Those shaders don't have "enable instancing" option. Does some magic happens inside VS if I used them?
    Is bark shader much better than standard shader?

    You forgot about this one. Should I mess with those shaders or just leave them alone unless for some advanced situation?

    That would be swell.
     
  39. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    I must be doing something wrong, and I'm hoping you can point it out. I decided to map vegetation to a texture (it is a new texture and is not on the list of terrain textures). These are the steps that I followed:
    1. I painted certain areas of my map with a texture
    2. Opened the Masks tab and added a mask of type Color Texture Mask and added my texture
    3. Opened the Vegetation tab, selected one of my tree prefabs and under "Texture mask rules" I checked the "Include texture mask rules"
    4. I added a new item which was my Color Texture Mask, but didn't change any of the other settings
    Unfortunately, no trees appear. Can you tell where I've gone wrong?

    Ben
     
  40. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Hello! anyone else with this kinda problems? occurs at high slope or pointy terrain... sometimes where its not that pointy or slopy at all :S the first pic is my main project.. the below is my other.. but both have this issue.. the terrain in above picture is 8x8 km and all other terrain settings full// grassfloat2.png grassfloat.png
     
  41. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938

    I using some kind of tessellation on the terrain? That can cause the heightmap to be different from terrain slightly.
     
  42. sharkapps

    sharkapps

    Joined:
    Apr 4, 2016
    Posts:
    145
    Hi Lennart, I have been unable to download the demo project because your site appears to be down. Can you point me to where I get started if I am working with 400 terrains (generated in TerrainComposer2)? I also plan to use MicroSplat to reduce draw calls -- are there any compatibility concerns?

    Best regards,
    Tony
     
  43. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. The last image with the point seems natural. Only the center/pivot of the mesh is evaluated. But again. these cases would probably be removed by normal steepness rules.

    The first seems strange. is it a large grass patch maybe? Could you send me the mesh on a pm for testing?

    Lennart
     
  44. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    First, make sure the trees spawns there before you add the rule. These include rules are in additon to all other rules.
    Height, steepness, terrain textures, perlin noise etc. All these have to be met in order to spawn a tree/grass.

    Is the rotation of the texture mask correcy?

    send me a pm with screenshots your setup and I can look with you.

    Lennart
     
  45. LennartJohansen

    LennartJohansen

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

    Just tested the webite and checked analytics. Everything seems to be working good all day.
    I will send you a direct link on pm now.

    Microsplat works direct. Just make a vegetation package with no terrain textures to let microsplat manage the textures.

    For 400 terrains I would recommend adding the VegetationSystems in code. As you load a terrain instantiate a copy of a VegetationSystem prefab you make. Get a reference to the component and assign the Terrain you loaded.
    They can all use the same vegetation package.

    Lennart
     
  46. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    • There is a shader called "Hidden/Nature/Tree Creator Leaves Optimized" that does not work with instancing.
      Not 100% sure about the soft occlusion version. If you have a couple of trees you want me to test send me on a pm.
    • You do not need to use the shaders. They are managed automatic from Vegetation Studio when needed.
    Lennart
     
  47. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    nope, I stopped using it. Im using CTS btw...
     
  48. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    located the issue.
     
  49. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    The issue lays in speed tree rough grass.. desktop verision, something wrong there where the offset is in the mesh itself (I think I dont know but makes kinda sense) I tried to use the speed tree rough grass HeRo instead, no more floating.. so grass itself issue, not VS!!!
     
    Mark_01 likes this.
  50. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    :oops:

    oh man...
    Thank you,
     
Thread Status:
Not open for further replies.