Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Rodent: generating renderers without writing a generator

Published: 12 July 2019 Publication History

Abstract

Monte-Carlo Renderers must generate many color samples to produce a noise-free image, and for each of those, they must evaluate complex mathematical models representing the appearance of the objects in the scene. These models are usually in the form of shaders: Small programs that are executed during rendering in order to compute a value for the current sample.
Renderers often compile and optimize shaders just before rendering, taking advantage of the knowledge of the scene. In principle, the entire renderer could benefit from a-priori code generation. For instance, scheduling can take advantage of the knowledge of the scene in order to maximize hardware usage. However, writing such a configurable renderer eventually means writing a compiler that translates a scene description into machine code.
In this paper, we present a framework that allows generating entire renderers for CPUs and GPUs without having to write a dedicated compiler: First, we provide a rendering library in a functional/imperative language that elegantly abstracts the individual rendering concepts using higher-order functions. Second, we use partial evaluation to combine and specialize the individual components of a renderer according to a particular scene.
Our results show that the renderers we generate outperform equivalent high-performance implementations written with state-of-the-art ray tracing libraries on the CPU and GPU.

Supplementary Material

ZIP File (repository.zip)
Rodent is a BVH traversal library and renderer implemented using the AnyDSL compiler framework (https://anydsl.github.io/).
The code is also available on GitHub: https://github.com/AnyDSL/rodent/releases/download/siggraph19/rodent_installer.zip
MP4 File (papers_190.mp4)

References

[1]
Attila T. Áfra, Carsten Benthin, Ingo Wald, and Jacob Munkberg. 2016. Local Shading Coherence Extraction for SIMD-efficient Path Tracing on CPUs. In Proceedings of High Performance Graphics. Eurographics Association, 119--128.
[2]
P.H. Andersen. 1995. Partial Evaluation Applied to Ray Tracing. DIKU Research Report 95/2. DIKU.
[3]
Kenichi Asai. 2002. Can Partial Evaluation Improve the Performance of Ray Tracing? Technical Report Vol. 53, Nr. 1. Ochanomizu University. 97--100.
[4]
Benedikt Bitterli. 2016. Rendering resources. https://benedikt-bitterli.me/resources/
[5]
Jacques Carette, Oleg Kiselyov, and Chung-chieh Shan. 2007. Finally Tagless, Partially Evaluated. In Programming Languages and Systems, 5th Asian Symposium, APLAS 2007, Singapore, November 29-December 1, 2007, Proceedings. 222--238.
[6]
Charles Consel. 1988. New Insights into Partial Evaluation: the SCHISM Experiment. In ESOP '88, 2nd European Symposium on Programming, Nancy, France, March 21--24, 1988, Proceedings. 236--246.
[7]
J. Döllner and K. Hinrichs. 2002. A Generic Rendering System. IEEE Transactions on Visualization and Computer Graphics 8, 2 (2002), 99--118.
[8]
Philip Dutre, Paul Heckbert, Vincent Ma, Fabio Pellacini, Robert Porschka, Mahesh Ramasubramanian, Cyril Soler, and Greg Ward. 2001. Global Illumination Compendium.
[9]
Yoshihiko Futamura. 1982. Parital Computation of Programs. In RIMS Symposium on Software Science and Engineering, Kyoto, Japan, 1982, Proceedings. 1--35.
[10]
Iliyan Georgiev and Philipp Slusallek. 2008. RTfact: Generic Concepts for Flexible and High Performance Ray Tracing. In Proceedings of the IEEE Symposium on Interactive Ray Tracing (RT). IEEE, 115--122.
[11]
Andrew S. Glassner (Ed.). 1989. An Introduction to Ray Tracing. Academic Press Ltd., London, UK, UK.
[12]
Brian Guenter, Todd B. Knoblock, and Erik Ruf. 1995. Specializing Shaders. In Proceedings of the 22Nd Annual Conference on Computer Graphics and Interactive Techniques (SIGGRAPH '95). ACM, New York, NY, USA, 343--350.
[13]
Maurice H. Halstead. 1977. Elements of Software Science (Operating and Programming Systems Series). Elsevier Science Inc., New York, NY, USA.
[14]
Yong He, Kayvon Fatahalian, and Tim Foley. 2018. Slang: Language Mechanisms for Extensible Real-time Shading Systems. ACM Trans. Graph. 37, 4, Article 141 (2018), 13 pages.
[15]
Neil D. Jones. 1996. An Introduction to Partial Evaluation. ACM Comput. Surv. 28, 3 (1996), 480--503.
[16]
James T. Kajiya. 1986. The Rendering Equation. SIGGRAPH Comput. Graph. 20, 4 (1986), 143--150.
[17]
Samuli Laine, Tero Karras, and Timo Aila. 2013. Megakernels Considered Harmful: Wavefront Path Tracing on GPUs. In Proceedings of the 5th High-Performance Graphics Conference (HPG). ACM, 137--143.
[18]
Roland Leißa, Klaas Boesche, Sebastian Hack, Arsène Pérard-Gayot, Richard Membarth, Philipp Slusallek, André Müller, and Bertil Schmidt. 2018. AnyDSL: A Partial Evaluation Framework for Programming High-Performance Libraries. PACMPL 2, OOPSLA (2018), 119:1--119:30.
[19]
Michael D. McCool, Zheng Qin, and Tiberiu S. Popa. 2002. Shader Metaprogramming. In Proceedings of the ACM SIGGRAPH/EUROGRAPHICS Conference on Graphics Hardware (HWWS '02). Eurographics Association, Aire-la-Ville, Switzerland, Switzerland, 57--68.
[20]
Simon Moll and Sebastian Hack. 2018. Partial Control-Flow Linearization. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM, 543--556.
[21]
NVIDIA. 2019. CUDA Toolkit Documentation. http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html, visited 10/01/19.
[22]
Steven G. Parker, James Bigler, Andreas Dietrich, Heiko Friedrich, Jared Hoberock, David Luebke, David McAllister, Morgan McGuire, Keith Morley, Austin Robison, and Martin Stich. 2010. OptiX: A General Purpose Ray Tracing Engine. ACM Transactions on Graphics (TOG) 29, 4, Article 66 (July 2010), 13 pages.
[23]
Matt Pharr and William R. Mark. 2012. ispc: A SPMD Compiler for High-Performance CPU Programming. In 2012 Innovative Parallel Computing (InPar). IEEE, 1--13.
[24]
Pixar 1988. RenderMan Interface Specification. Pixar. version 3.0.
[25]
Arsène Pérard-Gayot, Martin Weier, Richard Membarth, Philipp Slusallek, Roland Leißa, and Sebastian Hack. 2017. RaTrace: Simple and Efficient Abstractions for BVH Ray Traversal Algorithms. In Proceedings of the 16th International Conference on Generative Programming: Concepts & Experiences (GPCE). ACM, 157--168.
[26]
Jonathan Ragan-Kelley, Connelly Barnes, Andrew Adams, Sylvain Paris, Frédo Durand, and Saman Amarasinghe. 2013. Halide: A Language and Compiler for Optimizing Parallelism, Locality, and Recomputation in Image Processing Pipelines. SIGPLAN Not. 48, 6 (2013), 519--530.
[27]
James Reinders. 2007. Intel Threading Building Blocks - Outfitting C++ for Multi-Core Processor Parallelism. O'Reilly. http://www.oreilly.com/catalog/9780596514808/index.html
[28]
Kai Selgrad, Alexander Lier, Franz Köferl, Marc Stamminger, and Daniel Lohmann. 2015. Lightweight, Generative Variant Exploration for High-performance Graphics Applications. In Proceedings of the 14th International Conference on Generative Programming: Concepts & Experiences (GPCE). ACM, 141--150.
[29]
Philipp Slusallek and Hans-Peter Seidel. 1995. Vision - An Architecture for Global Illumination Calculations. IEEE Transactions on Visualization & Computer Graphics 1 (1995), 77--96.
[30]
Kristian Sons, Felix Klein, Jan Sutter, and Philipp Slusallek. 2014. shade.js: Adaptive Material Descriptions. Computer Graphics Forum 33, 7 (2014), 51--60.
[31]
Sony Pictures Imageworks 2017. Open Shading Language Specification. Sony Pictures Imageworks. version 1.9.
[32]
Eric Veach and Leonidas J. Guibas. 1995. Optimally Combining Sampling Techniques for Monte Carlo Rendering. In Proceedings of the 22Nd Annual Conference on Computer Graphics and Interactive Techniques (SIGGRAPH '95). ACM, New York, NY, USA, 419--428.
[33]
Ingo Wald, Sven Woop, Carsten Benthin, Gregory S. Johnson, and Manfred Ernst. 2014. Embree: A Kernel Framework for Efficient CPU Ray Tracing. ACM Transactions on Graphics (TOG) 33, 4, Article 143 (July 2014), 8 pages.
[34]
Turner Whitted. 1980. An Improved Illumination Model for Shaded Display. Commun. ACM 23, 6 (1980), 343--349.
[35]
Stefan Zellmann, Daniel Wickeroth, and Ulrich Lang. 2017. Visionaray: A Cross-Platform Ray Tracing Template Library. In Proceedings of the 10th Workshop on Software Engineering and Architectures for Realtime Interactive Systems (IEEE SEARIS 2017). 1--8.
[36]
Yunming Zhang, Mengjiao Yang, Riyadh Baghdadi, Shoaib Kamil, Julian Shun, and Saman P. Amarasinghe. 2018. GraphIt: A High-Performance Graph DSL. PACMPL 2, OOPSLA (2018), 121:1--121:30.

Cited By

View all
  • (2024)HIPRT: A Ray Tracing Framework in HIPProceedings of the ACM on Computer Graphics and Interactive Techniques10.1145/36753787:3(1-18)Online publication date: 9-Aug-2024
  • (2024)Temporal Coherence-Based Distributed Ray Tracing of Massive ScenesIEEE Transactions on Visualization and Computer Graphics10.1109/TVCG.2022.321998230:2(1489-1501)Online publication date: Feb-2024
  • (2024)RenderKernel: High-level programming for real-time rendering systemsVisual Informatics10.1016/j.visinf.2024.09.0048:3(82-95)Online publication date: Sep-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Graphics
ACM Transactions on Graphics  Volume 38, Issue 4
August 2019
1480 pages
ISSN:0730-0301
EISSN:1557-7368
DOI:10.1145/3306346
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 July 2019
Published in TOG Volume 38, Issue 4

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. generator
  2. partial evaluation
  3. ray-tracing
  4. rendering

Qualifiers

  • Research-article

Funding Sources

  • Bundesministerium für Bildung und Forschung
  • Universität des Saarlandes

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)19
  • Downloads (Last 6 weeks)3
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)HIPRT: A Ray Tracing Framework in HIPProceedings of the ACM on Computer Graphics and Interactive Techniques10.1145/36753787:3(1-18)Online publication date: 9-Aug-2024
  • (2024)Temporal Coherence-Based Distributed Ray Tracing of Massive ScenesIEEE Transactions on Visualization and Computer Graphics10.1109/TVCG.2022.321998230:2(1489-1501)Online publication date: Feb-2024
  • (2024)RenderKernel: High-level programming for real-time rendering systemsVisual Informatics10.1016/j.visinf.2024.09.0048:3(82-95)Online publication date: Sep-2024
  • (2023)SLANG.D: Fast, Modular and Differentiable Shader ProgrammingACM Transactions on Graphics10.1145/361835342:6(1-28)Online publication date: 5-Dec-2023
  • (2023)CUDA-accelerated protein electrostatics in linear spaceJournal of Computational Science10.1016/j.jocs.2023.10202270(102022)Online publication date: Jun-2023
  • (2022)LuisaRenderACM Transactions on Graphics10.1145/3550454.355546341:6(1-19)Online publication date: 30-Nov-2022
  • (2022)Supporting Unified Shader Specialization by Co-opting C++ FeaturesProceedings of the ACM on Computer Graphics and Interactive Techniques10.1145/35438665:3(1-17)Online publication date: 27-Jul-2022
  • (2022)Efficient kinetic simulation of two-phase flowsACM Transactions on Graphics10.1145/3528223.353013241:4(1-17)Online publication date: 22-Jul-2022
  • (2022)DR.JITACM Transactions on Graphics10.1145/3528223.353009941:4(1-19)Online publication date: 22-Jul-2022
  • (2022)Regression-based Monte Carlo integrationACM Transactions on Graphics10.1145/3528223.353009541:4(1-14)Online publication date: 22-Jul-2022
  • Show More Cited By

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media