Virtual model interaction special effect processing method and device, storage medium and electronic device

By performing fluid and rigid body calculations on the virtual fluid model, interactive effects between the virtual fluid model and the virtual rigid body model are generated, solving the problems of poor stability, poor controllability, and low efficiency in the existing technology, and achieving more efficient interactive effect processing.

CN116407833BActive Publication Date: 2026-07-31NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2023-03-21
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing methods for processing virtual model interactive effects based on parallel computation suffer from poor stability, poor controllability, and low efficiency, making it difficult to generate complex interactive effects.

Method used

By performing fluid calculations on the virtual fluid model, the first calculation result is obtained. This result is then used to perform rigid body calculations on the virtual rigid body model. Subsequently, additional calculations are performed to generate interactive effects between the virtual fluid model and the virtual rigid body model. A serial calculation method is adopted to improve the stability and controllability of the calculation.

Benefits of technology

The stability and controllability of the virtual model interactive effects processing were improved, the computational efficiency was increased, and interactive effects with a strong sense of physical realism were generated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116407833B_ABST
    Figure CN116407833B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, storage medium, and electronic device for processing interactive special effects of virtual models. The method includes: performing fluid calculations on a virtual fluid model to obtain a first calculation result; using the first calculation result, performing rigid body calculations on a virtual rigid body model to obtain a second calculation result; using the second calculation result, performing additional calculations on the virtual fluid model to obtain a third calculation result; and generating interactive special effects between the virtual fluid model and the virtual rigid body model based on the first and third calculation results. This application solves the technical problems of poor stability, poor controllability, and low efficiency in the processing of interactive special effects of virtual models caused by using parallel calculation-based solvers in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, storage medium, and electronic device for processing virtual model interactive special effects. Background Technology

[0002] In the process of creating virtual scenes, it is often necessary to present interactive effects between virtual fluid models and virtual rigid body models, such as the collision effect between virtual river models and virtual riverbank models. Typically, this is achieved by using a solver to perform parallel computation on both the virtual fluid and rigid body models within the same computational framework. However, the aforementioned method for processing virtual model interactive effects based on parallel computation has several drawbacks: poor stability (the accuracy of this method depends on the number of computational substeps, and the accuracy is low when the rate of change of the physical variables of the virtual model is large); poor controllability (the method has few controllable parameters, only allowing control over the strength of the interaction between virtual models, making it difficult to create complex interactive effects); and low computational efficiency (parallel computation involves a huge amount of data and computation).

[0003] There is currently no effective solution to the above problems.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] At least some embodiments of this application provide a method, apparatus, storage medium, and electronic device for processing virtual model interactive effects, in order to at least solve the technical problems of poor stability, poor controllability, and low efficiency in the processing of interactive effects caused by using parallel solvers to create virtual model interactive effects in related technologies.

[0006] According to one embodiment of this application, a method for processing interactive special effects of a virtual model is provided, comprising: performing fluid calculation on a virtual fluid model to obtain a first calculation result, wherein the first calculation result is used to simulate the dynamic display effect of the virtual fluid model; using the first calculation result to perform rigid body calculation on a virtual rigid body model to obtain a second calculation result, wherein the second calculation result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move; using the second calculation result to perform additional calculation on the virtual fluid model to obtain a third calculation result, wherein the third calculation result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model; and generating interactive special effects between the virtual fluid model and the virtual rigid body model based on the first calculation result and the third calculation result.

[0007] According to one embodiment of this application, a virtual model interaction effect processing device is also provided, comprising: a first calculation module, used to perform fluid calculation on a virtual fluid model to obtain a first calculation result, wherein the first calculation result is used to simulate the dynamic display effect of the virtual fluid model; a second calculation module, used to perform rigid body calculation on a virtual rigid body model using the first calculation result to obtain a second calculation result, wherein the second calculation result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move; a third calculation module, used to perform additional calculation on the virtual fluid model using the second calculation result to obtain a third calculation result, wherein the third calculation result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model; and a processing module, used to generate interaction effects between the virtual fluid model and the virtual rigid body model based on the first calculation result and the third calculation result.

[0008] According to one embodiment of this application, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to execute the virtual model interaction effect processing method described in any of the above claims when it is run.

[0009] According to one embodiment of this application, an electronic device is also provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the virtual model interaction effect processing method described in any of the preceding claims.

[0010] In at least some embodiments of this application, a first solution result is obtained by performing fluid calculation on a virtual fluid model, wherein the first solution result is used to simulate the dynamic display effect of the virtual fluid model; a second solution result is obtained by performing rigid body calculation on a virtual rigid body model using the first solution result, wherein the second solution result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move; an additional solution is performed on the virtual fluid model using the second solution result, wherein the third solution result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model; further, based on the first solution result and the third solution result, interactive effects between the virtual fluid model and the virtual rigid body model are generated, thereby achieving the purpose of generating corresponding interactive effects based on the dynamic display effect of the virtual fluid model and the additional display effect between the virtual fluid model and the virtual rigid body model, thus achieving the technical effect of improving the stability, controllability and efficiency of the virtual model interactive effect processing process, and thus solving the technical problems of poor stability, poor controllability and low efficiency of the interactive effect processing process caused by using a solver based on parallel calculation in related technologies to create virtual model interactive effects. Attached Figure Description

[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0012] Figure 1 This is a schematic diagram of a virtual model interactive special effects processing procedure based on existing technology;

[0013] Figure 2 This is a hardware structure block diagram of a mobile terminal for a virtual model interaction effect processing method according to one embodiment of this application;

[0014] Figure 3 This is a flowchart of a virtual model interaction effect processing method according to one embodiment of this application;

[0015] Figure 4 This is a schematic diagram of an optional virtual model interaction effect processing procedure according to one embodiment of this application;

[0016] Figure 5 This is a schematic diagram of velocity field information of a virtual fluid model according to one embodiment of this application;

[0017] Figure 6 This is a schematic diagram of an optional rigid body solution process according to one embodiment of this application;

[0018] Figure 7 This is a schematic diagram of an optional rigid body solution velocity component repair process according to one embodiment of this application;

[0019] Figure 8 This is a schematic diagram of an optional method for repairing velocity components in rigid body solving according to one embodiment of this application;

[0020] Figure 9 This is a schematic diagram of an optional rigid body solution result before smoothing according to one embodiment of this application;

[0021] Figure 10 This is a schematic diagram of an optional smoothed rigid body solution result according to one embodiment of this application;

[0022] Figure 11 This is a schematic diagram of an optional original planar representation according to one embodiment of this application;

[0023] Figure 12 This is a schematic diagram of an optional extraction result according to one embodiment of this application;

[0024] Figure 13 This is a schematic diagram of an optional target plane according to one embodiment of this application;

[0025] Figure 14 This is a schematic diagram of an optional variation of one embodiment of this application;

[0026] Figure 15 This is a schematic diagram of another optional variation of one embodiment of this application;

[0027] Figure 16 This is a schematic diagram of an optional third solution result according to one embodiment of this application;

[0028] Figure 17 This is a schematic diagram of another optional third solution result according to one embodiment of this application;

[0029] Figure 18 This is a schematic diagram of the interactive effects between an optional virtual fluid model and a virtual rigid body model according to one embodiment of this application;

[0030] Figure 19 This is a structural block diagram of a virtual model interactive special effects processing device according to one embodiment of this application;

[0031] Figure 20 This is a schematic diagram of an electronic device according to one embodiment of the present application. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0034] It should be noted that, in the specification of this application, the word "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. In the following description, details are set forth for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid unnecessarily obscuring the description of this application. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0035] In the description of the embodiments of this application, some nouns or terms appearing shall be interpreted as follows:

[0036] A solver is a computational framework (such as application software or computational programs) that performs physical dynamic simulations of different types of 3D models. For example, a rigid body solver can be used to simulate the bounce of a ball after it collides with the ground during a fall from the air, based on gravity.

[0037] A fluid solver (Flip solver) is a solver used to simulate the motion of fluids. The Flip solver uses a hybrid approach of particles and cells for solving the problem. Fluid data is stored in the particles and used to perform dynamic simulations on the fluid model. The Flip solver offers fast simulation speed and high solution accuracy.

[0038] A rigid-body solver is a solver used to simulate the motion of rigid bodies. Commonly used rigid-body solvers employ a solution method based on the Bullet engine. The Bullet engine provides simple collision shapes (primarily based on convex bodies and spheres), and its solution efficiency is high, making it suitable for large-scale simulations. During the solution process, the rigid-body solver calculates the displacement, velocity, acceleration, rotation angle, rotational velocity, and rotational acceleration of the rigid body. The solution data is stored in particles, providing a high degree of control over the solution process.

[0039] A ripple solver is a solver used to simulate ripples on the surface of a fluid. It is a lightweight solver with fast calculation speed, suitable for solving ripples (or waves) generated when deformed geometry returns to its original shape.

[0040] Parallel computation refers to the process in which multiple solvers perform simultaneous computations within the same computational framework. In parallel computation, multiple solvers will influence each other.

[0041] Substeps: This refers to the maximum number of iterations between two frames in frame-by-frame computation. A higher substep count results in higher computation accuracy.

[0042] Fluid solving refers to the process of simulating fluid motion (such as rivers) in a real-world scene using a solver within a virtual 3D environment. Fluid solving involves a massive amount of computation, with the number of particles reaching tens or hundreds of millions, requiring significant computational resources and time. Furthermore, in the creation of virtual scenes, it is often necessary to present interactive effects between virtual fluid models and virtual rigid body models (e.g., collision effects between virtual river models and virtual riverbank models, floating effects between virtual river models and virtual floating object models), which involves even more computation than solving only the virtual fluid model.

[0043] Figure 1 This is a schematic diagram of a virtual model interactive special effects processing procedure based on existing technology, such as... Figure 1 As shown, in the existing virtual model interaction effect processing method, a fluid solver is used to perform fluid calculation on the virtual fluid model, and a rigid body solver is used to perform rigid body calculation on the virtual rigid body model. The fluid calculation and the rigid body calculation are parallel calculations under the same calculation framework, thereby outputting the interaction effect between the virtual fluid model and the virtual rigid body model.

[0044] In the parallel solution described above, the fluid solver and the rigid body solver interact as follows: considering the force exerted by the virtual rigid body model on the virtual fluid model, the fluid solver calculates the fluid response (such as water splashing) generated after the virtual rigid body model impacts or contacts the virtual fluid model; considering the force exerted by the virtual fluid model on the virtual rigid body model, the rigid body solver receives the fluid pressure field transmitted from the fluid solver and performs rigid body motion (such as floating, displacement, etc.) calculations.

[0045] However, the above-mentioned methods for processing virtual model interaction effects based on parallel computation have the following drawbacks: poor stability, as the accuracy of the above methods depends on the number of sub-steps, and the accuracy is low when the rate of change of the physical variables of the virtual model is large; poor controllability, as the above methods have few controllable parameters, and can only control the strength of the interaction between virtual models, making it difficult to create more complex interaction effects; and low computational efficiency, as parallel computation corresponds to a huge amount of data and computation.

[0046] In view of the shortcomings of the existing virtual model interaction effects processing methods, no effective solution has been proposed prior to this application.

[0047] In one possible implementation of this application, the inventors, after practice and careful research, found that the parallel solution methods for virtual fluid models and virtual rigid body models commonly used in computer technology applications involving virtual model interactive effects processing still suffer from technical problems such as poor solution stability, poor controllability, and low solution efficiency. Based on this, the application scenarios of this application can be computer image processing scenarios, computer simulation testing scenarios, video game scenarios, virtual reality / augmented reality scenarios, etc. In particular, the game types targeted in the video game scenarios can be action, adventure, simulation, role-playing, and casual games, etc.

[0048] This application proposes a method for processing interactive special effects of virtual models. It adopts the technical concept of generating corresponding interactive special effects by using dynamic display effects based on virtual fluid models and additional display effects between virtual fluid models and virtual rigid body models. This achieves the technical effect of improving the stability, controllability and efficiency of the virtual model interactive special effects processing process, thereby solving the technical problems of poor stability, poor controllability and low efficiency in the interactive special effects processing process caused by using parallel solvers to create virtual model interactive special effects in related technologies.

[0049] The methods described in this application can be executed in a terminal device (e.g., a mobile terminal, a computer terminal, or a similar computing device). Taking a mobile terminal as an example, the mobile terminal can be a smartphone, tablet computer, PDA, mobile internet device, game console, or other terminal device.

[0050] Figure 2 This is a hardware structure block diagram of a mobile terminal according to one embodiment of a virtual model interaction effect processing method of this application. Figure 2 As shown, a mobile terminal may include one or more ( Figure 2 (Only one is shown) Processor 202, memory 204, transmission device 206, input / output device 208, and display device 210. Taking the virtual model interaction effect processing method applied to a video game scene through this mobile terminal as an example, processor 202 calls and runs the computer program stored in memory 204 to execute the virtual model interaction effect processing method. The interaction effect of the virtual fluid model and the virtual rigid body model in the generated video game scene is transmitted to input / output device 208 and / or display device 210 through transmission device 206, thereby providing the interaction effect of the virtual fluid model and the virtual rigid body model to the player.

[0051] Still as Figure 2As shown, processor 202 may include, but is not limited to, processing devices such as: central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), field programmable gate array (FPGA), neural network processing unit (NPU), tensor processing unit (TPU), artificial intelligence (AI) type processor, etc.

[0052] Those skilled in the art will understand that Figure 2 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 2 The more or fewer components shown, or having the same Figure 2 The different configurations shown.

[0053] In some optional embodiments primarily focused on gaming scenarios, the aforementioned terminal device may also provide a human-computer interaction interface with a touch-sensitive surface. This interface can sense finger contact and / or gestures to interact with a graphical user interface (GUI). The human-computer interaction functions may include the following: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. Executable instructions for performing the aforementioned human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0054] The methods described in this application can also be executed on a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Taking the virtual model interaction effects processing method applied to a video game scene via a video game server as an example, the video game server can generate interactive effects between virtual fluid models and virtual rigid body models in the video game scene based on this method, and provide these interactive effects to the player (e.g., by rendering and displaying them on the player's terminal screen, or by providing them to the player through holographic projection, etc.).

[0055] According to one embodiment of this application, an embodiment of a virtual model interactive special effects processing method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0056] This embodiment provides a method for processing virtual model interactive effects on the aforementioned mobile terminal. Figure 3 This is a flowchart of a virtual model interaction effect processing method according to one embodiment of this application, such as... Figure 3 As shown, the method includes the following steps:

