value To timeのノーマライズの勉強をしようと思ったらParticle Ageの値がどう変化しているのかわからなかったので、調べてみた。
そのためにはdebugをしないといけないらしいので単純な1パーティクルだけ出力するシーンを作って調べることに。LifeSpanは60にしています。
シンプルなシーン
Dnamic Setでグループで読んでAgeをデバック。
マスターダイナミックのdebug modeにチェックを入れて
スライダーを0から動かすとdebugウインドウは以下のようなログが。
t = 0 dt = 160
birth >> *Age = Frames=0 Ticks=0
t = 160 dt = 160
birth >> *Age = Frames=1 Ticks=0
t = 320 dt = 160
birth >> *Age = Frames=2 Ticks=0
t = 480 dt = 160
birth >> *Age = Frames=3 Ticks=0
t = 640 dt = 160
birth >> *Age = Frames=4 Ticks=0
t = 800 dt = 160
birth >> *Age = Frames=5 Ticks=0
t = 960 dt = 160
birth >> *Age = Frames=6 Ticks=0
t = 1120 dt = 160
birth >> *Age = Frames=7 Ticks=0
t = 1280 dt = 160
birth >> *Age = Frames=8 Ticks=0
t = 1440 dt = 160
birth >> *Age = Frames=9 Ticks=0
t = 1600 dt = 160
birth >> *Age = Frames=10 Ticks=0
t = 1760 dt = 160
birth >> *Age = Frames=11 Ticks=0
t = 1920 dt = 160
birth >> *Age = Frames=12 Ticks=0
t = 2080 dt = 160
birth >> *Age = Frames=13 Ticks=0
t = 2240 dt = 160
birth >> *Age = Frames=14 Ticks=0
t = 2400 dt = 160
birth >> *Age = Frames=15 Ticks=0
t = 2560 dt = 160
birth >> *Age = Frames=16 Ticks=0
t = 2720 dt = 160
birth >> *Age = Frames=17 Ticks=0
t = 2880 dt = 160
birth >> *Age = Frames=18 Ticks=0
t = 3040 dt = 160
birth >> *Age = Frames=19 Ticks=0
t = 3200 dt = 160
birth >> *Age = Frames=20 Ticks=0
t = 3360 dt = 160
birth >> *Age = Frames=21 Ticks=0
t = 3520 dt = 160
birth >> *Age = Frames=22 Ticks=0
t = 3680 dt = 160
birth >> *Age = Frames=23 Ticks=0
t = 3840 dt = 160
birth >> *Age = Frames=24 Ticks=0
t = 4000 dt = 160
birth >> *Age = Frames=25 Ticks=0
t = 4160 dt = 160
birth >> *Age = Frames=26 Ticks=0
t = 4320 dt = 160
birth >> *Age = Frames=27 Ticks=0
t = 4480 dt = 160
birth >> *Age = Frames=28 Ticks=0
t = 4640 dt = 160
birth >> *Age = Frames=29 Ticks=0
t = 4800 dt = 160
birth >> *Age = Frames=30 Ticks=0
t = 4960 dt = 160
birth >> *Age = Frames=31 Ticks=0
t = 5120 dt = 160
birth >> *Age = Frames=32 Ticks=0
t = 5280 dt = 160
birth >> *Age = Frames=33 Ticks=0
t = 5440 dt = 160
birth >> *Age = Frames=34 Ticks=0
t = 5600 dt = 160
birth >> *Age = Frames=35 Ticks=0
t = 5760 dt = 160
birth >> *Age = Frames=36 Ticks=0
t = 5920 dt = 160
birth >> *Age = Frames=37 Ticks=0
t = 6080 dt = 160
birth >> *Age = Frames=38 Ticks=0
t = 6240 dt = 160
birth >> *Age = Frames=39 Ticks=0
t = 6400 dt = 160
birth >> *Age = Frames=40 Ticks=0
t = 6560 dt = 160
birth >> *Age = Frames=41 Ticks=0
t = 6720 dt = 160
birth >> *Age = Frames=42 Ticks=0
t = 6880 dt = 160
birth >> *Age = Frames=43 Ticks=0
t = 7040 dt = 160
birth >> *Age = Frames=44 Ticks=0
t = 7200 dt = 160
birth >> *Age = Frames=45 Ticks=0
t = 7360 dt = 160
birth >> *Age = Frames=46 Ticks=0
t = 7520 dt = 160
birth >> *Age = Frames=47 Ticks=0
t = 7680 dt = 160
birth >> *Age = Frames=48 Ticks=0
t = 7840 dt = 160
birth >> *Age = Frames=49 Ticks=0
t = 8000 dt = 160
birth >> *Age = Frames=50 Ticks=0
t = 8160 dt = 160
birth >> *Age = Frames=51 Ticks=0
t = 8320 dt = 160
birth >> *Age = Frames=52 Ticks=0
t = 8480 dt = 160
birth >> *Age = Frames=53 Ticks=0
t = 8640 dt = 160
birth >> *Age = Frames=54 Ticks=0
t = 8800 dt = 160
birth >> *Age = Frames=55 Ticks=0
t = 8960 dt = 160
birth >> *Age = Frames=56 Ticks=0
t = 9120 dt = 160
birth >> *Age = Frames=57 Ticks=0
t = 9280 dt = 160
birth >> *Age = Frames=58 Ticks=0
t = 9440 dt = 160
birth >> *Age = Frames=59 Ticks=0
t = 9600 dt = 160
birth >> *Age = Frames=0 Ticks=-1
t = 9760 dt = 160
t = 9920 dt = 160
t = 10080 dt = 160
t = 10240 dt = 160
t = 10400 dt = 160
t = 10560 dt = 160
t = 10720 dt = 160
t = 10880 dt = 160
t = 11040 dt = 160
t = 11200 dt = 160
*Age = Frames=0から始まって
*Age = Frames=59まで上昇してその後は反応しなくなってます。
つまりAgeはlifeSpanの数字だけ0から1づつ上昇していき60回上昇したらパーティクルを消すということなんですね。
ここでバリエーションがからんでくると面倒ぽいのですが、たぶんその対策がノーマライズなんでしょう。ノーマライズの仕方は米岡さんの記事をみながらまた次回やります。