基于GPU编程的实时卡通渲染研究与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
卡通渲染(Cel-Rendering或Cartoon Rendering)技术是非真实感渲染技术(Non-Photorealistic Computer Graphics,NPR)的一种,其目的是将输入的场景渲染成卡通风格,其绘制特点是有显著的轮廓边缘和非连续的颜色过渡,与其他效果相比更能让人产生亲切可爱的感觉。
     卡通渲染技术的主要应用范围是在卡通片、电影及电脑游戏中。世界上已经有很多成熟的利用卡通渲染技术制作的成功的卡通电影和电脑游戏。我国目前在这方面的研究与国外相比还比较落后,还没有很突出的成就。
     本文首先介绍了卡通渲染技术的发展背景和研究现状,并对研究目标和研究方法做了说明。之后分章节讨论了实时卡通渲染技术涉及的研究领域,包括GPU编程技术、卡通着色、轮廓线检测与绘制。最后对本文的研究工作做了总结并展望了卡通渲染技术的发展方向。
     GPU编程技术是利用着色器语言对可编程图形硬件进行流程控制,达到充分利用图形硬件资源和实现定制渲染结果的目的。可编程图形流水线是在原图形流水线作了进一步的改进,在顶点处理阶段允许程序设计在使用自己编写的指令控制定点位置和进行光照计算,以及在光栅化阶段实现定制纹理采样及颜色混合。
     卡通渲染主要包含两个方面:卡通着色和轮廓线绘制。卡通着色是对场景着色得出像素显示颜色的过程。但卡通着色效果不同于真实感的连续光照效果,而是会出现大块的色彩填充和非连续的颜色过渡。本文通过介绍简单光照模型和明暗处理模型在卡通着色技术上的应用,探讨了卡通渲染的着色方法。轮廓线的绘制是卡通渲染技术乃至整个非真实感渲染领域的基础,卡通效果中常用轮廓线来勾勒形状,并对线条加粗以表现模型的重要特征。本文对非真实感渲染领域中使用的轮廓线的定义做了简要介绍,并对目前轮廓线绘制的主要方法做了研究对比,在对现有的成就做了大量的研究和分析后,结合前人优秀思想提出了一种适用于该项目的新的算法并做了性能和效果评估,经过验证了其可行性后,将其应用在了项目中。最后,本文对目前的工作进行了总结,并提出了改进的方向以及将来的工作。
Cartoon rendering or cel-rendering is a kind of non-photorealistic rendering technology. We can render the 3D models with cartoon-style effects with it. By computer .Cartoon rendering technology uses the unchanged color and notable contour to bring us a cartoon world, which makes people feel more comfortable and kindly.
     Cartoon rendering technology has been widely applied to movie making and animations. Overseas cartoon rendering have been applied to the computer and video game. But in China, we are still being behind in the research of Computer Animation&Digital Entertainment field.
     First, this article introduced the development process and research status of the cartoon rendering technology, then explained the purpose and measure of this article. After that, this article used many chapters to do a detailed study of the key sub-technologies of cartoon rendering, such as shader programming, cartoon shading, contour detection and rendering, and so on.
     Shader programming is a technology with which we can control the rendering progress by run our own GPU program on the programmable graphics pipeline. By programming the code of vertex shader and pixel shader, we can achieve even go beyond the work of fixed-function module.The programmable graphics pipeline is base on the fixed-function graphics pipeline,adding the programmable transform and lighting modules in the vertex treatment phase, as well as the programmable texture, filtering and hybrid module in the pixel treatment phase.
     The cartoon rendering technology mainly includes two key sub-technologies, cartoon shading and contour rendering. Cartoon shading is the process of calculating the color of all pixels, and this process is different from traditional realistic shading method. This article researched the entire cartoon shading method by the simple illumination model and several classical shading.
     Contour rendering is the foundation of cartoon rendering even NPR. The cartoon rendering usually use it to outline the shape of model, and use thick lines to show the important feature. In this article the contours definition and classification of non-photorealistic has been detailed. After that, this paper analyzed all the algorithm of cartoon rendering and contrasts them by programming and tries to get a new suitable algorithm for our project.
     Finally, we summarize the current work and put forward the direction of improving and the future work.
