| RJJ Texture's User Manual | |||||||
| Introduction |
| Introduction | 1D Textures | 2D Textures | 3D Textures | Back |
This section gives abasic introduction into the textures and the way 1D, 2D and 3D textures work. To go directly to a particular section click on the links above. "BACK" will take you back to the contents page.
When using procedural textures it is important to understand how the pattern for the textures are generated.
In the case of Imagine the procedural texture is a program that is executed when the renderer wants to know what colour a pixel is going to be. The renderer tells the procedural texture program the hit point in 3D. That is the point at which the light ray currently being traced hit the surface of an object. It is simplest form, imagine a primitive plane object lying so that the Z axis is vertical and the X axis horizontal. When it is rendered a procedural texture program would receive changing values for X and Z and a static, non changing, value for Y (as the plane is flat in that axis). Now, to generate a simply pattern the procedural texture program only needs to determine the colour at the Z, X co-ordinates given to it. Once the colour is returned the renderer takes care of the shading.
For a texture such as a linear gradient, the procedural texture program would generate a value proportional to the axis in which the gradient was running. For example it could use the X axis and divide it up, say by 32. The colour could then be determined by taking this value and using it to interpolate between two colours. A texture would then be generated that changed linearly as the X value of the object increased and would repeat every 32 units. This is a example of a 1D texture, in other words, a texture that only using one axis to determine the colour. It is important to understand that the texture will only appear correctly if viewed facing the axis being used to produce it, in this case X. This can be seen in the diagram below where the gradient does not work on the face YZ.
![]() |
| A 1D Texture |
The next step is a 2D texture. Here, two of the axes are used to generate the texture pattern. A good example of a 2D texture is a checker board. Assuming the checker pattern is to work on a default plane then the procedural texture program simply divides the X and Y axis into squares and colours each one alternately, say red and green. Again, the texture will only work correctly in the two axis in which the plane lies. These are Z and X for the default plane. This also explains why a 2D texture appears as lines. It is because it has not been placed correctly so that the two axes being used lie flat on the plane. It is for the same reason that a 2D texture does not work correctly on sphere (NOTE: Some texture have spherical or cylindrical versions). This can be seen in the diagram below where the texture is using the X and Y axis and does not work correctly in the Z axis.
![]() |
| A 2D Texture |
The final kind of texture is a 3D one. This is a texture that uses all three axes in order to define the pattern. The classic example of a 3D texture is noise. The pattern will always be correct irrespective of the object its being applied to or the orientation at which it is applied. An example of a 3D noise texture is shown below.
![]() |
| A 3D Texture |