Fluid special effect rendering method and device, electronic equipment and storage medium

By using the color attributes and dynamic flow attributes of fluid effects in Houdini software, the target model is colored and position adjusted, which solves the problem of rigid connection parts in fluid effects rendering, and achieves high authenticity and high efficiency rendering effects.

CN119648867APending Publication Date: 2025-03-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411261842.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

When rendering fluid special effects in the prior art, the fluid and the model are connected to the hard part, the authenticity is poor, and the rendering efficiency is low.

Method used

In Houdini software, the target model is colored and adjusted according to the color attributes and dynamic flow attributes of the target fluid to generate target color and position information, thereby realizing the rendering of fluid special effects.

Benefits of technology

It improves the authenticity and rendering efficiency of the fluid rendering effect, avoids resource consumption caused by fluid solution, and simplifies the animation production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648867A_ABST
    Figure CN119648867A_ABST
Patent Text Reader

Abstract

The invention provides a fluid special effect rendering method and device, electronic equipment and a storage medium, and relates to the technical field of animation rendering. Comprising the following steps: coloring a target model according to a color attribute of a target fluid, and determining initial color information of each vertex in the target model; according to the initial color information of the vertexes in the target area of the target model, adjusting the initial color information of the vertexes in the connection area of the target model, and generating target color information of the vertexes in the target model; determining target position information of each vertex in the target model under each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information; and rendering and displaying the target model and the target fluid special effect in the target model according to the target color information of each vertex in the target model and the target position information of each vertex under each time frame. The swing attribute of the fluid is controlled through the self-defined attribute based on Houdini, and the authenticity of the fluid rendering effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of animation rendering technology, and in particular to a fluid special effects rendering method, device, electronic device and storage medium. Background Art

[0002] Rendering fluid effects is of great significance in film and television production, game development, animation production, virtual reality and augmented reality. These effects not only enhance the visual expression, but also have a profound impact on the audience's emotional experience. For example: fire effects or water effects.

[0003] Currently, when rendering fluid effects that interact with characters or models, the model is often used directly as the emission source for fluid solution simulation.

[0004] However, the fluid special effects rendered in the above manner have a rather stiff connection between the fluid and the model and lack of authenticity. Summary of the invention

[0005] The purpose of the present application is to provide a fluid special effects rendering method, device, electronic device and storage medium, so as to improve the authenticity and rendering efficiency of the fluid rendering effect.

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

[0007] In a first aspect, an embodiment of the present application provides a fluid special effects rendering method, comprising:

[0008] According to the color attribute of the target fluid, the target model is colored to determine the initial color information of each vertex in the target model;

[0009] According to the initial color information of the vertices in the target area of ​​the target model, the initial color information of each vertex in the connection area of ​​the target model is adjusted to generate the target color information of each vertex in the target model; the connection area is used to represent the intersection area between the deformation area and the non-deformation area in the target model;

[0010] Determining target position information of each vertex in the target model at each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information;

[0011] The target model and the target fluid special effects in the target model are rendered and displayed according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame.

[0012] In a second aspect, an embodiment of the present application further provides a fluid special effect rendering device, including: a determination module, a generation module and a rendering module;

[0013] The determination module is used to perform coloring processing on the target model according to the color attribute of the target fluid, and determine the initial color information of each vertex in the target model;

[0014] The generating module is used to adjust the initial color information of each vertex in the connecting area of ​​the target model according to the initial color information of the vertices in the target area of ​​the target model, so as to generate the target color information of each vertex in the target model; the connecting area is used to represent the intersection area between the deformation area and the non-deformation area in the target model;

[0015] The determination module is used to determine the target position information of each vertex in the target model in each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information;

[0016] The rendering module is used to render and display the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame.

[0017] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the fluid special effects rendering method provided in the first aspect.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the fluid special effects rendering method provided in the first aspect is executed.

[0019] The beneficial effects of this application are:

[0020] The present application provides a method, device, electronic device and storage medium for rendering fluid special effects, including: coloring a target model according to the color attribute of the target fluid, determining the initial color information of each vertex in the target model; adjusting the initial color information of each vertex in the connection area of ​​the target model according to the initial color information of the vertex in the target area of ​​the target model, and generating the target color information of each vertex in the target model; the connection area is used to characterize the intersection area between the deformation area and the non-deformation area in the target model; determining the target position information of each vertex in the target model under each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information; rendering and displaying the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex under each time frame. This scheme is based on Houdini software, and determines the color information and position information of each vertex in the model interacting with the fluid through the color attribute and dynamic flow attribute of the fluid special effect, thereby realizing the rendering of the fluid special effects interacting with the model. Among them, by transferring the color through the vertex color of the target area in the target model, the color of the connection part between the model and the fluid special effect can be adjusted to improve the problem of the stiff effect of the connection part. And based on Houdini, the swing properties of the fluid are controlled through custom attributes, which can avoid the operation of binding skeleton K animation required for conventional animation. It has good controllability and modification flexibility, and can effectively avoid resource consumption caused by fluid solving.

[0021] In addition, real-time rendering can be achieved by correcting the texture details of models and fluid effects and adding additional special effects in UE5. Compared with the existing rendering method, the modification of texture details is more convenient and flexible, and the addition of additional special effects is more convenient, which enriches the final display effect of special effects and improves production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 1 A flow chart of a fluid special effects rendering method provided in an embodiment of the present application;

[0024] Figure 2 A schematic diagram of a target model provided in an embodiment of the present application;

[0025] Figure 3 A schematic diagram of a flow chart of another fluid special effects rendering method provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of a flow chart of another fluid special effects rendering method provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of another target model provided in an embodiment of the present application;

[0028] Figure 6 A schematic diagram of a flow chart of another fluid special effects rendering method provided in an embodiment of the present application;

[0029] Figure 7 A schematic diagram of another target model provided in an embodiment of the present application;

[0030] Figure 8 A schematic diagram of a flow chart of another fluid special effects rendering method provided in an embodiment of the present application;

[0031] Fig. 9 A schematic diagram of a flow chart of another fluid special effects rendering method provided in an embodiment of the present application;

[0032] Fig.10 A schematic diagram of a flow chart of another fluid special effects rendering method provided in an embodiment of the present application;

[0033] Fig.11 A schematic diagram of a flow chart of another fluid special effects rendering method provided in an embodiment of the present application;

[0034] Fig.12 A schematic diagram of another target model provided in an embodiment of the present application;

[0035] Fig.13 A schematic diagram of another target model provided in an embodiment of the present application;

[0036] Fig.14 A schematic diagram of a fluid special effects rendering device provided in an embodiment of the present application;

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

[0038] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0039] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0040] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0041] Creating fluid effects that interact with characters has far-reaching significance in multimedia applications, especially in games, animation, virtual reality (VR), and movies. These effects not only enhance visual expression, but also deepen the level of interaction between characters and the environment, and enhance the audience's sense of immersion and emotional resonance.

[0042] The significance of making fluid effects that interact with characters is mainly reflected in the following points:

[0043] Enhance visual impact: Fluid effects, such as fire, water, rain, fog, smoke, etc., can produce strong visual impact due to their dynamic and unpredictable characteristics. When these fluids interact with the characters, such as flames flashing on the character's hair, the character swimming in the water, the rain soaking the character, the character being shrouded in smoke, etc., they will add a sense of vividness and reality to the scene, greatly enhancing the visual appeal.

