Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks

Author

ÉRIC GUÉRIN, Univ Lyon, INSA-Lyon, CNRS, LIRIS
JULIE DIGNE, Univ Lyon, CNRS, LIRIS
ÉRIC GALIN, Univ Lyon, Université Lyon 1, CNRS, LIRIS
ADRIEN PEYTAVIE, Univ Lyon, Université Lyon 1, CNRS, LIRIS
CHRISTIAN WOLF, Univ Lyon, INSA-Lyon, CNRS, LIRIS
BEDRICH BENES, Purdue University
BENOÎT MARTINEZ, Ubisoft Entertainment


Abstract

Authoring virtual terrains presents a challenge and there is a strong need for authoring tools able to create realistic terrains with simple user-inputs and with high user control. We propose an example-based authoring pipeline that uses a set of terrain synthesizers dedicated to specific tasks. Each terrain synthesizer is a Conditional Generative Adversarial Network trained by using real-world terrains and their sketched counterparts. The training sets are built automatically with a view that the terrain synthesizers learn the generation from features that are easy to sketch. During the authoring process, the artist first creates a rough sketch of the main terrain features, such as rivers, valleys and ridges, and the algorithm automatically synthesizes a terrain corresponding to the sketch using the learned features of the training samples. Moreover, an erosion synthesizer can also generate terrain evolution by erosion at a very low computational cost. Our framework allows for an easy terrain authoring and provides a high level of realism for a minimum sketch cost. We show various examples of terrain synthesis created by experienced as well as inexperienced users who are able to design a vast variety of complex terrains in a very short time.

  创作虚拟地形是一项挑战,因此非常需要能够通过简单的用户输入和高用户控制创建真实地形的创作工具。我们提出了一个基于示例的创作管道,它使用一组专门用于特定任务的地形合成器。每个地形合成器都是一个有条件生成的对抗网络,通过使用真实世界的地形及其草图对应物进行训练。训练集是自动构建的,这样地形合成器就可以从易于绘制的特征中学习生成。在创作过程中,艺术家首先创建主要地形特征的草图,如河流、山谷和山脊,算法使用训练样本的学习特征自动合成与草图对应的地形。此外,侵蚀合成器还可以通过侵蚀以非常低的计算成本生成地形演变。我们的框架允许轻松创作地形,并以最低的草图成本提供高水平的真实感。我们展示了各种地形合成的例子,这些例子由经验丰富的用户和没有经验的用户创建,他们能够在很短的时间内设计出各种各样的复杂地形。

INTRODUCTION

Despite more than thirty years of research in terrain modeling, authoring virtual terrains by using contemporary techniques remains a demanding task. One reason for this difficulty is the wide variety of geomorphological processes that control the terrain shape formation. Terrains are exposed for thousands of years to different erosion and land-forming agents such as water erosion, varying temperatures, vegetation, that are difficult to express by simple and versatile algorithms that could be used as editing tools. This brings many important challenges, among them expressing the designer’s intent and modeling large-scale detailed terrains while allowing tight user-control. Generating a new terrain is a complex and demanding process and it is even more complicated to do it intuitively and quickly.

  尽管在地形建模方面进行了30多年的研究,但使用当代技术创作虚拟地形仍然是一项艰巨的任务。造成这种困难的一个原因是控制地形形状形成的各种地貌过程。数千年来,地形一直暴露在不同的侵蚀和土地形成因素下,例如水侵蚀、不同的温度、植被,这些因素很难用简单而通用的算法来表达,这些算法可以用作编辑工具。这带来了许多重要的挑战,其中包括表达设计师的意图和建模大规模详细地形,同时允许用户进行严格控制。生成一个新的地形是一个复杂且要求很高的过程,直观而快速地生成地形更为复杂。

  A tremendous progress has been achieved in terrain modeling and the existing techniques can be categorized into procedural,simulation-based, sketch-based, and example-based. Many terrains have strong fractal features and while procedural methods allow for fast terrain generation, they often fail to provide control over the terrain features. While simulation-based methods (such as erosion and hydrology-based algorithms) generate geologically correct models, they often lack user control and are computationally expensive. Sketch-based methods provide a high level of control, but they do not generate geologically correct outputs and editing is tedious for large terrains. Existing example-based methods can generate large terrains using small examples but provide low user-control.Moreover, they replicate the exemplars, but do not easily generate new features. One important common drawback of the existing algorithms is that they cannot be easily applied to large-scale terrains.

  地形建模已经取得了巨大的进展,现有的技术可以分为程序化、基于仿真、基于草图和基于实例。许多地形具有很强的分形特征,虽然程序方法允许快速生成地形,但它们往往无法控制地形特征。虽然基于模拟的方法(如侵蚀和基于水文的算法)生成地质正确的模型,但它们通常缺乏用户控制,计算成本高昂。基于草图的方法提供了高水平的控制,但它们不会生成地质上正确的输出,而且编辑对于大型地形来说非常繁琐。现有的基于示例的方法可以使用小示例生成大地形,但用户控制能力较低。此外,它们复制了示例,但不容易生成新功能。现有算法的一个重要共同缺点是,它们无法轻松应用于大规模地形。

  Recent progress in Deep Learning provided solutions to many hard problems in Computer Graphics and Vision, not only for classification but also for synthesis. One of the most powerful generative methods is the so-called Generative Adversarial Network (GAN) [Goodfellow et al. 2014] and one of its extensions, conditional GAN (cGAN).

  深度学习的最新进展为计算机图形学和视觉领域的许多难题提供了解决方案,不仅在分类方面,而且在综合方面。最强大的生成方法之一是所谓的生成对抗网络(generative adj.Network,GAN)[Goodfello等人,2014]及其扩展之一,条件GAN(conditional GAN,cGAN)。

  We integrate cGANs in a fast example-based approach to realistic terrain synthesis (Fig. 1) that is oblivious to the underlying geological phenomena. Our method bridges the gap between the intuitiveness and flexibility of interactive authoring processes, while providing efficiency and expressive power. We do not attempt to model the underlying geomorphologic phenomena, but instead we use construction by example.

  我们将CGAN集成到一种基于快速示例的真实地形合成方法中(图1),该方法不考虑潜在的地质现象。我们的方法弥补了交互式创作过程的直观性和灵活性,同时提供效率和表达能力。我们不试图对潜在的地貌现象建模,而是通过实例进行构造。

Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第1张图片
Fig.1 A volcanic terrain generated by our method created by an inexperienced user from a few strokes depicting the crest lines.

  The cGAN training requires large training sets and it would not be feasible to ask artists to provide hundreds of terrain sketches.Instead, we propose to extract automatically sketches from realworld terrains. These sketches combine visually important features such as crests, valleys and river networks that have clear user intuition and can be easily sketched. We then train several cGANs with examples built from pairs of real terrains and their automatically generated sketches. Each cGAN yields what we call a terrain synthesizer capable of generating the entire elevation of a terrain from input data.

  cGAN训练需要大量训练集,要求艺术家提供数百个地形草图是不可行的。相反,我们建议从现实世界的地形中自动提取草图。这些草图结合了一些重要的视觉特征,如波峰、山谷和河网,这些特征具有清晰的用户直觉,可以轻松绘制。然后,我们训练了几个CGAN,并给出了从成对真实地形及其自动生成的草图构建的示例。每个cGAN产生我们所说的地形合成器,能够根据输入数据生成整个地形高程。

  Terrains are also shaped by erosion, a geomorphological process which is notoriously slow. Although GPU implementations of erosion algorithm exist, they cannot be efficiently applied to large terrains. In our work we propose an erosion meta-simulation (simulation of a simulation) by training a dedicated cGAN. This allows to apply erosion to large terrains time-efficiently.

  地形也受到侵蚀的影响,这是一个以缓慢著称的地貌过程。尽管存在侵蚀算法的GPU实现,但它们不能有效地应用于大型地形。在我们的工作中,我们提出了一个侵蚀元模拟(模拟的模拟),通过训练一个专用的cGAN。这使得侵蚀能够及时有效地应用于大型地形。

  In our approach, the user starts the interactive editing session by providing a rough sketch of a terrain and the terrain synthesizer generates the corresponding large-scale terrain model. The result can be later modified by editing the sketch, erasing and regenerating terrain parts, by our eraser synthesizer. A key feature of the entire process is its efficiency: during the authoring session, every terrain generation takes only a few milliseconds which allows interactive feedback to the designer. An example in Fig. 2 shows the usage of our framework: starting with a river network, adding crests and elevation cues generates a real-time terrain in each step.

  在我们的方法中,用户通过提供地形的草图来启动交互式编辑会话,地形合成器生成相应的大规模地形模型。我们的橡皮擦合成器可以通过编辑草图、擦除和重新生成地形部分来修改结果。整个过程的一个关键特征是它的效率:在创作过程中,每个地形生成只需要几毫秒,这允许交互反馈给设计师。图2中的一个例子展示了我们框架的用法:从河网开始,添加波峰和高程信息,在每个步骤中生成实时地形。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第2张图片
Fig.2.Our interactive terrain modeling framework allows the user to quickly, easily, and intuitively author realistic terrain models by using sketches of crest lines, rivers, or iso contours. Our method consists of a training step and an interactive sketching step. During the training step, we analyze a large number of terrains and extract geometric features that will serve as sketching elements. The sketches are fed to a set of cGANs which learn various generative processes.During the authoring step, the pre-trained networks are used to synthesize a terrain model that matches the input sketch and the incremental edits.

图2。我们的交互式地形建模框架允许用户通过使用波峰线、河流或iso等高线的草图,快速、轻松、直观地创建真实的地形模型。我们的方法包括一个训练步骤和一个交互式绘制步骤。在训练步骤中,我们分析大量地形,提取几何特征作为草图元素。草图被输入CGAN训练集,这些CGAN学习各种生成过程。在创作步骤中,预先训练的网络用于合成与输入草图和增量编辑匹配的地形模型。

  The main contributions of our work are threefold: 1) we propose the first terrain authoring pipeline driven by real world examples based on Deep Learning, 2) we present an automatic sketches generation process to build learning datasets, and finally, 3) we show that our approach can be used to learn complex natural processes,such as hydraulic erosion. We evaluated our approach by providing a large variation of landscape types (alpine mountain, volcanic island, canyon) and we also conducted a qualitative user study that confirms the ease of use of our technique.

  我们工作的主要贡献有三个方面:1)我们提出了第一个基于深度学习的真实世界示例驱动的地形创作管道;2)我们提出了一个自动生成草图的过程来构建学习数据集;最后,3)我们展示了我们的方法可以用于学习复杂的自然过程,例如水力侵蚀。我们通过提供大量不同的景观类型(高山、火山岛、峡谷)来评估我们的方法,我们还进行了定性用户研究,证实了我们的技术的易用性。

