CN110084872A - A kind of the Animation of Smoke synthetic method and system of data-driven - Google Patents

A kind of the Animation of Smoke synthetic method and system of data-driven Download PDF

Info

Publication number
CN110084872A
CN110084872A CN201910228740.3A CN201910228740A CN110084872A CN 110084872 A CN110084872 A CN 110084872A CN 201910228740 A CN201910228740 A CN 201910228740A CN 110084872 A CN110084872 A CN 110084872A
Authority
CN
China
Prior art keywords
smoke
dimensional
animation
data
generation model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910228740.3A
Other languages
Chinese (zh)
Other versions
CN110084872B (en
Inventor
朱登明
李园
王兆其
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Computing Technology of CAS
Original Assignee
Institute of Computing Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CN201910228740.3A priority Critical patent/CN110084872B/en
Publication of CN110084872A publication Critical patent/CN110084872A/en
Application granted granted Critical
Publication of CN110084872B publication Critical patent/CN110084872B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/603D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明涉及一种数据驱动的烟雾动画合成方法,包括:根据烟雾数据集,生成二维烟雾轮廓数据;通过该二维烟雾轮廓数据的训练生成网络,以获得烟雾生成模型;通过该烟雾生成模型,将该二维烟雾轮廓数据生成为三维烟雾序列;对该三维烟雾序列进行渲染,生成烟雾动画。本发明提出的烟雾动画合成方法,使烟雾信息和控制方式更加简单直观,并保持了简单输入下了烟雾动画的真实性,能够实时生成用户可控形状并具有真实感的烟雾动画。

The invention relates to a data-driven smoke animation synthesis method, comprising: generating two-dimensional smoke profile data according to a smoke data set; generating a smoke generation model through the training of the two-dimensional smoke profile data; obtaining a smoke generation model through the smoke generation model , generating the two-dimensional smoke profile data into a three-dimensional smoke sequence; rendering the three-dimensional smoke sequence to generate smoke animation. The smoke animation synthesis method proposed by the present invention makes the smoke information and control mode simpler and more intuitive, maintains the authenticity of the smoke animation under simple input, and can generate realistic smoke animation with user-controllable shapes in real time.

Description

一种数据驱动的烟雾动画合成方法及系统A data-driven smoke animation synthesis method and system

技术领域technical field

本发明涉及计算机图形学领域,特别涉及一种流体动画的可控合成方法和系统。The invention relates to the field of computer graphics, in particular to a method and system for controllable synthesis of fluid animation.

背景技术Background technique

自然现象的模拟一直是计算机图形学研究的热点问题之一。其中流体模拟,尤其是烟雾动画的实时建模和可控动画技术,在影视特效,广告,三维游戏开发,虚拟现实等各种领域有着越来越广泛的应用需求和价值。然而天然烟雾是一种复杂物理现象,由于受到浮力,障碍物,风能输入和内部涡动等多种因素的影响,烟雾内部浓度分布毫无规律,形态也各种各样,可以是均匀的,也可以是有剧烈涡流变化的,其几何形状具有极强的不规则性,边界也难以区分和界定。多年来,在流体模拟的研究上,从传统的流体动力学模型,纳维-斯托克斯方程(Navier-Stokes equations,简称N-S方程)求解运动要素到非物理方法即数据驱动的流体动画合成方法,合成的烟雾的真实感和质量不断提高,计算效率和实时性也在逐步改进,因此着眼于用户角度,希望以更简单的方式提供输入并同样可以得到实时且真实感高的模拟结果的需求也应运而生。The simulation of natural phenomena has always been one of the hot issues in computer graphics research. Among them, fluid simulation, especially the real-time modeling and controllable animation technology of smoke animation, has more and more extensive application requirements and values in various fields such as film and television special effects, advertising, 3D game development, and virtual reality. However, natural smog is a complex physical phenomenon. Due to the influence of various factors such as buoyancy, obstacles, wind energy input and internal eddy, the internal concentration distribution of smog is irregular, and the shape is also various, which can be uniform. It can also have violent eddy current changes, its geometric shape is extremely irregular, and the boundary is difficult to distinguish and define. Over the years, in the research of fluid simulation, from the traditional fluid dynamics model, Navier-Stokes equations (Navier-Stokes equations, referred to as N-S equations) to solve the motion elements to the non-physical method, that is, data-driven fluid animation synthesis method, the realism and quality of the synthesized smoke are constantly improving, and the computing efficiency and real-time performance are also gradually improving. Therefore, focusing on the user's perspective, we hope to provide input in a simpler way and also obtain real-time and high-realistic simulation results. Demand also arises as the times require.

现有技术中,“基于深度学习和SPH框架的流体动画生成方法及装置”(申请公布号:CN108717722A),公开了一种深度学习和SPH框架的流体动画生成方法及装置,使用神经网络模型训练后导入到SPH流体模拟框架,旨在通过离线渲染实现低精度的流体高细节的表现。In the prior art, "Fluid animation generation method and device based on deep learning and SPH framework" (application publication number: CN108717722A), discloses a method and device for generating fluid animation based on deep learning and SPH framework, using neural network model training After importing into the SPH fluid simulation framework, it aims to achieve low-precision fluid and high-detail performance through offline rendering.

“基于数据驱动的流体动画加速生成方法”(申请公布号:CN106023286A),公开了一种基于数据驱动的流体动画加速生成方法,利用训练样本训练完成之后的人工神经网络作为求解器,在欧拉法流体模拟过程中投影步的求解十分迅速,并且可以在快速求解的同时保持较小的求解误差,从而保证了求解结果的准确性。本发明利用之前在投影步前后计算得到的训练数据,经过人工神经网络的训练,调整人工神经网络的传输节点权值,直接得到最终的计算模型,完全避免原本耗时的投影步数值计算过程。本发明适用于欧拉法模拟流体动画时,大幅加速求解投影步计算。"Data-driven fluid animation acceleration generation method" (application publication number: CN106023286A), discloses a data-driven fluid animation acceleration generation method, using the artificial neural network after the training sample training is completed as a solver, in Euler The solution of the projection step in the fluid simulation process of the method is very fast, and the solution error can be kept small while the solution is fast, thus ensuring the accuracy of the solution result. The present invention uses the training data calculated before and after the projection step, and adjusts the weights of the transmission nodes of the artificial neural network through the training of the artificial neural network to directly obtain the final calculation model, completely avoiding the original time-consuming value calculation process of the projection step. The present invention is applicable to Euler's method for simulating fluid animation, and greatly accelerates the calculation of the solution projection step.

以往,基于N-S方程需要依靠求解参数方程来生成速度场进而得到合成的烟雾,而基于深度学习需要依靠三维的数据输入来得到三维的速度或者密度场的输出,而参数化方程的使用需要基于用户对流体系统的深刻理解才可以有效地控制,但其实计算量较大,难以达到实时的要求,控制方式单一,对于用户的使用仍有不小的限制和约束;而三维数据的输入对用户来说不易于获取,处理和使用,因此使用时,仍需要投入成本去做大量麻烦的数据预处理的工作。In the past, based on the N-S equation, it was necessary to rely on solving parametric equations to generate a velocity field and then obtain a synthetic smoke, while based on deep learning, it was necessary to rely on three-dimensional data input to obtain a three-dimensional velocity or density field output, and the use of parametric equations needs to be based on user Only a deep understanding of the fluid system can be effectively controlled, but in fact, the amount of calculation is large, it is difficult to meet the real-time requirements, and the control method is single, which still has a lot of restrictions and constraints on the use of users; and the input of 3D data is very difficult for users. It is not easy to obtain, process and use, so when using it, it still needs to invest a lot of troublesome data preprocessing work.

发明内容SUMMARY OF THE INVENTION

为解决上述采用N-S方程方法面临的计算量较大,实时性差,控制方式单一的问题,以及而三维数据的输入对用户来说不易于获取、处理和使用的问题,本发明提出一种数据驱动的烟雾动画合成方法,利用二维烟雾轮廓通过烟雾生成模型得到具有时序关系的三维流体场,生成三维烟雾动画。In order to solve the problems of large amount of calculation, poor real-time performance, and single control mode faced by the above-mentioned N-S equation method, and the problem that the input of three-dimensional data is not easy for users to acquire, process and use, the present invention proposes a data-driven The smoke animation synthesis method of the present invention uses a two-dimensional smoke profile to obtain a three-dimensional fluid field with a time series relationship through a smoke generation model, and generates a three-dimensional smoke animation.

具体来说,本发明的烟雾动画合成方法包括:根据三维烟雾数据集,生成二维烟雾轮廓数据;通过该二维烟雾轮廓数据的训练生成网络,以获得烟雾生成模型;通过该烟雾生成模型,将该二维烟雾轮廓数据生成为三维烟雾序列;对该三维烟雾序列进行渲染,生成三维烟雾动画。Specifically, the smoke animation synthesis method of the present invention includes: generating two-dimensional smoke profile data according to the three-dimensional smoke data set; generating a network through the training of the two-dimensional smoke profile data to obtain a smoke generation model; through the smoke generation model, The two-dimensional smoke profile data is generated as a three-dimensional smoke sequence; the three-dimensional smoke sequence is rendered to generate a three-dimensional smoke animation.

本发明所述的烟雾动画合成方法,其中该烟雾生成模型的损失函数为:The smoke animation synthesis method of the present invention, wherein the loss function of the smoke generation model for:

其中,x为该二维烟雾轮廓数据,G(x)为该三维烟雾序列的单帧三维密度场,y为该三维烟雾数据集~的单帧三维密度场,DS为判断G(x)与y的空间一致性的鉴别器,En为当x的规模为n时G(x)经过DS的鉴别期望,Em为y的规模为m时的鉴别器DS~的鉴别期望,Dt为判断的时序一致性的鉴别器,Fj为抽取DS的第j层的输出特征图,为抽取Fj时对损失函数的影响权重系数,En,j为x的规模为n时对分别抽取Fj时相比的空间一致性期望,n、j为正整数。Among them, x is the two-dimensional smoke profile data, G(x) is the three-dimensional smoke sequence A single frame of 3D density field, y is the 3D smoke data set The single-frame three-dimensional density field of ~, D S is the discriminator for judging the spatial consistency of G(x) and y, E n is the discrimination expectation of G(x) passing D S when the size of x is n, and E m is Discriminator D S pairs of y of scale m ~ is the discrimination expectation, D t is the judgment and The discriminator of temporal consistency, F j is the output feature map of the jth layer of D S extracted, For the loss function when extracting F j The influence weight coefficient, E n,j is when the size of x is n to and The spatial consistency expectation compared when F j is extracted respectively, n and j are positive integers.

本发明所述的烟雾动画合成方法,通过纳维-斯托克斯方程求解获取该三维烟雾数据集。The smoke animation synthesis method of the present invention obtains the three-dimensional smoke data set by solving the Navier-Stokes equation.

本发明所述的烟雾动画合成方法,通过基于GPU的多视角下的渲染,生成该三维烟雾动画。The smoke animation synthesis method described in the present invention generates the three-dimensional smoke animation through GPU-based rendering under multiple perspectives.

本发明还提出一种数据驱动的烟雾动画合成系统,包括:二维数据生成模块,用于根据三维烟雾数据集,生成二维烟雾轮廓数据;烟雾生成模型训练模块,用于通过该二维烟雾轮廓数据的训练生成网络,以获得烟雾生成模型;三维序列生成模块,用于通过该烟雾生成模型,将该二维烟雾轮廓数据生成为三维烟雾序列;烟雾动画渲染模块,用于对该三维烟雾序列进行渲染,生成三维烟雾动画。The present invention also proposes a data-driven smoke animation synthesis system, including: a two-dimensional data generation module, used to generate two-dimensional smoke contour data according to a three-dimensional smoke data set; a smoke generation model training module, used to pass the two-dimensional smoke The training generation network of the outline data is used to obtain the smoke generation model; the three-dimensional sequence generation module is used to generate the two-dimensional smoke outline data into a three-dimensional smoke sequence through the smoke generation model; the smoke animation rendering module is used for the three-dimensional smoke The sequence is rendered to generate a 3D smoke animation.

本发明所述的烟雾动画合成系统,其中该烟雾生成模型的损失函数为:The smoke animation synthesis system of the present invention, wherein the loss function of the smoke generation model for:

其中,x为该二维烟雾轮廓数据,G(x)为该三维烟雾序列的单帧三维密度场,y为该三维烟雾数据集的单帧三维密度场,DS为判断G(x)与y的空间一致性的鉴别器,En为当x的规模为n时G(x)经过DS的鉴别期望,Em为y的规模为m时的鉴别器DS的鉴别期望,Dt为判断的时序一致性的鉴别器,Fj为抽取DS的第j层的输出特征图,为抽取Fj时对损失函数的影响权重系数,En,j为x的规模为n时对分别抽取Fj时相比的空间一致性期望,n、j为正整数。Among them, x is the two-dimensional smoke profile data, G(x) is the three-dimensional smoke sequence A single frame of 3D density field, y is the 3D smoke data set The single-frame three-dimensional density field of , D S is the discriminator for judging the spatial consistency of G(x) and y, E n is the discriminative expectation of G(x) passing D S when the size of x is n, E m is y The discriminator D S pairs of scale m The discriminant expectation of D t is the judgment and The discriminator of temporal consistency, F j is the output feature map of the jth layer of D S extracted, For the loss function when extracting F j The influence weight coefficient, E n,j is when the size of x is n to and The spatial consistency expectation compared when F j is extracted respectively, n and j are positive integers.

本发明所述的烟雾动画合成系统,还包括:烟雾数据集生成模块,用于通过纳维-斯托克斯方程求解获取该三维烟雾数据集。The smoke animation synthesis system of the present invention further includes: a smoke data set generation module, which is used to obtain the three-dimensional smoke data set by solving the Navier-Stokes equation.

本发明所述的烟雾动画合成系统,其中该烟雾动画渲染模块具体包括:通过基于GPU的多视角下的渲染,生成该三维烟雾动画。In the smoke animation synthesis system of the present invention, the smoke animation rendering module specifically includes: generating the three-dimensional smoke animation through GPU-based multi-view rendering.

本发明还提出一种可读存储介质,存储有可执行指令,该可执行指令用于执行如前述的数据驱动的烟雾动画合成方法。The present invention also provides a readable storage medium, which stores executable instructions, and the executable instructions are used to execute the aforementioned data-driven smoke animation synthesis method.

本发明还提出一种数据处理装置,包括如前述的可读存储介质,该数据处理装置调取并执行该可读存储介质中的可执行指令,以进行三维烟雾动画合成。The present invention also proposes a data processing device, which includes the above-mentioned readable storage medium, and the data processing device calls and executes executable instructions in the readable storage medium to synthesize three-dimensional smoke animation.

本发明提出的烟雾动画合成方法,使烟雾信息和控制方式更加简单直观,并保持了简单输入下了烟雾动画的真实性,能够实时生成用户可控形状并具有真实感的烟雾动画。The smoke animation synthesis method proposed by the present invention makes the smoke information and control mode simpler and more intuitive, maintains the authenticity of the smoke animation under simple input, and can generate realistic smoke animation with user-controllable shapes in real time.

附图说明Description of drawings

图1是本发明的数据驱动的烟雾动画合成方法流程图。Fig. 1 is a flow chart of the data-driven smoke animation synthesis method of the present invention.

图2是本发明的烟雾生成模型网络示意图。Fig. 2 is a schematic diagram of the smoke generation model network of the present invention.

图3是本发明的中间结果的特征损失示意图。Fig. 3 is a schematic diagram of the feature loss of the intermediate result of the present invention.

图4是本发明的数据驱动的烟雾动画合成系统示意图。Fig. 4 is a schematic diagram of the data-driven smoke animation synthesis system of the present invention.

具体实施方式Detailed ways

为了使本发明的技术方案更加清晰明了,以下结合附图对本发明进一步详细说明,应当理解,此处所描述的具体实例仅仅用以解释本发明,并不限定于本发明。In order to make the technical solution of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific examples described here are only used to explain the present invention and not limit the present invention.

本发明针对采用N-S方程方法面临的计算量较大,实时性差,控制方式单一的问题,以及而三维数据的输入对用户来说不易于获取、处理和使用的问题,提出一种数据驱动的烟雾动画合成方法,利用二维烟雾轮廓通过烟雾生成模型得到具有时序关系的三维流体场,生成三维烟雾动画。The present invention aims at the problems of large amount of calculation, poor real-time performance, and single control mode faced by the N-S equation method, and the problem that the input of three-dimensional data is not easy for users to obtain, process and use, and proposes a data-driven smog The animation synthesis method uses a two-dimensional smoke profile to obtain a three-dimensional fluid field with a time series relationship through a smoke generation model, and generates a three-dimensional smoke animation.

具体来说,本发明的烟雾动画合成方法包括:根据三维烟雾数据集,生成二维烟雾轮廓数据;通过该二维烟雾轮廓数据的训练生成网络,以获得烟雾生成模型;通过该烟雾生成模型,将该二维烟雾轮廓数据生成为三维烟雾序列;对该三维烟雾序列进行渲染,生成三维烟雾动画。Specifically, the smoke animation synthesis method of the present invention includes: generating two-dimensional smoke profile data according to the three-dimensional smoke data set; generating a network through the training of the two-dimensional smoke profile data to obtain a smoke generation model; through the smoke generation model, The two-dimensional smoke profile data is generated as a three-dimensional smoke sequence; the three-dimensional smoke sequence is rendered to generate a three-dimensional smoke animation.

烟雾生成模型的损失函数为:Loss function for the smoke generation model for:

其中,x为二维烟雾轮廓数据,G(x)为三维烟雾序列的单帧三维密度场,y为三维烟雾数据集的单帧三维密度场,DS为判断G(x)与y的空间一致性的鉴别器,En为当x的规模为n时G(x)经过DS的鉴别期望,Em为y的规模为m时的鉴别器DS的鉴别期望,Dt为判断的时序一致性的鉴别器,Fj为抽取DS的第j层的输出特征图,为抽取Fj时对损失函数的影响权重系数,En,j为x的规模为n时对分别抽取Fj时相比的空间一致性期望,n、j为正整数。Among them, x is the two-dimensional smoke profile data, G(x) is the three-dimensional smoke sequence A single-frame 3D density field, y is a 3D smoke dataset The single-frame three-dimensional density field of , D S is the discriminator for judging the spatial consistency of G(x) and y, E n is the discriminative expectation of G(x) passing D S when the size of x is n, E m is y The discriminator D S pairs of scale m The discriminant expectation of D t is the judgment and The discriminator of temporal consistency, F j is the output feature map of the jth layer of D S extracted, For the loss function when extracting F j The influence weight coefficient, E n,j is when the size of x is n to and The spatial consistency expectation compared when F j is extracted respectively, n and j are positive integers.

于本发明的实施例中,三维烟雾数据集通过纳维-斯托克斯方程求解获取。In the embodiment of the present invention, the three-dimensional smoke data set is obtained by solving the Navier-Stokes equation.

于本发明的实施例中,是通过基于GPU的多视角下的渲染,将三维烟雾序列生成三维烟雾动画。In the embodiment of the present invention, the 3D smoke sequence is generated into a 3D smoke animation through GPU-based multi-view rendering.

本发明还提出一种数据驱动的烟雾动画合成系统,包括:二维数据生成模块,用于根据三维烟雾数据集,生成二维烟雾轮廓数据;烟雾生成模型训练模块,用于通过该二维烟雾轮廓数据的训练生成网络,以获得烟雾生成模型;三维序列生成模块,用于通过该烟雾生成模型,将该二维烟雾轮廓数据生成为三维烟雾序列;烟雾动画渲染模块,用于对该三维烟雾序列进行渲染,生成三维烟雾动画。The present invention also proposes a data-driven smoke animation synthesis system, including: a two-dimensional data generation module, used to generate two-dimensional smoke contour data according to a three-dimensional smoke data set; a smoke generation model training module, used to pass the two-dimensional smoke The training generation network of the outline data is used to obtain the smoke generation model; the three-dimensional sequence generation module is used to generate the two-dimensional smoke outline data into a three-dimensional smoke sequence through the smoke generation model; the smoke animation rendering module is used for the three-dimensional smoke The sequence is rendered to generate a 3D smoke animation.

下面参照附图介绍本发明的方法的具体实施过程。图1为数据驱动的烟雾动画合成方法流程图。如图1所示,为了针对烟雾进行真实感的复杂场景下的动画合成,需要首先获取三维烟雾场数据作真实数据对照,同时经过投影映射得到二维投影并根据设定的阈值提取轮廓信息并做数据增强(如添加噪声),搭建相应的烟雾生成模型和输入数据定义符合目的的损失函数来获得具有时序关系的三维烟雾属性场序列,然后通过渲染得到烟雾动画。具体来讲:The specific implementation process of the method of the present invention will be introduced below with reference to the accompanying drawings. Figure 1 is a flow chart of a data-driven smoke animation synthesis method. As shown in Figure 1, in order to carry out animation synthesis in realistic complex scenes for smoke, it is necessary to first obtain 3D smoke field data for comparison with real data, and at the same time obtain 2D projection through projection mapping and extract contour information according to the set threshold and Do data enhancement (such as adding noise), build a corresponding smoke generation model and input data to define a loss function suitable for the purpose to obtain a sequence of three-dimensional smoke attribute fields with a time series relationship, and then obtain smoke animation through rendering. Specifically:

1)通过N-S方程求解生成获取多样性的复杂场景下的三维烟雾数据集1) Through the N-S equation solution to generate a 3D smoke data set in a complex scene with diversity

