Blender 2.5 Materials and Textures Cookbook - Colin Litster - E-Book

Blender 2.5 Materials and Textures Cookbook E-Book

Colin Litster

0,0
34,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

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.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 486

Veröffentlichungsjahr: 2011

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Blender 2.5 Materials and Textures Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Creating Natural Materials in Blender
Introduction
Good observation will be your greatest asset
Creating a realistic pebble material using procedural textures
Getting ready
Creating a gray limestone pebble
Getting ready
How to do it...
How it works
Creating the quartz pebble material
Getting ready
How to do it
How it works
Creating an opalescent quartz material
Getting ready
How to do it
How it works
Creating a mask to represent the quartz veins
Getting ready
How to do it
How it works
Colors
Size
Combining two materials, to make a third, using Nodes
Getting ready
How to do it….
How it works...
There's more...
See also
Creating a large rock material using procedural, and node textures
Getting ready
How it works…
Creating a sea rock material
Getting ready
How to do it...
How it works…
See also
Creating a texture node to simulate seaweed at the base of a rock
Getting ready
How to do it
How it works...
There's more...
Creating a large rock face using photo reference
Getting ready
How to do it...
How it works...
See also
2. Creating Man-made Materials
Introduction
Creating a slate roof node material that repeats but with ultimate variety
Getting ready
How to do it...
How it works...
See also
Using a tileable texture to add complexity to a surface
How it works...
See also
Warping a texture to disguise seams in a repeated texture
Getting ready
How to do it...
How it works...
See also
Adding weathering by copying and reusing textures
Getting ready
How to do it...
How it works...
Combining materials using nodes
Getting ready
How to do it...
How it works...
There's more...
Utilizing repeat textures
See also
Creating metals
Getting ready
How to do it...
How it works...
Using specular maps to add age and variety to man-made surface materials
Getting ready
How to do it...
How it works...
There's more...
Adding oxidization weathering to our copper material
Getting ready
How to do it...
How it works...
Adding grime and artistic interest to our copper material
Getting ready
How to do it...
How it works...
Creating a path or road material that never repeats
Repeating a tiled texture to duplicated objects
Getting ready
How to do it
How it works
Deforming materials and textures in Blender
Getting ready
How to do it
How it works...
There's more...
See also
3. Creating Animated Materials
Introduction
The types of texture and material animation tools in Blender
How to move textures and create animation without moving a mesh
Getting ready
How to do it...
How it works...
Manipulating the F-Curves of texture movement
How to do it...
How it works...
There's more...
See also
Using an Empty as a dummy object to control texture movement over time
How to do it...
How it works...
A barber pole with no moving parts
Getting ready
How to do it...
How it works...
See also
How to alter the color of materials and textures over time
Creating a red hot iron bar
Getting ready
How to do it...
How it works...
Changing the multiple settings within a color ramp over time
Getting ready
How to do it...
How it works...
See also
How to animate transparency in a texture
Creating a burning sheet of paper
Getting ready
How to do it...
How it works...
There's more...
See also
How to change textures during an animation
Creating a Red Alert sign using a sequence of images
Getting ready
How to do it...
How it works...
There's more...
See also
How to texture with movies creating a TV screen
Getting ready
How to do it...
How it works...
There's more...
See also
4. Managing Blender Materials
Introduction
Setting a default scene for materials creation
Getting ready
How to do it...
How it works...
Anti-aliasing
Turning off unneeded render settings
There's more...
Additional settings for default scene
Getting ready
How to do it...
How it works...
There's more...
Lights
Ambient occlusion
Creating an ideal Blender interface for material creation
Getting ready
How to do it...
How it works...
Creating an ideal texture animation setup
Getting ready
How to do it...
How it works...
See also
Naming materials and textures
How to do it...
How it works...
See also
Appending materials
Getting ready
How to do it...
How it works...
Linking materials
Getting ready
How to do it...
How it works...
Making blendfiles stand alone
Getting ready
How to do it...
How it works...
See also
5. Creating More Difficult Man-made Materials
Introduction
Creating rust on iron-based metals
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a mesh object to provide good reflective surfaces
Getting ready
How to do it...
How it works...
See also
Using environment map textures to simulate reflection
Getting ready
How to do it...
How it works...
There's more...
See also
Varying environment map reflections to simulate corrosion or wear
Getting ready
How to do it...
How it works...
There's more...
Animating settings to produce a time-lapse of copper aging
See also
Using raytrace reflections to simulate polished metals
Getting ready
How to do it...
How it works...
There's more...
See also
Varying raytrace reflections to simulate dirt and grime
Getting ready
How to do it...
How it works...
There's more...
6. Creating More Difficult Natural Materials
Introduction
Creating realistic large-scale water in Blender 2.5
Getting ready
How to do it...
How it works...
There's more...
Setting up an ocean vista environment
Getting ready
How to do it...
How it works...
See also
Creating a wave surface using textures
Getting ready
How to do it...
How it works...
See also
Creating an ocean surface material
Getting ready
How to do it...
How it works...
See also
Creating wake around objects in water
Getting ready
How to do it...
How it works...
See also
Creating a non-repeating leaf material
Getting ready
Creating image and bump maps, with alpha channels
How to do it...
There's more...
Using images as the basis for a leaf material
Getting started
How to do it...
How it works…..
Using alpha to create a leaf shape on a simple mesh
Getting started
How to do it…
How it works….
See also…
Adding a non-repeating bump to the leaf material
How to do it….
How it works….
Adding color complexity to the leaf material
How to do it….
How it works...
7. UV Mapping and Sub Surface Scattering
Introduction
Creating a face map from photographs
Getting ready
How to do it...
How it works…
There's more…
See also
Unwrapping a face mesh to produce a UV map
Getting ready
How to do it…
How it works...
There's more…
See also
Editing a UV map to optimize the image space
Getting ready
How to do it...
How it works...
There's more...
See also
Creating multiple UV maps for a single object
Getting ready
How to do it...
How it works...
See also
Combining UV maps to create an enveloping UV
Getting ready
How to do it...
How it works...
See also
Using a paint package to merge UV maps
Getting ready
How to do it...
How it works...
There's more...
See also
Extracting color, bump, and specularity maps from photographs
Getting ready
How to do it...
How it works...
See also
Applying UVs to create an accurate skin material
Getting ready
How to do it...
How it works...
There's more...
See also
Skin shading using SSS and AO
Getting ready
How to do it...
How it works...
There's more...
See also
8. Painting and Modifying Image Textures in Blender
Introduction
Post processing rendered images from within Blender
Getting ready
How to do it...
How it works...
There's more...
Useful node procedures
See also
Adding more than one material to a surface
Getting ready
How to do it...
How it works...
There's more...
See also
Adding dirt onto a model
Getting ready
How to do it...
How it works...
There's more...
See also
Creating an aged photo with simple Blender materials
Getting ready
How to do it...
How it works...
There's more...
9. Special Effects Materials
Introduction
Creating explosive smoke in Blender
Getting ready
How to do it...
How it works...
There's more...
Creating the perfect domain
Only use the high resolution simulation
Low settings to start with
Clear bakes before re-baking
Once happy with the simulation, protect your cache
Simple materials make great smoke
See also
Igniting a flame and making things burn in Blender
Getting ready
How to do it...
How it works...
There's more...
See also
Creating loopable fire and smoke sequences
Getting ready
How to do it...
How it works...
Adding complex FX without the render overhead
Getting ready
How to do it...
How it works...
There's more…
See also
Index

