Fluid dynamic effect generation method and device, electronic equipment and storage medium

Through the simplified rotation generation of Bezier curves and line segments, the problems of complex calculations and poor real-time performance of traditional methods are solved, and efficient and flexible fluid fluctuation effect generation is achieved, which improves real-time and user experience.

CN119273815APending Publication Date: 2025-01-07NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411217785.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The traditional fluid fluctuation effect generation method has high computational complexity and poor real-time performance. It is difficult to meet the needs of efficient generation and dynamic control. It lacks flexibility and is difficult to adjust the shape and dynamic changes of fluid fluctuations according to specific needs.

Method used

By constructing Bezier curves and line segments as basic lines, simplifying and rotating the surface model is obtained, combining time changes to generate a fluid model, and using the efficient computational characteristics of Bezier curves to achieve the dynamic effect of fluid fluctuations.

Benefits of technology

It reduces the computational complexity of fluid dynamic effects, improves real-time and scalability, and realizes rapid generation and update of fluid fluctuations, ensuring a smooth user experience in interactive scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273815A_ABST
    Figure CN119273815A_ABST
Patent Text Reader

Abstract

The invention discloses a fluid dynamic effect generation method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: constructing a first waveform line and a basic line; the first waveform line is a Bezier curve, and the basic line is a line segment; simplifying the first waveform line to obtain a second waveform line; respectively rotating the first waveform line, the second waveform line and the basic line along a preset axis to obtain a first curved surface model, a second curved surface model and a basic plane model; generating a first curved surface model with a first curved surface changing along with time and a second curved surface model with a second curved surface changing along with time; mixing the first curved surface model and the second curved surface model to obtain a third curved surface model; and according to the third curved surface model and the basic plane model, generating a fluid model representing the effect of the fluid fluctuating along with time. The dynamic effect of the fluid fluctuation can be generated based on the Bezier curve, the calculation complexity is reduced, and the real-time performance of generating the dynamic effect of the fluid is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method for generating fluid dynamic effects, a device for generating fluid dynamic effects, an electronic device, and a computer-readable storage medium. Background Art

[0002] In the field of computer graphics, the generation and simulation of fluid waves has always been an important research direction. Fluid wave effects are widely used in games, animations, virtual reality, and film and television special effects. Their authenticity and dynamics directly affect the quality of the final visual effects. Traditional fluid wave effect generation schemes mainly rely on physical simulation and particle systems. Although these methods can produce relatively realistic effects, they have high computational complexity and poor real-time performance, making it difficult to meet the needs of efficient generation and dynamic control. Summary of the invention

[0003] The present disclosure provides a method for generating a fluid dynamic effect, a device for generating a fluid dynamic effect, an electronic device and a computer-readable storage medium to solve or at least partially solve the above-mentioned problems, as described below.

[0004] In a first aspect, the present disclosure provides a method for generating a fluid dynamic effect, the method comprising:

[0005] Constructing a first waveform line and a basic line; the first waveform line is a Bezier curve, and the basic line is a line segment;

[0006] Simplifying the first waveform line to obtain a second waveform line;

[0007] The first curved surface, the second curved surface and the basic plane model are obtained by rotating the first wavy line, the second wavy line and the basic line along a preset axis respectively;

[0008] Generate a first curved surface model of the first curved surface changing with time and a second curved surface model of the second curved surface changing with time;

[0009] Mixing the first curved surface model and the second curved surface model to obtain a third curved surface model;

[0010] A fluid model representing the effect of fluid fluctuation over time is generated based on the third curved surface model and the base plane model.

[0011] In a second aspect, the present disclosure further provides a device for generating fluid dynamic effects, the device comprising:

[0012] A line construction module, used to construct a first waveform line and a basic line; the first waveform line is a Bezier curve, and the basic line is a line segment;

[0013] A line simplification module, used for simplifying the first waveform line to obtain a second waveform line;

[0014] A line rotation module, used for rotating the first waveform line, the second waveform line and the basic line along a preset axis to obtain the first curved surface, the second curved surface and a basic plane model;

[0015] A surface model generating module, used for generating a first surface model of the first surface changing with time and a second surface model of the second surface changing with time;

[0016] A model mixing module, used for mixing the first curved surface model and the second curved surface model to obtain a third curved surface model;

[0017] The fluid model generation module is used to generate a fluid model that characterizes the effect of fluid fluctuation over time based on the third curved surface model and the basic plane model.

[0018] In a third aspect, the present disclosure further provides an electronic device, comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor;

[0019] When the processor executes the computer program instructions, the method for generating fluid dynamic effects as described in the first aspect above is implemented.

[0020] In a fourth aspect, the present disclosure further provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are executed by a processor, they are used to implement the method for generating fluid dynamic effects as described in the first aspect above.

[0021] The exemplary embodiments of the present disclosure have the following beneficial effects:

[0022] The method for generating fluid dynamic effects provided by the present disclosure first constructs a first waveform line and a basic line, wherein the first waveform line is a Bezier curve and the basic line is a line segment, then simplifies the first waveform line to obtain a second waveform line, and then rotates the first waveform line, the second waveform line and the basic line along a preset axis to obtain a first curved surface, a second curved surface and a basic plane model, and then generates a first curved surface model of the first curved surface changing with time and a second curved surface model of the second curved surface changing with time, and then mixes the first curved surface model and the second curved surface model to obtain a third curved surface model, and then generates a fluid model representing the effect of fluid fluctuation over time based on the third curved surface model and the basic plane model. The present disclosure can generate a fluid model of the effect of fluid fluctuation over time based on the Bezier curve, realize the dynamic effect of fluid fluctuation, reduce the computational complexity of the fluid dynamic effect, and use the efficient computational characteristics of the Bezier curve to realize the rapid generation and update of the fluid dynamic effect, thereby improving the real-time performance of the generated fluid dynamic effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a flow chart of a method for generating fluid dynamic effects provided by one of the embodiments of the present disclosure;

