texture
Changes the texture projection operator to read from the top of
the operator stack (just above Secondary Shape Modeling), so that
the texture projection is applied after all envelope and shape
animation. This causes Softimage to reevaluate the UV coordinates
every time the object deforms, and the textures that use these
coordinates appear to "swim" on the surface of the object.
SwimUVW takes a list of objects and UV properties (texture
projections) as input. If an object is a primitive, such as a mesh
or a NURBS surface, the command changes the current UV properties
used by the materials (see Material.CurrentUV) assigned
to the object. If a texture projection does not have an operator
(because the operator was frozen), the command has no effect.
SwimUVW( [InputObjs] ); |
Parameter | Type | Description |
---|---|---|
InputObjs | String | List of objects and UV
properties (texture projections).
Default Value: Current selection |
' Set up a sphere with a texture projection and texture image. CreatePrim "Sphere", "MeshSurface" CreateProjection "sphere", , siTxtDefaultPlanarXY, , "Texture_Projection" BlendInTextureLayers , , 1, True, siReplaceAndNoBlendInTextureLayers SetDisplayMode "Camera", "texturedecal" ' Put an animated twist after the texture projection, so the texture sticks to the surface. ApplyOp "Twist", "sphere", 3, siPersistentOperation, , 0 SaveKey "sphere.polymsh.twistop.angle", 1, -300 SaveKey "sphere.polymsh.twistop.angle", 100, 300 MsgBox "The projection is evaluated before the twist, so the texture sticks to the surface." ' Now modify the projection to swim: the operator is placed at the top of the stack and ' any deformations occur before the UV property is computed. SwimUVW "sphere" MsgBox "The projection is now evaluated after the twist, so the texture swims on the surface." ' Perform a new modeling operation. Note that the texture still swims on the surface. SelectGeometryComponents "sphere.pnt[27]" Translate , 3.66557060971011, 4.9427099682274, -0.49427099682274, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0 MsgBox "New modeling operations are inserted in the stack below the texture read position." ' Play back the animation. Note the texture swims on the surface. PlayForwardsFromStart |