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] Advanced Dynamic Shaders - GPU wind shaders

Discussion in 'Assets and Asset Store' started by BOXOPHOBIC, May 16, 2018.

  1. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    After this update, I am planning to add LW and HD support, for unity 2019.1 or higher.

    Now here comes the tricky part, since it requires a lot of work, maintenance and upgrades for every nth unity release, I'm thinking to release LW and HD as separate packages, at around 8-10$ each and keep ADS at a lower price.

    Besides LW and HD, I'm also planning to create add-ons for Mobile Lit shaders, super optimized, no fancy features and Toon Lit, same features, cartoon shading.

    Let me know what you guys think.
     
    Teila likes this.
  2. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Good news.

    For testing OcclusionProbes.
    It is done in 10minutes.

    Download from git.
    Include in your project. copy/paste

    Open your Amplify Shader and integrate the OcclusionProbes Shaderfunction.

    Create a OcclusionProbe box around your vegetation and hit Progressive Lightmapper.
    It bakes the occlusion probes.

    Finished.
    Looks great without.
    Look better with.
     
    Last edited: Jun 28, 2019
  3. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Yes don't forget since pretty much all things mobile VR run thru android please don't forget single pass rendering for all mobile shaders as well. I'm working on mobile vr environments and could really desperately use some new light weight shaders to make it all look as best as it can and run good on mobile.
     
  4. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Looks nice. I would prefer alpha cutout until it's invisible as well.
    It's a lot faster than crossfade and looks better. :)
     
  5. Source-technology

    Source-technology

    Joined:
    Dec 2, 2016
    Posts:
    21
    We think that the current version (2.2.1) has a serious bug, which will prevent us from using the plugin.
    The effect is as follows:
    If we use a Cloth Material, put the object into the scene and rotate it to 0. It will be interspersed.
    But if I rotate 90 degrees this problem will disappear.
    This has nothing to do with the wind direction
    This bug persists no matter how the direction of the wind is rotated, but if I rotate the wind and the object at the same time, the problem will disappear.
    This video shows the problem:
     
  6. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    ADS_OCCProbesTest.JPG ADS_OCCProbesTest2.JPG
     
  7. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hey. Any news about motion vectors?
     
  8. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hey guys,

    I've uploaded a new build to the Unity Asset Store.
    IMPORTANT! Please backup your project first, remove all the old ADS folders before updating, then use the ADS Hub 2.3.0 to install the package!



    Here are the release notes for v2.3.0:

    Features
    • Added - Shader GPU Instancer Support
    • Added - Shader Features Assets
      • The Shader Features Asset is designed to add/remove extra features to/from the ADS shaders without having to sacrifice extra keywords and add huge shader compilation times on build time
    • Added - Mesh Debug Options
      • The Mesh Global Debug option can be used to check where the wind is encoded on custom meshes. The info can be used after to pack the meshes.
    • Added - Shader LOD Scale Fade (Grass and Plants)
    • Added - Shader LOD Cross Fade
    • Added - Shader Lightmap and GI Support
    • Added - Local Motion support for Cloth shaders
    Improvements
    • Improved - Shader Motion Performance
    • Fixed - Wind Direction Issues
      • The wind arrow can be rotated in realtime without vegetation jittering
    Changes
    • Removed - All legacy assets
    • Removed - Advanced Lit Shaders
      • Replaced Advanced Lit with Standard Lit with transmission to reduce shaders

    Hope you guys have a great weekend!
     
    Last edited: Jul 8, 2019
  9. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hi. Since the Cloth shader is designed to work with any mesh and a flag is a mesh with no thickness, this behaviour is expected. I was thinking maybe to transform this shader into a Flag shader with correct behaviour since for a regular cloth the Generic shader can be used, but I don't know yet. For now, I added an option to enable the motion in Local Space for cloth. It won't take the global direction into account, but it will work fine for each flag. The new build is uploaded on the store.
     
  10. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hi. It looks awesome, much more depth and realism! Regarding motion vectors, this was the answer from the ASE guys but nothing on this side yet:
    I also tried to add the pass myself, but it didn't work as expected. The internal motion vector code scared me a little bit, so I gave up. Hopefully, they will add it asap.

    Have a nice weekend!
     
  11. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Thumbs pressed for motion vectors.
    Think TAA will level it up even more.
     
    BOXOPHOBIC likes this.
  12. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    183
    Hey there, great work on this! I will be purchasing based on the mention of MTree support.

    Is this still going to happen? I would like to buy both assets at the same time.
     
  13. Source-technology

    Source-technology

    Joined:
    Dec 2, 2016
    Posts:
    21
    Just updated the plugin, using local mode
    It does not solve the problem.
    Do i need upload the scene to you?
     
  14. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    Hi,
    This looks like a really interesting asset.
    Before I get it could you tell me if it works of with SpeedTree8 assets?
    One of the problems I have with the standard ST8 shader is that it only works well in forward rendering. In deferred the trees look quick ugly as the translucency does not work.
    How does you advanced dynamic shader deal with ST8 assets and translucency?

    Thanks!
     
  15. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hi. I just realized that after I uploaded the package. Redownload the packages, v2.3.1 is available, and I added detail motion to the cloth shader. Please let me know if there are any issues.

     
  16. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hi. I just sent an email to MTree's developer :) Once I have more on this, I will let you know.
     
  17. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hi. Speedtree8 is supported if it is exported from SpeedTree Unity Subscription. Speedtree Indie is not supported.

    Transparency is working fine on my side. Speedtree 8 and unity 2018.4 deferred. And here is a comparison between speedtree8 (left) and ADS(right):
    upload_2019-7-9_16-51-7.png

    My shader has consistent lighting between deferred and forward because it is always rendered in forward (at least for now).
     
  18. spinaLcord

    spinaLcord

    Joined:
    May 25, 2015
    Posts:
    29
    Recently there was a update. All my shaders (Default, [...], ) turned to a black one, after importing this asset. Even in a fresh project. I also tryed to delete the Shader Cache, but everything is still blacko_O Untiy 2019.1. I missing something?
     
  19. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Go to the ADS Debug gameobject, set the debug to anything, then Off again. It happens sometimes, but I couldn't find any repro steps...
     
    spinaLcord likes this.
  20. spinaLcord

    spinaLcord

    Joined:
    May 25, 2015
    Posts:
    29
    This was the clue. Thanks
     
  21. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    What about a single FBX tree with 2 materials. 1 material for the leaves and the other for the bark. I don't see anything in the docs or videos showing how to convert that over correctly so it plays nice with the wind? Does the tree need to be a single FBX with all of the tree as one mesh or 1 FBX file but the leaves and bark seperate in the FBX so it is easier to create the correct wind for it as well.
     
  22. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    183
    Excellent, thank you!
     
  23. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hi. It doesn't really matter, ADS Converter converts the mesh inside an fbx, not the fbx itself. Look at this speedtree example, which is just like a regular fbx file:

    upload_2019-7-10_13-20-16.png
     
  24. Source-technology

    Source-technology

    Joined:
    Dec 2, 2016
    Posts:
    21
    No, Still does not work whether I set it to generic, or cloth material.
    Here is the scene and file,
     

    Attached Files:

  25. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Thanks for the scene. I think I forgot to mention about the detail motion.
    The trickier part is that the flag is really close to the pole and it will intersect at higher values.
    Here is a test and the settings I used:
    line4.gif
    upload_2019-7-10_14-6-39.png
     
    Source-technology likes this.
  26. Source-technology

    Source-technology

    Joined:
    Dec 2, 2016
    Posts:
    21
    Thanks, the problem has eased a lot now.
    It would be nice if I could rotate the motion of world coordinates.
    Also, can I change the direction of the fold? It now looks like it's always from top left to bottom right. I want to be able to control this direction manually.
    1.jpg
     
    Last edited: Jul 10, 2019
  27. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    It is doable, I already made some tests. A new build is coming in the following days.
     
    Source-technology likes this.
  28. Source-technology

    Source-technology

    Joined:
    Dec 2, 2016
    Posts:
    21
    Cool, can`t wait :)
     
  29. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Hello, could you please add some documentation on how to set up a Speedtree 8? I tried and when I switched the materials to ADS shaders, I lost the textures and ended up with white bark and no leaves. I was able to previously get ST 7 to work fine.

    I have a ST subscription so not the indie version.
     
  30. praesidenter

    praesidenter

    Joined:
    Mar 5, 2016
    Posts:
    36
    Bought the asset and played a bit with it, it is really promising! I have one questions though:
    How far do the claims "works with any mesh" and "no preparation needed" go?
    Do I need to apply vertex colors myself or is there an automated way in your asset that creates the needed vertex color on a mesh that has none?
    If we are supposed to apply vertex colors ourselves (be it with Polybrush or an external application - I'm fine with both) it would be good to have a guide that shows the best ways to paint different kinds vegetation meshes (grass, plant, tree with branches and leaf cards, flags, etc). Especially to make sure that branches and leaf cards stay connected.
    I know there's the debug view and I managed to get grass moving by looking at the example scenes, but a best practices guide would really be appreciated!
     
  31. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    I was super busy last week, the update is coming soon.
     
  32. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hello! "works with any mesh" and "no preparation needed" is the description form Polyverse Dynamic Props. That asset is similar to ADS, but it is much more basic in term of wind and setup. There, a script is added to the object and the vertex position is used to animate the mesh. And it works well for low poly objects.

    ADS requires a mesh with existing wind info. For grass, the Y vertex position can be used, but for plants or trees, the wind info needs to be set up in a 3rd party software. There are some tutorials for vegetation creation for udk, cryengine, that will work just fine with ADS. Maybe I do some tutorials in the future, I still need to finish the documentation first :(

    https://minifloppy.it/tutorials/udk-wind-vertex-shader/
    https://docs.cryengine.com/display/SDKDOC2/Detail+Bending

    Dealing with hand-created trees and wind can be really difficult. A small difference in color from branch to trunk will disconnect them. I recommend TreeIt to everyone, it's free and the branches and leaves always stay connected.

    I added the Mesh Channel Debug for 3rd party assets, and I can just assume that the wind info is added as it should be, or how most of the artist would paint the masks, white for moving, black for static.

    If you have any other question, please let me know. Cheers!
     
    praesidenter likes this.
  33. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hi! Sorry for the long waiting, here is a SpeedTree8.3 to ADS tutorial. When changing the material from ST to ADS, make sure you have the material dropdown enabled. This way the textures will be added automatically.
    upload_2019-7-29_14-19-46.png

     
    nirvanajie likes this.
  34. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thanks! I actually like the way they look at the moment without the shaders so moved ahead already. But thanks so much for future use. Your shaders have many uses so I am sure I will be using them in our game.
     
  35. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    What about using Nature Manufacture trees since they have really good vegetation packs and ADS wind is still the best to use would really like to use there trees with your shaders. Any info on this would be great.
     
  36. praesidenter

    praesidenter

    Joined:
    Mar 5, 2016
    Posts:
    36
    Thanks for the answer! The first post in this thread has the "works with any mesh" claims, but looking at the asset store descriptions of your other mentioned asset I assume this was a copy paste error? You might want to edit the first post then to avoid further confusion :)

    Other than that I managed to paint a custom tree in a way that everything stays together. After looking at my own painted trees through the debugger, it's actually quite easy to see what does what.
    I'll have a look at tree it as well!
     
    BOXOPHOBIC likes this.
  37. Source-technology

    Source-technology

    Joined:
    Dec 2, 2016
    Posts:
    21
    another problem XD:
    we optimize the scene to merge several separate grasses into one large model. But when the model with an ADS material, Cutout looks very weird.
    As shown, the Strand material looks good.
    model and texture file in the Attachment

    1.jpg
     

    Attached Files:

  38. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hi. Not the alpha cut is the problem. The problem is that because the mesh is combined, the Global Size option can't be used because it's using the vertex position and object position, which is lost when combining the meshes. That's why I can't add batching support. With the mesh combined the Global size is acting on the whole object, and the grass is offset in the world. Just set the Global Size in the grass mat to 0. Also, your mask is inverted, the base of the grass is moving. You can repack it with the following settings.
    upload_2019-7-31_14-55-59.png

    line4.gif

    Cheers!
     
    Source-technology likes this.
  39. lorddesu

    lorddesu

    Joined:
    Aug 20, 2014
    Posts:
    31
    Hello. Does ADS cover all functionality of Polyverse Dynamic Props? I mean does the wind work well with primitive-based lowpoly vegetation. E.g a tree without leaves.

    Also is it any short way to implement some sort of grass touch bend behavior. For example I got a ball with rigid-body and I want the grass to react on it. Bend for some seconds then release to normal state. Same for character or wheel objects.
     
    Last edited: Aug 4, 2019
  40. Canthera

    Canthera

    Joined:
    Aug 6, 2019
    Posts:
    2
    There seems to be an issue with the shader customization feature. After enabling VegetationStudio support, the shader is throwing various errors that are caused by a semicolon in the "import VS_indirect.cginc" line.
     
  41. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Thanks for reporting the issue, I will take a look. I moved some folders around and I probably forget to fix the VS cginclude paths.
     
  42. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Both shaders have similar wind motion and will work with any mesh. Polyverse Dynamic Props has 2 layers of motion, global wind(for large movements) and detail motion(for small noise movements) and you can add 2 color gradient on objects if no texture is used. Normal map and metallic/smoothness map are not supported, metallic and smoothness can be adjusted via sliders. It is much more lightweight and has really basic features, designed for low poly style games. The setup is much more simple, you just need to attach a script to your mesh and it will work.

    Advanced Dynamic Shaders is designed to be used for realistic environments, it has a lot more features like turbulence, global tint, leaves amount, seasons support, grass and trees shaders and it is more expensive to render. The wind layers depend on the shader type, the grass and plant ones have 2 layers of motion, the tree shader has 3 layers of motion. And it supports normal map, metallic/smoothness textures. The setup is much more complicated and technical, you will need to convert the meshes to be compatible with ADS.

    Now, both can be used for low poly meshes, but I would recommend Polyverse Dynamic Props.

    I won't implement the grass bending in the near future, however, if you are familiar with Amplify Shader Editor here is a good tutorial on how to implement a bending effect:
    https://twitter.com/Juicefoozle/sta...ACrzbcvk8s2nGKiDtlWpEazisGeE_Ww8EzfC78K67LPB0
     
    lorddesu likes this.
  43. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    No news on third party support yet. I want to drop the separate mesh conversion and manual setup because I feel that is a quite annoying and lengthy process. What I want to do is to offer support for prefab conversion directly.

    If you have one of the Manufacturer's asset, you can check how the wind is encoded in vertex color using the ADS Debug, mesh debug feature and then convert the mesh for ADS, using that information.

    The process is quite technical, here are some links from the documentation:
    https://docs.google.com/document/d/...ohuWqyq6_qa4AyVpFw/edit#heading=h.n0tl5ltdeko
    https://docs.google.com/document/d/...huWqyq6_qa4AyVpFw/edit#heading=h.lei5ufvottrg
    https://docs.google.com/document/d/...ohuWqyq6_qa4AyVpFw/edit#heading=h.n0tl5ltdeko
     
    Brian-Ryer likes this.
  44. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    I forgot to say, the build with local motion direction and detail motion direction is out (v2.3.2).
     
  45. Brian-Ryer

    Brian-Ryer

    Joined:
    Mar 5, 2013
    Posts:
    43
    I love the idea of a prefab conversion tool or something, it can be tedious to convert everything i have and then realize that some models don't quite work in sync with others, even so this is a solid 5 star asset so thank you for that.
     
  46. praesidenter

    praesidenter

    Joined:
    Mar 5, 2016
    Posts:
    36
    I noticed the same for GPU instancer support btw
     
  47. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    177
    Hi,

    Thank you so much for this great asset !

    Any ETA for adding snow support ? (It crucial to my game and I bought the asset thinking it already does support snow coverage.... and a must have for this asset)
     
  48. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    I just updated the package for the VS issue, it should be out in a few days. Regarding GPU instancer, the paths are pasted directly from the GPU instancer manual. Unless you moved the folders, it should work.
     
  49. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    506
    Hello! I'm glad that you like it! No ETA for snow, for now, ADS is not performing well in sales, so right now I'm focusing on other projects. But this is the next feature that will be added in ADS 2.4.
     
  50. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    177
    Maybe integrating the Snow for ADS will make it more complete and better integrated with other asset (Enviro, CTS...) will help for sure with sales.

    Edit: I feel really sad that a great asset like ADS is not performing well with sales. I think Enviro, CTS and RTP are the best selling assets on the store. People buy them to make their terrain and environment feel real and rich with weather and seasons. And they are really great and well integrated together. Their problem is non of them all has a vegetation shader, and any game Dev who is serious about his game know that the missing peice of the asset store is the vegetation asset(AFS is by far behind ADS),and I think, considering, the great quality of ADS that already have, wind effect,seasons, handles vegetation and trees ... Will be the asset that all of this top selling terrains/weather need to give a complete tool set for the buying developer.

    Im pretty sure by adding the snow wetness -the only missing feature in my opinion, to make your asset a hit- , and by adding some integration scripts for Enviro, CTS and RTP (matter of minutes, very easy, and will help unity beginners -big part of the potential buyers- ) and collaborating with this assets developers, to promote your asset as "compatible" will boost your sales in a huge way.

    I hope that my words, will make you change your mind about giving ADS a chance to shine because honestly, as one of your new clients, and a very old client of all the asset that i spoke about, I think you have a huge shot to make ADS one of the best selling asset.

    PS: sorry for my English ( my 4th language).
     
    Last edited: Aug 30, 2019