1 / 30

The Discrete Ray-casting Algorithm

The Discrete Ray-casting Algorithm. Qiang Xue Jiaoying Shi State Key Lab Of CAD&CG Zhejiang University. OUTLINES. Introduction Fundamentals to Accelerate Volume Rendering Implementation of Discrete Ray-casting Algorithm Results Conclusion. Introduction.

thuraya
Download Presentation

The Discrete Ray-casting Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. Fundamentals to Accelerate Volume Rendering • Shear-warp factorization

  6. Fundamentals to Accelerate Volume Rendering • 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.

  7. Fundamentals to Accelerate Volume Rendering • 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

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

  9. z a x y  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

  10. Ray segment Voxels View rays z x Implementation of Discrete Ray-casting Algorithm • 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.

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

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

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

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

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

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

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

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

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

  20. Implementation of Discrete Ray-casting Algorithm • 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.

  21. Implementation of Discrete Ray-casting Algorithm • 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.

  22. Implementation of Discrete Ray-casting Algorithm • 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. Implementation of Discrete Ray-casting Algorithm • 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.

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

  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 1283 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.

More Related