2 RELATED WORK

Terrain modeling has been a focus of computer graphics for a long time and the existing body of work can be classified into procedural, simulation-based, and example-based techniques. We refer the reader to [Natali et al. 2013] for an overview of terrain modeling representations and to [Smelik et al. 2014] for a survey of procedural terrain modeling. We also briefly review Machine Learning algorithms and especially Deep Learning algorithms.

  地形建模长期以来一直是计算机图形学的研究重点,现有的工作可分为程序化、基于仿真和基于实例的技术。我们请读者参考[Natali et al.2013]了解地形建模表示的概述,并参考[Smelik et al.2014]了解程序地形建模的概况。我们还简要回顾了机器学习算法,尤其是深度学习算法。

  Classical procedural methods are computationally efficient, because they usually use some kind of fractal noise that visually resembles real terrains. Fractals are useful for modeling terrains that are self-similar and can be observed as fresh and not eroded [Fournier et al. 1982]. Fractal interpolation was used to complete user-defined river networks [Kelley et al. 1988] and models generated by Lsystems [Prusinkiewicz and Hammel 1993]. They were later used to generate fractal terrains constrained by user-prescribed rivers trajectories [Belhadj and Audibert 2005] and planets featuring procedurally generated river networks [Derzapf et al. 2011]. A major limitation of the procedural models is their control. Fractals are defined by seeding a random number generator and the result is difficult to predict. User control of fractal methods has been addressed by several works. In particular by defining terrains from feature curves such as river networks and ridges [Génevaux et al. 2013; Hnaidi et al. 2010]. Recently, Génevaux et al. [2015] introduced a hierarchical distribution tree that models the terrain as a distribution of primitives that are procedurally blended, carved, and warped together. Moreover, it was quickly noticed that real terrains do not always conform to pure fractal description because they are exposed to various morphogenesis phenomena, among them erosion plays the most important role.

  经典的程序方法计算效率很高,因为它们通常使用某种视觉上类似真实地形的分形噪声。分形有助于对自相似的地形进行建模,这些地形可以被视为新鲜且未被侵蚀[Fournier et al.1982]。分形插值用于完成用户定义的河网[Kelley et al.1988]和Lsystems生成的模型[Prusinkiewicz和Hammel 1993]。它们后来被用于生成受用户指定的河流轨迹约束的分形地形[Belhadj和Audibert 2005],以及具有程序生成的河流网络特征的行星[Derzapf et al.2011]。程序模型的一个主要限制是它们的控制。分形是通过植入一个随机数生成器来定义的,其结果很难预测。分形方法的用户控制已经被几项工作所解决。特别是通过从河网和山脊等特征曲线定义地形[Génevaux等人,2013年;Hnaidi等人,2010年]。最近,Génevaux等人[2015]引入了一种层次分布树,该树将地形建模为原语的分布,这些原语按程序混合、雕刻和扭曲在一起。此外,人们很快注意到,真实地形并不总是符合纯粹的分形描述,因为它们暴露于各种形态发生现象中,其中侵蚀起着最重要的作用。

  Simulation-based methods were introduced by the work of Musgrave et al.[1989] who used various kinds of erosion to modify fractal terrains. Erosion algorithms were later extended by hydraulic erosion in [Chiba et al. 1998; Nagashima 1998]. Height fields [Cordonnier et al. 2016] are the most common representations used for erosion simulation, although layered data structures [Benes and Forsbach 2001], volumetric data [Benes et al. 2006], and smoothed particle hydrodynamics [Krištof et al. 2009] were also used. Smallscale volumetric erosion was also used to simulate cliffs [Peytavie et al. 2009]. Recently, Cordonnier et al. [2017a] used simulations in interactive setting to generate large-scale terrains affected by subsurface tectonics. Erosion algorithms were brought at interactive frame rate by using GPUs in [Mei et al. 2007; Vanek et al. 2011].While simulation-based algorithms generate geologically correct models, they are difficult to control and they are computationally demanding. Moreover, it is difficult to express a user intent by using those methods.

  Musgrave等人[1989]的工作引入了基于模拟的方法,他们利用各种侵蚀来修改分形地形。侵蚀算法后来在[Chiba et al.1998;Nagashima 1998]中通过水力侵蚀进行了扩展。高度场[Cordonnier et al.2016]是用于侵蚀模拟的最常见表示,尽管也使用了分层数据结构[Benes and Forsbach 2001]、体积数据[Benes et al.2006]和平滑粒子流体动力学[Krištof et al.2009]。小规模体积侵蚀也被用于模拟悬崖[Peytavie等人,2009]。最近,Cordonnier等人[2017a]在交互环境中使用模拟来生成受地下构造影响的大规模地形。侵蚀算法是在[Mei等人2007年;Vanek等人2011年]中使用GPU以交互帧速率提出的。虽然基于模拟的算法生成地质上正确的模型,但它们很难控制,而且计算量也很高。此外,使用这些方法很难表达用户意图。

  Example-based and user-defined approaches use existing terrains or user sketches to define terrain models. A typical representative of the example-based methods is the approach of [Zhou et al. 2007] that uses the height field patches from a real terrain and combines them into a user-defined sketch. Various methods use high-level interactive inputs to define terrains. Silhouettes were used to define roughness [Gain et al. 2009, 2015] or to deform an existing terrain to create a view from a certain viewpoint [Tasse et al. 2014]. Sketch-based approaches [Gain et al. 2009; Hnaidi et al. 2010; Tasse et al. 2012] or direct interactive terrain editing [Peytavie et al. 2009] were used to define terrains with a high level of control, but can generate terrains that are not geologically correct. Hybrid approaches combine interactive editing with simulations [Vanek et al. 2011; Šťava et al.2008] but they are limited to small scenes. Sketch-based methods involve manual editing that can be tedious whereas example-based algorithms are limited by the input exemplars.

  基于示例和用户定义的方法使用现有地形或用户草图来定义地形模型。基于示例的方法的典型代表是[Zhou等人2007]的方法,该方法使用真实地形的高度场面片,并将它们组合成用户定义的草图。各种方法使用高级交互输入来定义地形。轮廓被用来定义粗糙度[Gain等人,2009年、2015年],或使现有地形变形,以从某个角度创建视图[Tasse等人,2014年]。基于草图的方法[Gain et al.2009;Hnaidi et al.2010;Tasse et al.2012]或直接交互式地形编辑[Peytavie et al.2009]用于定义具有高控制水平的地形,但可以生成地质上不正确的地形。混合方法将交互式编辑与模拟相结合[Vanek等人2011;Šťava等人2008],但它们仅限于小场景。基于草图的方法涉及手工编辑,这可能会很乏味,而基于示例的算法则受到输入示例的限制。

  Machine learning has been used to generate images and other high dimensional and structured data similar to a training set for texture synthesis [Gatys et al. 2015; Kwatra et al. 2003], to generate images of a given type [Gregor et al. 2015], to predict future video frames [Mathieu et al. 2016], or to use sketches to complete procedural buildings [Nishida et al. 2016]. Earlier work was based on dictionary learning [Rubinstein et al. 2010] or graphical models like MRFs/CRFs. These models are limited by the required optimization stage during decoding, resulting in scalar hidden states and low order interaction between output variables [Kwatra et al. 2003].

  机器学习已被用于生成图像和其他高维结构化数据,类似于纹理合成的训练集[Gatys等人2015;Kwatra等人2003],生成给定类型的图像[Gregor等人2015],预测未来的视频帧[Mathieu等人2016],或使用草图完成程序构建[Nishida等人2016]。早期的研究基于字典学习[Rubinstein et al.2010]或MRFs/CRFs等图形模型。这些模型受到解码过程中所需优化阶段的限制,导致标量隐藏状态和输出变量之间的低阶交互[Kwatra等人,2003]。

  Neural networks overcome this limitation by dealing with structured data differently. In the most widely used formulations, no optimization is required during decoding, which allows the model to (i) resort to a rich componential hidden state and to (ii) use complex interactions between output variables and hidden states. Methods have been proposed which learn a direct (often convolutional) mapping between input and output, e.g. [Dosovitskiy et al. 2015], to generate images of 3D models given object type, viewpoint and color. Probabilistic graphical models (and neural networks), such as Variational Auto-Encoders (VAE), put a strong emphasis on modeling stochastic latent space [Kingma and Welling 2014]. Because they are capable of modeling highly complex interactions, they can also be used to generate images [Gregor et al. 2015; Mansimov et al. 2016]. U-nets [Huang et al. 2016; Ronneberger et al. 2015] map input to output by first decreasing spatial resolution iteratively through a bottleneck and then restoring spatial resolution with upsampling, Unets benefit from additional skip-connections between layers with the same resolution.

  神经网络通过不同的方式处理结构化数据来克服这一限制。在最广泛使用的公式中,解码期间不需要优化,这允许模型(i)求助于丰富的组件隐藏状态,以及(ii)使用输出变量和隐藏状态之间的复杂交互。已经提出了学习输入和输出之间直接(通常是卷积)映射的方法,例如[Dosovitskiy et al.2015],以生成给定对象类型、视点和颜色的三维模型图像。概率图形模型(和神经网络),例如变分自动编码器(VAE),非常重视对随机潜在空间进行建模[Kingma和Welling,2014]。因为它们能够对高度复杂的交互进行建模,所以也可以用来生成图像[Gregor等人2015;Mansimov等人2016]。U-nets[Huang等人2016;Ronneberger等人2015]通过先通过瓶颈迭代降低空间分辨率,然后通过上采样恢复空间分辨率,将输入映射到输出,UNET从具有相同分辨率的层之间的额外跳过连接中受益。

  Ulyanov [2016] used generative convolutional networks to provide textures in multiple resolutions. Li and Wand [2016] used GANs to generate textures without blending, and [Zhu et al. 2016] showed how to use GANs for texturing meaningful manifolds.

  Ulyanov[2016]使用生成卷积网络提供多分辨率的纹理。Li和Wand[2016]使用GANs生成纹理而不进行混合,[Zhu等人2016]展示了如何使用GANs制作纹理。

  The recently proposed Generative Adversarial Networks (GANs) [Goodfellow et al. 2014] are also of stochastic nature. They train two competing networks, a generator network G, able to generate new examples, and a discriminator D, able to discriminate between real examples and generated examples. The generator learns to create realistic looking images which the discriminator is unable to distinguish from the images of the training set. Although VAE provides additional control over the latent space which might help to better enforce constraints on the output, GANs currently produce data of higher quality, which is due to their adversarial loss.Conditional GANs can process additional inputs which allows to learn relationships between pairs of images [Isola et al. 2016]. This has been successfully applied to digital image generation and completion [Mirza and Osindero 2014; Pathak et al. 2016]. Our method also makes use of a conditional GAN to train various terrain synthesizers from carefully designed input samples built from real-world examples. To the best of our knowledge, deep neural networks were not used for terrain synthesis before.

  最近提出的生成性对抗网络(GANs)[Goodfello等人,2014]也具有随机性。它们训练两个相互竞争的网络,一个生成网络G能够生成新的示例,另一个鉴别器D能够区分真实示例和生成的示例。生成器学习创建鉴别器无法与训练集图像区分的逼真图像。尽管VAE提供了对潜在空间的额外控制,这可能有助于更好地对输出实施约束,但GAN目前生产的数据质量更高,这是由于它们的对抗性损失。有条件的GAN可以处理额外的输入,从而可以学习图像对之间的关系[Isola等人,2016]。这已成功应用于数字图像生成和完成[Mirza和Osindero 2014;Pathak等人,2016]。我们的方法还利用条件GAN,从精心设计的输入样本中训练各种地形合成器,这些样本来自真实世界的示例。据我们所知,深度神经网络以前没有用于地形合成。