根据目前N-S方程方法,应用流体仿真软件mantaflow和参数化的设置得到多样性的复杂场景的浓度场数据集。According to the current N-S equation method, the fluid simulation software mantaflow and parameterized settings are used to obtain the concentration field data sets of diverse and complex scenes.

2)提出一种基于投影变换的轮廓提取和表示方法,表示二维图像中烟雾的轮廓。2) A contour extraction and representation method based on projective transformation is proposed to represent the contour of smoke in a 2D image.

21)获取烟雾场数据的二维投影矩阵21) Obtain the two-dimensional projection matrix of the smoke field data

以获取浓度场的正投影为例,以左前下角为原点,以向右,向上和向纸里的方向分别为X,Y,Z轴的正向,将三维浓度场中的相同X,Y坐标的浓度值累加到Z=0的同一个平面中,即获得正投影。Take the orthographic projection of the concentration field as an example, take the left front and lower corner as the origin, and take the directions to the right, upward and into the paper as the positive directions of the X, Y and Z axes respectively, and take the same X and Y coordinates in the three-dimensional concentration field The concentration values of are added to the same plane of Z=0, that is, an orthographic projection is obtained.

22)定义并通过设置阈值提取投影中的包含的烟雾信息作为二维轮廓22) Define and extract the smoke information contained in the projection as a two-dimensional outline by setting a threshold

