中国高校课件下载中心 》 教学资源 》 大学文库

清华大学:《计算机图形学基础》课程教学资源(授课教案)光线跟踪加速方法

文档信息
资源类别:文库
文档格式:PDF
文档页数:66
文件大小:997.81KB
团购合买:点击进入团购
内容简介
清华大学:《计算机图形学基础》课程教学资源(授课教案)光线跟踪加速方法
刷新页面文档预览

Ray Tracing Acceleration(光线跟踪加速) • Ray Tracing – As we mentioned in previous course, ray tracing is one of the most important techniques in computer graphics. Using ray tracing techniques, we could generate impressive images including a lot of visual effects, such as hard/soft shadows, transparence(透明), translucence(半透明), reflection, refraction, texture and so on

Recursive Ray Tracing

Recursive Ray Tracing IntersectColor( vBeginPoint, vDirection) { Determine IntersectPoint; Color = ambient color; for each light Color += local shading term; if(surface is reflective) color += reflect Coefficient * IntersectColor(IntersecPoint, Reflect Ray); else if ( surface is refractive) color += refract Coefficient * IntersectColor(IntersecPoint, Refract Ray); return color; }

• Effects of ray tracing

Ray Tracing Acceleration • Motivation (Limitation of ray tracing) – The common property of all ray tracing techniques is their high time and space complexity.(时空复杂性高) – They spend much time repeatedly for visibility computations, or doing ray object intersection testing(主要时间用于可见性计算和求交测试)

Ray Tracing Acceleration • How to accelerate? – We will look at spatial(空间的) data structures • Hierarchical (层次性) Bounding Volumes (包围盒) • Uniform Grids (均匀格点) • Quadtree/Octree (四叉树/八叉树) • K-d tree / BSP tree (空间二分树) – Good spatial data structures could speed up ray tracing by 10-100 times

Ray Intersection – Given a model, and a ray direction, as shown in the right figure, how to test whether the ray intersect with the model, and how to compute where the intersection point is?

Ray Intersection • Brute Force method – However, this brute force method is costly, needs O(n) time complexity, n is the number of triangles boolean IsIntersect(Ray r, Model m) For each triangle t in m if IsIntersect(t,r) return true End For return false

Bounding Volumes(包围盒) • Wrap(包住) things that are hard to test for intersection in things that are easy to test – Example: wrap a complicated triangle mesh in a box – Ray can’t hit the real object unless it hits the box – Adds some overhead, but generally pays for itself • Most common bounding volume types: – bounding box(包围盒) and bounding sphere(包围球) – bounding box could be axis-aligned(和坐标轴平行) or not

Bounding Volumes(包围盒) • Bounding Volume Examples – Before test ray/object intersect, First test the ray for an intersection with the bounding volume: • If the ray does not intersect with the bounding volume, the ray would not intersect with the object. (Easy reject) • If intersected, further test ray/object intersection

刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档