Liquid bubble simulation method and device, electronic equipment and storage medium

By acquiring the multi-frame moving images formed by the virtual emission source and generating bubble models for material rendering, the problem of simple dynamics of liquid bubbles and low simulation in the prior art is solved, and a high-simulation liquid bubble animation is achieved.

CN119425089APending Publication Date: 2025-02-14NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411513792.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The liquid bubbles generated by the prior art are simple in dynamics and have low simulation degrees, and cannot effectively reflect the size and disturbance of the bubbles.

Method used

By acquiring multi-frame moving images formed based on the virtual emission source, generating a bubble model, and rendering the material, high-simulation animation of liquid bubbles is achieved.

Benefits of technology

It achieves a high simulation effect of liquid bubbles, which can reflect the size and disturbance of bubbles, has a higher simulation degree and is more in line with the movement characteristics of the fluid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119425089A_ABST
    Figure CN119425089A_ABST
Patent Text Reader

Abstract

The invention provides a liquid bubble simulation method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the steps that a first basic motion animation is acquired, the first basic motion animation comprises multiple frames of first basic motion images formed based on a first virtual emission source, and each frame of first basic motion image is obtained by superposing each frame of first basic particle with a first fluid velocity field of a corresponding frame; generating at least one level of bubble model corresponding to each frame of the first basic motion image, and overlapping and displaying each level of bubble model to obtain an overlapped bubble model; and performing material rendering on each level of bubble model in each frame of first basic motion image to obtain a liquid bubble animation, so that fluid velocity field attributes can be added in the simulation process of the liquid bubbles, the simulated liquid bubbles not only can reflect the sizes of the bubbles, but also can reflect a disturbance phenomenon, and the simulation effect is more vivid and natural.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for simulating liquid bubbles. Background Art

[0002] With the rapid development of Internet technology, the development of games has entered a new era. In order to achieve the diversity of game scenes, liquid bubble effects need to be produced in some game scenes.

[0003] In the prior art, when making liquid bubbles, basic mechanical simulation is often used, based on Newtonian mechanics, to assign a bubble image to each moving point to generate liquid bubbles.

[0004] It can be seen that the liquid bubble dynamics generated based on the existing method are simple and the simulation degree is low. Summary of the invention

[0005] The purpose of the present application is to provide a liquid bubble simulation method, device, electronic device and storage medium to address the deficiencies in the above-mentioned prior art, which can not only reflect the size of the bubbles, but also present the disturbance phenomenon, so that the simulation effect is more in line with the movement characteristics of the fluid and the simulation degree is higher.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, the present invention provides a method for simulating liquid bubbles, the method comprising:

[0008] Acquire a first basic motion animation, wherein the first basic motion animation includes a plurality of frames of first basic motion images formed based on a first virtual emission source, wherein each frame of the first basic motion image is obtained by superimposing a first fluid velocity field of a corresponding frame on each frame of first basic particles;

[0009] generating at least one level of bubble model corresponding to each frame of the first basic motion image, and superimposing and displaying the bubble models at each level to obtain a superimposed bubble model;

[0010] Material rendering is performed on each level of bubble models in the first basic motion image in each frame to obtain liquid bubble animation.

[0011] In a second aspect, the present invention provides a liquid bubble simulation device, comprising:

[0012] An acquisition module, configured to acquire a first basic motion animation, wherein the first basic motion animation includes a plurality of frames of first basic motion images formed based on a first virtual emission source, wherein each frame of the first basic motion image is obtained by superimposing a first fluid velocity field of a corresponding frame on each frame of first basic particles;

[0013] A generating module, configured to generate at least one level of bubble model corresponding to each frame of the first basic motion image, and to superimpose and display the bubble models of each level to obtain a superimposed bubble model;

[0014] The rendering module is used to perform material rendering on each level of bubble models in each frame of the first basic motion image to obtain liquid bubble animation.

[0015] In a third aspect, the present invention provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the liquid bubble simulation method as described in any of the aforementioned embodiments.

[0016] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the liquid bubble simulation method as described in any of the aforementioned embodiments are executed.

[0017] The beneficial effects of this application are:

[0018] The liquid bubble simulation method, device, electronic device and storage medium provided in the embodiments of the present application include: obtaining a first basic motion animation, the first basic motion animation includes multiple frames of first basic motion images formed based on a first virtual emission source, each frame of the first basic motion image is obtained by superimposing the first fluid velocity field of the corresponding frame on the first basic particles of each frame; generating at least one level of bubble model corresponding to each frame of the first basic motion image, superimposing and displaying the bubble models of each level to obtain a superimposed bubble model; performing material rendering on the bubble models of each level in the first basic motion image of each frame to obtain the liquid bubble animation, thereby realizing that the fluid velocity field attributes can be added to the simulation process of the liquid bubbles, so that the simulated liquid bubbles can not only reflect the size of the bubbles, but also reflect the disturbance phenomenon, and the simulation effect is more realistic and natural. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A schematic flow chart of a method for simulating liquid bubbles provided in an embodiment of the present application;

[0021] Figure 2A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of a simulation effect of liquid bubbles provided in an embodiment of the present application;

[0023] Figure 4 A time slice schematic diagram of a bubble model set provided in an embodiment of the present application;

[0024] Figure 5 A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application;

[0025] Figure 6 A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application;

[0026] Figure 7 A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application;

[0027] Figure 8 A schematic diagram of another simulation effect of liquid bubbles provided in an embodiment of the present application;

[0028] Fig. 9 A schematic diagram of another simulation effect of liquid bubbles provided in an embodiment of the present application;

[0029] Fig.10 A schematic diagram of another simulation effect of liquid bubbles provided in an embodiment of the present application;

[0030] Fig.11 A schematic diagram of another simulation effect of liquid bubbles provided in an embodiment of the present application;

[0031] Fig.12 A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application;

[0032] Fig.13 A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application;

[0033] Fig.14 A schematic diagram of another simulation effect of liquid bubbles provided in an embodiment of the present application;

[0034] Fig.15 A schematic diagram of functional modules of a liquid bubble simulation device provided in an embodiment of the present application;

[0035] Fig.16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0037] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0038] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0039] In the prior art, when making liquid bubbles, basic mechanics simulation is often used to assign each moving point to a bubble image based on Newtonian mechanics to generate liquid bubbles. Therefore, the liquid bubbles generated based on the prior art are simple in dynamics and have a low degree of simulation.

[0040] In view of this, an embodiment of the present application provides a simulation method for liquid bubbles. The application of this method can not only reflect the size of the bubbles, but also present the disturbance phenomenon, so that the simulation effect is more in line with the movement characteristics of the fluid and the simulation degree is higher.

[0041] Figure 1 A flow chart of a method for simulating liquid bubbles provided in an embodiment of the present application, the execution subject of the method can be a computer, server, processor or other electronic device that can install three-dimensional software. Optionally, the method can be used to simulate liquid bubbles, for example, it can be used to simulate stones falling into water, virtual character game diving, underwater exhalation bubbles of divers, bubbles in boiling liquids, bubbles formed by gases released due to geological effects in hot springs, bubbles generated by crack models generated by seabed terrain movement, etc., without limitation here, and can be used flexibly according to actual application scenarios. Optionally, in the specific implementation, it can be produced with the help of preset three-dimensional software, such as houdini, 3DMAX and other three-dimensional software, without limitation here.