Blender 2.5 Materials and Textures Cookbook

Blender 2.5 Materials and Textures Cookbook

Copyright © 2011 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: January 2011

Production Reference: 1200111

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 978-1-849512-88-6

www.packtpub.com

Cover Image by Colin Litster ( www.cogfilms.com)

Credits

Author

Colin Litster

Reviewers

Darrin Lile

Sanu V.M

Willem Verwey

Acquisition Editor

Sarah Cullington

Development Editor

Meeta Rajani

Technical Editors

Pallavi Kachare

Ajay Shanker

Indexer

Tejal Daruwale

Editorial Team Leader

Aanchal Kumar

Project Team Leader

Lata Basantani

Project Coordinator

Rebecca Sawant

Proofreader

Ting Baker

Production Coordinator

Melwyn D'Sa

Aparna Bhagat

Cover Work

Melwyn D'Sa

About the Author

Colin Litster started his passion for animation, and things 3D, after studying for an Art degree with 3D in its title. At that time computer animation had not even happened, but working as a special effects cameraman in the British film industry convinced Colin that there must be better ways of generating film effects other than directly in the camera, or by post processing in the labs. After studying further he discovered the microprocessor and became hooked on using this new computer technology to further those ideas.

Colin moved into higher education, eventually to the position of Head of IT and Media Services in the south east of England. In 2002, Colin discovered the relatively unknown Open Source 3D suite called Blender. After working with all of the commercial 3D applications up until that point, Colin thought that this young upstart of an application must be inferior. However, after just one week of use Colin realized that Blender was not only capable of most things 3D, it was also incredibly easy to use. At this point, Colin realized that an ambition to produce a full-length 3D feature was possible to achieve with this package. Embracing the Open Source ethos, Colin wanted to give something back to the community so he decided to document and create tutorials for others to see its potential. Some of Colin's ocean, smoke, and special effect tutorials have become a driving force in how to stretch the use of this superb 3D tool.

Colin was a contributor to the Blender Summer of Code documentation project with the Blender Foundation in 2006. Since then he has been a contributing author to the Essential Blender book edited by Roland Hess, and Ton Roosendaal. Colin has also been a presenter at the Blender Conference showing others how he approaches material and texture creation to create the impossible using the Blender 3D suite.

I would like to thank Sarah Cullington, my commissioning editor, and all the wonderful people at Packt Publishing who have gently guided and encouraged my development of this book. I would also like to thank Tony Mullen who has been urging me to put together my material experiments since 2006. I also cannot forget Ton Roosendaal and all the wonderful developer community of Blender. But mostly, I must thank my lovely wife Eveline as without her complete encouragement and support this book could not have been written. I love you very much.

