GithubHelp home page GithubHelp logo

zielon / pbrenderer Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 0.0 99.6 MB

CPU Physically Based Path Tracer Engine

License: BSD 2-Clause "Simplified" License

C++ 97.78% GLSL 2.22%
ray-casting raytracing raytracer pbr shading parallel-computing brdf path-tracer path-tracing-algorithm

pbrenderer's Introduction

PBRenderer 2.0.0

Physically Based Renderer Engine

Engine for generating physically based renderings. The whole project is divided into two main parts; rasterizer and pbrenderer. The first part implements a few basic GLSL shaders for visualising normals with flat and smooth shading, additionally, mouse picking and normal ray casting is added. A user can fly around the scene freely using the following buttons: W, S, D, A and left mouse button. Finally, place the camera in a selected position in the world space and render an image using R or C button. The former has to be pressed to physically based render a scene and the latter to ray cast normals. The biggest part of this project is pbrenderer.

How to run:

To run the project Visual Studio is needed. Render images are saved in the folder output which is created in the repository root automatically. The example of a configuraiton file is in the folder with the same name.

Use vcpkg to install the following packages:

1) glad_x64-windows
2) glfw3_x64-windows
3) glm_x64-windows
4) stb_x64-windows
5) zlib_x64-windows
6) rapidjson_x64-windows

Run command to install all:
vcpkg install glad_x64-windows glfw3_x64-windows glm_x64-windows stb_x64-windows zlib_x64-windows rapidjson_x64-windows

Available integrators:

1) Whitted
2) Direct light
3) Path tracer with MIS

Available lights:

1) Area light
2) Point light
3) Environment light

Available materials:

1) Lambertian
2) Perfect specular
3) Perfect transmit
4) Plastic
5) Glass
6) Metal

Results:

It took around 10-15 minutes per image [8 threads].

output_1

Material: gold
Distribuion: GGX with alpha 0.15
Resolution: [900x700]
SPP: 1536
Rays max depth: 10

output_1

Material: plastic
Distribuion: GGX with alpha 0.55
Lambertian material + Microfacets reflection
Resolution: [900x700]
SPP: 1536
Rays max depth: 10

output_1

Material: glass
IOR 1.5
Resolution: [900x700]
SPP: 3000
Rays max depth: 10

output_1

Material: plastic and glass sphere
IOR 1.5
Resolution: [900x700]
SPP: 3100
Rays max depth: 10

References:

[0] pbr-book (3ed-2018)

pbrenderer's People

Contributors

zielon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.