Book Image

Blender 2.5 Materials and Textures Cookbook

Book Image

Blender 2.5 Materials and Textures Cookbook

Overview of this book

Blender 2.5 is one of the most usable 3D suites available. Its material and texture functions offer spectacular surface creation possibilities. It can take you hours just to create basic textures and materials in Blender and when you think of creating complex materials and textures you are petrified. Imagine how you will feel when you overcome these obstacles. This book wastes no time on boring theory and bombards you with examples of ready-created materials and textures from the start, with clear instructions on how they were created, and what you can learn from them for making your own. It covers all core Blender functions you will ever need to easily create perfect simulation of objects from the simplest to the most complex ones. The book begins with recipes that show you how to create natural surface materials, including a variety of pebbles, rocks, wood, and water, as well as man-made metals, complete with rust. By utilizing some of the easiest-to-use animation tools available, you will be able to produce accurate movement in mesh objects. Familiarize yourself with a plethora of tools that will help you to effectively organize your textures and materials. You will learn how to emulate the reflective properties of natural materials and how to simulate materials such as rusted iron, which is difficult to make believable. Transparency and reflection are both tricky natural surface properties to simulate but these recipes will make it easy. Explore ways to speed up animations by using special painting techniques to significantly lower render times. By the end of the book, you will be able to simulate some of the most difficult effects to recreate in any 3D suite, such as smoke, fire, and explosions.
Table of Contents (16 chapters)
Blender 2.5 Materials and Textures Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a large rock face using photo reference


Rock faces are extremely dramatic structures shaped by tremendous forces, such as earthquakes, volcanic eruptions, and glacial erosion over millions of years. Trying to simulate that kind of surface history can be daunting. So far we have explored procedural textures for most of the rocks created. It's time to show how images can be employed to create variety over the standard procedurals available.

In my part of the world we have some very beautiful rocks called bluestone. They have a structure that the ancients believed were a direct map of the stars. Their blue surface, with lighter blue highlights, was so different from other rock types that they collected them into stone henges, transporting them many hundreds of miles across these islands at a time when there were no cranes or heavy transport vehicles. Outcrops of these natural rocks can be found on many of the hills surrounding me. In fact, the mesh we created earlier looks very much like these stones. So why not try to recreate a surface material of their beauty?

Carn Edward with view to Cerrig Lladron for SN0536 © Copyright ceridwen and licensed for reuse under a Creative Commons License.

Getting ready

Open the rock-default.blend blendfile you created in the Creating a large rock material using procedural, and node textures recipe earlier in this chapter. Or if you have not completed that exercise download a pre-created version from the Packt Publishing website.

Rename and save it as large-rock-blue-stone-01.blend. This will ensure that we can start working on this recipe without overwriting the default rock scene created earlier. You will learn in Chapter 5 how important it is to manage your files to help ensure you do not accidentally destroy, or radically alter, a previously created blendfile, material, or texture masterpiece.

You will also need to download an image PEMBROKESHIRE-CLIFF-ROCKS.png for use in this recipe from the Packt Publishing website.

Save it to the textures sub-directory below where you saved the blendfile.