About the Reviewers

Darrin Lile received Bachelor of Arts and Master of Arts degrees in Film and Media Studies from the University of Kansas. He has worked as a producer and director of educational videos, a sound editor for film and television, a control systems programmer, and a network security analyst. Check out his latest media project at www.darrinlile.com.

Sanu Vamanchery Mana is a 3D artist from India with over 11 years of experience in the field of animation, gaming and special effects and Lecturer of Interactive Media Design/Animation and Game Design at Raffles Design Institute, Singapore. As a lecturer, he has given many workshops, trainings, and presentations in many countries of Europe, Asia, and Latin America. Currently, he is reviewing two Blender 3D books for Packt Publishing.

He has worked for gaming projects like Golden Eye 007 (Electronic Arts), Neopet (Sony Entertainment), and World Series of Poker (Sony Entertainment). He was also involved in the short movie JackFrost, which was nominated for a BAFTA.

In 1992, Willem Verwey started working in 3D Studio back in the days when we used DOS. He later moved to 3D Studio Max 1.2!

He founded the 3D Animation Network in 2007 and developed the ANIM8 program introducing school children and young people to the world of animation.

Since 2007 Willem has been focusing on Blender, developing the ANIM8 program and freelancing. You can contact him at <[email protected]>.

Willem is a member of the Blender Foundation Certification Review Board.

"I believe there is a great future for Blender to professionals since it is a great package to use.

In my opinion Blender does have a place in the market and we will see a great increase in professionals using Blender in the world!"

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. 

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Preface

The Blender 3D suite is probably one of the most used 3D creation and animation tools currently in existence. The reason for that popularity is both its tool set and the extraordinary fact that it can be downloaded free of charge. Blender has been around since 1998 but it was not until it entered the GNU General Public License, open source market in 2002 that it grew in popularity to its current position.

Over the last year Blender has been going though a major update to its user interface, which has been named Blender 2.5. This radical restructure of the 3D suit has introduced not only a more up-to-date interface but also some advanced features that make Blender a capable 3D tool for professional productions. Indeed the Blender Foundation has been keen to develop these capabilities by applying Blender to create open source productions. 2010 saw the premiere of Sintel, a 15-minute cinema quality fantasy, which had over one million views on YouTube in less than four days.

Blender 2.5 is therefore an ideal tool for the aspiring 3D animator, and seasoned professional, to turn their ideas into professional quality renders and productions. Of course, producing a great model and animating it is only part of the process necessary to bring a production to life. We need to add color and texture to our models to make them appear real or give that extra artistic flare to change a computer 3D model into a stunning-looking creation. We do this by adding materials and textures to our 3D models and Blender 2.5 offers some unique and easy to use tools that are covered in this book. By studying the recipes described here you will learn how to use and manage many of the Blender 2.5 material and texture techniques to transform your 3D objects into spectacular creations.

What this book covers

Chapter 1, Creating Natural Materials in Blender shows how to apply materials to create a range of stone-like substances that demonstrate the use of both procedural textures and photo images to aid the simulation of random surface properties found in these natural substances. You will experience standard material creation as well as Node textures and materials.

Chapter 2, Creating Man-made Materials shows how to simulate manufactured materials such as metals and pattern-repeated materials like slate roofs and cobbled paths. You will learn how Blender 2.5 offers unique abilities to help mask seams and repeats to turn your man-made material simulations into convincing material creations.

Chapter 3, Creating Animated Materials shows how to manipulate materials and textures over time. Thus, adding animated effects to a surface using superb Blender 2.5 material and texture animation techniques.

Chapter 4, Managing Blender Materials deals with ways to make your use of Blender 2.5 materials and textures more structured. You will learn how to organize and name materials as well as how to set up the interface to better suit your material needs.

Chapter 5, Creating More Difficult Man-made Materials shows how to create convincing reflective surfaces that not only look good but are quick and easy to produce. You will also learn various techniques employed in Blender 2.5 to simulate grime and other surface irregularities to bring difficult man-made materials to life.

Chapter 6, Creating More Difficult Natural Materials shows how to create spectacular natural surfaces such as entire oceans with complex waves and wake. The new recipes described here are entirely produced using the new material features found in Blender 2.5 but without the overheads usually associated with such large-scale simulations. You will also learn how material transparency can be used to model quite complex objects using a very simple material technique.

Chapter 7, UV Mapping and Sub Surface Scattering shows how to create a natural-looking human face using Blender 2.5 UV mapping and Sub Surface Scattering. You will be shown how to create, and manipulate, high-quality photo images for use in this usually difficult 3D material simulation.

Chapter 8, Painting and Modifying Image Textures in Blender shows how to use some of the quick material and post processing techniques found in Blender 2.5 to transform a surface appearance simply and quickly. You will learn ways to alter a surface appearance, such as adding grime or age to a surface, as well as how to radically alter a pre-rendered animation to give extra atmosphere or post process a surface appearance after it is rendered.

Chapter 9, Special Effects Materials shows how to create some of the spectacular and new Blender 2.5 effects materials such as smoke, explosion, and flames. You will discover different methods to ease the creation of these intensive material effects as well as ways to produce stock effects that can be easily and quickly implemented into your own productions.

