Coder Social home page Coder Social logo

mini-ray-tracer's Introduction

Mini-Ray-Tracer

Mini Ray Tracer is a 3D-graphics renderer that synthesizes a photorealistic snapshot of a scene, individually tracing the path of each ray from the observer's perspective. It is a working console application where the input is a description of the 3-dimensional scene and the output is a PNG image.

This self-proposed project was created to fulfill one of the requirements of the course COMP 2012H Fall 2019 in HKUST. Implementation and algorithm behind the project were explained in the following presentation: https://drive.google.com/file/d/1gIxRG7IrHpc7Z-HVAODMjoI7Siqgfa7-/view?usp=sharing.

Running the tests

To run the tests it is needed to set up the 3D scene in the console by adding the spheres, AABB (axis-aligned bounding boxes) of different materials: lambertian, metal and dielectric.

Depending on the shape, material of the objects, position of a "camera" (source of the light beams) which are default or set by the user, there will be different output images.

Test images

Picture1

Final resolution: 1200x800
Anti-aliasing level: 100
Reflection depth: 5
Finished in 2821.56s

Picture2

Final resolution: 800x600
Anti-aliasing level: 50
Reflection depth: 5
Finished in 879.54s

Picture3

Final resolution: 800x400
Anti-aliasing level: 100
Reflection depth: 5
Finished in 125.77s

Acknowledgments

The project was inspired by the Ray Tracing book series by Peter Shirley.

mini-ray-tracer's People

Contributors

looosha avatar sbidaibek avatar

Watchers

 avatar

mini-ray-tracer's Issues

Implement the Vector3d class

Just implement the class according to the hints in the comments.

The operator [] should allow to do the following:

Vector3d v;
cout << v[0] << " " << v[1] << " " << v[2] << "\n";

Create the Color class

Refactor the existing Vector3d class a bit, extract a base Tuple3floats class, and derive a Color class from it

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.