Pinecoast Software Inc.
      Home
Subscribe
 

Tutorial: Image and Pixel Textures

Image Texture

For an ImageTexture, the url field contains the name of the image files to be used for the texture, in order of preference. The coordinates for the texture are in (s, t), where each of the coordinates is between 0 and 1. The repeatS and repeatT fields of the node determine how the texture is repeated. In each of the illustrations the texture coordinates are set at (0, 0), (4, 0), (4, 4), (0, 4). In the first case repeatS and repeatT are both true. This means that the image is repeated 4 times in each direction.



Image Texture - repeatS

In this case, repeatS is true but repeatT is false. As a result, the texture is repeated 4 times horizontally. The texture is not repeated vertically, in the t direction. The top line of the texture, however, is extended up to the top of the rectangle.



Image Texture - repeatT

In this case, repeatS is false but repeatT is true. Now, the texture is repeated vertically but not horizontally. The right edge is extended toward to the right edge of the rectangle.



Pixel Texture

In a PixelTexture, instead of specifiying an image file, the image data is placed directly in the image field. The image has a width, a height, and a number of components. The number of components is 1, 2, 3 or 4. If there are 3 components, they are in RGB color format. The fourth component is the alpha component.



Pixel Texture - repeatT

The repeatS and repeatT fields for the PixelTexture behave in exactly the same way as the fields in an ImageTexture.



Pixel Texture - 1 component

If the number of components is 1 or 2. The image data specifies intensity. In this example, the diffuseColor of the Material node is set to green. The texture then varies the intensity of the green.













































































































Copyright © Pinecoast Software 2000-2008. All rights reserved.