小程序
传感搜
传感圈

Discovery Helps Computers Draw Intricate Two-Dimensional Animations

2022-11-20
关注

Nearly 60 years ago computer scientist Ruth Weiss of Bell Labs published a pioneering algorithm to turn three-dimensional objects into two-dimensional drawings from any angle. But she ran into a problem with depicting outlines—an issue that has remained a computational geometry riddle for decades. With the ubiquity of computer animation today, this “hidden line problem” is now even more pressing.

The trickiest part of rendering a 3-D model in 2-D, a crucial step in computer animation, is the deceptively simple matter of the contour: the 2-D visual outline of the 3-D object. In a perfect world, a contour could be delineated with infinite precision—but the real world demands finite values. So modern algorithms start by covering the entire 3-D model with a mesh of tiny triangular “tiles,” then determining whether each tile would be facing a viewer or facing away. Next, algorithms use these tiles to build line segments that serve as the contour. But the results can create faulty, flickering lines when used in a stylized animation—and researchers were unsure why.

Credit: Aaron Hertzmann and Pierre Bénard (restyled by Amanda Montañez); Source: “ConTesse: Accurate Occluding Contours for Subdivision Surfaces,” by Chenxi Liu et al., in ACM Transactions on Graphics; June 2022

It has proved impossible to generate a triangle mesh fine enough to avoid every error of this kind. As Meta Reality Labs researcher Stéphane Grabli, an Oscar nominee for visual effects, explains, “The feeling was that with enough subdivision, it should be possible to create a mesh that allows exact visibility computation for these contours. This turned out to be wrong.” The resulting errors limit the complexity of nonphotorealistic illustration styles, Grabli adds.

Now, in ACM Transactions on Graphics, University of British Columbia computer scientist Chenxi Liu and her colleagues propose an algorithmic solution, called ConTesse, that focuses on fixing the contour rather than the mesh. Zooming in by a factor of 1,600 on algorithm-generated contours, Liu identified small twists where the contour lines incorrectly crossed one another—and thus the tiles could not be consistently identified as facing toward or away from the viewer. “I experimented with many surfaces and saw that the algorithm failed on most of them,” she says.

Credit: Aaron Hertzmann and Pierre Bénard (restyled by Amanda Montañez); Source: “ConTesse: Accurate Occluding Contours for Subdivision Surfaces,” by Chenxi Liu et al., in ACM Transactions on Graphics; June 2022

The researchers’ new algorithm first traces a 3-D shape’s edges with line segments, then squashes this approximate contour down to 2-D and tries to tile its interior with triangles. Wherever that interior mesh mistakenly crosses over itself, the algorithm modifies that part of the contour, such as by untwisting it or adding finer line segments. The algorithm then regenerates the mesh using the repaired contour and projects it all back onto the 3-D object for a final visibility check.

Credit: Aaron Hertzmann and Pierre Bénard (restyled by Amanda Montañez); Source: “ConTesse: Accurate Occluding Contours for Subdivision Surfaces,” by Chenxi Liu et al., in ACM Transactions on Graphics; June 2022

The team’s innovation was to realize that the problem was with the contour itself. Previously it was unclear that such invalid contours were even possible, so fixes treated the flickering symptoms rather than the cause, Liu says. Grabli, who was not involved in the new research, concurs: “The paper proves why early solutions couldn’t work.”

参考译文
Discovery帮助计算机绘制复杂的二维动画
大约60年前,贝尔实验室的计算机科学家露丝·韦斯(Ruth Weiss)发表了一种开创性的算法,可以从任何角度将三维物体转换为二维图形。但她在描绘轮廓时遇到了一个问题——这个问题几十年来一直是计算几何学的谜题。随着如今电脑动画的普及,这个“隐线问题”变得更加紧迫。在计算机动画中,渲染二维三维模型最棘手的部分是看似简单的轮廓:三维物体的二维视觉轮廓。在一个完美的世界里,轮廓可以被无限精确地描绘出来,但现实世界要求有限的值。因此,现代算法首先在整个3d模型上覆盖一层小小的三角形“瓦片”,然后确定每个瓦片是面向观看者还是背对观看者。接下来,算法使用这些贴图来构建作为轮廓线的线段。但当在程式化动画中使用时,结果会产生错误的、闪烁的线条——研究人员不确定原因。事实证明,要生成一个足够精细的三角形网格来避免这类错误是不可能的。正如Meta Reality Labs研究员Stéphane Grabli(奥斯卡视觉效果提名者)解释的那样,“感觉是,有了足够的细分,应该有可能创建一个网格,允许对这些轮廓进行精确的可见性计算。事实证明这是错误的。”由此产生的错误限制了非真实感插图风格的复杂性,Grabli补充道。现在,在ACM图形学报上,不列颠哥伦比亚大学的计算机科学家Chenxi Liu和她的同事提出了一种算法解决方案,称为ConTesse,它专注于固定轮廓而不是网格。将算法生成的轮廓放大1600倍后,Liu识别出了轮廓线错误交叉的小扭曲——因此无法一致地识别出瓷砖是面向观看者还是远离观看者。“我在许多表面上做了实验,发现算法在大多数表面上都失败了,”她说。研究人员的新算法首先用线段追踪一个3d形状的边缘,然后将这个近似的轮廓压缩到2d中,并尝试用三角形平铺其内部。只要内部网格错误地与自身交叉,算法就会修改这部分轮廓,比如通过解开它或添加更细的线段。然后,该算法使用修复的轮廓重新生成网格,并将其全部投射到3-D对象上,以进行最后的可见性检查。该团队的创新之处在于意识到问题出在轮廓本身。刘先生说,在此之前,人们甚至不清楚这种无效的轮廓是否可能存在,所以修复只处理了闪烁的症状,而不是原因。Grabli没有参与这项新研究,他也表示赞同:“这篇论文证明了为什么早期的解决方案行不通。”
您觉得本篇内容如何
评分

评论

您需要登录才可以回复|注册

提交评论

scientific

这家伙很懒,什么描述也没留下

关注

点击进入下一篇

小型气象站知识科普

提取码
复制提取码
点击跳转至百度网盘