[0042] like Figure 1 As shown, the method includes:

[0043] Step 101, obtaining a first basic motion animation, the first basic motion animation comprising a plurality of frames of first basic motion images formed based on a first virtual emission source, each frame of the first basic motion image being obtained by superimposing the first fluid velocity field of the corresponding frame on the first basic particles of each frame.

[0044] Among them, the first virtual emission source can be regarded as the emission source of the first elementary particle, and the motion trajectory of the first virtual emission source can be used to simulate the generation trajectory of the first elementary particle. Optionally, the simulated generation trajectory can be a parabolic trajectory, a spiral trajectory, etc., which is not limited here and may vary according to the actual application scenario.

[0045] It should be noted that, during the emission process, the first virtual emission source can emit multiple first elementary particles per frame, for example, 20 or 30 first elementary particles can be emitted. The present application does not limit the number of first elementary particles emitted per frame, which may vary according to the actual application scenario.

[0046] For the first elementary particles emitted by the first virtual emission source in each frame, the corresponding first fluid velocity field can be superimposed on them, wherein the first fluid velocity field in each frame can characterize the spatial velocity information of the first flow field where the first elementary particles in each frame are located due to the movement of the first virtual emission source. It can be understood that by superimposing the first fluid velocity field of the corresponding frame on the first elementary particles in each frame, the obtained first elementary dynamic particles in each frame can show disturbance phenomenon, so that the subsequent simulation of liquid bubbles is more realistic.

[0047] Step 102 : generating at least one level of bubble model corresponding to each frame of the first basic motion image, and superimposing and displaying the bubble models at each level to obtain a superimposed bubble model.

[0048] Among them, each frame of the first basic motion image may include multiple first basic motion particles, each first basic motion particle may correspond to a bubble level, optionally, the bubble level corresponding to each first basic motion particle may be randomly determined, or may be manually specified, which is not limited here; according to the bubble level corresponding to each first basic motion particle, a corresponding bubble model may be corresponded.

[0049] Optionally, the higher the bubble level, the larger the size of the corresponding bubble model. For example, the first bubble level corresponds to the first bubble model, the second bubble level corresponds to the second bubble model, and the first bubble level is higher than the second bubble level. Correspondingly, the size of the first bubble model is larger than the size of the second bubble model.

[0050] After respectively acquiring the bubble models of the first basic motion particles, the bubble models corresponding to the first basic motion particles can be superimposed and displayed to obtain a superimposed bubble model. It can be understood that at this time, bubble models of different sizes can be displayed through the superimposed bubble model, making the subsequent simulation of liquid bubbles more natural.

[0051] Step 103 : performing material rendering on each level of bubble models in each frame of the first basic motion image to obtain liquid bubble animation.

[0052] Among them, for different scenes, corresponding materials can be used to render the bubble models of various levels in each frame of the first basic motion image, so that the rendered liquid bubble animation is more realistic and natural.

[0053] In order to better understand the present application and apply the method provided in the present application to the scene of simulating underwater bubbles, optionally, a basic transparent material with a refraction and reflection effect can be used to render the bubble models of each level in the first basic motion image of each frame, so as to obtain a realistic and natural liquid bubble animation.

[0054] Of course, it should be noted that, according to the actual application scenario, non-transparent materials can also be selected, and materials with specific other properties simulate liquid bubbles in other scenarios, which are not limited here.

[0055] In summary, an embodiment of the present application provides a simulation method for liquid bubbles, which includes: obtaining a first basic motion animation, the first basic motion animation including multiple frames of first basic motion images formed based on a first virtual emission source, each frame of the first basic motion image being obtained by superimposing the first basic particles of each frame on the first fluid velocity field of the corresponding frame; generating at least one level of bubble model corresponding to each frame of the first basic motion image, superimposing and displaying the bubble models at each level, and obtaining a superimposed bubble model; performing material rendering on the bubble models at each level in the first basic motion image of each frame to obtain a liquid bubble animation, thereby realizing that the fluid velocity field attributes can be added during the simulation process of the liquid bubbles, so that the simulated liquid bubbles can not only reflect the size of the bubbles, but also reflect the disturbance phenomenon, and the simulation effect is more realistic and natural.

[0056] In addition, it should be noted that since the present application can simulate liquid bubbles based on a preset fluid system and a preset mechanical particle system, compared with liquid bubbles simulated based on a preset mechanical system model, the liquid bubbles simulated in the present application have richer dynamic level details and are closer to the fluid; compared with liquid bubbles simulated based on a preset fluid system, there is no need to generate a large number of fluid particles, so lightweight simulation can be achieved, simulation efficiency can be improved, and simulation cycle can be shortened.

[0057] Figure 2A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application. Figure 3 A schematic diagram of a simulation effect of a liquid bubble provided in an embodiment of the present application. In an optional embodiment, as Figure 2 As shown, the above-mentioned obtaining of the first basic motion animation includes:

[0058] Step 201: Based on a first virtual emission source, multiple frames of first basic particles are emitted through a preset mechanical particle system.

[0059] The first fluid velocity field of each frame can represent the spatial velocity information of the first virtual emission source motion acting on the first flow field where the first elementary particle of each frame is located.

[0060] Step 202: Acquire a plurality of frames of first fluid velocity fields corresponding to a first virtual emission source through a preset fluid system.

[0061] Among them, the preset fluid system can be constructed based on fluid mechanics, and the preset mechanical particle system can be constructed based on the Newtonian mechanics system. Optionally, the preset fluid system and the preset mechanical particle system can be integrated in three-dimensional software.

[0062] In some embodiments, the first virtual emission source can be constructed based on three-dimensional software, and an emission animation can be generated based on the first virtual emission source. The emission animation can represent the motion trajectory of the first virtual emission source, and the generated emission animation can be imported into a preset fluid system and a preset mechanical particle system respectively.

[0063] Among them, in the preset mechanical particle system, multiple frames of first basic particles can be emitted by the first virtual emission source based on the motion trajectory of the first virtual emission source in the emission animation, such as Figure 3 As shown, the first virtual emission source can be the sphere in the figure, and the black dots in the figure can be multiple first basic particles emitted by the first virtual emission source in a certain frame; in the preset fluid system, based on the motion trajectory of the first virtual emission source in the emission animation, the corresponding multi-frame first fluid velocity field during the movement of the first virtual emission source can be obtained.

[0064] Step 203: Generate a first basic motion animation according to the multiple frames of first basic particles and the multiple frames of first fluid velocity fields.

[0065] Based on the first fluid velocity field of each frame, corresponding spatial velocity information can be added to the first basic particles of each frame to obtain the first basic animation. It can be understood that the first basic dynamic particles of each frame in the first basic animation obtained at this time can show disturbance phenomenon, making the subsequent simulation of liquid bubbles more realistic.

[0066] In addition, it should be noted that the first virtual emission source may be a moving object, for example, a moving sphere, which can emit the first elementary particles during its movement.

[0067] By applying the embodiments of the present application, a preset fluid system and a preset mechanical particle system are combined, wherein the preset mechanical particles are used to obtain multi-frame first basic particles, and the preset fluid system is used to obtain multi-frame first fluid velocity fields. The multi-frame first fluid velocity fields can be calculated based on the preset fluid system through low grid density, and liquid bubbles can be simulated and generated based on the multi-frame first fluid velocity fields and the multi-frame first basic particles. Compared with the existing method of simulating liquid bubbles through a preset fluid system, the method of generating liquid bubbles through high grid density can be avoided. The embodiments of the present application can achieve low-consumption operation, ensure simulation efficiency, and make the dynamic level details of the liquid bubbles richer and closer to the fluid, so that the simulated liquid bubbles are more realistic and natural.

[0068] In an optional embodiment, the generating of the first basic motion animation according to the multiple frames of the first basic particles and the multiple frames of the first fluid velocity field includes:

[0069] The first fluid velocity field corresponding to the first basic particle of each frame is used to drive the first basic particle of each frame to obtain the first basic dynamic particle of each frame; and the first basic motion animation is generated according to the first basic dynamic particles of multiple frames.

[0070] The first basic particles in each frame may be driven by the corresponding first fluid velocity field. Through the driving, the movement of the first basic particles in each frame may be affected by the first fluid velocity field, thereby generating a disturbance phenomenon.

[0071] It should be noted that the first fluid velocity field corresponding to the first basic particle of each frame can be determined according to the emission animation frame identifier corresponding to the first basic particle of each frame and the emission animation frame identifier corresponding to the first fluid velocity field of each frame. Optionally, if the emission animation frame identifier corresponding to the first basic particle of a certain frame is the same as the emission animation frame identifier corresponding to the first fluid velocity field of a certain frame, then the two can be considered to match.

[0072] In an optional implementation, each frame of the first basic motion image includes a multi-level bubble model, the multi-level bubble model includes a main bubble model and a non-main bubble model, and the size of the main bubble model is larger than that of the non-main bubble model.

[0073] It can be understood that since each frame of the first basic motion image includes multiple first basic dynamic particles, and each first basic dynamic particle corresponds to a bubble level, when the bubble level is different, the size of the corresponding bubble model will also be different. In order to simulate multiple liquid bubbles of different sizes in each frame of the first basic motion image, each frame of the first basic motion image can be set to include a multi-level bubble model, and the multi-level bubble model can include a main bubble model and a non-main bubble model.

[0074] It should be noted that the size of the main bubble model is larger than that of the non-main bubble model. In addition, the non-main bubble model can also be divided into multiple levels, and the sizes of non-main bubble models of different levels are different.

[0075] For example, the non-main bubble model includes a first non-main bubble model and a second non-main bubble model, wherein the size of the first non-main bubble model is larger than the size of the second non-main bubble model. Of course, the specific configuration is not limited thereto.

[0076] Figure 4 A schematic diagram of a time slice of a bubble model set provided in an embodiment of the present application. The above-mentioned generation of at least one level of bubble model corresponding to each frame of the first basic motion image includes:

[0077] Based on the first preset bubble model set, a subject-wrapped bubble model and a non-subject bubble model corresponding to each frame of the first basic motion image are generated respectively.

[0078] Among them, Figure 4 As shown, the main body wrapped bubble model is obtained by converting multiple main bubble models. The first preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers. The jitter states of the basic bubble models corresponding to different particle frame identifiers are different. The particle frame identifier is used to indicate the frame identifier corresponding to each first basic particle when it is emitted.

[0079] Optionally, the jitter state of each basic bubble model can be achieved through a preset program disturbance. Through noise disturbance, the movement of the basic bubble model can be made to fit the objective movement laws and shapes of liquid bubbles in realistic scenes, showing deformation and floating jitter phenomena, thereby making the liquid bubbles in the final model more realistic and natural.

[0080] Figure 5 A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application, in an optional implementation manner, as Figure 5 As shown, the above-mentioned generation of the non-subject bubble model corresponding to each frame of the first basic motion image based on the first preset bubble model set includes:

[0081] Step 301: Acquire attribute parameters corresponding to first basic dynamic particles in a first basic motion image of each frame, where the attribute parameters include: bubble level.

[0082] Step 302: According to the attribute parameters and particle frame identifiers corresponding to the first basic dynamic particles in each frame of the first basic motion image, based on the first preset bubble model set, generate a main-wrapped bubble model and a non-main-bubble model corresponding to each frame of the first basic motion image.

[0083] Among them, the attribute parameters corresponding to the first basic dynamic particle may include a bubble level, and the bubble level may determine the size of the corresponding bubble model. The higher the bubble level, the larger the size of the corresponding bubble model.

[0084] Optionally, in some embodiments, the size of the bubble model corresponding to each bubble level can be randomly specified within a preset bubble range. For example, for each first basic dynamic particle, if the bubble level corresponding to it is the first bubble level, the size of the bubble model corresponding to it can be randomly set within the first preset size range; if the bubble level corresponding to it is the second bubble level, the size of the bubble model corresponding to it can be randomly set within the second preset size range. Of course, the specific setting method is not limited to this.

[0085] It can be understood that, based on the preset mechanical particle system, since the first virtual emission source will emit multiple frames of first basic particles according to preset emission parameters (such as emission rate, etc.) during the emission process, for example, the first frame emits N first basic particles, the second frame emits M first basic particles, and the third frame emits L first basic particles, then the particle frame corresponding to the N first basic particles is identified as the first frame, the particle frame corresponding to the M first basic particles is identified as the second frame, and the particle frame corresponding to the L first basic particles is identified as the third frame.

[0086] In addition, taking N first basic particles as an example, it is assumed that N1 first basic particles among the N first basic particles correspond to the first bubble level, N2 first basic particles correspond to the second bubble level, and N3 first basic particles correspond to the third bubble level, wherein the bubble size corresponding to the first bubble level is larger than the bubble size corresponding to the second bubble level, and the bubble size corresponding to the second bubble level is larger than the bubble size corresponding to the third bubble level.

[0087] At this time, for the N1 first elementary particles, the bubble models corresponding to the N1 first elementary particles can be determined based on the preset bubble model according to the particle frame identifiers (ie, the first frame) and bubble levels (ie, the first bubble level) corresponding to the N1 first elementary particles.

[0088] When determining the specific Figure 4As shown, some basic bubble models of the first preset bubble model set are shown, and the first preset bubble model set includes 7 basic bubble models. The corresponding frame identifiers from left to right are the first frame, the second frame, the third frame, ..., the seventh frame. It can be understood that the basic bubble model labeled 1 can be determined as the first basic bubble model corresponding to the N1 first basic particles; further, the size of the first basic bubble model can be set in combination with the bubble size corresponding to the bubble level (that is, the first bubble level) corresponding to the N1 first basic particles, thereby obtaining the bubble model corresponding to the N1 first basic particles.

[0089] It should be noted that the bubble models corresponding to other first basic particles can refer to the generation process of the bubble models corresponding to the N1 first basic particles, which is not limited here. Optionally, if the bubble level corresponding to the generated bubble model is the first bubble level, then the bubble model is the main bubble model; if the corresponding bubble level is not the first bubble level, then the bubble model is the non-main bubble model.