[0024] Figure 2-Figure 17 They are respectively schematic diagrams of a process for generating a fluid dynamic effect provided by one of the embodiments of the present disclosure;

[0025] Fig.18 is a block diagram of a device for generating fluid dynamic effects provided by one of the embodiments of the present disclosure;

[0026] Fig.19 It is a logical structure diagram of an electronic device for realizing the generation of fluid dynamic effects provided by one of the embodiments of the present disclosure. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present disclosure.

[0028] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0029] It should be understood that in the embodiments of the present disclosure, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.

[0030] It should be understood that in the embodiments of the present disclosure, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean that B is determined only according to A, and B can also be determined according to A and / or other information.

[0031] In one embodiment of the present disclosure, the method for generating fluid dynamic effects can be run on a terminal device or a server. The terminal device can be a desktop computer, a laptop computer, a tablet computer, a mobile phone, etc., or other electronic devices, which are not specifically limited in the present disclosure. The server is used to provide background services for the client of the application in the terminal device. For example, the server can be the background server of the above-mentioned application. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms and other basic cloud computing services, which are not specifically limited in the present disclosure.

[0032] Before describing the embodiments of the present disclosure in detail, the related art is firstly further introduced.

[0033] The traditional methods of physical simulation of fluid waves are based on the principles of fluid mechanics, which simulate the propagation and interaction of fluids by solving fluid mechanics equations. These traditional methods mainly include the following:

[0034] Finite Difference Method (FDM): By discretizing the fluid mechanics equations, the movement and changes of the fluid are calculated point by point. This method has high accuracy, but the amount of calculation is large and the real-time performance is poor.

[0035] Finite Element Method (FEM): The fluid domain is divided into several small finite elements, and the dynamics of fluid fluctuations are simulated by solving the equations of these finite elements. This method can handle complex boundary conditions, but the computational complexity is high.

[0036] Particle system method: The fluid is discretized into several particles, and the fluid wave effect is generated by simulating the interaction between particles. This method is flexible, but it is difficult to simulate fine ripple details.

[0037] In summary, the traditional method of physically simulating fluid fluctuations has the following problems:

[0038] 1. High computational complexity: The dynamic effects of fluid fluctuations simulated by physical methods, such as the finite difference method, the finite element method, and the particle system method, usually require a large amount of computing resources to solve complex fluid mechanics equations. This makes it difficult to meet the requirements of high efficiency in practical applications, especially in scenarios that require real-time generation and dynamic control.

[0039] 2. Poor real-time performance: Due to the high computational complexity, physical simulation methods perform poorly in real-time, which makes it difficult to achieve smooth fluid fluctuation dynamic effects in games, virtual reality, and interactive applications.

[0040] 3. Lack of flexibility: Although the particle system method has certain advantages in generating natural ripple effects, it lacks flexibility and controllability. It is difficult to adjust the shape and dynamic changes of fluid fluctuations according to specific needs, which limits its applicability in different application scenarios.

[0041] Figure 1 A method for generating a fluid dynamic effect provided by one embodiment of the present disclosure is shown. Figure 1 As shown, the method includes the following steps S101 to S106.

[0042] Step S101: construct a first waveform line and a basic line; the first waveform line is a Bezier curve, and the basic line is a line segment.

[0043] In the present disclosure, the first waveform line is a Bezier curve, which has a certain waveform shape and can simulate the basic form of fluid fluctuations.

[0044] In one embodiment of the present disclosure, the first waveform line may be constructed in the following manner, including:

[0045] Get the curve control points;

[0046] Construct a first wave line according to the curve control points.

[0047] Among them, the Bezier curve is a smooth curve described by curve control points. The curve control points can be preset in advance or selected before generating the dynamic effect of fluid fluctuations each time to meet the customized needs of the fluid waveform style. A first-order Bezier curve can be constructed based on 2 control points, a second-order Bezier curve can be constructed based on 3 control points, a third-order Bezier curve can be constructed based on 4 control points, and an n-order Bezier curve can be constructed based on n+1 control points.

[0048] Optionally, the first waveform line may be a multi-order Bezier curve.

[0049] Optionally, the order of the first waveform line is greater than or equal to 10. A high-order Bezier curve of order 10 or higher has more curve control points. The number of these curve control points determines the shape and possible complexity of the Bezier curve. A high-order Bezier curve of order 10 or higher provides greater design flexibility and more complex curve shapes by increasing the number of curve control points.

[0050] For example, Figure 2 shows a partial schematic diagram of a first waveform line, Figure 2 The first waveform line shown in is a multi-order Bezier curve, and its order is 20.

[0051] Optionally, in order to support the processing capabilities of some processing software and facilitate the processing calculation of the processing software, the first waveform line can be converted into a polygon line segment. For example, Figure 2 The polygonal line segment obtained by converting the first waveform line shown in FIG. Figure 3 As shown, the polygonal line segment is then smoothed to convert the first waveform line into a form that can be processed by the processing software, and then the next step of processing is performed.

[0052] In an optional implementation, the polygonal line segment can be smoothed by an interpolation subdivision method. Specifically, the coordinates of every two adjacent points on the polygonal line segment can be averaged, and a point can be inserted at the coordinate position indicated by the coordinate average, that is, a midpoint can be inserted between two adjacent points. Then, the original points on the polygonal line segment and the line formed by the inserted points can be smoothed. Figure 3 The lines obtained by smoothing the polygonal line segments shown in Figure 4 shown.

[0053] In the present disclosure, the basic line is a line segment. When the line is constructed, the basic line and the first waveform line are separate lines, and there is no intersection between the two.

[0054] Step S102: simplify the first waveform line to obtain a second waveform line.

[0055] In this step, the first waveform line may be simplified first, and then the simplified first waveform line may be smoothed to obtain the second waveform line.

[0056] In an optional embodiment, the first waveform line can be simplified in the following manner: taking the average value of the coordinates of every two adjacent points on the first waveform line, thereby merging every two adjacent points on the first waveform line into one point, the coordinates of the merged point are the average value of the coordinates of the two adjacent points, and the second waveform line formed by the merged points is the simplified first waveform line.

