移動先: 概要 戻り値 キーワード. 関連項目. フラグ. MEL 例.
polyGeoSampler [-alphaBlend string] [-averageColor] [-clampAlphaMax float] [-clampAlphaMin float] [-clampRGBMax float float float] [-clampRGBMin float float float] [-colorBlend string] [-colorDisplayOption] [-computeShadows] [-displaceGeometry] [-flatShading] [-ignoreDoubleSided] [-lightingOnly] [-reuseShadows] [-sampleByFace] [-scaleFactor float] [-shareUV] [-useLightShadows]
polyGeoSampler は 「元に戻す」が可能、「照会」が不可能、「編集」が可能 です。
選択したそれぞれの頂点またはフェースのサーフェス カラーと透明度のレンダー サンプリングを実行し、サンプリングしたデータをカラー値として格納するか、サンプリングしたデータを使用して、作用させる頂点またはフェースをサンプリングしたデータ値でディスプレイスメントします。
透明度はディスプレイスメントに使用されず、ディスプレイスメントは頂点法線に沿って実行されます。
サンプリングしたデータ値は、ユーザが定義した量であらかじめスケールできます。
サンプリングする法線は、フラット シェーディング オプションを使用してオーバーライドできます。このオプションは、サンプリング値の計算時にフェースの法線を必ず使用します。これはエッジの平滑性の効果をオーバーライドしたい場合に望ましい場合があります。フラット シェーディング オプションをオンにすると、エッジは必ずハードであるとみなされます。
頂点のディスプレイスメントは頂点にコネクトされたフェースに影響を与えるため、ディスプレイスメント サンプリングによって -sampleByFace オプションがオフになるので注意してください。
共有された頂点カラーの保存の強制、そして共有されていない UV 値の使用の強制が可能です。
結果のカラーの計算は、次のように実行されます。
RGB(計算値) = (RGB(サンプリング値) * スケール係数)
(カラー ブレンドが「none」の場合)
RGB(計算値) = RGB(ジオメトリ値)
(カラー ブレンドが「add」の場合)
RGB(計算値) = RGB(ジオメトリ値) + RGB(サンプリング値)
(カラー ブレンドが「subtract」の場合)
RGB(計算値) = RGB(ジオメトリ値) - RGB(サンプリング値)
(カラー ブレンドが「multiply」の場合)
RGB(計算値) = RGB(ジオメトリ値) * RGB(サンプリング値)
(カラー ブレンドが「divide」の場合)
RGB(計算値) = RGB(ジオメトリ値) / RGB(サンプリング値);
(カラー ブレンドが「average」の場合)
RGB(計算値) = (RGB(ジオメトリ値) * 1/2) + (RGB(サンプリング値) * 1/2)
(クランプ オプションが設定された場合)
RGB(最大値)と RGB(最小値)間の RGB(計算値)をサンプリングします。
結果としてのアルファ値を計算する場合も、同じような計算を実行します。
このコマンドが -batch モードまたは -prompt モードで正しく動作するには、
シーンでカメラを選択する必要があります。
poly, sampling, GeoSampler
polyColorPerVertex
alphaBlend, averageColor, clampAlphaMax, clampAlphaMin, clampRGBMax, clampRGBMin, colorBlend, colorDisplayOption, computeShadows, displaceGeometry, flatShading, ignoreDoubleSided, lightingOnly, reuseShadows, sampleByFace, scaleFactor, shareUV, useLightShadows
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: 1 つのコマンドで複数回使用可能なフラグ
|
// Example 1. Sample for color values.
// a. No arguments. Will perform sampling of color + transparency at
// the vertex level, and store color values for affected vertices.
// No shadows will be computed.
polyGeoSampler;
// b. With shadows and illumination only
polyGeoSampler -lightingOnly -computeShadows;
// c. Sampling only complete selected faces
polyGeoSampler -sampleByFace;
// d. "Flat shading".
// Example 2. Sample for displacement values.
// a. Using displace option
polyGeoSampler -displaceGeometry;
// Example 3. Scaling the sampled data.
// a. Scaling option
polyGeoSampler -scaleFactor 0.1;
// Example 4. Don't force unshared UV value usage, and force
// the storage of shared colors for vertices.
polyGeoSampler -shareUV -averageColor;
// Example 5. Clamping colors. In this example the alpha and
// RGB channels of the colors are clamped between a min of 0,0,0,1
// and a max of 1,2,1,0.5 .
polyGeomSampler -amn 0.0 -amx 0.5 -cmn 0.0 0.0 0.0 -cmx 1.0 2.0 1.0;
// Example 6. Multiply the new sample color values with the existing
// colors stored on the geometry, but leave the alpha values
// as they were on the geometry.
polyGeomSampler -colorBlend "multiply" -alphaBlend "none";