[0090] In addition, since each frame of the first basic motion image may include multiple first basic dynamic particles with the first bubble level, optionally, in order to make the display of the main bubble model more realistic, for example, for actual underwater bubbles, large bubbles that are relatively close to each other will merge into one, the multiple main bubble models can be converted to obtain a main wrapped bubble model to achieve a simulation effect of large bubbles that are relatively close to each other merging together.

[0091] Figure 6 A flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application. In an optional embodiment, as shown in 6, the above-mentioned subject-wrapped bubble models corresponding to the first basic motion image of each frame are generated based on the first preset bubble model set, including:

[0092] Step 401: Based on a first preset bubble model set, a main bubble model corresponding to each first basic dynamic particle in each frame of a first basic motion image is obtained.

[0093] Among them, referring to the aforementioned process, for each frame of the first basic motion image, the first basic dynamic particles with the first bubble level can be obtained, and according to the particle frame identifiers corresponding to these first basic particles and the bubble size corresponding to the first bubble level, the main bubble model corresponding to the first basic particles is determined based on the preset bubble model.

[0094] Step 402: Convert the main bubble model corresponding to each frame of the first basic motion image into volume data.

[0095] Step 403: Smoothing the volume data to obtain a main body wrapped bubble model corresponding to each frame of the first basic motion image.

[0096] For each frame of the first basic motion image, after obtaining the corresponding multiple main bubble models, a volume conversion program (for example, VDB from polygon node program) can be used to convert the multiple main bubble models into volume data. Then, a model conversion program (for example, VDB Convert node program) can be used to perform a smoothing operation on the obtained volume data to obtain the main body-wrapped bubble model corresponding to the first basic motion image of the frame. By applying the embodiment of the present application, a main body-wrapped bubble model that is melted into one can be obtained, and then after subsequent rendering operations, more realistic and natural liquid bubbles can be simulated and generated.

[0097] In an optional embodiment, the attribute parameters further include: a pointing parameter, and the pointing parameter is used to characterize the protrusion directions of the main bubble model and the non-main bubble model.

[0098] In order to make the simulated liquid bubble shape more realistic, the attribute parameters corresponding to each first basic dynamic particle can be set to include a pointing parameter, which indicates the convex direction of the corresponding main bubble model or non-main bubble model. For example, in some scenes, the convex direction can be set to the upward direction.

[0099] It should be noted that the setting of the directional parameter will act on the basic bubble model corresponding to each first basic dynamic particle, that is, the directional parameter will affect the protrusion direction of the basic bubble model corresponding to each first basic dynamic particle.

[0100] In an optional embodiment, the above method further includes:

[0101] According to the preset grading parameters, the bubble level corresponding to each first basic dynamic particle in each frame of the first basic motion image is determined, and the preset grading parameters are used to indicate the proportion of the number of first basic dynamic particles corresponding to each bubble level in the first basic motion image of each frame in the total number of first basic dynamic particles.

[0102] Optionally, the bubble level corresponding to each first basic dynamic particle in each frame of the first basic motion image may be based on a preset grading parameter and may be randomly set.

[0103] Specifically, for example, the preset grading parameters in a certain scene can indicate that the first bubble level and the third corresponding first basic dynamic particles account for P% (for example, any value between 10% and 40%) and Q% (for example, any value between 60% and 90%) of the total number of first basic dynamic particles respectively.

[0104] Based on the above description, for example, in some embodiments, 10% of the total first basic dynamic particles can be randomly selected from the first basic motion image of each frame as the first basic dynamic particles corresponding to the first bubble level, and the remaining 90% of the total first basic dynamic particles can be used as the first basic dynamic particles corresponding to the second bubble level. Of course, it should be noted that the present application does not limit the number of bubble levels. For example, it can also include a third bubble level, in which the number of first basic dynamic particles corresponding to the second bubble level and the third bubble accounts for 30% and 60% of the total number of first basic dynamic particles, respectively, and can be flexibly set according to the actual application scenario.

[0105] Figure 7 A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application. Figure 8 This is another schematic diagram of the simulation effect of liquid bubbles provided in an embodiment of the present application. Fig. 9 This is another schematic diagram of the simulation effect of liquid bubbles provided in an embodiment of the present application. Fig.10 This is another schematic diagram of the simulation effect of liquid bubbles provided in an embodiment of the present application. Fig.11 Another schematic diagram of the simulation effect of liquid bubbles provided in the embodiment of the present application. In an optional embodiment, as Figure 6 As shown, the above-mentioned superposition displays the bubble models at various levels, and the superimposed bubble model is obtained, including:

[0106] Step 501: Use each level of bubble model as a second virtual emission source, and obtain at least one sub-bubble model through a preset fluid system and a preset mechanical particle system.

[0107] Among them, the difference from the setting of the aforementioned first virtual emission source is that the second virtual emission source is the bubble models of each level obtained above, and is similar to the generation process of the bubble models of each level mentioned above, that is, based on the second virtual emission source, multiple frames of second basic particles are emitted through a preset mechanical particle system; multiple frames of second fluid velocity fields corresponding to the second virtual emission source are obtained through a preset fluid system, and each frame of the second fluid velocity field can characterize the spatial velocity information of the second flow field where the second basic particles of each frame are located when the second virtual emission source moves, and the second basic motion animation is obtained according to the multiple frames of second basic particles and the second fluid velocity fields of the corresponding frames; based on the second basic motion animation and the second preset bubble model set, at least one sub-bubble model is generated.

[0108] It should be noted that the definition of the second preset bubble model set can refer to the above related description and is not limited here. In addition, the difference between the sub-bubble model and the bubble models at all levels in the embodiment of the present application is that the sub-bubble model is smaller in size than the bubble models at all levels.

[0109] For example, the first bubble level corresponds to the main bubble model, the second bubble level corresponds to the non-main bubble model, and the third bubble level corresponds to the sub-bubble model, wherein the size of the sub-bubble model is smaller than that of the non-main bubble model. Optionally, the non-main bubble model can be regarded as a secondary bubble model, and the sub-bubble model can be regarded as a detailed small-particle bubble model.

[0110] Step 502: Superimpose the bubble models of each level and at least one sub-bubble model to obtain a superimposed bubble model.

[0111] Among them, for each frame of the first basic motion image, after obtaining each level of bubble model and each sub-bubble model, the multi-level bubble model can be superimposed and displayed to obtain a superimposed bubble model.

[0112] Reference Figure 8 As shown, for example, a first basic motion image of a certain frame includes a main bubble model corresponding to a first bubble level (corresponding to a red filling model) and a non-main bubble model corresponding to a second bubble level (corresponding to a green filling model). Fig. 9 and 10 As shown, referring to the method of the present application, a first sub-bubble model (corresponding to a pink filling model) can be generated based on the main bubble model, and a second sub-bubble model (corresponding to a blue filling model) can be generated based on the non-main bubble model.

[0113] Among them, it can be seen from the comparison that the size of the main bubble model is larger than that of the non-main bubble model, and the size of the non-main bubble model is larger than that of the first sub-bubble model and the second sub-bubble model.

[0114] Furthermore, after superimposing the above four models, we can get Fig.11 The superimposed bubble model shown can simultaneously display multiple bubble models of different sizes with protrusions facing upward.

[0115] Fig.12 A schematic diagram of another method for simulating liquid bubbles provided in an embodiment of the present application. In an optional embodiment, as Fig.12 As shown, the above-mentioned bubble models at each level are used as the second virtual emission source, and at least one sub-bubble model is obtained through a preset fluid system and a preset mechanical particle system, including:

