Coder Social home page Coder Social logo

tyanyuy3125 / rendertoy Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 1.0 59.2 MB

RenderToy is an experimental path tracing rendering library for academic purposes.

License: MIT License

CMake 3.53% C++ 92.04% C 4.43%
bsdf path-tracing pbr software-renderer monte-carlo

rendertoy's Introduction

RenderToy

RenderToy is an experimental path tracing rendering library for academic purposes.

We implement:

  • Highly abstracted mathematics module.
  • Modern color system with multiple color standards.
    • ITU-R BT.709
    • ITU-R BT.601
    • ITU-R BT.2020
    • SMPTE 240M
  • Fully multi-threaded path-traced GI.
    • Direct Light Sampling (DLS).
      • It also produces fast-GI results.
    • Disney PBR BSDF.
    • Multiple importance sampling (MIS).
  • Triangulated mesh system.
    • Bounding Volume Hierarchy (BVH) acceleration structure.
  • Physically-based perspective camera.
    • Presets:
      • Academy Format.
      • IMAX HD.
      • Maxivision.
  • Multi-pass ray-casting renderer, including normal pass, albedo pass & depth pass.
    • Can be linked with denoising library such as Intel® OIDN & Nvidia OptiX™ AI-Accelerated Denoiser. The image buffer pointer can be directly passed to OIDN.
  • Physically-based principled BSDF material system.
  • Procedural Texture.
    • Checkerboard.
    • Wave.
    • Perlin Noise.
  • A compositor for post-processing.
    • Gaussian blur.
    • Convolution with customized kernels.
    • Edge detection.
    • Bloom.
  • Basic 2D drawing support.
  • Mesh to OpenGL VBO converter.
  • File IO.
    • Importing wavefront OBJ model file.
    • Exporting PPM & BMP SDR image file.

Getting Started

Pre-requirements:

Intel® OIDN used by denoising demo has special hardware requirements. Please refer to https://www.openimagedenoise.org/ for more info. This does not affect the compilation of RenderToy library itself.

LLVM Clang is recommended to compile the project.

Important notice for LLVM Clang: Compiler optimizations of some Clang version prior to Clang 15.0.7 can cause sensible precision problems with RenderToy's floating-point calculations. Use the latest Clang version whenever possible.

Meanwhile we recommend you use VSCode as it is well integrated with CMake. After opening the project directory in VSCode, press Ctrl+Shift+P then enter CMake: Configure - VSCode will do everything you need.

Launch Targets

  • Tests - Unit test module for the project.
  • CornellBox - A demo rendering the famous Cornell Box scene.
  • WithOIDN - A demonstration of Intel® Open Image Denoise integration.
  • ProceduralTexture - A demo rasterizing procedural textures supported by RenderToy.
  • SmoothShading - A demonstration of smooth shading.
  • Drawing - 2D drawing demo.

Render Results & Comparison

comparison

oidn

smooth

Features

  • Unique project structure, unlike any other open source ray tracers.
  • High abstraction.
  • Extensive adoption of compile-time code like SFINAE etc.
  • Provides a variety of interfaces for secondary development.

Our plan:

  • Procedural texture and mesh module.
  • A richer compositor.
  • Importing SDR/HDR texture image.
  • Exporting HDR image.
  • Physical sky.
  • Code optimization.

License

MIT.

OSS Usage

--------
siv::PerlinNoise
Perlin noise library for modern C++
MIT License.
Copyright (C) 2013-2021 Ryo Suzuki <[email protected]>
--------
Blackbody Converter
MIT License.
Copyright (c) 2020 Christopher J. Howard.
--------

Reference

rendertoy's People

Contributors

tyanyuy3125 avatar

Stargazers

Peiwen Lan avatar Huan Xu avatar rubatotree avatar Eason Wang avatar Timothy Liu avatar liubf avatar Hao Li avatar  avatar Ali avatar laolarou avatar

Watchers

 avatar

rendertoy's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.