Giter VIP home page Giter VIP logo

cg3's Introduction

Modifications Raytracer 2:

Scene.cpp
	- refactored Render() method 
	- extended Render() method to implement extended camera model
	- added shadow computation to tracePhong()
	- added superSampling computation in render()
	- adapted the calls for normal buffer and z-buffer to also apply super sampling
	- made recursive call to tracePhong() to compute reflections

Raytracer.cpp
	- added parsing options for Camera, MaxRecursiveDepth, Shadows and SuperSampling
	- added variable resolution for image (resolution is taken from camera)

Camera.cpp/h
	- added Camera definitions
	- defined getters and setters for camera attributes





Modifications Raytracer 1:

Sphere.cpp
	- added intersection and normal calculation
Plane.cpp/ && Plane.h
	- added plane definition and plane-ray intersection
Triangle.cpp && triangle.h
	- added triangle difintion and triangle-ray intersection
Scene.h
	- added renderMode variable (int)
Scene.cpp
	- added setRenderMode function
	- split trace(ray) function into:
		tracePhong(ray)
		traceNormal(ray)
		traceZbuffer(ray)
	- added switch case to select render mode in Scene::render()
	- added loop to normalize colors if z-buffer mode is selected

Raytracer.cpp
	- added "triangle" and "plane" parsing to Raytracer::parseObjects()
	- added function Raytracer::parseRenderMode()



Usage:
	make				// compiles the program
	ray <dir/filename.yaml>		// traces the scene described in file 

For an example of a Plane and Triangle definition, see "scene01.yaml" in Code/Raytracer. Syntax for camera, recursive depth, supersampling and shadows are as in the provided example "scene01-camera-ss-reflect-lights-shadows.yaml". This file is included within the Code directory.

cg3's People

Contributors

rvanbuijtenen avatar junijland avatar

Watchers

 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.