Ray Tracer Spring 2004 Help Session.

Slides:



Advertisements
Similar presentations
Transformations in Ray Tracing MIT EECS 6.837, Durand and Cutler.
Advertisements

GR2 Advanced Computer Graphics AGR
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Christian Lauterbach COMP 770, 2/11/2009
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
CS 376 Introduction to Computer Graphics 04 / 09 / 2007 Instructor: Michael Eckmann.
Ray Tracing Outline For each pixel { Shoot ray r from eye to center of pixel with trace( r ) } function trace( r ) For each object { Find object with closest.
Ray Tracing Jerry Sui Adam Conner. Part I – Introduction to Ray Tracing Final Product.
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
CIS 310: Visual Programming, Spring 2006 Western State College 310: Visual Programming Ray Tracing.
Ray Tracing 1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009.
Lecture 8 Advanced Rendering – Ray Tracing, Radiosity & NPR.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Computer Graphics Panos Trahanias ΗΥ358 Spring 2009.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
CS 376 Introduction to Computer Graphics 04 / 11 / 2007 Instructor: Michael Eckmann.
-Global Illumination Techniques
Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion.
Ray Tracing Sang Il Park SEjong University With lots of slides stolen from Jehee Lee, Doug James, Steve Seitz, Shree Nayar, Alexei Efros, Fredo Durand.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
Ray Tracing Jian Huang, CS 594, Fall, 2002 This set of slides are used at Ohio State by Prof. Roger Crawfis.
Copyright © Curt Hill Visualization of 3D Worlds How are these images described?
Ray Tracer Winter 2014 Help Session Due: Tuesday, Feb 25 th, 11:59pm TA: Will Gannon.
Intro. to Advanced Lighting, Basic Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, April.
Ray Tracer Spring 2008 Help Session. Outline Project Web Resources What do you have to do for this project? Ray Class Isect Class Requirements Tricks.
Alex YAU Important Notes Website for Assignment #2 You.
CS380: Computer Graphics Distributed Ray Tracing TA Course URL:
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
Project 3 Help Session: Ray Tracing. Getting Started Download the starter pack. 1.sample_ray.exe 2.ray-skel directory 3.scenes directory Look at the Road.
More on Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, April 14, 2004.
RENDERING : Global Illumination
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
Ray Tracing I. Reading Hill, Chapter 14, Sections 14.1 to 14.5 Hill, Chapter 14, Sections and
Review Ray Tracing III Review. Pseudo codes RayCast-1  Plain ray caster (direct illumination) RayCast-2  RayCast-1 + shadow rays RayTrace-1  Recursive.
Ray Tracer Help Session. Outline Introduction ray vec.h and mat.h isect Requirements Tips and Tricks Memory Leaks Artifact Requirement Ray Tracing Surface.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Ray Tracer Help Session.
Basic Ray Tracing CMSC 435/634.
3D Rendering 2016, Fall.
Advanced Computer Graphics
Photorealistic Rendering vs. Interactive 3D Graphics
Ray Tracer Spring 2007 Help Session.
Aspects of Game Rendering
Ray Tracing Ed Angel Professor Emeritus of Computer Science
3D Graphics Rendering PPT By Ricardo Veguilla.
RAY TRACING.
Autumn 2010 Help Session Christopher Raastad
© University of Wisconsin, CS559 Fall 2004
Ray Tracer Project CSE 557.
(c) 2002 University of Wisconsin
Lecture 11: Recursive Ray Tracer
Distributed Ray Tracing
(c) 2002 University of Wisconsin
Reflection and Light Flat Mirrors.
Image.
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Monte Carlo Rendering Central theme is sampling:
CS5500 Computer Graphics May 29, 2006
Distributed Ray Tracing
GR2 Advanced Computer Graphics AGR
Ray Tracer Project CSE 557.
Ray Tracer Spring 2008 Help Session.
Simple Texture Mapping
Ray Tracer Autumn 2005 Help Session.
Ray Tracer Spring 2006 Help Session.
Presentation transcript:

Ray Tracer Spring 2004 Help Session

Outline Requirements Ray Class Isect Class Tricks Artifact Requirement Bells and Whistles

Requirements Sphere Intersection Fill in Sphere::intersectLocal in Sphere.cpp: Return true if ray r intersects the canonical sphere (sphere centered at the origin with radius 1.0) in positive time. Set the values of isect i: i.obj = this i.setT(time of intersection) i.setN(normal at intersection).

Triangle Intersection Requirements Triangle Intersection Fill in TrimeshFace::intersectLocal in trimesh.cpp: Intersect r with the triangle abc: Vec3d& a = parent->vertices[ ids [0] ]; Vec3d& b = parent->vertices[ ids [1] ]; Vec3d& c = parent->vertices[ ids [2] ]; Set isect i and return true if ray r intersects the plane containing triangle abc and the intersection is within the triangle.

Phong specular-reflection model Requirements Phong specular-reflection model Fill in Material::shade in material.cpp: Refer to slide 20 of the shading lecture. To sum over the light sources, use an iterator as described in the comments of the code.

Contribution from multiple light sources Requirements Contribution from multiple light sources Fill in PointLight::distanceAttenuation in light.cpp (DirectionalLight::distanceAttenuation is already done for you). Use the alternative described in slide 19 of the shading lecture where a = constantTerm b = linearTerm c = quadraticTerm in light.h.

Requirements Shadow Attenuation Fill in DirectionalLight::shadowAttenuation and PointLight::shadowAttenuation in light.cpp. Take into account shadow attenuation in the f_atten term in the Phong model as suggested in the ray-tracing lecture. Rather than simply setting the attenuation to 0 if an object blocks the light, accumulate the product of k_t’s for objects which block the light.

Requirements Reflection Modify RayTracer::traceRay in RayTracer.cpp to implement recursive ray tracing which takes into account reflected rays. The Watt handout has great information for this – watch the errors if using the Watt text.

Requirements Refraction Modify RayTracer::traceRay in RayTracer.cpp to implement recursive ray tracing which takes into account refracted rays. Remember Snell’s law and watch our for total internal refraction.

ray Class ray r (start position, direction, RayType) enum RayType{VISIBILITY, REFLECTION, REFRACTION, SHADOW}; r.at(t), a method that determines the position of the ray r as a function of t, the distance from the start position.

isect Class An isect represents the location where a ray intersects a specific object. Important member variables: const SceneObject *obj; // the object that was intersected. double t; // the distance along the ray where it occurred. Vec3d N; // the normal to the surface where it occurred Vec2d uvCoordinates; // texture coordinates on the surface. [1.0,1.0] Material *material; // non-NULL if exists a unique material for this intersect. const Material &getMaterial() const; // return the material to use

Tricks Use the sign of the dot product r.getDirection() with i.N to determine whether you’re entering or exiting an object Use RAY_EPSILON to account for computer precision error when checking for intersections

Artifact Requirements One (or two) .bmp images traced with your Ray Tracer per group submitted for voting. For each image submitted for voting, a short .txt description of the scene or special features. Examples of each bell/whistle implemented with an accompanying readme.txt specifying which image demonstrates which feature (and where/how).

Bells and Whistles Antialiasing – A must for nice scenes (to render scenes without “jaggies”) Environment/Texture/Bump Mapping – Relatively easy ways to create complex, compelling scenes Single Image Random Dot Stereograms – I have no idea, but they look cool!

Bells and Whistles Depth of field, Soft shadows, Motion blur, Glossy reflection – most images we’re used to have at least one of these effects 3D and 4D fractals – Why not? Constructive Solid Geometry – Allows for complex objects while still just intersecting simple primitives