[0057] In an optional embodiment, the first waveform line can be simplified in the following manner: delete one point every N points on the first waveform line, where the value of N can be 1, 2, 3, etc., so that some points on the first waveform line can be retained, and the second waveform line formed by the retained points is the simplified first waveform line.

[0058] After simplifying the first waveform line, the simplified first waveform line can be smoothed. In an optional implementation, the simplified first waveform line can be smoothed by an interpolation subdivision method. Specifically, the coordinates of every two adjacent points on the first waveform line can be averaged, and a point can be inserted at the coordinate position indicated by the coordinate average, that is, a midpoint is inserted between two adjacent points, and then the original points on the first waveform line and the line formed by the inserted points can be smoothed to obtain a second waveform line.

[0059] Optionally, in the process of interpolating and subdividing the simplified first waveform line, the number of points on the second waveform line can be made the same as the number of points on the first waveform line, that is, the sum of the number of points on the simplified first waveform line and the number of inserted points is controlled to be the same as the number of points on the first waveform line, so as to facilitate subsequent processing.

[0060] For example, Figure 4 The lines shown in the figure can be simplified as follows: Figure 5 As shown, Figure 5 The lines shown in the figure are smoothed to obtain lines as shown in the figure. Figure 6 shown.

[0061] Step S103: The first waveform line, the second waveform line and the base line are respectively rotated along a preset axis to obtain a first curved surface, a second curved surface and a base plane model.

[0062] In this step, the first waveform line can be controlled to rotate along a preset axis to obtain a first curved surface; the second waveform line can be controlled to rotate along a preset axis to obtain a second curved surface; the basic line can be controlled to rotate along a preset axis to obtain a basic plane model.

[0063] In one embodiment of the present disclosure, the preset axis is located in the same plane as the first waveform line, the second waveform line and the base line and is perpendicular to the base line. Exemplarily, the first waveform line, the second waveform line and the base line are all constructed in the same world coordinate system (exemplarily, when the world coordinate system is displayed on the screen, the positive direction of the X axis can be the horizontal direction of the screen, the positive direction of the Y axis is vertically upward, and the positive direction of the Z axis is perpendicular to the screen plane and points to the user), and the base line is parallel to the XZ plane of the world coordinate system (i.e., the plane where the X axis and the Z axis are located together), then the preset axis can be the Y axis of the world coordinate system.

[0064] For example, Figure 4 The lines shown can be rotated along the preset axis to obtain Figure 7 The first curved surface shown; Figure 6 The lines shown can be rotated along the preset axis to obtain Figure 8 The second surface shown; the basic lines can be Fig. 9 As shown, Figure 7 The lines shown can be obtained as Fig.10 It should be noted that since the first curved surface and the second curved surface will change over time (as will be explained below), Figure 7 It shows the performance of the first surface at a certain time node. Figure 8 What is shown is the performance of the second surface at a certain time node.

[0065] Step S104: Generate a first curved surface model of the first curved surface changing with time and a second curved surface model of the second curved surface changing with time.

[0066] In the present disclosure, the first surface model and the second surface model are both four-dimensional models, that is, the four-dimensional model is a three-dimensional model that takes time factors into consideration. The four-dimensional model includes a three-dimensional model and control data that takes time factors into consideration. By controlling the three-dimensional model with control data that takes time factors into consideration, the three-dimensional model can have different performances as time changes.

[0067] In one embodiment of the present disclosure, generating a first curved surface model in which a first curved surface changes with time may include the following steps S1041 to S1042.

[0068] Step S1041: Generate first deformation control data of a first waveform line whose shape changes with time.

[0069] In this step, first deformation control data for controlling the shape of the first waveform line to change over time can be generated. Through the first deformation control data, the first waveform line can be controlled to produce waveform changes over time.

[0070] In an optional implementation, first deformation control data may be generated so that the shape of the first waveform line gradually approaches the shape of the second waveform line over time. Since the second waveform line is a result of simplifying the first waveform line, the waveform complexity and waveform strength of the second waveform line are simpler and smoother than those of the first waveform line. Therefore, the shape of the first waveform line gradually approaches the shape of the second waveform line over time, which means that the first waveform line gradually becomes simpler and smoother over time, which conforms to the real dynamics of fluid fluctuations over time.

[0071] In this embodiment, first deformation control data may be generated based on the point position data of the first waveform line and the point position data of the second waveform line so that the shape of the first waveform line gradually approaches the shape of the second waveform line over time. By adjusting the point position of the first waveform line, the first waveform line gradually approaches the point position of the second waveform line, thereby generating a waveform change.

[0072] Optionally, the first deformation control data may be generated by the following formula.

[0073] A' n =T·B n +A n ·(1-T);T=Frame·(1 / MaxFrame)

[0074] The number of points on the first waveform line is the same as the number of points on the second waveform line. The number of points on the first waveform line is the same as the number of points on the second waveform line. This can be achieved by smoothing the first waveform line and the second waveform line in the above embodiment. That is, when the first waveform line and the second waveform line are smoothly subdivided, the two can be subdivided into points having the same number. n Indicates the world coordinates of the nth point on the first waveform line; B nRepresents the world coordinates of the nth point on the second waveform line; Frame represents the current frame number; MaxFrame represents the duration of the effect of fluid fluctuation over time (for example, 30 frames, 40 frames). The time it takes to play this duration of the effect of fluid fluctuation over time, that is, one cycle of the effect of fluid fluctuation over time.

[0075] By observing the above formula, it can be seen that as the number of frames of the wave effect, or the duration, increases, the points on the second waveform line will gradually approach the second waveform line.

[0076] Step S1042: Generate first displacement control data of the position of the first waveform line changing with time; the first curved surface model includes the first curved surface, first deformation control data and first displacement control data.

[0077] It is understandable that as time goes by, the fluid will not only produce changes in waveform, but also changes in displacement. For example, in one example, when water waves ripple, not only will the waveform of the water waves decrease in intensity over time, but the position of the water waves will also diffuse outward over time. Therefore, for the first waveform line, it is also necessary to generate first displacement control data for the change in the position of the first waveform line over time.

[0078] In practical applications, the position of the first waveform line at a certain time can be determined by a function with time as the independent variable. For example, the position of the first waveform line at a certain time can move a preset distance along the X-axis direction of the world coordinate system at every preset time.

[0079] In one of the embodiments of the present disclosure, generating a second curved surface model in which the second curved surface changes with time may include the following step S1043.

[0080] Step S1043: Generate second displacement control data of the position of the second waveform line changing with time; the second curved surface model includes the second curved surface and the second displacement control data.

[0081] In this step, the position of the first waveform line and the position of the second waveform line change with time synchronously, that is, the law of the position of the second waveform line changing with time is the same as the law of the position of the first waveform line changing with time. Exemplarily, the position of the first waveform line at a certain time can move a distance K along the X-axis direction of the world coordinate system every preset time, and the position of the second waveform line at a certain time can also move a distance K along the X-axis direction of the world coordinate system every preset time, thereby ensuring that the position of the first waveform line and the position of the second waveform line change with time synchronously.

[0082] For example, Fig.11 Shows Figure 4The first waveform line and Figure 6 The second waveform line shown shows a change in shape over time, wherein: Fig.11 (a) is the shape of the first waveform line and the second waveform line at the beginning of the cycle, Fig.11 (b) is the shape of the first waveform line and the second waveform line in the middle of the cycle, Fig.11 (c) shows the shapes of the first and second waveform lines at the end of the cycle.

[0083] Step S105: Mix the first curved surface model and the second curved surface model to obtain a third curved surface model.

[0084] In one embodiment of the present disclosure, this step can be specifically implemented through the following steps S1051 to S1052.

[0085] Step S1051: merging the first curved surface model and the second curved surface model with the first curved surface as the waveform top surface and the second curved surface as the waveform bottom surface.

[0086] In this step, the first curved surface in the first curved surface model can be used as the waveform top surface, and the second curved surface in the second curved surface model can be used as the waveform bottom surface, thereby merging the first curved surface model and the second curved surface model.

[0087] Step S1052: adding noise to the merged surface model to obtain a third surface model.

[0088] In this step, noise may be added to the merged surface model. Adding noise may introduce some randomness into the waveform of the surface model, so that the waveform of the surface model has a more realistic and natural visual effect.

[0089] Exemplarily, the noise added to the merged surface model may be 3D noise, such as 3D Perlin noise.

[0090] Step S1052: adding noise to the merged surface model to obtain a third surface model.

[0091] Exemplarily, the first surface in the first surface model is used as the waveform top surface, and the second surface in the second surface model is used as the waveform bottom surface, and then the first surface model and the second surface model are merged, and noise is added to the merged surface model, so that a third surface model can be obtained, such as Fig.12 shown.

[0092] Step S106: Generate a fluid model that characterizes the effect of fluid fluctuation over time based on the third curved surface model and the basic plane model.

[0093] In one embodiment of the present disclosure, this step can be specifically implemented through the following steps S1061 to S1063.

[0094] Step S1061: Obtain weight mask.

[0095] Step S1062: Process the third curved surface model through weight masking to obtain a fourth curved surface model.

[0096] In this embodiment, a weight mask may be constructed in advance, and then the weight mask may be obtained when the third surface model needs to be processed, and then the points on the third surface model may be adjusted by the weight mask, thereby disturbing the third surface model.

[0097] In one embodiment, the step of processing the third surface model through a weight mask can be achieved in the following way: for a certain point on the third surface model, determine the product of the world coordinates of the point in the world coordinate system and the weight for the point in the weight mask; according to the product, adjust the point.

[0098] For point P on the third surface model, the world coordinates of point P in the world coordinate system are (x p ,y p ,z p ), determine the world coordinates of point P in the world coordinate system and multiply the weight w for point P in the weight mask to obtain the world coordinates (x p w,y p w,z p w), adjust point P so that point P is located at the world coordinate (x p w,y p w,z p w) indicates the position indicated by the world coordinate (x p w,y p w,z p w) is the world coordinate of point P after being affected by the weight mask.

[0099] In one embodiment of the present disclosure, the weight w for a certain point in the weight mask is determined based on the polar angle and polar diameter of the point in the polar coordinate system, wherein the origin position of the polar coordinate system is the same as that of the world coordinate system. That is, the weight w for a certain point in the weight mask is related to the polar angle and polar diameter of the point in the polar coordinate system.

[0100] In an alternative example, w=[atan(@Pz,@Px) / $PI]·[length(@P) / 10]. Among them, @Pz is the z coordinate of point P in the world coordinate system; @Px is the x coordinate of point P in the world coordinate system; atan(@Pz,@Px) is the arc tangent value of point P relative to the origin position (0,0,0) of the world coordinate system, that is, the angle of point P in the xz plane of the world coordinate system (expressed in radians), and atan(@Pz,@Px) is also the polar angle of point P in the polar coordinate system; $PI means converting the angle expressed in radians to an angle in units of π, so that the value range of the polar angle will be -1 to 1 (-π to π corresponds to -1 to 1); length(@P) calculates the distance from point P to the origin position (0,0,0) of the world coordinate system (that is, the Euclidean distance), and length(@P) is also the polar diameter of point P in the polar coordinate system; / 10 is used to scale the distance length(@P) to a smaller range, here the distance length(@P) is divided by 10.

[0101] In an optional embodiment of the present disclosure, a first weight sub-mask can be constructed based on the polar angle of the point in the polar coordinate system, and a second weight sub-mask can be constructed based on the polar diameter of the point in the polar coordinate system. The above weight mask includes the first weight sub-mask and the second weight sub-mask, that is, the perturbation of the above weight mask can be regarded as the superposition of the perturbation of the first weight sub-mask and the perturbation of the second weight sub-mask. For example, the visualization result of the first weight sub-mask can refer to Fig.13 , the visualization result of the second weight sub-mask can be referred to Fig.14 .