[0057] Step S31: Perform fluid calculation on the virtual fluid model to obtain the first calculation result, wherein the first calculation result is used to simulate the dynamic display effect of the virtual fluid model;

[0058] Step S32: Using the first solution result, perform rigid body calculation on the virtual rigid body model to obtain the second solution result. The second solution result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move.

[0059] Step S33: Using the second solution result, perform additional solution on the virtual fluid model to obtain the third solution result, wherein the third solution result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model;

[0060] Step S34: Based on the first and third solution results, generate interactive effects between the virtual fluid model and the virtual rigid body model.

[0061] The aforementioned virtual fluid models can be virtual models with flow characteristics in scenarios such as computer image processing, computer simulation testing, video games, and virtual reality / augmented reality, such as virtual river models, virtual ocean models, and virtual lake models. The aforementioned virtual rigid body models can be virtual models with rigid body motion characteristics in the aforementioned scenarios, such as virtual prop models, virtual landscape models, and virtual block models. The aforementioned scenarios also include virtual static models, which may interact with the aforementioned virtual fluid models or virtual rigid body models, but the virtual static models themselves do not move. The following uses the method of using virtual model interaction effects in a video game scene as an example to specifically illustrate the technical solution of this application.

[0062] The game types corresponding to the above-mentioned video game scenarios can be: action games (e.g., first-person or third-person shooter games, 2D or 3D fighting games, war action games, and sports action games), adventure games (e.g., exploration games, collection games, puzzle games), simulation games (e.g., simulation sandbox games, simulation management games, strategy simulation games, city building simulation games, business simulation games), role-playing games, and casual games (e.g., board games, casual competitive games, music rhythm games, dress-up and simulation games), etc.

[0063] Fluid calculations are performed on the virtual fluid model using a fluid solver, or on both the virtual fluid model and the virtual static model (i.e., considering the force effects between the virtual fluid model and the virtual static model), to obtain the first solution result mentioned above. This first solution result includes time-series data (corresponding to multiple time steps of the fluid calculation) of the kinematic physical quantities (such as velocity, acceleration, pressure, etc.) corresponding to the virtual fluid model. The first solution result is used to simulate the dynamic display effects of the virtual fluid model, including vortices, flows, and waves.

[0064] Based on the first solution result, the rigid body solver is used to perform rigid body calculation on the virtual rigid body model to obtain the second solution result. The second solution result can characterize the dynamic display effect of the virtual rigid body model under the drive of the virtual fluid model. The dynamic display effect includes translation, rotation, etc.

[0065] Based on the second solution result, additional solutions are performed on the virtual fluid model to obtain a third solution result. For example, the above additional solution can be a ripple solution. The third solution result is used to simulate additional display effects produced by the virtual rigid body model acting on the virtual fluid model. These additional display effects include ripples, splashes, etc.

[0066] The interactive effects between the virtual fluid model and the virtual rigid body model mentioned above refer to the flow display effects of the generated virtual fluid model after considering the interaction between the virtual fluid model and the virtual rigid body model. For example, considering the impact of the virtual river model on the virtual floating object model and the obstruction of the virtual floating object model on the virtual river model, the interactive effects between the generated virtual river model and the virtual floating object model include: splashing water, ripples on the water surface, whirlpools, etc.

[0067] Based on the first and third solution results, interactive effects between the virtual fluid model and the virtual rigid body model are generated. In other words, considering the self-flow of the virtual fluid model, the driving force of the virtual fluid model on the virtual rigid body model, and the force exerted by the virtual rigid body model on the virtual fluid model, interactive effects between the virtual fluid model and the virtual rigid body model are generated. These interactive effects have a strong sense of physical realism, and the above solution process is a serial solution, which has strong controllability, strong solution stability, and high solution efficiency.

[0068] In at least some embodiments of this application, a first solution result is obtained by performing fluid calculation on a virtual fluid model, wherein the first solution result is used to simulate the dynamic display effect of the virtual fluid model; a second solution result is obtained by performing rigid body calculation on a virtual rigid body model using the first solution result, wherein the second solution result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move; an additional solution is performed on the virtual fluid model using the second solution result, wherein the third solution result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model; further, based on the first solution result and the third solution result, interactive effects between the virtual fluid model and the virtual rigid body model are generated, thereby achieving the purpose of generating corresponding interactive effects based on the dynamic display effect of the virtual fluid model and the additional display effect between the virtual fluid model and the virtual rigid body model, thus achieving the technical effect of improving the stability, controllability and efficiency of the virtual model interactive effect processing process, and thus solving the technical problems of poor stability, poor controllability and low efficiency of the interactive effect processing process caused by using a solver based on parallel calculation in related technologies to create virtual model interactive effects.

[0069] The methods described above in the embodiments of this application will be further described below.

[0070] Figure 4 This is a schematic diagram of an optional virtual model interaction effect processing procedure according to one embodiment of this application, such as... Figure 4As shown, considering the force exerted by the virtual static model on the virtual fluid model in the game scene (such as the force exerted by a riverbank on a river), fluid calculations are performed on the virtual fluid model to obtain the first solution result. This first solution result includes at least the velocity field and surface field of the virtual fluid model. The velocity data corresponding to the velocity field and the surface data corresponding to the surface field are stored in multiple particles corresponding to the virtual fluid model. Specifically, these particles are distributed within the scene space corresponding to the virtual fluid model, and each particle stores the velocity data and surface data corresponding to its position. The velocity data includes velocity components (denoted as vx, vy, and vz) in three directions (X, Y, and Z) in three-dimensional space. The surface data includes the position information of each point on the surface of the virtual fluid model, which determines the undulation shape of the virtual fluid model's surface.

[0071] Optionally, in step S32, using the first solution result to perform rigid body calculation on the virtual rigid body model to obtain the second solution result may include the following execution steps:

[0072] Step S321: Extract velocity field information from the first solution result, wherein the velocity field information is used to determine the flow velocity properties of each particle in the virtual fluid model;

[0073] Step S322: Use the velocity field information to perform rigid body calculation on the virtual rigid body model to obtain the second calculation result.

[0074] Still as Figure 4 As shown, velocity field information of the virtual fluid model is extracted from the first solution obtained from the fluid calculation. This velocity field information is used to determine the flow velocity attributes of each particle in the virtual fluid model. Specifically, the velocity field information includes velocity data on multiple particles corresponding to the virtual fluid model. The flow velocity attributes that can be determined by the three velocity components in the velocity data include the velocity magnitude and velocity direction of each particle.

[0075] Figure 5 This is a schematic diagram of the velocity field information of a virtual fluid model according to one embodiment of this application, such as... Figure 5 As shown, taking the fluid solution of a virtual river model as an example, the velocity field information extracted from the first solution result can be the velocity contour map of the virtual river model. Multiple particles in the velocity contour map store the velocity data of the virtual river model (including velocity magnitude and direction). The greater the velocity of a particle, the lower its grayscale value displayed in the velocity contour map (i.e., as shown in the image). Figure 5 (The color of China and Vietnam is close to white).

[0076] Still as Figure 4As shown, the virtual rigid body model is solved using velocity field information; that is, the virtual rigid body model driven by the velocity field of the virtual fluid model is solved using a rigid body solver to obtain the second solution result mentioned above. The second solution result includes the rigid body motion data of the virtual rigid body model.

