Giter VIP home page Giter VIP logo

rt's Introduction

RT: A rayracer implemented in C++

alt text

A project I pursued to get a better understanding of the capabilities of modern C++. The code while my own, is based on algorithms and information obtained from: TRTC and PBRT. All features were implemented using a TDD methodology in which features are described in terms of tests. All code was implemented such as to satisfy and pass each test.

Features include everything as described in TRTC plus additions (e.g. more shapes).

Non-exhaustive list of potential additions:

- Clean up code
    - Suffix for members variables of class
    - Float suffix on numbers
    - Use references/pointers as much as possible
    - Minimize allocations
    - Remove shared_pointer use and replace with raw pointers?
- GUI build with QT
- YAML parser
- Extend the OBJ parser
    - MTL parsing
    - Add flags (e.g. ability to disable normals)
    - Replace this with an external library?
- PNG support
- Parallel processing: given the nature of ray tracing it should be easily parallelizable. A possible approach would be to use a concurrent mpmc lockless queue, i.e. a work queue which dispatches work to workers/renderers.
- Shadow ray optimization, there is no need to find the closest intersection, only interested in knowing whether there is an intersection.
- Cache the transforms; most objects have the identity matrix as a transform, generally transforms occur at the top level, i.e. group level. So there is no reason to have every object store every matrix and inverse matrix. It would be better to store them in a map such that each object only has to carry a pointer to this map.
- Optimize matrix operation code
- Supersampling
    - Jitter
    - Adaptive supersampling
- Bilinear interpolation
- Bounded depth of reflection: a threshold is now used for the number of bounces, an additional feature would be to further limit it by the ray contribution, i.e. stop if transmitted attenuation becomes too small.
- Variable glossyness of reflections. When rays collide with a rough material, the reflected ray is perturbed randomly by an amount determined by the roughness.
- Variable glossyness of refraction, similar to reflection glossyness
- Texture mapping
    - Diffuse color has been included, but there are many more options...
        - Reflected color
        - Transparency
- Reflective mapping
- Anisotropic shading
- Height fields
- Single Image Random Dot Stereograms (SIRDS)
- Procedural textures
- Bump mapping
- Metaballs
- Fractals
    - 3D
    - 4D quaternion
- Shadow attenuation use Beer's law so that the thicker objects cast darker shadows than thinner ones with the same transparency constant
- More versatile light control, e.g. Warn model
- Motion blur
- Monte Carlo Caustics & Indirect Light
- Extension of existing primitive shapes, for instance a cylinder could be extended to include a radius and maximum phi parameter such that it is possible to scale the cylinder without using transformations.
- Add more shapes
- Photon mapping
- Sub-Surface Scattering
- Metropolis Light Transport
- Different types of cameras
- Different types of lights
- Different types of materials
- Path tracing
- Set material of groups transfer to members

rt's People

Contributors

tomokveld 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.