GithubHelp home page GithubHelp logo

lishy66 / ray-tracing-engine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nikitakaraevv/ray-tracing-engine

0.0 0.0 0.0 6.89 MB

A simple ray-tracing engine with global illumination, microfacet reflections, area lights and photon mapping ๐Ÿ’ซ

License: Apache License 2.0

CMake 0.53% C++ 99.47%

ray-tracing-engine's Introduction

Ray tracing engine

A C++ based renderer developed from scratch. It utilizes either ray tracing or path tracing to render a scene. The renderer supports global illumination, microfacet reflections, shadows, and area lights. Rendering can be done either with or without construction of a photon map.

Most of the theory from the Image Synthesis course and the Physically Based Rendering book.

Examples

Ray Tracing Path Tracing
Ray tracing with Photon Mapping Path tracing with Photon Mapping

Usage

Compiling

$ git clone https://github.com/nikitakaraevv/ray-tracing-engine
$ cd ray-tracing-engine
$ mkdir build
$ cd build
$ cmake ..
$ make

Running

Rendering can be started by ./RayTracer and a set of input arguments to customize the process. You can take a look at the list of available arguments by calling ./RayTracer -help. Note that none of the parameters is mandatory for rendering since default values will be assigned to them at the beginning.

Here is a typical running command and some comments:

  • ./RayTracer -width 420 -height 420 -m 1 -N 128 -p 50000 -k 10
    • The output image will be of size 420x420.
    • -m defines mode of rendering. 0 is for ray tracing, 1 for path tracing.
    • The number of traced rays through each pixel will be defined by -N.
    • If -p is used, renderer will create a photon map and use it to render the image. -k indicates number of nearest photons to be considered during rendering.
    • In addition the renderer saves intermediate results to update.ppm.

Author

Nikita Karaev

ray-tracing-engine's People

Contributors

nikitakaraevv avatar

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.