Physically Based Rendering
From Theory to Implementation
Second Edition
Matt Pharr
Intel
Greg Humphreys
NVIDIA
Morgan Kaufmann
Endorsement
Physically Based Rendering is a terrific book. It covers all the marvelous math, fascinating physics, practical software engineering, and clever tricks that are necessary to write a state-of-the-art photorealistic renderer. All of these topics are dealt with in a clear and pedagogical manner without omitting the all-important practical details.
pbrt is not just a toy implementation of a ray tracer, but a general and robust full-scale global illumination renderer. It contains many important optimizations to reduce execution time and memory consumption for complex scenes. Furthermore, pbrt is easy to extend to experiment with other rendering algorithm variations.
This book is not only a textbook for students, but also a useful reference book for practitioners in the field. The second edition has been extended with sections on Metropolis light transport, subsurface scattering, precomputed light transport, and more.
Per Christensen
Senior Software Developer, RenderMan Products, Pixar Animation Studios
Looking for a job in research or high end rendering? Get your kick-start education and start your own project with this book that comes along with both theory and real examples, meaning real code.
With their second edition, Matt Pharr and Greg Humphreys provide easy access to even the most advanced rendering techniques like Metropolis light transport and quasi-Monte Carlo methods. In addition the framework lets you skip the bootstrap pain of getting data into and out of your renderer.
The holistic approach of literate programming results in a clear logic of an easy-to-read text. If you are serious about graphics, there is no way around this unique and extremely valuable book that is closest to the state of the art.
Alexander Keller
Chief Scientist, Mental Images
Copyright
Acquiring Editor: Todd Green
Development Editor: Heather Scherer
Project Manager: Paul Gottehrer
Designer: Joanne Blank
Compositor: Paul C. Anagnostopoulos, Windfall Software
Morgan Kaufmann is an imprint of Elsevier
30 Corporate Drive, Suite 400, Burlington, MA 01803, USA
2010 Elsevier, Inc. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher. Details on how to seek permission, further information about the Publishers permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www.elsevier.com/permissions.
This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein).
Notices
Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods, professional practices, or medical treatment may become necessary.
Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information, methods, compounds, or experiments described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility.
To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in the material herein.
Library of Congress Cataloging-in-Publication Data
Application submitted
British Library Cataloguing-in-Publication Data
A catalogue record for this book is available from the British Library.
ISBN: 978-0-12-375079-2
Printed in China
10 11 12 13 14 10 9 8 7 6 5 4 3 2 1
For information on all MK publications visit our website at www.mkp.com
Dedication
To Deirdre, who even let me bring the manuscript on our honeymoon.
M. P.
To Isabel and Leila, the two most extraordinary people Ive ever met. May your pixels never be little squares.
G. H.
ABOUT THE AUTHORS
Matt Pharr is a Principal Engineer at Intel, working as the lead architect in the Advanced Rendering Technology group. He previously co-founded Neoptica, which worked on programming models for graphics on heterogeneous CPU+GPU systems; Neoptica was acquired by Intel. Before Neoptica, Matt was in the Software Architecture group at NVIDIA, co-founded Exluna, and worked in Pixars Rendering R&D group. He received his Ph.D. from the Stanford Graphics Lab, working under the supervision of Pat Hanrahan. He was also the editor of GPU Gems 2.
Greg Humphreys is a member of the OptiX raytracing team at NVIDIA. Previously, he was a professor of Computer Science at the University of Virginia, where he conducted research in both high performance and physically based computer graphics, as well as computer architecture and visualization. Greg has a B.S.E. degree from Princeton, and a Ph.D. in Computer Science from Stanford under the supervision of Pat Hanrahan. When hes not tracing rays, Greg enjoys tournament bridge, knitting, and riding his motorcycle.
Preface
[Just as] other information should be available to those who want to learn and understand, program source code is the only means for programmers to learn the art from their predecessors. It would be unthinkable for playwrights not to allow other playwrights to read their plays [or to allow them] at theater performances where they would be barred even from taking notes. Likewise, any good author is well read, as every child who learns to write will read hundreds of times more than it writes. Programmers, however, are expected to invent the alphabet and learn to write long novels all on their own. Programming cannot grow and learn unless the next generation of programmers has access to the knowledge and information gathered by other programmers before them. Erik Naggum
Rendering is a fundamental component of computer graphics. At the highest level of abstraction, rendering is the process of converting a description of a three-dimensional scene into an image. Algorithms for animation, geometric modeling, texturing, and other areas of computer graphics all must pass their results through some sort of rendering process so that they can be made visible in an image. Rendering has become ubiquitous; from movies to games and beyond, it has opened new frontiers for creative expression, entertainment, and visualization.
In the early years of the field, research in rendering focused on solving fundamental problems such as determining which objects are visible from a given viewpoint. As effective solutions to these problems have been found and as richer and more realistic scene descriptions have become available thanks to continued progress in other areas of graphics, modern rendering has grown to include ideas from a broad range of disciplines, including physics and astrophysics, astronomy, biology, psychology and the study of perception, and pure and applied mathematics. The interdisciplinary nature of rendering is one of the reasons that it is such a fascinating area of study.
Next page