Coder Social home page Coder Social logo

peterzs / volumetric-path-tracer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from edu-rinaldi/volumetric-path-tracer

0.0 0.0 0.0 154.12 MB

Volumetric and implicit surfaces (SDF) pathtracer implementation built on top of Yocto/GL.

Shell 0.03% C++ 70.93% C 26.82% Objective-C 1.79% CMake 0.44%

volumetric-path-tracer's Introduction

Yocto/Pathtrace: Tiny Volumetric Path Tracer

For this homework the main objectives were to:

  • handle subdivision surfaces,
  • handle normal mapping,
  • write a path tracer with support for homogeneous volumes.
  • write a path tracer that uses sphere tracing for implicit surfaces
  • represents implicit surfaces using SDF both as actual functions and as voxel grid.

Framework

The code uses the library Yocto/GL, that is included in this project in the directory yocto.

In order to compile the code, you have to install Xcode on OsX, Visual Studio 2019 on Windows, or a modern version of gcc or clang on Linux, together with the tools cmake and ninja. The script scripts/build.sh will perform a simple build on OsX.

Main functionalities can be found in yocto_pathtrace.{cpp|h}

This repository also contains tests that are executed from the command line as shown in run.sh. The rendered images are saved in the out/ directory. The results can be compared with the ones in the directory check/.

Functionality

In this homework/project the following features are implemented:

  • Subdivision Surfaces in function tesselate_surface(), following Catmull-Clark subdivision implementation
  • Volumetric Path Tracing in function shade_volpathtrace()

Extra Functionality (implicit surfaces)

Until now we have always used triangle or quad meshes in our renderers; this extra credit aims to implement a renderer similar to the one implemented in the second homework but which can render scenes containing ONLY implicit surfaces.

In particular, this implementation allows to render scenes composed by SDF (signed distance function), such as:

  • In-app defined SDF (lambda functions).
  • 3D Grid SDF (volume grid).

Following functionalities are implemented:

  • Implicit surfaces shader.
  • Very simple multiple importance sampling.
  • Implicit normals shader for debugging.
  • Spheretracing functions.
  • Normal evaluation functions.
  • ".sdf" file parsing.
  • Implicit scene loading using "scene.json".

Extra information about implicit surfaces implementation can be found in report.pdf

Some renders

volumetric-path-tracer's People

Contributors

edu-rinaldi 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.