Git Product home page Git Product logo

rayn's Introduction

rayn

This is a CPU-based path tracing renderer focused on rendering SDFs, specifically fractals. It was originally based on the book "Ray tracing in one weekend" by Peter Shirley, which I heartily recommend, though it has now evolved into a structure of my own design, taking hints from that, pbrt, which is also an excellent reference, and research from NVIDIA on wavefront pathtracing for taking advantage of SIMD.

Features

  • Architected to use 128-wide SIMD to full extent with the help of ultraviolet, and in the future perhaps 256 or 512 as well.
  • Physical light transport algorithm
  • Multiple-bounce indirect lighting/global illumination
  • Importance sampling (soon multiple importance sampling)
  • Next Event Estimation / Direct light sampling
  • Depth of field
  • Arbitrary animation and time-sampled motion blur
  • Signed distance field rendering through leveraging sdfu
  • Homogeneous volumetrics with extinction and single scattering with isotropic media

Demo images

All demo images in this repository are licensed under the CC BY-NC-ND license which essentially means you are free to use them for non-commercial purposes so long as you:

1. Credit me (my name, Gray Olson, and a link to my website, https://grayolson.me/)

2. Do not modify them

CC BY-NC-ND License Badge

If you wish to use them for commercial purposes, contact me and we can work out a license.

demo7 demo1 Full 8k resolution image of this render available here.

How to use it

Building

First, install Rust. Then, clone or download this repo (green "Code" button on GitHub). Finally, open a shell prompt and change to this repository's directory (if you're not sure how to do this, see this article). Then, run

$ cargo run --release

This will render an image and place it in a folder called renders inside the folder this repo is in.

Playing with the scene

With your favorite code editor (I recommend VSCode with the rust-analyzer plugin), open the src/setup.rs file.

Here you can change many settings including the resolution of the output image, the number of indirect lighting bounces, the number of raymarching steps on each path, the number of total samples to take, and the setup of the whole scene. Feel free to play with all these numbers and see what they do. Just run cargo run --release each time you make a change to render a new image. There are some comments in that file to help you get started on things you can play around with.

More demo images

demo2 demo3 demo4 demo5 demo6

rayn's People

Contributors

0xadd1e avatar expenses avatar fu5ha 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.