定义超过某一特定浓度值的点所组成的集合构成烟雾二维投影的轮廓。通过设定某一合适的浓度值为阈值,将超过它的值置为1,小于它的值置为0,可得到二值化的轮廓信息。The set of points defined to exceed a certain concentration value constitutes the contour of the two-dimensional projection of the smoke. By setting an appropriate concentration value as the threshold value, setting the value exceeding it as 1, and setting the value less than it as 0, the binarized contour information can be obtained.

3)提出一种基于时序相关的生成网络和自编码器的三维烟雾生成模型方法。3) Propose a 3D smoke generation model method based on generative network and autoencoder based on temporal correlation.

图2是本发明的烟雾生成模型网络示意图。如图2所示,训练和调整烟雾生成模型可得到具有时序关系的合理的烟雾密度场序列。Fig. 2 is a schematic diagram of the smoke generation model network of the present invention. As shown in Figure 2, training and adjusting the smoke generation model can obtain a reasonable sequence of smoke density fields with a temporal relationship.

31)网络训练时的生成器损失 31) Generator loss during network training

为该烟雾生成模型训练过程的部分损失表示,x为该二维烟雾轮廓数据,G(x)为烟雾生成模型所生成的三维烟雾序列中的单帧三维密度场,Ds为烟雾生成模型的判断G(x)与真实对照单帧三维密度场y的空间一致性的鉴别器的表示,En为输入原始的二维烟雾轮廓数据规模为n时该烟雾生成模型中G(x)经过Ds的鉴别期望的表示,在本文上下文讨论的离散数据情况下可理解为鉴别均值。 is the partial loss representation of the smoke generation model training process, x is the two-dimensional smoke profile data, G(x) is the single-frame three-dimensional density field in the three-dimensional smoke sequence generated by the smoke generation model, D s is the smoke generation model The representation of the discriminator for judging the spatial consistency between G(x) and the real control single-frame three-dimensional density field y, E n is the input of the original two-dimensional smoke profile data scale is n when G(x) in the smoke generation model passes through D The representation of the discriminant expectation of s , in the case of discrete data discussed in the context of this paper, can be understood as the discriminant mean.

通过优化生成器生成的三维烟雾样本在鉴别器中的得分,提升以假乱真的效果,来得到可以包含逼真三维烟雾特征分布的生成器。By optimizing the score of the three-dimensional smoke samples generated by the generator in the discriminator, the effect of falsehood is improved to obtain a generator that can contain realistic three-dimensional smoke feature distribution.

32)网络训练时的鉴别器损失 32) Discriminator loss during network training

为该烟雾生成模型训练过程的损失总表示,为该烟雾生成模型利用真实数据y通过流体动力学推断得到的时序上连续的对流场帧集合的表示,为该烟雾生成模型利用生成数据G(x)通过流体动力学推断得到的时序上连续的对流场帧集合的表示,En为输入样本规模为n时该烟雾生成模型中经过Dt的鉴别期望的表示,在本文上下文讨论的离散数据情况下可理解为鉴别均值,Em为样本y的规模为m时的鉴别器对的鉴别期望的表示,在本文上下文讨论的离散数据情况下可理解为鉴别均值,Dt为该烟雾生成模型判断的时序一致性的鉴别器的表示,t为正整数。 is the total representation of the loss during the training process of the smoke generation model, For the smoke generation model, the real data y is used to represent the temporally continuous flow field frame set obtained through fluid dynamics inference, For the smoke generation model, use the generated data G(x) to infer the representation of the time-series continuous convective frame set through fluid dynamics, E n is the input sample size of n in the smoke generation model The expression of discriminative expectations after D t can be understood as the discriminative mean in the case of discrete data discussed in the context of this article, and E m is the discriminator pair when the size of the sample y is m In the case of discrete data discussed in the context of this article, it can be understood as the discriminative mean, and D t is the judgment of the smoke generation model and Representation of the discriminator for timing consistency, t is a positive integer.

