Results 1 to 3 of 3

Thread: a candy for you - flow map creation tool

  1. #1

    a candy for you - flow map creation tool

    hey there,

    Flowmap Painter is a tool to create flow maps that can be used for liquid animation like water or lava

    just check it out its free

  2. #2
    Hi Daikrys,

    sorry for my question. How can i use it? Is possible to use the saved image for 2d animation, for example?

    Thanks

  3. #3
    sry for the late replay, you can use the flowmap for 2d animation but you will need a shader to do so

    for the tool the following shader was used:

    Code:
    Shader "Custom/WaterFlow" {
            Properties {
                    _MainTex ("Base (RGB)", 2D) = "white" {}
                    _Noise ("Noise", 2D) = "white" {}
                    //_TexBlend ("Texture", 2D) = "white" {}
                    _FlowSpeed ("Flow Speed", Float) = 1
                    _Tiling ("Tiling", Float) = 1
                    _PanX ("Panning X", Float) = 0
                    _PanY ("Panning Y", Float) = 0
            }
            SubShader {
                    Tags { "RenderType"="Opaque" }
                    LOD 200
                    
                    CGPROGRAM
                    #pragma surface surf Lambert
    
                    sampler2D _MainTex;
                    sampler2D _Noise;
                    //sampler2D _TexBlend;
                    float _FlowSpeed;
                    float _Tiling;
                    float _PanX;
                    float _PanY;
    
                    struct Input {
                            float2 uv_MainTex;
                            float4 color : COLOR;
                    };
    
                    void surf (Input IN, inout SurfaceOutput o) {
                            half4 noise = tex2D(_Noise, IN.uv_MainTex);
                            half2 distortion = (IN.color.rg * 2 - 1);
                            half time = _Time.x * _FlowSpeed;
                            half2 panning = half2(_PanX, _PanY) * time;
                            half4 c1 = tex2D (_MainTex, IN.uv_MainTex * _Tiling + panning + distortion * fmod(time, 1));
                            half4 c2 = tex2D (_MainTex, IN.uv_MainTex * _Tiling + panning + distortion * fmod(time + 0.5, 1));
                            //half4 c3 = tex2D (_TexBlend, IN.uv_MainTex * _Tiling);
                            half4 c = lerp(c1, c2, abs(0.5 - fmod(time, 1)) / 0.5);
                            //c = lerp(c, c3, IN.color.B);
                            o.Albedo = c.rgb;
                            o.Alpha = c.a;
                    }
                    ENDCG
            } 
            FallBack "Diffuse"
    }
    note: this shader is basicly for unity but you will find some more on the internet or make your own

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL