Ray Tracing TP OpenGL PHAM Trong Tôn WANG Yuanhang.

Slides:



Advertisements
Similar presentations
Reflection Objectives:
Advertisements

Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Graphics Pipeline.
 Engineering Graphics & Introductory Design 3D Graphics and Rendering REU Modeling Course – June 13 th 2014.
Light Issues in Computer Graphics Presented by Saleema Amershi.
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.
Ray Tracing Tutorial. Ray Casting One type of visibility algorithm.
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 04 / 09 / 2007 Instructor: Michael Eckmann.
IN4151 Introduction 3D graphics 1 Introduction 3D Computer Graphics part 1 Projective display Viewing pipeline Graphics hardware Image-based rendering.
1 Lecture 9 Lighting Light Sources Reflectance Camera Models.
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.
Paper by Alexander Keller
Ray Tracing CS Nov. 19, Turner Whitted.
CS 376 Introduction to Computer Graphics 04 / 04 / 2007 Instructor: Michael Eckmann.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 2: Basic Ray Tracing Ravi Ramamoorthi Some slides courtesy.
Distinguish between specular and diffuse reflection of light. Apply the law of reflection for flat mirrors. Describe the nature of images formed by flat.
Cornell CS465 Fall 2004 Lecture 3© 2004 Steve Marschner 1 Ray Tracing CS 465 Lecture 3.
Cornell CS465 Fall 2004 Lecture 3© 2004 Steve Marschner 1 Ray Tracing CS 465 Lecture 3.
1 Texturing. 2 What is Texturing? 3 Texture Mapping Definition: mapping a function onto a surface; function can be:  1, 2, or 3D  sampled (image) or.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Presentation by Dr. David Cline Oklahoma State University
Computer graphics & visualization Ray-Tracing – A Quick review.
COMP 175: Computer Graphics March 24, 2015
CS 376 Introduction to Computer Graphics 04 / 11 / 2007 Instructor: Michael Eckmann.
Computer Graphics. Requirements Prerequisites Prerequisites CS 255 : Data Structures CS 255 : Data Structures Math 253 Math 253 Experience with C Programming.
-Global Illumination Techniques
Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
1 Dr. Scott Schaefer Ray Tracing. 2/42 Ray Tracing Provides rendering method with  Refraction/Transparent surfaces  Reflective surfaces  Shadows.
Gene Au-yeung, Daniel Quach, Jeffrey Su, Albert Wang, Jessica Wang, David Woo.
1 Ray-Tracing ©Anthony Steed Overview n Recursive Ray Tracing n Shadow Feelers n Snell’s Law for Refraction n When to stop!

Intro. to Advanced Lighting, Basic Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, April.
COMPUTER GRAPHICS PROJECT ON CUSTOM RAY TRACING ENGINE InterLight3D by Mehshan Mustafa ( ) Muhammad Zaki Shaheen ( )
Reflection and Light Flat Mirrors.
Basic Ray Tracing CMSC 435/634.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Ray Tracing. 2 Introduction OpenGL is based on a pipeline model in which primitives are rendered one at time ­No shadows (except by tricks or multiple.
CS380: Computer Graphics Distributed Ray Tracing TA Course URL:
Ray-tracing.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
11/24/ :45 Graphics II Shadow Maps Reflections Session 5.
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.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
More on Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, April 14, 2004.
RENDERING : Global Illumination
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
Ray Tracing I. Reading Hill, Chapter 14, Sections 14.1 to 14.5 Hill, Chapter 14, Sections and
CS 376 Introduction to Computer Graphics 04 / 13 / 2007 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 04 / 18 / 2007 Instructor: Michael Eckmann.
Review Ray Tracing III Review. Pseudo codes RayCast-1  Plain ray caster (direct illumination) RayCast-2  RayCast-1 + shadow rays RayTrace-1  Recursive.
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
Advanced Computer Graphics

Reflective Shadow Mapping By: Mitchell Allen.
Prof. Harriet Fell Spring 2007 Lecture 26 – March 19, 2007
Prof. Harriet Fell Fall 2011 Lecture 24 – November 2, 2011
Ray Tracer Project CSE 557.
Ray Tracing.
Texture and Shadow Mapping
Image.
Computer Graphics 4Practical Lesson
Computer Graphics 5Practical Lesson
Ray Tracer Project CSE 557.
Frame Buffer Applications
Introduction to Ray Tracing
Presentation transcript:

Ray Tracing TP OpenGL PHAM Trong Tôn WANG Yuanhang

Scene management and display > Scene display workflow.call Scene::draw() in viewer.Scene::draw() scans through QPtrList listObj_.for each Object* obj in listObj_.call obj->draw(), which is a virtual function. draw() of derived class of Object override obj->draw() > Scene loading workflow.load scene file by Scene::loadFromFile.call initFromDOMElement of respective Object.parse xml, set parameter value

Ray casting >ray sphere intersection, algebraic approach.if there is intersection t, the closest positive solution of quadratic function. Rd Ro.otherwise return background Store Pt, t, normal, material and calculated texture mapping in parameter hit P = Ro + t*Rd (P- Po )∙(P- Po )-r^2=0 Pt.Po Call void Viewer::select(int x, int y)

Lighting & Shadow I = I a k a  Light source  Direct reflection  View point Ambient Color Diffuse Color Specular Color + I p k d cosθ+ I p k s (cosα) n

Texture mapping & Anti-aliasing (x,y,z) (u,v) (0,0)1 1 mapping u = 1.0 – θ/2π θ = atan2(x,y) v = 0.5 – α/π α = atan(z/sqrt(x 2 +y 2 ))1111 * Sampling window (n=2)