Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Discrete Ray-casting Algorithm Qiang Xue Jiaoying Shi State Key Lab Of CAD&CG Zhejiang University.

Similar presentations


Presentation on theme: "The Discrete Ray-casting Algorithm Qiang Xue Jiaoying Shi State Key Lab Of CAD&CG Zhejiang University."— Presentation transcript:

1 The Discrete Ray-casting Algorithm Qiang Xue Jiaoying Shi State Key Lab Of CAD&CG Zhejiang University

2 OUTLINES Introduction Fundamentals to Accelerate Volume Rendering Implementation of Discrete Ray- casting Algorithm Results Conclusion

3 Introduction Volume rendering is a computation intensive procedure Solutions for real-time volume rendering: hardware-based and software-based Software-based method uses spatial coherence [1] and inter-view coherence [2] Our method:discrete ray-casting algorithm

4 Fundamentals to Accelerate Volume Rendering Coherence in volume rendering –Coherence in object space –Coherence in image space –Coherence between consecutive image frames

5 Shear-warp factorization Fundamentals to Accelerate Volume Rendering

6 Shear-warp factorization Property 1: Scanlines of pixels in the intermediate image are parallel to scanlines of voxels in the volume data; Property 2: All voxels in a given voxel slice are scaled by the same factor; Property 3: For parallel projection, every voxel slice has the same scale factor, and this factor can be chosen arbitrarily. Fundamentals to Accelerate Volume Rendering

7 Exploiting the inter-view coherence –visible information of two adjacent viewpoints is nearly coherent –In ray-casting method, between consecutive image frames rays forming a pixel share a lot of ray segment –Our idea is to store these shared ray segments when creating one frame and use them to construct new frames Fundamentals to Accelerate Volume Rendering

8 Exploiting the inter-view coherence –Our algorithm pipeline: 1 、 (Preprocessing) In viewpoint k=k 1, compute ray segments set S=S 1. 2 、 Composite rendered image from S. 3 、 If S is available to compute next frame then turn to stage 2 else to stage 1. Fundamentals to Accelerate Volume Rendering

9 Implementation of Discrete Ray- casting Algorithm Discrete Rotation –A rotation can be performed by "shearing" the parallelepiped with discrete units in two axis directions. –Users’ interactions can be viewed as incremental z x y a 

10 Split a Ray into Ray Segments –Ray segments shared between two consecutive frames. –If we store these different levels of ray segment rendering results, we would be able to construct new frames from them promptly. x z Ray segment Voxels View rays Implementation of Discrete Ray- casting Algorithm

11 Rendering Operation –A source-attenuation illumination model is used in the algorithm. –where S is voxel intensity, and M is attenuation coefficient. Implementation of Discrete Ray- casting Algorithm

12 Construct Ray Segment Table –Let R i (x,y,a) denote the rendering result of ray segments sized of 2 i pixels, where x and y are segments’ starting coordinates, and a is the number of shearing units along x-axis. Implementation of Discrete Ray- casting Algorithm

13 Construct Ray Segment Table –Constructing 2D ray segment table R i (x,y,a)=R i-1 (x, y,  a/2  )  R i-1 (x+  a/2 , y+2 i-1,  a/2  ) –3D ray segment tables can be constructed in the similar way.

14 Construct Ray Segment Table Implementation of Discrete Ray- casting Algorithm

15 Complexity Analysis –There are n kinds of discrete rotation degree within [0,  /4] when rotating about one axis. So a number of n 2 kinds of rotation results can be got when rotating about two axes. Implementation of Discrete Ray- casting Algorithm

16 Complexity Analysis –Each rendering result needs constructing O(n 2 ) ray segments, a totally O(n 4 ) computation must be performed to prepare every result for n 2 kinds of view positions. Implementation of Discrete Ray- casting Algorithm

17 Complexity Analysis –On average, a frame can be computed with a complexity of only O(n 2 ), while traditional algorithm requires O(n 3 ). Implementation of Discrete Ray- casting Algorithm

18 Complexity Analysis –The average rendering time t for one frame can be approximated as: where t 1 denotes time needed to construct a frame from ray segments, t 2 is preprocessing time required to refresh the whole ray segments table, and f 2 is its refreshing rate. Implementation of Discrete Ray- casting Algorithm

19 Complexity Analysis –Instead of computing all of the final results in the preprocessing session, we prepare only those ray segments no longer than 2 k voxels. –From these segments, n/2 k ×n/2 k kinds of frames can be constructed, each needs O(n 3 /2 k ) computing time. Implementation of Discrete Ray- casting Algorithm

20 Run-Length Encoding –According Property 1 of the shear- warp space, the volume and image data structures can both be traversed in scanline order. –A run-length encoding of the ray segment scanlines is used. –The encoded scanlines consist of two types of runs, transparent and non-transparent, defined by a user- specified opacity threshold. Implementation of Discrete Ray- casting Algorithm

21 Run-Length Encoding –To take advantage of coherence in the image, we store with each opaque intermediate image pixel an offset to the next non-opaque pixel in the same scanline. Implementation of Discrete Ray- casting Algorithm

22 Run-Length Encoding –The offsets associated with the image pixels are used to skip runs of opaque pixels without examining every pixel. –The pixel array and the offsets form a run-length encoding of the intermediate image which is computed on-the-fly during rendering.

23 Run-Length Encoding –By marching through the ray segment table and the image simultaneously in scanline order we reduce addressing arithmetic. –By using the run-length encoding, we perform work only for segments which are both non- transparent and visible. Implementation of Discrete Ray- casting Algorithm

24 Run-Length Encoding –Scanline composition skip work skip work skip transparent ray segment run non-transparent ray segment run opaque image pixel run non-opaque image pixel run ray segment scanline image scanline compositing Implementation of Discrete Ray- casting Algorithm

25 Results Performance of Discrete Ray- casting algorithm

26 Results Performance comparison between Discrete Ray-casting algorithm and traditional one.

27 Conclusion And Future Work Conclusion – New viewpoint images can be quickly approximated by using rendered ray segments.

28 Conclusion And Future Work Conclusion –We combined this fast approximation with shear-warp factorization to fully exploit the coherences in volume dataset rendering process.

29 Conclusion And Future Work Conclusion –Rendering speed for a 128 3 volume is roughly 0.1 second on a PC platform without specialized hardware.

30 Conclusion And Future Work Future work –To extend our rendering algorithm to support interactive navigation through the 3D dataset. –The discrete ray-casting algorithm parallelizes naturally for MIMD shared-memory multiprocessors.


Download ppt "The Discrete Ray-casting Algorithm Qiang Xue Jiaoying Shi State Key Lab Of CAD&CG Zhejiang University."

Similar presentations


Ads by Google