[0044] Rich environmental interaction: Fluid effects make the interaction between characters and the environment more colorful. For example, in the game, characters can jump into the water to explore, or feel the impact of raindrops and changes in humidity when running in the rain. These interactions not only increase the fun and challenge of the game, but also make the environment more three-dimensional and explorable.

[0045] Enhance the emotional expression of characters: Fluid effects can be used as a medium for expressing the emotions of characters. For example, tears can show the sadness and helplessness of a character, while sweat reflects the character's efforts and tension. These fluid effects, combined with the character's facial expressions and movements, can more vividly convey the character's emotional state and deepen the audience's understanding and resonance with the character.

[0046] Improve physical realism: High-quality fluid special effects simulation can enhance the physical realism of the scene. Through complex physics engines and algorithms, physical phenomena such as fluid flow, collision, reflection and refraction can be simulated, making the interaction between fluid and characters look more natural and realistic. This sense of reality not only enhances the audience's immersion, but also increases the credibility of games or animations.

[0047] Promoting technological innovation and development: Creating fluid effects that interact with characters requires continuous technological innovation and optimization. With the development of computer graphics technology, physical simulation technology, and artificial intelligence technology, the simulation of fluid effects is becoming more and more sophisticated and realistic. This technological innovation not only promotes the development of multimedia applications, but also provides valuable experience and data support for research in related fields.

[0048] At present, in the traditional method of making fluid special effects that interact with characters or objects, the fluid solution simulation is often carried out directly using the character or object as the source. However, when the character itself has hair or deformation and distortion, the connection between the produced fluid special effects and the character will be relatively stiff. In addition, the conventional fluid solution form can only be visualized through background rendering, which consumes a lot of production and has relatively low production efficiency.

[0049] Based on this, this solution provides a fluid special effects rendering method, which is based on Houdini (3D computer graphics software) software. Through the color attributes and dynamic flow attributes of the fluid special effects, the color information and position information of each vertex in the model that interacts with the fluid are determined, thereby realizing the rendering of the fluid special effects that interact with the model. Among them, through the color transfer method, the color of the connection part between the model and the fluid special effects can be adjusted to improve the problem of the stiff effect of the connection part. And the rendering method based on Houdini can effectively avoid the resource consumption caused by fluid solution. In addition, the initial model and fluid special effects obtained by Houdini simulation are imported into UE5 (game engine), and based on the real-time preview feature of UE5, the model and fluid special effects can be intuitively modified and the effect can be viewed in UE5, thereby improving production efficiency.

[0050] Figure 1 The flowchart of a fluid special effects rendering method provided in the embodiment of the present application is shown below; the execution subject of the method may be a computer device. Figure 1 As shown, the method may include:

[0051] S101. According to the color attribute of the target fluid, a target model is colored to determine the initial color information of each vertex in the target model.

[0052] It should be noted that this method focuses on the design and production stages of models and special effects. Through this method, fluid special effects that have interactive characteristics with the model can be rendered and produced, and the problems of stiff connections and low production efficiency existing in the existing fluid special effects production process can be solved.

[0053] Of course, during the game, you can also load pre-made models and related data packages of fluid effects to display models and fluid effects in the game scene.

[0054] In this scheme, the target fluid is flame to illustrate the relevant method. In actual applications, the target fluid can also be water, smoke and other fluids with dynamic properties.

[0055] Optionally, the production of fluid special effects can be realized based on Houidni software. The pre-created target model can be imported into Houidni, and the following steps can be performed in Houidni.

[0056] Optionally, the color attribute of the target fluid may refer to the color characteristics of the target fluid itself, for example, the color attribute of flame may be fiery red, the color attribute of water may be transparent or light blue, etc. The color attribute of the target fluid may be pre-created or configured by the developer and stored in the database, and may be directly read from the database when used.

[0057] According to the color attribute of the target fluid, the target model may be firstly subjected to overall coloring processing so that the target model has the color texture of the target fluid.

[0058] Figure 2 A schematic diagram of a target model provided in an embodiment of the present application, the target model may be a character or other object. Figure 2 As shown in the figure, the initially created target model does not have a color attribute, that is, the default model is transparent, white, or Figure 2 A grayscale image with a certain grayscale value in the image can be used to color the target model according to the color attributes of the special effect to be rendered when performing special effects rendering later, so that the target model can have the color texture related to the special effect to be rendered.

[0059] Since a model is usually composed of multiple vertices, the initial color information of each vertex in the target model can be determined by coloring the target model.

[0060] S102, adjusting the initial color information of each vertex in the connection area of ​​the target model according to the initial color information of the vertices in the target area of ​​the target model to generate target color information of each vertex in the target model; the connection area is used to represent the intersection area between the deformation area and the non-deformation area in the target model.

[0061] In some embodiments, the initial color information of the vertices in the target area of ​​the target model may be used to adjust the initial color information of the vertices in the connection area of ​​the target model, so as to overcome the problem that the texture details in the connection area are too rigid.

[0062] Optionally, the target area of ​​the target model may be an area of ​​the target model where the fluid effects have more details. For example, if a flame effect needs to be rendered in a character model with hair, the flame effect usually interacts with the hair of the character model to generate a flame effect that swings naturally with the swing of the hair. The flame on the top of the head has more details, so the target area of ​​the target model may be the top of the character's head.

[0063] The color of the connecting part is adjusted using the color of the area with more fluid special effect details, so that the color adjustment effect of the connecting part will be more realistic and natural.

[0064] It should be noted that the connection area can refer to the intersection area between the deformation area and the non-deformation area in the target model. For example, in a character model with hair, the hair belongs to the deformation area and the character's body belongs to the non-deformation area. Then, the intersection of the hair and the body can be used as the connection area.

[0065] In some embodiments, when the target model does not have a deformation area, the intersection area between the part of the model that is to be burned and the part that is not to be burned can also be used as the connection area. For example, if the left half of the model is the part that is to produce a flame burning effect, and the right half of the model is the part that does not need to produce a flame burning effect, then the intersection area of ​​the left half and the right half can be used as the connection area.

[0066] S103, determining target position information of each vertex in the target model in each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information.

[0067] Optionally, since fluid special effects usually have dynamic swing properties, in order to simulate real fluid special effects, it is necessary to generate a swing dynamic change effect according to the swing property of the fluid to simulate the dynamic effect of the fluid.

[0068] Usually, the fluid swing effect will vary depending on the position of the vertices in the model. For example, when creating a flame effect in the character model's hair, the swing amplitude of the flame will gradually increase from the scalp to the top of the head. That is, the closer to the scalp, the smaller the swing of the flame, and the closer to the top of the head, the larger the swing of the flame. This is also related to the swinging properties of the hair itself.

[0069] Accordingly, the dynamic disturbance swing of each vertex in the target model can be controlled according to the position information of each vertex in the target model and the generated fluid swing attribute information, thereby determining the target position information of each vertex in the target model in each time frame.

[0070] It is worth noting that since the fluid special effects only interact with part of the target model, for example, the flame special effects are generated by the hair area in the target model, the body area of ​​the target model will not produce disruptive swinging effects, only the hair area will produce swinging effects. Therefore, when determining the target position information of each vertex in the target model in each time frame based on the position information of each vertex in the target model and the generated fluid swing attribute information, the vertices here may only include the vertices in the hair area of ​​the target model, and the vertices in the body area may not participate in the calculation.