作为生成器的对抗目标,鉴别器对真伪数据的鉴别能力也需要不断优化,间接地促进了生成器以生成更逼真的结果为目标。As the generator's confrontation goal, the discriminator's ability to identify real and fake data also needs to be continuously optimized, which indirectly promotes the generator's goal of generating more realistic results.

其中 依靠对流计算得到:in By means of convection calculations:

其中,为利用流体动力学原理使用对流操作的表示,分别为烟雾生成模型中生成器生成的第t-1帧和t+1帧三维速度场的表示,xt-1、xt-1是烟雾生成模型中输入的第t-1、t+1帧样本数据的表示,G(xt-1)、G(xt)、G(xt+1)分别为烟雾生成模型中生成器生成的第t-1、t、t+1帧三维密度场,t为正整数。in, To exploit the principles of fluid dynamics using the representation of convective operations, Respectively represent the three-dimensional velocity field of frame t - 1 and frame t+1 generated by the generator in the smoke generation model. Representation of frame sample data, G(x t-1 ), G(x t ), G(x t+1 ) are the three-dimensional density of frames t-1, t, and t+1 generated by the generator in the smoke generation model, respectively Field, t is a positive integer.

为了使生成序列具有时间上的连续性,视觉效果上减少噪声以及帧间连续性差导致的不规律的微小抖动,又因为以前后帧之间速度密度符合流体运动规律,所以可以通过惩罚其相邻连续帧对流结果的不一致性来指导模型的优化。In order to make the generated sequence have temporal continuity, reduce noise and irregular small jitters caused by poor continuity between frames in visual effect, and because the velocity density between the previous and subsequent frames conforms to the law of fluid motion, it can be punished by punishing its neighbors. The inconsistency of flow results between consecutive frames is used to guide the optimization of the model.

33)各层抽取的特征损失图3是本发明的中间结果的特征损失示意图。如图3所示:33) Feature loss extracted by each layer Fig. 3 is a schematic diagram of the feature loss of the intermediate result of the present invention. As shown in Figure 3:

