two major rendering methods rasterization and ray tracing
play

Two Major Rendering Methods: Rasterization and Ray Tracing Sung-Eui - PowerPoint PPT Presentation

Two Major Rendering Methods: Rasterization and Ray Tracing Sung-Eui Yoon ( ) Course URL: http://jupiter.kaist.ac.kr/~sungeui/SGA/ At the Previous Class The overview of the course Main theme: designing scalable graphics/


  1. Two Major Rendering Methods: Rasterization and Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://jupiter.kaist.ac.kr/~sungeui/SGA/

  2. At the Previous Class ● The overview of the course ● Main theme: designing scalable graphics/ geometric algorithms ● Course policy: student presentations and a report at a chosen topic 2

  3. What is Rendering? ● A process that draws an image from model descriptions Simulation & Modelling Image Rendering Computer vision inverts the process 3

  4. Physically-based Rendering ● Generate photo-realistic images based on reality, more precisely, physics hof.povray.org 4

  5. Two Major Rendering Techniques ● Ray tracing ● Main engine for global illumination ● Used for high quality image generations for movies, architectures, etc. ● Rasterization ● Simplified rendering method based on local illumination ● Used for interactive rendering for games ● Accelerated with hardware due to the simplicity of the method 5

  6. Local illumination ● Compute the colors of points on surfaces by considering only local properties ● Position of the point ● Surface properties ● Properties of any light sources that affect it ● No other objects in the scene are considered neither as light blockers nor as reflectors ● Used in OpenGL and DirectX 6

  7. Global Illumination ● I n the real world, light takes indirect paths ● Light reflects off of other materials (possibly multiple objects) ● Light is blocked by other objects ● Light can be scattered ● Light can bend ● Harder to model ● At each point we must consider not only every light source, but and other point that might have reflected light toward it 7

  8. Basic Ray Tracing ● Basic I dea [Whitted 80] ● Cast a ray into the scene from eye through pixels ● Computer a first-intersection and recursively construct reflected/ shadow/ refracted rays ● I sn’t this backwards? ● Light goes from the light sources to the eye ● Why go the other way? ● Ray tracing minus secondary rays usually called “ray casting” 8

  9. Ray Tree e s 2 s 1 f s 0 a d c eye b eye R T s 0 b a R T T R s 1 b s 2 f c e 9

  10. Acceleration Methods ● Render time for a ray tracer depends on the number of ray intersection tests per pixel ● Roughly dependent on the number of primitives in the scene times the number of pixels ● Early efforts focused on accelerating the ray- object intersection tests ● More advanced methods required to make ray tracing practical ● Bounding volume hierarchy ● Spatial partitioning hierarchy 10

  11. Bounding Volumes ● Enclose complex objects within a simple-to- intersect object ● I f the ray does not intersect the simple object then its contents can be ignored ● The likelihood that it will strike the object depends on how tightly the volume surrounds the object. ● Spheres are simple, but not tight ● Axis-aligned bounding boxes often better 11

  12. Bounding Volumes ● Sphere [Whitted80] ● Cheap to compute ● Cheap test ● Potentially very bad fit ● Axis-aligned bounding box ● Very cheap to compute ● Cheap test ● Tighter than sphere 12

  13. Bounding Volumes ● Oriented Bounding Box ● Fairly cheap to compute ● Fairly cheap test ● Generally fairly tight ● Slabs / K-dops ● More expensive to compute ● Fairly cheap test ● Can be tighter than OBB 13

  14. Bounding Volume Hierarchy ● Organize bounding volumes as a tree ● Each ray starts with the scene BV and traverses down through the hierarchy � � � � � � � � � r 14

  15. Spatial Partitioning Hierarchy Idea: Divide space to sub-regions ● Place objects within a sub-region into a list ● Only traverse the lists of sub-regions that the ray passes through ● “Mail-boxing” used to avoid multiple test with objects in multiple regions ● Many types ● Regular grid ● Octree ● BSP tree ● kd-tree 15

  16. kd-trees: overview ● Binary spatial subdivision (special case of BSP tree) ● Split planes aligned on main axes ● I nner nodes: subdivision planes ● Leaf nodes: triangle(s) 16

  17. kd-trees: example 17

  18. kd-trees: example 18

  19. kd-trees: example 19

  20. kd-trees: example 20

  21. What about triangles overlapping the split? kd-trees: example 21

  22. kd-trees: example 22

  23. kd-tree: split planes ● How to select axis & split plane? ● Largest dimension, subdivide in middle ● More advanced: surface area heuristic [Goldsmith and Salmon 87] and other improvements [Reshetov05] ● Makes large difference ● 50% -100% higher overall speedup [Wald04] 23

  24. kd-tree: median vs. SAH (from [Wald04]) 24

  25. Ray Tracing with the kd-tree ● Goal: find closest hit with scene ● Traverse tree front to back (starting from root) ● At each node: ● I f leaf: intersect with triangles ● I f inner: traverse deeper 25

  26. Rasterization ● Standard method for rendering ● Draw all triangles on a raster: T 26

  27. Rasterization: Rendering Pipeline Per- Frame Host Vertex Project & Fragment Rasterize Fragment Buffer Transforms Clip Processing Commands Operations Operations Texture Frame Memory Buffer Display 27

  28. Rasterization ● Advantage: ● Use graphics hardware / GPUs (fast, growing even above Moore’s Law) ● 1-2 orders of magnitude faster than ray tracing ● Disadvantages: ● Local illumination ● Performance ~ linear to # triangles: can we do better? 28

  29. Data Access Pattern ● Streaming or sequential accesses for rasterization ● Object-driven ● Random access for ray tracing ● I mage-driven ● Can we make ray tracing to have streaming data access pattern? 29

  30. What are Issues? ● Massive models ● Hierarchy can take very large (memory and disk) space ● Many lights ● Performance can linearly grow as the number of lights ● Dynamic models ● Need to update hierarchy ● Which one is better between BVH or SPH? ● Controllability ● Can we trade the quality and performance? 30

  31. Homework ● Start choosing a topic that is most interesting to you! ● You can bring your own research to the course ● Reference ● Course homepage ● SI GGRAPH and other papers ● Refer paper collections in the homepage ● Google scholar 31

  32. Next Time.. ● Study culling techniques ● E.g., visibility culling 32

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend