New Reliable Algorithm of Ray Tracing. through Hexahedral Mesh

Similar documents
Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Accelerated Ambient Occlusion Using Spatial Subdivision Structures

Lecture 11: Ray tracing (cont.)

The Generalized Stability Indicator of. Fragment of the Network. II Critical Performance Event

Mesh Repairing and Simplification. Gianpaolo Palma

Disconnection Probability of Graph on Two Dimensional Manifold: Continuation

782 Schedule & Notes

Spatial Data Structures

Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

Spatial Data Structures

Spatial Data Structures

kd-trees for Volume Ray-Casting

2) For any triangle edge not on the boundary, there is exactly one neighboring

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

A Computational Study on the Number of. Iterations to Solve the Transportation Problem

Topics. Ray Tracing II. Transforming objects. Intersecting transformed objects

Regular Pentagon Cover for Triangles. of Perimeter Two

A Density Estimation Technique for Radiosity

Effects needed for Realism. Ray Tracing. Ray Tracing: History. Outline. Foundations of Computer Graphics (Spring 2012)

B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes

Buffon Type Problems in Archimedean Tilings II

Intersection Acceleration

CPSC GLOBAL ILLUMINATION

Real Time Ray Tracing

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

Accelerating Ray-Tracing

Computer Graphics Ray Casting. Matthias Teschner

Ray Tracing I. History

Vertex Graceful Labeling of C j C k C l

Rainbow Vertex-Connection Number of 3-Connected Graph

Ray Tracing Acceleration. CS 4620 Lecture 20

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics

A Data Dependent Triangulation for Vector Fields

A Comparative Study on Optimization Techniques for Solving Multi-objective Geometric Programming Problems

Lecture notes: Object modeling

Shell: Accelerating Ray Tracing on GPU

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Geometry Vocabulary. acute angle-an angle measuring less than 90 degrees

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

An Interactive System for Heterogeneous 3D Volumetric Data Visualization

Fast Texture Based Form Factor Calculations for Radiosity using Graphics Hardware

Lecture 2 - Acceleration Structures

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Moore Catholic High School Math Department

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Acceleration Data Structures

Effects needed for Realism. Computer Graphics (Fall 2008) Ray Tracing. Ray Tracing: History. Outline

Research Article Polygon Morphing and Its Application in Orebody Modeling

Ray Tracing I. Internet Raytracing Competition

Determining Differences between Two Sets of Polygons

Interactive Isosurface Ray Tracing of Large Octree Volumes

Rectilinear Crossing Number of a Zero Divisor Graph

The Number of Fuzzy Subgroups of Cuboid Group

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

Spatial Data Structures

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Spatial Data Structures

Stackless Ray Traversal for kd-trees with Sparse Boxes

Introduction to C omputational F luid Dynamics. D. Murrin

improving raytracing speed

The Traditional Graphics Pipeline

Shading Techniques Denbigh Starkey

Indirect Volume Rendering

COMP 175 COMPUTER GRAPHICS. Ray Casting. COMP 175: Computer Graphics April 26, Erik Anderson 09 Ray Casting

Unit 1, Lesson 1: Moving in the Plane

Prime Time (Factors and Multiples)

Ray Tracing Acceleration Data Structures

An angle that has a measure less than a right angle.

The Traditional Graphics Pipeline

Design Intent of Geometric Models

Ray Tracing Acceleration. CS 4620 Lecture 22

Data Representation in Visualisation

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

Design Intent of Geometric Models

Collision Detection based on Spatial Partitioning

The Traditional Graphics Pipeline

Point Cloud Collision Detection

Soft Shadows: Heckbert & Herf. Soft shadows. Heckbert & Herf Soft Shadows. Cornell University CS 569: Interactive Computer Graphics.

Heronian Mean Labeling of. Disconnected Graphs

Hyperbola for Curvilinear Interpolation

Digits. Value The numbers a digit. Standard Form. Expanded Form. The symbols used to show numbers: 0,1,2,3,4,5,6,7,8,9

Graceful Labeling for Some Star Related Graphs

Ennumeration of the Number of Spanning Trees in the Lantern Maximal Planar Graph

Point Cloud Filtering using Ray Casting by Eric Jensen 2012 The Basic Methodology

Heronian Mean Labeling of Graphs

Mathematics Concepts 2 Exam 1 Version 4 21 September 2018

CS 465 Program 5: Ray II

Manipulating the Boundary Mesh

9. Three Dimensional Object Representations

Spiral Back: Evaluate the following when x = -2 and y = 3 1) -4y x + (3+ x 2 ) Solve the following equations: 2) x 6 = -20 3) 2x 2 = -16 4)

A Compact Cell Structure for Scientific Visualization

More Hidden Surface Removal

RACBVHs: Random Accessible Compressed Bounding Volume Hierarchies

ON THE EMPTY CONVEX PARTITION OF A FINITE SET IN THE PLANE**

Grid Creation Strategies for Efficient Ray Tracing

Scientific Visualization Example exam questions with commented answers

Transcription:

Applied Mathematical Sciences, Vol. 8, 2014, no. 24, 1171-1176 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/10.12988/ams.2014.4159 New Reliable Algorithm of Ray Tracing through Hexahedral Mesh R. P. Koptelov Ural Federal University 19 Mira St., Ekaterinburg, 620002, Russia A. V. Lapteva Ural Federal University 19 Mira St., Ekaterinburg, 620002, Russia Copyright 2014 R. P. Koptelov and A. V. Lapteva. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Abstract It is shown that some rays loss if the standard method of ray tracing with non uniform mesh is used. A new method is proposed which solves that problem of loosed rays. The method is slightly faster than the standard one. Keywords: ray tracing, mesh, hexahedron 1. Introduction Ray tracing is one of the most known methods for computation of light radiosity [4] or radiative heat rate [7]. Ray tracing is very time consuming therefore geometrical data structure is always used to accelerate the process. Such data structure may be kd-tree, Bounding Volume Hierarchy, uniform or hierarchical grid (mesh), see classic book [4] or modern review [11]. One separate data structure is non uniform mesh which is an approximation of initial model geometry. Last time an interest to using non uniform mesh is increased [3,6,8,9], but ray tracing methods for this data structure are not advanced.

1172 R. P. Koptelov and A. V. Lapteva There are several algorithms of ray tracing with uniform mesh (see the review [2]) differ in finding next cell and in calculation type (real or integer), but unfortunately they can t be applied for non uniform mesh. 2. Meshes used in the study Three meshes were used for tests in this study (fig. 1): a) Uniform cubic mesh a cube with 10 cells along all directions. Cells vertices are generated as follows: x = i; y = j; z = k. b) Oblique-angled uniform mesh with 10 cells along all directions. Cells vertices are generated as follows: x = i + 0.15j + 0.15k; y = j; z = k. Value 0.15 is chosen unconditionally and has no importance in the study. c) Non uniform mesh approximation of half of cylinder with longitudinal hole. This mesh with 14x29x11 cells was built in Gambit program. FIg. 1 Used meshes, ix, iy, iz directions of increasing i,j,k respectively 3. Standard ray tracing with non uniform hexahedral mesh Standard ray tracing is the following: for current cell ray-face intersections are tested until intersected face is not found [7] outlet face. Inlet face is not considered. In first ray-plane intersection point is calculated and then point in quadrilateral test is executed [1]. Quadrilateral is represented by intersection of four halfplanes. If point belongs to all four halfplanes then it belongs to the quadrilateral too [5]. Another way to bisect the quadrilateral into two triangles

New reliable algorithm of ray tracing 1173 [7] and to execute ray-triangle intersection tests [10]. In other relevant works [6,8,9] only tetrahedral mesh is used. Described standard method was applied to three meshes at fig. 1. Rays were traced such that each ray was started and finished at centers of two different boundary faces. It was found that ray can travel very close or exactly through an edge between two cells or through a vertex between eight cells. In this cases no faces intersected by the ray is found due to calculation errors. In other words algorithm reports that ray doesn t exit from any face of current cell and further tracing is impossible. So, some rays are loosed. Number of loosed rays for various meshes is shown in table 1. Table 1. Rays loosing with standard ray tracing Mesh Traced rays Loosed rays a 179700 24708 (13.8 %) b 179700 22758 (12.7 %) c 1197378 42 (0.0035 %) Obvious way is to introduce a tolerance in point in quadrilateral test, i.e. virtually expand faces, but as shown further this doesn t solve the problem. Suppose it is needed to determine outlet face for cell C1 (fig. 2a). If face 2 is tested first then face 2 becomes outlet face and at the next step outlet face for cell C2 will be searched. But face 4 is not intersected by the ray, so ray tracing fails even with introduced tolerance. Another case is shown at fig. 2b: ray passes face 3 and goes into C3. Ray-face intersections against faces 4,5,6 is initiated. If face 4 is tested first then algorithm will report that ray outs through face 4 fail case. Summary, introduced tolerance is not a solution of loosing rays problem. FIg. 2 2D illustration of various ray loosing cases