[0077] Optionally, in step S322, the virtual rigid body model is solved using the velocity field information to obtain a second solution result, which may include the following steps:

[0078] Step S3221: Use the velocity field information to perform rigid body calculation on the virtual rigid body model to obtain the rotation data and displacement data of the virtual rigid body model. The rotation data is used to simulate the rotational dynamic effect of the virtual rigid body model under the action of the velocity field information, and the displacement data is used to simulate the floating dynamic effect of the virtual rigid body model under the action of the velocity field information.

[0079] Step S3222: Determine the second solution result based on the rotation data and displacement data.

[0080] Still as Figure 4 As shown, when using a rigid body solver to perform rigid body calculations on a virtual rigid body model driven by the velocity field of a virtual fluid model, the second solution result includes rotational and displacement data of the virtual rigid body model. The displacement data is used to simulate the floating dynamics of the virtual rigid body model under the influence of the velocity field information. The displacement data includes at least the magnitude, direction, magnitude, direction, and acceleration of the translational displacement of the virtual rigid body model. The rotational data is used to simulate the rotational dynamics of the virtual rigid body model under the influence of the velocity field information. The rotational data includes at least the magnitude, direction, and angular acceleration of the angular velocity of the virtual rigid body model during rotation.

[0081] Optionally, in step S3221, the virtual rigid body model is solved using the velocity field information to obtain the rotation data of the virtual rigid body model, which may include the following execution steps:

[0082] Step S32211: Determine the first rotational speed using the velocity field information;

[0083] Step S32212: Generate random numbers using the identification information of the virtual rigid body model;

[0084] Step S32213: Calculate the second rotation speed using the first rotation speed and a random number;

[0085] Step S32214: Map the second rotational speed from the first value range to the second value range to obtain the mapping result;

[0086] Step S32215: Perform spline control on the mapping result to obtain rotation data.

[0087] Figure 6 This is a schematic diagram of an optional rigid body solution process according to one embodiment of this application, such as... Figure 6 As shown, the rigid body solution process described above can be implemented using Houdini, specifically through nodes 61 to 65. It should be noted that each of nodes 61 to 65 can include one or more functional nodes in Houdini.

[0088] In node 61 of the rigid body solution process, the velocity field information of the virtual fluid model is transferred to the virtual rigid body model. This allows the rigid body solver corresponding to the virtual rigid body model to read the velocity data of multiple particles from the velocity field information.

[0089] To simulate the rotational motion of the virtual rigid body model driven by the velocity field of the virtual fluid model, at node 62 in the rigid body solution process, the rigid body solver determines the first rotational velocity of the virtual rigid body model from the velocity field information, denoted as spinspeed1. This first rotational velocity is the rotational velocity of the virtual rigid body model in the virtual model space on the horizontal plane (for example, in the XYZ Cartesian coordinate system, where the +Y direction is vertically upward, the horizontal plane is the XZ plane).

[0090] In node 62 of the rigid body solution process, a preset random function is used to generate random numbers based on the identification information of the virtual rigid body model (such as the model ID, denoted as ptnum). Then, the second rotational speed, spinspeed2, is calculated using the first rotational speed, spinspeed1, and the random numbers. The default value range of the second rotational speed is the first value range, i.e., [minSpeed, maxSpeed]. The second rotational speed is mapped from the first value range to the second value range, resulting in a mapping result where the second value range is [0,1]. In other words, the second rotational speed is normalized. Spline control is applied to the mapping result to obtain rotational data, denoted as spinspeed3.

[0091] In one optional implementation, the second rotational speed spinspeed2 is calculated as follows:

[0092] spinespeed2=spinspeed1×(Rand(ptnum)×0.5+0.5).

[0093] In one optional implementation, the above-mentioned rotation data spinspeed3 is calculated as follows:

[0094] spinspeed3 = spinspeed2 ×

[0095] Chramp(fit(spinspeed2,ch(“minSpeed”),ch(“maxSpeed”),0,1)).

[0096] Rand is a random function, fit is a mapping function, and Chramp is a spline control function.

[0097] Optionally, in step S3221, the virtual rigid body model is solved using the velocity field information to obtain the displacement data of the virtual rigid body model, which may include the following steps:

[0098] Step S32216: Determine the velocity component of the virtual rigid body model in the height direction using the velocity field information;

[0099] Step S32217: Obtain the position of the first vertex on the surface to be contacted in the virtual fluid model, wherein the position of the first vertex is used to determine the position of the vertex on the surface to be contacted that is closest to the virtual rigid body model.

[0100] Step S32218: Determine the target vector through the position of the first vertex, where the target vector is the vector between the virtual rigid body model and the position of the first vertex;

[0101] Step S32219: Repair the velocity components based on the target vector to obtain displacement data.

[0102] Still as Figure 6 As shown, in node 63 of the rigid body solution process, noise in the vertical direction (such as the Y direction in the virtual model space) is added to the virtual rigid body model to simulate the random undulations and swaying of the virtual rigid body model in the vertical direction.

[0103] Still as Figure 6 As shown, in node 64 of the rigid body solution process, air resistance is added to the virtual rigid body model to simulate the effect of air resistance on the virtual rigid body model in the real scene.

[0104] Still as Figure 6 As shown, in node 65 of the rigid body solution process, the velocity components of the virtual rigid body model are repaired and adjusted to obtain displacement data to simulate the height fluctuation motion of the virtual rigid body model caused by the velocity of the virtual fluid model in the vertical direction.

[0105] Figure 7 This is a schematic diagram of an optional rigid body solution velocity component repair process according to one embodiment of this application. Figure 6 The node 65 shown specifically includes, for example, Figure 7 Nodes 71 to 73 are shown. Taking the rigid body solution of a rigid body floating on a virtual river model as an example, during the rigid body solution process, the rigid body solver determines the velocity component (e.g., vy) of the virtual rigid body model in the height direction (e.g., the Y direction in the virtual model space) from the velocity field information of the virtual fluid model. Based on this, in node 71 of the rigid body solution process, the position of the first vertex on the river surface (i.e., the surface to be contacted mentioned above) in the virtual river model is obtained. The position of the first vertex is the position information (i.e., the coordinates of the point) of the point closest to the floating object on the river surface.

[0106] In node 72 of the rigid body solution process, the target vector between the floating object and the point on the fluid surface closest to the floating object (i.e., the point at the first vertex position mentioned above) is calculated. In node 73 of the rigid body solution process, the vertical velocity component (vy) of the floating object is corrected and adjusted based on the target vector to obtain displacement data.

[0107] Figure 8 This is a schematic diagram of an optional method for velocity component repair in rigid body calculation according to one embodiment of this application, as shown below. Figure 8 As shown, the vertical velocity component of the floating object, V1, is determined using the velocity field information of the virtual river model. The motion of the floating object on the virtual river surface, with varying heights, is simulated. Using the aforementioned velocity component repair and adjustment method, the velocity component V1 is repaired and adjusted to obtain the repaired velocity component V2. The displacement data of the floating object is then determined based on the velocity component V2.

[0108] Optionally, in step S3222, determining the second solution result based on the rotation data and displacement data may include the following execution steps:

[0109] Step S32221: The rotation data is smoothed using a first jitter filter value to obtain a first smoothing result, and the displacement data is smoothed using a second jitter filter value to obtain a second smoothing result, wherein the first jitter filter value is different from the second jitter filter value.

