SwimUVW

詳細

オペレータ スタックの最上部(2 次シェイプモデリングのすぐ上)から読み取るテクスチャ プロジェクション オペレータを変更します。このため、テクスチャ プロジェクションはすべてのエンベロープおよびシェイプ アニメーションが完了してから適用されます。 オブジェクトを変形するたびに UV 座標が再計算されるため、その座標を使用するテクスチャがオブジェクトのサーフェイス上で泳いでいるように見えます。

SwimUVW はオブジェクトおよび UV プロパティ(テクスチャ プロジェクション)のリストを入力として取得します。 オブジェクトがメッシュや NURBS サーフェイスなどのプリミティブである場合、このコマンドは、オブジェクトに割り当てられたマテリアル(「Material.CurrentUV」を参照)が使用する現在の UV プロパティを変更します。 オペレータがフリーズされたためにテクスチャ プロジェクションがオペレータを持たない場合、このコマンドは何も影響しません。

スクリプト構文

SwimUVW( [InputObjs] );

パラメータ

パラメータ タイプ 説明
InputObjs 文字列 オブジェクトおよび UV プロパティ(テクスチャ プロジェクション)のリスト

デフォルト値: 現在選択されている値

VBScript の例

' Set up a sphere with a texture projection and texture image.

CreatePrim "Sphere", "MeshSurface"

CreateProjection "sphere", , siTxtDefaultPlanarXY, , "Texture_Projection"

BlendInTextureLayers , , 1, True, siReplaceAndNoBlendInTextureLayers

SetDisplayMode "Camera", "texturedecal"

' Put an animated twist after the texture projection, so the texture sticks to the surface.

ApplyOp "Twist", "sphere", 3, siPersistentOperation, , 0

SaveKey "sphere.polymsh.twistop.angle", 1, -300

SaveKey "sphere.polymsh.twistop.angle", 100, 300

MsgBox "The projection is evaluated before the twist, so the texture sticks to the surface."

' Now modify the projection to swim: the operator is placed at the top of the stack and

' any deformations occur before the UV property is computed.

SwimUVW "sphere"

MsgBox "The projection is now evaluated after the twist, so the texture swims on the surface."

' Perform a new modeling operation. Note that the texture still swims on the surface.

SelectGeometryComponents "sphere.pnt[27]"

Translate , 3.66557060971011, 4.9427099682274, -0.49427099682274, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0

MsgBox "New modeling operations are inserted in the stack below the texture read position."

' Play back the animation.  Note the texture swims on the surface.

PlayForwardsFromStart

関連項目

StickUVW ReprojectUVW CreateProjection CreateSubprojection