RfM
PxrTexture Texture Sequence


return to main index



Introduction

The PxrTexture does not provide a convenient way of specifying a sequence of textures, or specifying a way of cycling a sequence of textures.



Figure 1


Normally a single source image is used for the Filename text field, say,

    C:/maya/projects/21/sourceimages/seal.tif
or
    C:/maya/projects/21/sourceimages/seal.tex


The two TCL scripts presented in the next section assume the sequence consists of 7 textures that have been saved to the sourceimages directory of the current Maya project directory. A brief explanation of how to convert images to the textures can be found here. For the purposes of the two TCL scripts it is assumed the names of the textures are,
    DCS.0001.tex
    DCS.0002.tex
    DCS.0003.tex
    DCS.0004.tex
    DCS.0005.tex
    DCS.0006.tex
    DCS.0007.tex



1   Number of Images Matches the Number of Frames

If the frame range of an animation matches the number of available textures the following TCL script can be copied and pasted into the PxrTexture Filename text field.

    $PROJ/sourceimages/DCS.$F4.tex

The TCL variables $PROJ and $F4 will be automatically expanded, on say frame 5, to
    C:/maya/projects/21
and
    0005



2   Number of Images Does Not Match the Number of Frames

The following TCL script will repeatedly cycle over a sequence of textures. The number hilited in red must match the number of available textures.

    $PROJ/sourceimages/DCS.[format "%04d" [expr (($F - 1) % 7 + 1)]].tex






© 2002- Malcolm Kesson. All rights reserved.