2011年10月31日月曜日

"Have You Seen My Sister Evelyn"


Evelyn EvelynのMV。
アイディアもテクニックも最高です。
こうゆう、センスと技術が高いレベルで融合した作品を見るとやる気沸きますね。

2011年10月21日金曜日

よわよわカメラウーマン日記

最近知った、よわよわカメラウーマンさんのサイト。
浮遊の写真好きです。
http://yowayowacamera.com/

2011年10月20日木曜日

scriptのすすめ7 ~ステップアニメーション~

今回も懲りずに英語です。やはり書くのにめっちゃ時間がかかりますが、
これを乗り越えなければ未来無しっ! という事で先に英語で解説です。 
またも、間違いだらけだと思いますが添削してもらって、のちのち直す予定です。
後半に日本語解説あります。

It's been a while since I wrote last tips.
I have to say sorry before I explain it. Because I made a mistake on last article.
I explained how to change color of a box diffuse,however in this time it's not necessary.
This is the code of the movie which I attached on end of last lesson.
------------------------------------------------------------------------------
s = 10
b = box length:s width:s height:s

for i =1 to 45 do
(
    nb = instance b

    rc = random 0 255
    wcr = color 0 rc 255-rc
  
    m = standardmaterial selfIllumAmount:100 Diffuse:wcr
    nb.material = m
    animate on
    (
        for j = 3 to 100  by 3 do
        (
            r1 = random -5 5
            r2 = random -5 5
            at time j
            nb.pos = [r1,r2,0]*s
          
            keyID = j/3 +1
            nb.pos.controller.X_position.controller.keys[keyID].inTangentType = #step
            nb.pos.controller.X_position.controller.keys[keyID].outTangentType= #step
            nb.pos.controller.Y_position.controller.keys[keyID].inTangentType = #step
            nb.pos.controller.Y_position.controller.keys[keyID].outTangentType= #step
        )
    )
    deleteKey nb.pos.controller 1
)
delete b

---------------------------------------------------------------------------------
I suppose that from the beginning  to the middle of code explanation isn't needed.
I will explain green color code.

for j = 3 to 100 by 3 do

Basically "for loop" increases by 1 count,but if  you want to skip some steps you can specifiy
the number of steps by using "by".

nb.pos = [r1,r2,0]*s

"r1" and "r2" are random number from -5 to 5."s"is specified to 10 at the first line and it's used for size value of the Box. Therefore we multiply the random numbers and "s" to avoid crossing-over.

keyID = (j-1)/3 +1
nb.pos.controller.X_position.controller.keys[keyID].inTangentType = #step
nb.pos.controller.X_position.controller.keys[keyID].outTangentType= #step

Controllers which are set key frames have "Key index" to access key's properties .
In this case, I changed the tangent type of animation curve to "#step".
Key index is assigned by 1 in number order from 1 but  ,"j" increases number by 3 (3,6,9,12.......)
so I divided "j" by 3 to get number from 1 by 1 to use it for  Key index.

That's it.
See you then,next time!!
thank you.
---------------------------------------------------------------------------------
久しぶりの、スクリプトのすすめです。
解説の前に謝まらなければと、前回diffuseカラーをアニメーションする方法を解説しましたが、
前回の最後に貼ったムービーでは必要ありませんでした。

以下コードです。
------------------------------------------------------------------------------
s = 10
b = box length:s width:s height:s

for i =1 to 45 do
(
    nb = instance b

    rc = random 0 255
    wcr = color 0 rc 255-rc
  
    m = standardmaterial selfIllumAmount:100 Diffuse:wcr
    nb.material = m
    animate on
    (
        for j = 3 to 100  by 3 do
        (
            r1 = random -5 5
            r2 = random -5 5
            at time j
            nb.pos = [r1,r2,0]*s
          
            keyID = j/3 +1
            nb.pos.controller.X_position.controller.keys[keyID].inTangentType = #step
            nb.pos.controller.X_position.controller.keys[keyID].outTangentType= #step
            nb.pos.controller.Y_position.controller.keys[keyID].inTangentType = #step
            nb.pos.controller.Y_position.controller.keys[keyID].outTangentType= #step
        )
    )
    deleteKey nb.pos.controller 1
)
delete b

---------------------------------------------------------------------------------
初めから、中間くらいまでは説明は必要ないと思いますので、グリーンの部分だけ説明しようと思います。

for j = 3 to 100 by 3 do
forループは普通 1から順番に1つづつ数が増えていきますが、数をスキップしてforループを
まわしたいときは byをつかって何ステップおきかのループにすることが出来ます。

