Preface

Blender is no doubt the most powerful, and versatile, open source 3D package available. Its power comes close to, or even surpasses, many professional packages. Blender's built-in Python interpreter plays an important role in tapping this power and allows artists to extend the functionality even further. Yet, mastering a scripting language and getting familiar with the many possibilities that Blender offers through its Python API can be a daunting venture.

This book will show how to get the most out of Blender by showing practical solutions to many realistic problems. Each example is a complete working script, which is explained step-by-step in a very detailed manner.

What this book covers

Chapter 1, Extending Blender with Python, gives you an overview of what can and cannot be accomplished with Python in Blender. It teaches you how to install a full Python distribution and how to use the built-in editor. You also learn how to write and run a simple Python script and how to integrate it in Blender's menu system.

Chapter 2, Creating and Editing Objects, introduces objects and meshes and you will see how to manipulate them programmatically. Specifically, you learn how to create configurable mesh objects, design a graphical user interface, and how to make your script store user choices for later reuse. You also learn how to select vertices and faces in a mesh, parent an object to another, and how to create groups. Finally, this chapter shows how to run Blender from the command line, render in the background, and how to process command-line parameters.

Chapter 3, Vertex Groups and Materials, tells you about the many uses of vertex groups and how versatile they can be. You get to know how to define vertex groups and how to assign vertices to a vertex group. You will also learn how you can use those vertex groups for modifiers and armatures. You also look into the application of different materials to different faces and how to assign vertex colors to vertices.

Chapter 4, Pydrivers and Constraints, shows how you can associate built-in constraints with Blender objects and how to define complex relationships between animated properties by using the so-called pydrivers. You also define new complex constraints that may be used just like the built-in constraints. Specifically, you see how to drive one IPO from another by a Python expression, how to work around some limitations inherent in pydrivers, and how to restrict the motion of objects and bones by adding constraints. This chapter teaches you how to write a constraint in Python that will snap an object to the closest vertex on another object.

Chapter 5, Acting on Frame Changes, focuses on writing scripts that may be used to act on certain events. You can learn what script links and space handlers are and how they can be used to perform activities on each frame change in an animation. You also see how to associate additional information with an object, how to use script links to make an object appear or disappear by changing its layout or changing its transparency, and how to implement a scheme to associate a different mesh with an object on each frame. Finally, you can look into ways to augment the functionality of the 3D view.

Chapter 6, Shape Keys, IPOs, and Poses, discovers that there is more to IPOs that can prove useful in animated scenes. Although IPOs were introduced inChapter 4, here you learn how to define IPOs on all kinds of objects, associate shape keys with a mesh, and how to define IPOs for those shape keys. You also look into posing armatures and combining poses into actions.

Chapter 7, Creating Custom Shaders and Textures with Pynodes, introduces Pynodes and you get to know how they enable you to define completely new textures and materials. You learn how to write Pynodes that create simple color patterns, Pynodes that produce patterns with normals, and you also learn how to animate Pynodes. This chapter also explains about Pynodes that produce height and slope-dependent materials and even create shaders that react to the angle of incident light.

Chapter 8, Rendering and Image Manipulation, turns to the rendering process as a whole. You can automate this rendering process, combine the resulting images in various ways, and even turn Blender into a specialized web server. Specifically, you learn how to automate the rendering process, create multiple views for product presentations, and create billboards from complex objects. You get to know about ways to enhance Blender with some external libraries to manipulate images, including render results.

Chapter 9, Expanding your Toolset, is less about rendering and more about making life easier for the day-to-day use of Blender by extending its functionality. In this chapter, you learn how to list and archive assets such as image maps, publish a rendered image automatically with FTP, extend the functionality of the built-in editor with regular expression searches, speed up computations by using Psyco—a just-in-time compiler, and add version control to your scripts with Subversion.

Appendix A, Links and Resources, gives you a list of most resources used in this book along with some generally useful information.

Appendix B, Common Pitfalls, highlights some of the common questions that pop up more often than others as do some mistakes.

Appendix C, Future Developments, is the final appendix that tries to show what the future holds in store and how this may affect you as both Blender and Python are constantly developed further.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.28.108