[0071] Of course, in some cases, when the fluid effects to be rendered are related to the entire target model, the vertices here may include all the vertices in the target model.

[0072] S104 , rendering and displaying the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame.

[0073] Optionally, the target model can be rendered and displayed based on the target color information of each vertex in the target model obtained as described above, and the target fluid special effects in the target model can be rendered and displayed based on the target position information of each vertex in the target model at each time frame, thereby completing the final animation special effects, that is, interactively displaying the target fluid special effects in the target model, for example: displaying a flame effect on the head of the character model that sways with the swaying hair.

[0074] In summary, the fluid special effects rendering method provided in this embodiment includes: coloring the target model according to the color attributes of the target fluid, determining the initial color information of each vertex in the target model; adjusting the initial color information of each vertex in the connection area of ​​the target model according to the initial color information of the vertices in the target area of ​​the target model, and generating the target color information of each vertex in the target model; the connection area is used to characterize the intersection area between the deformation area and the non-deformation area in the target model; determining the target position information of each vertex in the target model under each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information; rendering and displaying the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame. This solution is based on Houdini software, and determines the color information and position information of each vertex in the model that interacts with the fluid through the color attributes and dynamic flow attributes of the fluid special effects, thereby realizing the rendering of the fluid special effects that interact with the model. Among them, by transferring the color through the vertex color of the target area in the target model, the color of the connection part between the model and the fluid special effects can be adjusted to improve the problem of the stiff effect of the connection part. And the Houdini-based rendering method can effectively avoid the resource consumption caused by fluid solving.

[0075] Figure 3 A flow chart of another method for rendering fluid special effects provided by an embodiment of the present application; Optionally, in step S101, coloring the target model according to the color attribute of the target fluid to determine the initial color information of each vertex in the target model may include:

[0076] S201, dividing the target model into regions to determine the deformation region and the non-deformation region in the target model.

[0077] First of all, after importing the target model into Houidni software, you can first divide the target model into regions, that is, group the target model to group the deformation area and non-deformation area in the target model, or group the part of the target model that needs to render fluid dynamic effects with the part that does not need to render fluid dynamic effects.

[0078] For example, for a character model with hair, the head hair and body parts of the model need to be grouped, with the head hair part as the deformation area and the body part as the non-deformation area. This is because the deformation area will change with the dynamic changes of the fluid special effects, and the dynamic attribute information of each vertex in the deformation area needs to be calculated, while the non-deformation area will not change with the dynamic changes of the fluid special effects, and only the color attribute information can be calculated.

[0079] S202 , obtaining basic color information of each vertex in the deformation area and basic color information of each vertex in the non-deformation area according to the color map of the target model.

[0080] When the target model is created, a color map of the target model may be generated at the same time. The color map stores basic color information of each vertex in the target model. The basic color information here may be a default color, such as transparent color or white.

[0081] By reading the color map of the target model, the basic color information of each vertex in the deformation area and the basic color information of each vertex in the non-deformation area can be obtained respectively.

[0082] S203 . According to the color attribute of the target fluid, adjust the basic color information of each vertex in the non-deformed area to obtain the initial color information of each vertex in the non-deformed area.

[0083] Then, according to the color attribute of the target fluid, the basic color information of each vertex in the non-deformed area can be obtained to obtain the initial color information of each vertex in the non-deformed area.

[0084] S204 , adjusting basic color information of each vertex in the deformation region according to the color attribute of the target fluid and the preset color noise, to obtain initial color information of each vertex in the deformation region.

[0085] Similarly, according to the color attribute of the target fluid, the basic color information of each vertex in the deformation area can be obtained to obtain the initial color information of each vertex in the deformation area.

[0086] It is worth noting that the coloring method of the deformed area and the non-deformed area is the same, but the deformed area will add more texture details through random noise because of the disturbance effect of the fluid special effect. For example: add random color information to each vertex in the top area of ​​the hair to increase the color texture details of the top of the hair.

[0087] Figure 4A flow chart of another method for rendering fluid special effects provided by an embodiment of the present application; optionally, in step S102, adjusting the initial color information of each vertex in the connection area of ​​the target model according to the initial color information of the vertex in the target area of ​​the target model to generate the target color information of each vertex in the target model may include:

[0088] S301, performing color transfer according to the initial color information of the target vertex in the deformation area, adjusting the initial color information of each vertex in the connection area to be consistent with the initial color information of the target vertex, and obtaining the target color information of each vertex in the connection area.

[0089] In one feasible manner, since the fluid special effect details in the deformation area are more, the color of the connection area can be adjusted by transferring the color of the deformation area.

[0090] Optionally, the color average value may be calculated based on the initial color information of all vertices in the deformation area, and the calculation result may be transferred to the connection area as the target color.

[0091] Alternatively, color transfer may be performed directly according to the initial color information of the target vertex in the deformation region. The target vertex here may be a vertex with more detailed textures selected from the deformation region, for example, the top of the hair may have more fluid detailed textures than the scalp.

[0092] By transferring colors, more details of the joints can be retained for transition.

[0093] Optionally, we can use the attribtransfer node that comes with the Houdini system to add the attributes we want to transfer and the scope of influence of the transfer (for example, we can transfer color / transparency / and other point attributes. The scope of influence is set relatively small here, and we just need to handle the connection well).

[0094] The attribTransfer node is able to measure the distances between points or faces between two selections and transfer attributes from one selection to another based on those distances. This makes it a powerful tool for handling complex attribute blending and gradient effects.

[0095] S302: Generate target color information of each vertex in the target model according to the initial color information of each vertex in the deformation area, the target color information of each vertex in the connection area, and the initial color information of each vertex in the non-deformation area.

[0096] Optionally, based on the above adjustment, the target color information of each vertex in the connection area can be obtained, combined with the initial color information of each vertex in the deformation area and the initial color information of each vertex in the non-deformation area, the target color information of each vertex in the target model can be jointly constituted.

[0097] Figure 5 A schematic diagram of another target model provided in an embodiment of the present application. Figure 5 As shown in (a) in FIG. 3 , after the target model is colored, the connection area in the target model is relatively stiff. By transferring the color of the vertices in the target area to process the connection area, the following can be obtained: Figure 5 The effect shown in (b) is obvious. Figure 5 In (b), the transition in the connecting area is softer and more natural.

[0098] It is worth noting that the vertices in the connection area may overlap with the vertices in the deformation area and the non-deformation area, and the vertices in the connection area can be deleted from the deformation area and the non-deformation area respectively.

[0099] Optionally, in step S103, the target position information of each vertex in the target model at each time frame is determined based on the position information of each vertex in the target model and the generated fluid swing attribute information, which may include: determining the target position information of each vertex in the deformation area at each time frame based on the position information of each vertex in the deformation area and the generated fluid swing attribute information.

[0100] Since the dynamic changes of fluid special effects are related to the changes of vertices in the deformation area, but have nothing to do with the vertices in the non-deformation area, for example, when rendering a burning flame on hair, the swaying state of the flame is related to the fluttering state of the hair, but has nothing to do with the body of the model, which is stationary. Therefore, the target position information of each vertex in the deformation area at each time frame can be determined based on the position information of each vertex in the deformation area and the fluid swaying attribute information.

[0101] The target position information of each vertex in the deformation area in each time frame determines the disturbed swing posture of the deformation area. By rendering according to the target position information of each vertex in the deformation area in each time frame, a dynamic swing effect of the deformation area can be generated.

