Giter Site home page Giter Site logo

raycollection's Introduction

Synopsis

This repository is a collection of software written by me intended to create photorealistic rendering techniques from scratch. Within the various projects, I explore and apply the following topics: raycasting, raytracing, photorealistic rendering, concurrent/multi-threaded programming, and GPU parallelization.

To take a look at the various renders I've produced, check out renders directories within each Raytracer file e.g. 'Raytracer*/renders/'.

The Journey

Raytracer v1

In this iteration. I simply tried rendering spheres as they can easily be described by a position and a radius. Given the formula of a sphere, the program inefficiently "walks" a grid of rays through the world till they either reach a maximum distance or end up inside of the sphere. Once a hit point is discovered, a normal vector can easily be calculated and simple directional lighting calculations are performed.

Raytracer v2

In this iteration, a grid of rays is cast out towards a loaded model and collision calculations are performed on each triangle of the mesh. Given this, pixel by pixel rendering and simple lighting calculations can be performed on vary complicated models. However, it faces problems with inefficient rendering methods that drastically decrease in performance as resolution and triangle counts are increased. Due to the method by which triangle collisions are calculated, there are slight errors in the final product which manifest themselves as slightly overlapping edges and small "holes" in the produced image.

Raytracer v4

In this iteration, almost the same methods are used as before. However, the code is entirely refactored, better organized, and especially better performing as I implemented multi-threading functionality. This showed reduction in render times with extremely complicated models (50,000+ triangles) and high-pixel counts (Over 4 million). In some cases, render times were reduced to as low as 20% as compared to the previous iterations. Ideally, given the optimal concurrent implementation, this would be more like 6%, but its still a massive improvement. Furthermore, it may not be worth the time to further optimize the multi-threading approach and instead begin exploring GPU parallelization of the whole process.

raycollection's People

Contributors

michaelbuerger avatar

Stargazers

 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.