3 OVERVIEW

Our method consists of a training pre-processing step and an interactive authoring step (Fig. 3). The pre-processing step uses a set of example data-sets to produce a set of units called Terrain Synthesizers that are at the heart of our pipeline. A Terrain Synthesizer takes an input sketch or annotated terrain and produces an output or modified terrain (Section 4).

  我们的方法包括一个训练预处理步骤和一个交互式创作步骤(图3)。预处理步骤使用一组示例数据集来生成一组称为地形合成器的单元,这些单元位于我们管道的核心。地形合成器获取输入草图或注释地形,并生成输出或修改的地形(第4节)。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第3张图片
Fig. 3. Our system is a two stage process. During the training step, we analyze a large input set of example terrains and extract features such as ridge lines,river networks, levelsets or points of interest. The data and the input terrains are used to train a set of conditional Generative Adversarial Networks that learn the correlations between the terrains and the sparse data. During the interactive authoring session, the network synthesizes the terrain from the user sketch.

图3:我们的系统分为两个阶段。在训练步骤中,我们分析大量输入的示例地形,并提取特征,如山脊线、河网、水平集或兴趣点。数据和输入地形用作条件生成对抗网络的训练集,学习地形和稀疏数据之间的相关性。在交互式创作会话期间,网络根据用户草图合成地形。

  We introduce four different terrain synthesizers. The sketch-to-terrain synthesizer S creates a terrain from a sketch containing ridges, rivers, altitude cues or any combination of the three; the levelset-to-terrain synthesizer L turns a binary levelset image into a terrain; the eraser synthesizer R removes a user-specified part of the terrain and completes it, and, finally, the erosion synthesizer E transforms an input terrain into the corresponding eroded terrain.Because each synthesizer is specialized in a specific task, we need to build a set of dedicated databases from real-world examples to learn each synthesis (Section 5). The training step, performed once and for all, is particularly important since the quality and realism of the terrain produced in an authoring session is strongly correlated with the learned synthesis ability. Interestingly, one could easily add Terrain Synthesizers to the pipeline: for example to consider other kinds of sketches.

  我们介绍四种不同的地形合成器。sketch-to-terrain合成器S根据包含山脊、河流、海拔信息或三者任意组合的草图创建地形;levelset-to-terrain合成器L将水平集二值图像转换为地形;橡皮擦合成器R移除并完成用户指定的地形部分,最后,侵蚀合成器E将输入地形转换为相应的侵蚀地形。因为每个合成器都专门用于特定的任务,所以我们需要从现实世界的样本中构建一组专用数据集来学习每个合成(第5节)。一次性完成的训练步骤尤其重要,因为在创作过程中生成的地形的质量和真实性与学习合成能力密切相关。有趣的是,人们可以很容易地将地形合成器添加到流水线中:例如,考虑其他类型的草图。

  The authoring stage (Section 6) starts by loading the terrain synthesizers that are used during the authoring session. The input to our framework is a coarse sketch and the output is a 3D model of a terrain that is created by successive user-edits and optionally adding erosion to the final result. An artist will start by providing a coarse sketch features such as rivers, ridges, some altitude cues, or a combination of them. The input is given to the sketch-to-terrain synthesizer that generates a plausible terrain from it. If the result is not satisfactory, the user can re-edit the sketch and rerun the synthesis or remove parts of the terrain that will then be completed by the eraser synthesizer. After the coarse sketch is finished, the user can erode the terrain by running the erosion synthesizer.

  创作阶段(第6节)从加载创作会话期间使用的地形合成器开始。我们的框架的输入是一个粗略的草图,输出是一个地形的3D模型,该模型是通过连续的用户编辑创建的,并可选地将侵蚀添加到最终结果中。艺术家将首先提供一个粗略的草图特征,如河流、山脊、一些海拔信息,或它们的组合。输入被提供给sketch-to-terrain 合成器,该合成器从中生成一个看似合理的地形。如果结果不令人满意,用户可以重新编辑草图,重新运行合成或删除部分地形,然后由橡皮擦合成器完成。完成粗略草图后,用户可以通过运行侵蚀合成器侵蚀地形。

  Once the user is satisfied with the generated large-scale terrain,small scale details can be added by using a super-resolution technique. We have used an algorithm from [Guérin et al. 2016] to add small-scale details to an existing terrain. We will refer to this method as terrain amplification as it considers the information in the terrain in order to amplify it. This method is particularly well suited for the terrains generated by cGANs, because they contain coherent landforms features, but lack small scale details.

  一旦用户对生成的大比例尺地形感到满意,就可以使用超分辨率技术添加小比例尺细节。我们使用了[Guérin et al.2016]中的一种算法,将小尺度细节添加到现有地形中。我们将这种方法称为地形放大,因为它考虑地形中的信息以放大它。这种方法特别适用于CGAN生成的地形,因为它们包含连贯的地形特征,但缺乏小尺度细节。

4 TERRAIN SYNTHESIZER

A key feature of our approach lies in its ability to synthesize terrains from various types of inputs. In particular, we can synthesize a terrain from different kinds of sketches, complete a terrain with missing data or parts erased during interactive editing, or synthesize an eroded terrain from another input terrain. All these problems can be interpreted as learning a way to predict an output B from an input A. In our setting all terrains are represented as Digital Elevation Models (DEMs) and sketches are represented as images.

  我们的方法的一个关键特征在于它能够从各种类型的输入合成地形。特别是,我们可以从不同类型的草图合成地形,在交互式编辑过程中通过缺失数据或部分删除来完成地形,或者从另一个输入地形合成侵蚀的地形。所有这些问题都可以解释为学习从输入A预测输出B的方法。在我们的集合中,所有地形都表示为数字高程模型(DEM),草图表示为图像。

  Our approach builds on Conditional Generative Adversarial Networks (cGAN) [Isola et al. 2016]. cGANs are pairs of deep networks,a generative network G able to generate B from A and a discriminative network D able to discriminate between real pairs (A, B), i.e.,data from the training set, and fake ones (A, G(A)), data generated by the network G. The name adversarial training derives from the fact that G is trained to fool D and that D tries to avoid being fooled by G. While we are mostly interested in the generative network G,D is crucial to the learning stage because its discriminative power conditions the quality of the generator G. Indeed, the generative network can only become efficient in producing real examples if D is efficient at discriminating real and fake examples. Failure to do so leads to a high error on D’s side for wrong reasons: the discriminators own abilities vs. the quality of the generator’s output. Thus,while G maps images to DEMs, D operates patchwise and classifies the patches (of size 70 × 70) of the test pair as either real (=1) or fake (=0) and outputs the average over the binary decisions for all patches. If B is a real-world DEM and A its extracted sketch, the estimated classification D(A, B) should be close to 1. Conversely, the discriminator should learn to recognize a synthesized pair (A, G(A)) and tend to zero in that case. Following [Isola et al. 2016], this is captured by the following objective function:
E ( A , B ) [ l o g D ( A , B ) ] + E A [ l o g ( 1 − D ( A , G ( A ) ) ) ] . (1) \tag{1} \mathbb{E}_{(\mathbf{A},\mathbf{B})} [log\mathcal {D}(\mathbf{A},\mathbf{B})] + \mathbb{E}_\mathbf{A} [log(1-\mathcal{D}(\mathbf{A,\mathcal{G}(A)}))]. E(A,B)[logD(A,B)]+EA[log(1D(A,G(A)))].(1)

  我们的方法基于条件生成性对抗网络(cGAN)[Isola等人,2016年]。CGAN是成对的深度网络,生成网络G能够从A生成B,判别网络D能够区分真实对(A,B),即来自训练集的数据和假对(A,G(A)),由网络G生成的数据。对抗性训练的名称来源于这样一个事实,即G被训练来欺骗D,D试图避免被G欺骗。虽然我们主要对生成性网络G感兴趣,但D对学习阶段至关重要,因为它的辨别力决定了生成器G的质量。的确,生成网络只有在D能够有效区分真假的情况下才能有效地生成真实的例子。如果不这样做,D端会因为错误的原因导致高错误:鉴别器自身的能力与发电机输出的质量。因此,当G将图像映射到DEM时,D进行分块操作,并将测试对的面片(大小为70×70)分类为真(=1)或假(=0),并输出所有面片的二进制决策的平均值。如果B是真实世界的DEM,a是其提取的草图,则估计的分类D(a,B)应接近1。相反,鉴别器应该学会识别合成对(a,G(a)),并在这种情况下趋于零。在[Isola等人2016]之后,这由以下目标函数得出:

  The expectation is taken over the distribution of the data (A, B).Equation (1) is maximized over the discriminator parameters. The generator should in turn learn to generate DEMs which minimize the discriminator objective (for the discriminator’s best effort), which turns the learning process for the generator parameters into a minimax game:

  期望值接管了数据(A,B)的分布。等式(1)在鉴别器参数上最大化。生成器应依次学习生成DEM,使鉴别器目标最小化(为了鉴别器尽最大努力),从而将生成器参数的学习过程转化为一个极大极小博弈:

m i n G   m a x D   E ( A , B ) [ l o g D ( A , B ) ] + E A [ l o g ( 1 − D ( A , G ( A ) ) ) ] . \underset {G}{min}\, \underset {D}{max} \, \mathbb{E}_{(\mathbf{A},\mathbf{B})} [log\mathcal {D}(\mathbf{A},\mathbf{B})] + \mathbb{E}_\mathbf{A} [log(1-\mathcal{D}(\mathbf{A,\mathcal{G}(A)}))]. GminDmaxE(A,B)[logD(A,B)]+EA[log(1D(A,G(A)))].
  The above adversarial objective with respect to G does not use the ground truth image B, but checks (through the discriminator) whether the generated image lies on the data manifold. In practice,this does not provide enough supervision for efficient learning. To alleviate this lack of supervision, it is common to add a regularization term involving the ground truth image B to the objective, e.g.gradient difference loss [Mathieu et al. 2016] or L1 regularization ||B−G(A)||1, as in [Isola et al. 2016]. We chose the latter formulation.The additional term only has an impact on the generator training.

  关于 G \mathcal{G} G的上述对抗性目标不使用地面真实图像B,而是检查(通过鉴别器)生成的图像是否位于数据歧管上。实际上,这并不能为有效的学习提供足够的监督。为了缓解这种监督不足的情况,通常会在目标中添加涉及地面真实图像B的正则化项,例如梯度差损失[Mathieu等人,2016]或L1正则化∥B−G(A)∥1,如[Isola等人,2016]所述。我们选择了后者。附加术语仅对生成器训练产生影响。

  Contrary to standard GAN formulations, we do not add any noise input to the generator G \mathcal{G} G, and provide noise (for stochasticity) only in the form of dropout [Krizhevsky et al. 2012], i.e. switching off units randomly during training and testing with probability p=0.5. Thus running the synthesizer twice will yield slightly different results. In our experiments, we observed that the results only slightly varied when running the synthesizer on the same input several times (Fig. 5)

  与标准GAN公式相反,我们不向生成器 G \mathcal{G} G添加任何噪声输入,仅以dropout的形式提供噪声(随机性)[Krizhevsky等人,2012],即在训练和测试期间随机关闭单元,概率p=0.5。因此,两次运行合成器将产生略有不同的结果。在我们的实验中,我们观察到当在同一输入上运行合成器几次时,结果只有轻微变化(图5)
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第4张图片
Fig. 5. The same input produces slightly different outputs when executed several times. While small scale details can be different, we observed that the main landforms features remain the same
图5。同一输入在执行多次时产生的输出略有不同。虽然小规模的细节可能有所不同,但我们观察到,主要的地貌特征保持不变

  The network architectures have been adapted from [Radford et al. 2016] and [Isola et al. 2016]. The generator architecture is an encoder-decoder network with an encoding part composed of a sequence of fully-convolutional layers (convolutions filters of size 4 × 4) and resolution reductions, and a decoder composed of a sequence of deconvolutions/upsampling. In the decoding part, each layer is thus connected to a layer of lower resolution, and additional skip-connections connect it to the encoder layer of identical resolution (U-net). These additional connections allow to bypass the encoder-decoder bottleneck by transmitting low-level information from the input directly to the output. The number of features in the generator in the successive layers is: 64, 128, 256, 512, 512, 512,and 512. There is a single output channel storing the terrain altitude,and the number of input channels varies from one (for levelset and erosion synthesizers) to three (for sketch and eraser synthesizers).

  网络架构已根据[Radford et al.2016]和[Isola et al.2016]进行了调整。生成器体系结构是一个编码器-解码器网络,其编码部分由全卷积层序列(大小为4×4的卷积滤波器)和分辨率降低组成,解码器由反卷积/上采样序列组成。在解码部分中,每一层因此连接到较低分辨率的层,并且额外的跳过连接将其连接到相同分辨率的编码器层(U-net)。这些额外的连接允许通过将低级信息从输入直接传输到输出来绕过编码器-解码器瓶颈。生成器中连续层中的特征数为:64、128、256、512、512、512和512。有一个单独的输出通道存储地形高度,输入通道的数量从一个(用于水平集和侵蚀合成器)到三个(用于草图和橡皮擦合成器)。

  Our training follows the Image-to-Image network training [Isola et al. 2016]. We use a stochastic gradient descent with mini-batches of size one, the Adam optimizer [Kingma and Ba 2015], and the batch normalization [Ioffe and Szegedy 2015]. We alternate between gradient updates of the generator and gradient updates of the discriminator [Goodfellow et al. 2014]. We use up to 500 epochs, which produces less artifacts in the output terrain. In order to introduce more variability to the training data, we randomly use both vertical and horizontal flipping in addition to the standard cropping area.

  我们的训练遵循图像对图像网络训练[Isola等人,2016年]。我们使用随机梯度下降法,对一号小批量、Adam优化器[Kingma and Ba 2015]和批量标准化[Ioffe and Szegedy 2015]进行优化。我们交替使用生成器的梯度更新和鉴别器的梯度更新[Goodfello等人,2014年]。我们使用多达500个纪元,这在输出地形中产生的伪影更少。为了给训练数据引入更多的可变性,除了标准种植面积外,我们还随机使用垂直和水平翻转。

5 TRAINING

Our framework needs to learn mappings from sketches to real world terrains from a set of training pairs {(A, B)} that are input to both networks (Fig. 4). Since we cannot ask an artist to generate a large database of sketch-terrain pairs, we use an automatic generation of those pairs which will govern the quality of the output terrain.

  我们的框架需要从训练对{(A, B)}集合中学习从草图到真实世界地形的映射,并输入到所有的(图4)。因为我们不能要求艺术家生成一个大型的草图地形对数据库,所以我们使用自动生成的这些对来控制输出地形的质量。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第5张图片
Fig. 4. Overview of the training of a cGAN: The discriminator D learns to classify between real and synthesized pairs, whereas the generator learns to fool the discriminator.
图4。cGAN训练概述:鉴别器D学习在真实对和合成对之间分类,而生成器学习欺骗鉴别器。

  Our approach takes a real-world terrain as B, uses a dedicated algorithm that generates A, and adds the pair (A, B) to the training set. Notice that the trained synthesizers scales are bound by the scale of the training terrain datasets. In this section, we describe our automatic training set generation. The data source and statistics about the training process are detailed in Section 7.1.

  我们的方法将真实世界中的地形视为B,使用一个生成A的专用算法,并将(A,B)对添加到训练集中。请注意,经过训练的合成器比例受训练地形数据集的比例约束。在本节中,我们将介绍自动生成训练集。第7.1节详细介绍了训练过程的数据来源和统计数据。

5.1 Sketch-to-terrain Synthesizer Training

Sketches can contain altitude cues, rivers, mountain ridges, or any combination of these.
草图可以包含海拔信息、河流、山脊或这些元素的任意组合。

River networks are obtained by simulating the water flow on a terrain and detecting the pixels with high water accumulation. We generate river networks from the terrain elevation using a modified river channel network algorithm inspired by [Tarboton et al. 1991].We seed water over all the grid points of the terrain and simulate flow using a modified steepest descent D8 algorithm, which routes all flow to the neighboring point to which there is the steepest downward slope [O’Callaghan and Mark 1984].

  河网是通过模拟地形上的水流并检测高积水的像素来获得的。我们使用[Tarboton et al.1991]的改进河道网络算法,从地形高程生成河网。我们在地形的所有网格点上播种水分,并使用改进的最陡下降D8算法模拟水流,该算法将所有水流汇聚到具有最陡向下坡度的相邻点[O’Callaghan and Mark 1984]。

  In order to prevent the water from following always the same path, we use a stochastic direction at every step where the probability is proportional to the height difference between the current pixel and the candidate neighbor. The local minima are processed stochastically: water stuck in a local minimum leaves it with a low probability, or simply disappears. This process yields very precise river networks which may be problematic because it does not correspond to a real user sketch of a river network. A user would indeed provide coarse directions to the river network and would not draw every single river twist.

  为了防止水总是沿着同一条路径流动,我们在每一步都使用一个随机方向,其中概率与当前像素和候选邻居之间的高度差成正比。局部极小值是随机处理的:陷入局部极小值的水以较低的概率离开它,或者干脆消失。这个过程会产生非常精确的河网,这可能是有问题的,因为它与河网的真实用户草图不一致。用户确实会向河网提供粗略的方向,不会绘制每一条河流的扭曲。

  To alleviate this effect, the terrain is blurred and down-sampled before the flow simulation and the resulting water accumulation is up-sampled to get the rivers at the initial resolution. A final orphological operation is applied to the result in order to obtain a clean 1-pixel width skeleton. Hence the synthesizer training algorithm is provided with inputs that are coarse river directions and it learns to not strictly respect constraints, thus allowing more flexibility in the generator. Fig. 6 shows examples of terrains and their detected river network.

  为了缓解这种影响,在水流模拟之前,对地形进行模糊和向下采样,并对由此产生的积水进行向上采样,以获得初始分辨率的河流。最后对结果进行形态学运算,以获得干净的1像素宽骨架。因此,合成器训练算法的输入是粗略的河流方向,它学习不严格遵守约束,从而允许生成器具有更好的灵活性。图6显示了地形及其检测到的河网的示例。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第6张图片