[0102] For example, in the above example, the weight w1 for point P in the first weight sub-mask is atan(@Pz,@Px) / $PI, and the weight w2 for point P in the second weight sub-mask is length(@P) / 10, w=w1w2, then the world coordinates of point P after being affected by the weight mask are (x p w1w2,y p w1w2,z p w1w2).

[0103] For example, by Fig.13 The first weight submask and Fig.14 The fourth surface model obtained by perturbing the second weight sub-mask is shown as Fig.15 As shown, Fig.15 (a) is the performance of the fourth surface model at the beginning of the cycle as it changes over time. Fig.15 (b) is the performance of the fourth surface model in the middle of the cycle as it changes over time. Fig.15(c) shows the performance of the fourth surface model at the end of the period as it changes over time.

[0104] Step S1063: Generate a fluid model that characterizes the effect of fluid fluctuation over time based on the fourth curved surface model and the basic plane model.

[0105] In this step, noise may be added to the basic plane model to obtain a fifth curved surface model. Optionally, the noise added to the basic plane model may be 2D noise. Fig.10 The fifth surface model obtained by adding noise to the basic plane model shown in FIG. Fig.16 Then, by mixing the fourth surface model and the fifth surface model, a fluid model that represents the effect of fluid fluctuation over time can be obtained.

[0106] In one of the embodiments of the present disclosure, the fourth curved surface model and the fifth curved surface model may be mixed by the following formula.

[0107] AB' n =S·C n +AB n (1-S); S = 0 or f(r)

[0108] Among them, C n Represents the world coordinates of the nth point on the fifth surface model; AB n Indicates the world coordinates of the point on the fourth surface model corresponding to the nth point on the fifth surface model along the direction of the preset axis; when there is no corresponding point on the fourth surface model from the nth point on the fifth surface model along the direction of the preset axis, S is 0; when there is a corresponding point on the fourth surface model from the nth point on the fifth surface model along the direction of the preset axis, S is f(r); r represents the distance between the nth point on the fifth surface model and the origin of the world coordinate system in the world coordinate system; AB n It represents the mixed world coordinates of the point on the fourth surface model corresponding to the nth point on the fifth surface model along the direction of the preset axis.

[0109] In this embodiment, the world coordinates of a certain point on the fourth curved surface model can be changed from AB to n Adjust to AB' n .

[0110] In this embodiment, a ray can be emitted from the nth point on the fifth curved surface model along the direction of the preset axis to detect whether there is a fourth curved surface model in the direction of the ray. If the fourth curved surface model is detected in the direction of the ray, it means that there is a corresponding point on the fourth curved surface model from the nth point on the fifth curved surface model along the direction of the preset axis. The intersection of the ray and the fourth curved surface model is the point on the fourth curved surface model corresponding to the nth point on the fifth curved surface model along the direction of the preset axis. If the fourth curved surface model is detected not to exist in the direction of the ray, it means that there is no corresponding point on the fourth curved surface model from the nth point on the fifth curved surface model along the direction of the preset axis.

[0111] Optionally, the length of the ray emitted from the nth point on the fifth curved surface model along the direction of the preset axis can be limited to reduce the amount of calculation. The ray length L ray =L1-L2, where L1 represents the maximum value of the bounding box of the fifth curved surface model in the direction where the preset axis is located, and -L2 represents the minimum value of the bounding box of the fifth curved surface model in the direction where the preset axis is located.

[0112] When a ray is emitted from the nth point on the fifth curved surface model along the direction of the preset axis and it is detected that there is no fourth curved surface model in the direction of the ray, the value of S is 0; when a ray is emitted from the nth point on the fifth curved surface model along the direction of the preset axis and it is detected that there is a fourth curved surface model in the direction of the ray, the value of S is f(r), where f(r) is a function with the distance r between the nth point on the fifth curved surface model and the origin of the world coordinate system in the world coordinate system as the independent variable, r = length(@N), where @N is the world coordinate of the nth point on the fifth curved surface model in the world coordinate system. In an optional example, f(r) = r / 10 = length(@N) / 10.

[0113] The fourth curved surface model and the fifth curved surface model are mixed to obtain a fluid model that characterizes the effect of fluid fluctuation over time. According to the first deformation control data, the fluid model can be controlled to produce a dynamic effect of morphological change over time, and according to the first displacement control data and the second displacement control data, the fluid model can be controlled to produce a dynamic effect of waveform diffusion over time.

[0114] For example, a fluid model that characterizes the effect of fluid fluctuations over time is Fig.17 As shown, Fig.17 (a) is the performance of the fluid model at the beginning of the cycle as it changes over time. Fig.17 (b) is the performance of the fluid model in the middle of the cycle as it changes over time. Fig.17(c) shows the performance of the fluid model at the end of the period as it changes over time.

[0115] If the fluid model needs to be applied in a virtual scene, the material of the fluid model can be rendered. For example, if the water flow fluctuation is to be simulated, the water material of the fluid model can be rendered. For example, if the liquid metal fluctuation is to be simulated, the metal material of the fluid model can be rendered.

[0116] The method for generating fluid dynamic effects provided by the present disclosure first constructs a first waveform line and a basic line, wherein the first waveform line is a Bezier curve and the basic line is a line segment, then simplifies the first waveform line to obtain a second waveform line, and then rotates the first waveform line, the second waveform line and the basic line along a preset axis to obtain a first curved surface, a second curved surface and a basic plane model, and then generates a first curved surface model of the first curved surface changing with time and a second curved surface model of the second curved surface changing with time, and then mixes the first curved surface model and the second curved surface model to obtain a third curved surface model, and then generates a fluid model representing the effect of fluid fluctuation over time based on the third curved surface model and the basic plane model. The present disclosure can generate a fluid model of the effect of fluid fluctuation over time based on the Bezier curve, realize the dynamic effect of fluid fluctuation, reduce the computational complexity of the fluid dynamic effect, and use the efficient computational characteristics of the Bezier curve to realize the rapid generation and update of the fluid dynamic effect, thereby improving the real-time performance of the generated fluid dynamic effect.