[0102] Figure 6 A flow chart of another method for rendering fluid special effects provided in an embodiment of the present application; Optionally, in the above steps, determining the target position information of each vertex in the deformation area at each time frame according to the position information of each vertex in the deformation area and the generated fluid swing attribute information may include:

[0103] S401, generating position attribute information of each vertex in the deformation region according to position information of each vertex in the deformation region and a preset data variation range; the position attribute information is used to characterize the swing amplitude of the vertex.

[0104] Optionally, the deformation area can be given a fluid disturbance dynamic effect simulation, and the range of the dynamic disturbance can be controlled by VEX.

[0105] A virtual bounding box can be created according to the position and size of the target model. Here, the bounding box can be generated only for the deformation area of ​​the target model, and then the position data of the bounding box in the vertical direction can be calculated. Optionally, a data change from 0 to 1 can be generated from the bottom to the top of the bounding box, so that each vertex in the deformation area will generate a corresponding value between 0 and 1, and the corresponding value of each vertex is used as the position attribute information of each vertex in the deformation area.

[0106] The disturbance represented by the value from 0 to 1 gradually increases, so according to the position attribute information of each vertex, the fluid disturbance is small at the bottom of the hair, and the disturbance increases toward the top, which is more in line with the real fluid swing effect.

[0107] S402: Perform function operation according to the created standard position matrix to generate first fluid swing attribute information and second fluid swing attribute information.

[0108] The first fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area at each time frame in a random swing scenario; the second fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area at each time frame in a directional swing scenario.

[0109] Next, a standard position matrix can be created and operated on by the Sin function to produce an effect in which the position fluctuates over time.

[0110] By changing the parameters in the Sin function, the oscillation frequency and amplitude can be changed, thereby generating the first fluid oscillation attribute information and the second fluid oscillation attribute information, respectively. That is, the calculation method of the first fluid oscillation attribute information and the second fluid oscillation attribute information is the same, the difference is that the parameters in the Sin function are different, so the oscillation effects generated are different.

[0111] Optionally, the first fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area at each time frame in a random swing scene. In other words, the fluid swing special effect indicated by the first fluid swing attribute information is relatively random and can swing in any direction. The second fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area at each time frame in a directional swing scene. The fluid swing special effect indicated by the second fluid swing attribute information is more fixed than the fluid swing special effect indicated by the first fluid swing attribute information. For example, the fluid swing special effect indicated by the second fluid swing attribute information only swings left and right, and lacks swinging around the front and back.

[0112] S403: Determine first position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the first fluid swing attribute information.

[0113] Optionally, by multiplying the position attribute information of each vertex in the deformation region with the first fluid swing attribute information, the first position information of each vertex in the deformation region at each time frame can be determined. Because the position attribute information has a transition change from 0 to 1, the effect of no swing at the bottom of the hair and gradually increasing swing from the bottom of the hair to the top of the hair can be simulated according to the first position information of each vertex in the deformation region at each time frame, and the swing is an irregular random swing.

[0114] S404: Determine second position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the second fluid swing attribute information.

[0115] By multiplying the position attribute information of each vertex in the deformation area with the second fluid swing attribute information, the second position information of each vertex in the deformation area in each time frame can be determined. Therefore, according to the second position information of each vertex in the deformation area in each time frame, the effect of gradually increasing swing from the bottom to the top of the hair can also be simulated. The only difference is that the swing here can have a regular swinging pattern, for example: simulating the regular swinging of the fluid in the left and right directions when there is wind blowing left and right.

[0116] S405 , determining target position information of each vertex in the deformation region in each time frame according to the first position information of each vertex in the deformation region in each time frame and the second position information of each vertex in the deformation region in each time frame.

[0117] Optionally, by superimposing the first position information of each vertex in the deformation region in each time frame with the second position information of each vertex in the deformation region in each time frame, the target position information of each vertex in the deformation region in each time frame can be determined. Thus, according to the target position information of each vertex in the deformation region in each time frame, the simulation of the fluid dynamic effect under random swing and regular swing can be realized.

[0118] Figure 7 A schematic diagram of another target model provided in an embodiment of the present application, based on Figure 5 The target model obtained by (b) in step S401-S405 is subjected to a dynamic effect simulation of flame disturbance on the top of the target model, and the range of the dynamic disturbance is controlled, so that the disturbance at the top of the flame is large and the disturbance at the bottom gradually decreases, thereby generating a random swinging effect of the hair. Furthermore, on the basis of the random swinging effect, the simulated regular swinging effect is combined to achieve a swinging effect with a certain swinging regularity under the premise of random swinging of the hair, thereby obtaining the following result: Figure 7 The target model shown demonstrates the effect.

[0119] Figure 8 A flow chart of another method for rendering fluid special effects provided in an embodiment of the present application; Optionally, in step S402, a function operation is performed according to the created standard position matrix to generate the first fluid swing attribute information, which may include:

[0120] S501. According to the preset swing frequency and swing width, a sine function is used to calculate the position swing coefficient in each time frame.

[0121] Optionally, the fluid swing property information can be calculated using the following formula:

[0122] Sin($FF*t)*A

[0123] Among them, $FF represents time, $FF*t represents the oscillation frequency, and A represents the amplitude.

[0124] By adjusting the parameters t and A, the swing frequency and swing amplitude can be changed.

[0125] S502: Calculate and generate first fluid swing attribute information according to the position swing coefficient in each time frame and the standard position matrix.

[0126] In some embodiments, t can be taken as 10 and A as 2, so that the first fluid swing property information can be calculated according to Sin($FF*10)*2.

[0127] By taking t as 5 and A as 20, the second fluid swing property information is calculated according to Sin($FF*5)*20.

[0128] The oscillation frequency indicated by $FF*10 will be faster, and the oscillation frequency indicated by $FF*5 will be slightly slower. Together, the details will be higher, which can prevent the fluid from maintaining an oscillation frequency.

[0129] Optionally, in step S103, before determining the target position information of each vertex in the target model in each time frame based on the position information of each vertex in the target model and the generated fluid swing property information, it may also include: adjusting the initial position information of each vertex at the specified position in the deformation area based on the position information of each vertex at the specified position and preset random displacement information, so as to generate the position information of each vertex at the specified position.

[0130] In some embodiments, before simulating the disturbing dynamic effect of the fluid based on the position attribute information and the fluid swing attribute information, random noise can be added to the vertices at the specified position in the deformation area so that the specified position can generate random disturbances and the specified position is no longer stiff.

[0131] The designated position may refer to the top of the head where the hair is located. By adding random position noise to the top of the head, the initial position information of each vertex at the top of the head may be changed, so that the hair on the top of the head may have an effect of running upwards and the top of the head no longer becomes stiff.

[0132] Fig. 9 A flow chart of another method for rendering fluid special effects provided in an embodiment of the present application; optionally, in step S104, rendering and displaying the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame may include:

[0133] S601, importing target color information of each vertex in the target model and target position information of each vertex in each time frame into a preset game engine.

[0134] In this embodiment, the target color information of each vertex in the target model calculated based on Houdini and the target position information of each vertex in each time frame can be imported into a preset game engine, which can be a UE5 engine, so that the model and fluid special effects can be rendered, corrected and displayed in real time in UE5.

[0135] S602, a preset game engine renders and displays a target model and a target fluid effect in the target model according to color information of each vertex in the target model, target position information of each vertex in each time frame, and two-dimensional texture coordinate information of the target model.

