All Projects → gyng → rust-raytracer

gyng / rust-raytracer

Licence: MIT license
Raytracer in Rust.

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to rust-raytracer

Tinyraytracer
A brief computer graphics / rendering course
Stars: ✭ 3,971 (+7842%)
Mutual labels:  raytracer
Voxel Cone Tracing
Converting vertex meshes to voxel data and visualizing using VCT
Stars: ✭ 74 (+48%)
Mutual labels:  raytracer
Iyan3d
Iyan 3D Professional Edition - 3D animation app for iOS
Stars: ✭ 27 (-46%)
Mutual labels:  raytracer
Lambda
Physically based renderer written in C++
Stars: ✭ 26 (-48%)
Mutual labels:  raytracer
monte-carlo-ray-tracer
Physically based renderer with Path Tracing and Photon Mapping.
Stars: ✭ 246 (+392%)
Mutual labels:  raytracer
wasm-raytracer
a performance comparison of a simple raytracer in JavaScript, asm.js, WebAssembly, and GLSL
Stars: ✭ 158 (+216%)
Mutual labels:  raytracer
GPU-Pathtracer
GPU Raytracer from scratch in C++/CUDA
Stars: ✭ 326 (+552%)
Mutual labels:  raytracer
cram
cram is a computational room acoustics module to simulate and explore various acoustic properties of a modeled space
Stars: ✭ 23 (-54%)
Mutual labels:  raytracer
rust-tracer
Simple Ray tracer written in Rust
Stars: ✭ 14 (-72%)
Mutual labels:  raytracer
ctrt
Compile-Time Ray Tracer in Rust ported from C++
Stars: ✭ 82 (+64%)
Mutual labels:  raytracer
Photon-v2
A program that takes photographs of a virtual world.
Stars: ✭ 75 (+50%)
Mutual labels:  raytracer
raytracer
Raytracer in C.
Stars: ✭ 24 (-52%)
Mutual labels:  raytracer
mcrt
Monte Carlo Raytracer from Scratch in C++11/14
Stars: ✭ 22 (-56%)
Mutual labels:  raytracer
Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+4054%)
Mutual labels:  raytracer
bash-raytracer
A raytracer in (mostly) Bash
Stars: ✭ 38 (-24%)
Mutual labels:  raytracer
ArtOfIllusion
Art of Illusion modeling and rendering suite - core application and tools
Stars: ✭ 58 (+16%)
Mutual labels:  raytracer
C-Raytracer
A CPU raytracer from scratch in C
Stars: ✭ 49 (-2%)
Mutual labels:  raytracer
Tracey
A 3d ray tracer in C++ (High School Project)
Stars: ✭ 24 (-52%)
Mutual labels:  raytracer
raiden
教育意义;基于物理的渲染器;闲着没事造轮子
Stars: ✭ 19 (-62%)
Mutual labels:  raytracer
Monte-Carlo-Path-Tracer
A realistic Monte Carlo Path Tracer project for CS230 (Virtual Reality and Interactive 3D Graphics Display), ACM Class, SJTU
Stars: ✭ 19 (-62%)
Mutual labels:  raytracer

rust-raytracer

Build Status

ScreenShot

A raytracer in Rust. Compiles on Rust stable > 1.5.

Gallery
Gallery repository
Assets repository

Usage

  1. Clone the project. --recursive clones most sample models and textures into the project directory as well.

     git clone --recursive https://github.com/gyng/rust-raytracer.git
    
  2. Compile

     cargo build --release
    
  3. Edit sample-config.json if you wish to render a scene besides the default, or if you wish to tweak the renderer parameters

  4. Run the compiled program, passing the render configuration as an argument. If rendering a provided scene, run the binary in the project root so it can find the models and textures.

     ./main sample-config.json
    

or alternatively to compile and run in one single command

    cargo run --release sample-config.json

Useful commands

  • To update (assets) submodules only: git submodule foreach git pull
  • To convert frames into a video ffmpeg -i test%06d.ppm -b 2000k out.webm
  • Scenes are created in ./myscene/. To hook up a scene, add it to ./myscene/mod.rs and get_camera_and_scene(&SceneConfig) in main.rs.

Available Scenes

These should use 30deg fov for squares and 45deg fov for 16:9.

  • box
  • bunny
  • cow
  • easing (0s-10s animation)
  • fresnel (0s-10s animation)
  • lucy
  • sibenik (0s-7s animation)
  • sphere (0s-10s animation)
  • sponza (45deg fov for a square; 67.5deg for 16:9)
  • teapot
  • heptoroid-white
  • heptoroid-shiny
  • heptoroid-refractive
  • tachikoma

Features

  • Reflections
  • Refractions
  • Multi-threading
  • Soft shadows
  • Supersampling
  • Cook-Torrance, Phong materials
  • Sphere, plane, triangle primitives
  • Point, sphere lights
  • Unoptimised glossy reflections
  • Limited OBJ model and mesh support
  • Mesh transformations (4x4 matrices)
  • Basic spatial partitioning (octree)
  • Basic textures (checker, uv, image)
  • Skybox (cubemap)
  • Camera animation with Bézier easing

Missing/potential features

  • Scene description
  • Caustics/global illumination (progress stalled on photon-trace branch)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].