What you need for this book

All of the recipes in this book were created in Blender 2.56a, which at the time of writing was the latest official version available. Blender 2.56a can be freely downloaded from the Blender Foundation site in various computer system varieties. Currently it is available both in 32-bit and 64-bit versions for Linux, MAC, and Windows Operating Systems.

http://www.blender.org/development/release-logs/blender-256-beta/

Blender is being developed constantly but this version is feature complete and was used to produce all the recipes found in this book. As Blender moves towards its next milestone, Blender 2.6, its material and texture capabilities will improve but the settings described in the recipes should produce similar if not identical appearances to the images displayed.

Several recipes make use of images that are either created or modified in a paint package. You can use whatever paint package you are used to but if you haven't got one available I would suggest downloading GIMP, which is also free under a GNU General Public License.

http://www.gimp.org/

Who this book is for

This book is aimed at the semi-proficient modeler who wishes to improve their work in Blender 2.5 by employing better and more efficient material and texture techniques.

Although not an introduction to Blender 2.5, or all of its new UI facilities, the methods used in this latest version are relatively straightforward and therefore the novice will be able to use many of the recipes while learning a great deal about the Material and Node systems of the latest Blender 3D suite.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Save your blendfile as slate-roof-01.blend."

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Ensure you have a Node Editor window displayed".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail <[email protected]>.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Tip

Downloading the example code for this book

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. Creating Natural Materials in Blender

In this chapter, we will cover:

Creating a realistic pebble material using procedural textures and node materialsCreating a gray limestone pebbleCreating the quartz pebble materialCreating an opalescent quartz materialCreating a mask to represent the quartz veinsCombining two materials, to make a third, using nodesCreating a large rock material using procedural, and node texturesCreating a texture node to simulate seaweed at the base of a rockCreating a large rock face using photo reference

Introduction

The surface of a natural material may seem one of the easiest to reproduce in a 3D suite such as Blender. However, natural surfaces can be quite complex in their appearance. Color, specularity, and reflection can organically change across a surface as a result of location, climate interaction, and variations in the natural substance. In many ways simulating natural objects in Blender will require more complex materials and textures than man-made objects to make them look convincing. Fortunately, learning how to create believable natural surface materials will help you in the development of many other material types. After all, most manufactured objects are created from, or based on, natural materials.

Blender offers a vast array of material and texture tools to aid you in the creation of natural-looking surfaces. Because of this there are many ways to produce similar, and equally pleasing, results. However, there are approaches that will speed material creation and make the process easier, adaptable, and more enjoyable.

Although there are no prerequisites to using the recipes for this first chapter it would be useful for you to know how Blender materials are organized and the various methods of mapping them to mesh objects. If these concepts are unfamiliar, or new to you, visit the free support documentation at the BlenderWiki: http://wiki.blender.org/index.php/Main_Page

At the time of writing most of this documentation is based on prior versions of Blender. However, I can recommend the Blender Summer of Documentation section on Materials and Procedural Textures written by me in 2006.

http://wiki.blender.org/index.php/Doc:Tutorials/Materials/BSoD

Although utilizing images from the 2.49 series of Blender it still covers many of the basic principles of material creation.

This book, however, will take you beyond the basics and into the new Blender v2.5 materials and textures interface.

Good observation will be your greatest asset

When trying to simulate any surface, your eyes will be your greatest asset. Carefully observing either the real material, or good reference photos, will make the task of simulation in Blender much easier. This is particularly important with natural materials, which have complex structures giving fine variation in surface color, specularity, and texture. Understanding what these details are will make any material simulation easier and give the viewer the correct visual clues so that they know what they are meant to be looking at. Even if you intend to represent a surface in a non-photo-realistic manner it is important to provide the viewer with some essential surface properties that will give them the visual essence of a surface.

The good thing is that natural materials are usually easy to study because we can pick them up around us. If the natural object you are trying to create isn't at hand, then use the Internet to look for photo references.

http://images.google.co.uk

http://uk.images.search.yahoo.com

http://www.flickr.com/photos/

Alternatively, try to take your own photo reference shots by carrying a digital camera around with you. Even a mobile phone camera can be good enough to take reference photos.

Another useful tool is a magnifying lens. Being able to closely study the real surface that you are trying to simulate, can aid your perception of the detailed color variations and surface texture of a natural object. Just using your eyes should give you enough information about a natural surface to enable you to simulate it in Blender.

It is also a good idea to set up the default scene in Blender to provide better lighting for material and texture creation. You will need to regularly render the objects you are creating textures for, just to see a more accurate example of a materials effect. Improving the lighting, from that given in the factory settings, will aid you in that process.

You will find a recipe in Chapter 4, Setting a default scene for materials creation, that provides a better materials setup.

Creating a realistic pebble material using procedural textures

For this first recipe we will create a realistic-looking pebble based on one that could found on many beaches across the world.

The previous screenshot shows three pebbles, one that mostly comprises hard gray sandstone, another consisting of quartz, and a third that has both types of rock fused in layers. The pen is shown to provide a sense of scale for these pebbles.