[0116] Step 601: Use the bubble models at each level as the second virtual emission source, and obtain the second basic motion animation through a preset fluid system and a preset mechanical particle system.

[0117] Among them, the second basic motion animation includes multiple frames of second basic motion images, and each frame of the second basic motion image is obtained by superimposing the second fluid velocity field of the corresponding frame on the second basic particles of each frame. The second fluid velocity field can characterize the spatial velocity information of the second virtual emission source movement acting on the second flow field where the second basic particles of each frame are located.

[0118] Step 602: Generate a sub-bubble model corresponding to each second basic dynamic particle in each frame of the second basic motion image, and use each sub-bubble model to replace each second basic dynamic particle.

[0119] Wherein, in the process of generating the sub-bubble model, the second virtual emission source is the bubble models of each level obtained above.

[0120] Of course, it should be noted that in some embodiments, there is no need to set preset grading parameters during the generation of the sub-bubble model, that is, all second basic dynamic particles emitted by the second virtual emission source can be set to correspond to the same bubble level, and the bubble level is not divided again. In this way, the generation effect of the sub-bubble model can be improved, and the applicability of the method of the present application can be improved.

[0121] Fig.13 A schematic flow chart of another method for simulating liquid bubbles provided in an embodiment of the present application. In an optional embodiment, the above-mentioned generation of a sub-bubble model corresponding to each second basic dynamic particle in each frame of the second basic motion image includes:

[0122] Step 701: Obtain attribute parameters corresponding to second basic dynamic particles in the second basic motion image of each frame.

[0123] The attribute parameters include: bubble level, wherein the bubble level corresponding to the second basic dynamic particle is lower than the bubble level corresponding to the first basic dynamic particle.

[0124] Among them, by setting the bubble level corresponding to the second basic dynamic particles to be lower than the bubble level corresponding to the first basic dynamic particles, the size of the sub-bubble model corresponding to the second basic dynamic particles will be smaller than the size of the bubble model corresponding to the first basic dynamic particles, so that liquid bubbles with smaller particles can be simulated, and then liquid bubbles with layers can be presented.

[0125] Step 702 : Generate sub-bubble models corresponding to the second basic motion image of each frame respectively according to the attribute parameters and particle frame identifiers corresponding to the second basic dynamic particles in each frame of the second basic motion image and based on the second preset bubble model set.

[0126] The second preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers, the basic bubble models corresponding to different particle frame identifiers have different jitter states, and the particle frame identifier is used to indicate the frame identifier corresponding to each second basic particle when it is emitted.

[0127] It should be noted that the generation process of the sub-bubble model is similar to the generation process of the aforementioned non-main bubble. The specific generation process can refer to the aforementioned related process and will not be repeated here.

[0128] For example, based on the preset mechanical particle system, during the emission process of the second virtual emission source, multiple frames of second basic particles are emitted according to preset emission parameters (such as emission rate, etc.). For example, A second basic particles are emitted in the first frame, and B second basic particles are emitted in the second frame, and A second basic particles and B second basic particles both correspond to the fourth bubble level.

[0129] For B second elementary particles, optionally, refer to Figure 4 As shown, the basic bubble model labeled 2 can be determined as the second basic bubble model corresponding to the B second basic particles; further, the size of the second basic bubble model can be set in combination with the bubble size corresponding to the bubble level (that is, the fourth bubble level) corresponding to the B second basic particles, thereby obtaining the sub-bubble model corresponding to the B second basic particles.

[0130] Fig.14 This is another schematic diagram of the simulation effect of liquid bubbles provided in the embodiment of the present application. Fig.14 As shown, taking the simulation of underwater bubbles as an example, optionally, a transparent material and a glass-like material with refraction and reflection effects can be used to render the material of the superimposed bubble model obtained above. At this time, the liquid bubbles obtained can not only reflect the size and disturbance of the bubbles, but also show deformation and floating jitter, and the simulation effect is more realistic and natural.

[0131] Fig.15 This is a functional module diagram of a liquid bubble simulation device provided in an embodiment of the present application. The basic principle and technical effects of the device are the same as those of the corresponding method embodiment described above. For the sake of brief description, the parts not mentioned in this embodiment can be referred to the corresponding contents in the method embodiment. Fig.15 As shown, the simulation device 100 includes:

[0132] An acquisition module 110 is used to acquire a first basic motion animation, where the first basic motion animation includes a plurality of frames of first basic motion images formed based on a first virtual emission source, where each frame of the first basic motion image is obtained by superimposing a first fluid velocity field of a corresponding frame on the first basic particles of each frame;

[0133] A generating module 120, configured to generate at least one level of bubble model corresponding to each frame of the first basic motion image, and to superimpose and display the bubble models at each level to obtain a superimposed bubble model;

[0134] The rendering module 130 is used to perform material rendering on each level of bubble models in each frame of the first basic motion image to obtain liquid bubble animation.

[0135] In an optional implementation, the acquisition module 110 is specifically configured to emit multiple frames of first basic particles through a preset mechanical particle system based on the first virtual emission source;

[0136] Acquire multiple frames of first fluid velocity fields corresponding to the first virtual emission source through a preset fluid system, wherein the first fluid velocity fields of each frame can represent the spatial velocity information of the first virtual emission source acting on the first flow field where the first elementary particle of each frame is located;

[0137] A first basic motion animation is generated according to multiple frames of first basic particles and multiple frames of first fluid velocity fields.

[0138] In an optional embodiment, the acquisition module 110 is specifically used to use the first fluid velocity field corresponding to the first basic particle of each frame to drive the first basic particle of each frame to acquire the first basic motion image of each frame, and each first basic motion image of each frame includes: a plurality of first basic dynamic particles;

[0139] A first basic motion animation is generated according to a plurality of frames of first basic motion images.

[0140] In an optional embodiment, each frame of the first basic motion image includes a multi-level bubble model, the multi-level bubble model includes a main bubble model and a non-main bubble model, and the size of the main bubble model is larger than that of the non-main bubble model;

[0141] The generation module 120 is specifically used to generate a main-wrapped bubble model and a non-main-bubble model corresponding to the first basic motion image of each frame based on a first preset bubble model set, wherein the main-wrapped bubble model is obtained by converting multiple main bubble models, and the first preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers, and the basic bubble models corresponding to different particle frame identifiers have different jitter states. The particle frame identifier is used to indicate the frame identifier corresponding to each first basic particle when it is emitted.

[0142] In an optional implementation, the generation module 120 is specifically used to obtain attribute parameters corresponding to the first basic dynamic particles in each frame of the first basic motion image, and the attribute parameters include: bubble level;

[0143] According to the attribute parameters and particle frame identifiers corresponding to the first basic dynamic particles in the first basic motion images of each frame, based on the first preset bubble model set, a main body wrapped bubble model and a non-main body bubble model corresponding to the first basic motion images of each frame are generated respectively.

[0144] In an optional implementation, the generating module 120 is specifically configured to obtain a main bubble model corresponding to each first basic dynamic particle in each frame of the first basic motion image based on the first preset bubble model set;

[0145] Converting the main bubble model corresponding to each frame of the first basic motion image into volume data;

