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

RayTracingAcceleration(光线跟踪加速·RayTracing- As we mentioned in previous course, ray tracingis one of the most important techniques incomputer graphics. Using ray tracing techniques.we could generate impressive images including alot of visual effects, such as hard/soft shadows,transparence(透明),translucence(半透明)reflection, refraction, texture and so on
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

Recursive Ray TracingIntersectcolor( vBeginPoint, vDirection){Determine IntersectPoint;Color = ambient color;for each lightColor += local shading term;if(surface is reflective)color += reflect Coefficient *IntersectColor(IntersecPoint, Reflect Ray);else if ( surface is refractive)refract Coefficient *color +=IntersectColor(IntersecPoint, Refract Ray);return color;1
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
• Effects of ray tracing

Ray Tracing Acceleration. Motivation (Limitation of ray tracing- The common property of all ray tracingtechniques is their high time and spacecomplexity.(时空复杂性高)- They spend much time repeatedly for visibilitycomputations, or doing ray object intersectiontesting(主要时间用于可见性计算和求交测试)
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(层次性)BoundingVolumes(包围盒·UniformGrids(均匀格点)·Quadtree/Octree(四叉树/八叉树)·K-dtree/BSPtree(空间二分树)- Good spatial data structures could speed up raytracing by 10-100 times
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

RayIntersection- Given a model, and a ray direction, as shown inthe right figure, how to test whether the rayintersect with the model.and how to compute wherethe intersection pointis?
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 IntersectionBrute Force methodbooleanIslntersect(Ray r,Modelm)Foreachtriangletin mif IsIntersect(t,r)return trueEndForreturn false-However,thisbruteforce method is costlyneeds O(n) time complexity, n is thenumberoftriangles
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

BoundingVolumes(包围盒)· Wrap(包住) things that are hard to test forintersection 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(包围球)一boundingboxcouldbe axis-aligned(和坐标轴平行)ornot
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

BoundingVolumes(包围盒)·Bounding Volume Examplesbounding- Before test ray/objectsphereintersect, First test theray for an intersectionwith the bounding volume:non-aligned: If the ray does not intersectboundingboxwith the bounding volume,axis-alignedtheraywould not intersect withthe objectboundingbor(Easy reject). If intersected, further test ray/objectintersection
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
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)B样条曲线曲面.pdf
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)网格参数化模型切割的骨架算法.pdf
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)网格模型、网格细分和简化.pdf
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)参数曲线曲面、Bezier曲线、Bezier曲面.pdf
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)光线跟踪,递归算法,光线求交.pdf
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)双向反射分布函数.pdf
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)视图模型变换.pdf
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)图形学简介.pdf
- 清华大学:《计算机图形学基础》课程教学大纲 Fundamental of Computer graphics(负责人:胡事民).pdf
- 揭阳职业技术学院:《Photoshop制图》课程授课教案.pdf
- 揭阳职业技术学院:《计算机应用基础》课程授课教案.pdf
- 揭阳职业技术学院:《图像处理》课程授课教案.pdf
- 揭阳职业技术学院:《办公自动化》课程授课教案.pdf
- 揭阳职业技术学院:《程序设计基础》课程授课教案.pdf
- 揭阳职业技术学院:《物联网》课程授课教案.pdf
- 揭阳职业技术学院:《计算机应用基础》课程授课教案.pdf
- 揭阳职业技术学院:《Linux操作系统》课程教学资源(实验教案,共十八个).pdf
- 南京航空航天大学:《程序设计》课程教学课件(PPT讲稿,二)Chapter 8-标准模板库STL.ppt
- 南京航空航天大学:《程序设计》课程教学课件(PPT讲稿,二)Chapter 7-模板.ppt
- 南京航空航天大学:《程序设计》课程教学课件(PPT讲稿,二)Chapter 6-异常处理.ppt
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)纹理映射.pdf
- 清华大学:《计算机图形学基础》课程教学资源(授课教案)阴影 Shadow.pdf
- 清华大学:《计算机图形学基础》课程教学资源(试卷习题)图形学基本概念题解答.pdf
- 清华大学:《计算机图形学基础》课程教学资源(试卷习题)B样条曲线习题解答.pdf
- 清华大学:《计算机图形学基础》课程教学资源(试卷习题)Bezier曲线习题解答.pdf
- 清华大学:《计算机图形学基础》课程教学资源(试卷习题)真实感图形学习题解答.pdf
- 清华大学:《计算机图形学基础》课程教学资源(试卷习题)模拟试题及答案(一).pdf
- 清华大学:《计算机图形学基础》课程教学资源(试卷习题)模拟试题及答案(二).pdf
- 清华大学:《计算机图形学基础》课程教学资源(试卷习题)模拟试题及答案(三).pdf
- 《Java程序设计》课程教学课件(PPT讲稿)第1章 计算机、程序和Java概述.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第2章 基本程序设计.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第3章 选择.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第4章 循环.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第5章 方法.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第6章 一维数组.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第7章 多维数组.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第8章 对象和类.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第9章 字符串和文本I/O.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第10章 关于对象的思考.ppt
- 《Java程序设计》课程教学课件(PPT讲稿)第11章 继承和多态.ppt