为烟雾生成模型训练过程中烟雾生成模型中的多层特征图损失的总表示,Fj为抽取该烟雾生成模型的鉴别器Ds的第j层的输出特征图的表示,为抽取Fj时对整体损失函数的影响权重系数的表示,En,j为当输入样本规模为n时对生成结果和真实对照分别抽取Fj时相比的空间一致性期望的表示,n、j为正整数。 is the total representation of the multi-layer feature map loss in the smoke generation model during the training process of the smoke generation model, F j is the representation of the output feature map of the jth layer of the discriminator D s that extracts the smoke generation model, It is the expression of the influence weight coefficient on the overall loss function when extracting F j , E n, j is the representation of the spatial consistency expectation between the generated results and the real control when extracting F j when the input sample size is n, n , j is a positive integer.

中间结果中往往包含许多隐式的特征,所以可采用约束生成结果与真实数据使用生成器的镜像网络(G-1)进行计算并抽取某些中间层得到的结果的差异性来提升模型的生成能力。The intermediate results often contain many implicit features, so the difference between the generated results and the real data can be calculated using the mirror network (G -1 ) of the generator and the difference between the results obtained by extracting some intermediate layers can be used to improve the generation of the model ability.

34)总的损失函数为:34) Total loss function for:

其中,为烟雾生成模型训练过程的损失总表示,G(x)为烟雾生成模型中生成的单帧三维密度场,y为真实对照的单帧三维密度场,Ds为该烟雾生成模型的判断G(x)与真实对照单帧三维密度场y的空间一致性的鉴别器的表示,En为输入原始二维数据规模为n时该烟雾生成模型中G(x)经过Ds的鉴别期望的表示,在本文上下文讨论的离散数据情况下可理解为鉴别均值,为该烟雾生成模型利用真实数据y通过流体动力学推断得到的时序上连续的对流场帧集合的表示,为该烟雾生成模型利用生成数据G(x)通过流体动力学推断得到的时序上连续的对流场帧集合的表示,Em为样本y的规模为m时的鉴别器对的鉴别期望的表示,在本文上下文讨论的离散数据情况下可理解为鉴别均值,Dt为该烟雾生成模型判断的时序一致性的鉴别器的表示,Fj为抽取该烟雾生成模型的鉴别器Ds的第j层的输出特征图的表示,为抽取Fj时对整体损失函数的影响权重系数的表示,En,j为当输入样本规模为n时对生成结果和真实对照分别抽取Fj时相比的空间一致性期望的表示,n、j为正整数。in, is the total loss representation of the smoke generation model training process, G(x) is the single-frame 3D density field generated in the smoke generation model, y is the single-frame 3D density field of the real control, D s is the judgment of the smoke generation model G( x) The expression of the discriminator with the spatial consistency of the real control single-frame three-dimensional density field y, E n is the expression of the discrimination expectation of G(x) in the smoke generation model after D s when the input original two-dimensional data scale is n , which can be understood as the discriminant mean in the case of discrete data discussed in the context of this paper, For the smoke generation model, the real data y is used to represent the temporally continuous flow field frame set obtained through fluid dynamics inference, For the smoke generation model, the generated data G(x) is used to represent the temporally continuous pair of flow field frame sets obtained through fluid dynamics inference, and E m is the discriminator pair when the size of the sample y is m In the case of discrete data discussed in the context of this article, it can be understood as the discriminative mean, and D t is the judgment of the smoke generation model and The representation of the discriminator of temporal consistency, F j is the representation of the output feature map of the jth layer of the discriminator D s that extracts the smoke generation model, It is the expression of the influence weight coefficient on the overall loss function when extracting F j , E n, j is the representation of the spatial consistency expectation between the generated results and the real control when extracting F j when the input sample size is n, n , j is a positive integer.

通过控制不同损失的权重来调整总的损失函数,使之对模型训练的指导最有效,生成器的生成能力最优。The overall loss function is adjusted by controlling the weights of different losses to make it the most effective guidance for model training and the generator's generation ability is optimal.

4)通过对生成的三维烟雾序列的基于GPU的多视角下的渲染,生成具有真实感的烟雾动画。4) Through GPU-based multi-view rendering of the generated 3D smoke sequence, a realistic smoke animation is generated.

结合GPU(Graphic Processing Unit)的特点,通过对多视角下的三维数据利用光线投射法渲染烟雾,得到烟雾的三维模型,实现视觉效果好,实时性高的烟雾模拟。Combined with the characteristics of GPU (Graphic Processing Unit), the 3D model of the smoke is obtained by using the ray-casting method to render the smoke from the 3D data under multiple perspectives, so as to realize the smoke simulation with good visual effect and high real-time performance.

图4是本发明的数据驱动的烟雾动画合成系统示意图。如图4所示,本发明实施例还提供一种可读存储介质,以及一种数据处理装置。本发明的可读存储介质存储有计可执行指令,可执行指令被数据处理装置的处理器执行时,实现上述数据驱动的烟雾动画合成方法。本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于可读存储介质中,如只读存储器、磁盘或光盘等。上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本发明实施例不限制于任何特定形式的硬件和软件的结合。Fig. 4 is a schematic diagram of the data-driven smoke animation synthesis system of the present invention. As shown in FIG. 4 , the embodiment of the present invention also provides a readable storage medium and a data processing device. The readable storage medium of the present invention stores executable instructions, and when the executable instructions are executed by the processor of the data processing device, the above-mentioned data-driven smoke animation synthesis method is realized. Those of ordinary skill in the art can understand that all or part of the steps in the above method can be completed by instructing related hardware (such as a processor) through a program, and the program can be stored in a readable storage medium, such as a read-only memory, magnetic disk or optical disk, etc. . All or part of the steps in the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module in the above-mentioned embodiment can be implemented in the form of hardware, such as implementing the corresponding functions through an integrated circuit, or can be implemented in the form of software function modules, such as executing programs/instructions stored in the memory by a processor to realize its corresponding functions. Embodiments of the invention are not limited to any specific combination of hardware and software.

虽然本发明已以实施例揭露如上,然其并非用以限定本发明,任何所属技术领域中的普通技术人员,在不脱离本发明的精神和范围内,可以做出若干变形和改进,故本发明的保护范围当视后附的申请专利范围所界定者为准。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention. Any person of ordinary skill in the art can make some modifications and improvements without departing from the spirit and scope of the present invention. Therefore, this The scope of protection of the invention shall be defined by the scope of the appended patent application.