Fig. 6. Extracted features from different input terrains

  This pre-processing has a great impact on the training, as illustrated in Fig. 8 which shows examples of generated terrains when the dataset has not been blurred prior to the feature extraction. In this case, the extracted features that feed the training are more precise and dense. In this over-constrained context, the synthesizer fails at reconstructing a terrain when the sketch in not dense enough,and even with a greater number of strokes, the generated terrain does not follow the sketch. Using blurred terrains for feature extraction thus makes the synthesis more robust to imprecise and sparser sketches.

  这种预处理对训练有很大影响,如图8所示,图8显示了在特征提取之前数据集未模糊时生成的地形的示例。在这种情况下,为训练提供信息的提取特征更加精确和密集。在这种过度约束的环境中,当草图不够密集时,合成器无法重建地形,即使笔划数量更多,生成的地形也不会跟随草图。因此,使用模糊地形进行特征提取可以使合成对不精确和稀疏的草图更具鲁棒性。

Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第7张图片
Fig. 8. Comparison of synthesis results when the network is trained with features extracted on non-blurred data (top) and blurred data (bottom). In the first case, the synthesizer needs more input sketches to reconstruct the terrain (top right). With a small number of strokes, visual artifacts appear (top left and middle). This can be avoided when blurred terrain data are used to extract the features (bottom row).
图8。当使用在非模糊数据(顶部)和模糊数据(底部)上提取的特征训练网络时,比较合成结果。在第一种情况下,合成器需要更多的输入草图来重建地形(右上角)。只有少量笔划,就会出现视觉伪影(左上和中上)。当模糊的地形数据用于提取特征(底行)时,可以避免这种情况。

  Ridges are detected by inverting the terrain and applying the river detection algorithm. It is the opposite operation to river detection and Fig. 6 shows examples of detected ridges.

  通过反转地形并应用河流检测算法来检测山脊。这是与河流检测相反的操作,图6显示了检测到的山脊的示例。

  Altitude cues are computed as a sparse set of peak and basin points over the terrain with an approximate elevation. Basin points are defined as points where the previous water flow accumulated above a chosen threshold. Conversely, peak points can be defined in a similar way by inverting the elevation of the terrain.

  海拔信息计算为地形上具有近似高程的一组稀疏峰点和盆地点。流域点是指以前的水流量累积超过选定阈值的点。相反,可以通过反转地形高程以类似的方式定义峰值点。

  The full example set is generated by providing random combinations of the sketch cues by using different color channels of the images. We map the detected river layer to the blue channel, the ridge layer to the red channel, and the altitude to the green channel.If the sketch does not contain one of these cues, the corresponding channel is set to zero. Fig. 7 shows examples of our training pairs.

  通过使用图像的不同颜色通道提供草图线索的随机组合,生成完整的样本集。我们将探测到的河流层映射到蓝色通道,将山脊层映射到红色通道,并将高度映射到绿色通道。如果草图不包含这些信息之一,则相应的通道将设置为零。图7显示了我们的训练对示例。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第8张图片

Fig. 7. Different kinds of multichannel sketches generated for the sketch-to-terrain training set
图7. 为草图到地形训练集生成的不同类型的多通道草图

5.2 Levelset-to-terrain Synthesizer Training

As an alternative to sketching ridges, river curves, and altitude cues,the user can provide large areas of constant elevation that we call levelsets. These are provided as binary images that indicate areas in the terrain where the altitude should be above a given percentile of the altitude distribution (60% in our implementation). This levelset synthesizer serves a different purpose and it cannot be used jointly with the sketch-to-terrain synthesizer. Although different percentile choices could be made, we found that 60% yielded the most intuitive drawing tool. The example set for this training is easily constructed by blurring the DEMs and thresholding the altitude at the provided percentile. Fig. 9 shows three examples of the training pairs. Once again this example generation involves taking a real-world terrain B and creating the corresponding levelset input A as an entry (A, B) to the training stage.

  作为绘制山脊、河流曲线和海拔信息的替代方案,用户可以提供大面积的恒定海拔,我们称之为水平集。这些以二值图像的形式提供,指示地形中海拔应高于给定海拔分布百分位(在我们的实现中为60%)的区域。此水平集合成器的用途不同,不能与sketch-to-terrain一起使用。虽然可以做出不同的百分位选择,但我们发现60%的人可以得到最直观的绘图工具。通过模糊DEM并在提供的百分位数处设置高度阈值,可以轻松构建该训练的示例集。图9示出了训练对的三个示例。这个样本生成再次涉及到获取真实世界的地形B,并创建相应的水平集输入A,作为训练阶段的入口(A,B)。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第9张图片

Fig. 9. Levelset examples. The levelset is represented in white.
图9. 水平集示例,水平集以白色表示。

5.3 Eraser Synthesizer Training

Another useful terrain design tool is an eraser synthesizer working directly on the DEM, that removes parts of a terrain and infers its completion. To train this synthesizer, a real-world terrain B is modified through the addition of a random number of disks with random sizes that define the missing parts. We represent the annotated terrain A as a two-channel image Zα, where Z denotes the elevation channel and α the erasure channel. The elevation of the erased terrain part is set to 0, while the α channel is set to 1. B is defined as the complete terrain. The pair (A, B) is added to the training database for the eraser synthesizer (Fig. 11)

  另一个有用的地形设计工具是直接在DEM上工作的橡皮擦合成器,它可以移除部分地形并推断其完成情况。为了训练这个合成器,通过添加随机数量的圆盘来修改真实世界的地形B,这些圆盘具有定义缺失部分的随机大小。我们将带注释的地形A表示为双通道图像Zα,其中Z表示高程通道,α表示擦除通道。已删除地形部分的高程设置为0,而α通道设置为1。B被定义为完整的地形。这对(A,B)被添加到橡皮擦合成器的训练数据库中(图11)
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第10张图片

Fig. 11. Eraser synthesizer training example pairs.
图11. 橡皮擦合成器训练示例对。

5.4 Erosion Synthesizer Training

The erosion examples generation proceeds slightly differently from the previous cases. Recall that sketch-to-terrain, levelset-to-terrain,and eraser synthesizers used real-terrains as input B and computed A. However, it is difficult to find real-world data for a terrain and its corresponding eroded version. Instead, we create the erosion examples by taking a real-world terrain as input A and computing the corresponding data B = e(A) by simulating erosion e over A (Fig. 12).

  侵蚀发生的过程与之前的情况略有不同。回想一下,sketch to terrain、levelset to terrain和橡皮擦合成器使用真实地形作为输入B和计算A。然而,很难找到地形及其相应侵蚀版本的真实数据。相反,我们通过将真实世界的地形作为输入A,并通过模拟A上的侵蚀e来计算相应的数据B=e(a),从而创建侵蚀样本(图12)。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第11张图片
Fig. 12. Erosion synthesizer training pair examples

  Our approach consists in learning an algorithm that mimics the behavior of a simulation. Inspired by [Cordonnier et al. 2017b], we simulate both interleaved large-scale hydraulic and thermal erosion.Our terrain-erosion model relies on a discrete layered model representing different materials (bedrock, rocks and fine grain sediments).Temperature variations and rainfall trigger aging and weathering events, such as water runoff transporting sediments, or fracture of the bedrock into rock-slides. The simulation computes the evolution of the layered model by stochastically applying a large number of events to the cells of the terrain.

  我们的方法包括学习模仿模拟行为的算法。受[Cordonnier等人2017b]的启发,我们模拟了交错的大规模水力侵蚀和热侵蚀。我们的地形侵蚀模型依赖于代表不同材料(基岩、岩石和细粒沉积物)的离散分层模型。温度变化和降雨会引发老化和风化事件,如水径流输送沉积物,或基岩破裂成岩石滑坡。模拟通过随机地将大量事件应用于地形单元来计算分层模型的演化。

  Although it may appear counter-intuitive to learn a process that can be simulated, our goal is to take advantage of the efficiency of synthesizers at run time to provide interactive feedback to the user.This method is an approximation of complex erosion phenomena that runs extremely fast as opposed to computationally demanding simulations. The idea of simulating complex and hard-to-simulate phenomena using neural network is inspired by learning computationally expensive iterative processes such as image filters [Xu et al.2015] and style transfer [Johnson et al. 2016; Ulyanov et al. 2016].
  虽然学习一个可以模拟的过程似乎有违直觉,但我们的目标是利用合成器在运行时的效率,向用户提供交互式反馈。这种方法是对复杂侵蚀现象的一种近似,与需要计算的模拟相比,它的运行速度非常快。使用神经网络模拟复杂且难以模拟的现象的想法受到学习计算成本高昂的迭代过程的启发,如图像过滤器[Xu等人2015]和风格转换[Johnson等人2016;Ulyanov等人2016]。

6 AUTHORING

Interactive authoring takes place after the network training preprocessing step and it is a two-step workflow (Fig. 3). The user first draws a coarse sketch and incrementally edits it by adding,modifying, and removing curves or carving level-sets. The user then refines the terrain by using optional erosion and amplification that generates the final high resolution model.

  交互式创作发生在网络训练预处理步骤之后,它是一个两步工作流(图3)。用户首先绘制一个粗略的草图,然后通过添加、修改和删除曲线或雕刻标高集,对其进行增量编辑。然后,用户通过使用可选的侵蚀和放大来优化地形,从而生成最终的高分辨率模型。

6.1 Terrain Sketching

