
Animation:Masterの開発元であるHash Inc.にあるAnimation Master 2002 Samples & Tutorialsのドキュメント、
Expressionsを翻訳しました。
これは非公式なものですので、この翻訳に関する問い合わせをArtwareやHashへはしないようにおねがいします。
「体積の調整」サンプルプロジェクト
MAINTAIN VOLUME Sample Project
このプロジェクトはキャラクターの体積を調整するエクスプレッションの使用法を示します。
これは3つのプロパティを関連づけ、これらは一つのトランスフォームのサブプロパティです。
エクスプレッションがサブプロパティに表れるとき、これは最後に評価されます。
この例では、モデルのYスケールをコントロールしているシンプルなチャンネルがあります。
XスケールとZスケールはそれぞれ、エクスプレッションによって計算されています。
この例では、XとZは同一のエクスプレッションを使用します。体積は一定ですので、
モデルは100%、これは1と等価にスケーリングされます。
このやり方は、次ぎの方程式を使用します:
Xスケール * Yスケール * Zスケール = 1
この例では、Yスケールは既知の値であり、Xスケールが未知です。
ここで、XスケールとZスケールは、互いに等価であるとします。すると、
Xスケール * Yスケール * Zスケール = 1
ここではXスケールを解きたいので:
Xスケール ^ 2 * Yスケール = 1
両辺をYスケール値で割ります:
Xスケール ^ 2 = 1 / Yスケール
ここで平方根を取ります:
Xスケール = Sqrt( 1 / y-scale )
Xスケールも同じですので:
Zスケール = Sqrt( 1 / y-scale )
This project demonstrates the use of expressions to maintain the volume of
a character.ハ It relates three properties, which are sub-properties of the same transform.
When expressions occur on a subproperty they are evaluated last.
In this case there is a simple channel controlling the y-scale of the model.
The x-scale and z-scale are each computed with an expression.ハ In this case
the x and z use the identical expression.ハ Since the volume stays constant as
if the model was scaled to 100% which equals 1.ハ The formula uses the equation:
x-scale * y-scale * z-scale = 1
In this case the y-scale is the known value, and the x-scale is the unknown. We
will assume that the x-scale and z-scaleハ will be equal to one another. So
x-scale * y-scale * x-scale = 1
Where x-scale is what we want to solve for, so:
x-scale ^ 2 * y-scale = 1
Divide both sides by y-scale yields:
x-scale ^ 2 = 1 / y-scale
Now take the square root:
x-scale = Sqrt( 1 / y-scale )
Since z-scale is the same:
z-scale = Sqrt( 1 / y-scale )
エクスプレッションを楽しみますよう。ボブ
Have fun with expressions, Bob
ここをクリックしてサンプルプロジェクトをダウンロード(もしプロジェクトが
ブラウザに表示されて保存できないときはリンクを右クリックして"save As"を選択)
Click here to d/l sample project(If project shows up in brower and doesn't save you can right click on link and select "save As"
内容がうそ、おおげさ、まぎらわしい時にはメールでご一報を。
ダヨナ・マルチメソのインデックスへジャンプ