[0136] Optionally, in UE5, the model and fluid effects may be adjusted based on the UV (two-dimensional texture coordinate information) of the target model according to the color information of each vertex in the target model and the target position information of each vertex in each time frame.

[0137] The UVs of the model are used to determine the exact position of each vertex on the model surface in the texture image. In this way, when the texture image is applied to the model, it can be ensured that the texture is mapped to the corresponding area of ​​the model surface in the expected way.

[0138] The UV of the target model can be pre-created when making the model. If it is not created in the early stage, you can also use the UV Texture node in Houdini to perform an automatic UV unfolding operation.

[0139] Fig.10 A flow chart of another method for rendering fluid special effects provided in an embodiment of the present application; optionally, in step S602, rendering and displaying the target model and the target fluid special effects in the target model according to the color information of each vertex in the target model, the target position information of each vertex in each time frame, and the two-dimensional texture coordinate information of the target model may include:

[0140] S701, a preset game engine renders and displays an initial target model according to initial color information of each vertex in the deformation area, target color information of each vertex in the connection area, and initial color information of each vertex in the non-deformation area.

[0141] Based on the initial color information of each vertex in the deformation area of ​​the imported target model, the target color information of each vertex in the connection area, and the initial color information of each vertex in the non-deformation area, the initial target model can be rendered and displayed. The initial target model has not yet been added with fluid special effects.

[0142] S702. A preset game engine determines texture coordinate information of vertices to be adjusted in an initial target model based on the two-dimensional texture coordinate information of the target model, and adjusts at least one attribute parameter of the vertices to be adjusted in the initial target model based on the texture coordinate information of the vertices to be adjusted, and displays the target model.

[0143] Optionally, related adjustable parameters such as color and brightness may be defined in the material system of UE5, so that the detail texture of some vertices in the initial target model may be adjusted to enrich the texture details.

[0144] Optionally, based on the UV of the target model, the texture coordinate information of the vertices in the initial target model that need to have texture attributes adjusted can be determined, so that based on the texture coordinate information, at least one attribute parameter of the vertices that need to be adjusted in the texture map can be adjusted, including but not limited to adjustments to various texture details such as color, brightness, normals, etc.

[0145] Based on the adjusted texture map information, the target model can be rendered and displayed.

[0146] S703: The preset game engine renders and displays the target fluid special effects in the target model according to the target position information of each vertex in the deformation area in each time frame.

[0147] Then, according to the target position information of each vertex in the deformation area at each time frame, the target fluid special effects that change dynamically over time can be rendered and displayed in real time, thereby showing the target fluid special effects in the target model.

[0148] Fig.11 A flow chart of another method for rendering fluid special effects provided in an embodiment of the present application; optionally, in step S703, after rendering and displaying the target fluid special effects in the target model, the method further includes:

[0149] S801. Determine a particle emission source according to position information of a specified vertex in a target model.

[0150] The fluid effects rendered above are related to the model vertices. The display position of the fluid effects interacts with the deformation area of ​​the model, and the fluid effects are displayed based on the model.

[0151] In this embodiment, some additional special effects may be added without the model, for example, adding flame debris, enriching the flame effect, etc.

[0152] Optionally, based on UE5's Niagara fluid system, you can use the target model as the emission source to emit flames. According to the flame effect we need to produce, adjust the physical properties of the flame such as size / temperature / dissipation / color / buoyancy, and then add sparks, debris and particles to match the flame body to enrich the details.

[0153] Optionally, the particle emission source can be determined based on the position information of the specified vertices in the target model. The specified vertices here can be determined according to the positions of the debris to be added. When the debris needs to be added around the model, the specified vertices can be the vertices on the outer contour of the model. When the debris needs to be added to the head of the model, the specified vertices can be the vertices on the outer contour of the model head.

[0154] S802: Determine at least one physical property parameter of each additional special effect according to a display effect of at least one additional special effect to be rendered.

[0155] At least one physical property parameter may be determined according to the display effect of the additional special effect to be added. Taking the added additional special effect as flame debris as an example, the at least one physical property parameter may include but is not limited to: flame size, color, buoyancy, etc.

[0156] S803. According to at least one physical property parameter of each additional special effect, particles are emitted from a particle emission source, and each additional special effect is superimposed, rendered and displayed in a target model.

[0157] Optionally, based on at least one physical property parameter of the determined additional special effect, particles are emitted from the determined particle emission source, and the additional special effect can be generated. Since the emission source of the additional special effect is determined by the vertex position of the model, the additional special effect has a certain positional relationship with the model, thereby enriching the texture details of the target fluid special effect.

[0158] Fig.12 A schematic diagram of another target model provided in an embodiment of the present application, which can be generated by the above method as follows Fig.12 Of course, you can also add flame effects.

[0159] Fig.13 A schematic diagram of another target model provided in an embodiment of the present application. By adding flame debris effect and flame effect to the target model, a target model such as Fig.13 The fluid fire effect shown in .

[0160] In summary, the fluid special effects rendering method provided in this embodiment includes: coloring the target model according to the color attribute of the target fluid, determining the initial color information of each vertex in the target model; adjusting the initial color information of each vertex in the connection area of ​​the target model according to the initial color information of the vertex in the target area of ​​the target model, and generating the target color information of each vertex in the target model; the connection area is used to characterize the intersection area between the deformation area and the non-deformation area in the target model; according to the position information of each vertex in the target model and the generated fluid swing attribute information, determining the target position information of each vertex in the target model under each time frame; according to the target color information of each vertex in the target model and the target position information of each vertex under each time frame, rendering and displaying the target model and the target fluid special effects in the target model. This solution is based on Houdini software, and determines the color information and position information of each vertex in the model that interacts with the fluid through the color attributes and dynamic flow attributes of the fluid special effects, thereby realizing the rendering of the fluid special effects that interact with the model. Among them, through the vertex color of the target area in the target model, color transfer is performed, and the color of the connection part between the model and the fluid special effects can be adjusted to improve the problem of the stiff effect of the connection part. And based on Houdini, the swing properties of the fluid are controlled through custom attributes, which can avoid the operation of binding skeleton K animation required for conventional animation. It has good controllability and modification flexibility, and can effectively avoid resource consumption caused by fluid solving.

[0161] In addition, real-time rendering can be achieved by correcting the texture details of models and fluid effects and adding additional special effects in UE5. Compared with the existing rendering method, the modification of texture details is more convenient and flexible, and the addition of additional special effects is more convenient, which enriches the final display effect of special effects and improves production efficiency.

[0162] The following describes the apparatus, device, storage medium, etc. used to execute the fluid special effects rendering method provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.

[0163] Fig.14 A schematic diagram of a fluid special effects rendering device provided in an embodiment of the present application, the functions implemented by the fluid special effects rendering device correspond to the steps performed by the above method. The device can be understood as the above-mentioned computer device or server, or the processor of the server, or can also be understood as a component independent of the above-mentioned server or processor that implements the functions of the present application under the control of the server, such as Fig.14 As shown, the device may include: a determination module 910, a generation module 920 and a rendering module 930;

[0164] A determination module 910 is used to perform coloring processing on the target model according to the color attribute of the target fluid, and determine the initial color information of each vertex in the target model;

[0165] A generating module 920 is used to adjust the initial color information of each vertex in the connecting area of ​​the target model according to the initial color information of the vertices in the target area of ​​the target model, so as to generate the target color information of each vertex in the target model; the connecting area is used to represent the intersection area between the deformed area and the non-deformed area in the target model;

