“Using a term like ‘nonlinear science’ is like referring to the bulk of zoology as ‘the study of nonelephant animals.’ ”
—Stanislaw Ulam

“使用‘非线性科学’这样的术语就像把动物学的大部分称为‘对非灵长类动物的研究’" —斯坦尼斯拉夫·乌拉姆
Photorealistic rendering attempts to make an image indistinguishable from a photograph.Non-photorealistic rendering (NPR), also called stylized rendering, has a wide range of goals. One objective of some forms of NPR is to create images similar to technical illustrations. Only those details relevant to the goal of the particular application are the ones that should be displayed. For example, a photograph of a shiny Ferrari engine may be useful in selling the car to a customer, but to repair the engine,a simplified line drawing with the relevant parts highlighted may be more meaningful(as well as less costly to print).

照片真实感渲染试图使图像与照片无法区分。非真实感渲染(NPR),也称为风格化渲染,具有广泛的目标。某些形式的NPR的一个目的是创造类似于技术插图的图像。只有那些与特定应用程序的目标相关的细节才是应该显示的。例如,一张闪亮的法拉利发动机的照片可能有助于向客户销售汽车,但要维修发动机,突出显示相关零件的简化线条画可能更有意义(打印成本也更低)。

Another area of NPR is in the simulation of painterly styles and natural media,e.g., pen and ink, charcoal, and watercolor. This is a huge field that lends itself to an equally huge variety of algorithms that attempt to capture the feel of various media. Some examples are shown in Figure 15.1. Two older books provide coverage of technical and painterly NPR algorithms [563, 1719]. Given this breadth, we focus here on techniques for rendering strokes and lines. Our goal is to give a flavor of some algorithms used for NPR in real time. This chapter opens with a detailed discussion of ways to implement a cartoon rendering style, then discusses other themes within the field of NPR. The chapter ends with a variety of line rendering techniques.

NPR的另一个领域是绘画风格和自然媒体的模拟,如钢笔和墨水,木炭和水彩。这是一个巨大的领域,有助于同样多种多样的算法,试图捕捉各种媒体的感觉。一些例子如图15.1所示。两本较老的书提供了技术和绘画NPR算法的范围。鉴于这种广度,我们在这里集中讨论渲染笔画和线条的技术。我们的目标是给出实时NPR使用的一些算法的味道。本章首先详细讨论了实现卡通渲染风格的方法,然后讨论了NPR领域的其他主题。本章以各种线条渲染技术结束。

Figure 15.1. A variety of non-photorealistic rendering styles applied to a coffee grinder. (Generated using LiveArt from Viewpoint DataLabs.)

图15.1。应用于咖啡研磨机的各种非真实感渲染样式。(使用来自视点数据实验室的LiveArt生成。)

15.1 Toon Shading

15.1卡通阴影

Just as varying the font gives a different feel to the text, different styles of rendering have their own mood, meaning, and vocabulary. There has been a large amount of attention given to one particular form of NPR, cel or toon rendering. Since this style is identified with cartoons, it has connotations of fantasy and childhood. At its simplest,objects are drawn with solid lines separating areas of different solid colors. One reason this style is popular is what McCloud, in his classic book Understanding Comics [1157],calls “amplification through simplification.” By simplifying and stripping out clutter,one can amplify the effect of information relevant to the presentation. For cartoon characters, a wider audience will identify with those drawn in a simple style.

正如改变字体会给文本带来不同的感觉一样,不同风格的渲染也有自己的情绪、含义和词汇。有大量的注意力给了一种特殊形式的NPR,cel或卡通渲染。由于这种风格与卡通一致,它具有幻想和童年的内涵。最简单的方法是,用实线来分隔不同纯色的区域。这种风格流行的一个原因是麦克劳德在他的经典著作《理解漫画》( 1157)中所说的“通过简化放大”通过简化和剔除杂乱的信息,可以放大与演示相关的信息的效果。对于卡通人物,更广泛的观众会认同那些以简单风格绘制的人物。

The toon rendering style has been used in computer graphics for decades to integrate three-dimensional models with two-dimensional cel animation. It lends itself well to automatic generation by computer because it is easily defined, compared to other NPR styles. Many video games have used it to good effect [250, 1224, 1761].See Figure 15.2.

卡通渲染风格已经在计算机图形学中使用了几十年,用于将三维模型与二维cel动画相结合。它非常适合计算机自动生成,因为与其他NPR风格相比,它很容易定义。许多电子游戏已经使用它取得了良好的效果。参见图15.2。

