Implementing a Render Plugin for 3Ds Max Using the Autodesk Rapidrt Path Tracer Master of Science Thesis in the Interaction Design and Technologies Programme
Total Page:16
File Type:pdf, Size:1020Kb
Implementing a render plugin for 3ds Max using the Autodesk RapidRT path tracer Master of Science Thesis in the Interaction Design and Technologies Programme ERIK GUNNARSSON MAGNUS OLAUSSON Chalmers University of Technology University of Gothenburg Department of Computer Science and Engineering Göteborg, Sweden, June 2012 The Author grants to Chalmers University of Technology and University of Gothenburg the non-exclusive right to publish the Work electronically and in a non-commercial pur- pose make it accessible on the Internet. The Author warrants that he/she is the author to the Work, and warrants that the Work does not contain text, pictures or other material that violates copyright law. The Author shall, when transferring the rights of the Work to a third party (for example a publisher or a company), acknowledge the third party about this agreement. If the Author has signed a copyright agreement with a third party regarding the Work, the Author war- rants hereby that he/she has obtained any necessary permission from this third party to let Chalmers University of Technology and University of Gothenburg store the Work elec- tronically and make it accessible on the Internet. Implementing a render plugin for 3ds Max using the Autodesk RapidRT path tracer ERIK. GUNNARSSON, MAGNUS. OLAUSSON, © ERIK. GUNNARSSON, June 2012. © MAGNUS. OLAUSSON, June 2012. Examiner: ULF. ASSARSSON Chalmers University of Technology University of Gothenburg Department of Computer Science and Engineering SE-412 96 Göteborg Sweden Telephone + 46 (0)31-772 1000 Cover: The four default viewports of 3ds Max 2012 showing a scene of the Stanford dragon in a Cornell box. Top left viewport shows the camera view in wireframe shading mode. Top right shows the camera view in realistic shading mode. Lower left shows the scene setup from a perspective view. Lower right shows a camera view in ActiveShade (see Section 2.3.2) mode running RapidRT. Department of Computer Science and Engineering Göteborg, Sweden June 2012 Abstract The aim of this thesis was to research the feasibility of implementing a render plugin for Autodesk 3ds Max 2012 using the ray tracer RapidRT, also developed by Autodesk. The focus was primarily on investigating RapidRT’s capabilities as a render plugin, how to translate a 3D scene from 3ds Max to RapidRT, and also the visual quality of the rendered images. Two versions of the plugin were made using different versions of RapidRT. The resulting plugins, although not complete in functionali- ty, shows that using RapidRT as a render plugin in 3ds Max is feasible. The results show that the plugins can be used to render images with vis- ual quality on par with integrated renderers, and that they can translate 3D scenes from 3ds Max to RapidRT and produce images close in ap- pearance to those produced by these renderers. Sammanfattning Syftet med denna rapport var att undersöka huruvida en implementering av en renderingsinsticksmodul – som använder sig utav RapidRT, en av Autodesk utvecklad ray tracer – till Autodesk 3ds Max lämpligen kunde genomföras. Fokus var först och främst på att undersöka 3D- scenöversättningen från 3ds Max till RapidRT, hur det senares funktio- nalitet presenteras i 3ds Max och den visuella kvaliteten på de renderade bilderna. Två versioner av insticksmodulen utvecklades som använder sig av olika versioner av RapidRT. Om än ej kompletta i funktionalitet så visar insticksmodulerna att RapidRT som insticksmodul till 3ds Max är ett genomförbart projekt. Resultatet visar att insticksmodulerna kan användas till att rendera bilder med visuell kvalitet på nivå med integre- rade renderare och att de kan översätta scener från 3ds Max så att rende- rade bilder är utseendemässigt lika i jämförelse med dessa renderare. Acknowledgements This master’s thesis project was done at the Autodesk Gothenburg of- fice, and we, the authors, would like to thank everyone at the office for making us feel welcome. We would like to thank Christoffer Baar for giving us this opportunity, as well as Magnus Pettersson for helping making it happen to begin with. Thanks also go to Peter Rundberg, Per Svensson and Henrik Edström for their encouragement and help during the project. In particular, thanks goes to our supervisor, Oliver Abert, who gave us feedback and good counsel during the project, as well as for this thesis. Thanks to our examiner at Chalmers, Ulf Assarsson, for feedback on this thesis, and lastly we would like to thank our opponents Johan Elvek and Rickard von Haugwitz for the feedback, and a special thanks to Rickard for additional help with editing of the thesis. Table of Contents 1. Introduction .......................................................................................... 1 1.1 Purpose ........................................................................................... 1 1.2 Problem Definition ......................................................................... 2 1.3 Scope .............................................................................................. 2 1.4 Method ........................................................................................... 3 1.4.1 Use Cases ................................................................................ 3 1.4.2 Programming Language and Framework ................................ 3 2. Background and Previous Work .......................................................... 4 2.1 3D Rendering ................................................................................. 4 2.1.1 The Rendering Equation ......................................................... 4 2.1.2 BRDF ...................................................................................... 5 2.1.3 Rasterization ............................................................................ 5 2.1.4 Ray tracing .............................................................................. 5 2.2 RapidRT ......................................................................................... 8 2.2.1 Shaders .................................................................................... 8 2.2.2 Geometry ................................................................................. 9 2.2.3 Interactivity ........................................................................... 10 2.3 3ds Max ........................................................................................ 10 2.3.1 SDK ....................................................................................... 10 2.3.2 Interactive renderer ............................................................... 14 2.3.3 Interface................................................................................. 14 2.3.4 Renderers............................................................................... 15 3. Analysis .............................................................................................. 16 3.1 Plugin Overview .......................................................................... 16 3.2 Translating from 3ds Max to RapidRT ........................................ 17 3.2.1 Cameras ................................................................................. 17 3.2.2 Lights .................................................................................... 17 3.2.3 Materials ................................................................................ 19 3.2.4 Maps ...................................................................................... 24 3.2.5 Geometry Conversion ........................................................... 24 3.3 Interactive Rendering ................................................................... 29 3.4 Rendering time ............................................................................. 30 3.5 Usability ....................................................................................... 31 3.5.1 User Interface ........................................................................ 31 3.5.2 Interactive Rendering ............................................................ 33 4. Results ................................................................................................ 34 4.1 Scene translation .......................................................................... 35 4.1.1 Geometry, Lights and Camera .............................................. 35 4.1.2 Materials - Shader conversion ............................................... 36 4.2 The Use Cases .............................................................................. 39 4.3 Interactivity .................................................................................. 40 4.4 Setup/load ..................................................................................... 40 4.4.1 The Robot Scene ................................................................... 41 4.4.2 The Car Scene ....................................................................... 41 5. Discussion .......................................................................................... 42 6. Conclusion ......................................................................................... 44 7. Future Work ....................................................................................... 45 8. References .......................................................................................... 46 8.1 Bibliography ................................................................................. 46 8.2 Image Credits ..............................................................................