[0166] A determination module 910, for determining target position information of each vertex in the target model at each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information;

[0167] The rendering module 930 is used to render and display the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame.

[0168] Optionally, the determination module 910 is specifically used to divide the target model into regions and determine the deformation region and the non-deformation region in the target model;

[0169] According to the color map of the target model, basic color information of each vertex in the deformation area and basic color information of each vertex in the non-deformation area are obtained;

[0170] According to the color attribute of the target fluid, the basic color information of each vertex in the non-deformed area is adjusted to obtain the initial color information of each vertex in the non-deformed area;

[0171] According to the color attribute of the target fluid and the preset color noise, the basic color information of each vertex in the deformation area is adjusted to obtain the initial color information of each vertex in the deformation area.

[0172] Optionally, the generating module 920 is specifically configured to perform color transfer according to the initial color information of the target vertex in the deformation area, adjust the initial color information of each vertex in the connection area to be consistent with the initial color information of the target vertex, and obtain the target color information of each vertex in the connection area;

[0173] The target color information of each vertex in the target model is generated according to the initial color information of each vertex in the deformation area, the target color information of each vertex in the connection area, and the initial color information of each vertex in the non-deformation area.

[0174] Optionally, the determination module 910 is specifically configured to determine target position information of each vertex in the deformation region in each time frame according to the position information of each vertex in the deformation region and the generated fluid swing attribute information.

[0175] Optionally, the determination module 910 is specifically used to generate position attribute information of each vertex in the deformation area according to the position information of each vertex in the deformation area and a preset data variation range; the position attribute information is used to characterize the swing amplitude of the vertex;

[0176] According to the created standard position matrix, function operation is performed to generate first fluid swing attribute information and second fluid swing attribute information, wherein the first fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area under the random swing scene under each time frame; the second fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area under the directional swing scene under each time frame;

[0177] Determine first position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the swing attribute information of the first fluid;

[0178] Determine the second position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the swing attribute information of the second fluid;

[0179] According to the first position information of each vertex in the deformation region in each time frame and the second position information of each vertex in the deformation region in each time frame, the target position information of each vertex in the deformation region in each time frame is determined.

[0180] Optionally, the determination module 910 is specifically used to calculate the position swing coefficient in each time frame respectively using a sine function according to a preset swing frequency and swing width;

[0181] The first fluid swing attribute information is calculated and generated according to the position swing coefficient in each time frame and the standard position matrix.

[0182] Optionally, the determination module 910 is specifically configured to adjust the initial position information of each vertex at the specified position according to the position information of each vertex at the specified position in the deformation region and preset random displacement information to generate the position information of each vertex at the specified position.

[0183] Optionally, the rendering module 930 is specifically used to import the target color information of each vertex in the target model and the target position information of each vertex in each time frame into a preset game engine;

[0184] The preset game engine renders and displays the target model and the target fluid special effects in the target model according to the color information of each vertex in the target model, the target position information of each vertex in each time frame, and the two-dimensional texture coordinate information of the target model.

[0185] Optionally, a rendering module 930 is specifically configured to render and display an initial target model according to initial color information of each vertex in the deformation area, target color information of each vertex in the connection area, and initial color information of each vertex in the non-deformation area by a preset game engine;

[0186] The preset game engine determines the texture coordinate information of the vertex to be adjusted in the initial target model according to the two-dimensional texture coordinate information of the target model, and adjusts at least one attribute parameter of the vertex to be adjusted in the initial target model according to the texture coordinate information of the vertex to be adjusted, and displays the target model;

[0187] The preset game engine renders and displays the target fluid special effects in the target model according to the target position information of each vertex in the deformation area at each time frame.

[0188] Optionally, the rendering module 930 is further used to determine the particle emission source according to the position information of the specified vertex in the target model;

[0189] Determining at least one physical property parameter of each additional special effect according to a display effect of at least one additional special effect to be rendered;

[0190] According to at least one physical property parameter of each additional special effect, particles are emitted from a particle emission source, and each additional special effect is overlaid, rendered and displayed in a target model.

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

[0192] The above modules can be connected or communicated with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may include a connection in the form of a LAN, a WAN, Bluetooth, a ZigBee, or NFC, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units. Those skilled in the art will clearly understand that for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application.

[0193] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application includes: a processor 801, a storage medium 802 and a bus 803, wherein the storage medium 802 stores machine-readable instructions executable by the processor 801. When the electronic device runs a fluid special effect rendering method in an embodiment, the processor 801 communicates with the storage medium 802 through the bus 803, and the processor 801 executes the machine-readable instructions to perform the following steps:

[0194] According to the color attribute of the target fluid, the target model is colored to determine the initial color information of each vertex in the target model;

[0195] According to the initial color information of the vertices in the target area of ​​the target model, the initial color information of each vertex in the connection area of ​​the target model is adjusted to generate the target color information of each vertex in the target model; the connection area is used to represent the intersection area between the deformation area and the non-deformation area in the target model;

[0196] Determine the target position information of each vertex in the target model at each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information;

[0197] The target model and the target fluid special effects in the target model are rendered and displayed according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame.

[0198] In a feasible implementation, when the processor 801 performs coloring processing on the target model according to the color attribute of the target fluid and determines the initial color information of each vertex in the target model, it is specifically used to: divide the target model into regions and determine the deformation region and the non-deformation region in the target model;

[0199] According to the color map of the target model, basic color information of each vertex in the deformation area and basic color information of each vertex in the non-deformation area are obtained;

[0200] According to the color attribute of the target fluid, the basic color information of each vertex in the non-deformed area is adjusted to obtain the initial color information of each vertex in the non-deformed area;

[0201] According to the color attribute of the target fluid and the preset color noise, the basic color information of each vertex in the deformation area is adjusted to obtain the initial color information of each vertex in the deformation area.

[0202] In a feasible implementation scheme, when the processor 801 performs the process of adjusting the initial color information of each vertex in the connection area of ​​the target model according to the initial color information of the vertex in the target area of ​​the target model to generate the target color information of each vertex in the target model, it is specifically used to: perform color transfer according to the initial color information of the target vertex in the deformation area, adjust the initial color information of each vertex in the connection area to be consistent with the initial color information of the target vertex, and obtain the target color information of each vertex in the connection area;

[0203] The target color information of each vertex in the target model is generated according to the initial color information of each vertex in the deformation area, the target color information of each vertex in the connection area, and the initial color information of each vertex in the non-deformation area.

[0204] In a feasible implementation scheme, when the processor 801 determines the target position information of each vertex in the target model at each time frame based on the position information of each vertex in the target model and the generated fluid swing property information, it is specifically used to: determine the target position information of each vertex in the deformation area at each time frame based on the position information of each vertex in the deformation area and the generated fluid swing property information.

[0205] In a feasible implementation, when the processor 801 determines the target position information of each vertex in the deformation region in each time frame according to the position information of each vertex in the deformation region and the generated fluid swing attribute information, it is specifically used to: generate the position attribute information of each vertex in the deformation region according to the position information of each vertex in the deformation region and the preset data change range; the position attribute information is used to characterize the swing amplitude of the vertex;

[0206] According to the created standard position matrix, function operation is performed to generate first fluid swing attribute information and second fluid swing attribute information, wherein the first fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area under the random swing scene under each time frame; the second fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area under the directional swing scene under each time frame;

[0207] Determine first position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the swing attribute information of the first fluid;

[0208] Determine the second position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the swing attribute information of the second fluid;

[0209] According to the first position information of each vertex in the deformation region in each time frame and the second position information of each vertex in the deformation region in each time frame, the target position information of each vertex in the deformation region in each time frame is determined.

[0210] In a feasible implementation, when the processor 801 performs function operation according to the created standard position matrix to generate the first fluid swing attribute information, it is specifically used to: calculate the position swing coefficient in each time frame respectively using a sine function according to the preset swing frequency and swing width;

[0211] The first fluid swing attribute information is calculated and generated according to the position swing coefficient in each time frame and the standard position matrix.

[0212] In a feasible implementation scheme, before determining the target position information of each vertex in the target model in each time frame based on the position information of each vertex in the target model and the generated fluid swing property information, the processor 801 is also used to: adjust the initial position information of each vertex at the specified position in the deformation area based on the position information of each vertex at the specified position and the preset random displacement information, so as to generate the position information of each vertex at the specified position.

[0213] In a feasible implementation, when the processor 801 performs rendering and displaying the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame, it is specifically used to: import the target color information of each vertex in the target model and the target position information of each vertex in each time frame into a preset game engine;

[0214] The preset game engine renders and displays the target model and the target fluid special effects in the target model according to the color information of each vertex in the target model, the target position information of each vertex in each time frame, and the two-dimensional texture coordinate information of the target model.

[0215] In a feasible implementation, when the processor 801 performs rendering and displaying the target model and the target fluid special effects in the target model according to the color information of each vertex in the target model, the target position information of each vertex in each time frame, and the two-dimensional texture coordinate information of the target model, it is specifically used to: render and display the initial target model according to the initial color information of each vertex in the deformation area, the target color information of each vertex in the connection area, and the initial color information of each vertex in the non-deformation area by a preset game engine;

[0216] The preset game engine determines the texture coordinate information of the vertex to be adjusted in the initial target model according to the two-dimensional texture coordinate information of the target model, and adjusts at least one attribute parameter of the vertex to be adjusted in the initial target model according to the texture coordinate information of the vertex to be adjusted, and displays the target model;

[0217] The preset game engine renders and displays the target fluid special effects in the target model according to the target position information of each vertex in the deformation area at each time frame.

[0218] In a feasible implementation, after executing rendering and displaying the target fluid special effects in the target model, the processor 801 is further used to: determine the particle emission source according to the position information of the specified vertex in the target model;

[0219] Determining at least one physical property parameter of each additional special effect according to a display effect of at least one additional special effect to be rendered;

[0220] According to at least one physical property parameter of each additional special effect, particles are emitted from a particle emission source, and each additional special effect is overlaid, rendered and displayed in a target model.

[0221] Among them, the storage medium 802 stores program code, and when the program code is executed by the processor 801, the processor 801 executes various steps in the fluid special effects rendering method according to various exemplary embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0222] Processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.

[0223] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. The memory is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The storage medium 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0224] Optionally, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor performs the following steps:

[0225] According to the color attribute of the target fluid, the target model is colored to determine the initial color information of each vertex in the target model;

[0226] According to the initial color information of the vertices in the target area of ​​the target model, the initial color information of each vertex in the connection area of ​​the target model is adjusted to generate the target color information of each vertex in the target model; the connection area is used to represent the intersection area between the deformation area and the non-deformation area in the target model;

[0227] Determine the target position information of each vertex in the target model at each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information;

[0228] The target model and the target fluid special effects in the target model are rendered and displayed according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame.

[0229] In a feasible implementation, when the processor 801 performs coloring processing on the target model according to the color attribute of the target fluid and determines the initial color information of each vertex in the target model, it is specifically used to: divide the target model into regions and determine the deformation region and the non-deformation region in the target model;

[0230] According to the color map of the target model, basic color information of each vertex in the deformation area and basic color information of each vertex in the non-deformation area are obtained;

[0231] According to the color attribute of the target fluid, the basic color information of each vertex in the non-deformed area is adjusted to obtain the initial color information of each vertex in the non-deformed area;

[0232] According to the color attribute of the target fluid and the preset color noise, the basic color information of each vertex in the deformation area is adjusted to obtain the initial color information of each vertex in the deformation area.

[0233] In a feasible implementation scheme, when the processor 801 performs the process of adjusting the initial color information of each vertex in the connection area of ​​the target model according to the initial color information of the vertex in the target area of ​​the target model to generate the target color information of each vertex in the target model, it is specifically used to: perform color transfer according to the initial color information of the target vertex in the deformation area, adjust the initial color information of each vertex in the connection area to be consistent with the initial color information of the target vertex, and obtain the target color information of each vertex in the connection area;

[0234] The target color information of each vertex in the target model is generated according to the initial color information of each vertex in the deformation area, the target color information of each vertex in the connection area, and the initial color information of each vertex in the non-deformation area.

[0235] In a feasible implementation scheme, when the processor 801 determines the target position information of each vertex in the target model at each time frame based on the position information of each vertex in the target model and the generated fluid swing property information, it is specifically used to: determine the target position information of each vertex in the deformation area at each time frame based on the position information of each vertex in the deformation area and the generated fluid swing property information.

[0236] In a feasible implementation, when the processor 801 determines the target position information of each vertex in the deformation region in each time frame according to the position information of each vertex in the deformation region and the generated fluid swing attribute information, it is specifically used to: generate the position attribute information of each vertex in the deformation region according to the position information of each vertex in the deformation region and the preset data change range; the position attribute information is used to characterize the swing amplitude of the vertex;

[0237] According to the created standard position matrix, function operation is performed to generate first fluid swing attribute information and second fluid swing attribute information, wherein the first fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area under the random swing scene under each time frame; the second fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area under the directional swing scene under each time frame;

[0238] Determine first position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the swing attribute information of the first fluid;

[0239] Determine the second position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the swing attribute information of the second fluid;

[0240] According to the first position information of each vertex in the deformation region in each time frame and the second position information of each vertex in the deformation region in each time frame, the target position information of each vertex in the deformation region in each time frame is determined.

[0241] In a feasible implementation, when the processor 801 performs function operation according to the created standard position matrix to generate the first fluid swing attribute information, it is specifically used to: calculate the position swing coefficient in each time frame respectively using a sine function according to the preset swing frequency and swing width;

[0242] The first fluid swing attribute information is calculated and generated according to the position swing coefficient in each time frame and the standard position matrix.

[0243] In a feasible implementation scheme, before determining the target position information of each vertex in the target model in each time frame based on the position information of each vertex in the target model and the generated fluid swing property information, the processor 801 is also used to: adjust the initial position information of each vertex at the specified position in the deformation area based on the position information of each vertex at the specified position and the preset random displacement information, so as to generate the position information of each vertex at the specified position.

[0244] In a feasible implementation, when the processor 801 performs rendering and displaying the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame, it is specifically used to: import the target color information of each vertex in the target model and the target position information of each vertex in each time frame into a preset game engine;

[0245] The preset game engine renders and displays the target model and the target fluid special effects in the target model according to the color information of each vertex in the target model, the target position information of each vertex in each time frame, and the two-dimensional texture coordinate information of the target model.