[0110] Step S32222: Determine the second solution result based on the first smoothing result and the second smoothing result.

[0111] The aforementioned first and second jitter filter values ​​are preset, different jitter filter values. These jitter filter values ​​can be set as constants or as function variables. To reduce data jitter in the second solution result obtained from rigid body calculation and to make the dynamic effects generated by the virtual rigid body model driven by the virtual fluid model have a higher degree of physical realism, the first jitter filter value is used to smooth the rotation data to obtain a first smoothed result, and the second jitter filter value is used to smooth the displacement data to obtain a second smoothed result. The second solution result is determined based on the first and second smoothed results. Figure 9 This is a schematic diagram of the rigid body solution result before smoothing processing according to one embodiment of this application. Figure 10 This is a schematic diagram of an optional smoothed rigid body solution result according to one embodiment of this application. For example... Figure 9 He Ru Figure 10 Each line shown represents the temporal variation of a kinematic physical quantity (including rotational and displacement data) of the virtual rigid body model. It is readily apparent that, after the smoothing process described in step S32221, the second solution result determined in step S32222 exhibits significantly reduced data jitter compared to the result without smoothing.

[0112] Optionally, in step S33, using the second solution result to perform additional calculations on the virtual fluid model to obtain a third solution result may include the following execution steps:

[0113] Step S331: Using the second solution result, perform ripple calculation on the virtual fluid model to obtain the third solution result, wherein the third solution result is used to simulate the ripple display effect generated by the virtual rigid body model acting on the virtual fluid model.

[0114] The aforementioned process in this application embodiment has taken into account the flow effect of the virtual fluid model itself (or the interaction between it and the virtual static model), as well as the rigid body motion effect of the virtual rigid body model driven by the velocity field of the virtual fluid model. In order to further enhance the physical realism of the interaction effects between virtual models, the ripple display effect generated by simulating the virtual rigid body model acting on the virtual fluid model is considered. The second solution result is used to perform ripple solution on the virtual fluid model to obtain the third solution result.

[0115] Optionally, in step S331, using the second solution result to perform ripple calculation on the virtual fluid model to obtain a third solution result may include the following execution steps:

[0116] Step S3311: Extract the bounding box of the virtual rigid body model based on the original plane to obtain the extraction result, wherein the original plane is the contact plane between the virtual fluid model and the virtual rigid body model;

[0117] Step S3312: Obtain the target plane corresponding to the original plane from the extraction results;

[0118] Step S3313: Deform the target plane using the second solution result to obtain the deformation result;

[0119] Step S3314: Perform ripple calculation on the deformation result to obtain the third calculation result.

[0120] The aforementioned original plane is the contact plane between the virtual fluid model and the virtual rigid body model, i.e., the fluid surface. It is easy to understand that the fluid surface of the virtual fluid model may have fluctuations, so the aforementioned contact plane may be a curved surface.

[0121] The surface field is extracted from the first solution result of the virtual fluid model using a ripple solver, and then the bounding box of the virtual rigid body model is extracted from the surface field to obtain the extraction result. Further, the target plane corresponding to the original plane is obtained from the extraction result, and the target plane can be at least one surface of the bounding box.

[0122] The bounding box mentioned above refers to the smallest enclosed space within the geometry that completely surrounds the virtual rigid body model. Since virtual rigid body models are usually quite complex in shape (irregular), using bounding boxes to describe them can improve computational efficiency.

[0123] Figure 11 This is a schematic diagram of an optional original planar representation according to one embodiment of this application, such as... Figure 11 As shown, the original plane is the fluid surface of the virtual fluid model. There are undulations on this fluid surface. Figure 12 This is a schematic diagram of an optional extraction result according to one embodiment of this application, such as... Figure 12 As shown, the bounding box of the virtual rigid body model is a cuboid. The target plane corresponding to the fluid surface is selected from the six surfaces of the cuboid. In this example, the top surface of the cuboid (denoted as ripple mesh) is selected as the target plane for illustration. Figure 13 This is a schematic diagram of an optional target plane according to one embodiment of this application.

[0124] Furthermore, using the second solution result obtained from the rigid body calculation of the virtual rigid body model, the target plane (ripple mesh) is deformed to obtain the deformation result. Figure 14 This is a schematic diagram illustrating an optional variation of one embodiment of this application. Figure 15 This is a schematic diagram illustrating another optional variation of one embodiment of this application. In such... Figure 14 The deformation results shown correspond to the virtual rigid body model, resulting in the following: Figure 15 The deformation result is shown. Based on this, the deformation result is subjected to ripple solution using a ripple solver to obtain the third solution result mentioned above. Figure 16 This is a schematic diagram of an optional third solution result according to one embodiment of this application. Figure 17 This is a schematic diagram of another optional third solution result according to one embodiment of this application. In such... Figure 16 The third solution result shown displays the corresponding virtual rigid body model, resulting in the following: Figure 17 The third solution result is shown. Figure 16 and Figure 17 As shown, the virtual model interaction effect processing method provided in this application embodiment takes into account the effect of the virtual rigid body model on the virtual fluid model, and the third solution result can represent the ripple dynamic effect generated by the force of the virtual rigid body model on the fluid surface.

[0125] Optionally, in step S3313, the target plane is deformed using the second solution result to obtain the deformation result, which may include the following execution steps:

[0126] Step S33131: Using the second solution result, obtain the position of the second vertex in the target plane, wherein the position of the second vertex is used to determine the position of the vertex closest to the virtual rigid body model on the target plane;

[0127] Step S33132: Deform the target plane with the second vertex position as the center to obtain the deformation result.

[0128] One optional implementation for deforming the target plane (ripple mesh) to obtain the deformation result is as follows: using the rigid body motion data of each particle in the second calculation result, the position of the second vertex in the target plane (ripple mesh) is obtained. The second vertex position is used to determine the vertex position on the target plane that is closest to the virtual rigid body model. In this example, the top surface of the bounding box is selected as the target plane. Then, with the second vertex position as the center, the target plane (ripple mesh) is deformed downward to obtain the deformation result.

[0129] Figure 18 This is a schematic diagram illustrating the interactive effects of an optional virtual fluid model and a virtual rigid body model according to one embodiment of this application. Based on the first and third solution results, the dynamic display effect of the virtual fluid model is combined with the additional display effects produced by simulating the virtual rigid body model acting on the virtual fluid model, resulting in the following... Figure 18The interactive effects between the virtual fluid model and the virtual rigid body model are shown. Because the interaction effects are generated by considering the self-flow of the virtual fluid model, the driving force of the virtual fluid model on the virtual rigid body model, and the force exerted by the virtual rigid body model on the virtual fluid model, the physical realism of these interactive effects is strong. Furthermore, the above solution process is serial, offering strong controllability, high solution stability, and high solution efficiency.

[0130] Optionally, in step S34, generating interactive effects between the virtual fluid model and the virtual rigid body model based on the first and third solution results may include the following execution steps:

[0131] Step S341: Based on the first solution result, the second solution result, and the third solution result, generate interactive effects between the virtual fluid model and the virtual rigid body model.

