GithubHelp home page GithubHelp logo

raytracer-renderer-cgi's Introduction

Raytracer-Renderer-CGI

Ray tracing is a fundamental rendering algorithm. It is commonly used for animations and architectural simulations, in which the quality of the created images is more important than the time it takes to create them. It simulates the propagation of light in real world.

Keywords: ray tracing, light propagation, geometric optics, ray-object intersections, surface shading

The scene file will be formatted as an XML file. In this file, there may be different numbers of materials, vertices, triangles, spheres, lights, and cameras. Each of these are defined by a unique integer ID. The IDs for each type of element will start from one and increase sequentially. Also notice that, in the XML file: · Every number represented by X, Y and Z is a floating point number. · Every number represented by R, G, B, and N is an integer.

Basic illumination model is used in this project. Ambient, Diffuse and Specular components are added. Bling phong shading is used as well. To limit the rendering time back face culling is implemented.

Some rendered images

Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot Screenshot

Run

Change the input image to render different images. Bare in mind that raytracing takes time.Depending on your computer some image renderings take upto 30 - 50 minutes

cd code_template
make 
./raytracer sample_scenes_v3/inputs/simple.xml
./raytracer sample_scenes_v3/inputs/simple_reflectance.xml
./raytracer sample_scenes_v3/inputs/simple_shading.xml
./raytracer sample_scenes_v3/inputs/bunny.xml
./raytracer sample_scenes_v3/inputs/berserker.xml
./raytracer sample_scenes_v3/inputs/car.xml
./raytracer sample_scenes_v3/inputs/cornellbox.xml
./raytracer sample_scenes_v3/inputs/dragon_lowres.xml
./raytracer sample_scenes_v3/inputs/horse_and_mug.xml
./raytracer sample_scenes_v3/inputs/killeroo.xml
./raytracer sample_scenes_v3/inputs/low_poly.xml
./raytracer sample_scenes_v3/inputs/mirror_spheres.xml
./raytracer sample_scenes_v3/inputs/monkey.xml

raytracer-renderer-cgi's People

Contributors

gundwane21 avatar ugrkm avatar

Stargazers

Arda Günal 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.