引文
[1]Steve Strassmann and Hairy Brushes: in Computer-Generated Images[D], Cambridge Massachusetts, Department of Architecture Massachusetts Institute of Technology, 1986
    [2]Lansdown.J and Schofield.S, Expressive Rendering: A Review of Nonphotorealistic Techniques[S], IEEE Transactions on Pattern Analysis and Machine intelligence, 1995, 14(9), 869-880
    [3]Thomas Strothotte and Stefan Schlechtweg著,叶修梓等译,非真实感图形学—造型、绘制与动画技术[M],北京,机械工业出版社,2004.11,1-17
    [4]Gooch, Amy, Bruce Gooch, Peter Shirley, and Elaine Cohen, A Non-Photorealistic Lighting Model for Automatic Technical Illustration [D], Computer Graphics (SIGGRAPH 98 Proceedings), 1998, 447-452
    [5]Adam Lake, Carl Marshall, Mark Harris, and Marc Blackstein, Stylized Rendering Techniques for Scalable Real-Time 3D Animations [D], Non-Photorealistic Animation and Rendering, 2000.
    [6]Draw Card and Jason L.Mitchell, Non-Photorealistic Rendering with Pixel and Vertex.
    [7]Ron Barbosa, Dot3 Cel Shading, Engel, Wolfgang ed., ShaderX3: Advanced Rendering with DirectX and OpenGL[C], Wordware Publishing, 2005, 300-312
    [8]Tomas Akenine-Moller, Eric Haines著,普建涛译,实时计算机图形学[M],第二版,北京,北京大学出版社,2002,164-172
    [9]Maarten Van Emmerik, Ari Rappoport, and Jarek Rossignac: Simplifying interactive design of solid models: a hypertext approach. The Visual Computer 9(5): 239-254
    [10]Saito, Takafumi, and Tokiichiro Takahashi, Comprehensible Rendering of 3D Shapes [D], Computer Graphics, 1990.8, 197-206
    [11]Lander, Jeff, Images from Deep in the Programmer’s Cave[S]Game Developer, Vol.8, No5, May 2001, 23-28
    [12]Buchanan.J.W. and M.C.Sousa The edge buffer: A Data Structure for Easy Sihouette Rendering[S], Proceedings of the First International Symposium on Non-Photorealistic Animation and Rendering (NPAR), June 2000, 39-42
    [13]Markosian, Lee, Michael A.Kowalski, Samuel J.Trychin, Real-Time NonphotorealisticRendering[C] Computer Graphics (SIGGRAPH 97 Proceedings), pp., August 1997, 415-420
    [14]Northrup.J.D and Lee Markosian, Artistic Silhouettes: A Hybird Approach[S], Procedding of the First International Symposium on Non-Photorealistic Animation and Rendering (NPAR), June 2000, 31-37
    [15]SaitoT and Takahashi.T: Comprehensible Rendering of 3D Shapes [C], in proceedings of SIGGRAPH90. New York, NY, USA: ACM Press, 1990:197-206.
    [16] Decaudin.P: Cartoon-Looking Rendering of 3D-Scenes [R]. Technical Report 2919, INRIA: ACM Press, 1999.
    [17] Mitchell J L, Brennan C, Card D: Real-Time Image Space Outlining for Non-Photorealistic Rendering[C], In ACM SIGGRAPH Conference Abstracts and Applications. New York, NY, USA: ACM Press, 2002.
    [18]Johan Claes, Fabian Di Fiore, Gert Vansichem.Fast 3D Cartoon Rendering with Improved Quality by Exploiting Graphics Hardware [M], 2001.
    [19]王翱宇.非真实感渲染若干技术的研究[D],杭州:浙江大学,2005.
    [20]Raskar.R: Hardware Support for Non-photorealistic Rendering[C], In Proceedings of SIGGRAPH/Eurographics Work-shop on Graphics Hardware.[s.l]: ACM Press,2001:41-46.
    [21]Markosian L,Kowalski M,Goldstein D,et al.Real-time Non-Photorealistic Rendering[C], Proceedings of the 24th Annual Conference on Computer Graphics and Interactive Techniques. New York, NY, USA: ACM Press, 1997:415-420.
    [22] Frédo Durand: an Invitation to Discuss Computer Depiction,Proceedings of the second International symposium on Non-photorealistic animation and rendering, 2002, Annecy, France, p.111-124.
    [23]苏延辉,韦欢,等.卡通高光的风格化算法及其实现,中国计算机图形学进展,,2006
    [24]Michael A, Kowalski.L, Markosian J, Lubomir Bourdevy Art-Based Rendering of Fur, Grass, and Trees. In the SIGGRAPH 99 conference proceedings, 1999.
    [25]Winkenbach.C & Salesin.D: Computer-generated pen-and-ink illustration, Proceedings of SIGGRAPH 94, p.91-100, 1994.
    [26]Salisbury.M, Michael T, John F and Hughes D: Orientable textures for image-based pen-and-ink illustration,In Turner Whitted, editor, SIGGRAPH 97 Conference Proceedings, Los Angeles, California, p.401-406, 1997.
    [27]Wolfgang.F: Engel.ShaderX3-Advanced Rendering with DirectX and OpenGL.Charles River Media, 2004, 1-300
    [28]Philippe Decaudin: Cartoon-Looking Rendering of 3D-Scenes. Technical Report 2919, INRIA: ACM Press, June 1996
    [29]多卡模.曲线和曲面的微分几何学[M].上海:上海科学技术出版社,1988,1-218
    [30]梅向明,黄敬之.微分几何学[M].北京:高等教育出版社,1981,1-325
    [31]王翱宇,唐敏,等.非真实感绘制中轮廓线检测技术综述[J].计算机应用与软件,2006(23):102-104.
    [32]Durand.F: An invitation to discuss computer depiction, Proceedings of the second international symposium on Non-photorealistic animation and rendering, p.111-124 2002.
    [33]Adrian.S and Weighted Voronoi Stippling: Proceedings of the second international symposium on Non-Photorealistic Animation and rendering. Annecy , France.NPR Association,p.37-43,2002.
    [34]Freudenberg B, Masuch.M: Non-Photorealistic Shading in an Educational Game Engine Presented at the SIGGRAPH and Eurographics Campfire.Production Process of 3D Computer Graphics Applications-Structures, Roles and Tools. Snowbird, Utah, USA, June 1-June 4, 2002.
    [35]Robert D, Philip L, Lee M.Coherent Stylized Silhouettes.ACM Transactions on Graphics, Pros’of SIGRAPH 03.July 2003.
    [36]Leiterman.J: Vertex and Pixel Shader Programming With Directx 9[M], Wordware Publishing, January, 2004.
    [37]Loviscach.J: Rendering Artistic Line Drawings Using Off the Shelf 3-D Software [J], Eurographics 2002.
    [38]Isenbergs.T, Halper.N, Strothotte T.Stylizing Silhouettes at Interactive Rates: From Silhouette Edges to Silhouette Strokes. Computer Graphics Forum, Proc of Eurographics, 2002.
    [39]Raskar.R: Hardware Support for Non-photorealistic Rendering. In Proceedings of SIGGRAPH Eurographics Workshop on Graphics Hardware, ACM Press, p.41-46.2001
    [40]Mi Xiaofeng: Master Thesis Related Technology Research of Non-photorealistic Rending,p.19-21,2003.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700