How to do it...

  1. With the rock mesh object selected create a new material in the Materials panel. Name it Blue-Stone.

  2. Set the Diffuse color to R 0.173, G 0.194, and B 0.240. A nice gray/blue color.

  3. Under Specular set the specular type to Wardiso, with Intensity set to 0.083 and Slope to 0.400.

  4. Switch to the Textures panel and create a new texture of type Clouds in the first slot calling it large-cloud.

  5. In the Clouds settings select Grayscale and Noise/Soft. Set Basis to Blender Original, Size to 0.40, and Depth to 3.

  6. Under Colors set Adjust/Brightness to 1.100, and Contrast to 1.300.

  7. Under Mapping set the Size X to 0.20.

  8. Under Influence select Diffuse/Color and set to 1.00, Geometry/Normal to 3.142, and the Blend color to RGB 0.05.

    Save your work and do a test render.

    You will notice that the clouds texture has added a little normal and color variety to the surface. You might also notice that there is a little too much surface specularity in this render. We will create textures to tone that down a little in a moment. But if you turn specularity totally off it will look very flat and uninteresting. Even substances like black velvet, that absorb light very evenly, will show some specularity when they are creased.

    It's time to add a photographic image that will add some natural looking stratification to this bluestone rock surface.

  9. Select the next free texture slot and create a new texture and make it an Image or Movie node texture. Name it Pembs-Cliff-Image.

  10. In the Image tab Open the PEMBROKESHIRE-CLIFF-ROCKS.png image from your textures directory.

  11. Under the Image Sampling tab reduce the Filter Size to its minimum of 0.10.

    The picture is quite large at 3,472 x 2,314 pixels. This means we can utilize all of its detail without worrying about aliasing and therefore reduce the filter size to its minimum. The image itself has been modified to even out the levels and also converted to grayscale.

  12. In the Image Mapping tab change the Crop Mininum X and Y values to 0.350. Also change the Crop Maximum X and Y values to 0.650. This has enlarged and cropped the image to remove the sky in the top left of the original image. We could have done this in a paint program but it's quite possible directly in Blender.

  13. Under the Influence tab select Geometry/Normal and set to -2.500. Finally, select RGB to Intensity. Ensure all other influences are unselected.

    If you render now you will see an extremely worn rock surface. Although this might be OK for certain simulations we can map the image a bit more creatively.

  14. In the 3D view set the cursor to the center, Shift+S, Cursor to Center, and create an Empty. Name it rock-rotate and set its rotation as follows, X 47.051, Y -19.503, and Z 31.622. You can do this by pressing the N key while your cursor is in the 3D view. This will bring up the Transform pallet where you can enter the rotation amounts directly. While in this view alter the Location X value to -1.250. This will move the Empty to the left slightly.

  15. Select the rock mesh object again and in the Texture panel under Mapping/Coordinates select Object, and from the Object list select the rock-rotate empty you just created.

    Render once more and you should see some better stratification across the rock surface. Now we will add the lighter blue strata in this bluestone simulation.

  16. Select a free texture slot below the Pembs-Cliff-Image and add a new texture of type Image or Movie and name it Blue-stone-MASK.

  17. Under the Image tab click the image icon next to the New and Open button. This will display a list of images currently in Blender. Select the same image as before, PEMBROKESHIRE-CLIFF-ROCKS.png. Although we are using the same image we will make some changes to the way it is used.

  18. In the Colors tab Adjust the Brightness to 1.100 and the Contrast to its maximum of 5.000.

    You should see in the preview that we have increased the contrast of our image, which we shall use to mask, or stencil, another material.

  19. Under mapping select Coordinates/Object and select rock-rotate, the empty we created earlier.

  20. In the Image Mapping change the Crop Minimum X and Y to 0.350 and the Crop Maximum X and Y to 0.650. This is the same cropping as the previous texture.

  21. Under Influence set RGB to Intensity and Stencil. Ensure no other settings are selected as this texture is only being used as a stencil. It will not contribute any color or bump to the material.

  22. Select the next free texture slot and create a new texture of type Musgrave and name it Small-Musgrave.

  23. Under the Musgrave settings select Type/Multifractal with Dimension 0.100, Lacunarity 6.000, and Octaves 8.000.

  24. Under Influence/Diffuse select Intensity with a setting of 1.00, and Color 0.161. Under Geometry set Normal to 1.195. Set the Blend type to Screen as well as RGB to Intensity, and a color of R 1.00, G 0.92, B 0.93.

Do a final render to view our bluestone material simulation.

How it works...

Images can be used in all kinds of ways within Blender. In this recipe we have taken a black and white image and mapped it to our surface, not worrying about repeats or seams in the image. We have used procedural textures to enhance and cover-up any inconsistencies that are certainly there. We have filtered the same image in the texture panel controls using cropping, contrast, and other object mapping to create a rescaled and improved contrast mask without having to resort to a paint program or load yet another memory-intensive image into Blender.

Blender's versatility, in what can be achieved using images, is almost unrivaled. You will see in future recipes how seams and repeats can be avoided and how to use paint programs to create better images for use in materials later.

See also

Chapter 7, Applying UVs to create an accurate skin material

In that recipe, you will discover how to wrap images around a mesh using UV mapping. This is the preferred way when mapping to a mesh that must move and distort in an animation. Fortunately, our rock recipes do not bend or twist as a cartoon character might.