Although all three recipes are designed to simulate a surface when dry, it can be useful to know what it looks like when wet. For instance, the gray sandstone will look much darker when wet because light will be spread less across its surface. In contrast, quartzrock will hardly alter at all when wet because its surface is much more reflective anyway. Knowing these surface properties will aid you in your simulation.

Getting ready

To start off this exercise we are going to create a simple pebble-like mesh on a white plane background and then apply a pebble material, based on our observations of the reference photo, to the pebble mesh. We are not going to create the exact pebble as shown in the reference photo, but the essence of such a surface that could be applied to any shaped pebble mesh.

The easiest way to create a simple pebble shape is to use the default cube and:

subdivide, in edit mode by three to four subdivisions, to give you a few more vertices to play withmake the mesh smooth from the tool shelfadd a Subdivision Surface modifier at about level 3then move vertices around in proportional edit mode until you get a reasonable pebble like shape. I scaled my cube by about 150 percent during this process

You could also use the Multiresolution modifier, and the Sculpt tool to achieve a similar effect.

Also create a simple plane below the pebble mesh and scale this until it is larger than the camera view. This will give a surface on which to display our pebble.

Save your work as pebble-00.blend.

Creating a gray limestone pebble

One of the simplest materials to create is a gray sandstone pebble using just procedural textures. We will apply this material again in other recipes that follow so the naming of each material will become clearer as you work your way through each recipe. If you start any of the recipes out of order you can still complete them by downloading the named blendfiles of any of the uncompleted preceding recipes.

Getting ready

You will need to have created the base mesh as described above. However, you can also download a starting blendfile from the Packt Publishing website.

How to do it...

We will take the base blendfile and create a new material that will simulate gray sandstone. So, open up the saved pebble-00.blend file, or one downloaded earlier.

With the pebble mesh selected, select the Materials button from the Properties tab.On the Materials properties editor panel click the + button to create a new material. Name this Surface-Color.Change the Diffuse color to a lighter gray. If you click on the color box, a color selector appears where you can change the R(ed), G(reen), and B(lue) values to specific settings. Use 0.750 for R, G, and B.You can also change the color value by H(ue), S(aturation), and V(alue) as well as Hex values. You can, of course, judge the color, saturation, and lightness by directly manipulating the color wheel marker and lightness slider with the mouse. Change the Specular settings to type Wardiso, Intensity value to 0.411, and Slope to 0.400.

The Wardiso specular setting allows finer control over the specular light across a surface. It suits the spread of specular light found on dry pebble surfaces. You will find that all the specular and diffuse shading methods have different characteristics that may be suited to specific surface types. Experiment to find out their benefits as well as drawbacks.

All that we have done here is create the basic surface properties of color and specularity. To make the material more believable it is necessary to add textures to give variety to the surface color, bumpiness, and specularity. Save your work at this stage, naming the file pebble-01.blend.

Select the Texture panel.Add a new Texture (the + button) of type Clouds, and name the texture Clouds.Under the Clouds settings make sure that Grayscale and Soft are selected and alter the Size to 0.05 and Depth to 5.Under Influence/diffuse settings select Color and set to 0.686.Select Intensity under Specular and set its value to -1.000.Also select Normal under Geometry and set its value to 0.500.In the Blend settings change the blend type to Mix and in the color selector create a darker gray than the base color by changing each of the RGB sliders to 0.46. Alter the DVar value to 0.484.Finally, check the Old Bump Mapping checkbox to make sure we are using the original Blender Normal method.

Note

Blender 2.5 comes with an improved Normal method but you can still employ the older method if that suits the material. Basically, the newer method provides a more detailed bump from a grayscale texture. However, the Blender old, or original, method, is more subtle and ideal for this recipe. We will meet the newer method later in this chapter.

We have produced a varied gray stone-like surface with a few bumps and a slight specular reflection across the surface, indicating that the pebble has reflective crystals embedded in its surface. Now let's add some surface wear to indicate damage as the sea water bashes the pebble about. Once again, save the blendfile, incrementing the filename, to pebble-02.blend.

Create a new texture of TypeDistorted Noise. Name it DistNoise.In the Distorted Noise settings tab set Distortion to 1.00 and Size to 0.25.Under Influence/Geometry select Warp and set to 0.040. This should be the only setting selected under Diffuse, Shading, Specular, or Geometry.Ensure that RGB to Intensity, Negative, and Stencil are selected.

The stencil setting will not visibly change the surface but it will affect the texture that follows.

Create a new texture of Type Musgrave, and name it Musgrave.Under the Musgrave tab set Dimension to 0.441, Lacunarity to 2.00, Octaves to 6.358, and Intensity to 1.660. Also set the Size to 0.64.In the Colors tab Adjust the Brightness to 0.411 and the Contrast to 2.469.In the Influence tab select Color and set to 0.191. Then under Geometry select the Normal setting it to -1.00.Set the Blend type to Mix and from the color selector create a darker gray with values RGB of 0.14. Check the Old Bump Mapping checkbox as we will be using the original Blender Normal method for this texture.