Claims (10)

1.一种数据驱动的烟雾动画合成方法,其特征在于,包括:1. A data-driven smoke animation synthesis method, characterized in that, comprising: 根据三维烟雾数据集,生成二维烟雾轮廓数据;Generate two-dimensional smoke profile data according to the three-dimensional smoke data set; 通过该二维烟雾轮廓数据的训练生成网络,以获得烟雾生成模型;generating a network through the training of the two-dimensional smoke profile data to obtain a smoke generation model; 通过该烟雾生成模型,将该二维烟雾轮廓数据生成为三维烟雾序列;Generating the two-dimensional smoke profile data into a three-dimensional smoke sequence through the smoke generation model; 对该三维烟雾序列进行渲染,生成三维烟雾动画。Render the 3D smoke sequence to generate a 3D smoke animation. 2.如权利要求1所述的烟雾动画合成方法,其特征在于,该烟雾生成模型的损失函数为:2. smoke animation synthesis method as claimed in claim 1, is characterized in that, the loss function of this smoke generation model for: 其中,x为该二维烟雾轮廓数据,G(x)为该三维烟雾序列的单帧三维密度场,y为该三维烟雾数据集的单帧三维密度场,DS为判断G(x)与y的空间一致性的鉴别器,En为当x的规模为n时G(x)经过DS的鉴别期望,Em为y的规模为m时的鉴别器DS的鉴别期望,Dt为判断的时序一致性的鉴别器,Fj为抽取DS的第j层的输出特征图,为抽取Fj时对损失函数的影响权重系数,En,j为x的规模为n时对分别抽取Fj时相比的空间一致性期望,n、j为正整数。Among them, x is the two-dimensional smoke profile data, G(x) is the three-dimensional smoke sequence The single-frame 3D density field of , y is the 3D smoke data set The single-frame three-dimensional density field of , D S is the discriminator for judging the spatial consistency of G(x) and y, E n is the discrimination expectation of G(x) passing D S when the size of x is n, and E m is y The discriminator D S pairs of scale m The discriminant expectation of D t is the judgment and The time series consistent discriminator, F j is the output feature map of the jth layer of the extracted D S , For the loss function when extracting F j The influence weight coefficient, E n,j is when the scale of x is n to and The spatial consistency expectation compared when F j is extracted respectively, n and j are positive integers. 3.如权利要求1所述的烟雾动画合成方法,其特征在于,通过纳维-斯托克斯方程求解获取该三维烟雾数据集。3. The smoke animation synthesis method according to claim 1, wherein the three-dimensional smoke data set is obtained by solving the Navier-Stokes equation. 4.如权利要求1所述的烟雾动画合成方法,其特征在于,通过基于GPU的多视角下的渲染,生成该三维烟雾动画。4. The method for synthesizing smoke animation according to claim 1, wherein the three-dimensional smoke animation is generated by GPU-based multi-view rendering. 5.一种数据驱动的烟雾动画合成系统,其特征在于,包括:5. A data-driven smoke animation synthesis system, characterized in that it comprises: 二维数据生成模块,用于根据三维烟雾数据集,生成二维烟雾轮廓数据;A two-dimensional data generation module, configured to generate two-dimensional smoke profile data according to the three-dimensional smoke data set; 烟雾生成模型训练模块,用于通过该二维烟雾轮廓数据的训练生成网络,以获得烟雾生成模型;The smoke generation model training module is used to generate a network through the training of the two-dimensional smoke profile data to obtain a smoke generation model; 三维序列生成模块,用于通过该烟雾生成模型,将该二维烟雾轮廓数据生成为三维烟雾序列;A three-dimensional sequence generation module, configured to generate the two-dimensional smoke profile data into a three-dimensional smoke sequence through the smoke generation model; 烟雾动画渲染模块,用于对该三维烟雾序列进行渲染,生成三维烟雾动画。The smoke animation rendering module is used to render the 3D smoke sequence to generate a 3D smoke animation. 6.如权利要求5所述的烟雾动画合成系统,其特征在于,该烟雾生成模型的损失函数为:6. smoke animation synthesis system as claimed in claim 5, is characterized in that, the loss function of this smoke generation model for: 其中,x为该二维烟雾轮廓数据,G(x)为该三维烟雾序列的单帧三维密度场,y为该三维烟雾数据集的单帧三维密度场,DS为判断G(x)与y的空间一致性的鉴别器,En为当x的规模为n时G(x)经过DS的鉴别期望,Em为y的规模为m时的鉴别器DS的鉴别期望,Dt为判断的时序一致性的鉴别器,Fj为抽取DS的第j层的输出特征图,为抽取Fj时对损失函数的影响权重系数,En,j为x的规模为n时对分别抽取Fj时相比的空间一致性期望,n、j为正整数。Among them, x is the two-dimensional smoke profile data, G(x) is the three-dimensional smoke sequence A single frame of 3D density field, y is the 3D smoke data set The single-frame three-dimensional density field of , D S is the discriminator for judging the spatial consistency of G(x) and y, E n is the discriminative expectation of G(x) passing D S when the size of x is n, E m is y The discriminator D S pairs of scale m The discriminant expectation of D t is the judgment and The discriminator of temporal consistency, F j is the output feature map of the jth layer of D S extracted, For the loss function when extracting F j The influence weight coefficient, E n,j is when the size of x is n to and The spatial consistency expectation compared when F j is extracted respectively, n and j are positive integers. 7.如权利要求5所述的烟雾动画合成系统,其特征在于,该系统还包括:烟雾数据集生成模块,用于通过纳维-斯托克斯方程求解获取该三维烟雾数据集。7. The smoke animation synthesis system according to claim 5, further comprising: a smoke data set generation module, which is used to obtain the three-dimensional smoke data set by solving the Navier-Stokes equation. 8.如权利要求5所述的烟雾动画合成系统,其特征在于,该烟雾动画渲染模块具体包括:通过基于GPU的多视角下的渲染,生成该三维烟雾动画。8 . The smoke animation synthesis system according to claim 5 , wherein the smoke animation rendering module specifically comprises: generating the three-dimensional smoke animation through GPU-based multi-view rendering. 9.一种可读存储介质,存储有可执行指令,该可执行指令用于执行如权利要求1~4任一项所述的数据驱动的烟雾动画合成方法。9. A readable storage medium storing executable instructions for executing the data-driven smoke animation synthesis method according to any one of claims 1-4. 10.一种数据处理装置,包括如权利要求9所述的可读存储介质,该数据处理装置调取并执行该可读存储介质中的可执行指令,以进行三维烟雾动画合成。10. A data processing device, comprising the readable storage medium according to claim 9, the data processing device retrieves and executes the executable instructions in the readable storage medium to synthesize three-dimensional smoke animation.
CN201910228740.3A 2019-03-25 2019-03-25 Data-driven smoke animation synthesis method and system Active CN110084872B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910228740.3A CN110084872B (en) 2019-03-25 2019-03-25 Data-driven smoke animation synthesis method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910228740.3A CN110084872B (en) 2019-03-25 2019-03-25 Data-driven smoke animation synthesis method and system

