Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

AS Water Shader

Discussion in 'Assets and Asset Store' started by MarkD, Jul 15, 2018.

  1. MarkD

    MarkD

    Joined:
    Sep 18, 2013
    Posts:
    154

    Buy
    Tech Demo
    Website
    Tutorials

    “AS Water Shader” is a flow and normal map based shader that enables users to turn surfaces in to highly realistic and dynamic water. The shader is highly customizable with easy to tweak features such as: water depth, rims around object edges, interpret/apply flowmaps and lastly use custom wave shapes in the form of normal maps.

    It even comes with a Flowmap Generator that renders a flowmap texture based on the surface’s (square power of 2) dimensions. This generator/renderer automatically generates the appropriate channels in the flowmap texture for the shader to use. It can render either Grid or Ray based:

    -Grid rendering traces a single ray for each grid element, this is the fastest render technique, however it expects its target to use a Square UV layout.

    -Ray rendering uses the same grid, but traces a ray against the water surface to track that pixels exact UV location and then uses another ray to trace the flow vectors(similar to grid rendering). This technique is much slower than grid rendering( especially on larger texture sizes), but is not dependent on a square UV layout as the Grid technique.

    The benefit of AS Water Shader using flowmaps, is that users can also paint/edit their own flowmap or even render them out in software such as Houdini. This enables the user to have full control over the behavior of their water surface.

    Main features:
    -Compatible with Amplify Shader Editor. Users who own ASE can view and edit the node network.

    -Rim texture to create an edge where objects meet the surface.

    -dual normal maps for different wave sizes and blending.

    -Flowmap to create smooth and realistic waterflows.

    -Caustics: static or animation sheet based caustics that project themselves based on light positions, normal, depth and flow map values.





     
    Last edited: Aug 7, 2018
    DrOcto and Neviah like this.
  2. DespairBear

    DespairBear

    Joined:
    Nov 1, 2013
    Posts:
    196
    Looks fantastic. How reliable is the flowmap generator? Could this potentially be used for rivers and such? Any plans to implement shoreline foam?

    Also just curious if you're planning on implementing any sort of underwater volume image effect?

    The result looks excellent, keep it up
    Maybe provide a demo that always switching between material presets? Just to get an idea of the use beyond the visual style in the scene
     
  3. MarkD

    MarkD

    Joined:
    Sep 18, 2013
    Posts:
    154
    Hi, the flowmap generator is very "geometry" dependent as it uses the normal direction of a mesh-collider's face. External tools such as Houdini which actually create a flowmap from a fluid simulation, will always be better.

    So the results with the provided generator will depend on your scene and the size of your water surface.

    If for instance, you render out a 512x512px flowmap texture for a 4x4u (unit) area, it will have a better result than rendering that same 512x512px for a 400x400u area (because of the amount of pixels being divided over said scale).

    The generator is there for people to get started or not know to other applications. But if you have the knowledge to generate one in Houdini or even Maya/3dsMax, then those will of-course always be the better option.


    A scene showcasing several material presets is not a bad idea at all!


    I hope this put some light on your questions.

    Sincerely,
    Mark
     
  4. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    35
    Looks like what we need, but question. How hard to make it work in HDRP?
     
  5. MarkD

    MarkD

    Joined:
    Sep 18, 2013
    Posts:
    154
    Hi Adam,

    The shader is completely build within forward rendering because of how pixelgrabs within a shader are handled in the standard renderpipeline (pre HDRP), the whole shader is dependent on this crucial part. This means that at the moment it is not compatible within the HDRP.
    It is only compatible with the classic forward and deferred pipeline (since the shader can force itself into forward mode).

    I am still working/figuring out the new HDRP and the approaches that need to be tackled before porting the shader.
    An official version will probably happen only after the HDRP is out of preview mode (as it will be more complete and stable to base a build on). But for now in the short term, there is no HDRP release planned.

    So if your project is completely relying within HDRP, I would not recommend buying my AS watershader asset in all honesty, as within that workflow it will be of 0 functional use to you.


    Hopefully this information was of any use to you.

    Sincerely,
    Mark
     
  6. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    35
    Thanks so much for the quick reply. It has been a huge pain for us lol, and this looks really amazing. We have attempted to write our own, but this tool is super amazing. I was hoping because of Amplify compatible shaders have HDRP support now, but still we are stranded.
     
  7. MarkD

    MarkD

    Joined:
    Sep 18, 2013
    Posts:
    154
    Yes, Ampify shader editor itself has compatibility for HDRP, however it uses a different lighting model for the HDRP part, so that is what makes it incompatible currently with ASWS.

    So making HDRP shaders requires starting in a HDRP shader mode/lighting model.
     
    Adam_Starcaster likes this.
  8. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    35
    Got you! :D
     
  9. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,209
    Does this support shadow casting on the water?