Skip to content

Jorgeromeu/rayo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rayo

A path tracer written in rust. Inspired by the amazing Ray Tracing in One Weekend book series.

Renders

Best render

cf35da1f-91df-4d81-8f47-2a22e95df9dc

Usage

rayo is (currenty) a command line tool. The available flags and options are:

USAGE:
    rayo [OPTIONS] <SCENE>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -a, --aspect <ASPECT-RATIO>        Aspect ratio [default: 16/9]
    -d, --depth <MAX-DEPTH>            Maximum recursion depth [default: 30]
    -n, --num-samples <NUM-SAMPLES>    Number of samples per pixel [default: 100]
    -o, --out <FILE>                   Rendered image path [default: render.png]
    -r, --resolution <RESOLUTION>      Horizontal image resolution [default: 480]

ARGS:
    <SCENE>    The Scene JSON file

To create a render you need to create a corresponding scene file defining the positions, shapes, materials and textures of all of the models in the scene. A collection of example scenes can be found in the scenes folder.

Features

Many features are yet to be implemented. The basic roadmap is:

  • Nice CLI
  • Reading scenes from json or some other similar format
  • Support for OBJ files for meshes (using assimp)

Shapes

  • Spheres
  • Axis aligned boxes
  • Triangle meshes
  • Planes

Materials

  • Lambertian diffuse materials
  • Metalic materials
  • Glass/Dielectrics

Effects

  • Anti aliasing
  • Depth of field
  • Skyboxes
  • Motion blur
  • Adjustable camera positions
  • Textures (checkerboard)
  • Textures (reading from image)
  • Light objects

Efficiency enhancements

  • parallelize on CPU
  • parallelize on GPU (cuda)
  • bounding volumes

Possible things but unlikely

  • make an opengl viewer which allows you to set up scene and then switch to raytraced mode
  • have this viewer display the render after each sample
  • compile this to webgl and wasm and run in browser?

About

A simple path tracer written in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages