ebook img

Rendering with mental ray® PDF

503 Pages·2000·17.546 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Rendering with mental ray®

mental ray® Handbooks Edited by RolfHerken VoI. 1 Springer-Verlag Wien GmbH Th. Driemeyer Rendering with mental ray® Springer-V erlag Wien GmbH Thomas Driemeyer mental images Gesellschaft fi.ir Computerfilm und Maschinenintelligenz mbH & Co. KG FasanenstrafSe 81 D-I0623 Berlin Copyright © Springer-Verlag Wien 2000 Originally published by Springer-Verlag Wien New York in 2000 AU rights reserved. This document is protected under copyright law. The contents of this document may not be translated, copied or duplicated in any form, in whole or in part, without the express written permission of mental images Springer Fachmedien Wiesbaden GmbH. The information contained in this document is subiect to change without notice. mental images GmbH & Co. KG and its employees shaU not be responsible for incidental or consequential damages resulting from the use of this material or liable for technical or editorial omissions made herein. mental images®, mental ray®, mental matter™, mental ray Phenomenon™, mental ray Phenomena™, Phenomenon™, Phenomena™, Phenomenon Creator™, Phenomenon Editor™, Photon MapTM, mental ray Relay LibraryTM, and Relay LibraryTM are trademarks or, in some countries, registered trademarks of mental images Springer Fachmedien Wiesbaden GmbH. AU other product names mentioned in this document may be trademarks or registered trademarks of their respective companies and are hereby acknowledged. Printed on acid-free and chlorine-free bleached paper SPIN: 10747523 CIP data applied for With numerous (partly coloured) Figures ISSN 1438-9835 ISBN 978-3-211-83403-9 ISBN 978-3-7091-3697-3 (eBook) DOI 10.1007/978-3-7091-3697-3 Table of Contents v Table of Contents Series Editor's Foreword 1 Introduction 3 Organization of this Book ............................................................. 3 Typesetting Conventions .............................................................. 5 WWW Resources ..................................................................... 5 Acknowledgements ................................................................... 6 1 Overview 7 1.1 Photorealistic Rendering ......................................................... 7 1.2 Scenes and Animations ........................................................... 7 1.2.1 Geometric Objects .......................................................... 8 1.2.2 Materials .................................................................. 10 1.2.3 Light Sources .............................................................. 11 1.2.4 Cameras................................................................... 11 1.3 Shaders ......................................................................... 12 1.4 Phenomena ..................................................................... 14 1.5 Scanline Rendering and Ray Tracing ............................................. 14 1.5.1 Transparency, Refractions, and Reflections .................................. 15 1.5.2 Shadows ................................................................... 17 1.5.3 Motion Blur ............................................................... 17 1.5.4 Lenses .......................... ~ .......................................... 18 1.6 Caustics, Global Illumination, and Photon Maps ................................. 18 1.7 Participating Media ............................................................. 19 1.8 Parallelism ...................................................................... 19 1.9 Stages of Image Generation ...................................................... 20 1.10 mental ray Configurations ..................................................... 21 1.11 mental ray Versions ............................................................ 22 2 Scene Construction 25 2.1 A Simple Scene ................................................................. 26 2.2 Anatomy of a Scene ............................................................. 29 3 Cameras 33 3.1 Pinhole Cameras ................................................................ 33 3.2 Image Resolution ............................................................... 33 3.3 Aspect Ratio .................................................................... 34 3.4 Keystone Distortion ............................................................ 35 vi Table of Contents 3.5 Rendering Subwindows ......................................................... 35 3.6 Orthographic Camera ........................................................... 36 3.7 Clipping Planes ':- ............................................................... 37 3.8 Lenses: Depth of Field .......................................................... 38 3.9 Full Camera Example ........................................................... 40 4 Surface Shading 43 4.1 Color and Illumination .......................................................... 46 4.2 Texture Mapping ................................................................ 51 4.2.1 Texture Projections ........................................................ 52 4.2.1.1 Simple XY Projection ................................................. 53 4.2.1.2 Repeated XY Projection ............................................... 55 4.2.1.3 Other Projections ..................................................... 56 4.2.1.4 Texture Vectors ....................................................... 57 4.2.1.5 Texture Generation from Coordinate Spaces ........................... 62 4.2.2 Local Textures: Avoiding Network Transfers ................................ 63 4.2.3 Memory Mapped Textures: Reducing Memory Usage ....................... 64 4.2.4 Aliasing in Unfiltered Textures ............................................. 66 4.2.5 Simple Filtered Textures: Reducing Texture Aliasing ......................... 69 4.2.6 Elliptic Filtered Textures: Even Better Texture Anti-Aliasing .................. 71 4.2.7 Summary: Selecting Optimal Texturing Methods ............................ 73 4.2.8 3D Textures ............................................................... 74 4.3 Transparency Mapping .......................................................... 77 4.4 Bump Mapping ................................................................. 79 4.5 Displacement Mapping .......................................................... 83 4.5.1 Displacement Approximation " ............................................. 86 4.6 Anisotropic Shading ............................................................ 95 4.7 Environment Mapping .......................................................... 99 4.8 Reflection ..................................................................... 102 4.9 Transparency and Refraction ................................................... 107 4.10 Glossy Reflection ............................................................. 110 4.11 Glossy Transmission (Translucency) ........................................... 112 4.12 Summary of Illumination Models .............................................. 114 5 Light and Shadow 117 5.1 Point, Spot, and Infinite Lights ................................................. 119 5.2 Raytraced Shadows ................................... : ........................ 122 5.2.1 Transparent Shadows with Shadow Shaders ................................ 124 5.2.2 Soft Shadows with Area Light Sources ..................................... 125 5.2.3 Shadow Modes: Regular, Sorted, Segmented ............................... 129 Table of Contents vii 5.3 Fast Shadows with Shadow Maps ............................................... 131 5.4 Internals: How Shadows are Computed :,::. ...................................... 136 5.4.1 Raytraced Shadows ....................................................... 136 5.4.2 Shadow Map Shadows .................................................... 138 5.5 Shadow Summary and Performance 139 6 Volume Rendering 143 6.1 Global Volumes: Atmospheres and Fog ......................................... 144 6.2 Local Volumes: Fur, Fire, Smoke ............................................... 145 6.3 Ray Marching ................................................................. 149 7 Caustics and Globallliumination 155 7.1 Local Illumination vs. Caustics vs. Global Illumination .......................... 156 7.2 Diffuse, Glossy, and Specular Reflection and Transmission ....................... 157 7.3 Classiflcation of Light Paths .................................................... 160 7.4 Caustic and Global Illumination Lights ......................................... 163 7.5 Caustics ....................................................................... 165 7.6 GlobaIIllumination ............................................................ 173 7.6.1 Diffuse Global Illumination (Radiosity) .................................... 173 7.6.2 Glossy Global Illumination ............................................... 176 7.6.3 General Global Illumination .............................................. 178 7.6.4 Final Gathering ........................................................... 181 7.7 Participating Media ............................................................ 184 7.7.1 Volume Caustics .......................................................... 185 7.7.2 Multiple Volume Scattering: Global Illumination in Volumes ............... 190 7.7.3 Global Illumination in Volumes and Surfaces ............................... 193 7.8 Frequently Asked Questions ................................................... 196 7.9 Summary ...................................................................... 199 7.10 Performance .................................................................. 202 8 Motion Blur 205 8.1 Motion Transformations ....................................................... 206 8.2 Motion Vectors ................................................................ 208 8.3 Summary and Performance ..................................................... 210 9 Contours 213 9.1 Outline Contours .............................................................. 214 9.2 PostScript Contours ........................................................... 217 9.3 Edge Contours ................................................................ 218 9.4 Contours on Reflections and Refractions ....................................... 218 9.5 Contours at Color Contrasts ................................................... 219 viii Table of Contents 9.6 Variable-Width Contours ...................................................... 221 9.7 Glowing Contours ............................................................. 222 9.8 Performance ................................................................... 222 10 Shaders and Phenomena 223 10.1 Declarations ................................ '" ........................ " ..... 224 10.2 Definitions ................................................................... 227 10.3 Shader Lists .................................................................. 229 10.4 Shader Graphs ........................................... '" .................. 230 10.5 Phenomena ................................................................... 233 10.5.1 Phenomenon Interface Assignments ...................................... 235 10.5.2 Shader and Phenomenon Options ........................................ 236 10.5.3 Phenomenon Roots ...................................................... 238 10.6 User Data Blocks ............................................................. 240 10.7 Summary and Performance .................................................... 241 11 Postprocessing and Image Output 243 11.1 Image Types .................................................................. 244 11.2 Frame Buffers ................................................................ 246 11.3 Image Formats ............................................................... 247 12 Geometric Objects ** 253 12.1 Vectors and Vertices .......................................................... 256 12.2 Polygonal Geometry .......................................................... 260 12.3 Free-Form Surface Geometry ................................................. 262 12.3.1 Bases .................................................................... 263 12.3.1.1 Bezier .................................. '" ......................... 264 12.3.1.2 B-Spline ............................................................ 264 12.3.1.3 Cardinal ............................................................ 267 12.3.1.4 Basis Matrix ........................................................ 267 12.3.1.5 Taylor .............................................................. 269 12.3.2 Surfaces ................................................................. 269 12.3.3 Rational Surfaces and NURBS ........................................... 273 12.3.4 Trimming and Holes ..................................................... 275 12.3.5 Special Points and Curves ................................................ 279 12.3.6 Texture Surfaces ......................................................... 281 12.3.7 Surface Derivatives ...................................................... 283 12.3.8 Approximations ......................................................... 284 12.3.9 Triangle Count and Performance ......................................... 292 12.3.10 Connections ........................................................... 294 12.3.11 Adjacency Detection and Edge Merging ................................. 294 Table of Contents ix 12.4 Procedural Geometry ......................................................... 295 13 Instancing and Grouping 299 13.1 Instances ..................................................................... 299 13.2 Instance Groups .............................................................. 301 13.3 Multiple Instancing ........................................................... 301 13.4 Coordinate Spaces ............................................................ 304 14 Inheritance 307 14.1 MateriaIInheritance .......................................................... 307 14.2 Tagged Material Inheritance ................................................... 312 14.3 Parameter Inheritance ......................................................... 315 14.4 Object Flag Inheritance ....................................................... 317 15 Incremental Changes and Animations 321 16 Using and Creating Shader Libraries ** 327 17 Parallelism 333 17.1 Thread Parallelism ............................................................ 333 17.2 Network Parallelism .......................................................... 334 17.3 Parallelism Efficiency ......................................................... 335 17.4 Balancing Network Rendering ................................................ 337 17.5 Rendering Animations ........................................................ 338 17.6 Filename Rewriting ........................................................... 339 18 The Options Block 345 18.1 Feature Flags ................................................................. 345 18.2 Rendering Quality and Performance ........................................... 347 18.3 Shadows ..................................................................... 349 18.4 Ray Tracing Control .......................................................... 350 18.5 Global Illumination and Caustics .............................................. 352 18.6 Scene Modeling ............................................................... 353 18.7 Diagnostic Modes ............................................................ 355 19 Quality and Performance Tuning 357 19.1 Reading the Message Log 'r .................................................... 357 19.2 Image Sampling Quality ...................................................... 360 19.3 Ray Tracing vs. Scanline Rendering 'r .......................•.................. 364 19.4 OpenGL Hardware Acceleration 'r .............•.............................. 366 19.5 Tuning BSP Ray Tracing Parameters 'r ......•......•.......................•... 367 19.6 Optimizing Memory Usage 'r ................................................. 369 x Table of Contents 19.7 Address Space Limitations ':. .................................................. 374 19.8 Summary: Quality and Performance Checklist ................................. 375 19.8.1 Sampling ................................................................ 375 19.8.2 Texture Mapping ........................................................ 375 19.8.3 Light and Shadow ....................................................... 376 19.8,4 Caustics and Global Illumination ......................................... 376 19.8.5 Geometry Modeling ..................................................... 377 19.8.6 Shaders and Phenomena .................................................. 377 19.8.7 Networking and Multithreading .......................................... 377 20 Troubleshooting * 379 20.1 Sampling ..................................................................... 379 20.2 Shading...................................................................... 380 20.3 Caustics and Global Illumination .............................................. 380 20,4 Geometry .................................................................... 381 20.5 System ....................................................................... 382 Color Plates 385 A Command Line Options 403 A.1 mental ray .................................................................... 403 A.2 Inventor mental ray ........................................................... 413 A.3 Environment Variables ':. ...................................................... 414 A,4 Image Display: imLdisp ....................................................... 415 A.5 Image Copy: imLcopy ........................................................ 417 A.6 Image Information: imLinfo ................................................... 418 A.7 Image Comparison: imLdiff ................................................... 418 A.8 Create Shader Skeletons: mkmishader ':.,:. ....................................... 419 A.9 Convert Scenes to C: mitoapi ':"f ............................................... 420 B The 5phere and Utah Teapot Models 421 B.1 NURBS Sphere ............................................................... 421 B.2 Utah Teapot ................................................................... 423 C Base 5haders * 429 C.1 Overview ..................................................................... 429 C.2 Texture Space Mapping ........................................................ 431 C.3 Environments ................................................................. 436 C,4 Textures ...................................................................... 438 C.5 Sample Compositing .......................................................... 442 C.6 Illumination.................................................................. 446

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.