1174 R. P. Koptelov and A. V. Lapteva 5 New reliable ray tracing algorithm without ray loosing Let first remember standard ray-plane intersection algorithm [1]: 1) Let one has line equation x r = O + tr with O - point at the line, R - direction vector; and plane equation N x p + D = 0 with N - plane normal vector, D - distance from the plane to the origin. 2) Test that line is not parallel to the plane: z = R N > ε, ε - tolerance. 3) Calculate distance from O to intersection point at the plane: t p = ( D + O N ) / z. 4) Calculate intersection point in Cartesian coordinates: x = O + t R. Basic idea of proposed reliable method: if no intersected faces were found forcibly choose the face with minimum distance from O. But this is not enough, for example, if current cell is C3 (fig. 2b), then among faces 4, 5 and 6 face 4 is the nearest. Plane of face 4 is even closer to O than plane of face 3. Therefore solution is to take into account faces orientation. Let all faces are oriented outside of the current cell (fig. 2c). Then only faces that have acute angle between ray and their normal vectors ( R N > 0 ) have to be tested. If no intersection is found choose the face with minimum distance from O among faces with R N > 0. Proposed method is applied to ray tracing through three meshes (fig. 1) and no rays were loosed. Normal vectors are precomputed and stored separately for each cell to accelerate ray tracing. In proposed algorithm ray-face intersection point calculation and point in quadrilateral test are not mandatory. Both algorithms are reliable and have similar performance. Performance of three ray tracing methods (standard, new one with calculation of ray-face intersection point and new one without calculation of ray-face intersection point) is shown in table 2. Table 2. Ray tracing time Time, sec Mesh New method Standard With calculation of Without calculation of method intersection point intersection point a 1.0741 1.1828 1.2238 b 1.1089 1.18 1.2018 c 9.87 9.32 9.18 p

New reliable algorithm of ray tracing 1175 Standard method shows the smallest time for meshes a and b because for loosen rays (13.8 % and 12.7 %) tracing was performed only partially. If all rays are traced properly then standard method may give more time by values 13.8 % and 12.7 %, i.e. 1.22 and 1.25 sec respectively more than those of new method. New method with calculation of intersection point is faster than new method without calculation of intersection point for meshes a and b, and is slower for mesh c. Advantage of the first variant is that process is stopped as soon as first face is intersected by the ray, other faces are rejected. Advantage of the second variant is that Cartesian coordinates of intersection point and point in quadrilateral test are rejected. 6. Conclusions Khown methods of ray tracing through uniform mesh cannot be applied for non uniform mesh, and standard method of ray tracing through non uniform mesh leads to problem of loosen rays if ray travels very close or exactly through an edge between two cells or through a vertex between eight cells. New reliable ray tracing method is proposed that ensures right tracing of all rays through non uniform mesh: 1) For each cell all faces are oriented outside of the current cell. 2) Only faces having acute angle between ray and their normal vectors have to be tested. 3) If no intersected faces were found forcibly choose the face with minimum distance from ray start. Normal vectors are precomputed and stored separately for each cell to accelerate ray tracing. Possible subject for future work is saving storage space. References [1] D. Badouel. An Efficient Ray-Polygon Intersection. In A. Glassner, editor, Graphics Gems I, pages 390-393. Academic Press, 1990. [2] B. Cosenza. A survey on exploiting grids for ray tracing. Eurographics Italian Chapter Conference, 2008, pp. 89-96. [3] J. Favre, R. Lohner. Ray tracing with a space-filling finite element mesh». International journal for numerical methods in engineering, 1994, 37, pp. 3571-3580.

1176 R. P. Koptelov and A. V. Lapteva [4] A.S. Glassner. An introduction to ray tracing, Academic Press, 1989. [5] E. Haines, Point in Poligon Strategies. In P.S. Heckbert, editor, Graphics Gems IV, pp. 24-46. Academic Press, 1995. [6] A. Lagae, P. Dutre. Accelerating ray tracing using constrained tetrahedralizations. Eurographics Symposium on Rendering, 2008, 27(4), pp. 1303-1312. [7] S. Mazumder. Methods to accelerate ray tracing in the Monte Carlo method for surface-to-surface radiation transport. Trans. ASME. J. Heat Transfer, 2008, Vol: 128, No: 9. [8] G. Marmitt, P. Slusallek. Fast ray traversal of unstructured volume data using Plucker tests. Technical report. Computer Graphics Lab, Saarland University, 2005. [9] G. Marmitt, P. Slusallek. Fast ray traversal of tetrahedral and hexahedral meshes for direct volume rendering. Eurographics IEEE-VGTC Symposium on Rendering, 2006. [10] T. Müller and B. Trumbore, Fast, Minimum Storage Ray-Triangle Intersection, Journal of Graphics Tools, 1997, pp.22-28. [11] I. Wald, W.R. Mark, J. Gunther, S. Boulos, T. Ize et al. State of the Art in Ray Tracing Animated Scenes Computer graphics forum, 2009, 28(6) pp. 1691-1722. Received: January 31, 2014