Fast Shading and Shadowing of Virtual Obects Using Shadowing Planes in Mixed Reality y yy yy Tetsuya Kakuta y,takeshi Oishi yy and Katsushi Ikeuchi yy Abstract We have developed a fast shading and shadowing method that uses the shadowing planes and the images in mixed reality (MR). The method is model-based and computable in real time by using a standard graphics processing unit (GPU) making it particularly effective when used with an outdoor MR application. To express the shadows of obects, we map the shadow images that are synthesized from the images rendered offline with the lights onto the shadowing planes, and we compute alpha blending with the obects. The shadowing planes are generated from convex hulls of obects. We obtain the radiance parameters of the real scene from an omnidirectional image and compute the linear sum of the radiance parameters and the images on the GPU. We applied this shadowing method to both an indoor and outdoor MR application and found it to be effective. 1. CG MR: Mixed Reality 1)3) MR HMD CG CG MR MR 4) Shade 2007 9 28 2008 1 17 2008 2 20 y DC 113 0033 7 3 1TEL 03 5841 5938 yy 113 0033 7 3 1TEL 03 5841 5938 y Graduate School of Interdisciplinary Information Studies, The University oftokyo, JSPS Researc Fellow (7 3 1, Hongo, Bunkyo-ku, Tokyo 113 0033, Japan) yy Interfaculty Initiative in Information Studies, The University of Tokyo (7 3 1, Hongo, Bunkyo-ku, Tokyo 113 0033, Japan) Shadow CG 5)7) MR CG 1 2 3 MR 8) 9) 10) 11) 12) 13) 14) 15) 16) 11) 9) 17) Vol. 62, No. 5, pp. 18 (2008) (1) 1
1 Shadowing using shadowing planes. MR 3 ffl ffl GPU 1 9) 17) GPU 2 3 GPU 4 5 6 2. 2 a 3D b c 2 Flowchart of the proposed method. d e f GPU g h 3. 3. 1 3 3 3D 1 MR 2 (2) Vol. 62, No. 5 (2008)
4 Offset of shadowing plane. 14) 3 Generation of shadowing planes. 5.3 3. 2 3 3 18) 19) 3b 3D 3c 3. 3 4 Z-fighting Z Z OpenGL Z near nfar f Z Z ob Z Z ndc 2fn Z ndc = + f + n (1) (f n)z ob f n near 0far 1 Z ob d d = Z ndc +1 2 2fn = + f + n (f n)z ob 2(f n) + 1 2 (2) (3) 3 OpenGL glpolygonoffset 3. 4 E P shadow E 0 E 0 P I P d 10) P I E 0 = E P (4) d I shadow P I P d I shadow =1 (5) (3) 3
ΣI shadow I Σd shadow I P shadow S 1 I,1 S 2 I,2 S n d,1 S 1 d,1 S 2 d,1 S n ΣI Σd 6 Linear combination of luminance parameters and images and diffuse components. 0 i 5 Generation of shadow images and mapping onto shadowing planes. 5 I shadow 1 0 5 a 5b P shadow I shadow 0 E 0 E 0 = E(1 I shadow )+P shadow I shadow (6) 6 P shadow 0 P shadow I shadow =0 E 0 = E(1 I shadow ) (7) 7 5 4 3. 5 GPU m P shadow f = 1; 2;:::;mg n L i fi = 1; 2;:::;ng P shadow I ;i P shadow d ;i v S 1 S 2 S 3 S 4 u S n-3 S n-2 S n-1 S n 7 Synthesis of images using fragment shader. S i 6a P shadow I ;i S i P I 6 b d ;i P d 7 GPU L i m d ;i S i UV 4 (4) Vol. 62, No. 5 (2008)
N L d A B S i d 8 Hemispheric surface light source. 10 Estimation of light distribution from omnidirectional image. N Geodesic Dome i Li i P shadow I,i n 9 Generation of images. 11 MR Apparance of MR-system. 4. 4. 1 8 A A A ffi L( ; ffi) A ( ; ffi) (d ; dffi) B A E 20) E = Z ß Z ß ß 0 2 L( ; ffi)sin cos d dffi (8) 21) Geodesic Dome Geodesic Dome 3 22) 23) 9a Geodesic Dome L i A E L i 4. 2 9 P shadow Geodesic Dome L i I ;i d ;i 4. 3 10 Geodesic Dome L i 2550:0 ο 1:0 S i 3.5 5. MR (5) 5
GPU RGBA 5. 1 MR MR MR Platform 24) MR Platform HMDPolhemus 6 FASTRAK HMD 640 480 FIT FI-19 CCD Victor KY-57 PC OS: Windows XPSP2CPU: Core2Duo E6850 3.0GHzRAM: 4GBGPU: nvidia GeForce8800GTS 640MB MR 11 5. 2 12 1 40 128 128 40 12a 12b 12c 12d 12 1 0.93 5. 3 13 13a 13b 36 40 1520 MR 5m 50000 1 1.46 13b36 21 1 1.29 13% VRMR CG 25) 26) 2333 13 13 19 7 17: 13c 22% 6. MR 1 2 GPU Geodesic Dome 6 (6) Vol. 62, No. 5 (2008)
12 Comparison of shading and shadowing of virtual obect indoors. 13 Comparison of shading and shadowing of virtual obect outdoors. 1 523pp.266-272 (March 1997) 2R. Azuma ASurvey of Augmented Reality Presence: Teleoperators and Virtual Environments64pp.355-385 (August 1997) 3R. AzumaY. BaillotR. BehringerS. FeinerS. Julierand B. MacIntyre Recent Advances in Augmented Reality IEEE Computer Graphics and Applications216, pp.34-47 (November 2001) 4 44pp.623-630 (December 1999) 5A. WooP. Poulinand A. Fournier A Survey of Shadow Algorithms IEEE Computer Graphics and Applications106 pp.13-32 (November 1990) 6F. Crow Shadow Algorithms for Computer Graphics Proc. SIGGRAPH'77pp.242-248 (1977) 7J. M. HasenfratzM. LapierreN. Holzschuchand F.X. Sillion ASurvey of Real-time Soft Shadows Algorithms Computer Graphics Forumpp.753-774 (December 2003) 8K. Jacobs and C. Loscos Classification of Illumination Methods for Mixed Reality Proc. Eurographics State of the Art Report(STAR)pp.95-118 (September 2004) 9 D-IIJ-84-D-II81234-1242(August 2001) 10I. SatoY. Satoand K. IkeuchiAcquiring a Radiance Distribution to Superimpose Virtual Obects onto a Real Scene IEEE Trans. on Visualization and Computer Graphics51pp.1-12 (January-March 1999) 11P. Debevec Rendering Synthetic Obects into Real Scenes: Bridging Traditional and Image-Based Graphics with Global Ilumination and High Dynamic Range Photography Proc. SIG- GRAPH '98pp.189-198(July 1998) 12M. Kanbara and N. Yokoya Geometric and photometric registration for real-time augmented reality Proc. Int. Symp. on Mixed and Augmented Reality (ISMAR02)pp.279-280 (September 2002) 13H. MatsuokaA. Onozawa and E. HosoyaEnvironment Mapping for Obects in the Real World: a Trial Using ARToolkit Proc. Int. Augmented Reality Toolkit Workshop (September 2002) 14I. SatoY. Sato and K. Ikeuchi Illumination from Shadows IEEE Trans. on Pattern Analysis and Machine Intelligence25 3pp.290-300 (March 2003) 15M. HallerS. Drab and W. Hartmann A Real-Time Shadow Approach for an Augmented Reality Application Using Shadow Volumes Proc. Symp. on ACM Virtual Reality Software and Technology(VRST'03)pp.56-65 (October 2003) 16 MIRU2005pp.297-304 (July 2005) 17J. S. NimeroffE. Simoncelli and J. Dorsey Efficient Re- (7) 7
Rendering of Naturally Illuminated Environments Proc. Eurographics Workshop on Rendering (EGWR94)pp.359-373 (June 1994) 18M. LevoyK. PulliB. CurlessS. RusinkiewiczD. KollerL. PereiraM. GinztonS. AndersonJ. DavisJ. GinsbergJ. Shadeand D. FulkThe Digital Michelangelo Proect: 3D Scanning of Large Statues Proc. SIGGRAPH'00pp.131-144 (July 2000) 19K. Ikeuchi Modeling from Reality Proc. Third International Conference on 3D Digital Imaging and Modeling (3DIM'01) pp.177 (May 2001) 20B. K. P. Horn Robot Vision The MIT Press (March 1986) 21P. P. SloanJ. KautzJ. SnyderPrecomputed Radiance Transfer for Real-Time Rendering in Dynamic, Low-Frequency Lighting Environments Proc. SIGGRAPH'02pp.527-536 (July 2002) 22A. Pugh Polyhedra: a Visual Approach University of California Press (September 1976) 23K. IkeuchiRecognition of 3D Obect using the Extended Gaussian Image Proc. 7th International Joint Conference on Artificial Intelligencepp.595-600 (August 1981) 24S. UchiyamaK. TakemotoK. SatohH. Yamamotoand H. Tamura MR Platform: A Basic Body on Which Mixed Reality Applications Are Built Proc. Int. Symp. on Mixed and Augmented Reality (ISMAR02)pp.246-253 (September 2002) 25 1995 pp.263 (March 1995) 26 2007 pp.169 (March 2007) 2002 2005 DC 1999 2002 2005 2006 2007 1978 MIT CMU 1996 2000 8 (8) Vol. 62, No. 5 (2008)