<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><TITLE >Textures</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="Blender Documentation Volume I - User Guide" HREF="book1.html"><LINK REL="UP" TITLE="Materials and textures" HREF="c3943.html"><LINK REL="PREVIOUS" TITLE="Materials in practice" HREF="x4021.html"><LINK REL="NEXT" TITLE="Multiple Materials" HREF="x4436.html"></HEAD ><BODY CLASS="section" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Blender Documentation Volume I - User Guide: Last modified April 29 2004 S68</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="x4021.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Materials and textures</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x4436.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="materials_textures" ></A >Textures</H1 ><P > The material settings that we've seen up to now produce nice, smooth, <I CLASS="emphasis" >uniform</I > objects. Of course, such objects are never true to reality, where disuniformities are most common. </P ><P > Blender accounts for these disuniformities, whether in color, reflective or specular power, roughness, and so on, via <I CLASS="emphasis" >textures</I >. </P ><DIV CLASS="section" ><H2 CLASS="section" ><A NAME="AEN4173" ></A >Textures from the Material Point of View</H2 ><P > In Blender, the Materials and Textures form separate blocks in order to keep the interface simple and to allow universal integration between Textures, Lamps, and World blocks. </P ><P > The relationship between a Material and a Texture, called the 'mapping,' is two-sided. First, the information that is passed on to the Texture must be specified. Then the effect of the Texture on the Material is specified. The <TT CLASS="literal" >Texture</TT > panel on the right-hand side (and similar panes exists for the the Lamp and World buttons) defines all these calculations. </P ><P > For an untextured material the panel shows a column of eight empty texture <I CLASS="emphasis" >channels</I > (<A HREF="x4167.html#BSG.TEX.F.S68.101" >Figure 15</A >), by selecting one and pressing <TT CLASS="literal" >Add New</TT > or by selecting an existing texture with the MenuButton right below (<A HREF="x4167.html#BSG.TEX.F.S68.106" >Figure 16</A >) you add a texture and the Panel shows two more tabs: <TT CLASS="literal" >Map Input</TT > and <TT CLASS="literal" >Map To</TT >. The Tabs buttons are organized in the sequence in which the 'texture pipeline' is performed. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.101" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/TextureChannelsHoriz.png"></P ></DIV ><P ><B >Figure 15. Texture Channels</B ></P ></DIV ><P > Each channel has its own individual mapping. By default, textures are executed one after another and then superimposed. As a result, an added second Texture channel can completely replace the first one! Next to each non-empty texture channel a check button allows you to select or de-select a given channel. De-selected channels are simply removed from the pipeline. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.106" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/MaterialTextureBlock.png"></P ></DIV ><P ><B >Figure 16. Texture selection block</B ></P ></DIV ><P > The Texture itself is designated by its name, which you can edit in the Text Button above the Texture selection MenuButton. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.102" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/MaterialCoordInput.png"></P ></DIV ><P ><B >Figure 17. Material Coordinate input</B ></P ></DIV ><P > <A HREF="x4167.html#BSG.TEX.F.S68.102" >Figure 17</A > shows the <TT CLASS="literal" >Map Input</TT > panel. Each Texture has a 3D coordinate (the texture coordinate) as input. The values, passed to the texture as coordinates for each pixel of the rendered image belonging to a given material, are computed according to these buttons: </P ><P ></P ><UL ><LI ><P ><TT CLASS="literal" >UV</TT > Uses a special kind of mapping called 'UV' mapping. This is especially useful when using images as textures, as we'll see in <A HREF="x4840.html" >the Section called <I >UV editor and FaceSelect</I ></A >. </P ></LI ><LI ><P ><TT CLASS="literal" >Object</TT > Uses an Object as source of coordinates; usually an Empty. The Object name must be specified in the text button on the right. This is the preferred way to place a small image as a logo or whatever at a given point on the object. </P ></LI ><LI ><P ><TT CLASS="literal" >Glob</TT > Uses Blender Global 3D coordinates. </P ></LI ><LI ><P ><TT CLASS="literal" >Orco</TT > Uses the Object local, original, coordinates. </P ></LI ><LI ><P ><TT CLASS="literal" >Stick</TT > Uses the Object local, sticky, coordinates. </P ></LI ><LI ><P ><TT CLASS="literal" >Win</TT > Uses the rendered image window coordinates. </P ></LI ><LI ><P ><TT CLASS="literal" >Nor</TT > Uses the direction of the normal vector as coordinates. </P ></LI ><LI ><P ><TT CLASS="literal" >Refl</TT > Uses the direction of the reflection vector as coordinates. </P ></LI ></UL ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.103" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/MaterialTextureMapping.png"></P ></DIV ><P ><B >Figure 18. Texture mapping</B ></P ></DIV ><P > If the texture is an image it is 2D, and we must map the 3D space onto it. The most flexible way to do so is with UV mapping, otherwise four possible pre-set mappings are provided (<A HREF="x4167.html#BSG.TEX.F.S68.103" >Figure 18</A >). </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.104" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/MaterialTextureSwitch.png"></P ></DIV ><P ><B >Figure 19. Coordinate transformation</B ></P ></DIV ><P > The X, Y and Z coordinates passed to the texture can be shuffled about to obtain special effects. The buttons in <A HREF="x4167.html#BSG.TEX.F.S68.104" >Figure 19</A > allow you to switch X into Y or Z and so on, or to turn them off. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.105" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/MaterialTextureTransform.png"></P ></DIV ><P ><B >Figure 20. Texture coordinate Offsets and Scaling factors</B ></P ></DIV ><P > Coordinates can be scaled and translated by assigning an offset (<A HREF="x4167.html#BSG.TEX.F.S68.105" >Figure 20</A >). </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.107" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/MaterialTextureInput.png"></P ></DIV ><P ><B >Figure 21. Texture Inputs</B ></P ></DIV ><P > Moving to the <TT CLASS="literal" >Map To</TT > tab, <A HREF="x4167.html#BSG.TEX.F.S68.107" >Figure 21</A > shows the texture input settings. The three buttons determine whether the texture should be used as a <TT CLASS="literal" >Stencil</TT > (a Mask for subsequent texture channels); a <TT CLASS="literal" >Negative</TT > texture (assigning negative, rather than positive, values); or as a black and white (<TT CLASS="literal" >No RGB</TT >), intensity only, texture. The three sliders below these buttons define the texture base color, which can be overridden by color specifications inside the texture definition. Finally the last slider defines the intensity of the texture effect. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.108" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/MaterialTextureOutput.png"></P ></DIV ><P ><B >Figure 22. Texture Outputs </B ></P ></DIV ><P > <A HREF="x4167.html#BSG.TEX.F.S68.108" >Figure 22</A > shows the toggle buttons which determine which characteristic of the material will be affected by the texture. Some of these button are three state buttons, meaning that the texture can be applied as positive or negative. All of these buttons are independent. </P ><P ></P ><UL ><LI ><P ><TT CLASS="literal" >Col</TT > (on/off) Uses the texture to alter the Material color. </P ></LI ><LI ><P ><TT CLASS="literal" >Nor</TT > (off/positive/negative) Uses the texture to alter the direction of the local normal. This is used to fake surface imperfections or unevenness via bump mapping. </P ></LI ><LI ><P ><TT CLASS="literal" >Csp</TT > (on/off) Uses the texture to alter the Specular color. </P ></LI ><LI ><P ><TT CLASS="literal" >Cmir</TT > (on/off) Uses the texture to alter the Mirror color. </P ></LI ><LI ><P ><TT CLASS="literal" >Ref, Spec, Hard, Alpha, Emit</TT > (off/positive/negative) Uses the texture to alter the Corresponding Material value. </P ></LI ></UL ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.109" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/MaterialTextureOutputSettings.png"></P ></DIV ><P ><B >Figure 23. Output settings</B ></P ></DIV ><P > The output settings (<A HREF="x4167.html#BSG.TEX.F.S68.109" >Figure 23</A >) determine the strength of the effect of the Texture output. Mixing is possible with a standard value, including addition, subtraction, or multiplication. Textures give three types of output: </P ><P ></P ><UL ><LI ><P > RGB textures: return three values, which always affect color. </P ></LI ><LI ><P > Bump textures: return three values, which always affect the normal vector. Only the "Stucci" and "Image" texture can give normals. </P ></LI ><LI ><P > Intensity textures: return a single value. This intensity can control "Alpha," for example, or determine the strength of a color specified using the <I CLASS="emphasis" >mapping</I > buttons. </P ></LI ></UL ><P > You can adjust the intensity of these settings separately using the pertinent sliders (<A HREF="x4167.html#BSG.TEX.F.S68.109" >Figure 23</A >). </P ></DIV ><DIV CLASS="section" ><H2 CLASS="section" ><A NAME="AEN4303" ></A >Textures themselves</H2 ><P > Once a new texture has been added to a material, it can be defined by switching to the Texture Buttons (<B CLASS="keycap" >F6</B >) or <B CLASS="guiicon" > <IMG SRC="PartM/materials/gfx/TextureButtonsButton.png"> </B > sub-context of the Shading context to obtain <A HREF="x4167.html#BSG.TEX.F.S68.110" >Figure 24</A >. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.110" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/TextureButtons.png"></P ></DIV ><P ><B >Figure 24. Texture buttons</B ></P ></DIV ><P > A new, empty texture Button Window presents two panels: a Texture <TT CLASS="literal" >Preview</TT > and a <TT CLASS="literal" >Texture</TT > panel, the latter with two tabs. </P ><P > In the <TT CLASS="literal" >Preview</TT > panel toggle buttons define if this is a Material, Lamp or World texture, and a button <TT CLASS="literal" >Default Var</TT > allows to return texture parameters to default values. </P ><P > The <TT CLASS="literal" >Texture</TT > tab replicates the texture channels and the Texture Menu Button of the linked Material. The two columns of Toggle Buttons selects the Texture type. The button <TT CLASS="literal" >Image</TT > allows an image to be loaded and used as a texture (the first button simply is "no texture"). The third button allows for the use of a very special kind of texture, the Environment Map (<TT CLASS="literal" >EnvMap</TT >). The last button (<TT CLASS="literal" >Plugin</TT >) allows for loading an external piece of code to define the texture. (These three buttons are rather unique and will be treated separately later on.) As soon as a texture type is chosen a new Panel appears, with a name matching the texture type, where texture parameters can be set. </P ><P > The remaining buttons define 3D <I CLASS="emphasis" >procedural</I > textures, which are textures that are defined mathematically. They are generally simpler to use, and will give outstanding results once mastered. We will describe just one of these, the <TT CLASS="literal" >Wood</TT > button, leaving you to investigate further. (The reference chapter in this book contains a full details on each.) </P ><P > <TT CLASS="literal" >Wood</TT > is a <I CLASS="emphasis" >procedural</I >, which means that each 3D coordinate can be translated directly into a color or a value. These types of textures are 'real' 3D. By that we mean that they fit together perfectly at the edges and continue to look like what they are meant to look like even when they are cut; as if a block of wood had really been cut in two. </P ><P > Procedural textures are <I CLASS="emphasis" >not</I > filtered or anti-aliased. This is hardly ever a problem: the user can easily keep the specified frequencies within acceptable limits. </P ><P > Procedural texture can either produce colored textures or intensity only textures. If intensity only ones are used the result is a black and white texture, which can be greately enhanced by the use of colorbands. The colorband is an often-neglected tool in the <TT CLASS="literal" >Colors</TT > tab in the <TT CLASS="literal" >Texture</TT > Panel that gives you an impressive level of control over how procedural textures are rendered. Instead of simply rendering each texture as a linear progression from 0.0 to 1.0, you can use the colorband to create a gradient which progresses through as many variations of color and transparency (alpha) as you like (<A HREF="x4167.html#BSG.TEX.F.S68.110b" >Figure 25</A >). </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.110b" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/TextureColorBand.png"></P ></DIV ><P ><B >Figure 25. Texture Colorband.</B ></P ></DIV ><P > Skilled use of colorbands leads to really cool marble and cloud textures. To use it, select a procedural texture, such as <TT CLASS="literal" >Wood</TT >. Click the <TT CLASS="literal" >Colorband</TT > button. </P ><P > The <TT CLASS="literal" >Colorband</TT > is Blender's gradient editor. Each point on the band can be placed at any location and can be assigned any color and transparency. Blender will interpolate the values from one point to the next. To use it, select the point you want to edit with the <TT CLASS="literal" >Cur:</TT > number button, then add and delete points with the <TT CLASS="literal" >Add</TT > and <TT CLASS="literal" >Del</TT > buttons. The RGB and Alpha values of the current point are displayed, along with the point's location on the band. Drag with the left mouse to change the location of the current point. </P ><P > We can use two <TT CLASS="literal" >Wood</TT > textures to make ring patterns in two different scales, each of which will have different effects on the appearance of the wood. The <TT CLASS="literal" >Wood</TT > textures are identical except for the way in which they are mapped in the material buttons window, and in the different color bands used. </P ><P > We will also also use a <TT CLASS="literal" >Clouds</TT > texture to make a grain pattern. To see the result of just one texture, isolated from the others, remember the Check buttons in the <TT CLASS="literal" >Texture</TT > Panel in Material Buttons. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.111" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/TextureSep.png"></P ></DIV ><P ><B >Figure 26. Copying and Pasting Textures</B ></P ></DIV ><DIV CLASS="tip" ><P ></P ><TABLE CLASS="tip" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="./stylesheet-images/tip.gif" HSPACE="5" ALT="Tip"></TD ><TH ALIGN="LEFT" VALIGN="CENTER" ><B >Copying texture settings</B ></TH ></TR ><TR ><TD > </TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > By adding an existing texture you link that texture, but all the Material mapping parameters remains as they are. To copy all texture settings, inclusive of mappings, you must copy a given texture channel and paste it into another by using the two arrow buttons in <A HREF="x4167.html#BSG.TEX.F.S68.111" >Figure 26</A >. </P ></TD ></TR ></TABLE ></DIV ><P > <A HREF="x4167.html#BSG.TEX.F.S68.112" >Figure 27</A >, <A HREF="x4167.html#BSG.TEX.F.S68.113" >Figure 28</A > and <A HREF="x4167.html#BSG.TEX.F.S68.114" >Figure 29</A > show the three individual textures which, when combined in a single material and mapped to various material parameters, create a nice wood texture (<A HREF="x4167.html#BSG.TEX.F.S68.115" >Figure 30</A >). </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.112" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/TextureWood1.png"></P ></DIV ><P ><B >Figure 27. First Wood ring texture</B ></P ></DIV ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.113" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/TextureWood2.png"></P ></DIV ><P ><B >Figure 28. Second Wood ring texture</B ></P ></DIV ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.114" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/TextureWood3.png"></P ></DIV ><P ><B >Figure 29. Clouds texture</B ></P ></DIV ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.115" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/TextureWood.png"></P ></DIV ><P ><B >Figure 30. Final result</B ></P ></DIV ></DIV ><DIV CLASS="section" ><H2 CLASS="section" ><A NAME="AEN4391" ></A >ImageTexture</H2 ><P > The Image texture is the only true 2D texture, and is the most frequently used and most advanced of Blender's textures. The standard, built-in bump mapping and perspective-corrected mip-mapping, filtering, and anti-aliasing guarantee outstanding images (set DisplayButtons <TT CLASS="literal" >OSA</TT > to ON for this). Because pictures are two-dimensional, the way in which the 3D texture coordinate is translated to 2D must be specified in the <I CLASS="emphasis" >mapping</I > buttons (<A HREF="x4167.html#BSG.TEX.F.S68.103" >Figure 18 in the Section called <I >Textures from the Material Point of View</I ></A >). </P ><P > The four standard mappings are: <TT CLASS="literal" >Flat</TT >, <TT CLASS="literal" >Cube</TT >, <TT CLASS="literal" >Tube</TT > and <TT CLASS="literal" >Sphere</TT >. Depending on the overall shape of the object, one of these types is more useful. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.116" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/FlatMap.png"></P ></DIV ><P ><B >Figure 31. Flat Mapping. </B ></P ></DIV ><P > The Flat mapping (<A HREF="x4167.html#BSG.TEX.F.S68.116" >Figure 31</A >) gives the best results on single planar faces. It does produce interesting effects on the sphere, but compared to a sphere-mapped sphere the result looks flat. On faces not in the mapping plane the last pixel of the texture is repeated, which produces stripes on the cube and cylinder. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.117" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/CubeMap.png"></P ></DIV ><P ><B >Figure 32. Cube Mapping. </B ></P ></DIV ><P > The cube-mapping (<A HREF="x4167.html#BSG.TEX.F.S68.117" >Figure 32</A >) often gives the most useful results when the objects are not too curvy and organic (notice the seams on the sphere). </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.118" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/TubeMap.png"></P ></DIV ><P ><B >Figure 33. Tube Mapping. </B ></P ></DIV ><P > The tube-mapping (<A HREF="x4167.html#BSG.TEX.F.S68.118" >Figure 33</A >) maps the texture around an object like a label on a bottle. The texture is therefore more stretched on the cylinder. This mapping is of course very good for making the label on a bottle or assigning stickers to rounded objects. However, this is not a cylindrical mapping so the ends of the cylinder are undefined. </P ><DIV CLASS="figure" ><A NAME="BSG.TEX.F.S68.119" ></A ><DIV CLASS="mediaobject" ><P ><IMG SRC="PartM/materials/gfx/SphereMap.png"></P ></DIV ><P ><B >Figure 34. Sphere Mapping. </B ></P ></DIV ><P > The sphere-mapping (<A HREF="x4167.html#BSG.TEX.F.S68.119" >Figure 34</A >) is the best type for mapping a sphere, and it is perfect for making a planet and similar stuff. It is often very useful for creating organic objects. It too produces interesting effects on a cylinder. </P ><DIV CLASS="tip" ><P ></P ><TABLE CLASS="tip" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="./stylesheet-images/tip.gif" HSPACE="5" ALT="Tip"></TD ><TH ALIGN="LEFT" VALIGN="CENTER" ><B >Moving a texture</B ></TH ></TR ><TR ><TD > </TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > As described in the previous section you can manipulate the texture in the texture part of the MaterialButtons. There is one more important feature to manipulate the textures. </P ><P > When you select an object and press <B CLASS="keycap" >TKEY</B >, you get the option to visually scale and move the texture space, but not to rotate the texture. The <TT CLASS="literal" >Object</TT > coordinate mapping is anyway much more flexible. </P ></TD ></TR ></TABLE ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="x4021.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="book1.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="x4436.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Materials in practice</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="c3943.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Multiple Materials</TD ></TR ></TABLE ></DIV ></BODY ></HTML >