Publications (2)

Publication Number Publication Date
CN110084872A true CN110084872A (en) 2019-08-02
CN110084872B CN110084872B (en) 2020-12-25

Family

ID=67413526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910228740.3A Active CN110084872B (en) 2019-03-25 2019-03-25 Data-driven smoke animation synthesis method and system

Country Status (1)

Country Link
CN (1) CN110084872B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112380764A (en) * 2020-11-06 2021-02-19 华东师范大学 End-to-end rapid reconstruction method for gas scene under limited view

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070159049A1 (en) * 2006-01-11 2007-07-12 Samsung Electronics Co., Ltd. Method and system of rendering particle
US20110282641A1 (en) * 2010-05-16 2011-11-17 Stefan Bobby Jacob Xenos Method and system for real-time particle simulation
CN102496178A (en) * 2011-10-26 2012-06-13 北京航空航天大学 Three-dimensional smoke density field generating method based on single-viewpoint images
CN103489209B (en) * 2013-09-05 2016-05-18 浙江大学 A kind of controlled fluid animation producing method based on fluid key frame editor
CN105608727A (en) * 2016-03-01 2016-05-25 中国科学院计算技术研究所 Data driving inshore surge animation synthesis method and system
CN106340053A (en) * 2011-07-27 2017-01-18 梦工厂动画公司 Fluid dynamics framework for animated special effects

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070159049A1 (en) * 2006-01-11 2007-07-12 Samsung Electronics Co., Ltd. Method and system of rendering particle
US20110282641A1 (en) * 2010-05-16 2011-11-17 Stefan Bobby Jacob Xenos Method and system for real-time particle simulation
CN106340053A (en) * 2011-07-27 2017-01-18 梦工厂动画公司 Fluid dynamics framework for animated special effects
CN102496178A (en) * 2011-10-26 2012-06-13 北京航空航天大学 Three-dimensional smoke density field generating method based on single-viewpoint images
CN103489209B (en) * 2013-09-05 2016-05-18 浙江大学 A kind of controlled fluid animation producing method based on fluid key frame editor
CN105608727A (en) * 2016-03-01 2016-05-25 中国科学院计算技术研究所 Data driving inshore surge animation synthesis method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张娟: "流体动画生成方法研究综述", 《集成技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112380764A (en) * 2020-11-06 2021-02-19 华东师范大学 End-to-end rapid reconstruction method for gas scene under limited view
CN112380764B (en) * 2020-11-06 2023-03-17 华东师范大学 Gas scene end-to-end rapid reconstruction method under limited view

Also Published As

Publication number Publication date
CN110084872B (en) 2020-12-25

Similar Documents

Publication Publication Date Title
Zhang et al. Avatarverse: High-quality & stable 3d avatar creation from text and pose
US11514638B2 (en) 3D asset generation from 2D images
CN107085629B (en) A Fluid Simulation Method Based on Coupling of Video Reconstruction and Eulerian Model
CN113724354B (en) Gray image coloring method based on reference picture color style
CN115914505A (en) Video generation method and system based on voice-driven digital human model
JP4842242B2 (en) Method and apparatus for real-time expression of skin wrinkles during character animation
CN116777738A (en) Authentic virtual try-on method based on clothing area alignment and style-preserving modulation
Deng et al. Lumigan: Unconditional generation of relightable 3d human faces
Qiu et al. A Rapid, End‐to‐end, Generative Model for Gaseous Phenomena from Limited Views
CN113140033B (en) Single cumulant cloud image reconstruction method based on micro-rendering
CN110084872B (en) Data-driven smoke animation synthesis method and system
CN112991152A (en) Image processing method and device, electronic equipment and storage medium
CN118115642A (en) Three-dimensional digital person generation method, three-dimensional digital person generation device, electronic device, storage medium, and program product
Dai et al. PBR-Net: Imitating physically based rendering using deep neural network
CN114783039B (en) A 3D Human Model-Driven Motion Transfer Method
CN114373034B (en) Image processing method, apparatus, device, storage medium, and computer program
CN115393510A (en) Human body model construction method and device, electronic equipment and storage medium
Vanakittistien et al. 3D hair model from small set of images
CN115018996A (en) Method and device for generating 3D face model according to real person face photo
Li et al. Monet style oil painting generation based on cyclic generation confrontation network
Yu et al. Realistic image generation using adversarial generative networks combined with depth information
CN113205606A (en) Content sensitive virtual path redirection method
Lu et al. GenesisTex2: Stable, Consistent and High-Quality Text-to-Texture Generation
CN117671110B (en) Real-time rendering system and method based on artificial intelligence
CN119048369B (en) A method for synthesizing new views using noisy images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant