Hardware-accelerated Point-based Rendering of Surfaces and Volumes Eduardo Tejada, Tobias Schafhitzel, Thomas Ertl Universität Stuttgart, Germany Motivation Point-bases Surfaces No explicit connectivity or topology information. Easy manipulation (modeling). Easy serializability. Compact storing. Point Set Surfaces (Alexa et al., 2003). Smooth surfaces. Low-frequency noise handling. User-defined minimum feature size. Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 2 Motivation Graphics hardware new capabilities. Shader Model 3: Dynamic flow control. Floating-point textures (also as RT). Numerical algorithms on the GPU. Ray-tracing PSS slow on the CPU: on the GPU? Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 3 Point-based Rendering p i 1 pi 2 pi Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 4 Point-based Rendering ni n i 1 ni p i 1 pi 2 pi Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 5 Point-based Rendering ni n i 1 ni p i 1 pi 2 pi Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 6 Our Method - Idea Normal vectors: covariance analysis ni n i 1 ni p i 1 pi 2 pi Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 7 Our Method - Idea Polynomial approximation: MLS. ni pi 2 p i 1 pi gi A x B y Ci xi yi Di 2 i i 2 i i Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 8 Our Method - Idea g i 1 p i 1 pi 2 pi gi Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 9 Our Method - Idea g i 1 p i 1 gi 2 pi 2 pi gi Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 10 Our Method - Idea g i 1 p i 1 gi 2 pi 2 pi gi Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 11 Our Method - Textures Texture positions g i 1 p i 1 gi 2 pi 2 pi gi Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 12 Our Method - Textures Texture positions pi p i 1 pi 2 Texture neighbors (1) (1) (1) i i 1 i 2 n n n n (1) i2 n ( 2) i2 n ( 3) i2 Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 13 Our Method – Pre-processing (Render Pass) Texture positions pi p i 1 pi 2 Texture base_a a i a i 1 a i 2 Texture base_b Render a single quad of size equal to texture bi b i positions’ 1 bi 2 For each fragment 1. Calculate texture coordinates Texture base_c Texture neighbors n i(1) n i(2.1)1 Access ni(1)2 positions and neighborsc i ci 1 c i 2 3. Estimate normal (n) with covariance analysis Texture c polynomial 4. Create local system {a, b, c}, where =n 5. Transform neighbors positions to gi local g i 1system gi 2 6. Calculate local approximation gi (A, B, C, D) Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 14 Our Method – Rendering (First Render Pass) Texture base_a a i a i 1 a i 2 Texture base_b bi b i 1 bi 2 Texture base_c c i ci 1 c i 2 Texture polynomial gi g i 1 gi 2 Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 15 Our Method – Rendering (First Render Pass) Texture base_a a i a i 1 a i 2 Texture intersection x0 x1 x 2 Texture base_b aligned disc for each pi bi Render b i 1 bai viewport 2 Texture normal For each fragment of point pi 1. Fetch texture coordinates m 0 m1 m 2 Texture base_c the base {ai, bi, ci} and polynomial gi c i ci 1 2.c i Fetch 2 3. Transform the ray to the base {ai, bi, ci} Texture polynomial 4. Find intersection of the ray with gi the normal (derivative of gi) gi g i 1 5.giCalculate 2 6. Write intersection, normal and depth Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 16 Results – First Intersection 28 fps 20 fps Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 17 Our Method – Introducing Refraction Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 18 Our Method – Introducing Refraction Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 19 Our Method – Introducing Refraction Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 20 Our Method – Introducing Refraction Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 21 Our Method – Introducing Refraction Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 22 Our Method – Introducing Refraction Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 23 Our Method – Introducing Refraction Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 24 Our Method – Introducing Refraction Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 25 Our Method – Introducing Refraction Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 26 Our Method – Buckets Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 27 Our Method – Buckets Texture pointers z k z k 1 z k 2 Texture buckets r000 r100 r200 Texture positions pi p i 1 pi 2 Texture neighbors (1) (1) (1) i i 1 i 2 n n n r200 r201 r202 Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 28 Our Method – Rendering (Iterative Render Pass) Texture buckets r000 r100 r200 Texture pointers Texture current_position P0 P1 P2 z k zRender k 1 z k 2 Texture current_direction a single quad covering the viewport Forbase_a each fragment Texture D0 D1 D 2 a i a i 1 a i 2 1. Fetch the points in the cell. Texture base_b 3. Find the nearest intersectionTexture current_cell bi b i 1 b i 2 4. If an intersection is found B 0 B1 B 2 Texture base_c4.1 Update position, direction and color Texture accumulated_color c i ci 1 c i 2 5. Otherwise determine next cell. Texture polynomial C0 C1 C2 gi g i 1 gi 2 Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 29 Results – Shadows 10 fps Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 30 Results – Refraction 1.33 fps 2.16 fps Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 31 Results – Multiple Indices of Refraction 0.25 fps 0.22 fps Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 32 Our Method – Introducing Volumetric Effects Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 33 Results – Volumetric Effects 1.08 fps 0.96 fps Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 34 Conclusion We do not use specialized HW (e.g. Wald and Seidel). Neighbors search on the GPU not solved. Kd-trees better than grid for ray-intersection, but for neighbors search? Future: full PSS computation. Eduardo Tejada - Hardware-accelerated point-based rendering of surfaces and volumes 35 Questions?