Save your work as pebble-03.blend before rendering an image of your gray sandstone pebble. Regularly saving as you progress through any project will mean you can at least recover back to the last save.

What you have produced is a good approximation of a gray sandstone pebble surface.

How it works

In the Blender Material panel you are apparently only offered three color settings; Diffuse, Specular, and Mirror. These set the overall color for each surface property. However, the parameters of each type of shader, Diffuse, Specular, and Mirror can radically alter the way the shader reacts to light and displays the surface. In our case we have set a gray color for the diffuse setting, and a simple white color for specularity. However, we have altered the specular shader to Wardiso, which offers a wider degree of light spread via its Slope setting. In fact, we have set it to 0.400, which will give the widest specular spread using Wardiso. The color settings for specular and mirror can be altered to any color. However, in the majority of cases they can be left at the default white setting as in the pebble example.

To add variety to the diffuse color we need a texture mixed in some way to simulate the surface color variations. Blender allows a large number of textures to be added to a material. The total number seems to increase each year. However, I have never needed to use any more than 16 textures in any material that I have ever produced. Learning how to economically apply textures is a skill that can only improve with practice but try to keep it down to a more manageable number. Your material solution will be much clearer when you view it, maybe several months later.

When you add a texture to a material try to name it immediately. The defaults Tex.001, Tex.002, etc will become confusing, especially if you have to create your material over several days.

In our case we added a texture of type Clouds. There are many other texture types available, ranging from procedural, mathematically produced random types, through to images, such as photographs or drawn images. All Blender textures have settings to alter their properties, such as color and scale, as well as how the texture will be mapped to a material, and what influence it will have.

Procedural textures are mostly grayscale but can be applied via Mix, Add, Multiply, Screen, etc to alter the underlying material colors. These blend types work in a similar way to those found in paint packages, such as Gimp. In this pebble recipe we have used relatively simple mix methods to simulate a complex surface. Later recipes will show the effect of the other blend types available.

In this recipe we have used a number of textures to vary the color across the surface, as well as altering both the bumpiness (the normal) and specularity. Employing textures to add these variations is the way complex surfaces can be synthesized in Blender. We have used a variety of procedural textures to affect color, specularity, and normal. In fact, the first texture, Clouds, affects all three of these settings. Blender allows you to use any texture to change these and other settings with values that are controllable for each influence you wish to use. Here we used the Clouds texture to alter the color, specularity, and bump of the pebble material. However, the second texture, DistNoise, does not affect any of the influence settings of the material; its only task is to warp the texture that follows it. Using a texture to do this is a great way of changing the appearance of a procedural texture. The variation avoids repetition in the surface, which can be a problem if you employ procedural textures many times in a scene. Here it is used in a subtle way with a low Warp setting of 0.040. Another important setting here is the RGB to Intensity from the Influence tab. This will ignore the color values of the texture, which are not needed when applied to several of the influence types. In our case the Distorted Noise texture is grayscale anyway, but getting into the habit of checking this setting will avoid problems when using a color texture for such influence examples.

We also set Stencil in the Influence tab. This fascinating setting uses the texture to mask following textures. We can use it to allow the following textures to affect the surface (any white areas of the texture), partially affect the surface (any gray areas of the texture), or obscure following textures surface influences (any black areas of the texture). We can reverse that effect by selecting the Negative setting above it. Masking is one of the fundamental techniques to create a good texture. The stencil setting is extremely effective at giving that facility. However, it will only work with grayscale textures or with the RGBtoIntensity set.

The third texture, Musgrave, adds further levels of color and bump variation. In the Musgrave tab we have altered the settings to produce distinct bump maps to create the kind of dents found when pebbles crash in the surf. Having several textures affecting the normal of a surface means we can simulate complex bump structures using simple procedural textures. By varying the contrast of a texture, we can limit and increase the edge detail of a bump quite simply. Here we did not set the RGB to Intensity under the Influence tab as the texture is already grayscale. If you want, set that now and render again and see if there is any difference.

Exploring the settings for any texture can be one of the most creative and stimulating exercises in 3D design. Finding the right settings will become easier as you explore Blender but experimenting as the accidental breakthrough may be the answer to your next material simulation.

Creating the quartz pebble material

Quartz is an extremely common type of stone that is usually layered inbetween other rock types. However, pebbles on beaches where this type of rock is common often break off from the layers and are tossed in the sea to form pebbles. The second pebble we will create is based on such a variety of rock.

Getting ready

If you have completed the previous recipe load up the saved pebble-03.blend file.

Alternatively, you can download a pre-created file from the following location the Packt Publishing website.

How to do it

Let's create a new material to represent the quartz pebble. To do so we need to have the pebble object selected and temporarily unlink the Surface-Color material, giving a clean surface upon which to design our quartz material. However, once you unlink a material from an object it will only be available for reuse during your current working session. As soon as you close that Blendfile, even if you have saved it, the material will be lost. Blender normally only saves materials assigned to objects. However, we can fix a material or texture by clicking the F button to the right of the material or texture name.

