Shadow Algorithms Data Miner Shadow Algorithms Data Miner
Total Page:16
File Type:pdf, Size:1020Kb
Shadow Algorithms Data Miner Shadow Algorithms Data Miner Andrew Woo Pierre Poulin Cover image: “City View,” by Kumi Yamashita. Used by permission. 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: 20120123 International Standard Book Number: 978-1-4398-8023-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 valid- ity 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 uti- lized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopy- ing, 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 Woo, Andrew, 1965- Shadow algorithms data miner / Andrew Woo, Pierre Poulin. p. cm. “An A K Peters Book.” Summary: “Digital shadow generation continues to be an important aspect of visualization and visual effects in film, games, simulations, and scientific applications. This resource offers a thorough picture of the motivations, complexities, and categorized algorithms available to generate digital shadows. From general fundamentals to specific applications, it addresses “out of core” shadow algorithms and how to manage huge data sets from a shadow perspective. The book also examines the use of shadow algorithms in industrial applications, in terms of what algorithms are used and what software is applicable. “-- Provided by publisher. Includes bibliographical references and index. ISBN 978-1-4398-8023-4 (hardback) 1. Graph algorithms. 2. Data mining. 3. Computer graphics. I. Poulin, Pierre, 1964- II. Title. QA166.245.W66 2012 006.6’93--dc23 2011047828 Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com To Cynthia, Marcus, Eric, Alice, Carson, and Shirley —Andrew Woo ATh` er´ ese` et Robert —Pierre Poulin Contents 1 Preliminaries of Shadows 1 1.1 What’sCoveredinThisChapter.................... 1 1.2 BasicConcepts.............................. 1 1.2.1 WhyShadows.......................... 1 1.2.2 HardShadowsversusSoftShadows............. 4 1.2.3 ColoredShadows........................ 7 1.3 ShadowAlgorithms:BasicIdeasandProperties........... 8 1.3.1 PlanarReceiversofShadows................. 8 1.3.2 ShadowDepthMap...................... 9 1.3.3 ShadowVolumes........................ 12 1.3.4 RayTracing........................... 15 1.3.5 AreaSubdivisionandPreprocessing............. 16 1.4 Self-Shadowing............................. 18 1.4.1 Nˆ ⋅ Lˆ Check........................... 18 1.4.2 BumpMapping......................... 20 1.4.3 AdvancedReflectionModels................. 21 1.5 ConsiderationsforChoosinganAlgorithm............. 21 2HardShadows 25 2.1 What’sCoveredinThisChapter.................... 25 2.2 PlanarReceiversofShadows...................... 25 2.3 ShadowDepthMaps.......................... 27 2.3.1 DealingwithDifferentLightTypes............. 27 2.3.2 PerformanceConsiderations................. 28 2.3.3 QualityConsiderations.................... 33 2.3.4 AvoidingBadSelf-ShadowingProblems.......... 34 2.3.5 FilteringConsiderations.................... 38 2.3.6 CombiningSelf-ShadowingandFiltering.......... 39 2.3.7 FocusingtheResolution.................... 43 vii viii Contents 2.4 ShadowVolumes............................ 53 2.4.1 ShadowVolumesontheCPU................. 54 2.4.2 ShadowVolumesontheGPU................ 55 2.4.3 ReducingtheComplexity................... 59 2.4.4 ShadowVolumesIntegratingBSPTrees........... 62 2.5 RayTracing................................ 63 2.5.1 ShadowCullingAlgorithms.................. 64 2.5.2 CombiningRayPackingandModernArchitectures.... 66 2.5.3 DealingwithManyLights................... 67 2.5.4 AntialiasedShadows...................... 69 2.6 OtherHardShadowAlgorithms.................... 69 2.7 TrendsandAnalysis........................... 70 2.7.1 OfflineRenderingTrends................... 70 2.7.2 Real-TimeRenderingTrends................. 71 2.7.3 GeneralComments...................... 72 3 Supporting Shadows for Other Geometry Types 75 3.1 What’sCoveredinThisChapter.................... 75 3.2 Higher-OrderSurfaces......................... 76 3.2.1 NumericalIteration...................... 77 3.2.2 Polygonization......................... 78 3.2.3 ShadowVolumes........................ 79 3.2.4 TrendsandAnalysis...................... 79 3.3 Image-BasedRenderingforImpostors................ 80 3.3.1 Trees............................... 81 3.3.2 Crowds............................. 82 3.3.3 TrendsandAnalysis...................... 83 3.4 GeometryImages............................ 84 3.4.1 TrendsandAnalysis...................... 85 3.5 ParticleSystems............................. 85 3.6 PointClouds............................... 85 3.6.1 ShadowDepthMap...................... 87 3.6.2 RayTracing........................... 88 3.6.3 OtherMiscellaneousTechniques............... 88 3.6.4 TrendsandAnalysis...................... 89 3.7 Voxels................................... 89 3.7.1 Splatting............................. 91 3.7.2 Shear-Warp........................... 92 3.7.3 Slice-BasedHardwareTextures................ 93 3.7.4 RayTracing........................... 93 3.7.5 ShadowDepthMap...................... 95 3.7.6 TrendsandAnalysis...................... 96 Contents ix 3.8 Heightfields................................ 97 3.8.1 RayTracing........................... 98 3.8.2 HorizonMapping....................... 99 3.8.3 TrendsandAnalysis...................... 100 3.9 FinalWords............................... 100 4 Soft Shadows 101 4.1 What’sCoveredinThisChapter.................... 101 4.2 SoftShadowBasics........................... 102 4.2.1 ComputingtheSoftShadowIntegral............ 102 4.2.2 GenericAlgorithmicApproaches.............. 105 4.3 TheoreticalAspects........................... 107 4.3.1 DiscontinuityEvents...................... 108 4.4 PlanarReceiversofShadows...................... 111 4.4.1 SoftShadowTextures..................... 112 4.4.2 PlateauShadows........................ 112 4.4.3 ConvolutionTextures..................... 113 4.5 ShadowDepthMaps.......................... 114 4.5.1 Z-DifferencePenumbraApproximation........... 114 4.5.2 DepthValuesasMicropatches................ 116 4.5.3 SilhouetteDetection-BasedSolutions............ 119 4.5.4 Multipoint Source Shadow Depth Map Algorithms . 123 4.5.5 RenderingLargeScenes.................... 124 4.5.6 OtherShadowDepthMapVariations............ 126 4.6 ShadowVolumes............................ 127 4.6.1 MultipointShadowVolumes................. 127 4.6.2 ShadowVolumeBSP(SVBSP)................ 128 4.6.3 PenumbraWedges....................... 128 4.7 RayTracing................................ 130 4.7.1 DistributionRayTracing................... 131 4.7.2 StructuresforExactBack-Projection............ 133 4.7.3 Single-RayAnalyticSolution................. 136 4.7.4 RayTracingDepthImages.................. 137 4.8 OtherSoftShadowAlgorithms.................... 139 4.9 TrendsandAnalysis........................... 139 4.9.1 OfflineRenderingTrends................... 140 4.9.2 Real-TimeRenderingTrends................. 140 4.9.3 GeneralComments...................... 140 xContents 5 Other Treatments of Shadows 143 5.1 What’sCoveredinThisChapter.................... 143 5.2 BumpMapping............................. 144 5.2.1 AdvancedBumpMappingEffects.............. 146 5.2.2 TrendsandAnalysis...................... 147 5.3 AdvancedReflectionModels...................... 147 5.3.1 TrendsandAnalysis...................... 150 5.4 SemitransparentSurfaces........................ 151 5.4.1 RayTracing........................... 151 5.4.2 ShadowMaps.......................... 152 5.4.3 ShadowVolumes........................ 154 5.4.4 TrendsandAnalysis...................... 155 5.5 HighlyComplexThinMaterials.................... 155 5.5.1 TrendsandAnalysis...................... 157 5.6 AtmosphericShadows......................... 157 5.6.1 ShadowVolumes........................ 158 5.6.2 ShadowDepthMaps.....................