Our system uses the terrain synthesizers to generate terrains corresponding to the user-provided sketch at runtime. The user initially sketches a river network, a ridge network, elevation cues, or any combinations of the three and the synthesizer generates a terrain. The user may add or modify ridges, rivers, elevation cues or remove some parts of the sketch and see the results in real time as applying the terrain synthesizer is very efficient and takes around 50ms per generation.An example in Fig. 10 shows an authoring session of an artist providing initial ridges, then adding rivers, and finally elevation cues. Another example in Fig. 2 shows an authoring session by a novice user. The user first defined ridges, then added rivers, and modified the terrain by providing a set of altitude cues.

  我们的系统使用地形合成器在运行时生成与用户提供的草图相对应的地形。用户最初绘制河流网络、山脊网络、海拔信息或三者的任意组合,合成器生成地形。用户可以添加或修改山脊、河流、高程信息,或删除草图的某些部分,并实时查看结果,因为应用地形合成器非常有效,每次生成大约需要50毫秒。图10中的一个示例显示了艺术家的创作过程,该过程提供了最初的山脊,然后添加河流,最后是高程信息。图2中的另一个示例显示了新手用户的创作会话。用户首先定义山脊,然后添加河流,并通过提供一组海拔信息来修改地形。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第12张图片
Fig. 10. Example of an interactive authoring session performed by a professional artist: it took him a only a few minutes to design the structure of a large terrain by using ridges (left), adjusting the generated terrain to his intent by incrementally adding rivers (middle), and defining some elevation points (right).

图10。一个由专业艺术家执行的交互式创作会话的示例:他只花了几分钟就设计了一个大地形的结构,方法是使用山脊(左),通过增量添加河流(中)调整生成的地形,并定义一些高程点(右)。

  A key feature of our approach is that it allows the user to use different types of sketching models as input. Instead of sketching with ridge and river curves, the user can interactively edit a levelset,and use the corresponding synthesizer to generate the terrain. Fig. 13 shows three consecutive steps of an interactive level set authoring session: starting from a circular shape, the user erased the center before adding more details. This drawing tool is fast and easy to use,however it provides less control than the curve sketches. The eraser synthesizer can quickly regenerate terrains with missing parts and produces consistent models (Fig. 14)

  我们方法的一个关键特性是,它允许用户使用不同类型的草图模型作为输入。用户可以交互编辑水平集,并使用相应的合成器生成地形,而不是使用山脊和河流曲线绘制。图13显示了交互式水平集创作会话的三个连续步骤:从圆形开始,用户在添加更多细节之前擦除中心。此绘图工具快速且易于使用,但与曲线草图相比,它提供的控制较少。橡皮擦合成器可以快速重建缺失部分的地形,并生成一致的模型(图14)

Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第13张图片
Fig. 13. The iterative sketching can be used to generate complex shapes. Here the user sketches the Siggraph logo by adding a disk, carving a part of the levelset out, and finally adding details. This whole editing sequence is performed using the levelset-to-terrain synthesizer

图13。迭代绘制可用于生成复杂形状。在这里,用户通过添加一个圆盘、雕刻levelset的一部分并最终添加细节来绘制Siggraph徽标。整个编辑序列使用levelset to terrain合成器执行
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第14张图片
Fig. 14. Example of a terrain automatically generated by the eraser synthesizer tool that fills parts removed by the user.
图14。橡皮擦合成器工具自动生成的地形示例,用于填充用户移除的部分。

6.2 Terrain Refinement

Terrain refinement encompasses the processes of erosion and amplification that improve the overall realism of the generated terrain and increase its resolution.Erosion: Once the coarse sketch terrain is provided, the user can apply erosion to it. The erosion synthesizer mimics erosion algorithms at a very small computational cost as opposed to numerical simulations. Fig. 15 illustrates the simulated erosion on real world terrains and compares it with the learned erosion. The computation time of our trained erosion-synthesizer is three order of magnitude faster (25ms vs 40, 000ms on a terrain of resolution 256 × 256) compared to a simulated erosion.

  地形优化包括侵蚀和放大过程,以提高生成地形的整体真实性并提高其分辨率。侵蚀:一旦提供了粗略的地形草图,用户就可以对其应用侵蚀。与数值模拟相比,侵蚀合成器以非常小的计算成本模拟侵蚀算法。图15展示了真实世界地形上的模拟侵蚀,并将其与学习到的侵蚀进行了比较。与模拟侵蚀相比,我们训练的侵蚀合成器的计算时间快了三个数量级(在分辨率为256×256的地形上,计算时间分别为25ms和4000ms)。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第15张图片
Fig. 15. Simulating the erosion of a terrain comes at a very small cost at runtime.
图15。在运行时,模拟地形侵蚀的成本非常小

  Terrain amplification: After the large-scale terrain has been generated and erosion has possibly been applied, the final step is to add more details by using terrain amplification (see Section 3). We use the patch-based amplification method proposed in [Guérin et al.2016] that builds high and low resolution patch dictionaries and decomposes the terrain onto them. Although it would be possible to also train a terrain synthesizer for the amplification, this would require learning several synthesizers for each resolution gain, whereas the sparse-amplification performs this operation very efficiently. Because the cGANs generate coherent large-scale terrains, the terrain amplification is well-suited to match terrain details to large scale terrain patches (Fig. 16).

  地形放大:在生成大规模地形并可能施加侵蚀后,最后一步是使用地形放大功能添加更多细节(见第3节)。我们使用[Guérin et al.2016]中提出的基于斑块的放大方法,构建高分辨率和低分辨率的斑块字典,并将地形分解到它们上。虽然也可以为放大训练地形合成器,但这需要为每个分辨率增益学习多个合成器,而稀疏放大非常有效地执行此操作。由于CGAN生成连贯的大规模地形,地形放大非常适合将地形细节与大规模地形块匹配(图16)。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第16张图片
Fig. 16. Comparison between a synthesized terrain before (left) and after amplification (right). Terrain amplification process introduces details without breaking the landform features generated by the synthesizer as can be seen in the image inset.
图16。放大前(左)和放大后(右)合成地形之间的比较。地形放大过程在不破坏合成器生成的地形特征的情况下引入细节,如图中插图所示。

6.3 Integration with Large Scale Terrain Modeling

A key feature of our approach is its ability to analyze input DEMs and generate sketch representations which can be used as input data in the synthesizers S. Our method enables artists to generate large scale terrains featuring some specific regions that they authored in full detail in a seamless fashion. The overall process proceeds in three steps (Fig. 17). First, given several high-resolution input DEM patches A k A_k Ak embedded in a larger domain Ω, we down-sample and analyze them to produce their corresponding low-resolution curve or levelset sketches B k B_k Bk. The user then completes the coarse sketch over the remainder of the domain Ω − ( U k A k U_kA_k UkAk)to get a new representation eB. Finally, we generate the terrain A from eB and locally smoothly blend it with the prescribed patches Ak.The analysis of the features of the detailed input patches allows us to obtain a large scale DEM whose major landform features are consistent with the prescribed patches’ ones. Therefore, the final blending, although simple and straightforward, generates a coherent DEM. Fig. 17 shows an example of our high level and very efficient authoring approach. The professional artist created the 32 × 32 k m 2 km^2 km2terrain featuring three specific landforms in less than 15 minutes.

  我们的方法的一个关键特征是,它能够分析输入DEM并生成草图表示,这些草图表示可以用作合成器中的输入数据。我们的方法使艺术家能够以无缝的方式生成具有某些特定区域的大规模地形,这些区域是他们完整详细地创作的。整个过程分三步进行(图17)。首先,给定几个高分辨率的输入DEM补丁, A k A_k Ak嵌入到一个更大的域中Ω, 我们向下采样并分析它们,生成相应的低分辨率曲线或水平集草图 B k B_k Bk。然后用户在域的其余部分完成粗略草图Ω − ( U k A k U_kA_k UkAk)获得新的代理权。最后,我们从 e ( B ) e(B) e(B)生成地形 A A A,并将其与指定的面片Ak进行局部平滑混合。通过对详细输入斑块特征的分析,我们可以获得一个大比例尺的DEM,其主要地形特征与指定斑块的特征一致。因此,最终的混合虽然简单而直接,但会生成一个连贯的DEM。图17显示了我们的高水平和非常高效的创作方法的示例。这位专业艺术家在不到15分钟的时间内创造了32×32 k m 2 km^2 km2的地形,其中包括三种特定的地貌。

Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第17张图片
Fig. 17. Our method can generate terrains from sketches that have vast empty areas. In the initial setup, three small terrain patches of 4 × 4 km2 were carefully authored and located by the designer on the large empty square terrain of size 32 × 32 km2. The analysis of the patches produced the initial local set of local ridges, rivers, and elevation landmarks, which were completed by user-defined sketches over the remainder of the domain. The terrain was automatically generated by the sketch-synthesizer S, and the patches blended with the terrain.

图17。我们的方法可以从具有巨大空白区域的草图生成地形。在初始设置中,设计师在32×32 k m 2 km^2 km2的大面积空白正方形地形上仔细绘制并定位了三个4×4 k m 2 km^2 km2的小地形块。对斑块的分析产生了最初的局部山脊、河流和高程目标,这些地标由用户定义的草图在域的其余部分完成。地形由草图合成器S自动生成Patch与地形混合

7 RESULTS AND DISCUSSION

Generation of the training database has been implemented in Matlab® and C++ and interfaced with TensorFlow for the Deep Learning part.We adapted the cGAN code provided by the authors of [Isola et al. 2016] to process DEM data. Training was performed on a NVidia®Titan X graphics card with 12 Gb of memory clocked at 1.076 Ghz.Our interactive editing application was implemented in C++ and uses Qt and OpenGL for rapid previsualization. Interactive editing performed on a standard desktop computer equipped with an Intel Core i7 CPU clocked at 3.4 GHz and with a NVidia® GTX 970. For visualization purposes, we added a procedural texture to our synthesized terrains. The photorealistic landscape images were rendered with the Vue® software. Unless stated otherwise, all high quality results use amplification.

  训练数据库的生成已经在Matlab®和C++中实现,通过TensorFlow接口实现的深度学习部分相连接。我们采用了[Isola等人2016]的作者提供的cGAN代码来处理DEM数据。训练是在NVidia®Titan X图形卡上进行的,该图形卡的内存为12 Gb,时钟频率为1.076 Ghz。我们的交互式编辑应用程序是在C++中实现的,并使用Qt和OpenGL进行快速预可视化。在配备英特尔Core i7处理器(时钟为3.4 GHz)和NVidia®GTX 970的标准台式计算机上执行交互式编辑。为了可视化,我们在合成的地形中添加了程序纹理。使用Vue®软件渲染照片级真实感景观图像。除非另有说明,所有高质量的结果都使用放大。