With the pebble object selected click the F button, next to the material name in the Material properties panel, to fix the material into the blendfile. Then click the X button to unlink it from the Materials panel.

If you hover over X it will display unlink datablock. You will notice that if you Shift-click the X you will permanently remove the material the next time you save. So be careful as we only want to temporarily remove the link to our Surface-Color material, while we create the quartz material.

Click the New tab to create a new blank material and name it Quartz.We can keep all the default material properties set apart from the Diffuse color. So change this to pure white or RGB1.00.Switch to the Textures panel and add a new texture of TypeClouds and name it QuartzClouds.Under the Clouds tab set Grayscale and Soft, Size to 0.36, and Depth to 2.0.Under Influence only have Normal selected and set to -1.00 and under Blend type Screen. Select RGB to Intensity, Negative, and Stencil. Also check Old Bump mapping. Finally, change the color selector to R, G, B0.700.

That has created a slight bump map to the texture and a stencil, of which only some of the following textures will appear through.

In the Texture properties select the next free texture slot and create a new texture of type Musgrave, and name it QuartzMusgrave.Under the Musgrave tab set the type to Multifractal, and Basis Voronoi F1 with Size0.05.Under the Colors tab set Adjust/ Brightness to 0.467 and Contrast to 5.000.Under Influence select Diffuse Color set to 1.00 and Geometry Normal to 10.00. Set the Blend type to Screen and adjust the color picker to R and G to 0.84 and B to 0.68. Also select Old Bump Mapping.

This will give a weathered and slightly dirty appearance to our quartz material. The quartz in the pebble example is contaminated with other rock fragments. Something that only becomes apparent when you look through a magnifying lens at the real material. If you were to render at this point, then you have a texture that could be used as a pebble material as it is. But we can take it further by varying the worn surface across the pebble.

Select an empty texture slot below the QuartzMusgrave texture. However, rather than creating a new texture we will load up the same QuartzMusgrave texture into the new slot but make some modifications to how it is used in our material.

Select the checkered icon that precedes the texture name shown in the following screenshot:

From the displayed list select QuartzMusgrave. The number 2 should appear just past the texture name to show that this texture is used twice.

Under Influence and Geometry change the Normal value to 5.00, the Blend value to Screen, and change the color selector to black (RGB values to 0.00).

Save your work so far, incrementing the filename to pebble-04.blend, and perform a test render.

We have produced a surf-damaged pebble showing the effect of being crashed across other pebbles as the tide ebbs and flows.

How it works

The second material that we created was to simulate the quartz veins in the pebble. Each of the textures used in this material produce a surface, in much the same way as the first. Procedural textures vary in the surface color and normals (bump) to produce the desired effect. However, there are several special techniques used that are worth highlighting as they can add a little bit of magic to a surface simulation task.

The first texture is named QuartzClouds and this has only been used to influence the normal of the material. However, you will notice that under the Influence/Blend setting Negative, RGB to Intensity, and Stencil have all been checked.

Negative will reverse the effect of the texture. This is an overall setting and any of the set influences will be affected. In our case only normal is set.RGB to Intensity will internally convert the image to grayscale, so that only those intensity values affect any of the other influence settings. If the color intensity had been set the default magenta color would have been mixed with the material color based on the proportions of gray in the texture. We can therefore even add color with a black and white texture. In our case color influence is not used so we can ignore this effect. However, although the default color is magenta we can alter this color using the color picker within the Influence tab.Stencil creates a mask, or stencil, to filter all following textures in the material.

However, Stencil will only work if RGB to Intensity is set, even if it's just a grayscale texture, such as cloud.

Creating an opalescent quartz material

Quartz is a crystal and as a result tends to spread any light falling on it, producing a kind of opalescence that almost makes the surface glow. We can add additional textures, to our previously created quartz material, to recreate this opalescence thus producing a third pebble material.

Getting ready

If you have created the previous recipe, reload the pebble-04.blend blendfile. You can also download a pre-created file from the Packt Publishing website.

How to do it

With the pebble-04.blend open reselect the pebble mesh object and move to the Texture panel. Rather than creating an entirely new material from scratch we will amend the quartz material created in the last recipe. However, you will see later that you will still have access to that other pebble material for use in any Blender project.

Select the second of the QuartzMusgrave textures and in the Influence tab, select Stencil.Select the next empty texture slot and choose New and name the texture Opalescence. Make it Type Clouds. Set Hard, Size0.03, Depth6.Under Influence select Color and set to 1.00, and select Emit and set to 1.00. Set the Blend type to Mix with the color selector set to R 1.000, G0.730, and B0.160.

Ensure that you save the blendfile, incrementing the filename to pebble-05.blend.

These three simple steps modify the material to produce quite a difference in the quartz simulation.

How it works

When we added the stencil setting to the QuartzMusgrave, we had two stencil textures, now limiting the effect of the last texture slot that we named Opalescence.

Stencil is one of the most underrated of the Blender material tools, providing a means of controlling where textures are applied to a surface. It will be used many times in the recipes of this book.

Note