[0146] The volume data is smoothed to obtain a main body wrapped bubble model corresponding to each frame of the first basic motion image.

[0147] In an optional embodiment, the attribute parameters further include: a pointing parameter, and the pointing parameter is used to characterize the protrusion directions of the main bubble model and the non-main bubble model.

[0148] In an optional embodiment, the generation module 120 is specifically used to determine the bubble level corresponding to each first basic dynamic particle in each frame of the first basic motion image according to a preset grading parameter, and the preset grading parameter is used to indicate the proportion of the number of first basic dynamic particles corresponding to each bubble level in the first basic motion image of each frame in the total number of first basic dynamic particles.

[0149] In an optional embodiment, the generation module 120 is specifically used to use each level of bubble model as a second virtual emission source, and obtain at least one sub-bubble model through a preset fluid system and a preset mechanical particle system;

[0150] The bubble models at each level and at least one sub-bubble model are superimposed to obtain a superimposed bubble model.

[0151] In an optional implementation, the generation module 120 is specifically used to use the bubble models at each level as the second virtual emission source, and obtain the second basic motion animation through a preset fluid system and a preset mechanical particle system;

[0152] The second basic motion animation includes a plurality of frames of second basic motion images, each frame of the second basic motion image is obtained by superimposing the second fluid velocity field of the corresponding frame on the second basic particles of each frame, and the second fluid velocity field can represent the spatial velocity information of the second virtual emission source motion acting on the second flow field where the second basic particles of each frame are located;

[0153] A sub-bubble model corresponding to each second basic dynamic particle in each frame of the second basic motion image is generated, and each second basic dynamic particle is replaced by each sub-bubble model.

[0154] In an optional implementation, the generation module 120 is specifically used to obtain attribute parameters corresponding to the second basic dynamic particles in each frame of the second basic motion image, the attribute parameters including: bubble level, wherein the bubble level corresponding to the second basic dynamic particles is lower than the bubble level corresponding to the first basic dynamic particles;

[0155] According to the attribute parameters and particle frame identifiers corresponding to the second basic dynamic particles in the second basic motion image of each frame, based on the second preset bubble model set, sub-bubble models corresponding to the second basic motion image of each frame are generated respectively. The second preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers. The basic bubble models corresponding to different particle frame identifiers have different jitter states. The particle frame identifier is used to indicate the frame identifier corresponding to each second basic particle when it is emitted.

[0156] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0157] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0158] Fig.16 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device can be integrated into the above-mentioned simulation device. Fig.16 As shown, the electronic device may include: a processor 210, a storage medium 220 and a bus 230, the storage medium 220 stores machine-readable instructions executable by the processor 210, when the electronic device is running, the processor 210 and the storage medium 220 communicate through the bus 230, the processor 210 executes the machine-readable instructions to perform the steps of the following method embodiment:

[0159] Acquire a first basic motion animation, the first basic motion animation comprising a plurality of frames of first basic motion images formed based on a first virtual emission source, each frame of the first basic motion image being obtained by superimposing a first fluid velocity field of a corresponding frame on each frame of first basic particles;

[0160] Generate at least one level of bubble model corresponding to each frame of the first basic motion image, and superimpose and display the bubble models at each level to obtain a superimposed bubble model;

[0161] Material rendering is performed on bubble models of various levels in the first basic motion image of each frame to obtain liquid bubble animation.

[0162] In an optional implementation manner, the obtaining of the first basic motion animation includes:

[0163] Based on the first virtual emission source, multiple frames of first basic particles are emitted through a preset mechanical particle system;

[0164] Acquire multiple frames of first fluid velocity fields corresponding to the first virtual emission source through a preset fluid system, wherein the first fluid velocity fields of each frame can represent the spatial velocity information of the first virtual emission source acting on the first flow field where the first elementary particle of each frame is located;

[0165] A first basic motion animation is generated according to multiple frames of first basic particles and multiple frames of first fluid velocity fields.

[0166] In an optional embodiment, the generating of the first basic motion animation according to the multiple frames of the first basic particles and the multiple frames of the first fluid velocity field includes:

[0167] Using the first fluid velocity field corresponding to the first basic particle of each frame, driving the first basic particle of each frame, and obtaining the first basic motion image of each frame, wherein the first basic motion image of each frame includes: a plurality of first basic dynamic particles;

[0168] A first basic motion animation is generated according to a plurality of frames of first basic motion images.

[0169] In an optional embodiment, each frame of the first basic motion image includes a multi-level bubble model, the multi-level bubble model includes a main bubble model and a non-main bubble model, and the size of the main bubble model is larger than that of the non-main bubble model;

[0170] The above-mentioned step of generating at least one level bubble model corresponding to each frame of the first basic motion image includes:

[0171] Based on the first preset bubble model set, a main-wrapped bubble model and a non-main-bubble model are generated corresponding to the first basic motion image of each frame, wherein the main-wrapped bubble model is obtained by converting multiple main bubble models. The first preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers. The basic bubble models corresponding to different particle frame identifiers have different jitter states. The particle frame identifier is used to indicate the frame identifier corresponding to each first basic particle when it is emitted.

[0172] In an optional implementation manner, the above-mentioned generating a non-subject bubble model corresponding to each frame of the first basic motion image based on the first preset bubble model set includes:

[0173] Acquire attribute parameters corresponding to the first basic dynamic particles in the first basic motion image of each frame, the attribute parameters including: bubble level;

[0174] According to the attribute parameters and particle frame identifiers corresponding to the first basic dynamic particles in the first basic motion images of each frame, based on the first preset bubble model set, a main body wrapped bubble model and a non-main body bubble model corresponding to the first basic motion images of each frame are generated respectively.

[0175] In an optional implementation manner, the above-mentioned generating the subject-wrapped bubble model corresponding to each frame of the first basic motion image based on the first preset bubble model set includes:

[0176] Based on the first preset bubble model set, a main bubble model corresponding to each first basic dynamic particle in each frame of the first basic motion image is obtained;

[0177] Converting the main bubble model corresponding to each frame of the first basic motion image into volume data;

[0178] The volume data is smoothed to obtain a main body wrapped bubble model corresponding to each frame of the first basic motion image.

[0179] In an optional embodiment, the attribute parameters further include: a pointing parameter, and the pointing parameter is used to characterize the protrusion directions of the main bubble model and the non-main bubble model.

[0180] In an optional embodiment, the above method further includes:

[0181] According to the preset grading parameters, the bubble level corresponding to each first basic dynamic particle in each frame of the first basic motion image is determined, and the preset grading parameters are used to indicate the proportion of the number of first basic dynamic particles corresponding to each bubble level in the first basic motion image of each frame in the total number of first basic dynamic particles.

[0182] In an optional embodiment, the above-mentioned superimposed display of bubble models at various levels to obtain a superimposed bubble model includes:

[0183] Using each level of bubble model as the second virtual emission source, obtaining at least one sub-bubble model through a preset fluid system and a preset mechanical particle system;

[0184] The bubble models at each level and at least one sub-bubble model are superimposed to obtain a superimposed bubble model.

[0185] In an optional implementation, the above-mentioned use of each level of bubble model as the second virtual emission source, through a preset fluid system and a preset mechanical particle system, to obtain at least one sub-bubble model includes:

