3DCG 1) ( ) 2) 2) 1) 2) Real-Time Line Drawing Using Image Processing and Deforming Process Together in 3DCG Takeshi Okuya 1) Katsuaki Tanaka 2) Shigekazu Sakai 2) 1) Department of Intermedia Art and Science, Graduate School of Fundamental Science and Engineering, Waseda University 2) Department of Intermedia Art and Science, Fundamental Science and Engineering, Waseda University okuya.waseda gmail.com 3DCG 3 G-Buffer 3 3 API Abstract In cartoon rendering of 3DCG, methods for generating a contour lines are classified into the method using the image processing or the method using the three-dimensional shape of the models. By selecting G-Buffers, the method using the image processing can accurately detect intended lines of users, but the lines are mechanical impression by the uniform thickness. The methods using the three-dimensional shape of the models can adjust thickness of the lines, but detection of the lines is dependent on the rendering algorithm and it can t detect the intended lines of users. In this paper, we separated contour lines process into detection and rendering. Our approach uses image processing for detection and model shapes for rendering. It can detecting intended line of users and draw exaggerated lines by changing the thickness of lines. In addition, we implemented a graphics API pipeline to run our method in real-time, and also examined a technique to accelerate processing speed. NICOGRAPH 2015 [1] 75
1 3DCG [2] 3DCG CG 3DCG [3] 3DCG 3 3 API 2 3DCG 3 (1) Saito [4] (a) 1920x1080 (b) 1280x720 (c) 640x360 (d) 320x180 1 3 G-Buffer Decaudin[5] G-Buffer Deering [6] API Multiple Render Targets [7] 3DCG [8] 1 1 (2) 3 3 [9] [10] 76
[2] [9] [11] [12] [13] 3 2 3 3.1 3 G-Buffer 3 1 1 3 G-Buffer (a) (b) (c) (d) 2 3 3 3 3.2 Saito G- Buffer G-Buffer 77
G-Buffer G-Buffer 3 3(a) 3(b) G-Buffer Z G-Buffer 4 4(a) Z G-Buffer 4(b) 3(b) 4(c) G-Buffer 4(d) Z Z 5 (a) (b) 3 (a) G-Buffer Z (b) Z 3(b) 3.3 (c) G-Buffer (d) 1. 2. 3. 4. 4 G-Buffer 5 78
(a) (b) 7 V 1 P 0, P 1 P 0 P 1 V 0 V 1 u V 0, V 1 u t 0, t 1 (c) (d) 6 1 2 4 6 6(a) 1 2,3 6(b) 3 4 6(c) 2,3 7 V 0, V 00, V 01, V 10, V 11 t 0, t 1 V 0, V 1 V 0, V 1 2t 0, 2t 1 4 V 00 V 10 V 11 V 01 4 4 API API Direct3D 11 5.0 8 79
8 4.1 Compute Shader Compute Shader Vertex Shader Vertex Shader Compute Shader Pixel Shader Depth Buffer float4 View Z G-Buffer View 4.2 G-Buffer Vertex Shade Geometry Shader Pixel Shader Pixel Shader G-Buffer G-Buffer 4 Multiple Render Targets 4.3 Compute Shader G-Buffer 4.4 Vertex Shader Geometry Shader Geometry Shader TriangleStream Geometry Shader 6 TriangleStream Pixel Shader return 4.5 G- Buffer G-Buffer UV UV UV 80
9 (a) (b) 10 UV 9 5 5.1 Saito [4] 3 [12] 10(a) (a) (b) 3 10(b) 11 11(a) G-Buffer View Z G-Buffer 11(b) 3 (c) (a),(b) (d) (e) (c) (f) (d) 11 81
11(c) 11(a) 11(b) 11(a) 11(b) 11(e) 11(b) 11(d) 11(a) 11(b) 11(e) 11(f) 3 5.2 2 3 12 13 2 OS Windows 10 Pro CPU Intel Core i7 3370K(3.5GHz) GPU NVIDIA GeForce GTX 580(772MHz) Visual Studio 2015 API Direct3D 11.0(Visual Studio 2015) 3 ( ) [fps] ( x ) 640x360 1280x720 1920x1080 960 1699.3 649.7 331.7 9566 1394.6 610.4 317.0 66400 445.1 318.4 209.8 12 13 60fps 66400 fps [1280x720] 3.1ms [1980x1080] 4.7ms 60fps, 30fps 1 16ms, 33ms 2 12 13. 82
5.3 4.5 4 14 15 HLSL Pixel Shader UV Sample UV Load (a) 1920x1080 (b) 1920x1080 4 66440 [fps] 1920x1080 209.8 1280x720 1920x1080 282.4 640x360 346.0 320x180 377.6 (c) 1280x720 (d) 1280x720 (e) 640x360 (f) 640x360 14 (g) 320x180 (h) 320x180 15 ( )[ 1920x1080] [320x180] 16 (a) (b) 16 320x180 83
6 3 (1) 3 3 G-Buffer CG (2) API Compute Shader 3DCG 3DCG 2 (1) t 3 3 [12] t (2)GPU GPU [1] : 3DCG NICOGRAPH 2015, 2015 [2] Carl S, Marshall: Game Programming Gems 2, pp436-443 ISBN: 978-4939007330, 2002 [3] : CG 2015 CGWORLD 84
ISBN: 978-4862671745, 2014 [4] Takafumi Saito and Tokiichiro Takahashi: Comprehensible Rendering of 3-D Shapes, Computer Graphics(SIGGRAPH 90 Proceedings), pp197-206, 1990 [5] Philippe Decaudin: Cartoon-Looking Rendering of 3D-Scenes, Research Report INRIA 2919, 1996 [6] Michael Deering, Stephanie Winner, Bic Schediwy, Chris Duffy, Neil Hunt: The triangle processor and normal vector shader: a VLSI system for high performance graphics, ACM SIGGRAPH Computer Graphics Volume 22 Issue 4, pp 21-30, 1988 [7] Shawn Hargreaves, Mark Harris: Deferred Shading NVIDIA, http://http.download.nvidia.com/ developer/presentations/2004/6800 Leagues/ 6800 Leagues Deferred Shading.pdf, : 2015-7-7. [8] Pencil+ 3 : PSOFT, http://www.psoft.co.jp/ jp/product/pencil/index.html, : 2015-7-7. [9] Tomas Akenine-Moller: 2 ISBN: 978-4939007354, 2006 [10] Bruce Gooch, Peter-Pike J. Sloan, Amy Gooch, Peter Shirley, Richard Riesenfeld: Interactive Technical Illustration, Proceedings of the 1999 symposium on Interactive 3D graphics, pp. 31-38, 1999 [11],,, : 3DCG Vol. 10, No. 4, pp. 251-262, 2011 [12] : 3DCG Vol67, No2, pp. J36-J44, 2013 [13] : 2013 2, 20, 2013 2012 2014 2015 CG 1980 1984 CG NHK CG 1994 2001 NHK 1989 1992 40 1994ETV 1998 CG 85