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 have the TerrainMesh component working. Last step is to connect it to the VegetationSystem component without any breaking changes for existing project. With this you can add serveral meshes to be combined to a virtual terrain and spawn vegetation on this.

    I will write a bigger post with examples when I get back from my trip.

    Lennart
     
    Lars-Steenhoff, Mark_01 and Aaron2348 like this.
  2. Matthias1231

    Matthias1231

    Joined:
    Aug 20, 2012
    Posts:
    62
    Hi Lennart,

    for various reasons I have a situation where I move the terrain under the player instead of the other way around. However I noticed this makes the grass flicker and the tree branches pop which looks like the wind movement somehow relating to the terrains world position. Is there a way to fix this so that the terrains world position does not affect the vegetation wind movement?

    Thanks,
    Matthias
     
  3. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    The grass wind is calculating the wind based on the world position. We could mauve try to use terrainspace coordinates for this. Calculate from a position relative to the terrain.

    What trees do you use?
     
    Lars-Steenhoff likes this.
  4. Hexaedre

    Hexaedre

    Joined:
    Jan 23, 2015
    Posts:
    110
    Hi,

    Is there a way to modify the max wind amplitude on your shader ?
    If not, is this something that you could add ?

    For a top-down game, the camera is pretty far away and I would like to amplify the wind displacement on the bushes and branches of the trees, to make it more noticeable. I use custom trees and if I can do that, I will probably use your shader for the trees.
     
  5. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I am traveling until Sunday. Send me a pm and we can look at this when I am back home.

    Lennart
     
  6. Matthias1231

    Matthias1231

    Joined:
    Aug 20, 2012
    Posts:
    62
    Yes, if there is a way to force local space, that would be great.
    I am currently using Unity trees from Nature Pack.
     
  7. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    There is not now, but possible to add. We would have to pass the terrain position to the shader and use with the wind calculation.
     
    Lars-Steenhoff likes this.
  8. Matthias1231

    Matthias1231

    Joined:
    Aug 20, 2012
    Posts:
    62
    Sounds good, if it’s not too big of a deal or adversely affects performance, that would be appreciated. Otherwise I will have to rethink what I’m doing on my side.
     
  9. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    may I ask why you do something that 80-90’s?
     
  10. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    One reason could be floating point errors prevention
     
  11. Matthias1231

    Matthias1231

    Joined:
    Aug 20, 2012
    Posts:
    62
    Maybe because I grew up in the 80s, haha.
    Actually, I'm working on an RPG where you enter a town that has a larger scale than the outdoor world. While in town I like the outdoor world to be visible as a background/horizon, so I am moving the town under the player and keep my outdoor world static until the player leaves the town again.
    As mentioned by Lars, the floating point error prevention is another reason. When moving in my outdoor world, the terrain is moved to a new world location when the player moves onto a new terrain tile.
     
  12. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    aAh I see, make sense! And I grow up in the 90’s :D
     
  13. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    Hello.

    I am trying to spawn speed tree grass on my terrain however not a single instance is spawned :(

    Here is my heatmap:

    heatmap.PNG

    And here are my settings:

    settings.PNG

    Can anyone help me with what ive done wrong?
     
  14. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    I dont understand. Tick off exclude rules
     
  15. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    It still doesn't spawn anything :(
     
  16. LennartJohansen

    LennartJohansen

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

    First. The sample distance is set high. With 80 meters on sample distance. Density to 0.8 for the vegetation item you should in average get one per 100 meters. With the perlin noise cutoff of 0.465 that would reduce even more.
    You are probably looking at one item per 150 meter.

    Can you try to reduce the sample distance.

    Send me a PM and I can help you configure a bit.

    The heatmap shows the potential spawn area based on height and steepness rules.

    Lennart
     
    mattis89 and recon0303 like this.
  17. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    VS is on sale today for anyone who has planned on buying but couldn't afford it...I suggest to buy it, its well worth the price with out the sale..and then some...but if you couldn't afford it, I suggest to buy it right now..! Its a steal right now...... and the developer Lennart, works his ass off, and made an amazing tool for Unity.. We are using it for our current game for Steam, and I love it... I been using other tools, and they do not compare when it comes to PC... a bonus it works well with other well known assets, such as Barts foilage and tree assets and ATG assets as well as Turbo's assets..and many more I'm sure..
     
    lightwaterjohn, Mark_01 and Vagabond_ like this.
  18. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Hello.
    I have successfully tested an enhancement related to the integration between Cascade and Vegetation Studio.
    Below a first preview of the new UI where you will get a great automatism and flexibility to generate and update masks along the river. Synchronization is full, real-time and automatic, including the triggering of vegetation respawn after you carve the river bed digging the terrain.

    upload_2018-5-2_9-0-22.png
     
    SirTwistedStorm, Rowlan and recon0303 like this.
  19. netstabber

    netstabber

    Joined:
    Jan 8, 2018
    Posts:
    2
    HI
    your plug is very good, but how can i use it on ios .
    you said:"compute shaders are only available on Metal "
    But when i build on Iphone .i Ican't see your demo grass, please help me thank you
     
  20. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. For iOS try to set the render mode on the Vegetation Items(grass) to Instanced.
    I answered your email now also.

    Lennart

    EDIT: That fixed the problem
     
    Last edited: May 3, 2018
    Lars-Steenhoff likes this.
  21. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    764
    hi,
    i have an old gtx 660ti can i enjoy VS?? I would like to by with the special sale...
    Cheers
     
  22. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. the 660Ti supports shader model 5.0 and should work with all features, but the amount of vegetation you can render at a high frame-rate is limited by the speed of the graphics card.

    Lennart
     
    Last edited: May 3, 2018
    eaque likes this.
  23. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    764
    Many thanks!! i took the risk and bought it!! Anyway it should be far from unity default system!! lol
    thx;):)
     
  24. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    I have a Radeon HD7700 card and it works fine :)
     
    LennartJohansen likes this.
  25. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    I use GTX 750 Ti and the speed up is great !
     
    LennartJohansen likes this.
  26. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    I use a 660 ti and get 30-60 fps with pretty dense jungle. Obviously you have to tweak distances etc.. but using instanced indirect helps on everything. I even use a volumetric light solution and a tonne of post process camera effects and its fine.
     
    eaque and LennartJohansen like this.
  27. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    764
    it seems i cant move my character since i downloaded VS. IT's the Third person character from standard asset...My pad only moves the camera...I don't see any change in the inputs...any idea?
    thx
     
  28. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    764
    Many thanks!! first try is very promising!!!!!
     
  29. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Vegetation Studio does not control camera position or anything related to input. Send me a pm and I can try to help you debug.

    EDIT: Problem was a script on the 3rd person controler that was disabled.

    Lennart
     
    Last edited: May 5, 2018
    eaque likes this.
  30. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Hello,

    Quest question about the Seed values in VS.

    Is it possible to have a setting where each item is given a unique Seed value? In other words, a way to make sure that no items share the same seed value?

    Also, it would be most useful if there was a way to match the Runtime Prefab Spawner's seed value to the item that it is attached to.

    I know that this is all doable manually but when dealing with 64 items, most of which have Prefabs attached to them, it can become quite an ordeal making sure all items are synced.

    Really loving this asset, i must add.

    Thanks,
    Nathan
     
  31. UnityRocksAlt

    UnityRocksAlt

    Joined:
    Dec 28, 2015
    Posts:
    157
    Hi,

    Is it possible to convert to mesh using Terrain to Mesh Converter? Will everything stay intact? I would love to know, thanks.
     
  32. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hello,

    Thanks for this asset, it really seems to be very good, I just bought it :)

    I downloaded the additional download-demo-Scene. Looks beautiful!

    But the game I want to create has the camera nearly straight from top looking down (75°).
    Now the gras does not look good anymore...

    Can I get somewhere gras that is made for a view from above? Is there something somewhere or maybe is there some hint how to get it looking good from above also?

    Is there a Chance to get both, a gras that Looks good from 1st Person and from top down view? When changing the camera, maybe for cutscenes / cinematics?
    That would be perfect. But top down is more important.

    Thanks a lot :)
     
  33. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Hi. The standard grass patches are configured to get morevisible area from the sides.
    There is an included tool. The Grass Patch Generator. That allows you to make custom grass patches. Here you can adjust the bend of the grass planes to get a better cover from above. Play around with that until you get patches you like. Save as a prefab with LODs and add as a 3D grass to Vegetation Studio. The default grass patch is also made this way.

    You can find more info here.

    Lennart
     
    Firlefanz73 likes this.
  34. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Vegetation Studio needs a Unity Terrain to sample for heights and normal. Depending on your configuration it might also need the splatmap.

    You can convert the terrain to a mesh if you still leave the original terrain in the scene. It can be disabled.

    I will do a post soon showing the new Mesh Terrain component for Vegetation Studio. With this you can add multiple meshes to a virtual terrain and add to Vegetation Studio.

    Lennart
     
    ftejada and blitzvb like this.
  35. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    What you want is a "button" to randomize the seed of all vegetation items. Making sure they all are unique?
    For the run-time prefab spawner a GetSeedFromVegetationItem setting could be an option.

    Lennart
     
    nathanjams and Mark_01 like this.
  36. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    Yes and yes! If possible this would be immensely helpful.

    Nathan
     
  37. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Djayp likes this.
  38. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Soon. I am finishing a Mesh Terrain component now. It is working but I need to restructure some code to get it in the main branch without breaking any backward compability. It will allow you to add multiple meshes together as a virtual terrain and spawn vegetation on that. It will use the same rules as for unity terrain but the terrain texture rules will be ingnored.

    Lennart
     
  39. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I'm using Voxeland for my terrain, it has an option to tag, add a component or set it to a layer and then once the terrain is regenerated all chunks/terrain sections will have them added. I hope this will work.. it has it's own manager but a secondary one for Vegetation Studio will hopefully be harmless. Do you think it could work with a procedural mesh/landscape generator such as this?
     
    Last edited: May 5, 2018
  40. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Hello,

    I have an issue with my trees that appears to have some transparency problems
    Image 132.jpg

    Those are speedtrees. If it's important: I'm using Enviro and also Aquas

    I can't figure out from where this issue comes...
     
  41. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,295
    I gotta give Lennart credit. I was toying around with new assets that I bought during the sale. And I admit, I wouldn't want to paint all that vegetation by hand. Adding these Ferns of @turboscalpeur was just a few clicks and now the dragon runs through an entire world of green :D This is so awesome :)

    vs-01.jpg

    vs-02.jpg

    vs-03.jpg

    vs-04.jpg
     
  42. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Does this change:
    "Colliders now work for instanced indirect rendered vegetation items"

    Fix the vegetation on vegetation issue?


    If not when is a fix planed? Because having to bake the vegetation to avoid this issue does not make sense having realtime vegetation at all.
     
  43. kepesh

    kepesh

    Joined:
    Dec 29, 2017
    Posts:
    92
    Would it be possible to add translucency to the grass shader?
     
    Suavomirro likes this.
  44. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    hello! quixel megascan veg & rocks with VS?
     
  45. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes. That should work good. You just need to use a shader that support instancing.

    Lennart
     
  46. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I have some grass shader work planned for a bit later. I will look at it when I do the touch react update.

    Lennart
     
    kepesh likes this.
  47. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    I will include the option to use collision detection with large objects in the next update. The same as trees have now.

    Lennart
     
    mattis89 and Mark_01 like this.
  48. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Not seen that before. You use the standard speedtree shader?
    Effect looks almost like ambient occlusion. Do you use any post processing effects?

    Lennart
     
  49. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    Yes. I think it should work. as long as the output from the generator is normal meshes that render with a meshrenderer.

    Lennart
     
    Ascensi and Djayp like this.
  50. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    1,151
    Something weird is going on... I cant use megascans in unity.. Its not set up when I import..so I have too see whats going on.. waiting for the intergration...
     
Thread Status:
Not open for further replies.