There is one disadvantage to this method of stenciling one texture after another. Once a stencil has been set all following textures will be affected within the material. You cannot turn it off in later textures, so that it no longer has an effect. That means you will have to think carefully about where within a material you set any stencil. There are techniques using Node materials that can be applied to circumvent this problem.

The last texture in the quartz material we called is Opalescence and if you examine its Influence settings you will observe that not only Color has been set but also Emit.

Emit is an unusual setting in that it controls how the texture will cause the surface to self illuminate. That does not mean it behaves like a light. It will not illuminate anything else. It just partially makes the surface shadeless, varied by the texture that controls it.

Note

Blender 2.5 introduces a new texture influence called indirect lighting. It also employs the Emit influence. However, objects and textures can directly illuminate the surrounding scene. Although that type of physical simulation is beyond the scope of this book, it does provide increased methods of simulating illuminated surfaces.

Why use Emit here? Well, some materials are quite difficult to simulate because of the way light spreads through the surface. Quartz has a generally white but translucent surface that spreads through the material. This is often called Sub Surface Scattering. Blender has very good sub-surface scattering controls but these can be render-intensive to use for all materials. This Emit trick can be used with very little overhead on render time and therefore is worth using in our example. However, use it with caution if your object is meant to be seen in different light levels, especially an animated change in illumination, as the surface may give the impression of glowing under certain low light conditions.

Note

We will meet the Blender Sub Surface Scattering controls in later recipes.

Creating a mask to represent the quartz veins

The layered quartz is quite common in gray sandstone and can be found in many pebbles scattered across a beach. The layers of quartz were laid down over the millennia, sometimes in thick layers, and sometimes thin. Earthquake movement altered the angles of the rock layers as these quartz deposits were being laid. As a result the quartz layers are occasionally at varying angles to each other. The quartz layers also have flecks of broken rock, some containing iron or sulphur deposits, which give a slightly yellow color variation.

The quartz part of these pebbles is worn more because its density is lower than the gray sandstone in which it is encased. Because the pebble has been tossed and polished by the sea, the quartz veins run right through the pebble, sometimes at strange angles.

We have produced a gray sandstone, and quartz material in previous recipes. We can combine them then using a mask to represent the veins as might be seen in real pebbles of this type. So this recipe provides a way of producing a mask ready for combination in the final material of this section.

Getting ready

Reload the pebble-05.blend saved at the end of the last recipe. If you haven't completed that recipe you can download a pre-created one from the Packt Publishing website.

How to do it

As in previous recipes we will have to temporarily clear the material last created so we have a clean slate to create this new mask material. However, we also need to fix that last material, so that we don't lose it if we need to split this exercise into several days.

With the pebble object selected click the F button, next to the material name Quartz in the Material panel. Then click the X button to unlink datablock. As in previous recipes, we only want to temporarily unlink the material so that we can create a new one.In the Materials panel create a new material and name it QuartzMask.Set the Diffuse color to black RGB0.00, and under Shading set Shadeless.

You now have a purely black material, so let's add some purely white veins to complete the mask.

From the Texture properties panel create a new texture of TypeMarble, and name it QuartzThick.Under Marble, set Sharper and Tri, and Noise to Soft. Set Size to 0.91, Turbulence to 7.04, and Depth to 2.Under Colors/Adjust set Brightness to 0.556 and Contrast to 5.000.Under Mapping set SizeX to 1.30, Y to -0.77.Under Influence set Color to 1.00, and Blend to Screen. Change the color selector to R G B0.000, black.

If you perform a quick test render at this point you will see that thick veins have been produced. This will act as the start of our quartz veins to which we will add some thinner veins as seen in the reference photo.

Select the next free texture slot in the Textures properties panel and create a new Marble texture with the name Quartzthin1.In the Marble tab select Sharper and Tri, and under Noise select Soft. Set Size1.18, Turbulence2.53, and Depth6.Under the Colors tab set Adjust/Brightness1.711, and Contrast2.773.Under the Mapping tab, set SizeY-2.09 (X and Z remain the default 1.00).Under the Influence tab, set Color to 1.00 and Blend to Screen. Alter the color selector to R, G, B0.000, black.

You could once again test render after you have saved, but we shall move on to add a final thin vein on our mask material.

Select a free texture slot and create a new texture of type Marble and name it Quartzthin2.Under Marble tab select Sharper and Tri, and NoiseSoft. From the Basis menu select ImprovedPerlin. Set Size to 0.88, Turbulence to 1.93, and Depth to 4.Under the Colors tab set Adjust/ Brightness to 2.000 and Contrast to 5.00.Under the Mapping tab set SizeY to -1.48 and Z to 0.86.Finally, under the Influence tabset Diffuse/Color to 1.00, and Blend to Screen.

Save the blendfile, incrementing the file name to pebble-06.blend, and render the QuartzMask material.

This material is not designed to be used as a direct pebble-like texture. Its purpose is to act as a mask when we mix the other pebble type created in earlier recipes.

How it works

The third material created is a mask to use within a material node setup. The idea being that it will combine the two material types by the amount of black, controlling the gray surface material, or white, controlling the quartz material. Since this material has no surface features, other than color, it's a lot easier to create.

Under the Material panel the Shading/Shadeless