MayaMan Help Contents

# MayaMan Texture Attributes

The MayaMan Texture Attributes are not directly added to file nodes, instead, they are created by invoking the MayaManOptimize -textureSampling command which can be accessed from the Optimize submenu of the main MayaMan menu. Optimizing adds several attributes to each file object that allows fine grained control over which channels of the image the shaders samples and also adds controls to select sampling filter. Good use of the channels attributes can speed up renders.

The optimization process attempts to work out appropriate settings for the channels attributes. Specifically, it looks for images that appear to have the same data in the red/green/blue channels and directs the shaders to only sample the red channel and to copy that data into green/blue. It can also detect when it's not worth sampling the alpha channel. As it can take some time to perform this calculation, file nodes that all ready have the attributes are not reprocessed. This also allows you to change what MayaMan has selected, for example, MayaMan might see that a texture has different data in red/green/blue and that alphaIsLuminance is on and outAlpha is used as a displacement channel so it will decide that you must sample RGB in a displacement shader, you might decide that what's in the red channel is good enough for displacement and selected 'Red Only' thereby reducing the expense of that texture lookup by 2/3.

### Adding and Accessing the MayaMan Texture Attributes

Invoke Optimize->Texture Sampling from the MayaMan main menu. A busy cursor will be posted and all the file textures in the scene that do not already have the attributes will be processed, this may take a while but it's worth it.

#### Maya Man Channels, Maya Man Opacity Channels, Maya Man Disp Channels

These attribute selects which channels the shaders will actually use, the Disp form of the attribute is how the texture will be accessed in displacement shaders:

RGBA | The normal maya way of sampling the texture
RGB | RGB but not alpha
Red and Alpha | This option reads the Red channel and copies it into the Green and Blue channels, the Alpha channel is also sampled. Useful when you have an image with monochrome data in the RGB channels and the alpha channel is different from the mono data and outAlpha is used and alphaIsLuminance is false.
Red Only | This option reads the Red channel and copies it into the Green and Blue channels. Useful when you have an image with monochrome data in the RGB channels and either outAlpha is not connected or alphaIsLuminance is true.
Alpha Only | This option reads the Alpha channel of the texture, RGB are set to black. Useful when you have a file texture that does not have outColor connected and alphaIsLuminance is false.
None | Only for opacity mode. When a shader is being run in a context that only requires opacity information, like a shadow run, there is no need to do lookups on things like a diffuse texture.

#### Maya Man Filter, Maya Man Disp Filter

These attribute selects which filter will be used for texture sampling, the Disp form of the attribute is how the texture will be filtered in displacement shaders:

Use Global | Use the settings in the MayaMan Globals->Texture Options dialog
Gaussian | Good all rounder
Box |
Disc |
Radial B-Spline | Good for displacement but not supported in all renderers

MayaMan Help Contents