[0246] In a feasible implementation, when the processor 801 performs rendering and displaying the target model and the target fluid special effects in the target model according to the color information of each vertex in the target model, the target position information of each vertex in each time frame, and the two-dimensional texture coordinate information of the target model, it is specifically used to: render and display the initial target model according to the initial color information of each vertex in the deformation area, the target color information of each vertex in the connection area, and the initial color information of each vertex in the non-deformation area by a preset game engine;

[0247] The preset game engine determines the texture coordinate information of the vertex to be adjusted in the initial target model according to the two-dimensional texture coordinate information of the target model, and adjusts at least one attribute parameter of the vertex to be adjusted in the initial target model according to the texture coordinate information of the vertex to be adjusted, and displays the target model;

[0248] The preset game engine renders and displays the target fluid special effects in the target model according to the target position information of each vertex in the deformation area at each time frame.

[0249] In a feasible implementation, after executing rendering and displaying the target fluid special effects in the target model, the processor 801 is further used to: determine the particle emission source according to the position information of the specified vertex in the target model;

[0250] Determining at least one physical property parameter of each additional special effect according to a display effect of at least one additional special effect to be rendered;

[0251] According to at least one physical property parameter of each additional special effect, particles are emitted from a particle emission source, and each additional special effect is overlaid, rendered and displayed in a target model.

[0252] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.

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

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

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

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

Claims

1. A method for rendering fluid special effects, characterized in that: include: According to the color attribute of the target fluid, the target model is colored to determine the initial color information of each vertex in the target model; According to the initial color information of the vertices in the target area of ​​the target model, the initial color information of each vertex in the connection area of ​​the target model is adjusted to generate the target color information of each vertex in the target model; The connection area is used to characterize the intersection area between the deformation area and the non-deformation area in the target model; Determining target position information of each vertex in the target model at each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information; The target model and the target fluid special effects in the target model are rendered and displayed according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame.

2. The method according to claim 1, characterized in that The coloring process is performed on the target model according to the color attribute of the target fluid to determine the initial color information of each vertex in the target model, including: Performing region division on the target model to determine a deformed region and a non-deformed region in the target model; According to the color map of the target model, basic color information of each vertex in the deformation area and basic color information of each vertex in the non-deformation area are obtained; According to the color attribute of the target fluid, basic color information of each vertex in the non-deformed area is adjusted to obtain initial color information of each vertex in the non-deformed area; According to the color attribute of the target fluid and the preset color noise, the basic color information of each vertex in the deformation area is adjusted to obtain the initial color information of each vertex in the deformation area.

3. The method according to claim 1, characterized in that The step of adjusting the initial color information of each vertex in the connection area of ​​the target model according to the initial color information of the vertices in the target area of ​​the target model to generate the target color information of each vertex in the target model comprises: According to the initial color information of the target vertex in the deformation area, color transfer is performed to adjust the initial color information of each vertex in the connection area to be consistent with the initial color information of the target vertex, so as to obtain the target color information of each vertex in the connection area; The target color information of each vertex in the target model is generated according to the initial color information of each vertex in the deformation area, the target color information of each vertex in the connection area, and the initial color information of each vertex in the non-deformation area.

4. The method according to claim 1, characterized in that: Determining target position information of each vertex in the target model at each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information, including: According to the position information of each vertex in the deformation area and the generated fluid swing attribute information, the target position information of each vertex in the deformation area in each time frame is determined.

5. The method according to claim 4, characterized in that The step of determining target position information of each vertex in the deformation region at each time frame according to the position information of each vertex in the deformation region and the generated fluid swing attribute information includes: Generate position attribute information of each vertex in the deformation area according to the position information of each vertex in the deformation area and the preset data change range; the position attribute information is used to characterize the swing amplitude of the vertex; Performing function operations according to the created standard position matrix to generate first fluid swing attribute information and second fluid swing attribute information, wherein the first fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area at each time frame in a random swing scenario; and the second fluid swing attribute information is used to characterize the position change information of each vertex in the deformation area at each time frame in a directional swing scenario; Determining first position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the first fluid swing attribute information; Determining second position information of each vertex in the deformation region in each time frame according to the position attribute information of each vertex in the deformation region and the swing attribute information of the second fluid; According to the first position information of each vertex in the deformation region in each time frame and the second position information of each vertex in the deformation region in each time frame, the target position information of each vertex in the deformation region in each time frame is determined.

6. The method according to claim 5, characterized in that The step of performing a function operation based on the created standard position matrix to generate the first fluid swing attribute information includes: According to the preset swing frequency and swing width, the position swing coefficient in each time frame is calculated by using a sine function; The first fluid swing attribute information is calculated and generated according to the position swing coefficient in each time frame and the standard position matrix.

7. The method according to claim 1, characterized in that Before determining the target position information of each vertex in the target model in each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information, the method further includes: According to the position information of each vertex at the designated position in the deformation area and the preset random displacement information, the initial position information of each vertex at the designated position is adjusted to generate the position information of each vertex at the designated position.

8. The method according to any one of claims 1 to 7, characterized in that: The step of rendering and displaying the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame includes: Importing target color information of each vertex in the target model and target position information of each vertex in each time frame into a preset game engine; The preset game engine renders and displays the target model and the target fluid special effects in the target model according to the color information of each vertex in the target model, the target position information of each vertex in each time frame, and the two-dimensional texture coordinate information of the target model.

9. The method according to claim 8, characterized in that The rendering and displaying of the target model and the target fluid special effects in the target model according to the color information of each vertex in the target model, the target position information of each vertex in each time frame, and the two-dimensional texture coordinate information of the target model comprises: The preset game engine renders and displays the initial target model according to the initial color information of each vertex in the deformation area, the target color information of each vertex in the connection area, and the initial color information of each vertex in the non-deformation area; The preset game engine determines the texture coordinate information of the vertex to be adjusted in the initial target model according to the two-dimensional texture coordinate information of the target model, and adjusts at least one attribute parameter of the vertex to be adjusted in the initial target model according to the texture coordinate information of the vertex to be adjusted, and displays the target model; The preset game engine renders and displays the target fluid special effects in the target model according to the target position information of each vertex in the deformation area at each time frame.

10. The method according to claim 9, characterized in that After rendering and displaying the target fluid special effects in the target model, the method further includes: Determining a particle emission source according to position information of a specified vertex in the target model; Determining at least one physical property parameter of each additional special effect according to a display effect of at least one additional special effect to be rendered; According to at least one physical property parameter of each additional special effect, particles are emitted from the particle emission source, and each additional special effect is superimposed, rendered and displayed in the target model.

11. A fluid special effects rendering device, characterized in that: include: Determine the module, generate the module and render the module; The determination module is used to perform coloring processing on the target model according to the color attribute of the target fluid, and determine the initial color information of each vertex in the target model; The generating module is used to adjust the initial color information of each vertex in the connecting area of ​​the target model according to the initial color information of the vertex in the target area of ​​the target model, so as to generate the target color information of each vertex in the target model; The connection area is used to characterize the intersection area between the deformation area and the non-deformation area in the target model; The determination module is used to determine the target position information of each vertex in the target model in each time frame according to the position information of each vertex in the target model and the generated fluid swing attribute information; The rendering module is used to render and display the target model and the target fluid special effects in the target model according to the target color information of each vertex in the target model and the target position information of each vertex in each time frame.

12. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the fluid special effects rendering method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the fluid special effects rendering method according to any one of claims 1 to 10 is executed.

Citation Information

Cited By

  • Method for emitting particles based on dissipation edge

    CN120726187A