Figure 15.2. An example of real-time NPR rendering from the game Okami. (Image courtesy of Capcom Entertainment, Inc.)

图15.2。游戏Okami中实时NPR渲染的一个例子。(图片由卡普空娱乐公司提供)

The outlines of objects are often rendered in a black color, which amplifies the cartoon look. Finding and rendering these outlines is dealt with in the next section.There are several different approaches to toon surface shading. The two most common methods are to fill the mesh areas with solid (unlit) color or to use a two-tone approach,representing lit and shadowed areas. The two-tone approach, sometimes called hard shading, is simple to perform in a pixel shader by using a lighter color when the dot product of the shading normal and light source direction are above some value, and a darker tone if not. When the illumination is more complex, another approach is to quantize the final image itself. Also called posterization, this is a process of taking a continuous range of values and converting to a few tones, with a sharp change between each. See Figure 15.3. Quantizing RGB values can cause unpleasant hue shifts, as each separate channel changes in a way not closely related to the others. Working a huepreserving color space such as HSV, HSL, or Y’CbCr is a better choice. Alternately, a one-dimensional function or texture can be defined to remap intensity levels to specific shades or colors. Textures can also be preprocessed using quantization or other filters.Another example, with more color levels, is shown in Figure 15.16 on page 665.

物体的轮廓通常被渲染成黑色,这增强了卡通效果。寻找和渲染这些轮廓将在下一节讨论。有几种不同的方法来处理卡通表面阴影。两种最常见的方法是用纯色(无光)填充网格区域,或者使用双色调方法,表示有光和有阴影的区域。双色调方法有时称为硬着色,在像素着色器中很容易执行,当着色法线和光源方向的点积高于某个值时,使用较浅的颜色,否则使用较深的色调。当照明更复杂时,另一种方法是量化最终图像本身。也称为色调分离,这是一个获取连续范围的值并转换为几个色调的过程,每个色调之间有一个急剧的变化。参见图15.3。量化RGB值可能会导致令人不愉快的色调变化,因为每个单独的通道的变化方式与其他通道没有密切关系。使用HSV、HSL或Y'CbCr等保色色彩空间是更好的选择。或者,可以定义一维函数或纹理来将强度级别重新映射到特定的阴影或颜色。纹理也可以使用量化或其他过滤器进行预处理。另一个例子,有更多的色阶,如图15.16所示。

Figure 15.3. The basic rendering on the left has solid fill, posterization, and pencil shading techniques applied in turn. (Jade2 model by Quidam, published by wismo [1449], Creative Commons 2.5 attribution license.)

图15.3。左边的基本渲染依次应用了纯色填充、色调分离和铅笔阴影技术。(Quidam的Jade2模型,wismo [1449]出版,知识共享2.5归属许可。)

Barla et al. [104] add view-dependent effects by using two-dimensional maps in place of one-dimensional shade textures. The second dimension is accessed by the depth or orientation of the surface. This allows objects to smoothly soften in contrast when distant or moving rapidly, for example. This algorithm, combined with a variety of other shading equations and painted textures, is used in the game Team Fortress 2 to give a blend of cartoon and realistic styles [1224]. Variations on toon shaders can be used for other purposes, such as for exaggerating contrast when visualizing features on surfaces or terrain [1520].

Barla等人[104]通过使用二维贴图代替一维阴影纹理来添加依赖于视图的效果。第二维度由表面的深度或方向来确定。例如,这允许对象在远离或快速移动时平滑地变软。这种算法与各种其他着色方程和绘制的纹理相结合,用于游戏团队堡垒2中,以提供卡通和现实主义风格的融合[1224]。卡通着色器的变体可用于其他目的,如在可视化表面或地形上的特征时放大对比度[1520]。