[0132] As an exemplary embodiment, interactive effects between the virtual fluid model and the virtual rigid body model are generated based on the flow data of the virtual fluid model in the first solution result and the ripple wave data of the virtual fluid model in the third solution result. Since the first solution result considers the flow characteristics of the virtual fluid model itself and / or the interaction between the virtual fluid model and the virtual static model, and the third solution result considers the reaction of the virtual rigid body model on the virtual fluid model driven by the velocity field of the virtual fluid model, the flow effect of the virtual fluid model in the interactive effects generated based on the first and third solution results is closer to the real-world scene and has a strong sense of physical realism.

[0133] As another exemplary embodiment, based on the flow data of the virtual fluid model in the first solution result, the motion data of the virtual rigid body model in the second solution result, and the ripple wave data of the virtual fluid model in the third solution result, an interactive effect between the virtual fluid model and the virtual rigid body model is generated. Compared with the aforementioned embodiment that generates interactive effects based on the first and third solution results, this embodiment can further adjust the interactive effect using the motion data of the virtual rigid body model, further enhance the interactive coupling relationship between the virtual rigid body model and the virtual fluid model, and obtain a more realistic interactive effect.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a magnetic disk or optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0135] This embodiment also provides a virtual model interaction effects processing device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0136] Figure 19 This is a structural block diagram of a virtual model interactive special effects processing device according to one embodiment of this application, such as... Figure 19 As shown, the device includes: a first calculation module 1901, used to perform fluid calculations on a virtual fluid model to obtain a first calculation result, wherein the first calculation result is used to simulate the dynamic display effect of the virtual fluid model; a second calculation module 1902, used to perform rigid body calculations on a virtual rigid body model using the first calculation result to obtain a second calculation result, wherein the second calculation result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move; a third calculation module 1903, used to perform additional calculations on the virtual fluid model using the second calculation result to obtain a third calculation result, wherein the third calculation result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model; and a processing module 1904, used to generate interactive effects between the virtual fluid model and the virtual rigid body model based on the first calculation result and the third calculation result.

[0137] Optionally, the second solution module 1902 is further configured to: extract velocity field information from the first solution result, wherein the velocity field information is used to determine the flow velocity properties of each particle in the virtual fluid model; and perform rigid body solution on the virtual rigid body model using the velocity field information to obtain the second solution result.

[0138] Optionally, the second solution module 1902 is further configured to: perform rigid body solution on the virtual rigid body model using velocity field information to obtain rotation data and displacement data of the virtual rigid body model, wherein the rotation data is used to simulate the rotational dynamic effect of the virtual rigid body model under the action of velocity field information, and the displacement data is used to simulate the floating dynamic effect of the virtual rigid body model under the action of velocity field information; and determine the second solution result based on the rotation data and displacement data.

[0139] Optionally, the second calculation module 1902 is further configured to: determine the first rotational velocity using velocity field information; generate random numbers using the identification information of the virtual rigid body model; calculate the second rotational velocity using the first rotational velocity and the random numbers; map the second rotational velocity from a first value range to a second value range to obtain a mapping result; and perform spline control on the mapping result to obtain rotational data.

[0140] Optionally, the second solution module 1902 is further configured to: determine the velocity component of the virtual rigid body model in the height direction using velocity field information; obtain the position of the first vertex on the surface to be contacted in the virtual fluid model, wherein the first vertex position is used to determine the vertex position closest to the virtual rigid body model on the surface to be contacted; determine the target vector through the first vertex position, wherein the target vector is the vector between the virtual rigid body model and the first vertex position; and repair the velocity component based on the target vector to obtain displacement data.

[0141] Optionally, the second solution module 1902 is further configured to: smooth the rotation data using a first jitter filter value to obtain a first smoothing result, and smooth the displacement data using a second jitter filter value to obtain a second smoothing result, wherein the first jitter filter value is different from the second jitter filter value; and determine the second solution result based on the first smoothing result and the second smoothing result.

[0142] Optionally, the third solution module 1903 is further configured to: use the second solution result to perform ripple calculation on the virtual fluid model to obtain a third solution result, wherein the third solution result is used to simulate the ripple display effect generated by the virtual rigid body model acting on the virtual fluid model.

[0143] Optionally, the third solution module 1903 is further configured to: extract the bounding box of the virtual rigid body model based on the original plane to obtain the extraction result, wherein the original plane is the contact plane between the virtual fluid model and the virtual rigid body model; obtain the target plane corresponding to the original plane from the extraction result; deform the target plane using the second solution result to obtain the deformation result; and perform ripple solution on the deformation result to obtain the third solution result.

[0144] Optionally, the third solution module 1903 is further configured to: obtain the position of the second vertex in the target plane using the second solution result, wherein the position of the second vertex is used to determine the position of the vertex closest to the virtual rigid body model on the target plane; and deform the target plane with the position of the second vertex as the center to obtain the deformation result.

[0145] Optionally, the aforementioned processing module 1904 is further configured to: generate interactive effects between the virtual fluid model and the virtual rigid body model based on the first solution result, the second solution result, and the third solution result.

[0146] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0147] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.

[0148] Optionally, in this embodiment, the computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0149] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0150] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0151] S1, Perform fluid calculation on the virtual fluid model to obtain the first calculation result, wherein the first calculation result is used to simulate the dynamic display effect of the virtual fluid model;

[0152] S2, using the first solution result, perform rigid body calculation on the virtual rigid body model to obtain the second solution result, wherein the second solution result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move.

[0153] S3, using the second solution result, perform additional solution on the virtual fluid model to obtain the third solution result, wherein the third solution result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model;

[0154] S4, based on the first and third solution results, generates interactive effects between the virtual fluid model and the virtual rigid body model.

[0155] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: extracting velocity field information from a first solution result, wherein the velocity field information is used to determine the flow velocity properties of each particle in the virtual fluid model; and performing rigid body calculation on the virtual rigid body model using the velocity field information to obtain a second solution result.

[0156] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: performing rigid body calculations on the virtual rigid body model using velocity field information to obtain rotational and displacement data of the virtual rigid body model, wherein the rotational data is used to simulate the rotational dynamics of the virtual rigid body model under the action of velocity field information, and the displacement data is used to simulate the floating dynamics of the virtual rigid body model under the action of velocity field information; and determining a second solution result based on the rotational and displacement data.

[0157] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: determining a first rotational speed using velocity field information; generating random numbers using the identification information of a virtual rigid body model; calculating a second rotational speed using the first rotational speed and the random numbers; mapping the second rotational speed from a first value range to a second value range to obtain a mapping result; and performing spline control on the mapping result to obtain rotational data.

[0158] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: determining the velocity component of the virtual rigid body model in the height direction using velocity field information; obtaining the position of a first vertex on the surface to be contacted in the virtual fluid model, wherein the first vertex position is used to determine the vertex position on the surface to be contacted that is closest to the virtual rigid body model; determining a target vector through the first vertex position, wherein the target vector is a vector between the virtual rigid body model and the first vertex position; and repairing the velocity component based on the target vector to obtain displacement data.

[0159] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: smoothing rotational data using a first jitter filter value to obtain a first smoothing result, and smoothing displacement data using a second jitter filter value to obtain a second smoothing result, wherein the first jitter filter value is different from the second jitter filter value; and determining a second solution result based on the first smoothing result and the second smoothing result.

[0160] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: using the second solution result to perform ripple calculation on the virtual fluid model to obtain a third solution result, wherein the third solution result is used to simulate the ripple display effect generated by the virtual rigid body model acting on the virtual fluid model.

[0161] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: extracting the bounding box of the virtual rigid body model based on the original plane to obtain an extraction result, wherein the original plane is the contact plane between the virtual fluid model and the virtual rigid body model; obtaining the target plane corresponding to the original plane from the extraction result; deforming the target plane using the second solution result to obtain a deformation result; and performing ripple calculation on the deformation result to obtain a third solution result.

[0162] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: using the second solution result to obtain the position of a second vertex in the target plane, wherein the position of the second vertex is used to determine the position of the vertex closest to the virtual rigid body model on the target plane; and deforming the target plane with the second vertex position as the center to obtain the deformation result.

[0163] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: generating interactive effects between the virtual fluid model and the virtual rigid body model based on the first solution result, the second solution result, and the third solution result.

[0164] In the computer-readable storage medium of the above embodiments, a technical solution for implementing a virtual model interactive special effects processing method is provided. By performing fluid calculations on a virtual fluid model, a first calculation result is obtained, which is used to simulate the dynamic display effect of the virtual fluid model. Using the first calculation result, a rigid body calculation is performed on a virtual rigid body model, resulting in a second calculation result. This second calculation result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model's motion. Using the second calculation result, additional calculations are performed on the virtual fluid model, resulting in a third calculation result. This third calculation result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model. Furthermore, based on the first and third calculation results, interactive effects between the virtual fluid model and the virtual rigid body model are generated. This achieves the goal of generating corresponding interactive effects based on the dynamic display effect of the virtual fluid model and the additional display effect between the virtual fluid model and the virtual rigid body model. This improves the stability, controllability, and efficiency of the virtual model interactive effect processing, thereby solving the technical problems of poor stability, poor controllability, and low efficiency in the interactive effect processing caused by using parallel calculation-based solvers in related technologies.

[0165] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this application.

[0166] In exemplary embodiments of this application, a computer-readable storage medium stores a program product capable of implementing the methods described above in this embodiment. In some possible implementations, various aspects of the embodiments of this application may also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this embodiment according to various exemplary embodiments of this application.

[0167] The program product for implementing the above-described method according to embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the embodiments of this application is not limited thereto. In the embodiments of this application, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0168] The aforementioned program product may take the form of any combination of one or more computer-readable media. Such computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not exhaustive) of computer-readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0169] It should be noted that the program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0170] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0171] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0172] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0173] S1, Perform fluid calculation on the virtual fluid model to obtain the first calculation result, wherein the first calculation result is used to simulate the dynamic display effect of the virtual fluid model;

[0174] S2, using the first solution result, perform rigid body calculation on the virtual rigid body model to obtain the second solution result, wherein the second solution result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move.

[0175] S3, using the second solution result, perform additional solution on the virtual fluid model to obtain the third solution result, wherein the third solution result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model;

[0176] S4, based on the first and third solution results, generates interactive effects between the virtual fluid model and the virtual rigid body model.

[0177] Optionally, the processor may also be configured to perform the following steps via a computer program: extracting velocity field information from the first solution result, wherein the velocity field information is used to determine the flow velocity properties of each particle in the virtual fluid model; and performing rigid body calculation on the virtual rigid body model using the velocity field information to obtain the second solution result.

[0178] Optionally, the processor may also be configured to perform the following steps via a computer program: perform rigid body calculations on the virtual rigid body model using velocity field information to obtain rotational and displacement data of the virtual rigid body model, wherein the rotational data is used to simulate the rotational dynamics of the virtual rigid body model under the action of velocity field information, and the displacement data is used to simulate the floating dynamics of the virtual rigid body model under the action of velocity field information; and determine a second solution result based on the rotational and displacement data.

[0179] Optionally, the processor may also be configured to perform the following steps via a computer program: determining a first rotational speed using velocity field information; generating random numbers using the identification information of a virtual rigid body model; calculating a second rotational speed using the first rotational speed and the random numbers; mapping the second rotational speed from a first value range to a second value range to obtain a mapping result; and performing spline control on the mapping result to obtain rotational data.

[0180] Optionally, the processor may also be configured to perform the following steps via a computer program: determining the velocity component of the virtual rigid body model in the height direction using velocity field information; obtaining the position of the first vertex on the surface to be contacted in the virtual fluid model, wherein the first vertex position is used to determine the vertex position on the surface to be contacted that is closest to the virtual rigid body model; determining the target vector through the first vertex position, wherein the target vector is the vector between the virtual rigid body model and the first vertex position; and repairing the velocity component based on the target vector to obtain displacement data.

[0181] Optionally, the processor may also be configured to perform the following steps via a computer program: smoothing the rotation data using a first jitter filter value to obtain a first smoothing result, and smoothing the displacement data using a second jitter filter value to obtain a second smoothing result, wherein the first jitter filter value is different from the second jitter filter value; and determining a second solution result based on the first smoothing result and the second smoothing result.

[0182] Optionally, the processor may also be configured to perform the following steps via a computer program: using the second solution result to perform ripple calculation on the virtual fluid model to obtain a third solution result, wherein the third solution result is used to simulate the ripple display effect generated by the virtual rigid body model acting on the virtual fluid model.

[0183] Optionally, the processor may also be configured to perform the following steps via a computer program: extracting the bounding box of the virtual rigid body model based on the original plane to obtain the extraction result, wherein the original plane is the contact plane between the virtual fluid model and the virtual rigid body model; obtaining the target plane corresponding to the original plane from the extraction result; deforming the target plane using the second solution result to obtain the deformation result; and performing ripple solution on the deformation result to obtain the third solution result.

[0184] Optionally, the processor may also be configured to perform the following steps via a computer program: using the second solution result to obtain the position of the second vertex in the target plane, wherein the position of the second vertex is used to determine the position of the vertex closest to the virtual rigid body model on the target plane; and deforming the target plane with the position of the second vertex as the center to obtain the deformation result.

[0185] Optionally, the processor may also be configured to perform the following steps via a computer program: generating interactive effects between the virtual fluid model and the virtual rigid body model based on the first solution result, the second solution result, and the third solution result.

[0186] In the electronic device described above, a technical solution is provided for implementing a virtual model interactive special effects processing method. By performing fluid calculations on a virtual fluid model, a first calculation result is obtained, which is used to simulate the dynamic display effect of the virtual fluid model. Using the first calculation result, a rigid body calculation is performed on a virtual rigid body model, resulting in a second calculation result. This second calculation result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model's motion. Using the second calculation result, additional calculations are performed on the virtual fluid model, resulting in a third calculation result. This third calculation result is used to simulate the additional display effect produced by the virtual rigid body model acting on the virtual fluid model. Furthermore, based on the first and third calculation results, interactive effects between the virtual fluid model and the virtual rigid body model are generated. This achieves the goal of generating corresponding interactive effects based on the dynamic display effect of the virtual fluid model and the additional display effect between the virtual fluid model and the virtual rigid body model. This improves the stability, controllability, and efficiency of the virtual model interactive effect processing, thereby solving the technical problems of poor stability, poor controllability, and low efficiency in the interactive effect processing caused by using parallel calculation-based solvers in related technologies.

[0187] Figure 20 This is a schematic diagram of an electronic device according to one embodiment of this application. Figure 20 As shown, the electronic device 2000 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0188] like Figure 20 As shown, the electronic device 2000 is manifested in the form of a general-purpose computing device. The components of the electronic device 2000 may include, but are not limited to: at least one processor 2010, at least one memory 2020, a bus 2030 connecting different system components (including memory 2020 and processor 2010), and a display 2040.

