MatchUVW
 
 
 

MatchUVW

Description

Matches the UVWs that are within the specified tolerance.

Scripting Syntax

oReturn = MatchUVW( TextureProjection, SubComp, [Tolerance] );

Return Value

Returns the new MatchUVW operator.

Parameters

Parameter Type Description
TextureProjection String The texture projection which sample points we want to match.
SubComp String Cluster of sample points or tagged sample points to match
Tolerance Double The maximum distance between to sample points we match

Examples

VBScript Example

' This example demonstrate how to match the UVs of two
' specific islands in a texture projection.
NewScene , false
' Create the object
CreatePrim "Cube", "MeshSurface"
SetValue "cube.polymsh.geom.subdivu", 2
SetValue "cube.polymsh.geom.subdivv", 2
SetValue "cube.polymsh.geom.subdivbase", 2
' Connect an image shader to the diffuse port of the Phong
SIApplyShaderToCnxPoint "Image", "Sources.Materials.DefaultLib.Material.Phong.diffuse"
' generate a texture projection for the object
GenerateUniqueUVs , "Texture_Projection"
' setup the scene in order to be able to see the modification
SetDisplayMode "Camera", "textured"
Rotate , 82, 71, 1, siAbsolute, siPivot, siObj, siXYZ, , , , , , , , 0
' Match the UVs of two adjacent islands
MatchUVW "cube.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection", "cube.sample[8-11,28-31,40-47,52-55,64-67,72-79]"
SetValue "cube.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection.Matchuvw.SelectedPoints", True