[0186] Using bubble models at all levels as the second virtual emission source, and obtaining the second basic motion animation through a preset fluid system and a preset mechanical particle system;

[0187] The second basic motion animation includes a plurality of frames of second basic motion images, each frame of the second basic motion image is obtained by superimposing the second fluid velocity field of the corresponding frame on the second basic particles of each frame, and the second fluid velocity field can represent the spatial velocity information of the second virtual emission source motion acting on the second flow field where the second basic particles of each frame are located;

[0188] A sub-bubble model corresponding to each second basic dynamic particle in each frame of the second basic motion image is generated, and each second basic dynamic particle is replaced by each sub-bubble model.

[0189] In an optional implementation manner, the above-mentioned generation of a sub-bubble model corresponding to each second basic dynamic particle in each frame of the second basic motion image includes:

[0190] Acquire attribute parameters corresponding to the second basic dynamic particles in the second basic motion image of each frame, the attribute parameters including: bubble level, wherein the bubble level corresponding to the second basic dynamic particles is lower than the bubble level corresponding to the first basic dynamic particles;

[0191] According to the attribute parameters and particle frame identifiers corresponding to the second basic dynamic particles in the second basic motion image of each frame, based on the second preset bubble model set, sub-bubble models corresponding to the second basic motion image of each frame are generated respectively. The second preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers. The basic bubble models corresponding to different particle frame identifiers have different jitter states. The particle frame identifier is used to indicate the frame identifier corresponding to each second basic particle when it is emitted.

[0192] The specific implementation method and technical effects of the above method embodiment can be found in the above related description, which will not be repeated here.

[0193] Optionally, the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the following method embodiment are executed:

[0194] Acquire a first basic motion animation, the first basic motion animation comprising a plurality of frames of first basic motion images formed based on a first virtual emission source, each frame of the first basic motion image being obtained by superimposing a first fluid velocity field of a corresponding frame on each frame of first basic particles;

[0195] Generate at least one level of bubble model corresponding to each frame of the first basic motion image, and superimpose and display the bubble models at each level to obtain a superimposed bubble model;

[0196] Material rendering is performed on bubble models of various levels in the first basic motion image of each frame to obtain liquid bubble animation.

[0197] In an optional implementation manner, the obtaining of the first basic motion animation includes:

[0198] Based on the first virtual emission source, multiple frames of first basic particles are emitted through a preset mechanical particle system;

[0199] Acquire multiple frames of first fluid velocity fields corresponding to the first virtual emission source through a preset fluid system, wherein the first fluid velocity fields of each frame can represent the spatial velocity information of the first virtual emission source acting on the first flow field where the first elementary particle of each frame is located;

[0200] A first basic motion animation is generated according to multiple frames of first basic particles and multiple frames of first fluid velocity fields.

[0201] In an optional embodiment, the generating of the first basic motion animation according to the multiple frames of the first basic particles and the multiple frames of the first fluid velocity field includes:

[0202] Using the first fluid velocity field corresponding to the first basic particle of each frame, driving the first basic particle of each frame, and obtaining the first basic motion image of each frame, wherein the first basic motion image of each frame includes: a plurality of first basic dynamic particles;

[0203] A first basic motion animation is generated according to a plurality of frames of first basic motion images.

[0204] In an optional embodiment, each frame of the first basic motion image includes a multi-level bubble model, the multi-level bubble model includes a main bubble model and a non-main bubble model, and the size of the main bubble model is larger than that of the non-main bubble model;

[0205] Generating at least one level bubble model corresponding to each frame of the first basic motion image, including:

[0206] Based on the first preset bubble model set, a main-wrapped bubble model and a non-main-bubble model are generated corresponding to the first basic motion image of each frame, wherein the main-wrapped bubble model is obtained by converting multiple main bubble models. The first preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers. The basic bubble models corresponding to different particle frame identifiers have different jitter states. The particle frame identifier is used to indicate the frame identifier corresponding to each first basic particle when it is emitted.

[0207] In an optional implementation manner, the above-mentioned generating a non-subject bubble model corresponding to each frame of the first basic motion image based on the first preset bubble model set includes:

[0208] Acquire attribute parameters corresponding to the first basic dynamic particles in the first basic motion image of each frame, the attribute parameters including: bubble level;

[0209] According to the attribute parameters and particle frame identifiers corresponding to the first basic dynamic particles in the first basic motion images of each frame, based on the first preset bubble model set, a main body wrapped bubble model and a non-main body bubble model corresponding to the first basic motion images of each frame are generated respectively.

[0210] In an optional implementation manner, the above-mentioned generating the subject-wrapped bubble model corresponding to each frame of the first basic motion image based on the first preset bubble model set includes:

[0211] Based on the first preset bubble model set, a main bubble model corresponding to each first basic dynamic particle in each frame of the first basic motion image is obtained;

[0212] Converting the main bubble model corresponding to each frame of the first basic motion image into volume data;

[0213] The volume data is smoothed to obtain a main body wrapped bubble model corresponding to each frame of the first basic motion image.

[0214] In an optional embodiment, the attribute parameters further include: a pointing parameter, and the pointing parameter is used to characterize the protrusion directions of the main bubble model and the non-main bubble model.

[0215] In an optional embodiment, the above method further includes:

[0216] According to the preset grading parameters, the bubble level corresponding to each first basic dynamic particle in each frame of the first basic motion image is determined, and the preset grading parameters are used to indicate the proportion of the number of first basic dynamic particles corresponding to each bubble level in the first basic motion image of each frame in the total number of first basic dynamic particles.

[0217] In an optional embodiment, the above-mentioned superimposed display of bubble models at various levels to obtain a superimposed bubble model includes:

[0218] Using each level of bubble model as the second virtual emission source, obtaining at least one sub-bubble model through a preset fluid system and a preset mechanical particle system;

[0219] The bubble models at each level and at least one sub-bubble model are superimposed to obtain a superimposed bubble model.

[0220] In an optional implementation, each level of bubble model is used as a second virtual emission source, and at least one sub-bubble model is obtained through a preset fluid system and a preset mechanical particle system, including:

[0221] Using bubble models at all levels as the second virtual emission source, and obtaining the second basic motion animation through a preset fluid system and a preset mechanical particle system;

[0222] The second basic motion animation includes a plurality of frames of second basic motion images, each frame of the second basic motion image is obtained by superimposing the second fluid velocity field of the corresponding frame on the second basic particles of each frame, and the second fluid velocity field can represent the spatial velocity information of the second virtual emission source motion acting on the second flow field where the second basic particles of each frame are located;

[0223] A sub-bubble model corresponding to each second basic dynamic particle in each frame of the second basic motion image is generated, and each second basic dynamic particle is replaced by each sub-bubble model.

[0224] In an optional implementation manner, the above-mentioned generation of a sub-bubble model corresponding to each second basic dynamic particle in each frame of the second basic motion image includes:

[0225] Acquire attribute parameters corresponding to the second basic dynamic particles in the second basic motion image of each frame, the attribute parameters including: bubble level, wherein the bubble level corresponding to the second basic dynamic particles is lower than the bubble level corresponding to the first basic dynamic particles;

