テクスチャ レンダリング
指定のオブジェクトに対し、適宜、新しいテクスチャ プロジェクションおよびテクスチャ サポートを作成します。 テクスチャ
プロジェクションを使用すると、2D テクスチャリング パイプラインの各部を正確に制御でき、2D
テクスチャの編集を簡単に実行できます。
注: このコマンドは、出力引数を使用します。 一部のスクリプト言語(JScript や Python
など)は、リファレンスによって渡される引数をサポートしません。
戻り値の配列を使って出力引数を取得する方法の詳細については、「出力引数、戻り値、および出力値の配列」を参照してください。
CreateProjection( [InputObjs], [Type], [UVDefaultType], [SupportName], [PropertyName], [Parenting], [Fitting], [Camera] ); |
パラメータ | タイプ | 詳細 |
---|---|---|
InputObjs | 文字列 | テクスチャのサポートが適用されるオブジェクトのリスト。
デフォルト値: 選択されたオブジェクト |
タイプ | siTxtCreationType | プロジェクション タイプ
デフォルト値: siTxtPlanarXY |
UVDefaultType | siTxtDefaultCreationType | メッシュ オブジェクトのデフォルトのプロジェクション タイプ
デフォルト値: siTxtDefaultSpherical |
SupportName | 文字列 | テクスチャ サポート オブジェクトの名前。 実際の名前を戻します。
デフォルト値: Texture_Support |
PropertyName | 文字列 | テクスチャ プロジェクション名。 実際の名前を戻します。
デフォルト値: Texture_Projection |
Parenting | ブール | オブジェクトに対してテクスチャ サポートの親となる場合は True
デフォルト値: True |
Fitting | siTxtProjFitMethod | オブジェクトに新しいテクスチャ サポートを収める方法(平面、円筒、球体、ロリポップの場合は関連のみ)。
デフォルト値: siRelObject |
Camera | 文字列 | Type が siTxtCamera である場合は使用するカメラ
デフォルト値:選択セッションを開始 |
' Create a sphere, assign default image to scene's material: oSphere = CreatePrim( "Sphere", "MeshSurface" ) SIApplyShaderToCnxPoint "Image", "Sources.Materials.DefaultLib.Scene_Material.Phong.diffuse" ' Create the Texture projection: dim sSupportName, sPropertyName sSupportName = "NewSupport" sPropertyName = "NewProjection" CreateProjection oSphere, siTxtPlanarXY, siTxtDefaultPlanarXY, sSupportName, sPropertyName, True LogMessage "Texture support created: " & sSupportName LogMessage "Texture projection created: " & sPropertyName ' View the results: SetDisplayMode "Camera", "textured" ' Running this script should log the following: ' --------------------------------------------- 'INFO : "Texture support created: NewSupport" 'INFO : "Texture projection created: NewProjection" |