计算机图形学latest05
发布时间:2024-11-28
发布时间:2024-11-28
计算机图形学课件
Global Illumination Techniques
计算机图形学课件
IlluminationLocal Global
计算机图形学课件
Local IlluminationA lighting model is used to determine the shade of a point on a surface using the position, orientation and characteristics of the surface and the light source(s) illuminating it. A typical lighting model consists of three seperate components ambient, diffuse and specular.
计算机图形学课件
Whitted Ray Tracing Model
Light transport
Image synthesis
计算机图形学课件
RaytracingFor each sample …Construct ray from eye position through view plane Find first surface intersected by ray through pixel Compute color sample based on surface radiance, which is illuminated by light source directly and by environment indirectly(?)
计算机图形学课件
Raytracingfor each eye ray
Shadow rays
Reflection ray
Transmitted ray
计算机图形学课件
Ray Tracing the eye, through each pixel, and Cast rays out fromdetermine what they hit first Builds the image pixel by pixel, one at a time Cast additional rays from the hit point to determine the pixel color Shadow rays toward each light. If they hit something, then the object is shadowed from that light, otherwise use “standard” model for the light Reflection rays for mirror surfaces, to see what should be reflected in the mirror (ideally specular reflection) Transmission rays to see what can be seen through transparent objects (ideally refraction) Sum all the contributions to get the pixel color
计算机图形学课件
Ray TracingLighting calculation
计算机图形学课件
Ray Tracing - Explanation
计算机图形学课件
RaytracingExamples --- first reflections
计算机图形学课件
RaytracingExamples --- two recursions
计算机图形学课件
RaytracingExamples --- six recursions
计算机图形学课件
Ray TracingTermination conditions: Intersected with light Escaped out of the scene Reached the maxmum recursive number I r , I T has been small than a given threshold
计算机图形学课件
Raytracing ImplementationRaytracing breaks down into two tasks:Constructing the rays to cast Intersecting rays with geometry
The former problem is simple vector arithmetic The intersection problem arises in many areas of computer graphicsCollision detection Other rendering algorithms
Intersection is essentially root finding (as we will see)Any root finding technique can be applied
计算机图形学课件
Constructing RaysDefine rays by an initial point and a direction: x(t)=x0+td Eye rays: Rays from the eye through a pixel Construct using the eye location and the pixel’s location on the image plane. x0=eye Shadow rays: Rays from a point on a surface to the light. x0=point on surface Reflection rays: Rays from a point on a surface in the reflection direction Construct using laws of reflection. x0=surface point Transmitted rays: Rays from a point on a transparent surface through the surface Construct using laws of refraction. x0=surface point
计算机图形学课件
Ray-Object Intersections
Aim: Find the parameter value, ti, at which the ray first meets object i Transform the ray into the object’s local coordinate system Makes ray-object intersections generic: ray-sphere, rayplane, … Write the surface of the object implicitly: f(x)=0 Unit sphere at the origin is x
x-1=0 Plane with normal n passing through origin is: n x=0 Put the ray equation in for x Result is an equation of the form f(t)=0 where we want t Now it’s just root finding