logo资料库

Real-Time-Shadows.pdf

第1页 / 共386页
第2页 / 共386页
第3页 / 共386页
第4页 / 共386页
第5页 / 共386页
第6页 / 共386页
第7页 / 共386页
第8页 / 共386页
资料共386页,剩余部分请下载后查看
b11030-1
Contents
Preface
b11030-2
1. Introduction
1.1 Definition
1.2 Importance of Shadows
1.3 Difficulty of Computing Shadows
1.4 Overview
1.5 General Information for the Reader
b11030-3
2. Basic Shadow Techniques
2.1 Projection Shadows
2.2 Shadow Mapping
2.3 Shadow Volumes
2.4 Stencil Shadow Volumes
2.5 Transparency
2.6 Summary
b11030-4
3. Shadow-Map Aliasing
3.1 Shadow Mapping as Signal Reconstruction
3.2 Initial Sampling Error—Undersampling
3.3 Resampling Error
b11030-5
4. Shadow-Map Sampling
4.1 Fitting
4.2 Warping
4.3 Global Partitioning
4.4 Adaptive Partitioning
4.5 View-Sample Mapping
4.6 Shadow-Map Reconstruction
4.7 Temporal Reprojection
4.8 Cookbook
b11030-6
5. Filtered Hard Shadows
5.1 Filters and Shadow Maps
5.2 Applications of Filtering
5.3 Precomputing Larger Filter Kernels
5.4 Summary
b11030-7
6. Image-Based Soft-Shadow Methods
6.1 Introduction
6.2 Basics
6.3 A Reference Solution
6.4 Augmenting Hard Shadows with Penumbrae
6.5 Blurring Hard-Shadow-Test Results
6.6 Filtering Planar Occluder Images
6.7 Reconstructing and Back-Projecting Occluders
6.8 Using Multiple Depth Maps
6.9 Summary
b11030-8
7. Geometry-Based Soft-Shadow Methods
7.1 Plausible Shadows by Generating Outer Penumbra
7.2 Inner and Outer Penumbra
7.3 Soft Shadow Volumes
7.4 View-Sample Mapping
7.5 Tradeoffs
7.6 Summary of Soft-Shadow Algorithms
b11030-9
8. Image-Based Transparency
8.1 Deep Shadow Maps
8.2 Approximating the Transmittance Function
8.3 Summary
b11030-10
9. Volumetric Shadows
9.1 Real-Time Single Scattering in Homogeneous Participating Media
9.2 Ray Marching a Shadow Map
9.3 Shadow-Volume–Based Approaches
9.4 Summary
b11030-11
10. Advanced Shadow Topics
10.1 Multicolored Light Sources
10.2 Multisample Antialiasing
10.3 Voxels and Shadows
10.4 Ray-Casting Shadows
10.5 Environmental Lighting
10.6 Precomputed Radiance Transfer
b11030-12
11. Conclusion
11.1 Hard Shadows
11.2 Filtered Hard Shadows
11.3 Soft Shadows
11.4 Advanced Methods
11.5 Welcome Tomorrow
b11030-13
A. Down the Graphics Pipeline
A.1 Rendering
A.2 Per-Fragment Processing—Culling and Blending
A.3 The Framebuffer
A.4 Geometry Representation
A.5 Hardware
b11030-14
B. Brief Guide to Graphics APIs
B.1 Transformation Matrices
B.2 State
B.3 Framebuffer and Render Targets
B.4 Texture Sampling
B.5 Shading Languages
b11030-15
C. A Word on Shading
C.1 Analytical Shading Models
C.2 Approximating Incoming Radiance
b11030-16
D. Fast GPU Filtering Techniques
D.1 Mipmap
D.2 N-Buffer and Multiscale Map
D.3 Summed-Area Table
D.4 Summary
b11030-17
E. More For Less: Deferred Shading and Upsampling
E.1 Deferred Shading
E.2 Upsampling
E.3 Summary
b11030-18
F. Symbols
b11030-19
Bibliography
b11030-20
Index
Real-Time Shadows
Real-Time Shadows Elmar Eisemann Michael Schwarz Ulf Assarsson Michael Wimmer
CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2012 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Printed in the United States of America on acid-free paper Version Date: 20110526 International Standard Book Number: 978-1-56881-438-4 (Hardback) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Library of Congress Cataloging‑in‑Publication Data Real-time shadows / Elmar Eisemann … [et al.]. p. cm. Includes bibliographical references and index. ISBN 978-1-56881-438-4 (alk. paper) 1. Computer animation. 2. Real-time rendering (Computer graphics) 3. Shades and shadows in art. 4. Digital video. I. Eisemann, Elmar. TR897.7.R396 2011 006.6’96--dc22 2011009331 Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com K13063_Discl.indd 1 5/26/11 8:16 AM
Dedicated to. . . . . . my family, including my uncle, who awakened my scientific curiosity. E.E. . . . Ewelina and all the rest of my whole big family. U.A. . . . Romana, Sarah, and Laurenz. M.W.
Contents Preface 1 Introduction 1.1 1.2 1.3 1.4 1.5 2.1 2.2 2.3 2.4 2.5 2.6 Denition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Importance of Shadows . . . . . . . . . . . . . . . . . . . . . . . Diculty of Computing Shadows . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General Information for the Reader . . . . . . . . . . . . . . . . 2 Basic Shadow Techniques Projection Shadows . . . . . . . . . . . . . . . . . . . . . . . . . Shadow Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . Shadow Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . Stencil Shadow Volumes . . . . . . . . . . . . . . . . . . . . . . Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Shadow-Map Aliasing 3.1 3.2 3.3 Shadow Mapping as Signal Reconstruction . . . . . . . . . . . Initial Sampling Error—Undersampling . . . . . . . . . . . . . Resampling Error . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Shadow-Map Sampling 4.1 Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Warping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Global Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 4.4 Adaptive Partitioning . . . . . . . . . . . . . . . . . . . . . . . . vii xi 1 3 12 15 19 20 21 22 31 44 48 72 73 75 75 81 87 89 89 93 110 123
viii Contents 4.5 4.6 4.7 4.8 View-Sample Mapping . . . . . . . . . . . . . . . . . . . . . . . Shadow-Map Reconstruction . . . . . . . . . . . . . . . . . . . Temporal Reprojection . . . . . . . . . . . . . . . . . . . . . . . Cookbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Filtered Hard Shadows 5.1 5.2 5.3 5.4 Filters and Shadow Maps . . . . . . . . . . . . . . . . . . . . . . Applications of Filtering . . . . . . . . . . . . . . . . . . . . . . Precomputing Larger Filter Kernels . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Image-Based Soft-Shadow Methods 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Reference Solution . . . . . . . . . . . . . . . . . . . . . . . . Augmenting Hard Shadows with Penumbrae . . . . . . . . . . Blurring Hard-Shadow-Test Results . . . . . . . . . . . . . . . . Filtering Planar Occluder Images . . . . . . . . . . . . . . . . . Reconstructing and Back-Projecting Occluders . . . . . . . . . Using Multiple Depth Maps . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Geometry-Based Soft-Shadow Methods 7.1 7.2 7.3 7.4 7.5 7.6 Plausible Shadows by Generating Outer Penumbra . . . . . . . Inner and Outer Penumbra . . . . . . . . . . . . . . . . . . . . . So Shadow Volumes . . . . . . . . . . . . . . . . . . . . . . . . View-Sample Mapping . . . . . . . . . . . . . . . . . . . . . . . Tradeos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of So-Shadow Algorithms . . . . . . . . . . . . . . 8 Image-Based Transparency 8.1 8.2 8.3 Deep Shadow Maps . . . . . . . . . . . . . . . . . . . . . . . . . Approximating the Transmittance Function . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Volumetric Shadows 9.1 9.2 9.3 9.4 Real-Time Single Scattering in Homogeneous Participating Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ray Marching a Shadow Map . . . . . . . . . . . . . . . . . . . Shadow-Volume–Based Approaches . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 134 136 137 139 140 144 147 160 161 161 166 172 174 178 187 191 204 206 209 209 215 217 225 234 236 239 240 243 258 259 259 261 265 268
Contents ix 10 Advanced Shadow Topics 10.1 Multicolored Light Sources . . . . . . . . . . . . . . . . . . . . . 10.2 Multisample Antialiasing . . . . . . . . . . . . . . . . . . . . . . 10.3 Voxels and Shadows . . . . . . . . . . . . . . . . . . . . . . . . . Ray-Casting Shadows . . . . . . . . . . . . . . . . . . . . . . . . 10.4 Environmental Lighting . . . . . . . . . . . . . . . . . . . . . . 10.5 10.6 Precomputed Radiance Transfer . . . . . . . . . . . . . . . . . . 11 Conclusion 11.1 Hard Shadows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 . . . . . . . . . . . . . . . . . . . . . . . Filtered Hard Shadows 11.3 So Shadows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Advanced Methods . . . . . . . . . . . . . . . . . . . . . . . . . 11.5 Welcome Tomorrow . . . . . . . . . . . . . . . . . . . . . . . . . A Down the Graphics Pipeline Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.1 A.2 Per-Fragment Processing—Culling and Blending . . . . . . . . A.3 e Framebuer . . . . . . . . . . . . . . . . . . . . . . . . . . . A.4 Geometry Representation . . . . . . . . . . . . . . . . . . . . . Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.5 B Brief Guide to Graphics APIs Transformation Matrices . . . . . . . . . . . . . . . . . . . . . . State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Framebuer and Render Targets . . . . . . . . . . . . . . . . . . Texture Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . Shading Languages . . . . . . . . . . . . . . . . . . . . . . . . . B.1 B.2 B.3 B.4 B.5 C.1 C.2 C A Word on Shading Analytical Shading Models . . . . . . . . . . . . . . . . . . . . . Approximating Incoming Radiance . . . . . . . . . . . . . . . . D Fast GPU Filtering Techniques D.1 Mipmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N-Buer and Multiscale Map . . . . . . . . . . . . . . . . . . . D.2 D.3 Summed-Area Table . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D.4 E More For Less: Deferred Shading and Upsampling E.1 E.2 E.3 Deferred Shading . . . . . . . . . . . . . . . . . . . . . . . . . . Upsampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 269 274 275 283 285 294 297 297 299 299 300 301 303 303 306 307 308 309 311 312 316 319 320 321 323 323 327 329 329 332 336 340 341 341 343 349
x F Symbols Bibliography Index Contents 351 353 377
分享到:
收藏