Real-Time Rendering——Chapter 15Non-Photorealistic Rendering非真实感渲染15.1 Toon Shading15.1卡通阴影相关推荐

  1. 《Real-Time Rendering 4th Edition》全文翻译 - 第15章 非真实感渲染(下)15.3 ~ 15.5

    连更两篇,冲鸭! 业余翻译,若有不周到之处,还请多多指教! 实时渲染(第四版)Real-Time Rendering (Fourth Edition) 第15章 非真实感渲染  Chapter 15  ...

  2. 《Real-Time Rendering 4th Edition》全文翻译 - 第15章 非真实感渲染(上)15.1 ~ 15.2

    好久没更新了~ 由于对NPR方面比较感兴趣,所以任性了一下,先翻译了这一章~ 业余翻译,若有不周到之处,还请多多指教! 实时渲染(第四版)Real-Time Rendering (Fourth Edi ...

  3. 非真实感渲染(NPR)论文理解及其复现(Unity) - 《Stylized Highlights for Cartoon Rendering and Animation》

    Stylized Highlights for Cartoon Rendering and Animation 该论文的目的主要是用来渲染卡通风格的高光.复现参考自[NPR]非真实感渲染实验室 符号: ...

  4. UnityShader学习——非真实感渲染

    文章目录 什么是非真实感渲染 卡通风格 1.渲染轮廓线 2.添加高光 素描风格 什么是非真实感渲染 尽管游戏渲染一般都是以照相写实主义(photorealism)作为主要目标,但也有许多游戏使用了非真 ...

  5. Unity Shader入门精要学习笔记 - 第14章 非真实感渲染

    Unity Shader入门精要学习笔记 - 第14章 非真实感渲染 本系列为UnityShader入门精要读书笔记总结, 原作者博客链接:http://blog.csdn.net/candycat1 ...

  6. Unity Shader入门精要学习笔记 - 第14章非真实感渲染

    转载自 冯乐乐的 <Unity Shader 入门精要> 尽管游戏渲染一般都是以照相写实主义作为主要目标,但也有许多游戏使用了非真实感渲染(NPR)的方法来渲染游戏画面.非真实感渲染的一个 ...

  7. 第14章 非真实感渲染

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明. 本文链接: https://blog.csdn.net/e295166319/article/ ...

  8. Chapter14_非真实感渲染

    非真实感渲染(Non Photorealistic Rendering,NPR),用于卡通,水彩风格渲染. 卡通风格渲染(黑色描边,分明的明暗变化) 基于色调的着色技术(tone-based shad ...

  9. Python图像特效 OpenCV 油画 与 非真实感渲染 (Stylization水彩, edgePreservingFilter, detailEnhance, pencilSketch描绘)

    简介 基于Python cv2做的图像风格转换,其中包括油画风格,水彩风格,图像在不影响边缘情况下进行平滑化,图像锐化,图像描绘风格等. Package-OpenCV, scipy下载 pip ins ...

最新文章

  1. python 使用 struct 把数据变成字节流
  2. 如何授予邮箱的代理发送权限
  3. 编译32位_玩转Android10源码开发定制(11)内核篇之安卓内核模块开发编译
  4. Python3.5以上版本lxml导入etree报错Unresolved reference
  5. mysql技术内幕《读书笔记》
  6. matlab中变.,Matlab变系数微分方程
  7. 基于DEAP库的python进化算法-1
  8. python 验证码
  9. php实现微信登录详细教程,[文档教程]PHP实现微信开放平台扫码登录源码下载 - 技术编程 - 极思维...
  10. windows配置Hadoop开发环境
  11. 基于差分进化算法的函数寻优算法
  12. 更改计算机图标大小得方法,更改图标大小【解决办法】
  13. vue动态绑定背景图片的透明度
  14. handbrake中文版下载 | HandBrake(大菠萝视频格式转换器)官方中文版V1.3.3视频格式转换器哪个最好用
  15. 【JS】跨域问题读写cookie的解决办法
  16. SSM毕设项目仓库管理系统lyf55(java+VUE+Mybatis+Maven+Mysql)
  17. python名片管理系统的总结_名片管理系统(Python)
  18. 天池训练营——基于人脸的常见表情识别(3)——模型搭建、训练与测试
  19. java下划线_转驼峰,小写转大写(亲写,亲测)
  20. JAVA-0基础学习笔记-day01

热门文章

  1. QTabWidget 改变tabBar位置 并改变文字方向
  2. linux更改jdk环境变量,linux 设置jdk环境变量
  3. 散布矩阵(scatter_matrix)及相关系数(correlation coefficients)实例分析
  4. Python量化交易学习入门
  5. linux 下vim删除多行
  6. AUTOSAR(ETAS)工具ISOLAR简介
  7. SQL未明确定义列错误
  8. Redis常见面试题(缓存击穿、穿透、雪崩)
  9. 【Python 实战】---- 批量对图片添加不同水印
  10. win10链接无线打印服务器,老司机调解win10系统连接无线打印机的方法介绍