[0117] After testing, using conventional ripple physical simulation solution, when the generated model has the same model grid size and number of model faces, the calculation time for each frame of the fluid fluctuation special effect is 2.899 seconds per frame, while using the exemplary embodiment of the present disclosure, the calculation time for each frame of the fluid fluctuation special effect is 0.748 seconds per frame.

[0118] The exemplary embodiments of the present disclosure have the following advantages:

[0119] 1. High computational efficiency: The exemplary embodiments of the present disclosure can generate dynamic effects of fluid fluctuations based on multi-order Bezier curves, which can reduce the computational complexity of fluid dynamic effects and improve computational efficiency, so that real-time generation and dynamic control can be achieved in practical applications.

[0120] 2. Strong real-time performance: The exemplary embodiments of the present disclosure can achieve rapid generation and update of fluid dynamic effects by utilizing the efficient computing characteristics of multi-order Bezier curves, ensuring a smooth user experience in interactive scenarios.

[0121] 3. High scalability: The exemplary embodiments of the present disclosure can cope with different requirements for water wave ripple generation effects in different application scenarios. By adjusting the control points and orders of the Bezier curve, high-resolution and large-scale fluid fluctuation simulation can be achieved without significantly increasing the computational complexity, thereby enhancing the scalability of the technical solution.

[0122] Corresponding to the method for generating fluid dynamic effects provided in the embodiment of the present disclosure, the embodiment of the present disclosure also provides a device for generating fluid dynamic effects. Fig.18 As shown, the device 700 includes:

[0123] A line construction module 701 is used to construct a first waveform line and a basic line; the first waveform line is a Bezier curve, and the basic line is a line segment;

[0124] A line simplification module 702, configured to simplify the first waveform line to obtain a second waveform line;

[0125] A line rotation module 703 is used to obtain the first curved surface, the second curved surface and a basic plane model by rotating the first wavy line, the second wavy line and the basic line along a preset axis respectively;

[0126] A surface model generating module 704, configured to generate a first surface model of the first surface changing with time and a second surface model of the second surface changing with time;

[0127] A model mixing module 705, configured to mix the first curved surface model and the second curved surface model to obtain a third curved surface model;

[0128] The fluid model generation module 706 is used to generate a fluid model that represents the effect of fluid fluctuation over time based on the third curved surface model and the basic plane model.

[0129] In one embodiment of the present disclosure, generating a first curved surface model in which the first curved surface changes with time includes:

[0130] Generate first deformation control data in which the shape of the first waveform line changes with time;

[0131] Generate first displacement control data showing that the position of the first waveform line changes with time; the first curved surface model includes the first curved surface, the first deformation control data and the first displacement control data.

[0132] In one embodiment of the present disclosure, generating a second curved surface model of the second curved surface changing with time includes:

[0133] Second displacement control data is generated, indicating that the position of the second waveform line changes with time; and the second curved surface model includes the second curved surface and the second displacement control data.

[0134] In one embodiment of the present disclosure, the step of generating first deformation control data in which the shape of the first waveform line changes with time includes:

[0135] First deformation control data is generated so that the shape of the first waveform line gradually approaches the shape of the second waveform line over time.

[0136] In one embodiment of the present disclosure, the generating of the first deformation control data such that the shape of the first waveform line gradually approaches the shape of the second waveform line over time includes:

[0137] First deformation control data is generated based on the point position data of the first waveform line and the point position data of the second waveform line so that the shape of the first waveform line gradually approaches the shape of the second waveform line over time.

[0138] In one embodiment of the present disclosure, generating first deformation control data such that the shape of the first waveform line gradually approaches the shape of the second waveform line over time according to the point data of the first waveform line and the point data of the second waveform line includes:

[0139] Generate first deformation control data that makes the shape of the first waveform line gradually approach the shape of the second waveform line over time according to the point data of the first waveform line and the point data of the second waveform line by the following formula;

[0140] A' n =T·B n +A n ·(1-T);T=Frame·(1 / MaxFrame)

[0141] The number of points on the first waveform line is the same as the number of points on the second waveform line; n represents the world coordinates of the nth point on the first waveform line; B n Represents the world coordinates of the nth point on the second waveform line; Frame represents the current frame number; MaxFrame represents the duration of the effect of fluid fluctuation over time.

[0142] In one embodiment of the present disclosure, the mixing of the first curved surface model and the second curved surface model to obtain a third curved surface model includes:

[0143] Merging the first curved surface model and the second curved surface model with the first curved surface as the waveform top surface and the second curved surface as the waveform bottom surface;

[0144] Noise is added to the merged surface model to obtain a third surface model.

[0145] In one embodiment of the present disclosure, generating a fluid model representing the effect of fluid fluctuation over time according to the third curved surface model and the basic plane model includes:

[0146] Get weight mask;

[0147] Processing the third curved surface model by using the weight mask to obtain a fourth curved surface model;

[0148] A fluid model representing the effect of fluid fluctuation over time is generated based on the fourth curved surface model and the basic plane model.

[0149] In one embodiment of the present disclosure, the processing of the third surface model by using the weight mask includes:

[0150] For a point on the third curved surface model, determine the product of the world coordinate of the point in the world coordinate system and the weight for the point in the weight mask;

[0151] The point position is adjusted according to the product.

[0152] In one embodiment of the present disclosure, the weight for the point in the weight mask is determined based on the polar angle and polar diameter of the point in a polar coordinate system, wherein the origin position of the polar coordinate system is the same as that of the world coordinate system.

[0153] In one embodiment of the present disclosure, generating a fluid model representing the effect of fluid fluctuation over time according to the fourth curved surface model and the basic plane model includes:

[0154] Adding noise to the basic plane model to obtain a fifth curved surface model;

[0155] The fourth curved surface model and the fifth curved surface model are mixed to obtain a fluid model that represents the effect of fluid fluctuation over time.

[0156] In one embodiment of the present disclosure, the mixing of the fourth curved surface model and the fifth curved surface model comprises:

