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

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    Glad to see some new people on this thread as interest drums up prior to release. This post is just some support re our experience with Vegetation Studio thus far.

    VS is totally awesome and frees up the ability to create really dense vegetation at extremely low cost. I can't think of any other asset that delivers such an advantage.

    As many will know, dense vegetation is a pipeline dream for most game designers, and most have to "trick" players into believing there is dense vegetation as a workaround to keep frame-rates up ... which takes a lot of skill to do effectively. With VS its almost a non-issue ... just plant the scene as you like it ... plus you have the ability for it to procedurally spawn the majority of your vegetation, then "touch it up" and manually populate vegetation items in areas you want "specially designed".

    Having been involved on the Beta program for this product has been a great experience, and Lennard and I have spent many late nights bug-hunting and discussing features ... and I must say he's one of the most impressive developers I've met ... his work-rate at adding new features and fixing bugs is just unbelievable.

    I've been trying to get one of our scenes to a point I can post some screenies to support the launch of VS, and while I'm not there yet (real life commitments etc) and they need some more tweaking and post processing etc, I thought I'd put some up before I totally miss the bus. Also may be good they don't have the eye-candy additions yet so readers can see then in raw form.

    Being the beach, this area is probably not too dense, but the 2k x 2k scene has hundreds of thousands of grass and small plants (including underwater), and around ten thousand trees.

    I'd also like to commend (and 100% recommend) Jason Booth for his Free MicroSplat terrrain shader asset - which totally plugs into VS and they have built-in integration like creating colormaps including grass etc for distance viewing. Justin is hands-down the best shader developer I've met, anyone doubting that needs to watch his Unite presentation video (Rendering 10000 objects on low end devices). I really don't understand why everyone doesn't use it - its free and immediately allows you to use up to 16 terrain textures plus loads of enhancement options on the shader, plus its the fastest terrain shader for unity. If you want even more power (like the Streams module I added for these examples, you can add them for a small cost).

    You can't see it in the pics, but the Streams module adds a fully animated sea-level wetness - so you get the wetness of the beach waves animated onto the beach. I have water running back there too. So the water here is Suimono infinite ocean, with its Shorewaves module creating waves that wash up onto the beach based on the terrain shape underwater (so where reefs are you'll have waves breaking etc and waves onto beaches following the beach contour), MicroSplat then paints the animated 'wetness' onto the beach surface, and I added some water streams for wash returning to the ocean. I probably need to get something to record a video to show it.







    Other assets to mention here are Tenkoku (sky and light system) ... which integrates with Suimono (same author), so light color and weather affects water etc.
     
    Last edited: Nov 17, 2017
    P_Jong, ftejada, AndyNeoman and 12 others like this.
  2. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Strange :) The product have to be released before you can apply to be part of the sale, but I will be having my own sale anyway the first few days.
     
    Teila, Anon32, osss and 4 others like this.
  3. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes. The meshes and colliders rendered to the touch buffer are updated every frame, you can scale and rotate as much as you want.
     
    Anon32 likes this.
  4. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi,

    This asset looks very promising.

    Does the billboard system work with other meshes or just trees ?
    If yes, have you consider to make a separate package with just the billboard system ?
    I haven't seen any up to date solution for billboards generation from meshes on the asset store.

    Performance wise, what is the difference between Vegetation Studio and Unature, specially for the grass ?

    Also, I am using MapMagic. Are they fully compatible or is it possible to create a plugin in order to make them work together ?
     
  5. LennartJohansen

    LennartJohansen

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

    The billboard system will create billboards of any mesh if you assign it as a "tree" in Vegetation Studio. The basic Atlas generator renders an unlit version of the object using the _MainTex in the material. Then light is added when rendering as a normal susface shader. There is also a couple of other renderers for speedtree, Custom Tree Importer shaders etc. These will in addition handle, color tint, HUE etc.

    There is a coulple of limitations with the current implementation since this is designed for trees it only samples the mesh from the sides and top allowing for individual rotation around the Y axis. Making billboards of a rock and having each rock instanced rotated random in all axes would not work. Current max resolution is 8x8 samples and if you wanted to billboard a house 45 degrees between each sample would probably show good when the shader switches from one to the next.

    This could be done but would require sampling the mesh from bellow also. This could allow for tilted trees and is something I will prototype at some point.

    While it could work as a separate asset i think it will need a bit of framework around it to handle batching together billboards in a billboard mesh. You do not get the speed benefits if you render one billboard at the time.

    I have not used Unature and have no numbers to compare with Vegetation Studio.

    Vegetation Studio works great with terrains created with MapMagic. If you want MapMagic to handle the tree distribution you will have to import these from the terrain to Vegetation Studio. I have been talking with Denis about creating an output node for MapMagic that writes direct to the Persistent Storage in Vegetation Studio. I will look more at this when Vegetation Studio is released.

    Lennart
     
  6. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,292
    Apologies for spam, but Vegetation Studio is awesome :) I was toying around with the Runtime Prefab Spawner. Works absolutely great. A feature request might be to be able to specify the maximum number of instances that can be spawned. I tried dustmotes, in case someone needs similar, they are from the Unity Particle Pack. I guess one could easily create fireflies from it which would add to the atmosphere.

    Here's a comparison video with Vegetation Studio On and Off. The difference is like night and day :D

     
  7. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,292
    I noticed that also wind is supported, which is totally awesome. However, only 1 kind of trees move in the wind. Of course I want more now :D Any idea why that is and how I can achieve that everything moves with the wind? Looks like this, you can see the movement depends on the type of tree, others are unaffected and static:

     
  8. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    What shader is used on the trees that does not move?
     
  9. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,292
    Where can I find that? I clicked through everything, there are so many options. But none with shader, unless I missed it.
     
  10. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,292
    nvm, found it. The ones who work are set to Nature/SpeedTree, others are set to Standard and LightingBox/Nature/Leave Standard (Wind Support).

    I reimported VS and after that Lighting Box 2 and everything is fine now.
     
    Last edited: Nov 17, 2017
  11. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Standard shader has no wind support. LightingBox/Nature shader I do not know. It might need a wind parameter to the MaterialPropertyBlock. I will contact the developer and find out what is needed.
     
    Rowlan likes this.
  12. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Adding a max number of instances is not hard to do but the problem is that a prefab could be excluded based on the viewpoint of the camera. this way it could pop in and out of existance based on what you are watching.
    If you want to limit the number of effects spawned try to decrease the spawnchance. This chance stays constant based on the seed set.
     
    Rowlan likes this.
  13. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,292
    Thank you. It might have resolved with the latest lighting box version. I have no information what the developer did in earlier versions. But when I removed vegetation studio and lighting box and re-added them both, everything was fine. Maybe the mechanism got changed?

    That's how I solved it currently. However, I was running from one tree to the other. My effect didn't show up at the new one, because the effects were still at the old ones, even though I wasn't there and didn't look there. I've seen the effects in the editor. I had to run further away to another tree to make another effect appear. I guess one would have to find a proper mix.
     
  14. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    More billboard development.

    Hi.

    I am still working on some more improvements to the billboard system.
    Space in the Billboard Atlas is now used better. This gives a 4x the amount of pixels per tree at the same total atlas resolution.



    The Max resolution mode now has 512x512 pixel area for each tree in a 8x8 grid.



    Since we now have a bit more space to work with i added 2 new Atlas modes. HighSample2D and HighSample3D.
    These modes generates 16 samples in each direction, giving a sample at every 22.5 degrees.



    The amount of samples does not affect renderingspeed and the new 16x16 samples still takes 21.3mbyte compressed as a DXT5 texture in memory since we use the space better.

    The effect of better packing of the atlas will give less discarded pixels in the pixel shader and should help on speed when pixel shader bound.

    Last change is in the billboard shader. I am now adjusting the MipMap bias a bit and sampling a bit lower mip map. This gives the billboard a look closer to the real mesh trees at distance.

    The billboard changes will require the atlas to be regenerated after update to the next version. But this is 1 button click on each tree.

    Lennart
     
    Seneral, Mark_01, ftejada and 5 others like this.
  15. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    How is the change from billboard to mesh? Is it popping? Do you have a video that show that.

    Keep up your awesome work!
     
  16. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Depending on the distance to the mesh/billboard change you can still see the change. I am doing some testing to add a dither crossfade to the transisiton but it requires some additions to my rendering framework. Since this is rendered using the instancing API there is no LODGroup that can set the unity_LODFade parameters used in most fading in shaders. I am trying to override this but looks like we have to do a change to the speedtree shader to read the value from another variable.

    I will make a video showing the change.
     
  17. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    Last edited: Nov 18, 2017
    blitzvb likes this.
  18. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Not that simple since Unitys solution requires a LODGroup to work. Vegetation Studio manages all the vegetation rendering without GameObjects. The end result would be the same but I need to manage this in VS and feed the LODFade parameters manually.
     
    Baraff and mwituni like this.
  19. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Hello,
    Just wondering where I can buy this amazing asset?
     
  20. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,292
    It was submitted to the Asset Store, but we have to wait this awkwardly painfully long process of Unity to release submitted assets. You can however sign up here for a newsletter to get you informed once it goes live:

    https://www.awesometech.no/
     
  21. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    It was submitted for review 12 days ago. My best guess is a bit more than a week to wait.

    Lennart
     
  22. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Ughhh, Unity needs to hurry. :D
     
  23. roykoma

    roykoma

    Joined:
    Dec 9, 2016
    Posts:
    176
    Would like to see it released tomorrow - just to see how it can compete with 61 50% discounts and thousands of discounts with less then 30% (wording from unity). It probably would still make it in the first two pages ordered by popularity.
     
    Anon32 and Teila like this.
  24. StormchaserZA

    StormchaserZA

    Joined:
    Nov 13, 2016
    Posts:
    30
    I just simply cannot wait for this asset!
     
    Harekelas, Teila, Rowlan and 2 others like this.
  25. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    I don't think I can wait a week lmao.. Anyway to buy from your website? haha :D
     
  26. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,292
    In case anyone wants to see how the currently on sale Bird Flock Bundle (in addition to Aquas and Enviro) integrates with Vegetation Studio, I made a short video. Bought it yesterday. It's a bit heavy on the performance, but all I did was drag and drop in to the scene. I'm sure there's lots of room for tweaking:



    @LennartJohansen Any plans for selling environmental asset packages separately? Butterflies, Fireflies, Birds, etc. They'd totally go very well with Vegetation Studio and give additional atmospheric boost. Not that VS already would do that on its own, but once you are in, you always want more :D Oh, and of course vegetational packages like desert, under water plants, etc. In the future I'll especially look out for assets which have "Vegetation Studio compatible" in their description :)
     
  27. ACarrozzini

    ACarrozzini

    Joined:
    Mar 24, 2013
    Posts:
    16
    +1

    Is there a way to get it earlier ? Even in beta, I would be very interested !

    @LennartJohansen Pleeaaassee ! :(
     
    mwituni and blitzvb like this.
  28. mwituni

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    Save your smarties ... Nothing on asset store, sale or not, anything like this... its the most effective asset I've experienced ... A total game-changer !
     
    Rowlan likes this.
  29. mwituni

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    The nice thing is VS just works, with just about any reasonable asset ... I found some that's not compatible ... but they are badly built and highly inefficient, so its a good thing.

    But yes, good idea .. @lennard ... You need the "VS compatible" logo, as no doubt asset builders would like to add it.
     
    Rowlan and blitzvb like this.
  30. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. There is a logo. Like on this asset package from NatureManufacture
     
  31. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Video looking good. :)

    I have no current plan to release environmental assets, I like the coding part and am not the best artist :)
    I am working with many of the developers of asset packages to make sure everything works.

    As an example the first update of Vegetation Studio is adding a custom billboard atlas renderer for the Tropical Forest Pack. This and other asset packs that use the Custom Tree Importer shaders will get billboards that support the color tinting used. Wind will also be injected direct, no need for the extra wind component. And instanced indirect support on the plants.

    I am working with Lars to update the Advanced Foliage Shader to support Vegetation Studios instanced indirect rendering out of the box.

    In addition to these and others we are working on, most assets will probably work direct, but with some small changes we could get some additional functionality.

    I will be adding a recommended assets section to the website where I will list the assets we did extra integration and testing with. Also setup guides if it is needed.

    I also added a guide to the website for how to upgrade existing shaders to VS Instanced Indirect support.

    Lennart
     
    jdraper3, Mark_01, rrahim and 4 others like this.
  32. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    hi @LennartJohansen

    I do not know if it would be possible for direct and indirect representation, but it would be great to integrate it with InfiniGrass.

    Any plans for this?

    regards
     
  33. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Upgrading shaders.

    In addition to the guide on the website for upgrading shaders I have set up a github repo with the files needed.

    https://github.com/AwesomeTechnologies/Vegetation-Studio-Instanced-Indirect

    The files are under MIT licence and I will be keeping them updated and adding more as Vegetation Studio progresses to help enable new custom functionality in shaders.

    Lennart
     
    jangomoose and MarkusGod like this.
  34. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    Does this system allow to paint vegetation on meshes, if not are there any plans for it or is it even possible inside the Unity ?
     
  35. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    That works good. There in an option on the included painting tool to paint on any mesh with an collider. In addition to this there is a precision painting tool that can paint on any mesh, no collider needed. It builds an octree of all meshes in the scene and raycasts them manually to find the paint location.

    The rock you see here is a normal GameObject.
     
    P_Jong, Farelle and Rastapastor like this.
  36. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    Great, thanks for the reply. Its bringing me even closer to buy it when released :).

    Unity must harry up :)
     
  37. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Btw, when yoy have time it would be great to have a documentation for touch bend component pipeline, so we can update our shaders for full compatability with VS.:D
     
  38. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I will get around to that. The TouchReactSystem component does all the heavy lifting. It sets two global shader parameters. A texture with the touch buffer and a Vector4 that holds the buffer world location and size.

    I will prepare an include file with a function that samples this and modifies the vertex position. You would have to include this file and call a function where you pass the vertex position as parameter that returns the new position.

    We could maybe look at making a node for Amplify Shader Editor that does this. Would this be useful for anyone?

    Lennat
     
  39. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    Ye it would be awesome, some like to meddle with spaghetti than writting tons of shader code :)
     
    Rowlan likes this.
  40. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. I have not used InfiniGrass but from looking at the asset store now I think the approaches to touch bend and rendering is a bit different. You might get the grass shaders to work with VS but needs to be tested.
     
  41. mwituni

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    @Lennart, not near Skype today ... But I think a good future addition is something like an option to specify a "top position" ...think of seaweed or water lilies on a lake etc, so one can specify the y position at top (just above water or just below for kelp, and VS can calc the root position ... which will often be under terrain. This will allow to still use some randomness in plant scale.
     
    MarkusGod likes this.
  42. mwituni

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    Regarding my earlier post with some screenshots of one of our beach scenes using VS and Microsplat mostly, some pm'd me asking for a short video, so I'm adding here ... I'm no good at video but managed to grab this . I guess its more related to animated wetness in Microsplat, but VS in there too. We need to still sort wave timing etc out.

    Without VS and microsplat it was not possible (for us anyway) to use all the assets we wanted to use in an outdoor scene ... VS totally revolutionalizes that by making dense foliage cheap. I seriously can't see many outdoor games not using these going forward....

     
    Last edited: Nov 21, 2017
    P_Jong, Olander and LennartJohansen like this.
  43. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    That's great news, I had a problem setting up my hybrid shader (cross between Tropical Forest Pack and the AFS foliage shader (both made by Lars) with instanced indirect. Also i noticed the bilboards are not quite right on TFP trees so both my little issues solved!

    I cant wait for the full release and the support that has been outstanding even in beta continuing on full product and in the future in TerraFirma :). Hat's off to a top asset developer.
     
  44. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    You can already specify a Vegitems y position. Not sure how VS could account for height of plant mesh/texture though.
     
    mwituni likes this.
  45. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    It could be possible to do. Only top position we have for items is the top of the AABB bounds. I guess we could add an option to use the bounds top y as the pivot when positioning. I will have to look a bit at it. Added to my list.

    Lennart
     
    mwituni likes this.
  46. LennartJohansen

    LennartJohansen

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

    The work continues. I am preparing an update I will send to asset store when Vegetation Studio releases. It will contain the new billboard changes as well as a list of smaller changes and fixes.

    Together with Jason/Microsplat we finished a new feature now. Vegetation Studio has a new component called ShadowMaskCreator. This will render a shadow mask containing the profile of all trees and large objects. This mask is added to a ShadowMask module included in the free Microsplat core asset.
    Microsplat will then raymarch the created mask to create shadow approximations very cheaply, and we crossfade them when nearing the far range of Unity's shadows.

    Shadows are following the direction of a directional light you assign to Vegetation Studio.

    CPU cost is 0 and GPU use is low. The shadows are projected on the terrain.



    Exported mask



    All shadows seen here is created using this mask.



    Small video of a day/night cycle.


    Lennart
     
    mh114, P_Jong, FargleBargle and 16 others like this.
  47. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    are you planning to support other terrain shaders with this feature?
     
    Quique-Martinez likes this.
  48. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    The heavy lifting here is done in the terrain shader. If any other terrain shader want to implement something similar the output of the ShadowMaskCreator component is generic and can be used by any system. I am more than happy to explain how the mask data is stored.
     
    Mark_01, AndyNeoman, Teila and 2 others like this.
  49. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    If you add support for mesh terrain it will be an instant buy for me.
     
  50. blitzvb

    blitzvb

    Joined:
    Mar 20, 2015
    Posts:
    284
    Same here.
     
    Lars-Steenhoff likes this.
Thread Status:
Not open for further replies.