Code Monkey home page Code Monkey logo

raytracer's Introduction

raytracer

Loads scene descriptions and progressively outputs 3D renders.

This ray tracer is extremely in-progress and inefficient - not recommended for use!

Load a 3D scene file and render a 2D image using ray tracing.

Built originally for COMP 371 Computer Graphics at Concordia University in Montréal, Québec.

Works on macOS and Linux. Should work for Windows, but not recently tested.

Features

Pick a scene to ray cast, watch it be traced in real time, and save it to file!

Specifying scenes

See Scene description format.

Viewing saved output

Saved renders are placed in the renders directory.

Building

See Building and running the project.

Acknowledgements

Dependencies

Beyond the C++ standard library this application relies on:

  • GLM
  • STB (particularly the stb_image_write.h header library)
  • tinyobjloader
  • Boost
  • SDL2 (for displaying the current state of the ray trace)

(Following standard setup procedure in a CMake-compatible IDE should fetch all these dependencies for you, so you shouldn't need to download them separately.)

Other help

  • Cross platform CMake setup created using Hunter
  • Thanks to this StackOverflow answer, and also this other StackOverflow answer, for helping me display my render with SDL
  • Thanks to COMP 371 at Concordia for all the materials helping with various formulas for ray tracing
  • Thanks to Scratchapixel tutorials for good explanations of geometric methods for find ray intersections with spheres and planes/triangles.

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.