[0157] The fourth curved surface model and the fifth curved surface model are mixed by the following formula;

[0158] AB' n =S·C n+AB n (1-S); S = 0 or f(r)

[0159] Among them, C n represents the world coordinates of the nth point on the fifth curved surface model; AB n represents the world coordinates of the point on the fourth curved surface model corresponding to the nth point on the fifth curved surface model along the direction of the preset axis; when there is no corresponding point on the fourth curved surface model from the nth point on the fifth curved surface model along the direction of the preset axis, S is 0; when there is a corresponding point on the fourth curved surface model from the nth point on the fifth curved surface model along the direction of the preset axis, S is f(r); r represents the distance between the nth point on the fifth curved surface model and the origin of the world coordinate system in the world coordinate system; AB n It represents the mixed world coordinates of the point on the fourth curved surface model corresponding to the nth point on the fifth curved surface model along the direction of the preset axis.

[0160] In one embodiment of the present disclosure, constructing the first waveform line includes:

[0161] Get the curve control points;

[0162] A first waveform line is constructed according to the curve control points.

[0163] In one embodiment of the present disclosure, the first waveform line is a multi-order Bezier curve.

[0164] In one embodiment of the present disclosure, the order of the first waveform line is greater than or equal to 10.

[0165] In one embodiment of the present disclosure, simplifying the first waveform line to obtain the second waveform line includes:

[0166] Simplifying the first waveform line;

[0167] The simplified first waveform line is smoothed to obtain a second waveform line.

[0168] In one embodiment of the present disclosure, the preset axis and the first waveform line, the second waveform line and the base line are all located in the same plane and are perpendicular to the base line.

[0169] The device for generating fluid dynamic effects provided by the present disclosure first constructs a first waveform line and a basic line, wherein the first waveform line is a Bezier curve and the basic line is a line segment, then simplifies the first waveform line to obtain a second waveform line, and then rotates the first waveform line, the second waveform line and the basic line along a preset axis to obtain a first curved surface, a second curved surface and a basic plane model, and then generates a first curved surface model of the first curved surface changing with time and a second curved surface model of the second curved surface changing with time, and then mixes the first curved surface model and the second curved surface model to obtain a third curved surface model, and then generates a fluid model representing the effect of fluid fluctuation over time based on the third curved surface model and the basic plane model. The present disclosure can generate a fluid model of the effect of fluid fluctuation over time based on the Bezier curve, realize the dynamic effect of fluid fluctuation, reduce the computational complexity of the fluid dynamic effect, and use the efficient computational characteristics of the Bezier curve to realize the rapid generation and update of the fluid dynamic effect, thereby improving the real-time performance of the generated fluid dynamic effect.

[0170] Next, an electronic device provided by an embodiment of the present disclosure is introduced. Fig.19 , Fig.19 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. The electronic device 800 may be equipped with a device for generating fluid dynamic effects described in an embodiment of the present disclosure, so as to realize the functions in an embodiment of the present disclosure. Specifically, the electronic device 800 includes: a receiver 801, a transmitter 802, a processor 803, and a memory 804 (the number of processors 803 in the electronic device 800 may be one or more, Fig.19 In the example of FIG. 801 , the processor 803 may include an application processor 8031 ​​and a communication processor 8032. In some embodiments of the present disclosure, the receiver 801, the transmitter 802, the processor 803 and the memory 804 may be connected via a bus or other means.

[0171] The memory 804 may include a read-only memory and a random access memory, and provides instructions and data to the processor 803. A portion of the memory 804 may also include a non-volatile random access memory (NVRAM). The memory 804 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.

[0172] The processor 803 controls the operation of the execution device. In a specific application, the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are referred to as bus systems in the figure.

[0173] The method disclosed in the above embodiment of the present disclosure can be applied to the processor 803, or implemented by the processor 803. The processor 803 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 803. The above processor 803 can be a general processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 803 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present disclosure. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiment of the present disclosure can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 804, and the processor 803 reads the information in the memory 804 and completes the steps of the above method in combination with its hardware.

[0174] The receiver 801 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device. The transmitter 802 can be used to output digital or character information through the first interface; the transmitter 802 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 802 can also include a display device such as a display screen.

[0175] In the embodiment of the present disclosure, the application processor 8031 ​​in the processor 803 is used to execute the method for generating fluid dynamic effects in the embodiment of the present disclosure. It should be noted that the specific manner in which the application processor 8031 ​​executes each step is based on the same concept as the various method embodiments in the present disclosure, and the technical effects it brings are the same as the various method embodiments in the present disclosure. For specific contents, please refer to the description in the method embodiments shown in the above disclosure, and no further description will be given here.

[0176] The disclosed embodiment also provides a chip for running instructions, which is used to execute the technical solution of the method for generating fluid dynamic effects in the above embodiment.

[0177] The embodiment of the present disclosure also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a processor, the processor executes the technical solution of the method for generating fluid dynamic effects in the above embodiment.

[0178] The embodiments of the present disclosure also provide a computer program product, including a computer program, which, when executed by a processor, is used to execute the technical solution of the method for generating fluid dynamic effects in the above embodiments.

[0179] The computer readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or dedicated server.

[0180] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0181] Although the present disclosure is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present disclosure. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the scope of protection of the present disclosure shall be based on the scope defined by the claims of the present disclosure.

Claims

1. A method for generating fluid dynamic effects, characterized in that: The method comprises: Constructing a first waveform line and a basic line; the first waveform line is a Bezier curve, and the basic line is a line segment; Simplifying the first waveform line to obtain a second waveform line; The first curved surface, the second curved surface and the basic plane model are obtained by rotating the first wavy line, the second wavy line and the basic line along a preset axis respectively; Generate a first curved surface model of the first curved surface changing with time and a second curved surface model of the second curved surface changing with time; Mixing the first curved surface model and the second curved surface model to obtain a third curved surface model; A fluid model representing the effect of fluid fluctuation over time is generated based on the third curved surface model and the base plane model.

