Controlling uv texture support transformations
Article needs peer review
Summary
For demonstration purposes, let's first lay out the scenario by dowloading the following script:
<A href="/support/xsi/private/kb/files/UV_txt_sup.vbs">Missing imageVbsicon.jpg
Image:vbsicon.jpg
UV_txt_sup.vbs</A> (1K)
Run the script to create a NURBS surface sphere, define a material, texture an image on it and switch the viewport's display type to Textured.
<P>Note: There is a reference to a Windows D: drive in the second line of the script: edit the line in the Script Editor if your XSI installation path is actually in a different location than D:</P>
Steps
- Switch a viewport to Explorer, and select All Nodes from the Show menu
- Expand the sphere node and select UV_Support by clicking on the node's name

- In the Animate toolbar's Create section, select the Parameter > New Custom Parameter Set command - the Custom Property Set Name dialogue will open.
- Define a name in the Custom Property Set Name dialogue - in this case "uv_transform" - and hit OK to exit.

- In the Explorer view, expand the UV_Support node and select the uv_transform node you created.
- Back in the Animate toolbar's Create section, select this time the Parameter > New Custom Parameter to call up a default Property Page
- Edit the Parameter Name field to trans_X, and leave all other parameters at their default values.
|
|
![]() |
- Repeat step 6 and define the Parameter Name as trans_Y, set the Minimum Value to -10.0 and the Maximum Value to 10.0
Tip: You can middle-click the Parameter button to repeat the previous command, in this case the New Custom Parameter command
- Middle-click the Parameter button and define the Parameter Name to scale_X, set the Minimum Value to -100.0 and the Maximum Value to 100.0
- One last time, define a New Custom Parameter named scale_Y, set the Minimum Value to -100.0 and the Maximum Value to 100.0
Select Parameter > Edit Custom Parameter Sets...: here is what the final Custom Parameter Set for UV_Support should look like:
Setting the Expressions
- Expand the sphere > UV_Support > Kinematics > Local Transform > Pos node, right-click the X parameter and select Set Expression... This both sets the expression and launches the Expression Editor.

- Hit the Object button to open the transient explorer view, expand the UV_Support > uv_transform node and select the trans_X parameter (the Explorer view will close).

- In the Expression Pane text editor, add a simple function to divide the trans_X parameter by ten. This expression will control the rate at which the UV texture support will transform on the surface of the object:
UV_Support.uv_transform.trans_X / 10
- Create expressions to control the UV_Support texture support transformation's bias for trans_Y, scale_X and scale_Y, repeat steps 1, 2, 3 and, at step 4, define the dividing value for each parameter as follows:
trans_Y: UV_Support.uv_transform.trans_Y / 10
scale_X: UV_Support.uv_transform.scale_X / 100
scale_Y: UV_Support.uv_transform.scale_Y / 100
Viewing the results
In your Camera view, that is set to Textured display, you will see the UV texture support as a white line wrapped around the sphere in both the U and V directions.
From Explorer, select the UV_Support node and hit Enter to open the Property Page of the same name. Edit the UV texture support transformations, by moving the Custom Parameter set sliders affecting translation and scaling for the X and Y axes.
Note: You can always edit the expression affecting the UV texture support transformation parameter to customize it to your needs.
More Information
References
Shaders, Lights & Cameras guide:
Advanced Materials & Textures chapter, Using the Texture Support Object section
Animating guide:
Custom Parameters chapter
Applies To: XSI 1.0 on NT,Win2K,Irix
Posted: 12/6/2000





