3Delight 11.0 User's Manual
Total Page:16
File Type:pdf, Size:1020Kb
3Delight 11.0 User’s Manual A fast, high quality, RenderMan-compliant renderer Copyright c 2000-2013 The 3Delight Team. i Short Contents .................................................................. 1 1 Welcome to 3Delight! ......................................... 2 2 Installation................................................... 4 3 Using 3Delight ............................................... 7 4 Integration with Third Party Software ....................... 27 5 3Delight and RenderMan .................................... 28 6 The Shading Language ...................................... 65 7 Rendering Guidelines....................................... 126 8 Display Drivers ............................................ 174 9 Error Messages............................................. 183 10 Developer’s Corner ......................................... 200 11 Acknowledgements ......................................... 258 12 Copyrights and Trademarks ................................ 259 Concept Index .................................................. 263 Function Index ................................................. 270 List of Figures .................................................. 273 ii Table of Contents .................................................................. 1 1 Welcome to 3Delight! ...................................... 2 1.1 What Is In This Manual ?............................................. 2 1.2 Features .............................................................. 2 2 Installation ................................................. 4 2.1 MacOS X ............................................................. 4 2.2 Linux ................................................................. 4 2.3 Windows ............................................................. 5 2.4 Environment Variables ................................................ 5 3 Using 3Delight ............................................. 7 3.1 Using the RIB Renderer - renderdl ................................... 7 3.2 Using the Shader Compiler - shaderdl ............................... 11 3.3 Using the Texture Optimizer - tdlmake .............................. 14 3.4 Using dsm2tif to Visualize DSMs .................................... 20 3.5 Using hdri2tif on High Dynamic Range Images ..................... 21 3.6 Using shaderinfo to Interrogate Shaders ............................ 22 3.7 Using ribshrink .................................................... 23 3.8 Using ribdepends ................................................... 23 3.9 Using ptc2brick .................................................... 25 3.10 Using ptcview...................................................... 25 3.11 Using ptcmerge .................................................... 26 4 Integration with Third Party Software.................. 27 4.1 Autodesk’s Maya .................................................... 27 4.2 Softimage’s XSI ..................................................... 27 4.3 Side Effects Software’s Houdini ...................................... 27 5 3Delight and RenderMan ................................ 28 5.1 Options.............................................................. 28 5.1.1 Image and Camera Options ..................................... 28 5.1.2 Implementation Specific Options ................................ 35 Rendering Options ................................................. 35 Quality vs. Performance Options ................................... 38 Search Paths Options .............................................. 40 Statistics Options .................................................. 41 Messages Options .................................................. 42 Network Cache Options ............................................ 42 User Options ....................................................... 43 RIB Output Options ............................................... 43 Other Options ..................................................... 43 5.2 Attributes ........................................................... 46 5.2.1 Primitives Identification ........................................ 46 iii 5.2.2 Primitives Visibility and Ray Tracing ........................... 47 5.2.3 Global Illumination Attributes .................................. 49 5.2.4 Subsurface Light Transport ..................................... 50 5.2.5 Displacement ................................................... 51 5.2.6 User Attributes ................................................. 53 5.2.7 Other Attributes................................................ 54 5.3 Geometric Primitives ................................................ 57 5.3.1 Subdivision Surfaces ............................................ 57 5.3.2 Parametric Patches ............................................. 58 5.3.3 Curves ......................................................... 58 5.3.4 Polygons ....................................................... 58 5.3.5 Points .......................................................... 58 5.3.6 Implicit Surfaces (Blobbies) ..................................... 59 5.3.7 Quadrics ....................................................... 60 5.3.8 Procedural Primitives........................................... 60 5.3.9 Object Instances................................................ 61 5.3.10 Constructive Solid Geometry .................................. 61 5.4 External Resources .................................................. 61 5.4.1 Texture Maps .................................................. 61 5.4.2 Archives ........................................................ 62 5.4.2.1 RiArchiveRecord .......................................... 62 5.4.2.2 Inline Archives ............................................ 62 5.5 Configuration filerendermn.ini ( ) ................................... 62 6 The Shading Language ................................... 65 6.1 Syntax .............................................................. 65 6.1.1 General Shader Structure ....................................... 65 6.1.1.1 Traditional Structure ...................................... 65 6.1.1.2 Shader Objects ............................................ 65 6.1.2 Variable Types ................................................. 67 6.1.2.1 Scalars .................................................... 67 6.1.2.2 Colors ..................................................... 68 6.1.2.3 Points, Vectors and Normals ............................... 68 6.1.2.4 Matrices................................................... 70 6.1.2.5 Strings .................................................... 71 6.1.2.6 Co-Shaders ................................................ 71 6.1.2.7 The Void Type ............................................ 71 6.1.3 Structures ...................................................... 72 6.1.3.1 Definition ................................................. 72 6.1.3.2 Declaration and Member Selection ......................... 72 6.1.3.3 Structures as Function Parameters ......................... 72 6.1.3.4 Limitations ................................................ 72 6.1.4 Arrays.......................................................... 73 6.1.4.1 Static Arrays .............................................. 73 6.1.4.2 Resizable Arrays........................................... 73 6.1.5 Variable Classes ................................................ 74 6.1.5.1 Uniform Variables ......................................... 74 6.1.5.2 Varying Variables.......................................... 74 6.1.5.3 Constant Variables ........................................ 75 6.1.5.4 Default Class Behaviour ................................... 75 6.1.6 Parameter Lists................................................. 75 6.1.6.1 Shader and Shader Class Parameters....................... 75 6.1.6.2 Function Parameters....................................... 75 iv 6.1.7 Constructs...................................................... 76 6.1.7.1 Conditional Execution ..................................... 76 6.1.7.2 Classical Looping Constructs .............................. 76 6.1.7.3 Special Looping Constructs ................................ 77 6.1.7.4 Functions.................................................. 85 6.1.7.5 Methods................................................... 87 6.2 Predefined Shader Variables.......................................... 87 6.2.1 Predefined Surface Shader Variables............................. 88 6.2.2 Predefined Light Shader Variables............................... 89 6.2.3 Predefined Volume Shader Variables ............................ 90 6.2.4 Predefined Displacement Shader Variables....................... 91 6.2.5 Predefined Imager Shader Variables ............................. 91 6.3 Predefined Shader Parameters........................................ 92 6.4 Standard Functions .................................................. 92 6.4.1 Mathematics ................................................... 92 6.4.2 Noise and Random ............................................. 94 6.4.3 Geometry, Matrices and Colors ................................. 95 6.4.4 Lighting ........................................................ 97 6.4.5 Ray Tracing .................................................... 98 6.4.5.1 Common Parameters ...................................... 98 6.4.5.2 The trace Shadeop......................................... 99 6.4.5.3 Other Ray Tracing Shadeops ............................. 103 6.4.6 Texture Mapping .............................................