RelaxUVW

カテゴリ

texture

詳細

選択したポリゴンの形状に合うよう UVW を伸長させます。

スクリプト構文

oReturn = RelaxUVW( TextureProjection, SubComp );

戻り値

変更されたオブジェクトを戻します。

パラメータ

パラメータ タイプ 詳細
TextureProjection 文字列 リラックスしたいポリゴンのテクスチャ プロジェクション
SubComp 文字列 リラックスするポリゴンまたはタグ付きポリゴンのクラスタ

VBScript の例

' This example demonstrate how to create a contour stretching
' projection for an object and then applies a RelaxUVW to it.
NewScene , false
SetDisplayMode "Camera", "textured"
' Create the object and a texture projection
CreatePrim "Grid", "MeshSurface"
GenerateUVSetByContourStretching "grid.poly[4,5,11,12,19,20,26,27,34,35,43,44,51,52,58,59]", "Texture_Projection", 0, False, "grid.pnt[4,6,74,76]"
' Connect an image shader to the diffuse port of the Phong
SIApplyShaderToCnxPoint "Image", "Sources.Materials.DefaultLib.Material.Phong.diffuse"
SetInstanceDataValue , "Sources.Materials.DefaultLib.Scene_Material.Phong.Image.tspace_id", "Texture_Projection"
' Apply the RelaxUVW with boundary anchor set to true
RelaxUVW "grid.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection", "grid.sample[*]"
SetValue "grid.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection.Relaxuvw.BoundaryAnchor", True