Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Vegetation Studio

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

Thread Status:
Not open for further replies.
  1. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Sounds good:)
    If that's feasable, I imagine a second min-max slider below to specify the blend range makes sense. It should not be able to get smaller than the main one, so it needs to be synchronized so that changing the main slider clamps the blend slider if necessary, but not the other way around. Then, within the range of the main slider, grass has it's full size, and outside of it, it fades out in size until it reaches the blend slider values.
    Also great would be if that could affect not only grass size, but also grass density:)
     
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    We could use a curve too? lol
    Being able to supplement a heightmap to control the grass height could be cool too.
     
  3. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Adding a mask texture that controls the height/scale of vegetation is easy. We have this for density and include/exclude rules today. I will add it.
     
  4. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I added the scale mask rules. It is now possible to add a texture mask. Grayscale or a channel in RGBA texture that holds a 0-1 (0-255 color value) scale value. When enabled this will scale the Vegetation Item based on the result from this mask.
     
    jessejarvis, one_one and Seneral like this.
  5. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    sry for the boring question when is the vegetation Studio final ?
     
  6. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Always the big question :) As it looks now we still need a couple of months of beta testing. Then the time Unity will use to approve it. I still have a couple of bigger features to complete and a list of smaller changes and bug fixes. Estimate might change...
     
  7. Twoonebe

    Twoonebe

    Joined:
    Mar 30, 2013
    Posts:
    174
    thanks for the information. last question do you think it`s a good choice for Top-Down Game ?
     
  8. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes. I think that should work good. I would configure grass patches to bend more when making them in the Grass Patch Generator. That will give a better coverage when seen from top. Also make sure the terrain texture match the grass color.
     
    Twoonebe likes this.
  9. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi.
    Finished a new feature for the ColliderSystem component today.
    Vegetation Studio can be set up to spawn colliders run-time for trees, rocks etc. These are created when the vegetation item is close to the camera.



    Since vegetation and colliders is spawned run-time they do not exist for the Unity Navmesh baking.

    In order to handle navmesh there is now a new feature on the ColliderSystem Component.


    Select the Navmesh tab and press bake colliders to scene. This will create an object with children containing static mesh versions of all configured colliders. This object can be used for generating the navmesh.





    After the bake is complete just delete the generated object in the scene and you have a finished navmesh that handles the trees and rocks

     
    Yasunokun, Farelle, Whippets and 15 others like this.
  10. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Can I like that post more than once?!
     
    LennartJohansen likes this.
  11. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,896
    Congrats @LennartJohansen. You told me about this system a few months ago and I think it has already surpassed the "interesting" level. Looking forward to the release :)
     
  12. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Finished a new billboard feature today.

    Vegetation Studio has a billboard system that batches up to 10 000 billboards in a draw call. This mesh is created run-time and updates if the developer changes tree spawn rules, tree density setting or add/move/remove Vegetation Masks run-time.

    For some games/scenes with huge terrains these dynamic features are not needed and the tree amount and placement does not change during the game.

    For these uses I have added a "Baked billboards" feature where the billboard mehes are generated in the editor and added to the scene. Select the "Baked billboards" tab and click the bake billboard button.



    This generates the Mesh GameObjects grouped in the Billboard Cell areas.



    and adds a BakedBillboardController component. This manages the billboard material properties for culling etc.
    BillboardSystem component and the dynamic billboard meshes is disabled automatic.



    The rendering speed is still the same and really fast but you save memory and starup time for large terrains at the cost of run-time updates and density changes.

     
    nirvanajie, antoripa, Olander and 5 others like this.
  13. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    This evolution of this asset blows my mind every time I check the thread. Going to need a lot of tutorial vids for new users to get up to speed.
     
    Last edited: Jul 31, 2017
  14. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Plan is to work on those while Unity approves the asset. For now I focus on the last features.
    Did some testing on 2017.1 and 2017.2 Beta today, seems to work good. Only a couple of warning on the 2017.2 beta.
     
    P_Jong, buttmatrix and Alverik like this.
  15. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    I'd recommend at least getting a handful of them done prior to submitting. I remember @AdamGoodrich having the same plan when he initially launched Gaia. Evidently someone on the asset store team had been watching progress and it was posted in a couple days. He thought he was going to have that 1-2 weeks to get his videos done. Best to have at least a couple videos covering walk thrus of the basics that last week as your beta team is kicking the tires on your release candidate. Better safe than sorry.. heheh
     
    AdamGoodrich and Olander like this.
  16. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Good idea :)
     
    Alverik and PeterB like this.
  17. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Added a new feature to the texture mask system today.
    When adding new mask texture they are by default referenced and serialized by the Vegetation Package.
    You can now choose to store this reference in the VegetationSystem component.

    This is useful for scenes where you want to use the VegetationPackage on multiple terrains and have texture masks that are terrain specific like splat or control maps.

    Any changes to the rules in the Vegetation Package will still apply to all the terrains but they are using the locally assigned texture masks.

     
  18. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Did a test to see how the demo scene compiles for Android on my phone. .

    I had to set the grass and flowers back from instanced indirect to instanced rendering. There is a dropdown menu to set that. I reduced grass density a bit and distance to 75 meter. 150 meter tree mesh distance. billboards after that.
    Trees are Speedtree desktop trees.

    2000x2000 meter terrain. about 500 000 grass and flower patches. 10 000 trees



    With phone screen resolution set to 1440x720 this is the stats i got.

     
    Last edited: Aug 3, 2017
    ice2011, docsavage, antoripa and 11 others like this.
  19. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Worked a bit on the inspector UI.
    I am replacing the normal Unity AnimationCurve editor with the popup window with a custom Curve Editor where you can edit direct in the inspector.

    This is going to replace the current CurveEditor for both VegetationItems spawn rules and the TerrainSystem components rules for SplatMap Generation



    The new editor will show relevant info based on the current ranges set for the curve.


    It can also show current sea level relative to the current range of the curve.

     
    Last edited: Aug 6, 2017
    Alverik, mons00n, buttmatrix and 2 others like this.
  20. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214
    looks awesome! when you thing goes live on asset store?
     
  21. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Beta testing is going good. I would guess another 5-6 weeks and the time Unity needs to approve the asset.
    This date may change. I will not release before all features for the relase version is working as planned.
     
    PeterB and Alverik like this.
  22. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214
  23. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,476
  24. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    Yeah... I think anyone finding this thread would die to be a beta tester. Not only does it looks simply amazing, but who knows how much the asset will cost once it's out... Though, for this asset, I'll save however I can, lol.
     
  25. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    @khos and @Alverik

    I can still get in a few more beta testers, if you have a project you want to test Vegetation Studio with contact me on a private message.
     
    Last edited: Aug 7, 2017
  26. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    Cool, thanks! I sent you a message. :)
     
  27. MortenGulden

    MortenGulden

    Joined:
    Mar 15, 2015
    Posts:
    19
    Just playing with the beta and thought I'd share a couple of screenshots from the garden I'm fiddling with. It's very easy to get really dense vegetation with Vegetating Studio, I tend to go a bit overboard with it. My next step will be to use density maps to get a symmetrically planted flower bed with the different colored flowers in proper stripes or other patterns :) Also am getting close to a rough stone path on a pebble terrain texture witch is interesting. Looking forward to the release!



     
    ftejada, docsavage, radimoto and 8 others like this.
  28. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,476
    Nice work! Your grass distance is really good, looks very nice. How do you get the different grasses on different areas? :)
     
  29. MortenGulden

    MortenGulden

    Joined:
    Mar 15, 2015
    Posts:
    19
    Thanks! I'm having fun trying to figure out how best to use this thing, it really is great to just play with. So fast :)

    In Vegetation Studio it's a combination of different "rules" that define what grasses (or trees or rocks or whatever) go where.

    There are basic rules like "only grows high up where the ground is flat", and advanced functions for masking specific areas and placing stuff in them using grayscale (or even color) bitmap masks, and other fun things like that.

    This scene has a "wilderness" using only a few assets and simple generic rules that could be applied to any similar terrain. It covers the 2x2km map with a forest. I then created area masks to remove wilderness and put in wheat where I wanted the fields (with growth pattern from a grayscale distribution bitmap to get the "lines" fields often have for some reason) and lawn grasses around the houses. I'm currently placing all the flowers around the houses using a handful of line and area masks.

    The houses and props all automatically mask out vegetation under themselves using their colliders which is super handy.
     
    Alverik and LennartJohansen like this.
  30. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214
    comes vegetation studio with CTS support?
     
  31. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes, Vegetation Studio works great with CTS. The only feature you can not use direct is the function to change terrain textures run-time when you switch between Vegetation Packages. CTS needs to pre-compile the terrain textures to texture arrays.

    The texture switch is normally used to swap out summer to winter textures etc but since you can do automatic in CTS with adding snow and other settings it is not that important.

    I will probably add a small helper component that allows you to switch between different CTS profiles as you go from one Vegetation Package to another.
     
    Alverik and MortenGulden like this.
  32. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    But you will be able to draw textures on the terrain without having to pre-compile CTS again or is this also not possible than? Similar to drawing height. Like creating terrain with Vegetation Studio, adding CTS to it and after that drawing some new pathways like ways using a cobble or dirt texture to a house for example.

    Like this here:

     
  33. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    That works. you can change the splatmap and heights just as normal. CTS gets all that run-time from the terrain component.
     
  34. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I have been doing some work on the Unity editor integration.
    Vegetation Studio now has support for multiple scene views in the editor.

    Vegetation culling will now automatic adjust to the active sceneview window while in editor mode.





    Multi camera solutions in run-time also works. That is done by duplicating the VegetationSystem Component object and assigning one camera to each. You also need to check the render direct to camera checkbox on the Render tab.
     
    red2blue, Alverik, buttmatrix and 2 others like this.
  35. RepoGames

    RepoGames

    Joined:
    Apr 15, 2016
    Posts:
    69
    I would double check the normal mapping to make it look even better(checked only first page)
     
  36. kaamos

    kaamos

    Joined:
    Aug 6, 2013
    Posts:
    48
    So I've taken some time this weekend to throw together a really quick and dirty test of Vegetation Studio and I think the results aren't too bad. The performance in these shots sits at a solid 40ish fps at full screen, on a 4km terrain, on a fairly modest video card, and there's plenty that could be optimized to run even faster.

    shot_1.png shot_2.png shot_3.png
     
    Last edited: Aug 13, 2017
    eaque, ftejada, maxaud and 10 others like this.
  37. LennartJohansen

    LennartJohansen

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

    I did a small video flying in the terrain on the demo scene for Vegetation Studio.
    This is done on my laptop with a 2.8 Ghz i7 and a Nvidia 1070 graphics card.

    All vegetation is spawned runtime as you move around the terrain and it comes into view.

     
    Koara92, Alverik and Seneral like this.
  38. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I noticed in the last beta release notes that you're going to up the shader model requirements to 5.0 and it was previously 4.5. Our attempts to get this to work on the Wii U seems undoable now. Wii U is only shader model 4. So, I'll give up on that idea and think of VS only for future PC/Xbox titles.
     
  39. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    It still works on 4.5 the compute shader improvements for spawning has a fallback to c# code.
    If you do not use the instanced indirect grass it should run on 4.0. You can change the rendering method on the grass.

    But using the Instanced Indirect API for grass rendering will give a good speed increase.
     
  40. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Hmmm. So, even if Unity adds GPU instancing to Wii U it would need 4.5 to work still?
     
  41. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    No. GPU instancing works on shader model 4.0. If you switch the grass render mode to Instanced it will have a 4.0 requirement.

    Instanced Indirect requires Shader Model 4.5. It uses compute buffers on the GPU to hold all the instance info needed for rendering. This is faster than normal instancing but does require newer hardware.
     
    nirvanajie and MortenGulden like this.
  42. Sp-ce

    Sp-ce

    Joined:
    Feb 2, 2015
    Posts:
    65
    @LennartJohansen This looks like stunning work! Is it possible to be a beta tester? I have a rather odd use case that might be of interest.
     
  43. ranaUK

    ranaUK

    Joined:
    Mar 1, 2017
    Posts:
    166
    Any launch date? Eager to try it out on vr single pass
     
  44. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Estimate is about 5 weeks + the time asset store need for a review.

    Vegetation Studio works good with Single Pass VR, several of the beta testers are using it for VR projects.
     
    Alverik likes this.
  45. ranaUK

    ranaUK

    Joined:
    Mar 1, 2017
    Posts:
    166
    Can not wait :D
     
  46. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    antoripa, jbooth, Seneral and 2 others like this.
  47. RobsonFMaciel

    RobsonFMaciel

    Joined:
    Jan 12, 2013
    Posts:
    187
    magique likes this.
  48. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
  49. sarum

    sarum

    Joined:
    Mar 2, 2014
    Posts:
    212
  50. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Looks great
     
    manpower13 and antoripa like this.
Thread Status:
Not open for further replies.