nb.pos = [r1,r2,0]*s
r1とr2は-5から5までのランダムの値です。sは一行目で10と指定してあり
ボックスのサイズにも使っていますね。
sを掛け算することで、ボックスのポジションが重ならずにランダムに並びます。

keyID = (j-1)/3 +1
nb.pos.controller.X_position.controller.keys[keyID].inTangentType = #step
nb.pos.controller.X_position.controller.keys[keyID].outTangentType= #step

キーフレームを持ったコントローラーは、キーのプロパティのアクセスする為の
キーインデックスを持っています。今回はアニメーションカーブのタンジェントのタイプを
ステップタイプに変更しました。
キーインデックスは1から順番に(1,2,3,4、、、)と割り振られていますが、
jの値は3ステップで(3,6,9,12.......)値が増えていくので、3で割り算したものをインデックスの値として
使用します。

今回は以上です。
ではでは、また次回。

2011年10月8日土曜日

Arrows


もう放送始まっていたとは。
久しぶりのCMは3カットだけでしたが、ナカナカ楽しかったなー

2011年10月4日火曜日

Houdini Automatic RollingBall System v02


自動で転がるシステムをちょっとバージョンアップ。半径をアニメーションさせる事が出来ます。
ますます、使い道ないけど、、
前のはビリヤードの仕事とか来たら使えるかな。

2011年10月2日日曜日

scriptのすすめ6 ~アニメーション animate onとat time~

突然ですが、自分の勉強も兼ねて英語で書くことにしました。
多分間違いだらけの英語ですが、英語で全部書いてから日本語訳するという書き方です。
下に日本語の解説があります。

こうやって、自分のキャパを徐々に超えていってしまう気が。。。
挫けて日本語だけになったら、笑って下さいw

This time I'd like to introduce how to animate in maxscript.
Basically there are 2 ways to create animation in maxscript.

First one is that "animate on"and "at time".
Second one is "addNewKey"

I suppose first one is easier than second one.I should explain it.
I will show you an example.

t = teapot()
animate on
(
    at time 10 t.pos=[0,0,100]
    at time 20 t.pos=[100,0,10]
)

you can see the teapot is moving.
"animate on" is kind of like an "Auto key button" as usually function.
"at time" is for specifying frame when the subsequent script is executed.
That's a basic way.

Let's combine it with previous lessons which are "random function","for loop "and "material functions".

t = box()
m = standardmaterial()
m.selfillumination =100
t.material = m
animate on
(
    for i = 1 to 100 do
    (
        at time i
        (
            rr = random 0 255
            rg= random 0 255
            rb= random 0 255
            t.material.diffuse= color rr rg rb
        )
    )
)

Copy this and press "Ctrl+E"!!!

you can see above the random changing of the color in every frame from 0f to 100f.

I expand the functions of this script.
this is the result.


These boxes are changing color and position every 3 frames.
however,I made a mistake. Position animation is not necessary.
It could be possible to make by particles.

I will show you this script code next time.
The essential is to create boxes in 10 by 10 square without crossing-over.
Until then see you next time!!
----------------------------------------------------------------------------------
今回はアニメーションについてです。
maxscript でアニメーションを付けるには2通りの方法があります。
1つの方法は animate onとat timeを使う方法と
2つ目はaddnewkeyを使う方法です。

1つ目の方法の方が簡単なので、そちらを説明しようと思います。

t = teapot()
animate on
(
    at time 10   t.pos=[0,0,100]
    at time 20   t.pos=[100,0,10]
)

ティーポットがアニメーションしていると思います。
animate onはオートキー(Autokeyボタン、オン)の様なもので、
at timeは 時間を指定するもで、そのフレームでその後のスクリプトが実行されます。
これが基本的な使い方です。

では、前回までのrandom関数やforループ、マテリアル操作する方法とを組み合わせて見ましょう。

t = box()
m = standardmaterial()
m.selfillumination =100
t.material = m
animate on
(
    for i = 1 to 100 do
    (
        at time i
        (
            rr = random 0 255
            rg= random 0 255
            rb= random 0 255
            t.material.diffuse= color rr rg rb
        )
    )
)

0から100フレームで、1フレーム毎にカラーがランダムに変わっていると思います。

このスクリプトを拡張したものが上のVimeoのムービーです。
3フレーム毎にカラーとポジションがアニメーションしています。
ですが、ポジションアニメーションは必要なかったですね。
これならパーティクルで出来そうです。

次回はこのコードを解説しようと思います。
縦横、10×10の範囲にランダムかつ重ならないように並べるところがポイントです。
ではではまた。