[0189] The memory 2020 stores program code that can be executed by the processor 2010, causing the processor 2010 to perform the steps described in the method section of the embodiments of this application according to various exemplary implementations of this application.

[0190] The memory 2020 may include a readable medium in the form of volatile memory cells, such as random access memory (RAM) 20201 and / or cache memory 20202, and may further include read-only memory (ROM) 20203, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0191] In some instances, memory 2020 may also include programs / utilities 20204 having a set (at least one) of program modules 20205, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 2020 may further include memory remotely located relative to processor 2010, which can be connected to electronic device 2000 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0192] Bus 2030 can represent one or more of several types of bus structures, including memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processor 2010, or local bus using any of the various bus structures.

[0193] The display 2040 may be, for example, a touch-screen liquid crystal display (LCD) that allows a user to interact with the user interface of the electronic device 2000.

[0194] Optionally, the electronic device 2000 can also communicate with one or more external devices 2100 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 2000, and / or any device that enables the electronic device 2000 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 2050. Furthermore, the electronic device 2000 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via the network adapter 2060. Figure 20 As shown, network adapter 2060 communicates with other modules of electronic device 2000 via bus 2030. It should be understood that, although... Figure 20 As not shown, other hardware and / or software modules may be used in conjunction with the electronic device 2000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, Redundant Arrays of Independent Disks (RAID) systems, tape drives, and data backup storage systems.

[0195] The aforementioned electronic device 2000 may also include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.

[0196] Those skilled in the art will understand that Figure 20 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 2000 may also include components that are more... Figure 20 The more or fewer components shown, or having the same Figure 20 Different configurations are shown. The memory 2020 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the virtual model interaction effects processing method in this embodiment. The processor 2010 executes various functional applications and data processing by running the computer program stored in the memory 2020, thereby realizing the aforementioned virtual model interaction effects processing method.

[0197] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0198] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0199] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0200] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0201] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0202] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0203] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for processing interactive special effects of virtual models, characterized in that, include: Fluid calculations are performed on the virtual fluid model to obtain a first calculation result, wherein the first calculation result is used to simulate the dynamic display effect of the virtual fluid model; Using the first solution result, rigid body calculation is performed on the virtual rigid body model to obtain a second solution result, wherein the second solution result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move; Using the second solution result, ripple calculation is performed on the virtual fluid model to obtain a third solution result, wherein the third solution result is used to simulate the ripple display effect generated by the virtual rigid body model acting on the virtual fluid model; Based on the first solution result and the third solution result, interactive effects between the virtual fluid model and the virtual rigid body model are generated.

2. The virtual model interactive special effects processing method according to claim 1, characterized in that, Using the first solution result, rigid body calculation is performed on the virtual rigid body model to obtain the second solution result, including: Velocity field information is extracted from the first solution result, wherein the velocity field information is used to determine the flow velocity properties of each particle in the virtual fluid model; The virtual rigid body model is solved using the velocity field information to obtain the second solution result.

3. The virtual model interactive special effects processing method according to claim 2, characterized in that, Using the velocity field information to perform rigid body calculations on the virtual rigid body model, the second solution result includes: The virtual rigid body model is solved using the velocity field information to obtain rotation data and displacement data of the virtual rigid body model. The rotation data is used to simulate the rotational dynamic effect of the virtual rigid body model under the action of the velocity field information, and the displacement data is used to simulate the floating dynamic effect of the virtual rigid body model under the action of the velocity field information. The second solution result is determined based on the rotation data and the displacement data.

4. The virtual model interactive special effects processing method according to claim 3, characterized in that, Using the velocity field information to perform rigid body calculations on the virtual rigid body model, the rotation data of the virtual rigid body model obtained includes: The first rotational speed is determined using the velocity field information; Random numbers are generated using the identification information of the virtual rigid body model; The second rotation speed is calculated using the first rotation speed and the random number. The second rotational speed is mapped from the first value range to the second value range to obtain the mapping result; The mapping result is subjected to spline control to obtain the rotation data.

5. The virtual model interactive special effects processing method according to claim 3, characterized in that, Using the velocity field information to perform rigid body calculations on the virtual rigid body model, the displacement data of the virtual rigid body model obtained includes: The velocity field information is used to determine the velocity component of the virtual rigid body model in the height direction; Obtain the position of the first vertex on the surface to be contacted in the virtual fluid model, wherein the first vertex position is used to determine the vertex position on the surface to be contacted that is closest to the virtual rigid body model; The target vector is determined by the position of the first vertex, wherein the target vector is the vector between the virtual rigid body model and the position of the first vertex; The velocity component is repaired based on the target vector to obtain the displacement data.

6. The virtual model interactive special effects processing method according to claim 3, characterized in that, Determining the second solution result based on the rotation data and the displacement data includes: The rotation data is smoothed using a first jitter filter value to obtain a first smoothing result, and the displacement data is smoothed using a second jitter filter value to obtain a second smoothing result, wherein the first jitter filter value is different from the second jitter filter value; The second solution result is determined based on the first smoothing result and the second smoothing result.

7. The virtual model interactive special effects processing method according to claim 1, characterized in that, Using the second solution result, ripple calculation is performed on the virtual fluid model to obtain the third solution result, which includes: The bounding box of the virtual rigid body model is extracted based on the original plane to obtain the extraction result, wherein the original plane is the contact plane between the virtual fluid model and the virtual rigid body model; Obtain the target plane corresponding to the original plane from the extraction results; The target plane is deformed using the second solution result to obtain the deformation result; The deformation result is subjected to ripple calculation to obtain the third calculation result.

8. The virtual model interactive special effects processing method according to claim 7, characterized in that, Using the second solution result, the target plane is deformed to obtain the deformation result, which includes: Using the second solution result, the position of the second vertex in the target plane is obtained, wherein the position of the second vertex is used to determine the position of the vertex on the target plane that is closest to the virtual rigid body model; The target plane is deformed with the second vertex position as the center to obtain the deformation result.

9. The virtual model interactive special effects processing method according to claim 1, characterized in that, Based on the first solution result and the third solution result, the interactive effects generated between the virtual fluid model and the virtual rigid body model include: Based on the first solution result, the second solution result, and the third solution result, interactive effects between the virtual fluid model and the virtual rigid body model are generated.

10. A virtual model interactive special effects processing device, characterized in that, include: The first solution module is used to perform fluid solution on the virtual fluid model to obtain a first solution result, wherein the first solution result is used to simulate the dynamic display effect of the virtual fluid model; The second solution module is used to perform rigid body calculation on the virtual rigid body model using the first solution result to obtain a second solution result, wherein the second solution result is used to simulate the dynamic display effect of the virtual fluid model driving the virtual rigid body model to move. The third solution module is used to perform ripple calculation on the virtual fluid model using the second solution result to obtain a third solution result, wherein the third solution result is used to simulate the ripple display effect generated by the virtual rigid body model acting on the virtual fluid model; The processing module is used to generate interactive effects between the virtual fluid model and the virtual rigid body model based on the first solution result and the third solution result.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the virtual model interaction effect processing method according to any one of claims 1 to 9 when run by a processor.

12. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the virtual model interactive special effects processing method according to any one of claims 1 to 9.