Search Unity

Dynamic Terrain - Deformable Snow and Interactive Water [Released]

Discussion in 'Assets and Asset Store' started by Glacier-Games, Aug 9, 2019.

  1. Glacier-Games

    Glacier-Games

    Joined:
    Jan 26, 2013
    Posts:
    12
    Hey everyone! I'm so excited to finally share Dynamic Terrain - a complete terrain shader with deformable snow and interactive water! I've tirelessly spent hours working on this after an idea for a snowboarding game, and I decided to make it available for everyone on the asset store! Let me know what you think! I'd love to hear from you!


    Asset Store Link: http://u3d.as/1AYU


    Dynamic Terrain is a new advanced terrain shader that allows realtime interaction with terrain features such as snow and water. With this shader, characters and any gameobject can create deformations in snow and ripples in water during gameplay. Unlike other deformable snow solutions, Dynamic Terrain is not limited to a singular location and works across all of your terrains.

    *Requires and relies on tessellation. Do not buy if your target build does not support tessellation.

    Features
    - Integrated with built-in Unity terrain
    - Multiple terrain support
    - Runtime snow deformation and creation of ripples on water
    - Dynamic levels of snow and water.
    - Rigidbody support for deformation and ripples.
    - Terrain tessellation
    - Tessellated phong smoothing to remove jagged edges in terrain
    - Tessellated heightmap displacement per texture. - Heightblended textures for extra realism
    - Cheap (single sample) triplanar mapping
    - 4 terrain layers plus snow and water layers.
     
    id0 likes this.
  2. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    Looks really nice! What kind of performance impact does this have, and does it only work on terrain or meshes as well? Also, it says that it requires tessellation, but is there any info on what general platforms can support that? Obviously PC and I assume Xbox/PS4, but what about Switch or more recent mobile?
     
  3. Lesnikus5

    Lesnikus5

    Joined:
    May 20, 2016
    Posts:
    131
    Very interesting. Can it work on mesh-terrains?

    Can water be used to create dynamic puddles? The main water asset for me is Crest Ocean System, but I need a quick shader to create puddles.
     
  4. Glacier-Games

    Glacier-Games

    Joined:
    Jan 26, 2013
    Posts:
    12
    So sorry about the late reply! I assumed that no one saw this post after a month.
    To answer your first question, as of now, it only supports Unity's built-in terrains.
    And about the puddles, Dynamic Terrain is absolutely for you then! This is the main purpose of the water system.
     
  5. Glacier-Games

    Glacier-Games

    Joined:
    Jan 26, 2013
    Posts:
    12
    Sorry about the late reply! I assumed that no one saw this post after a month.

    I get 60fps on my iMac! And as of now, it only works with Unity's built-in terrain. Tessellation works with DirectX 11 and up, OpenGL Core, and Metal(which means iOS too) as far as Unity's documentation goes. Switch is a tough one, I would suggest trying to use one of Unity's example tessellation shaders to test if it will work in with the Switch graphics API. Here's a simple one:

    Code (CSharp):
    1.     Shader "Tessellation Sample" {
    2.         Properties {
    3.             _Tess ("Tessellation", Range(1,32)) = 4
    4.             _MainTex ("Base (RGB)", 2D) = "white" {}
    5.             _DispTex ("Disp Texture", 2D) = "gray" {}
    6.             _NormalMap ("Normalmap", 2D) = "bump" {}
    7.             _Displacement ("Displacement", Range(0, 1.0)) = 0.3
    8.             _Color ("Color", color) = (1,1,1,0)
    9.             _SpecColor ("Spec color", color) = (0.5,0.5,0.5,0.5)
    10.         }
    11.         SubShader {
    12.             Tags { "RenderType"="Opaque" }
    13.             LOD 300
    14.            
    15.             CGPROGRAM
    16.             #pragma surface surf BlinnPhong addshadow fullforwardshadows vertex:disp tessellate:tessFixed nolightmap
    17.             #pragma target 5.0
    18.  
    19.             struct appdata {
    20.                 float4 vertex : POSITION;
    21.                 float4 tangent : TANGENT;
    22.                 float3 normal : NORMAL;
    23.                 float2 texcoord : TEXCOORD0;
    24.             };
    25.  
    26.             float _Tess;
    27.  
    28.             float4 tessFixed()
    29.             {
    30.                 return _Tess;
    31.             }
    32.  
    33.             sampler2D _DispTex;
    34.             float _Displacement;
    35.  
    36.             void disp (inout appdata v)
    37.             {
    38.                 float d = tex2Dlod(_DispTex, float4(v.texcoord.xy,0,0)).r * _Displacement;
    39.                 v.vertex.xyz += v.normal * d;
    40.             }
    41.  
    42.             struct Input {
    43.                 float2 uv_MainTex;
    44.             };
    45.  
    46.             sampler2D _MainTex;
    47.             sampler2D _NormalMap;
    48.             fixed4 _Color;
    49.  
    50.             void surf (Input IN, inout SurfaceOutput o) {
    51.                 half4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
    52.                 o.Albedo = c.rgb;
    53.                 o.Specular = 0.2;
    54.                 o.Gloss = 1.0;
    55.                 o.Normal = UnpackNormal(tex2D(_NormalMap, IN.uv_MainTex));
    56.             }
    57.             ENDCG
    58.         }
    59.         FallBack "Diffuse"
    60.     }
     
  6. waxx

    waxx

    Joined:
    Apr 1, 2013
    Posts:
    48
    Is the asset dead? Store page seems to not work.
     
  7. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Any news?
     
  8. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Why nothing? And no answer when you was online?