Git Product home page Git Product logo

jray's Introduction

jray - A Raytracer.

A capture of jray in action

An implementation of The Ray Tracer Challenge by Jamis Buck, written in C++11 with a simple GTK3 UI. A "from scratch" implementation, it uses no special graphics or math libraries. Its only dependencies are GTK3, gtkmm, yaml-cpp and googletest.

Some of its features:

  • Displays the render in progress
  • Multithreaded
  • All primitive shapes: Sphere, Cube, Plane, Cylinder, Cone
  • Support for triangle meshes in OBJ format with surface normals
  • Groups and Constructive Solid Geometry (CSG)
  • Bounding boxes and a Bounding Volume Hierarchy (BVH) optimization for high polygon scenes
  • Focal blur and antialiasing (supersampling)
  • Patterns, including nested patterns
  • Texture mapping on primitive shapes
  • Area lights and soft shadows

While performance was not a major priority in this implementation, it does do pretty well at higher compiler optimization levels. Further improvements are planned.

How to build

  1. Obtain dependencies You'll need CMake and the gtkmm libraries. This depends on your distribution.
    On Debian/Ubuntu: sudo apt install libgtkmm-3.0-dev cmake
  2. Clone the repo and pull the submodules
git clone https://github.com/jpunzel/jray.git
cd jray
git submodule update --init --recursive
  1. Create the build directory and run cmake
# (in jray dir)
mkdir build
cd build
cmake ..
  1. Compile!
make -j4

TODO:

  • Implement MTL parsing for texturing triangle meshes
  • Implement bump mapping
  • Fix numerous problems in the YAML scene file parser (likely needs a full rewrite)
  • Optimization: Don't parse the same obj file multiple times (implement deep copy of Group object hierarchy)
  • Performance: re-evaluate use of std::multiset for storing ray intersection lists
  • Performance: re-evaluate use of std::shared_ptr
  • Performance: Optimize matrix multiplication routines for SSE/AVX

jray's People

Contributors

jpunzel avatar

Watchers

 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.