Modify an existing set of texture coordinates by contour stretching the polygon inputs onto a "surface" pinned on the contour of the polygon inputs.
A proper contour of the polygon inputs must exist to guide the contour stretching process.
oReturn = ModifyUVSetByContourStretching( InputObjs, TextureProjection, [ContourStretchingMethod], [MaintainAspect], [CornerPoints] ); |
Returns an XSICollection that contains the created operators.
Parameter | Type | Description |
---|---|---|
InputObjs | String |
List of polygon inputs to which the polygon UV texture coordinate contour stretching operator is applied. Default Value: Selected objects. |
TextureProjection | String | Texture space to modify. |
ContourStretchingMethod | siTxtContourStretchingMethod |
Polygon cluster contour stretching method. Default Value: siContourStretchingWalkingOnMesh |
MaintainAspect | Boolean |
Whether to maintain aspect ratio. Default Value: False |
CornerPoints | String |
Optional list of point inputs that define corners on the boundary of the polygon inputs.
Each input may contain from 0 to N points and only up to the first 4 points of each input will be used to define corners.
If the input corners are not part of the contour of the polygon inputs then they are ignored.
Default Value: Empty. Corners are derived automatically internally. |
Dim l_CreatedObjects NewScene 'This example applies polygon UV contour stretching as a modifier to an existing texture space. CreatePrim "Sphere", "MeshSurface" ApplyShader , , , , siLetLocalMaterialsOverlap SIApplyShaderToCnxPoint "Image", "sphere.Material.Phong.diffuse" CreateProjection "sphere", siTxtPlanarXY, siTxtDefaultSpherical, "Texture_Support", "Texture_Projection" SetInstanceDataValue , "sphere.Material.Phong.Image.tspace_id", "Texture_Projection" SetDisplayMode "Camera", "textured" 'Create cluster to modify ActivateRaycastPolySelTool ToggleSelection "sphere.poly[19,20,27,28,35,36,43,44]", , True CreateCluster 'Modify UV by contour stretching. Contour Stretching method is default and MaintainAspect is default Corners are derived automatically set l_CreatedObjects = ModifyUVSetByContourStretching( "sphere.polymsh.cls.Polygon","sphere.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection" ) 'What was created logmessage "Created Operators: " & l_CreatedObjects |