7.1 Database and training

Our real-world terrain database includes DEMs extracted from USGS Earth explorer. We used 35 patches of one square degree at a precision of one arc-second taken from NASA SRTM. Each patch consists of a 3, 600×3, 600 resolution grid and each cell represents horizontal area of approximately 30 × 30 meters. We used 16 bits gray-scale in our implementation with a vertical resolution of 1m. Table 1 reports statistics for generating the different databases and training the network.

  我们的真实世界地形数据库包括从美国地质勘探局地球探测器中提取的DEM。我们使用了35块1平方度的补丁,精度为1弧秒,来自NASA SRTM。每个面片由一个3600×3600分辨率的网格组成,每个单元代表大约30×30米的水平面积。我们在实现中使用了16位灰度,垂直分辨率为1m。表1报告了生成不同数据库和训练网络的统计数据。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第18张图片
Table 1. Timings (in hours) for the learning of terrain synthesizers
表1.学习地形合成器的时间(小时)

  The structure of the generator network is linked to the input terrain resolution, therefore all generated terrains will have the same resolution. Because of the fully-convolutional nature of the synthesizer, we are able to generate terrains from sketches of arbitrary size. While the spatial resolution will remain unchanged (i.e.,the pixel size will represent the same distance), the total size of the synthesized terrain can be larger. The only limitation of this process is the amount of GPU memory. In our implementation, we were able to synthesize terrains up to a resolution of 1024 × 1024.

  生成网络的结构与输入地形分辨率有关,因此所有生成的地形都具有相同的分辨率。由于合成器的完全卷积特性,我们能够从任意大小的草图生成地形。虽然空间分辨率将保持不变(即,像素大小将表示相同的距离),但合成地形的总大小可以更大。这个过程的唯一限制是GPU内存量。在我们的实现中,我们能够合成高达1024×1024分辨率的地形。

7.2 Comparisons

In this section, we compare our method to other sketching tools, and evaluate the performance of our erosion synthesizer with respect to physically-based simulations Several terrain sketching algorithms have been proposed in computer graphics. Zhou et al. [2007] proposed an example-based terrain authoring method based on texture synthesis techniques that generates terrains by combining patches from an input sketch and mountain range style image. Here we reproduce the lambda-shaped mountain range from their work that was sketched as a ridge without any additional information (Fig. 18). We used the sketch-toterrain synthesizer on the sketch to generate the final terrain. It is important to note that our cGAN-based method allows for an interactive editing and does not require any input patches from the terrain. The features obtained by [Zhou et al. 2007] are slightly sharper than ours. We obtain similar small-scale sharp ridges and faults when completing our deep-learning-based terrain generation with amplification.
  在本节中,我们将我们的方法与其他绘制工具进行比较,并评估侵蚀合成器在基于物理的模拟方面的性能计算机图形学中已经提出了几种地形绘制算法。Zhou等人[2007]提出了一种基于纹理合成技术的基于示例的地形创作方法,该方法通过将输入草图中的面片与山脉风格的图像相结合来生成地形。在这里,我们根据他们的工作重现了lambda形状的山脉,该山脉被绘制为山脊,没有任何额外信息(图18)。我们在草图上使用了sketch-to-terrain合成器来生成最终的地形。需要注意的是,我们基于cGAN的方法允许交互式编辑,并且不需要来自地形的任何输入面片。[Zhou et al.2007]获得的特征比我们的略为清晰。在完成基于深度学习的地形生成和放大时,我们会获得类似的小规模尖锐山脊和断层。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第19张图片
Fig. 18. Comparison between the example-based method of [Zhou et al.2007] and our method.
图18。[Zhou等人2007]的基于实例的方法与我们的方法之间的比较。

  Hnaidi et al. [2010] proposed a terrain sketching approach that also uses sketches of ridges and rivers networks to synthesize a terrain using diffusion. An important limitation of this method lies in the amount of information that is required to generate the terrain: rivers and ridges should be precisely sketched and their elevations should be prescribed (Fig. 19). In contrast, our approach generates realistic terrains even from coarse sketches, because the synthesizers learned to generate more details from less input information. Without any derivative constraints on the ridges, Hnaidi et al.[2010] amounts to a simple heat diffusion yielding unrealistic smooth plateaus (Fig. 19).

  Hnaidi等人[2010]提出了一种地形绘制方法,该方法还使用山脊和河流网络的草图,通过扩散合成地形。该方法的一个重要限制在于生成地形所需的信息量:河流和山脊应精确绘制,并应规定其高程(图19)。相比之下,我们的方法甚至可以从粗略的草图中生成真实的地形,因为合成器学会了从较少的输入信息中生成更多细节。Hnaidi等人[2010]在没有对山脊进行任何衍生约束的情况下,相当于一个简单的热扩散,产生了不切实际的平滑高原(图19)。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第20张图片
Fig. 19. Comparison between the diffusion method of [Hnaidi et al. 2010] (left) and our sketch synthesizer (right). Without additional gradient information and noise parameters, the diffusion-based method produces unnatural smooth terrains.
图19。[Hnaidi et al.2010]的扩散法(左)和我们的草图合成器(右)之间的比较。在没有额外梯度信息和噪声参数的情况下,基于扩散的方法会生成不自然的平滑地形。

  We further compare with the work [Guérin et al. 2016] (Fig. 20).The input is a levelset binary image that is fed to the leveset-toterrain synthesizer for our method, while it is first smoothed then processed by the sparse terrain approach since this method requires a smooth sketch as input. Our approach manages to synthesize plausible terrains even at large scales, whereas the sparse modeling approach yields an unrealistic result because it does not take into account large scale features.

  我们进一步比较了这项工作[Guérin et al.2016](图20)。输入是一个水平集二值图像,该图像被输入到leveset-to-terrain合成器,用于我们的方法,而它首先被平滑,然后通过稀疏地形方法进行处理,因为该方法需要一个平滑的草图作为输入。我们的方法能够在大尺度下合成合理的地形,而稀疏建模方法由于没有考虑大尺度特征而产生了不切实际的结果。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第21张图片
Fig. 20. Comparison between the sparse method from [Guérin et al. 2016] and our levelset synthesizer. Our method produces a vast variety of landforms features whereas sparse modeling reproduces similar details
图20.比较[Guérin等人2016]的稀疏方法和我们的水平集合成器。我们的方法产生了各种各样的地貌特征,而稀疏建模重现了类似的细节

  We also compared our results with baseline patch-based method based on the PatchMatch algorithm [Barnes et al. 2009] that finds approximate image patch correspondences. The input was first sketched by using heat diffusion and then matched to an 901 × 901 exemplar terrain; a large terrain tile used in our dataset. To allow for better correspondences, the terrain exemplar was blurred for the matching step and used in its full resolution for the reconstruction step. Two synthesis examples are shown in Fig. 21. The first is the traditional reconstruction minimizing the bidirectional similarity (BDS) metric defined in [Barnes et al. 2009] by copying pixel values from the terrain exemplar. The second one matches gradient values instead of pixel values followed by BDS minimization and Poisson solving. While direct PatchMatch reconstruction exhibits strong patch artifacts, the gradient-based reconstruction generates fewer artifacts, but fails at recovering smaller-scale structures provided by the exemplar terrain. Our method quickly shows large and medium-scale features but fails at generating small-scale features.

  我们还将我们的结果与基于PatchMatch算法[Barnes et al.2009]的基于基线面片的方法进行了比较,该算法可以找到近似的图像面片对应关系。输入首先通过热扩散绘制,然后匹配到一个901×901的示例地形;我们的数据集中使用了一个大的地形图块。为了获得更好的对应关系,匹配步骤对地形样本进行了模糊处理,并在重建步骤中使用其全分辨率。图21显示了两个合成示例。第一种是通过复制地形样本中的像素值来最小化[Barnes et al.2009]中定义的双向相似性(BDS)度量的传统重建。第二种方法是匹配梯度值,而不是像素值,然后进行BDS最小化和泊松求解。虽然直接PatchMatch重建显示出很强的斑块伪影,但基于梯度的重建生成的伪影较少,但无法恢复样本地形提供的较小规模结构。我们的方法快速显示大、中尺度特征,但无法生成小尺度特征。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第22张图片
Fig. 21. Comparisons with baseline patch-based methods: left image shows the direct reconstruction (10s), middle shows gradient-based reconstruction (15s), right shows the terrain generated by our method (25ms). Our method quickly shows large and medium scale features but needs further processing to generate small-scale features.

图21。与基于基线面片的方法的比较:左侧图像显示直接重建(10s),中间显示基于梯度的重建(15s),右侧显示我们的方法生成的地形(25ms)。我们的方法可以快速显示大、中尺度特征,但需要进一步处理才能生成小尺度特征。

  To show the efficiency of our example-based approach, we also compare the results of our trained erosion synthesizer with erosion simulation. Our algorithm generates a terrain that looks eroded, but it may contain some geologically incorrect features as compared to the real erosion phenomenon. However this approximation is sufficient for many applications that only need plausible terrains (Fig. 22). Our implementation of the cGAN-based method performs 4, 000× faster than erosion simulations.

  为了证明基于示例的方法的有效性,我们还将经过训练的侵蚀合成器的结果与侵蚀模拟进行了比较。我们的算法生成的地形看起来被侵蚀了,但与真实的侵蚀现象相比,它可能包含一些地质上不正确的特征。然而,对于许多只需要合理地形的应用来说,这种近似就足够了(图22)。我们实现的基于cGAN的方法比侵蚀模拟快4000倍。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第23张图片
Fig. 22. Large scale terrain erosion (left) and erosion synthesizer output (right) on a 1024 × 1024 terrain. Erosion simulation took 741.0 s whereas our method took 0.7 s.

图22。1024×1024地形上的大规模地形侵蚀(左)和侵蚀合成器输出(右)。侵蚀模拟耗时741.0秒,而我们的方法耗时0.7秒。

7.3 Performance, User Control, and Experience

