-
Notifications
You must be signed in to change notification settings - Fork 0
Texture Input
Table of Contents:
- Texture mapping (introduction)
- Texture Channels
- Procedural Texture Type
- Noise Basis
- Clouds
- Marble
- Wood
- Musgrave
- Voronoi
- Distorted Noise
- Blend
- Image Texture Type
- Image Sampling & Mapping
- Object Mapping Coordinates
- YafaRay Influence (Map To)
- Stencil
- Blending modes
One of the main points of the old YafRay was the close support of Blender Internal texturing features, and YafaRay keeps this tradition. In general, YafaRay supports:
- Multiple texture channels for modulating a material component.
- Procedural textures for color and scalar texturing.
- Image files (even HDR input) for color and scalar texturing.
- Several texturing coordinates models and mapping parameters.
Like in any other 3D rendering package, there are two main types of texturing: color and scalar. Color texturing is used to modulate color in a material component that allows such an input: diffuse color, mirror color and glossy color. Scalar texturing is performed in material components that do not require color information but an amount of quantity: bump, mirror amount, transparency amount, translucency amount, glossy amount and blending amount. In scalar texturing RGB values are automatically transformed into scalar values (greyscale) ranging from 1 (white) to 0 (black). It is better to use textures in grayscale mode to do scalar texturing in order to make results more predictable.
YafaRay supports multiple texture channels for each material component and for relief mapping. Blender principles are observed here: each channel can have its own individual mapping settings and the lower channel in the stack has got priority over the upper one. For instance, a decal should be in a lower channel than a color texture affecting the whole mesh. Also textures blending operations work from bottom to top.
A procedural texture is a computer generated image produced by an algorithm, intended to create a realistic representation of natural elements such as wood, marble, granite, metal, stone, and others.
Procedurals can be used as a color texture or as a scalar texture in any of the mapping options available. Colors in a procedural texture are defined by two controls: Color Picker in the YafaRay Influence (Map to) panel and material diffuse color in the Material section.
Procedural textures supported are: Distorted Noise, Musgrave, Voronoi, Marbre, Wood, Clouds, and Blend. Besides, there is an additional "RGB-cube" procedural type only available by XML output.
Noise Basis, which is a setting available for most procedural types, governs the structural appearance of the procedural texture. Noise Basis types available in YafaRay are:
These are the settings supported in each procedural type:
|
Useful for soft bump mapping of irregular surfaces. |
|
|
|
|
Useful for marble. ;) |
|
|
|
|
Useful for basic bands and noise with a structure. |
|
|
|
|
Very flexible. Useful for terrain and rock surfaces. The Intensity Scale control is useful to localise the result. |
|
|
|
|
Voronoi is a procedural type with a cellular look. Very flexible. Useful for organic surfaces. |
|
|
|
|
Complex and versatile. |
|
|
|
|
Gradient effects and for stencil. |
|
|
|
|
Related articles: |
|
Texture input is done by selecting Image as a Texture Type and loading the image in the 'Map Image' panel. You can use several texture channels for modulating just one component or several ones. YafaRay 8-bits supported formats are tga, jpeg and png. YafaRay also supports 16-bits tiff, exr and hdr.
|
Source: Single image and Image Sequence are supported. Input Color Space: Use sRBG for 8-bits formats and Raw for high dynamic range formats. UseAlpha: Renders the texture alpha channel as transparent (if it exists), white otherwise. Enabled by default. |
|
Note: YafaRay can not load Blender encapsulated textures. If your Blender file has got encapsulated data, you must unpack first (File>External Data>Unpack). YafaRay will load textures from the created 'textures' folder. During the rendering process, the Blender back console shows up messages when a texture image can't be loaded by YafaRay. Pay attention to them! If your file is unpacked but YafaRay can't load textures, be sure that the path selected in the 'Image' panel points to the actual location of the file in your HD. |
|
Texture extension:
|
|
Coordinates supported:
Projection modes:
Other settings:
|
|
The image above is an example of Generated coordinates mapping and object projection. Notice how the texture adapts to the objects position and size. Besides, each object is using a suitable projection mode, so each surface is perpendicularly mapped. |
|
|
Stencil is a texturing feature that allows for mixing two texture channels in a controlled way, by using an intermediate mask texture. This feature can be used as well to set invisible parts of a texture, by using a stencil channel below. White value in the mask texture renders the above texture channel invisible.
|
|
| The images above show an example of a stencil setup. On the left there are the textures used and on the right the texture channels arrangement. | |
The image above shows the 'Map to' panel of the stencil texture channel. Notice that the Diffuse Color, Stencil and No RGB buttons are enabled.
The final result.
| Related articles: Material Modulation. |
|
Blending modes are used to determine how two texture channels are blended into each other. The default blend mode is Mix, which is used to hide the upper channel with whatever is present in the lower channel (remember that in Blender, textures have a higher visibility priority the lower they are in the channels stack). However, as each pixel in a texture has a numerical representation, a large number of mathematical ways to blend two channels is possible. This feature can be used to add complexity and richness to your texturing works. Supported modes are mix, add, multiply, substract, screen, difference, divide, darken and lighten. |
|
|
We are going to blend two textures: on the left is the base texture, on the right the blend texture. Please look at them carefully.
|
|
|
|
| Base texture. | Blend texture. |
|
A very basic blending mode. It simply adds pixel values of one channel with the other (a+b). In case of values above 1, white is displayed. This mode is commutative (base and blend channels can be swapped) Notice how the black values in the blend texture don't affect the base texture, since a+0=a |
|
This blend mode simply subtracts pixel values of the base channel with the blend channel (a-b). In case of negative values, black is displayed. Notice how black values in the blend texture don't affect the base texture since a-0=a, while white values produce a black result. |
|
Multiply is a basic blending mode for darkening areas of a texture. This mode is commutative (base and blend channels can be swapped) |
|
Screen is a basic blend mode for lightening areas of a texture. It is the opposite of 'multiply' mode. It returns a brighter result than both input parameters in most cases, except if one of them equals 0 (black). Completely black values in the blend channel do not change the base at all (and vice versa) - completely white gives a white result. This mode is commutative, channels can be swapped. |
|
Subtracts either the blend texture from the base texture or the base texture from the blend texture, depending on which is brighter, to get always a positive result. Blending with black produces no change as a-0=a. Blending with white inverts the picture (1-a). This kind of blending produces a lot of variation. This mode is commutative as well. |
|
This mode simply divides pixel values of the base texture with the blend texture (a/b). The darker the blend texture is, the lighter the result. However, remember that it is not a linear function, so the result easily reaches the upper limit with regular factors, since a/0=∞. |
|
Pixels from both channels are compared to each other, the darkest one is taken. |
|
Pixels from both channels are compared to each other, the lightest one is taken. |
| Related articles: Material Modulation. | |