RelaxUVW

Categories

texture

Description

Relaxes the UVWs to fit the selected polygon's proportions.

Scripting Syntax

oReturn = RelaxUVW( TextureProjection, SubComp );

Return Value

Returns the modified object.

Parameters

Parameter Type Description
TextureProjection String The texture projection which polygons we want to relax.
SubComp String Cluster of polygons or tagged polygons to relax

Examples

VBScript Example

' 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