Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

[RELEASED] Advanced Dynamic Shaders - GPU wind shaders

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

  1. andrew_unity737

    andrew_unity737

    Joined:
    Apr 21, 2018
    Posts:
    48
    Keeping things Standard at this point of your new product, is the best idea. Do not go the Blender route and build by committee. You could always go down the Plugin route for more enhancements later, focus on the core product and get it working 100% (that's a scriptors % btw).
     
    Teila likes this.
  2. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,623
    Absolutely agree. In fact, if you do not include standard, this might be the first refund I ever requested and I would do it very reluctantly. Standard is....well, standard, and not all of us will be upgrading to the new pipelines right away, it would mean the asset would be useless in our current projects.

    At the very least, make sure you post on the main page that you will not release a standard version now, before more people buy it.
     
  3. andrew_unity737

    andrew_unity737

    Joined:
    Apr 21, 2018
    Posts:
    48
    Any news update on this product? As you are aware, I am particularly interested in the Treeit shaders you were working on. I have a forest the size of Brazil just waiting to come to life.
     
  4. andrew_unity737

    andrew_unity737

    Joined:
    Apr 21, 2018
    Posts:
    48
    and so it all goes quiet..
     
  5. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Standard Lit (Standard PBR unity shader lighting), Simple Lit(Bumped Diffuse lighting) and Advanced Lit (Standard PBR with Transmission) shaders are included in version 2.2. The package will be out this week or the next one.
    For now, I decided to change the mobile shaders to Bumped Diffuse lighting for multiple reasons. Should be almost the same as the mobile shaders in term of performance.

    In order to make them much more optimized, I will need to move most of the calculations per vertex, so many of the current features won't be available.

    If you are interested in testing the new shaders, please contact me at boxophobic@gmail.com

    Thanks!
     
    Teila likes this.
  6. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hello. The package is submitted and should be out this week or the next one. If you are interested in testing the package earlier, please contact me at boxophobic@gmail.com

    Thanks!
     
  7. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hello everyone!

    ADS 2.2 has been submitted an should be out soon. Here are a few of the new features:





     
    Teila, Bartolomeus755 and nxrighthere like this.
  8. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    The workflow when using ADS has changed a bit. Right now almost any vegetation mesh can be converted to be compatible with the ADS shaders via the Mesh Packer tool. SpeedTree and TreeIt already have out of the box support and more assets are coming soon!


    Once the package is available, I will post the full release notes. Thanks!
     
    Teila likes this.
  9. spinaLcord

    spinaLcord

    Joined:
    May 25, 2015
    Posts:
    27
    I bought this asset recently, i have done some prototypes and it looks very promising. Hope to see more in future.
     
    BOXOPHOBIC likes this.
  10. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,623
    Thank you so much! Videos look great and I cannot wait to try it. :) I really appreciate that you made a standard version and the lack of some features is fine.
     
  11. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    302
    Hello We are using Vegetation Sudio, my question is do you also provide Speedtree instancing indirect shader? or only instancing? cause we are using also speedtree plants and we use indirect instancing here? Also Has your speedtree shader transmission too? :) Also Changing wind zone (when using you shader) gives no affect of wind then? Cause it would be good to connect standard windzone with your wind. Regards
     
  12. jvetulani

    jvetulani

    Joined:
    Dec 20, 2016
    Posts:
    13
    Hi! I was wondering if your shader pack includes player collision for bending the grass away?
     
    Lars-Steenhoff likes this.
  13. andrew_unity737

    andrew_unity737

    Joined:
    Apr 21, 2018
    Posts:
    48
    No wonder you were quiet, with a sudden burst of advancements, excellent.

    I did try this update on a TreeIt mesh I loaded, but when I used the packer, I got this error:

    IndexOutOfRangeException: Array index is out of range.
    ADSMeshPacker.TreePackingTreeIt () (at Assets/BOXOPHOBIC/Advanced Dynamic Shaders/Editor/ADSMeshPacker.cs:1249)
    ADSMeshPacker.Packing () (at Assets/BOXOPHOBIC/Advanced Dynamic Shaders/Editor/ADSMeshPacker.cs:470)
    ADSMeshPacker.DrawButton () (at Assets/BOXOPHOBIC/Advanced Dynamic Shaders/Editor/ADSMeshPacker.cs:426)
    ADSMeshPacker.OnGUI () (at Assets/BOXOPHOBIC/Advanced Dynamic Shaders/Editor/ADSMeshPacker.cs:130)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
    UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition, Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:301)

    Anyone else getting this, or just me?

    I applied the new shaders to the Leaves and Bark materials, but that removed the leaves from being visible. It is perhaps early days yet, as the manual needs some sections to be completed. Good work todate.
     
  14. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hi. My tree shaders support instanced indirect and transmission. In order to have support for many vegetation assets like speedtree, treeit or other custom mesh, I created the mesh packer, a tool which converts the mesh to ADS compatible mesh. So I only have 1 bark shader and 1 leaves shader, but it will work with any of those converted meshes.

    The windzone will not work, I have my custom wind system.

    This tutorial will explain the process:
    . Soon I will also update the documentation, right now is quite blank. If you have any question or issues, please let me know.

    Thanks!
     
  15. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Thanks for the kind words and for reporting the issue!

    Are you using the new TreeIt build? I didn't have the chance to test it yet. Could you please send me the fbx file, no textures needed, so I can test it?

    The manual is still blank, I will try to update it asap.

    Edit: I tested the new TreeIt build and it is working on my side. I'm using unity 5.6.5 (for increased compatibility). What version of unity are you using?
     
    Last edited: Mar 23, 2019
  16. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hello. Not yet, but I'm planning to add support.
     
  17. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Thank you! Grass player collision, weather effects on plants like snow, frost, raindrop... LWSRP and HDSRP are some of the features I want to implement in the future. But nothing is sure for now...
     
  18. andrew_unity737

    andrew_unity737

    Joined:
    Apr 21, 2018
    Posts:
    48
    I use a variety of builds, depending on what I am working on and what release was available at the time. So between 2018.2.14f1, 2018.2.19f1, 2018.3.4f1 and 2018.3.6f1. I have uploaded a zip file containing a fbx version of a TreeIt PineTree for you to test, hope that helps, if you need anything else, please contact me, I am more than willing to assist. I have installed the latest version of TreeIt, 1.1 [Edit] I have checked the version of TreeIt, whilst the shortcut opened TreeIt 1.1, the trees I am using came from the previous version, as none of the trees created will not open/load in 1.1 without crashing the programme. It is reported that the range of previous trees will be updated and released, albeit no eta.

    I have used these shaders on much of my own foliage meshes, having applied vertex colour maps, the results have changed the landscape, literally. I look forward to utilising the shaders for my trees and other foliage. Great Job.
     

    Attached Files:

    Last edited: Mar 23, 2019
  19. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Thank you! I tested the mesh, and it seems that the vertex color for wind is missing.
    Treeit export with wind encoded vertex colors, your tree with missing colors.
    upload_2019-3-25_10-4-6.png upload_2019-3-25_10-3-21.png

    If you have the treeit sources, you could reexport the tree with the following settings:
    upload_2019-3-25_10-5-22.png

    To fix the leaves amount where no variation is applied on leaves, I just uploaded another build that will auto-generate variation and you will need to repack the meshes. Sorry for the inconvenience. Should be out tomorrow.

    Thanks!
     
  20. andrew_unity737

    andrew_unity737

    Joined:
    Apr 21, 2018
    Posts:
    48
    Thanks for all the information.

    I checked my trees from TreeIt and the default setting is vertex set to wind. However I created a new tree, exported with the wind setting and imported it to Unity. Once in there, I used the mesh packer on both default meshes (trunk and leaves), but could not get a tree that would show. The trunk was rendering once I added the Bark mat, but for the leaves mesh, when I added the Pine mat, I could only see the top leaves. Setting the alpha cut off to 0.0 (see screenshot) meant I could see all the leaves albeit with no cutout, despite setting this in the leaf texture settings. Setting this to 0.002 (see screenshot) only exposes the top leaves of the whole canopy.

    I have included the whole tree mesh, including all material files etc generated within Unity, which you are free to download and do what you wish http://immersive-games.yourinside.com/Unity/My TreeIt Trees/

    I have listed below screenshots, the actual pictures are perhaps too big for the forums.
    http://immersive-games.yourinside.com/Unity/ScreenShot_20190326110505.png
    http://immersive-games.yourinside.com/Unity/ScreenShot_20190326110536.png
    http://immersive-games.yourinside.com/Unity/ScreenShot_20190326110625.png
    http://immersive-games.yourinside.com/Unity/ScreenShot_20190326110642.png
    http://immersive-games.yourinside.com/Unity/ScreenShot_20190326110714.png
    http://immersive-games.yourinside.com/Unity/ScreenShot_20190326110738.png
    http://immersive-games.yourinside.com/Unity/ScreenShot_20190326110845.png
    http://immersive-games.yourinside.com/Unity/ScreenShot_20190326112125.png
    http://immersive-games.yourinside.com/Unity/ScreenShot_20190326112215.png
    http://immersive-games.yourinside.com/Unity/MyPineTree01.tre (this is the tree file from TreeIt)
     
  21. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Just add two game objects and add the Global Motion and Global Settings components to them. It should work.

    Today a new version will be available on the store. I fixed a few minor issues. And the leaves amount is now encoded differently to avoid missing variation from treeit.



    Here is the tree, is working properly. One thing to note, the leaves are exported as double sided. You can export the tree without backfaces for fewer triangles and use the double sided option from the shader.
    upload_2019-3-26_14-21-58.png
    upload_2019-3-26_14-24-42.png

    Please let me know if there are other issues.
     
    Last edited: Mar 26, 2019
  22. VE_GAME

    VE_GAME

    Joined:
    Mar 13, 2014
    Posts:
    39
    Hi,
    will it work with mobile phones ?
     
  23. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    242
    Considering purchase; does this work with Vegetation Studio "Pro" and M-Tree ? Thanks
     
  24. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,623
    @BOXOPHOBIC
    I really love the shader. It has saved my Speedtree 7s and I have a lot of them. Thank you!

    However, I have noticed that for my custom Speedtrees from the modeler I cannot open the shaders for the tree and replace them with ADS shaders. The Nature/Speedtree shaders are all grayed out.

    Anyone know the solution to this problem? Very odd as I am sure I have done this before. Maybe a speedtree thing? I will post in their forums too, but in the meantime, I wonder if there is some kind of Unity specific work around.

    Thanks!
     
  25. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,623
    Okay for those of you with the same problem....You have to extract the materials into a separate folder and reassign them to the shader. Kind of tedious but it works. Be careful though as my trees tend to lose their materials at times.

    Speetree guy got back to me and said it was because Unity changed the way it handles materials. Figures.
     
  26. andrew_unity737

    andrew_unity737

    Joined:
    Apr 21, 2018
    Posts:
    48
    I have been having some good results using the old shader, mainly on bushes that I made. I took the basic layer of a bush, tinted the branches in a conical spread from the centre out, using grey-scale. Duplicated this layer and altered the grey-scale spread, continued on until the bush layers were complete. In the Editor, applied the old shader and watched the movement of the bush. It takes on the appearance of a variable/random wind.

    I make variances of each bush until I have around half a dozen. When placed in a group, duplicated and rotated/scaled, the whole scene starts to look natural.

    I'm doing this whilst I wait for Evolve Software rebuild their stock of tree species, so I can recreate the variable forests I had in stock, before apply the new shader and mesh packer. TreeIt doesn't produce shrubs and bushes templates, so the old shader fills those gaps.

    What you have done, rebuilding this system and incorporating compatibility between other developers, is awesome, whilst a niche market, it is huge niche, I wish you great success.
     
  27. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    High-end mobile phones are supported (SM3+), however, they are not recommended for mobile.
    But if they are used on a small amount of vegetation, and the Simple Lit shaders are used, there should be no problems using it on mobile. Thanks!
     
  28. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hi. VS Pro is supported, MTree will come in the near future. I spoke with the developer and MTree will have native support for ADS (no Mesh Packer required). I will come with more details once we start working on support. Thanks!
     
  29. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hi. Thanks for the info. I think a better solution would be to duplicate those materials to lose the references to the speedtree ones. Thanks!
     
  30. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Thank for the kind words! I haven't had time to speak with other developers yet, only with the developer of MTree. I still have to add snow, rain support to be able to support some of the assets on the store. Slowly, but surely, I will add them...

    If you are thinking to switch the old bushes to the new shaders, you can use the plant shader, it has 2 layers of wind, the base layer and the leaf layer. Thanks again!
     
  31. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,623
    Until you extract the materials, they are not accessible in Unity. I could not change the shaders at all. I even tried to make new materials and that did not work.
     
  32. franky_li

    franky_li

    Joined:
    Aug 8, 2016
    Posts:
    128
    This are bad news, since I'm using UniStorm which is changing wind force depending on the weather, is there a way to synchronize this?
     
  33. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    409
    When using in VR using an alpha cutout shader creates this buzzing of the alpha and can be hard on the eyes when standing for a long time in heavy alpha environments. Anyway to soften the alpha in the shader itself? Not talking about the alpha cutoff slider but softening the alpha itself within the shader to have that less of that hard alpha cutout look.
     
  34. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hello. Should be quite easy with a bit of programming. I'll be out of the office starting from Friday and I'll come back only in 3 weeks. I'll check UniStorm after, synchronizing them would be a nice feature to have.
     
  35. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hello! There is a technique called alpha to coveratge:https://medium.com/@bgolus/anti-aliased-alpha-test-the-esoteric-alpha-to-coverage-8b177335ae4f

    Since I already have 13 shaders and more are coming with LWRP and HDRP, I'm not planning to add the feature, because I'll need to duplicate all of them in order to do it. One other issue is that they will work only with forward rendering. If you own Amplify Shader Editor, you could try enabling Alpha to coverage, I never used it so I can't tell you more about it.
    upload_2019-4-17_13-38-6.png

    In my opinion, the best solution would be to use an anti-aliasing solution. Subpixel Morphological AA works best for me, and also MSAA could help a bit.
    upload_2019-4-17_13-45-1.png

    Thanks!
     
  36. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hi everyone!

    I'll be out of the office starting from Friday 19th of April and I'll come back in 3 weeks.
    Your questions and issues will be addressed shortly after.

    Thanks for understanding! And happy holidays! :)
     
  37. jmjd

    jmjd

    Joined:
    Nov 14, 2012
    Posts:
    41
    @BOXOPHOBIC Is it possible you'll have the documentation updated before then? It's quite empty in there.
     
  38. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hi. I hoped that nobody will notice :D. Unfortunately, I can't update it until tomorrow.
    The GetStarted tutorial shows all the new features.
    If you have any particular issues with something, please let me know.
     
    Bartolomeus755 likes this.
  39. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    409
    Is there a distance slider for meshes so we can fade grass, plants anything ground foliage based on distance? Be great to use the gpu instancing with a distance slider so we can decide how far we want the foliage to render out as well.

    Also can the Simple Lit shaders for mobile work with baked lighting mode called Shadow mask. Important that we are able to use mobile shaders that work with baked lightmapping as well. If the mobile shaders don't work with lightmapping how can I get them to work with Enlightens lightmapping system. Be good to know how or if that works.
     
    Last edited: Apr 20, 2019
  40. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    923
    When do you expect to support LWRP? Thanks
     
  41. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hello! Regarding the first question, I was thinking to add a scale with distance options usable with the LOD group component. I think the best way to work with it would be to group multiple grass patches together in order to be more performant. I'm also planning to add support for grass size fading with Vegetation Studio. Lightmap is not supported right now, but I can add it with one click. I did not add ot to save some shader variants and loading time.

    I'm in vacation right now, I noted everything, I see what I can do one I get back. Thanks!
     
  42. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    128
    Hi! Starting from June, I'll will start working full time on unity assets. I still need to add other stuff first, but the next feature after will be hd and lw srp. Thank you!
     
    pixelsteam likes this.
  43. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    409
    I wanna use this asset for mobile VR vegetation rendering so things like lightmapping, gpu instancing and a distance slider would really help us to be able to use this asset for VR and mobile vr as well. Using Vegetation studio is awesome and it's the best its just not for mobile so using your mobile shaders with the other stuff I noted would be really great and I'm sure would be used by others as well for mobile. I'm working alot with the oculus quest and oculus go for smaller outdoor environments and would really like to work with you to nail down and use your asset as the must have for vegetation rendering in mobile VR and for just for VR as well.

    Have a great vacation and look forward to the updates.
     
  44. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    70
    Hi! Do ADS support "GPU Instancer" asset?
     
  45. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    40
    Hi,
    First of all, thanks for making this great shader.
    I want to use this shader with Speedtree v8. Does it support Speedtree v8 with subsurface scattering in deferred rendering mode?
     
  46. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    172
    Hey. I added these Amplify Shader Functions to your extended demo scene.
    Trees and gras have occlusion probes piped in your AO Slot now. Looks amazing and gives lots of variation without needing to crank up contact shadows (NGSS 2) and post ao so much.

    https://github.com/0lento/OcclusionProbesDemo/tree/legacy

    Next move is GPU Instancer, too. Has someone already tried?
     
    Last edited: May 7, 2019
  47. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    409
    We desperately need speed tree v8 support. I see speed tree v7 is in here but it doesnt work with speedtree v8 trees and atleast a video showing how to use a custom FBX tree to work with the system. Been struggling and can't figure out how to pack the mesh with a custom FBX tree. Everytime I do the mesh disappears when I overwrite with the ADS packed mesh it creates.
     
  48. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    172
    both Speedtree V8 packackes

    Temperate Coniferous Forest Pack (v8)
    Temperate Deciduous Forest Pack(v8)

    need heavy rework setting clamp and alpha cutout per lod.

    So Advanced Dynamic Shaders could save the forest again.)