On the left of this dialogue is a list of defined
textures. Clicking on
one shows the result as applied to a sphere as in the texture creation
tools. As with the
uniform texture dialogue, double-clicking on
the preview displays a menu from which the view and preview object can
be changed. The preview can be zoomed (CTRL drag with RMB) and
panned (drag with RMB). Beneath this is a box titled 'Texture Parameters' - see the next section for more information on this. Also note that there is a Type selection box at the top of the dialogue. This allows both simple textures and layered textures. Layered textures will be discussed later. The New Texture and Textures dialogues can also be accessed from here. |
This dialogue displays the actual object that you
wish to map the
texture to. The object can
be rotated in the preview window, to allow better all-over
visualisation, by clicking and dragging with LMB
within the preview window. The preview can be zoomed (CTRL drag up/down
with RMB) and
panned (drag with RMB) and can be resized by dragging out the sides of
the whole dialogue window. The view can be be changed by
double-clicking on the preview and
selecting the required view from the pop-up menu. The type of mapping can be selected from the drop down menu just below the preview image (see below for details). Below this are a set of boxes to allow the scaling, orientation and position to be altered to better fit the object. The parameters available for editing depend on the type of mapping which is described below: |
For Projection mapping, the
parameters are shown in
the dialogue on the right. Scaling and centering can only be performed
for x and y axes since the texture is a 2D 'sheet' projected onto
the object. Rotation, however, can be performed in all 3 axes. An example transformation is shown on the far right. Bind Texture Coordinates to Surface is again available for mesh objects. Scale Texture to Object is also available for projection mapping. |
The Cylindrical mapping
parameters are shown on the
right. The texture is the same as the above example.
This time, however, we have a different set of parameters: Width, which is specified in degrees, is the scaling around the cylindrical axis. 360 degrees means that the texture is wrapped exactly once around the axis. A smaller angle results in the texture being scaled down and vice versa. Height is the scaling in the long axis of the cylinder. A smaller value results in a compression of the texture is that axis. The Offset controls the centering of the texture. Rotation around the x,y and z axes can also be specified. An example mapping is given on the far right. Bind Texture Coordinates to Surface is again available for mesh objects. |
The Spherical mapping
parameters are shown on the
right. Width, which is specified in degrees, is the scaling around the horizontal spherical axis. 360 degrees means that the texture is wrapped exactly once around the axis. A smaller angle results in the texture being scaled down and vice versa. Height is the scaling around the vertical spherical axis also specified in degrees. Offset controls the centering of the texture and is again specified in degrees. Rotation around the x,y and z axes can also be specified. An example mapping is given on the far right. Bind Texture Coordinates to Surface is again available for mesh objects. |
At the
left of the dialogue is a list of all the textures that have
been created in the scene. To add
one of these to the layered texture, select it from this list and click
on Add. This adds the texture to the list in the
centre. This list shows the texture layers and their order is
important. The
topmost layer in this list is the surface layer, the 2nd one is the
next layer down and etc. The order can
be changed by selecting textures and clicking on . Each layer can be one of 3 Blending Modes selected from the drop-down menu on the right: Blend means that a weighted average texture is created of that texture and the textures below it. The weighting is defined by the fraction bar to the left of the preview. If this was set to 0.7, for example, then the resulting texture would be 70% that one and 30% of the one below. All texture properties, e.g, diffuse colour, specularity, transparency etc., are averaged in this way. Overlay In this case, the current texture is laid over the ones below with any transparent areas allowing the textures below to show through and opaque areas will not. Again a weighting fraction can be applied which results in partial transparency. Overlay, Bumps Add is a special version of the overlay mode where bump and displacement maps sum through all the layers rather than being averaged or eliminated by layers above. |
The
preview doesn't look very exciting but this cannot represent the
actual texture because it will vary
with position on the mesh surface to which we assign it. To create a
texture parameter, select
Insert -> Values -> Texture Parameter.
Double-clicking on the module brings up a dialogue similar
to that below: You can specify the name and the minimum, maximum and default values for the parameter. There are 3 texture parameters in this texture; pencil_part which is going to be used to select the colour depending on the position on the pencil's surface, wood_part which will be set to 1 for the wood part only to which it adds a noise pattern and Shiny which is going to control the specularity of the mesh. |
Notice
that the texture parameters defined in the texture are now
listed in the Texture Parameters box. The values of each of these parameters on the surface of the mesh can be set in a number of ways: Per-Object - this sets the same value for the whole object. However different objects can have different values set for each parameter. Per-Vertex - meaning that the values vary according to which vertices are assigned which values. The surface between vertices will show a gradual change between values (see right top). Per-Face - meaning that certain faces can have different parameter values. In this case, there is a discrete change in parameter values at the boundary of one face with another which is set to a different parameter value (right middle). Per-Face-Vertex - this is similar to per-face mapping except that the vertices making up each face can be individually assigned parameter values so there is gradual blending within the face (right bottom). It is also quite possible to have a mixture of parameter mapping methods. |
This
shows the tip of the pencil object with the vertices of the 'lead'
selected in the normal way.
To assign the values of each texture parameter to these vertices,
select Mesh -> Texture Parameters
to display the dialogue shown within the main window on the left: Pencil_part has been set to 1 which gives a grey diffuse colour. Wood_part has been set to 0 since this is not the wood part. Shiny is set to 0.2 to give a specularity of 0.2 to be slightly reflective. Assigning appropriate values to the other vertices produces the result shown below: |
A layered texture is created for the mesh cube by
right clicking on the
object in the Object List
-> Set Texture and then selecting Layered Texture at the top of
the dialogue that appears. Now we can add the textures we want to map to the cube. The Blending Mode is set to 'Blend' for each texture in this case. Note that I have added another texture ('grey') that will be the background texture for the cube - any parts of the geometry that are not mapped with any other texture will take on the grey texture. This is ensured by setting the mapping mode for this texture to 'Object'. Because it is going to form the base layer, it is positioned at the bottom of the layered texture list. The other textures are set to be per-face or per-vertex as shown below and on the right: |