Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese...
-
Upload
selena-stickles -
Category
Documents
-
view
214 -
download
0
Transcript of Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese...
![Page 1: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/1.jpg)
Spherical Maps with the Near-Equal Solid-Angle
Property
Liang WanTien-Tsin Wong
The Chinese University of Hong Kong
![Page 2: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/2.jpg)
2
Spherical Maps
Represent the surrounding environment
Applications Environment mapping Precomputed radiance transfer (PRT) Image-based relighting …
Spherical maps Cubemap, longitude/latitude map, dual
paraboloid map, sphere map, …
![Page 3: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/3.jpg)
3
Criteria Uniform distribution
How uniformly the samples are distributed? Equal-area property
Whether the texels span the same solid-angle Stretch
Measure the mapping distortion of texel shapes Query efficiency
Speed of querying a point in the map Base face number
6-face map fits nicely into the hardware
![Page 4: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/4.jpg)
4
Cubemap Properties
6 base faces Fast look-up Hardware cubemap
Drawbacks Not uniformly distributed Not equal-area Distortion at corners
![Page 5: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/5.jpg)
5
Three Spherical Maps
RhombicdodecahedronHEALPix Isocube
Equal-area Similar distortion
Six-face,Equal-area
![Page 6: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/6.jpg)
6
Base Faces
Isocube
Cubemap HEALPix
6 12
12 6
Rhombicdodecahedron
![Page 7: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/7.jpg)
7
Sample Distribution
Rhombicdodecahedron
Isocube
Cubemap HEALPix
Uneven sampli
ng
![Page 8: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/8.jpg)
8
Rhombicdodecahedron
Shape Distortion
Isocube
Cubemap HEALPix
Shapedistorti
on
Similar distorti
on
Not equal-area
Quadrilateral
![Page 9: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/9.jpg)
9
Property Summary
Cubemap HEALPixRhombic
Dodecahedron Isocube
Base facenumber
6 12 12 6
UniformDistribution
Uneven Even Fair Even
Equal-area property
Not equal Equal Near Equal
Texelshape
Quad. Quad. Quad. Quad./ Tri.
Base PolyhedronSpherical
partitioningPolyhedron
Spherical
partitioning
![Page 10: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/10.jpg)
10
Property Summary
Cubemap HEALPixRhombic
Dodecahedron Isocube
Base facenumber
6 12 12 6
UniformDistribution
Uneven Even Fair Even
Equal-area property
Not equal Equal Near Equal
Texelshape
Quad. Quad. Quad. Quad./ Tri.
Base PolyhedronSpherical
partitioningPolyhedron
Spherical
partitioning
![Page 11: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/11.jpg)
11
HEALPix Construction Originated in astrophysics
Curvilinear partitioning of the sphere
3/2z kz 4
3
22
1
lz 4
3
22
1
lk,2
ktz 13
ltz 113
![Page 12: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/12.jpg)
12
HEALPix Mapping01 float3 hpmap(float3 dir)02 {03 float fn, u, v, iu, iv, x, y, z, t;04 float tt, tn, tf, za, tmp, zone, south;06 float3 res;0708 x=dir.x; y=dir.z; z=dir.y;09 t = atan2(-y, x)/1.571; 10 t += step(t, 0.f) * 4.0; 11 za = 3.0 * abs(z);12 tf = modf(t, tn);13 // Equatorial or polar zone15 if ( za < 2.0 ) {16 // Equatorial zone 17 tt = t + 0.5; 18 tmp= z * 0.75; 19 u = modf(tt + tmp, iu);20 v = modf(tt - tmp, iv);21 fn = min(iu, iv);22 fn+= 4 + (sign(iv-iu) - floor(fn/4))*4; 23 res= float3(fn, u, v);24 } else { 25 // Polar zone26 tmp= sqrt(3.0f - za); 27 // If in south pole zone28 south = ( z < 0 );29 tt = tmp * tf;30 tmp= 1.0 - tmp;31 tf = tmp * south;32 res= float3(tn+8*south, tmp-tf+tt, tf+tt);33 }34 return res;35 }
![Page 13: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/13.jpg)
13
HEALPix Characteristics
Equal area A hierarchical structure Samples on parallel small circles Facilitate spherical harmonic transform
Drawback Texels in different base faces have different
shapes
![Page 14: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/14.jpg)
14
Property Summary
Cubemap HEALPixRhombic
Dodecahedron Isocube
Base facenumber
6 12 12 6
UniformDistribution
Uneven Even Fair Even
Equal-area property
Not equal Equal Near Equal
Texelshape
Quad. Quad. Quad. Quad./ Tri.
Base PolyhedronSpherical
partitioningPolyhedron
Spherical
partitioning
![Page 15: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/15.jpg)
15
Rhombic Dodecahedron Construction Great circle subdivision
10 5
8
69 10
11
27 3
4
![Page 16: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/16.jpg)
16
Rhombic Dodecahedron
Characteristics All texels are distorted similarly Identical base faces Geodesic property
![Page 17: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/17.jpg)
17
HEALPix & Rhombic Dodecahedron Drawbacks
Both consist of 12 base faces Tailor-made programs for texture lookup Difficult for mipmap construction and tri-linear filter
ing
What we desire? 6 faces so as to fully utilize the hardware cubemap Retain good properties
![Page 18: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/18.jpg)
18
Property Summary
Cubemap HEALPixRhombic
Dodecahedron Isocube
Base facenumber
6 12 12 6
UniformDistribution
Uneven Even Fair Even
Equal-area property
Not equal Equal Near Equal
Texelshape
Quad. Quad. Quad. Quad./ Tri.
Base PolyhedronSpherical
partitioningPolyhedron
Spherical
partitioning
![Page 19: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/19.jpg)
19
Isocube Construction Spherical partitioning
3/2z 2/12
k
)12(3
2 lz
zk 13/2
2
3
41 lz
![Page 20: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/20.jpg)
20
Isocube Mapping01 float3 R2Q( float3 R )02 { 03 float2 I;04 float3 Q;05 float4 coef;06 float phi, y, ya, bequ,quar;0708 // Compute azimuth angle and convert it in the range [0,4)09 phi = 2*atan2(R.z, R.x)/PI;10 phi+= step(phi, -0.5) * 4;1112 // Decide whether the pixel is in the equatorial region13 y = R.y * 1.5;14 ya = abs(y);15 bequ= step(ya, 1.);1617 // Convert R → I18 I.x = sqrt(3 - 2*ya);19 I.x = lerp(I.x, 1, bequ);20 I.y = phi * I.x;2122 // Map I → Q23 quar= floor(phi + 0.5);24 coef= texRECT(signTBL, float2(quar, 0));25 Q.x = dot(coef.xy, I);26 Q.y = lerp(sign(y), y, bequ);27 Q.z = dot(coef.zw, I);2829 return Q;30 }
QR
![Page 21: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/21.jpg)
21
Isocube Characteristics
Equal area 6 faces Extremely fast look-up
Drawback Distortion in polar regions
![Page 22: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/22.jpg)
22
Environment Mapping
HEALPix
RhombicDodecahedron
![Page 23: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/23.jpg)
23
Environment Mapping
Cubemap Isocube
![Page 24: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/24.jpg)
24
Rendering Comparison
Cubemap
Demo
![Page 25: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/25.jpg)
25
Discussions
Performance comparison
All three maps are resampled from a high-resolution cubemap
Cubemap HEALPixRhombic
Dodecahedron Isocube
Timing (fps) 232.6 65.9 56.5 168.2
Discrepancy Figure. Discrepancy Comparison
Stretch Figure. Stretch Variance Comparison
The timing test context: object with 106,466 vertices, Pentium IV 2.6 GHz CPU, nVidia GeForceFX 6800 Ultra.
![Page 26: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/26.jpg)
26
Potential Applications Equal-area, uniform sampling
OmniMax video HEALPix, isocube
Similar distortion Shadow mapping HEALPix, rhombic dodecahedron
Hemicube Cubemap, isocube
![Page 27: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/27.jpg)
27
References HEALPix
1. K. M. Górski, E. Hivon, and B. D. Wandelt, Analysis issues for large CMB data sets. In Proc. of the MPA/ESO Conference on Evolution of Large-Scale Structure: from Recombination to Garching, 1998
2. T.T. Wong, L. Wan, C.S. Leung, and P.M. Lam, Real-time environment mapping with equal solid-angle spherical quad-map, Shader X4: Lighting & Rendering, Edited by W. Engel, Charles River Media, 2006
3. L. Wan, T.T. Wong, and C.S. Leung, Spherical Q2tree for sampling dynamic environment sequences, in Proc. of Eurographics Symposium on Rendering 2005 (EGSR 2005), Konstanz, Germany, pp. 21-30, 2005
Isocube1. L. Wan, T.T. Wong, and C.S. Leung, Isocube: Exploiting the Cubemap Hardware, IEEE
Transactions on Visualization and Computer Graphics, to appear
![Page 28: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/28.jpg)
28
Webpage
The updated document can be found in the website
http://www.cse.cuhk.edu.hk/~ttwong/papers/spheremap/spheremap.html
The demo code is free to download from the link
http://www.cse.cuhk.edu.hk/~ttwong/demo/spheremap/spheremap.html
![Page 29: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/29.jpg)
29
Credits & Acknowledgments Rhombic dodecahedron is a joint work with Chi-Wing Fu (HKUST) and
Chi-Sing Leung (CityU) Isocube is a joint work with Chi-Sing Leung (CityU) Thanks to Lai-Sze Ng and Ping-Man Lam for implementing part of the
codes Thanks to Xuemiao Xu for capturing some of the panoramas This work is supported by Research Grants Council of the Hong Kong
Special Administrative Region, under RGC Earmarked Grants (Project No. CUHK416806)
![Page 30: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/30.jpg)
30
Q & A
![Page 31: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/31.jpg)
31
Discrepancy comparison
![Page 32: Spherical Maps with the Near- Equal Solid-Angle Property Liang Wan Tien-Tsin Wong The Chinese University of Hong Kong.](https://reader035.fdocuments.in/reader035/viewer/2022062803/56649c775503460f9492bed6/html5/thumbnails/32.jpg)
32
Stretch variance comparison