Using procedural textures
Assigning a procedural texture to a Shader
There are two methods of assigning procedural textures to a shader.
The first method uses the checker boxes in the Attribute Editor when a shader is selected. Click on the checker box of the attribute. A menu appears which contains all the available textures. By clicking on a texture in the menu the texture will be connected to the material property. At the same time in the hypershade the texture will be connected to the shader.
The second method uses the library of the Hypershade - if you scroll down through the library the procedural textures can be found in the 2D/3D textures section. By clicking on the procedural texture the texture will be placed in the work area, similar to the shader.
To attach the procedural texture to a shader, it has to be dragged holding the middle mouse button and dropped on the shader in the work area (don't select the texture!! by left clicking, use only the middle mouse button). A menu appears asking to which property the texture has to be attached. Select the correct property and the procedural texture is attached. It is also possible to drag the texture from the Hypershade menu onto the checker of the appropriate property in the attribute editor, be sure to select the appropriate shader first before moving the texture . Important don’t selected the 2d texture, but click with the middle mouse button over the texture and move it.
2D procedural textures
There are several 2D procedural textures available in Maya. Each texture has its own appearance and settings to change the appearance.
The 2D procedural texture can be applied to every setting of your shader which has the checker icon. This means the texture can not only be applied on the color setting but also for example as transparency setting, bump, etc.
Some of the settings of a procedural texture are color values themselves, which means a texture can be connected to these values. This way you can 'daisy-chain' many (procedural) textures to each other. This allows you to create more complex materials where the standard color information of the procedural texture is replaced by another texture.
Practical example: Dirt on a brick wall
- We use a RAMP 2D procedural texture.
- We alter the sliders of the gradient. Move the color downwards to concentrate the red color at the bottom
- We delete the blue color by clicking on the square. We only need two colors, one for the dirt and one for the brick.
- We select the green color ( circle) and add a photo texture
- We select the red color and add a 2D procedural noise texture to simulate the dirt.
3D procedural textures
The difference between a 2D and 3D procedural texture is that the color information of a 2D texture is defined in 2 dimensions( like a photograph) and the color information of a 3D procedural texture is defined in 3 dimensions ( similar like the multicolor toothpaste in a tube). This property of color information in 3 dimensions makes the 3D texture especially effective where the texture has to color irregular shapes and 3d volumes. For example: smoke, rocks, rubble, objects with gaps and irregular shaped objects. Because a 2D texture has no 3D information the color information will not change in the 3 dimension. This will cause striping on surfaces perpendicular to the direction of the projection of the 2D texture. (looks like the texture is stretched across the surface)
Like the 2D procedural textures the properties of a 3D textures can be altered to change the appearance of the texture. Again the settings of a procedural texture can contain texture information. This is one of the reasons why these textures are used for more complex materials.