Our approach provides the user with an intuitive and simple control and allows inexperienced users to create plausible terrains with a few strokes as illustrated in Fig. 23. The speed of the generation process allows for interactive modeling and the sketches can be quickly modified by adding and removing features or by using the eraser (see Table 2). Moreover, amplification can be enabled or disabled independently of the sketching process. The conformity between the user sketch and the generated terrain is high as illustrated in Fig. 23,where a real-world terrain is reproduced by iterative sketching. Although the overall dynamic of the terrain is easy to reproduce, it takes many more strokes to get closer to the target.

  我们的方法为用户提供了一个直观而简单的控制,并允许没有经验的用户通过几次笔划创建合理的地形,如图23所示。生成过程的速度允许交互式建模,草图可以通过添加和删除特征或使用橡皮擦快速修改(见表2)。此外,可以独立于草图绘制过程启用或禁用放大。如图23所示,用户草图和生成的地形之间的一致性很高,其中通过迭代绘制再现真实世界的地形。虽然地形的整体动态很容易重现,但要想更接近目标需要更多的笔划。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第24张图片
Fig. 23. Reproducing a real terrain. Although the overall dynamic of the terrain can be captured in a few strokes, it takes a denser sketch to reproduce both large-scale and medium-scale features of the terrain.
图23。再现真实的地形。虽然地形的整体动态可以在几笔中捕捉到,但需要更密集的草图来再现地形的大尺度和中尺度特征。

Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第25张图片
Table 2. Statistics for interactive authoring: terrain size and processing time (in ms). The levelset L, curve sketch S, erosion E and eraser R synthesizers perform in a few milliseconds and allow for interactive editing. The whole interactive feedback includes all the processes that are necessary to obtain the final shaded terrain in the interface after a user stroke. Amplification slows down the overall process and is usually disabled during interactive editing.

表2.交互式创作的统计数据:地形大小和处理时间(毫秒)。levelset L、曲线草图S、腐蚀E和橡皮擦合成器在几毫秒内完成,并允许交互式编辑。整个交互反馈包括用户笔划后在界面中获得最终着色地形所需的所有过程。放大会减慢整个过程,通常在交互式编辑过程中禁用。

  Novice and expert artists tested our interactive system. We observed that the usability was simple because all participants were able to express their intent after only a few (2 − 3) short interactive sessions. All users (novice and expert) were particularly satisfied with the simplicity of the interface (see the accompanying video),the interactive feedback, and the variety of terrain models they could design (Fig. 24, 27). The ridges, rivers, and altitude cues sketching tools were considered helpful and satisfactory to the requirements expected by expert artists.

  新手和专家艺术家测试了我们的互动系统。我们观察到,可用性很简单,因为所有参与者都能在几(2)分钟后表达他们的意图− 3) 简短的互动会话。所有用户(新手和专家)都对界面的简单性(参见随附的视频)、交互式反馈以及他们可以设计的各种地形模型感到特别满意(图24、27)。山脊、河流和海拔信息素描工具被认为是有用的,并且满足专家艺术家的预期要求。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第26张图片
Fig. 24. An island authored in a few minutes with only 11 strokes by a novice user. Notice how the long sketched ridge is well preserved by our method.

图24。一个新手在几分钟内只用11笔就完成了一个岛屿的创作。请注意,我们的方法可以很好地保存绘制的长脊。

  Moreover, we conducted a qualitative user-study with five users.We first explained the interface and the users were invited to practice during a few minutes. Then we asked the users to draw three different scenes described textually as follows: a centered high mountain with small mountains around it, a mountain range traversing the scene diagonally, and a volcano. At the end of the experiment, the participants were asked to evaluate the system on a 1 to 4 Likert scale according to three criteria: 1) Does the generated terrain follow the sketch? 2) Is the system reactive? 3) Is it easy to express ones intent? We also let the users express their remarks about the system.

  此外,我们对五名用户进行了定性用户研究。我们首先解释了界面,并邀请用户在几分钟内进行练习。然后,我们要求用户绘制三个不同的场景,文字描述如下:一个居中的高山,周围有小山,一条山脉斜穿过场景,还有一座火山。在实验结束时,参与者被要求根据三个标准在1到4 Likert量表上评估系统:1)生成的地形是否符合草图?2) 系统是被动的吗?3) 表达自己的想法意图容易吗?我们还允许用户表达他们对系统的看法。

  On the criteria 1) and 2), all the participants answered 1 or 2 (strong agree and agree). On the criterion 3), the participants answered also 1 or 2 except for one who answered 3 (disagree). Some users pointed out that they would have liked an additional tool to produce smoother and more regular slopes. They also noticed that using multiple strokes was useful to strengthen a ridge, but had a side effect of lowering the influence of the other strokes.

  根据标准1)和2),所有参与者回答1或2(强烈同意和同意)。在标准3)中,参与者也回答了1或2,只有一个回答了3(不同意)。一些用户指出,他们希望使用其他工具来生成更平滑和更规则的坡度。他们还注意到,使用多次笔划有助于加强脊线,但也有降低其他笔划影响的副作用。

7.4 Limitations and Failure Cases

The main limitation of our method is that each synthesizer is dedicated to a single task. If one wants to use a different kind of sketch,a new synthesizer should be added and trained. Thus, the user must learn to draw a certain type of sketch that is captured by the synthesizers. However, as stated above, the sketch adaptation is intuitive and was quickly understood by the users who were able to obtain satisfactory terrains matching their ideas. Future work could target online adaptation of terrain synthesizers to users, and let them specify definitions of sketch elements.

  我们的方法的主要限制是每个合成器都专用于一个任务。如果要使用不同类型的草图,应添加并训练新的合成器。因此,用户必须学会绘制合成器捕捉到的特定类型的草图。然而,如上所述,草图改编是直观的,用户很快就能理解,他们能够获得符合自己想法的满意地形。未来的工作可能会针对用户在线调整地形合成器,并让他们指定草图元素的定义。

  There are several situations when our algorithm fails to produce realistic results. First, if the sketch is sparse, a strong repetition effect will appear as shown in Fig. 25. This artifact can be alleviated by adding more strokes. Second, in planar areas or when no sketch cues is available the synthesized terrain may exhibit some regular pattern. This is an artifact of the cGAN training, which can be alleviated in a post-processing step by applying a simple 5 × 5-median filter as shown in Fig. 26. This can be further improved by our terrain amplification. Finally, a limitation of our interface design is that levelset and curve sketches cannot be used simultaneously.Combining both would make the editing more demanding, since the levelset structure should be coherent with the altitude cues, the ridges, and the river network.

  有几种情况下,我们的算法无法产生现实的结果。首先,如果草图是稀疏的,则会出现强烈的重复效果,如图25所示。这种伪影可以通过增加更多笔划来缓解。第二,在平面区域或没有草图线索时,合成的地形可能会呈现一些规则的图案。这是cGAN训练的伪影,可通过应用图26所示的简单5×5中值滤波器在后处理步骤中减轻。这可以通过我们的地形放大进一步改善。最后,我们界面设计的一个限制是水平集和曲线草图不能同时使用。将两者结合在一起会使编辑变得更加苛刻,因为水平集结构应该与高度线索、山脊和河网保持一致。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第27张图片
Fig. 25. Failure case: sometimes when the input sketch is too sparse, our method generates repeated terrain patches and grid artifacts.
图25。失败案例:有时当输入草图太稀疏时,我们的方法会生成重复的地形面片和网格瑕疵。
Interactive Example-Based Terrain Authoring with Conditional Generative Adversarial Networks_第28张图片
Fig. 26. Failure case: a regular grid pattern appears when the terrain is flat due to a lack of input cues. This can be alleviated by using a median filter: the pattern is removed and after amplification no trace of it can be seen.

图26.失败案例:由于缺少输入提示,当地形平坦时,会出现规则的网格模式。这可以通过使用中值滤波器来缓解:图案被移除,放大后看不到任何痕迹。

8 CONCLUSION

We introduced a novel framework for modeling terrains from input sketches. Our approach enables users to create large scale realistic models quickly and easily, without the need of writing procedural rules or defining the parameters of physically-based simulations. Given a large set of terrain examples, we automatically extract ridge and river network curves, eroded terrain models and other characteristics data that are used for training cGAN networks. During the interactive authoring session, the user sketches important features corresponding to his intent, and the cGAN generates a realistic terrain. This process is very efficient: each terrain generation takes only a few milliseconds which allows interactive feedback to the designer. Our approach merges procedural modeling and interactive sketching in a unified framework, bridging the gap between the intuitiveness and flexibility of interactive authoring processes, while using the expressive power of examples that can be either real-world or procedural.

  我们引入了一个新的框架,用于根据输入草图建模地形。我们的方法使用户能够快速轻松地创建大规模真实模型,而无需编写程序规则或定义基于物理的模拟的参数。给出大量地形实例,我们自动提取用于训练cGAN网络的山脊和河网曲线、侵蚀地形模型和其他特征数据。在交互式创作过程中,用户根据自己的意图绘制重要特征,cGAN生成真实的地形。这个过程非常高效:每个地形生成只需要几毫秒,这允许交互反馈给设计师。我们的方法将过程建模和交互式草图融合在一个统一的框架中,弥合了交互式创作过程的直观性和灵活性之间的差距,同时利用了实例的表达能力,既可以是真实世界的,也可以是过程的。

  At the heart of our method lies the possibility of learning correspondences between the characteristic features of a terrain and its elevation data. An interesting extension of our work would be to bind a procedural model to our system, such as the procedural primitive-based terrain representation proposed in [Génevaux et al.2015] and learn the parameters so as to obtain a complete inverse procedural modeling system. Another promising future work is to generalize our approach to model terrains with different material layers such as bedrock, rock, sand or humus, and vegetation.

  我们方法的核心在于学习地形特征与其高程数据之间的对应关系的可能性。我们工作的一个有趣扩展是将程序模型绑定到我们的系统,例如[Génevaux et al.2015]中提出的基于程序原语的地形表示,并学习参数,以获得完整的逆程序建模系统。另一个有前途的未来工作是推广我们的方法,以模拟具有不同材料层的地形,例如基岩、岩石、沙子或腐殖质,以及植被。

你可能感兴趣的:(Paper,地形)