Presentation is loading. Please wait.

# Transformations in Ray Tracing MIT EECS 6.837, Durand and Cutler.

## Presentation on theme: "Transformations in Ray Tracing MIT EECS 6.837, Durand and Cutler."— Presentation transcript:

Transformations in Ray Tracing MIT EECS 6.837, Durand and Cutler

Linear Algebra Review Session Tonight! 7:30 –9 PM MIT EECS 6.837, Durand and Cutler

Last Time:

Today Motivations Transformations in Modeling Adding Transformations to our Ray Tracer Constructive Solid Geometry (CSG) Assignment 2 MIT EECS 6.837, Durand and Cutler

Modeling Create / acquire objects Placing objects Placing lights Describe materials Choose camera position and camera parameters Specify animation.... MIT EECS 6.837, Durand and Cutler

Transformations in Modeling

Today Motivations Transformations in Modeling –Scene description –Class Hierarchy –Transformations in the Hierarchy Adding Transformations to our Ray Tracer Constructive Solid Geometry (CSG) Assignment 2 MIT EECS 6.837, Durand and Cutler

Scene Description

Simple Scene Description File

Class Hierarchy

Why is a Group an Object3D?

Simple Example with Groups

Adding Materials

Adding Transformations

Class Hierarchy with Transformations

Why is a Transform an Object3D?

Simple Example with Transforms

Nested Transforms

Questions? MIT EECS 6.837, Durand and Cutler

Today Motivations Transformations in Modeling Adding Transformations to our Ray Tracer – Transforming the Ray –Handling the depth, t –Transforming the Normal Constructive Solid Geometry (CSG) Assignment 2 MIT EECS 6.837, Durand and Cutler

Incorporating Transforms 1.Make each primitive handle any applied transformations Sphere { center1 0.5 0 radius 2 } 2.Transform the Rays Transform { Translate { 1 0.5 0 } Scale { 2 2 2 } Sphere { center 0 0 0 radius 1 } }

Primitives handle Transforms

Transform the Ray

Transform Ray

Transforming Points & Directions

What to do aboutthe depth, t If Mincludes scaling, direction OS will NOT be normalized 1.Normalize the direction 2.Don't normalize the direction MIT EECS 6.837, Durand and Cutler

1. Normalize direction

2. Don't normalize direction

Questions? MIT EECS 6.837, Durand and Cutler

New component of the Hit class

Why is the Normal important?

Visualization of Surface Normal

How do we transform normals?

Transform the Normal like the Ray?

What class of transforms?

Transformation for shear and scale

More Normal Visualizations

So how do we do it right?

Transform tangent vector v

Comment

Questions? MIT EECS 6.837, Durand and Cutler

Today Motivations Transformations in Modeling Adding Transformations to our Ray Tracer Constructive Solid Geometry (CSG) Assignment 2 MIT EECS 6.837, Durand and Cutler

Constructive Solid Geometry (CSG)

How can we implement CSG?

Collect all the intersections

Implementing CSG

"Fredo'sFirst CSG RaytracedImage"

Questions? MIT EECS 6.837, Durand and Cutler

Today Motivations Transformations in Modeling Adding Transformations to our Ray Tracer Constructive Solid Geometry (CSG) Assignment 2 –Due Wednesday Sept 24th, 11:59pm MIT EECS 6.837, Durand and Cutler

Adding Perspective Camera

Triangle Meshes (.obj)

Acquiring Geometry 3D Scanning (Images removed due to copyright considerations.) MIT EECS 6.837, Durand and Cutler

Next Week: Ray Tracing Surface reflectance MIT EECS 6.837, Durand and Cutler

Similar presentations

Ads by Google