2011年11月29日火曜日

The Smurfs making

スマーフのメイキング。とても良い感じです。 キャラの作りこみ、アニメーション、シェーダー、ライティングどれもいい感じですねー

2011年11月28日月曜日

Reel Luca Zappala 2011

http://vimeo.com/31275216
爆発・煙系のFXアーティストでは今まで一番凄いです。埋め込みが出来ないのでリンクです。
必見!

2011年11月25日金曜日

scriptのすすめ8 ~UIの基本~ maxscript tips

It's been a while again (^^;)
This time I will explain how to make UI.

First I will show you the simpliest example.


----------------------------------------------
rollout myUI "simpleUI"
(
)
createdialog myUI  240 80

----------------------------------------------

"rollout" and "createdialog" is a minimum of set to create UI.
"myUI" is this window's name you can use any words and "simpleUI" is a label which you want show on the Bar.

"createdialog" makes a dialog which is defined by "rollout" and you can specify size of the dialog.
As above example width is 240 and height is 120.

Next let's make a button on this UI when you press it something will happen.


----------------------------------------------
rollout myUI "simpleUI"
(
 button myBtn "Do!!" width:200 height:50
)
createdialog myUI  240 80

----------------------------------------------


"button" needs two parameters which are name of the button and text on the button.
"width" and "height" is not always necessary because it has default value.

That completed making UI however if you press the button nothing happen.
So let's meke some processings when you press "myBtn".

--------------------------------------------------------------------------------------------
rollout myUI "simpleUI"
(
    button myBtn "Do!!" width:200 height:50
    on myBtn pressed do
    (
        b = box()
        for i = 1 to 10 do
        (
            for j =1 to 10 do
            (
                for k=1 to 10 do
                (
                    ib = instance b
                    ib.pos = [i,j,k]*25
                )
            )   
           
        )
        delete b
    )
)
createdialog myUI  240 80



--------------------------------------------------------------------------------------------
I added "on myBtn pressed do......".
Below "on myBtn pressed do" is the processing when you press the button.
I used for loop 3 times, I think this is little bit complicated but it's buildup of  previous my post.

This is the result.


That's all this time.
I will revise this next time.
See you then, thak you!
----------------------------------------------------------------------------
またまた時間が空いてしまいました。
今回は、UIの作り方を説明できたらと思います。

まずは一番シンプルなUIのサンプルを。

----------------------------------------------
rollout myUI "simpleUI"
(
)
createdialog myUI  240 80

----------------------------------------------

"rolleout"と"createdialog" はUIを作るうえで最低限のセットで、myUIはこのウィンドウ(ロールアウト)の名前です。どんな名前でも付けれます。
"simpleUI"の部分はこのUIに表示する名札のようなものです。

 "createdialog" は"rolleout"で定義したダイアログを作るメソッドで、サイズも指定できます。
上の例では、幅240高さ80です。

次にここに押したら何かが起きるボタンを作ってみましょう。



----------------------------------------------
rollout myUI "simpleUI"
(
 button myBtn "Do!!" width:200 height:50
)
createdialog myUI  240 80

----------------------------------------------

 "button"は2つのパラメータが必要で、このボタンの名前と表示するテキストです。
widthとheigthは必ずしも必要では無いです。無ければ、デフォルト値が設定されます。

これで、UIは完成しましたが、ボタンを押しても何もおきません。
では、ボタンをおしたら何かの処理が行われるようにしましょう。
--------------------------------------------------------------------------------------------
rollout myUI "simpleUI"
(
    button myBtn "Do!!" width:200 height:50
    on myBtn pressed do
    (
        b = box()
        for i = 1 to 10 do
        (
            for j =1 to 10 do
            (
                for k=1 to 10 do
                (
                    ib = instance b
                    ib.pos = [i,j,k]*25
                )
            )   
           
        )
        delete b
    )
)
createdialog myUI  240 80

--------------------------------------------------------------------------------------------
 "on myBtn pressed do......".以下を足しました。
on myBtn pressed do から下の部分が、myBtnを押した時に行われる処理です。
処理の中身はforループを3回使用して少しトリッキーですが、前回の発展系です。

結果は以下のとおり。


今回は以上で。
次はこれの発展と他の機能を紹介でしたらと思います。
ではでは。

2011年11月2日水曜日

Houdini メモ

ForEachの中でForEachを使う時、要注意。
Stampの名前を変更しないと色々問題あるときがある。
理由は謎だけども、中のForEachが上のStampValueを上書きしてしまう?

2011年10月31日月曜日

"Have You Seen My Sister Evelyn"


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

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で割り算したものをインデックスの値として
使用します。

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