Giter VIP home page Giter VIP logo

ray-tracer's Introduction

This is a coursework created for the Computer Graphics module. For this coursework a ray tracer and a rasteriser was created using C++ and SDL. It received one of the highest marks and was commented as "one of the best I've ever seen" by the lecturer.

The ray tracer part is done using reverse ray tracing techniques, and consists of several extensions. Jittered super sampling was used for anti-aliasing; a jittered sampling method was also used for the area light to create soft shadows; the recursive path tracing technique was implemented for global illumination; triangles and spheres were created as primitives; reflection and refraction with blending modes and fresnel effects are also implemented; a lot of optimisation was done such as faster intersection algorithm, multi-threading, progressive-refinement and back-face culling. Texture mapping and normal mapping are also done as part of the rasteriser.

Environment

Requires SDL 1.2, GLM latest, g++, Linux system.

Compile

To compile, run the following command:

$ make

This will produce an executable "raytracer" inside the Build folder.

Usage

Go into the "Build" folder and execute "raytracer":

$ cd Build
$ ./raytracer

This program will take a coupe seconds to render the first preview, then progressively refine the image. The longer you wait, the more refined the preview will become.

This program was treated as a render, not an interactive program. For real-time interactive program, try the rasteriser:

$ ./rasteriser

ray-tracer's People

Contributors

qingqishi avatar

Watchers

James Cloos avatar  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.