2. The method according to claim 1, characterized in that: Generating a first curved surface model of the first curved surface changing with time, comprising: Generate first deformation control data in which the shape of the first waveform line changes with time; Generate first displacement control data showing that the position of the first waveform line changes with time; the first curved surface model includes the first curved surface, the first deformation control data and the first displacement control data.

3. The method according to claim 1, characterized in that Generating a second curved surface model of the second curved surface changing with time, comprising: Second displacement control data is generated, indicating that the position of the second waveform line changes with time; and the second curved surface model includes the second curved surface and the second displacement control data.

4. The method according to claim 2, characterized in that: The generating first deformation control data of the shape of the first waveform line changing with time comprises: First deformation control data is generated so that the shape of the first waveform line gradually approaches the shape of the second waveform line over time.

5. The method according to claim 4, characterized in that The generating of the first deformation control data such that the shape of the first waveform line gradually approaches the shape of the second waveform line over time includes: First deformation control data is generated based on the point position data of the first waveform line and the point position data of the second waveform line so that the shape of the first waveform line gradually approaches the shape of the second waveform line over time.

6. The method according to claim 5, characterized in that The step of generating first deformation control data such that the shape of the first waveform line gradually approaches the shape of the second waveform line over time according to the point position data of the first waveform line and the point position data of the second waveform line comprises: Generate first deformation control data that makes the shape of the first waveform line gradually approach the shape of the second waveform line over time according to the point data of the first waveform line and the point data of the second waveform line by the following formula; A’ n =T·B n +A n ·(1-T);T=Frame·(1 / MaxFrame) The number of points on the first waveform line is the same as the number of points on the second waveform line; n represents the world coordinates of the nth point on the first waveform line; B n Represents the world coordinates of the nth point on the second waveform line; Frame represents the current frame number; MaxFrame represents the duration of the effect of fluid fluctuation over time.

7. The method according to claim 1, characterized in that The mixing of the first curved surface model and the second curved surface model to obtain a third curved surface model comprises: Merging the first curved surface model and the second curved surface model with the first curved surface as the waveform top surface and the second curved surface as the waveform bottom surface; Noise is added to the merged surface model to obtain a third surface model.

8. The method according to claim 1, characterized in that: The step of generating a fluid model representing the effect of fluid fluctuation over time according to the third curved surface model and the basic plane model comprises: Get weight mask; Processing the third curved surface model by using the weight mask to obtain a fourth curved surface model; A fluid model representing the effect of fluid fluctuation over time is generated based on the fourth curved surface model and the basic plane model.

9. The method according to claim 8, characterized in that The processing of the third surface model by using the weight mask includes: For a point on the third curved surface model, determine the product of the world coordinate of the point in the world coordinate system and the weight for the point in the weight mask; The point position is adjusted according to the product.

10. The method according to claim 9, characterized in that The weight for the point in the weight mask is determined based on the polar angle and polar diameter of the point in a polar coordinate system, wherein the origin position of the polar coordinate system is the same as that of the world coordinate system.

11. The method according to claim 8, characterized in that The step of generating a fluid model representing the effect of fluid fluctuation over time according to the fourth curved surface model and the basic plane model comprises: Adding noise to the basic plane model to obtain a fifth curved surface model; The fourth curved surface model and the fifth curved surface model are mixed to obtain a fluid model that represents the effect of fluid fluctuation over time.

12. The method according to claim 11, characterized in that The mixing of the fourth curved surface model and the fifth curved surface model comprises: The fourth curved surface model and the fifth curved surface model are mixed by the following formula; AB’ n = S·C n + AB n ·(1 - S); S = 0 or f(r) Among them, C n represents the world coordinates of the nth point on the fifth curved surface model; AB n represents the world coordinates of the point on the fourth curved surface model corresponding to the nth point on the fifth curved surface model along the direction of the preset axis; when there is no corresponding point on the fourth curved surface model from the nth point on the fifth curved surface model along the direction of the preset axis, S is 0; when there is a corresponding point on the fourth curved surface model from the nth point on the fifth curved surface model along the direction of the preset axis, S is f(r); r represents the distance between the nth point on the fifth curved surface model and the origin of the world coordinate system in the world coordinate system; AB n It represents the mixed world coordinates of the point on the fourth curved surface model corresponding to the nth point on the fifth curved surface model along the direction of the preset axis.

13. The method according to claim 1, characterized in that Constructing the first waveform line includes: Get the curve control points; A first waveform line is constructed according to the curve control points.

14. The method according to claim 1, characterized in that The first waveform line is a multi-order Bezier curve.

15. The method according to claim 14, characterized in that The order of the first waveform line is greater than or equal to 10.

16. The method according to claim 1, characterized in that Simplifying the first waveform line to obtain a second waveform line includes: Simplifying the first waveform line; The simplified first waveform line is smoothed to obtain a second waveform line.

17. The method according to claim 1, characterized in that The preset axis and the first waveform line, the second waveform line and the base line are all located in the same plane and are perpendicular to the base line.

18. A device for generating fluid dynamic effects, characterized in that: The device comprises: A line construction module, used to construct a first waveform line and a basic line; the first waveform line is a Bezier curve, and the basic line is a line segment; A line simplification module, used for simplifying the first waveform line to obtain a second waveform line; A line rotation module, used for rotating the first waveform line, the second waveform line and the basic line along a preset axis to obtain the first curved surface, the second curved surface and a basic plane model; A surface model generating module, used for generating a first surface model of the first surface changing with time and a second surface model of the second surface changing with time; A model mixing module, used for mixing the first curved surface model and the second curved surface model to obtain a third curved surface model; The fluid model generation module is used to generate a fluid model that characterizes the effect of fluid fluctuation over time based on the third curved surface model and the basic plane model.

19. An electronic device, characterized in that: include: A processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, the method for generating fluid dynamic effects as described in any one of claims 1 to 17 is implemented.

20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed by a processor, are used to implement the method for generating fluid dynamic effects as described in any one of claims 1 to 17 above.