PDA

View Full Version : a candy for you - flow map creation tool



Daikrys
24-10-2012, 11:48 PM
hey there,

Flowmap Painter (http://teckartist.com/?page_id=107) is a tool to create flow maps that can be used for liquid animation like water or lava

just check it out its free :)

sesillabubu
26-10-2012, 03:39 PM
Hi Daikrys,

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

Thanks

Daikrys
30-10-2012, 08:29 AM
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:



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