[0226] According to the attribute parameters and particle frame identifiers corresponding to the second basic dynamic particles in the second basic motion image of each frame, based on the second preset bubble model set, sub-bubble models corresponding to the second basic motion image of each frame are generated respectively, the second preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers, the basic bubble models corresponding to different particle frame identifiers have different jitter states, and the particle frame identifier is used to indicate the frame identifier corresponding to each second basic particle when it is emitted.

[0227] The specific implementation method and technical effects of the above method embodiment can be found in the above related description, which will not be repeated here.

[0228] Optionally, the present application also provides a computer program product, which includes instructions, and when the instructions are executed on an electronic device, the electronic device implements the steps of the above method embodiment.

[0229] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0230] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0231] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0232] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0233] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0234] The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for simulating liquid bubbles, characterized in that: The method comprises: Acquire a first basic motion animation, wherein the first basic motion animation includes a plurality of frames of first basic motion images formed based on a first virtual emission source, wherein each frame of the first basic motion image is obtained by superimposing a first fluid velocity field of a corresponding frame on each frame of first basic particles; generating at least one level of bubble model corresponding to each frame of the first basic motion image, and superimposing and displaying the bubble models at each level to obtain a superimposed bubble model; Material rendering is performed on each level of bubble models in the first basic motion image in each frame to obtain liquid bubble animation.

2. The method according to claim 1, characterized in that The obtaining of the first basic motion animation comprises: Based on the first virtual emission source, emitting multiple frames of first basic particles through a preset mechanical particle system; Acquire a plurality of frames of first fluid velocity fields corresponding to the first virtual emission source through a preset fluid system, wherein the first fluid velocity field in each frame can represent spatial velocity information of the first virtual emission source acting on the first flow field where the first elementary particle in each frame is located; The first basic motion animation is generated according to multiple frames of the first basic particles and multiple frames of the first fluid velocity field.

3. The method according to claim 2, characterized in that The step of generating the first basic motion animation according to the first basic particles in multiple frames and the first fluid velocity field in multiple frames comprises: Using the first fluid velocity field corresponding to the first basic particle in each frame, driving the first basic particle in each frame, and acquiring the first basic motion image in each frame, wherein the first basic motion image in each frame includes: a plurality of first basic dynamic particles; A first basic motion animation is generated according to a plurality of frames of first basic motion images.

4. The method according to claim 1, characterized in that: The first basic motion image of each frame includes a multi-level bubble model, the multi-level bubble model includes a main bubble model and a non-main bubble model, and the size of the main bubble model is larger than the size of the non-main bubble model; The generating at least one level bubble model corresponding to each frame of the first basic motion image includes: Based on the first preset bubble model set, a main-wrapped bubble model and a non-main-bubble model corresponding to the first basic motion image in each frame are generated respectively, wherein the main-wrapped bubble model is obtained by converting multiple main bubble models, and the first preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers, and the basic bubble models corresponding to different particle frame identifiers have different jitter states, and the particle frame identifier is used to indicate the frame identifier corresponding to each first basic particle when it is emitted.

5. The method according to claim 4, characterized in that The step of generating a non-subject bubble model corresponding to each frame of the first basic motion image based on the first preset bubble model set includes: Acquire attribute parameters corresponding to the first basic dynamic particles in the first basic motion image of each frame, wherein the attribute parameters include: bubble level; According to the attribute parameters and particle frame identifiers corresponding to the first basic dynamic particles in the first basic motion image in each frame, based on the first preset bubble model set, a main-wrapped bubble model and a non-main-bubble model corresponding to the first basic motion image in each frame are generated respectively.

6. The method according to claim 4, characterized in that The generating of the subject-wrapped bubble model corresponding to each frame of the first basic motion image based on the first preset bubble model set includes: Based on the first preset bubble model set, obtaining a main bubble model corresponding to each first basic dynamic particle in each frame of the first basic motion image; converting a main bubble model corresponding to each frame of the first basic motion image into volume data; The volume data is smoothed to obtain a main body wrapped bubble model corresponding to each frame of the first basic motion image.

7. The method according to claim 5, characterized in that The attribute parameters further include: a directional parameter, and the directional parameter is used to characterize the protrusion directions of the main bubble model and the non-main bubble model.

8. The method according to claim 5, characterized in that The method further comprises: According to preset grading parameters, the bubble level corresponding to each first basic dynamic particle in the first basic motion image of each frame is determined, and the preset grading parameters are used to indicate the proportion of the number of first basic dynamic particles corresponding to each bubble level in the first basic motion image of each frame in the total number of first basic dynamic particles.

9. The method according to claim 3, characterized in that: The superimposed display of the bubble models at each level to obtain a superimposed bubble model includes: Using the bubble models at each level as the second virtual emission source, obtaining at least one sub-bubble model through a preset fluid system and a preset mechanical particle system; The bubble models at each level and at least one sub-bubble model are superimposed to obtain the superimposed bubble model.

10. The method according to claim 9, characterized in that The step of using the bubble models at each level as the second virtual emission source and obtaining at least one sub-bubble model through a preset fluid system and a preset mechanical particle system includes: Using the bubble models at each level as the second virtual emission source, and obtaining the second basic motion animation through a preset fluid system and a preset mechanical particle system; The second basic motion animation includes a plurality of frames of second basic motion images, each frame of the second basic motion image is obtained by superimposing the second fluid velocity field of the corresponding frame on the second basic particles of each frame, and the second fluid velocity field can represent the spatial velocity information of the second virtual emission source motion acting on the second flow field where the second basic particles of each frame are located; A sub-bubble model corresponding to each second basic dynamic particle in each frame of the second basic motion image is generated, and each second basic dynamic particle is replaced by each sub-bubble model.

11. The method according to claim 10, characterized in that The generating of the sub-bubble model corresponding to each second basic dynamic particle in each frame of the second basic motion image includes: Acquire attribute parameters corresponding to second basic dynamic particles in the second basic motion image of each frame, wherein the attribute parameters include: bubble level, wherein the bubble level corresponding to the second basic dynamic particle is lower than the bubble level corresponding to the first basic dynamic particle; According to the attribute parameters and particle frame identifiers corresponding to the second basic dynamic particles in the second basic motion image of each frame, based on the second preset bubble model set, sub-bubble models corresponding to the second basic motion image of each frame are generated respectively, the second preset bubble model set includes basic bubble models corresponding to multiple particle frame identifiers, the basic bubble models corresponding to different particle frame identifiers have different jitter states, and the particle frame identifier is used to indicate the frame identifier corresponding to each second basic particle when it is emitted.

12. A liquid bubble simulation device, characterized in that: include: an acquisition module, configured to acquire a first basic motion animation, wherein the first basic motion animation includes a plurality of frames of first basic motion images formed based on a first virtual emission source, wherein each frame of the first basic motion image is obtained by superimposing a first fluid velocity field of a corresponding frame on each frame of first basic particles; A generating module, configured to generate at least one level of bubble model corresponding to each frame of the first basic motion image, and to superimpose and display the bubble models of each level to obtain a superimposed bubble model; The rendering module is used to perform material rendering on each level of bubble models in each frame of the first basic motion image to obtain liquid bubble animation.

13. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the liquid bubble simulation method as described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the liquid bubble simulation method according to any one of claims 1 to 11 are executed.