11/29/2011
11/27/2011
Unity :OrthelloでSpriteを作る
TexturePackerGUIで
- 右のSpritesにSpriteをぶっこむ
- Data Format -> cocos2d
- Data file -> 保存先を選択
- .plistを.xmlに書き換え
- Algorithm -> Basic
- Trimをアンチェック
- Enable auto aliasをアンチェック
- Publishで書き出し
Unityで
- 画像のFilter Mode -> Point
- Override for Webをチェック
- Format -> Truecolor
- SpriteAtlas-Cocos2D prefabをHierarchyに加える
- Textureに出来た画像を
- Atlas Data Fileに.xmlを設定
Animation Spriteを作る
- Animation prefabをHierarchyに追加
- Sizeを増やす
- ContainerにAtlasをぶっ込む
- 開始、終了フレームを設定する
- AnimatingSprite prefabをHierarchyに追加
- AnimationにAnimation prefabをぶっ込む
Collisionを設定する
- Collidableにチェック
- "Ground"TagとLayerを追加
- "Ground"TagとLayerを設定
11/25/2011
Shader "Library/Cull All"
背景を透過する3Dマスクシェーダ
Shader "Library/Cull All"
{
SubShader
{
Tags {"Queue" = "Background"}
Blend SrcAlpha OneMinusSrcAlpha //ブレンド
Lighting Off
ZWrite On
ZTest Less //重要:一度描画した部分は描画しない
Pass
{
Cull Back //別にいらない
Color(0,0,0,0)
}
}
}
http://forum.unity3d.com/threads/26945-Diablo-style-health-orb
11/24/2011
DropboxにUnity Web Playerを置く
- DropboxのPublicフォルダ?に.htmlと.unity3dを置く。
- .htmlのメニューからパブリックリンクを取得してアクセス。
- http://dl.dropbox.com/u/3239718/index.html
- ZOMG
Unity :L4Dのキャラクターインディケーター風のシェーダー
Shader "Character Indicator" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_WrapTex ("Wrap ramp (RGBA)", 2D) = "black" {}
_IndicatorTex ("Indicator Lights (RGB)", 2D) = "white" {}
_Indicator ("Indicator Color", Color) = (1,1,1,1)
_Cutoff ("Alpha cutoff", Range (0,1)) = 0.0
}
SubShader {
Tags { "Queue" = "Geometry+1" "RenderType" = "Opaque" }
Pass {
Tags { "LightMode" = "Always" }
AlphaTest Greater [_Cutoff]
ZWrite Off
ZTest Greater
SetTexture [_MainTex] {
constantColor [_Indicator]
combine constant, texture
}
}
CGPROGRAM
#pragma surface surf Ramp alphatest:_Cutoff
uniform float4 _Color;
uniform float4 _Indicator;
uniform sampler2D _MainTex;
uniform sampler2D _WrapTex;
uniform sampler2D _IndicatorTex;
half4 LightingRamp (SurfaceOutput s, half3 lightDir, half atten) {
half NdotL = dot (s.Normal, lightDir);
half diff = NdotL * 0.5 + 0.5;
half3 ramp = tex2D (_WrapTex, float2(diff)).rgb;
half4 c;
c.rgb = s.Albedo * _LightColor0.rgb * ramp * (atten * 2);
c.a = s.Alpha;
return c;
}
struct Input {
float2 uv_MainTex;
float2 uv_BumpMap;
float3 viewDir;
};
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = tex2D ( _MainTex, IN.uv_MainTex).rgb * _Color;
o.Emission = tex2D ( _IndicatorTex, IN.uv_MainTex).rgb * _Indicator * 2;
half rim = 1.0 - saturate(dot (normalize(IN.viewDir), o.Normal));
o.Emission += tex2D ( _MainTex, IN.uv_MainTex).rgb * 2 * pow (rim, 3.0);
o.Alpha = tex2D ( _MainTex, IN.uv_MainTex).a;
}
ENDCG
}
Fallback " Glossy", 0
}http://forum.unity3d.com/threads/96393-Achieving-a-multi-pass-effect-with-a-Surface-Shader
11/22/2011
ustream flv
- Ustreamの録画は.flvで落とせる
- なんか再生環境によってフレームレートがおかしい
- youtubeにそのまま上げてもおかしい
- Ustreamのハイライト機能が使えない
- 始点が使えない
- .flvはRichFLVで編集するがいい
- RichFLVだめ
- キーフレームリスト情報とかいうのがだめ
途中抜けたりすると映像が抜ける<もともと抜けてたありもしない長さになるとyoutubeに長さではじかれる
<youtubeの15分制限だった携帯使って解除できた
- movicaを入れようとしたらMoyea FLV Editor Liteだった
- youtubeで変換に失敗することはなくなった
- 切り貼りした動画は音と映像がぶつ切りだった
- Any Video Converterを試す
- ハイライトみえてた
- リロード押したらなった
登録:
コメント (Atom)