Liquid rendering method, device, equipment, computer readable storage medium and product

By acquiring user interaction data to calculate target rendering data, and rendering liquids and their corresponding objects, the problem of monotonous display effects in existing liquid rendering methods is solved, and rich interactive display and improved user experience are achieved.

CN115578277BActive Publication Date: 2026-07-21BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2022-09-30
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing liquid rendering methods offer limited visual effects and do not support real-time interaction.

Method used

By acquiring initial data generated by the user based on interactive operations, the target rendering data is calculated to render the liquid to be rendered and the objects generated in response to the interactive operations, such as bubbles and foam, to achieve a display effect that matches the user interaction.

Benefits of technology

It enriches the display effects of liquid rendering, improves the user experience, and enhances the matching degree between rendering effects and user interaction operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115578277B_ABST
    Figure CN115578277B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure provides a liquid rendering method, device, equipment, computer readable storage medium and product, the method comprises: in response to the liquid rendering request triggered by the user, obtaining the initial data generated based on the user triggered interaction operation; according to the initial data, the target rendering data for rendering the preset to be rendered content is calculated, wherein the to-be-rendered content includes to-be-rendered liquid and at least one to-be-rendered object generated by the to-be-rendered liquid in response to the interaction operation;According to the target rendering data, the rendering operation is carried out on the to-be-rendered content, and the target content after rendering is obtained. Different rendering effects can be displayed based on the real-time interaction operation of the user. In addition, in addition to the to-be-rendered liquid, at least one to-be-rendered object after rendering can also be displayed on the display interface, which enriches the display effect and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to a liquid rendering method, apparatus, device, computer-readable storage medium, and product. Background Technology

[0002] Rendering liquids is involved in many display scenarios. Existing liquid rendering methods generally render the liquid and the container containing the liquid separately. For example, the water body is rendered separately, and the container is rendered separately.

[0003] However, the above rendering method cannot enable real-time interaction with the user, and the display effect is relatively simple. Summary of the Invention

[0004] This disclosure provides a liquid rendering method, apparatus, device, computer-readable storage medium, and product to address the problem that existing liquid rendering methods have relatively simple display effects and do not support real-time interaction.

[0005] In a first aspect, embodiments of this disclosure provide a liquid rendering method, including:

[0006] In response to a user-triggered liquid rendering request, initial data generated based on the user-triggered interactive operation is obtained;

[0007] Target rendering data for rendering preset content to be rendered is calculated based on the initial data, wherein the content to be rendered includes a liquid to be rendered and at least one object to be rendered generated by the liquid to be rendered in response to the interactive operation.

[0008] The content to be rendered is rendered based on the target rendering data to obtain the rendered target content.

[0009] Secondly, embodiments of this disclosure provide a liquid rendering apparatus, comprising:

[0010] The acquisition module is used to acquire initial data generated based on the user-triggered interactive operation in response to a liquid rendering request.

[0011] The calculation module is used to calculate target rendering data for rendering preset content to be rendered based on the initial data, wherein the content to be rendered includes a liquid to be rendered and at least one object to be rendered generated by the liquid to be rendered in response to the interactive operation.

[0012] The rendering module is used to perform rendering operations on the content to be rendered based on the target rendering data, so as to obtain the rendered target content.

[0013] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;

[0014] The memory stores computer-executed instructions;

[0015] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the liquid rendering method as described in the first aspect and various possible designs of the first aspect.

[0016] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the liquid rendering method described in the first aspect and various possible designs of the first aspect.

[0017] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the liquid rendering method as described in the first aspect and various possible designs of the first aspect.

[0018] The liquid rendering method, apparatus, device, computer-readable storage medium, and product provided in this embodiment acquire initial data generated by the user based on interactive operations, and generate target rendering data for rendering the liquid to be rendered and at least one object to be rendered generated by the liquid in response to interactive operations. This enables rendering operations on the liquid to be rendered and at least one object to be rendered based on the target rendering data. Different rendering effects can be displayed based on the user's real-time interactive operations. Furthermore, in addition to the liquid to be rendered, at least one rendered object can also be displayed on the display interface after rendering, enriching the display effects and improving the user experience. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic flowchart of the liquid rendering method provided in this embodiment of the disclosure;

[0021] Figure 2 A schematic flowchart of a liquid rendering method provided in yet another embodiment of this disclosure;

[0022] Figure 3 A schematic diagram of the tensile force provided for an embodiment of this disclosure;

[0023] Figure 4 A schematic flowchart of a liquid rendering method provided in yet another embodiment of this disclosure;

[0024] Figure 5 A schematic diagram of the target mask provided in an embodiment of this disclosure;

[0025] Figure 6 A schematic flowchart of a liquid rendering method provided in yet another embodiment of this disclosure;

[0026] Figure 7 This is a schematic diagram of texture sampling coordinate division provided in an embodiment of the present disclosure;

[0027] Figure 8 A schematic diagram of the first bubble to be processed provided in an embodiment of this disclosure;

[0028] Figure 9 This is a schematic diagram of the third bubble to be processed provided in an embodiment of this disclosure;

[0029] Figure 10 A schematic diagram of the target bubble provided in an embodiment of this disclosure;

[0030] Figure 11 This is a schematic diagram of the structure of the liquid rendering apparatus provided in the embodiments of this disclosure;

[0031] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0033] In view of the aforementioned problems that existing liquid rendering methods have relatively simple display effects and do not support real-time interaction, this disclosure provides a liquid rendering method, apparatus, device, computer-readable storage medium, and product.

[0034] It should be noted that the liquid rendering methods, apparatus, devices, computer-readable storage media, and products disclosed herein can be used in various scenarios for rendering liquids.

[0035] Existing liquid rendering methods typically render and display liquids according to preset values. They cannot render liquids based on user-triggered interactions. Furthermore, when using these methods, only the rendered liquid is often displayed, resulting in a rather simplistic visual experience.

[0036] In solving the aforementioned technical problems, the inventors discovered through research that obtaining initial data generated by the user based on interactive operations and then generating target rendering data for rendering the content to be rendered based on this initial data allows the liquid to present a display effect that matches the user's interaction, thus improving the user experience.

[0037] Furthermore, some liquids produce bubbles and foam during shaking. For example, shaking beer creates bubbles that eventually form a layer of foam. Therefore, to further optimize liquid rendering and increase its realism, additional content can be added to be rendered. This content can include not only the liquid but also foam and bubbles. Rendering operations can be performed on these various elements based on target rendering data generated from initial data produced by human-computer interaction.

[0038] Figure 1 This is a flowchart illustrating the liquid rendering method provided in an embodiment of the present disclosure, as shown below. Figure 1 As shown, the method includes:

[0039] Step 101: In response to the liquid rendering request triggered by the user, obtain the initial data generated based on the user-triggered interactive operation.

[0040] In this embodiment, the execution entity is a liquid rendering device, which can be coupled to a terminal device. This allows it to perform rendering operations on the content to be rendered in response to user-triggered interactive operations. Optionally, the liquid rendering device can also be coupled to a server, which can communicate with the terminal device to acquire interactive operations collected by the terminal device and then perform rendering operations on the content to be rendered.

[0041] In this embodiment, the display interface can show a liquid to be rendered. The user can interact with the liquid as needed. For example, the user can shake the terminal device to make the liquid sway in response. Alternatively, the user can trigger the liquid to create a ripple effect in response to the trigger operation.

[0042] Accordingly, in order to achieve the aforementioned display effect for the liquid to be rendered, the user can trigger a liquid rendering request, enabling the liquid rendering device to perform rendering operations on the liquid to be rendered based on the request. This liquid rendering request can be automatically generated in response to the user's interactive operation on the liquid to be rendered, or it can be generated after the user triggers a preset rendering control; this disclosure does not impose any limitations on either approach.

[0043] In order to ensure that the liquid to be rendered can present a display effect that matches the interactive operation, after obtaining the liquid rendering request, the initial data generated based on the user-triggered interactive operation can be obtained according to the liquid rendering request.

[0044] The initial data can be motion data of the terminal device collected by a preset sensor on the terminal device. Alternatively, the initial data can also be trigger data of the user-triggered screen collected by a preset sensor on the terminal device. This disclosure does not limit this.

[0045] Step 102: Calculate target rendering data for rendering preset content to be rendered based on the initial data, wherein the content to be rendered includes liquid to be rendered and at least one object to be rendered generated by the liquid to be rendered in response to the interactive operation.

[0046] In practical applications, when a liquid is shaken, it may produce bubbles, foam, and other substances. For example, when beer is shaken, beer bubbles are produced, which eventually form a layer of beer foam.

[0047] Therefore, in order to make the display effect of the liquid to be rendered more realistic, when the liquid to be rendered shakes or produces ripples in response to user interaction, at least one object to be rendered may be generated accordingly. This object to be rendered may include at least one of the following: a bubble to be rendered or foam to be rendered.

[0048] Accordingly, in order to perform rendering operations on the liquid to be rendered, after obtaining the initial data, the target rendering data for rendering the preset content to be rendered can be calculated based on the initial data.

[0049] Step 103: Perform a rendering operation on the content to be rendered based on the target rendering data to obtain the rendered target content.

[0050] In this embodiment, after calculating and obtaining the target rendering data, rendering operations can be performed on the content to be rendered based on the target rendering data to obtain the rendered target content. Thus, the target content can present display effects such as liquid sloshing, bubble generation, and foam formation based on user interaction. Alternatively, the target content can present water ripples generated based on user interaction, and bubble and foam formation effects based on these water ripples. This enriches the display content in the liquid rendering operation and optimizes the display effect of the liquid to be rendered.

[0051] Optionally, the calculation operations on the target rendering data can be implemented by a pre-defined central processing unit (CPU). The rendering operations on the content to be rendered based on the target rendering data can be implemented by a pre-defined graphics processing unit (GPU).

[0052] Optionally, based on any of the above embodiments, step 101 includes:

[0053] In response to a liquid rendering request triggered by the user's movement operation on the terminal device, motion data of the terminal device during movement is collected by a preset sensor in the terminal device.

[0054] The motion data is determined as the initial data, wherein the motion data includes spatial pose transformation information and motion speed information.

[0055] In this embodiment, the user can trigger a liquid rendering request by moving the terminal device. In response to the liquid rendering request, motion data of the terminal device during movement can be collected by preset sensors in the terminal device. These sensors include, but are not limited to, gyroscopes, velocity sensors, and accelerometers, and this disclosure does not impose any limitations on them.

[0056] After acquiring the motion data, the motion data can be determined as the initial data, wherein the motion data includes spatial pose transformation information and motion speed information.

[0057] Optionally, the user can trigger a liquid rendering request by pressing, swiping, or performing other operations on the display interface of the terminal device. In response to this liquid rendering request, motion data of the terminal device during movement can be collected by preset sensors in the terminal device. These sensors include, but are not limited to, pressure sensors, etc., and this disclosure does not impose any limitations on them. Accordingly, the motion data includes, but is not limited to, information such as trigger position and trigger force. This motion data can be determined as initial data.

[0058] The liquid rendering method provided in this embodiment acquires initial data generated by the user based on interactive operations, and generates target rendering data for rendering the liquid to be rendered and at least one object to be rendered generated by the liquid in response to interactive operations. This allows for rendering operations on the liquid to be rendered and at least one object to be rendered based on the target rendering data. Different rendering effects can be displayed based on the user's real-time interactive operations. Furthermore, in addition to the liquid to be rendered, at least one rendered object can also be displayed on the display interface, enriching the display effects and improving the user experience.

[0059] Figure 2 This is a flowchart illustrating a liquid rendering method provided in yet another embodiment of the present disclosure. Based on any of the above embodiments, such as... Figure 2 As shown, step 102 includes:

[0060] Step 201: Perform preprocessing operations on the initial data to obtain the data to be calculated for each time frame during the interaction operation.

[0061] Step 202: Calculate the target difference between two adjacent frames of data to be calculated, and obtain multiple target differences corresponding to the interactive operation.

[0062] Step 203: Calculate the target summation corresponding to the multiple target differences.

[0063] Step 204: Calculate the target rendering data for rendering the preset content to be rendered based on the target summation.

[0064] In this embodiment, after obtaining the initial data, preprocessing operations can be performed on the initial data to extract the data to be calculated for each time frame used to calculate the target rendering data.

[0065] In practical applications, the more intense the motion, the more pronounced the liquid sloshing, the more bubbles are generated, and the thicker the accumulated bubble layer. Therefore, after obtaining the data to be calculated, the target difference between two adjacent frames of data can be calculated to obtain multiple target differences corresponding to the interactive operation. The target sum corresponding to multiple target differences is then calculated; therefore, this target sum can accurately characterize the intensity of the motion.

[0066] After obtaining the target summation, that is, after determining the intensity of the motion generated by the interactive operation, the target rendering data used to render the preset content can be calculated based on the target summation. This allows the target rendering data to match the intensity of the motion, thereby ensuring that the final rendering effect matches the user's interactive operation and improving the user experience.

[0067] Furthermore, based on any of the above embodiments, step 204 includes:

[0068] Based on the preset correspondence between the accumulated sum and the motion data of the content to be rendered, the target motion data corresponding to the target accumulated sum is determined.

[0069] Target rendering data for rendering preset content is calculated based on the target motion data and user-preset control data.

[0070] In this embodiment, the type of liquid to be rendered may vary. For example, the liquid to be rendered could be water, beer, beverages, coffee, etc. Different liquids exhibit different degrees of agitation, bubble formation speeds, and accumulated foam thicknesses during the sloshing process. Therefore, to ensure that the final rendering effect matches the type of content to be rendered, a correspondence between the accumulated sum and motion data can be established for each type of content to be rendered.

[0071] Therefore, after calculating the target cumulative sum, the correspondence between the cumulative sum associated with the content type to be rendered and the motion data of the content to be rendered can first be determined. Based on the correspondence between the cumulative sum and the motion data of the content to be rendered, the target motion data corresponding to the target cumulative sum is determined. This target motion data may include the generation speed of bubbles and / or foam, the sloshing speed of liquid, etc.

[0072] Furthermore, bubbles and foam will gradually disappear over time after they are generated. Therefore, users can set the disappearance speed of bubbles and foam as control data according to their actual needs.

[0073] Therefore, after determining the target accumulation and corresponding target motion data, the target rendering data used to render the preset content can be calculated based on the target motion data and the user-preset control data. This allows for accurate simulation of the display effect of liquid sloshing, where the liquid sloshes gradually intensifies and then returns to calm, bubbles are generated and disappear, and foam layers gradually form and dissipate.

[0074] The liquid rendering method provided in this embodiment determines the data to be calculated for each time frame during the interactive operation, and determines the target rendering data of the content to be rendered based on the target sum of the target differences between multiple adjacent frames of data to be calculated. This allows for accurate control of the rendering effect, matching the user's interactive operation, thus improving the matching degree between the rendering effect and the user's interactive operation. Furthermore, by establishing a correspondence between the sum and the motion data of the content to be rendered, the target motion data can be accurately determined for different content to be rendered, improving the applicability of the liquid rendering method.

[0075] Optionally, based on any of the above embodiments, the content to be rendered includes liquid to be rendered and / or foam generated by the liquid to be rendered in response to the interactive operation. The initial data includes motion speed information.

[0076] Step 201 includes:

[0077] For any moving point perpendicular to the surface of the liquid to be rendered, the tension information of the moving point on the preset target point in each time frame is calculated based on the position vector between the moving point and the preset target point in the liquid to be rendered and the velocity vector of the moving point. The tension information is then determined as the data to be calculated.

[0078] In this embodiment, the content to be rendered includes liquid to be rendered and / or foam generated by the liquid in response to interactive operations. Accordingly, the initial data may include motion speed information, wherein the motion speed information includes velocity information and acceleration information.

[0079] The liquid to be rendered can include multiple moving points perpendicular to the liquid surface, each exerting a pulling force on the center of mass of the liquid. As the liquid sways with user interaction, the positions of the moving points relative to the liquid surface change, and correspondingly, the pulling force exerted by these points on the center of mass changes. Therefore, this pulling force can approximate the intensity of the movement. Thus, to ensure that the rendered target content more closely matches the user's actual interaction, the pulling force of the moving points on the center of mass can be calculated.

[0080] Therefore, for any moving point perpendicular to the liquid surface in the liquid to be rendered, based on the position vector to a preset target point in the liquid and the velocity vector of the moving point, the tension information of the moving point on the preset target point in each time frame is calculated, and the tension information is determined as the data to be calculated. Specifically, the preset target point can be a mass point of the liquid to be rendered.

[0081] Specifically, the tensile force information can be calculated using Formula 1:

[0082]

[0083] Where x is the position vector of the moving point from the preset target point, and v is the velocity vector of the moving point.

[0084] Figure 3 A schematic diagram of the tensile force provided in the embodiments of this disclosure, such as Figure 3As shown, the liquid to be rendered includes any moving point 32 perpendicular to the liquid surface 31 and a preset target point 33, wherein the preset target point 33 can be the centroid of the liquid to be rendered. The moving point 32 can exert a damping force 35 on the preset target point 33.

[0085] Furthermore, the acceleration can be obtained based on Equation 1. Among them, acceleration It can be as shown in Formula 2:

[0086]

[0087] Where x is the position vector from the moving point to the preset target point, v is the velocity vector of the moving point, and k / m and c / m are two freely adjustable parameters.

[0088] According to Equation 2, the standard damped second-order differential equation of motion can be obtained, as shown in Equation 3:

[0089]

[0090] Optionally, by adjusting the parameters k / m and c / m, it is possible to achieve underdamped, overdamped, and critically damped states, so that the liquid to be rendered exhibits different oscillation effects during shaking, presenting the fluidity of the liquid to be rendered and increasing the realism of the liquid to be rendered.

[0091] The liquid rendering method provided in this embodiment uses the tension information of a moving point on a preset target point as the data to be calculated, thereby accurately determining the impact of user interaction on the content to be rendered. Furthermore, the target rendering data calculated based on this data can improve the matching degree between the rendering effect and the user's interaction.

[0092] Optionally, based on any of the above embodiments, the content to be rendered includes the bubbles generated by the liquid to be rendered in response to the interactive operation. The initial data includes spatial pose transformation information.

[0093] Step 201 includes:

[0094] Extract the Euler angles of rotation in a preset direction within each time frame from the spatial pose transformation information, and determine the Euler angles of rotation as the data to be calculated.

[0095] In this embodiment, the content to be rendered may include bubbles generated by the liquid in response to the interactive operation. Initial data includes spatial pose transformation information. Since the bubbles to be rendered are generated much faster than the foam to be rendered, a more sensitive input response is required. Therefore, Euler angles from a gyroscope, which have a faster motion response, can be selected as the data to be calculated.

[0096] Specifically, the Euler angles of rotation in a preset direction within each time frame can be extracted from the spatial pose transformation information, and these Euler angles are determined as the data to be calculated. Specifically, the Euler angles of rotation in the preset direction can be the Euler angles of rotation on the Z-axis.

[0097] The liquid rendering method provided in this embodiment requires a more sensitive input response because the speed at which the bubbles to be rendered are generated is usually faster than the speed at which the foam to be rendered is generated. By using rotated Euler angles as the data to be calculated, it can quickly respond to user interaction and generate the target rendering data. This improves the efficiency of the liquid rendering operation.

[0098] Optionally, based on any of the above embodiments, the content to be rendered includes foam generated by the liquid to be rendered in response to the interactive operation. The target motion data includes the foam generation rate. The control data includes the foam dissipation rate.

[0099] The step of calculating target rendering data for rendering preset content based on the target motion data and user-preset control data includes:

[0100] A foam stockpile is constructed based on the foam generation rate and the foam dissipation rate, wherein the foam stockpile includes the thickness of the foam layer for each time frame.

[0101] In this embodiment, the content to be rendered includes foam generated by the interactive operation of the liquid. Target motion data includes the foam generation rate. Control data includes the foam dissipation rate. The foam generation rate is positively correlated with the intensity of shaking caused by the user's interactive operation on the content to be rendered; that is, the more intense the shaking, the faster the foam generation rate. This foam dissipation rate can be set by the user according to actual needs.

[0102] Furthermore, users can pre-set the height of the liquid to be rendered to y, and define fragments with heights belonging to (yh, y) as foam regions. Since the liquid to be rendered will shake with user interaction, the foam region is not a static rendering effect, so h cannot be set to a fixed value.

[0103] Analyzing the physical phenomena of foam generation reveals that the more vigorous the liquid agitation, the faster the foam is generated; the longer the agitation lasts, the thicker the foam becomes. However, foam typically doesn't accumulate indefinitely; it disappears after the liquid settles for a period. Based on this analysis, a foam storage pool can be established. This pool requires one input I, one output O, and a storage space S. For the foam to be rendered, the storage space S is fixed in size. Input I accumulates each frame, filling storage space S until it is full. Output O subtracts a certain value from the pool each frame. This completes the pool setup. To better describe the generation pattern of the foam to be rendered, the target motion data, i.e., the foam generation rate, can be used as the input I. The user-preset foam dissipation rate is set as O.

[0104] Therefore, based on the aforementioned foam stockpile, when the user's interaction is vigorous and the foam generation rate exceeds the foam dissipation rate, the foam in the stockpile gradually increases, resulting in a gradually thickening foam layer. Conversely, when the user's interaction is slow or ceases, the foam generation rate is less than the foam dissipation rate, causing the foam in the stockpile to gradually decrease, resulting in a gradually thinning foam layer until all the foam dissipates.

[0105] The liquid rendering method provided in this embodiment constructs a foam stock pool based on the foam generation rate and foam dissipation rate, thereby enabling the rendering operation of the foam to be rendered to better match the effect in actual application, improving the realism and display effect of liquid rendering, and thus improving the user experience.

[0106] Optionally, based on any of the above embodiments, the content to be rendered includes bubbles generated by the liquid to be rendered in response to the interactive operation. The target motion data includes bubble velocity increments. The control data includes bubble velocity decrements.

[0107] The step of calculating target rendering data for rendering preset content based on the target motion data and user-preset control data includes:

[0108] A bubble rate pool is constructed based on the bubble velocity increment and the bubble velocity decrement, wherein the bubble rate pool includes the bubble rise velocity for each time frame.

[0109] In this embodiment, the content to be rendered includes bubbles generated by the liquid in response to interactive operations. Target motion data includes bubble velocity increments. These increments can be proportional to the intensity of the liquid's agitation; that is, the more intense the agitation, the greater the bubble velocity increment. Control data includes bubble velocity decrement. This decrement can be set by the user according to actual needs. A bubble rate pool can be constructed based on the bubble velocity increments and decrements, where the bubble rate pool includes the bubble's rise velocity for each time frame.

[0110] When the bubble velocity increment is greater than the bubble velocity decrement, the bubble rises faster. Conversely, when the bubble velocity increment is less than the bubble velocity decrement, the bubble rises slower. This ensures that the bubbles in the rendered liquid maintain the same motion as actual bubbles in the liquid.

[0111] The liquid rendering method provided in this embodiment constructs a bubble rate pool based on bubble velocity increments and decrements, thereby improving the realism of liquid rendering and enhancing the display effect of liquid rendering operations.

[0112] Optionally, based on any of the above embodiments, the content to be rendered includes the liquid to be rendered.

[0113] The step of calculating the target rendering data for rendering the preset content to be rendered based on the target summation includes:

[0114] Based on the preset correspondence between the cumulative sum and the turbidity of the liquid to be rendered, the target turbidity corresponding to the target cumulative sum is determined, and the target turbidity is determined as the target rendering data.

[0115] In this embodiment, analysis of the physical phenomenon of liquid sloshing reveals that the liquid gradually becomes turbid as bubbles are generated. Therefore, to achieve accurate rendering of the liquid to be rendered, the target turbidity corresponding to the target sum can be determined based on the target cumulative sum and the preset correspondence between the cumulative sum and the turbidity of the liquid to be rendered. This target turbidity is then defined as the target rendering data. Thus, after rendering based on this target rendering data, the more violently the liquid sloshes based on user interaction, the more turbid the liquid becomes.

[0116] The liquid rendering method provided in this embodiment determines the target turbidity of the liquid to be rendered and uses this target turbidity as the target rendering data, thereby accurately simulating the turbidity phenomenon caused by liquid sloshing in real-world applications. This improves the realism of the rendering operation of the content to be rendered.

[0117] Furthermore, based on any of the above embodiments, the content to be rendered includes a liquid to be rendered. Step 103 includes:

[0118] Based on the target rendering data, a color mixing rendering operation is performed on the preset shallow water area and the preset deep water area in the liquid to be rendered.

[0119] In this embodiment, shallow and deep water areas can be defined based on the distance of each location in the liquid to be rendered from the liquid surface, and different colors can be assigned to the shallow and deep water areas. For example, the shallow water area can be defined as red, and the deep water area as blue. When the liquid to be rendered is still, it presents a layered effect, while in response to user interaction and shaking, the colors can be mixed.

[0120] Accordingly, color mixing rendering can be performed on the preset shallow water area and preset deep water area in the liquid to be rendered based on the target rendering data.

[0121] Furthermore, based on any of the above embodiments, the target rendering data also includes the target turbidity corresponding to the liquid to be rendered.

[0122] After performing color mixing rendering on the preset shallow water area and preset deep water area in the liquid to be rendered based on the target rendering data, the process further includes:

[0123] The transparency of the liquid to be rendered is adjusted according to the target turbidity, wherein the target turbidity is inversely proportional to the transparency.

[0124] In this embodiment, the target rendering data also includes the target turbidity of the liquid to be rendered. The transparency of the liquid to be rendered, i.e., the alpha transparency, can be adjusted based on this target turbidity. Specifically, the target turbidity is inversely proportional to the transparency; that is, the higher the turbidity, the lower the transparency, and vice versa.

[0125] The liquid rendering method provided in this embodiment sets different colors for a preset shallow water area and a preset deep water area in the liquid to be rendered. During the rendering process, the colors of the shallow water area and the deep water area are mixed according to the target rendering data, and the target turbidity of the liquid to be rendered is adjusted according to the target rendering data. In this way, the display effect can be achieved such that the more intense the movement, the higher the turbidity, the more consistent the liquid color, the lower the transparency, the calmer the water body, the lower the turbidity, the more obvious the color layering, and the higher the transparency.

[0126] Figure 4 This is a flowchart illustrating a liquid rendering method according to another embodiment of the present disclosure. Based on any of the above embodiments, the content to be rendered includes foam generated by the liquid in response to the interactive operation. The target rendering data includes a foam storage pool. Figure 4 As shown, step 103 includes:

[0127] Step 401: For each time frame, determine the foam thickness corresponding to the current time frame based on the foam stock pool.

[0128] Step 402: Generate a target mask that matches the foam thickness based on the foam thickness.

[0129] Step 403: Perform a rendering operation based on the target mask and the preset liquid and foam to be rendered to obtain the rendered target content.

[0130] In this embodiment, the content to be rendered includes foam generated by the interactive operation of the liquid to be rendered. The target rendering data includes a foam inventory pool. Based on this foam inventory pool, the foam thickness corresponding to each time frame can be determined. Based on this foam thickness, a target mask matching the foam thickness can be generated. The target mask includes foam regions and liquid regions, wherein the pixel values ​​of the foam regions and liquid regions are different. For example, the pixel value of the foam region can be 1, and the pixel value of the liquid region can be 0. When rendering the foam region to be rendered is required, the target mask can be multiplied by the foam texture map. When rendering the liquid region to be rendered is required, a penalty operation can be performed between (1 - target mask) and the liquid texture map to be rendered. The rendered target content is then obtained.

[0131] Figure 5 A schematic diagram of the target mask provided in the embodiments of this disclosure, such as... Figure 5 As shown, the target mask 51 includes a foam region 52 and a liquid region 53. The thickness of the foam region 52 is H. In the target mask 51, the pixel values ​​of the foam region 52 and the liquid region 53 are different.

[0132] Optionally, to further improve the rendering effect, since the surface of the foam and the intersection between the foam and the liquid are often not standard planes, a temporal variation graph can be introduced to achieve changes in the shape of the foam edge.

[0133] The liquid rendering method provided in this embodiment determines the foam thickness corresponding to the current time frame based on the foam stock pool, and constructs a target mask based on the foam thickness. This allows for accurate rendering of the foam to be rendered based on the target mask, improving the realism of the rendered foam.

[0134] Figure 6 This is a flowchart illustrating a liquid rendering method according to another embodiment of the present disclosure. Based on any of the above embodiments, the content to be rendered includes bubbles generated by the liquid in response to the interactive operation, and the target rendering data includes a bubble velocity pool. Figure 6 As shown, step 103 includes:

[0135] Step 601: Perform a block operation on the preset texture sampling coordinates to obtain multiple sampling coordinate regions.

[0136] Step 602: For each sampling coordinate region, draw the target bubble within the sampling coordinate region.

[0137] Step 603: Control the target bubble to rise according to the target rendering data.

[0138] In this embodiment, the rendering of the bubble to be rendered can be achieved in the texture sampling coordinates. Since the texture sampling coordinates are generally within the range of (0,1), in order to render the effect of the bubble to be rendered, the preset texture sampling coordinates can first be divided into blocks to obtain multiple sampling coordinate regions.

[0139] Within each sampling coordinate region, a target bubble can be drawn, and based on the target rendering data, the target bubble can be controlled to rise.

[0140] Furthermore, based on any of the above embodiments, such as Figure 6 As shown, step 601 includes:

[0141] The texture sampling coordinates are multiplied by a preset magnification factor to obtain the processed texture sampling coordinates.

[0142] The remainder corresponding to the preset value is taken from the processed texture sampling coordinates to obtain multiple sampling coordinate regions.

[0143] In this embodiment, the texture sampling coordinates generally fall within the (0,1) interval. The processed texture sampling coordinates can be obtained by multiplying the texture sampling coordinates by a preset magnification factor. This preset magnification factor can be set by the user according to actual needs. Alternatively, it can be determined based on the target rendering data. For example, if the bubbles to be rendered are generated quickly, a larger number of bubbles can be generated accordingly.

[0144] Furthermore, the remainder corresponding to a preset value can be taken from the processed texture sampling coordinates to obtain multiple sampling coordinate regions. This preset value can be 1, thus enabling the acquisition of multiple sampling coordinate regions belonging to the (0,1) interval.

[0145] Figure 7 This is a schematic diagram of texture sampling coordinate division provided in an embodiment of the present disclosure, as shown below. Figure 7As shown, texture sampling coordinate 71 belongs to the (0,1) interval. The texture sampling coordinates can be multiplied by a preset magnification factor to obtain the processed texture sampling coordinates 72. For example, the preset magnification factor can be 4, and the processed texture sampling coordinates 72 will belong to the (0,4) interval. Taking the remainder corresponding to a preset value from the processed texture sampling coordinates 72 yields multiple sampling coordinate regions 73. The preset value can be 1.

[0146] The liquid rendering method provided in this embodiment divides the texture sampling coordinates into multiple sampling coordinate regions, draws target bubbles in each of these regions, and controls the target bubbles to rise according to the target rendering data. This allows for accurate control of the rendering of bubbles in the liquid based on user interaction, enriching the display effects of liquid rendering. Furthermore, it enables the movement of the bubbles to match the user's interaction, enhancing the realism of the liquid rendering.

[0147] Furthermore, based on any of the above embodiments, step 602 includes:

[0148] For each sampling coordinate region, a first bubble to be processed with a first size and a second bubble to be processed with a second size are drawn within the sampling coordinate region, wherein the first size is larger than the second size.

[0149] The first bubble to be processed is subtracted from the second bubble to be processed to obtain the third bubble to be processed.

[0150] For each sampling coordinate region, a coordinate transformation operation is performed on the sampling coordinate region according to a preset transformation scale to obtain the sampling coordinate region after size transformation.

[0151] For each sampled coordinate region after size transformation, a fourth bubble of a third size is drawn in the sampled coordinate region after size transformation, wherein the third size is smaller than the second size.

[0152] The target bubble is obtained by superimposing the third bubble to be processed and the fourth bubble to be processed.

[0153] In this embodiment, the display effect of bubbles in practical applications is generally that there is a hollow area in the middle and a highlight area on the outside. Therefore, in order to improve the realism of the target bubble, a first bubble of a first size and a second bubble of a second size can be drawn in each sampling coordinate area. The first size is larger than the second size.

[0154] Figure 8 This is a schematic diagram of the first bubble to be processed provided in an embodiment of this disclosure, as shown below. Figure 8As shown, a first bubble 82 to be processed can be drawn within each sampling coordinate region 81. Optionally, the first bubble 82 to be processed can be multiplied by the target parameter corresponding to the sampling coordinate region to present a display effect of different sizes.

[0155] Since the first and second bubbles to be processed have different sizes, a subtraction operation is performed between them to obtain a third bubble to be processed. This third bubble then displays an effect with a hollow area in the center.

[0156] Figure 9 This is a schematic diagram of the third bubble to be processed provided in an embodiment of this disclosure, as shown below. Figure 9 As shown, by subtracting the first bubble to be processed from the second bubble to be processed, a third bubble to be processed 92 can be displayed in each sampling coordinate region 91, wherein the third bubble to be processed 92 includes a hollow region.

[0157] Furthermore, since the highlight areas of bubbles are generally located on the sides of the bubbles, a coordinate transformation operation is performed on each sampling coordinate region according to a preset transformation scale to obtain a size-transformed sampling coordinate region. For each size-transformed sampling coordinate region, a fourth bubble of the third size is drawn within the size-transformed sampling coordinate region, where the third size is smaller than the second size. The third and fourth bubbles are then superimposed, i.e., the highlight area is superimposed on the third bubble, to obtain the target bubble. This yields a target region that includes both hollow and highlight areas.

[0158] Figure 10 This is a schematic diagram of the target bubble provided in an embodiment of the present disclosure, such as... Figure 10 As shown, a target bubble 1002 can be displayed within each sampling coordinate region 1001, wherein the target bubble 1002 includes a hollow region and a highlight region.

[0159] The liquid rendering method provided in this embodiment obtains a third bubble with a hollow area in the middle by drawing a first bubble and a second bubble of different sizes. Further, by performing a coordinate transformation operation on the sampling coordinate region according to a preset transformation scale, a fourth bubble is drawn based on the size-transformed sampling coordinate region. This allows the addition of a highlight area to the third bubble, resulting in a target bubble that includes both a hollow area and a highlight area. This improves the realism of the target bubble and enhances the display effect of the rendered content.

[0160] Furthermore, based on any of the above embodiments, after step 602, the method further includes:

[0161] For each sampling coordinate region, the target parameter corresponding to the sampling coordinate region is calculated based on the coordinate value corresponding to the sampling coordinate region.

[0162] A multiplication operation is performed between the target bubble in each of the sampling coordinate regions and the target parameter to make the target bubble size different in each of the sampling coordinate regions.

[0163] In this embodiment, since the size of bubbles generated by liquid sloshing varies in real-world applications, to improve the realism of the rendered target bubbles, a target parameter is calculated for each sampling coordinate region based on its corresponding coordinate value. For example, if the coordinate value of the sampling coordinate region is (1,1), the target parameter is 1 obtained by multiplying the result by 1. If the coordinate value is (2,2), the target parameter is 4 obtained by multiplying the result by 2. Because the coordinate values ​​of each sampling coordinate region are different, the target parameter for each sampling coordinate region is also different.

[0164] By multiplying the target bubble with the target parameter in each sampling coordinate region, the size of the target bubble in each sampling coordinate region can be made different.

[0165] Optionally, the operation of processing the bubble by the target parameter can be performed after the first bubble to be processed and the second bubble to be processed are drawn, or after the target bubble is obtained. This disclosure does not limit this.

[0166] The liquid rendering method provided in this embodiment determines the target parameters corresponding to each sampling coordinate region and performs a multiplication operation between the target bubble and the target parameters in each sampling coordinate region, thereby making the target bubble size different in each sampling coordinate region, further improving the display effect of the target bubble and enhancing the realism of the target bubble.

[0167] Furthermore, based on any of the above embodiments, after step 602, the method further includes:

[0168] For each of the sampling coordinate regions, a Berlin noise map is extracted.

[0169] Based on the Berlin noise map, target bubbles are drawn within the sampling coordinate area and processed to obtain target bubbles of irregular size.

[0170] In this embodiment, since the bubbles generated by liquid sloshing are irregular in practical applications, a Berlin noise map can be extracted for each sampling coordinate region to further improve the realism of the target bubbles. Based on the Berlin noise map, the target bubbles drawn within the sampling coordinate region are processed to obtain target bubbles of irregular size.

[0171] The liquid rendering method provided in this embodiment extracts a Burmester noise map based on each sampling coordinate region and processes the target bubbles drawn within the sampling coordinate region according to the extracted Burmester noise map, thereby obtaining target bubbles of irregular size, further improving the display effect of the target bubbles and enhancing their realism.

[0172] Furthermore, based on any of the above embodiments, step 603 includes:

[0173] For each time frame, the rising speed of the bubble corresponding to that time frame is determined based on the bubble rate pool.

[0174] The longitudinal offset of the target bubble is determined based on the rising speed and time frame.

[0175] The target bubble is controlled to rise based on the longitudinal offset value.

[0176] In this embodiment, time can be used as the offset value in the v direction of uv to achieve the effect of the target bubble rising. Specifically, for each time frame, the rising speed of the bubble corresponding to the time frame is determined according to the bubble rate pool. The vertical offset value of the target bubble is determined according to the rising speed and the time frame. The target bubble is controlled to rise according to the vertical offset value. That is, the original uv value (uv.u, uv.v) of the target bubble can be adjusted to (uv.u, uv.v + time * speed). Where time is the time frame and speed is the rising speed of the bubble.

[0177] The liquid rendering method provided in this embodiment determines the rising speed of the bubble corresponding to a time frame based on the bubble rate pool, and determines the vertical offset value of the target bubble based on the rising speed and the time frame. The target bubble is controlled to rise based on the vertical offset value, thereby achieving a rising effect and enriching the display effect of the liquid to be rendered.

[0178] Figure 11 This is a schematic diagram of the structure of the liquid rendering apparatus provided in the embodiments of this disclosure, as shown below. Figure 11As shown, the device includes an acquisition module 1101, a calculation module 1102, and a rendering module 1103. The acquisition module 1101 is used to acquire initial data generated based on the user-triggered interactive operation in response to a user-triggered liquid rendering request. The calculation module 1102 is used to calculate target rendering data for rendering preset content to be rendered based on the initial data, wherein the content to be rendered includes a liquid to be rendered and at least one object to be rendered generated by the liquid in response to the interactive operation. The rendering module 1103 is used to perform a rendering operation on the content to be rendered based on the target rendering data to obtain the rendered target content.

[0179] Furthermore, based on any of the above embodiments, the acquisition module is configured to: in response to a liquid rendering request triggered by the user's movement operation on the terminal device, collect motion data of the terminal device during movement using preset sensors in the terminal device. The motion data is then determined as the initial data, wherein the motion data includes spatial pose transformation information and motion speed information.

[0180] Further, based on any of the above embodiments, the calculation module is configured to: perform preprocessing operations on the initial data to obtain the data to be calculated corresponding to each time frame during the interaction operation; calculate the target difference between the data to be calculated in two adjacent frames to obtain multiple target differences corresponding to the interaction operation; calculate the target sum corresponding to the multiple target differences; and calculate the target rendering data used to render preset content to be rendered based on the target sum.

[0181] Furthermore, based on any of the above embodiments, the calculation module is configured to: determine the target motion data corresponding to the target accumulated sum according to the preset correspondence between the accumulated sum and the motion data of the content to be rendered; and calculate the target rendering data for rendering the preset content to be rendered based on the target motion data and user-preset control data.

[0182] Further, based on any of the above embodiments, the content to be rendered includes the liquid to be rendered and / or the foam to be rendered generated by the liquid to be rendered in response to the interactive operation. The initial data includes motion speed information. The calculation module is configured to: for any moving point in the liquid to be rendered perpendicular to the liquid surface, calculate the tension information of the moving point on the preset target point in each time frame based on the position vector between the moving point and the preset target point in the liquid to be rendered and the velocity vector of the moving point, and determine the tension information as the data to be calculated.

[0183] Furthermore, based on any of the above embodiments, the content to be rendered includes the bubbles generated by the liquid in response to the interactive operation. The initial data includes spatial pose transformation information. The calculation module is used to: extract the Euler angles of rotation in a preset direction within each time frame from the spatial pose transformation information, and determine the Euler angles of rotation as the data to be calculated.

[0184] Furthermore, based on any of the above embodiments, the content to be rendered includes foam generated by the liquid to be rendered in response to the interactive operation. The target motion data includes the foam generation rate. The control data includes the foam dissipation rate. The calculation module is configured to: construct a foam stock pool based on the foam generation rate and the foam dissipation rate, wherein the foam stock pool includes the thickness of the foam layer for each time frame.

[0185] Further, based on any of the above embodiments, the content to be rendered includes bubbles generated by the liquid to be rendered in response to the interactive operation. The target motion data includes bubble velocity increments. The control data includes bubble velocity decrements. The calculation module is configured to: construct a bubble rate pool based on the bubble velocity increments and the bubble velocity decrements, wherein the bubble rate pool includes the rising velocity of the bubbles in each time frame.

[0186] Furthermore, based on any of the above embodiments, the content to be rendered includes a liquid to be rendered. The calculation module is configured to: determine the target turbidity corresponding to the target accumulated sum according to a preset correspondence between the accumulated sum and the turbidity of the liquid to be rendered, and determine the target turbidity as the target rendering data.

[0187] Furthermore, based on any of the above embodiments, the content to be rendered includes a liquid to be rendered. The rendering module is configured to: perform a color mixing rendering operation on a preset shallow water area and a preset deep water area in the liquid to be rendered according to the target rendering data.

[0188] Furthermore, based on any of the above embodiments, the target rendering data further includes the target turbidity corresponding to the liquid to be rendered. The device further includes: an adjustment module, used to adjust the transparency of the liquid to be rendered according to the target turbidity, wherein the target turbidity is inversely proportional to the transparency.

[0189] Further, based on any of the above embodiments, the content to be rendered includes foam generated by the liquid to be rendered in response to the interactive operation. The target rendering data includes a foam inventory pool. The rendering module is configured to: determine the foam thickness corresponding to the current time frame based on the foam inventory pool for each time frame; generate a target mask matching the foam thickness based on the foam thickness; and perform a rendering operation based on the target mask and preset liquid and foam to be rendered to obtain the rendered target content.

[0190] Furthermore, based on any of the above embodiments, the content to be rendered includes bubbles generated by the liquid in response to the interactive operation, and the target rendering data includes a bubble rate pool. The rendering module is configured to: perform a block operation on preset texture sampling coordinates to obtain multiple sampling coordinate regions; draw a target bubble within each sampling coordinate region; and control the target bubble to perform an upward movement according to the target rendering data.

[0191] Furthermore, based on any of the above embodiments, the rendering module is configured to: multiply the texture sampling coordinates by a preset magnification factor to obtain processed texture sampling coordinates; and take the remainder corresponding to a preset value from the processed texture sampling coordinates to obtain multiple sampling coordinate regions.

[0192] Further, based on any of the above embodiments, the rendering module is configured to: for each sampling coordinate region, draw a first bubble of a first size and a second bubble of a second size within the sampling coordinate region, wherein the first size is larger than the second size; perform a subtraction operation between the first bubble and the second bubble to obtain a third bubble; perform a coordinate transformation operation on each sampling coordinate region according to a preset transformation scale to obtain a size-transformed sampling coordinate region; for each size-transformed sampling coordinate region, draw a fourth bubble of a third size within the size-transformed sampling coordinate region, wherein the third size is smaller than the second size; and perform a superposition operation between the third bubble and the fourth bubble to obtain the target bubble.

[0193] Furthermore, based on any of the above embodiments, the rendering module is further configured to: calculate the target parameter corresponding to each sampling coordinate region based on the coordinate value corresponding to the sampling coordinate region; and perform a multiplication operation between the target bubble in each sampling coordinate region and the target parameter to make the target bubble size different in each sampling coordinate region.

[0194] Furthermore, based on any of the above embodiments, the rendering module is further configured to: extract a Berlin noise map for each sampling coordinate region; and perform data processing on the target bubbles drawn within the sampling coordinate region according to the Berlin noise map to obtain target bubbles of irregular size.

[0195] Further, based on any of the above embodiments, the rendering module is configured to: for each time frame, determine the rising speed of the bubble corresponding to the time frame according to the bubble rate pool; determine the longitudinal offset value of the target bubble according to the rising speed and the time frame; and control the target bubble to perform rising motion according to the longitudinal offset value.

[0196] The device provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0197] To implement the above embodiments, this disclosure also provides an electronic device, including: a processor and a memory;

[0198] The memory stores computer-executed instructions;

[0199] The processor executes computer execution instructions stored in the memory, causing the processor to perform the liquid rendering method as described in any of the above embodiments.

[0200] Figure 12 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this disclosure, such as... Figure 12 As shown, the electronic device 1200 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 12 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0201] like Figure 12As shown, the electronic device 1200 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage device 1208 into a random access memory (RAM) 1203. The RAM 1203 also stores various programs and data required for the operation of the electronic device 1200. The processing unit 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0202] Typically, the following devices can be connected to I / O interface 1205: input devices 1206 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1207 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1208 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1209. Communication device 1209 allows electronic device 1200 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 12 An electronic device 1200 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0203] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1209, or installed from storage device 1208, or installed from ROM 1202. When the computer program is executed by processing device 1201, it performs the functions defined in the methods of embodiments of this disclosure.

[0204] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0205] This disclosure also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the liquid rendering method as described in any of the above embodiments.

[0206] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the liquid rendering method as described in any of the above embodiments.

[0207] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0208] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

[0209] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0210] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0211] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0212] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0213] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0214] In a first aspect, according to one or more embodiments of the present disclosure, a liquid rendering method is provided, comprising:

[0215] In response to a user-triggered liquid rendering request, initial data generated based on the user-triggered interactive operation is obtained;

[0216] Target rendering data for rendering preset content to be rendered is calculated based on the initial data, wherein the content to be rendered includes a liquid to be rendered and at least one object to be rendered generated by the liquid to be rendered in response to the interactive operation.

[0217] The content to be rendered is rendered based on the target rendering data to obtain the rendered target content.

[0218] According to one or more embodiments of this disclosure, the step of obtaining initial data generated based on the user-triggered interactive operation in response to a user-triggered liquid rendering request includes:

[0219] In response to a liquid rendering request triggered by the user's movement operation on the terminal device, motion data of the terminal device during movement is collected by a preset sensor in the terminal device.

[0220] The motion data is determined as the initial data, wherein the motion data includes spatial pose transformation information and motion speed information.

[0221] According to one or more embodiments of this disclosure, calculating target rendering data for rendering preset content to be rendered based on the initial data includes:

[0222] The initial data is preprocessed to obtain the data to be calculated for each time frame during the interaction process;

[0223] Calculate the target difference between two adjacent frames of data to be calculated, and obtain multiple target differences corresponding to the interactive operation;

[0224] Calculate the cumulative sum of the targets corresponding to the multiple target differences;

[0225] The target rendering data used to render the preset content to be rendered is calculated based on the target summation.

[0226] According to one or more embodiments of this disclosure, the step of calculating target rendering data for rendering preset content to be rendered based on the target summation includes:

[0227] Based on the preset correspondence between the accumulated sum and the motion data of the content to be rendered, the target motion data corresponding to the target accumulated sum is determined;

[0228] Target rendering data for rendering preset content is calculated based on the target motion data and user-preset control data.

[0229] According to one or more embodiments of this disclosure, the content to be rendered includes a liquid to be rendered and / or foam generated by the liquid to be rendered in response to the interactive operation; the initial data includes motion speed information;

[0230] The preprocessing operation on the initial data to obtain the data to be calculated for each time frame during the interaction operation includes:

[0231] For any moving point perpendicular to the surface of the liquid to be rendered, the tension information of the moving point on the preset target point in each time frame is calculated based on the position vector between the moving point and the preset target point in the liquid to be rendered and the velocity vector of the moving point. The tension information is then determined as the data to be calculated.

[0232] According to one or more embodiments of this disclosure, the content to be rendered includes bubbles generated by the liquid to be rendered in response to the interactive operation; the initial data includes spatial pose transformation information;

[0233] The preprocessing operation on the initial data to obtain the data to be calculated for each time frame during the interaction operation includes:

[0234] Extract the Euler angles of rotation in a preset direction within each time frame from the spatial pose transformation information, and determine the Euler angles of rotation as the data to be calculated.

[0235] According to one or more embodiments of this disclosure, the content to be rendered includes foam generated by a liquid in response to the interactive operation; the target motion data includes the foam generation rate; and the control data includes the foam dissipation rate.

[0236] The step of calculating target rendering data for rendering preset content based on the target motion data and user-preset control data includes:

[0237] A foam stockpile is constructed based on the foam generation rate and the foam dissipation rate, wherein the foam stockpile includes the thickness of the foam layer for each time frame.

[0238] According to one or more embodiments of this disclosure, the content to be rendered includes bubbles generated by a liquid to be rendered in response to the interactive operation; the target motion data includes bubble velocity increments; and the control data includes bubble velocity decrements.

[0239] The step of calculating target rendering data for rendering preset content based on the target motion data and user-preset control data includes:

[0240] A bubble rate pool is constructed based on the bubble velocity increment and the bubble velocity decrement, wherein the bubble rate pool includes the bubble rise velocity for each time frame.

[0241] According to one or more embodiments of this disclosure, the content to be rendered includes a liquid to be rendered;

[0242] The step of calculating the target rendering data for rendering the preset content to be rendered based on the target summation includes:

[0243] Based on the preset correspondence between the cumulative sum and the turbidity of the liquid to be rendered, the target turbidity corresponding to the target cumulative sum is determined, and the target turbidity is determined as the target rendering data.

[0244] According to one or more embodiments of this disclosure, the content to be rendered includes a liquid to be rendered; the rendering operation on the content to be rendered based on the target rendering data includes:

[0245] Based on the target rendering data, a color mixing rendering operation is performed on the preset shallow water area and the preset deep water area in the liquid to be rendered.

[0246] According to one or more embodiments of this disclosure, the target rendering data further includes the target turbidity corresponding to the liquid to be rendered;

[0247] After performing color mixing rendering on the preset shallow water area and preset deep water area in the liquid to be rendered based on the target rendering data, the process further includes:

[0248] The transparency of the liquid to be rendered is adjusted according to the target turbidity, wherein the target turbidity is inversely proportional to the transparency.

[0249] According to one or more embodiments of this disclosure, the content to be rendered includes foam generated by a liquid in response to the interactive operation; the target rendering data includes a foam storage pool.

[0250] The rendering operation of the content to be rendered based on the target rendering data includes:

[0251] For each time frame, the foam thickness corresponding to the current time frame is determined based on the foam stock pool;

[0252] Generate a target mask that matches the foam thickness based on the foam thickness;

[0253] The rendering operation is performed based on the target mask and the preset liquid and foam to be rendered to obtain the rendered target content.

[0254] According to one or more embodiments of this disclosure, the content to be rendered includes bubbles generated by a liquid to be rendered in response to the interactive operation, and the target rendering data includes a bubble rate pool.

[0255] The rendering operation of the content to be rendered based on the target rendering data includes:

[0256] The preset texture sampling coordinates are divided into blocks to obtain multiple sampling coordinate regions;

[0257] For each sampling coordinate region, draw the target bubble within the sampling coordinate region;

[0258] The target bubble is controlled to rise according to the target rendering data.

[0259] According to one or more embodiments of this disclosure, the step of dividing the preset texture sampling coordinates into blocks to obtain multiple sampling coordinate regions includes:

[0260] The texture sampling coordinates are multiplied by a preset magnification factor to obtain the processed texture sampling coordinates;

[0261] The remainder corresponding to the preset value is taken from the processed texture sampling coordinates to obtain multiple sampling coordinate regions.

[0262] According to one or more embodiments of this disclosure, drawing the target bubble within the sampling coordinate region includes:

[0263] For each sampling coordinate region, a first bubble to be processed with a first size and a second bubble to be processed with a second size are drawn within the sampling coordinate region, wherein the first size is larger than the second size;

[0264] The first bubble to be processed and the second bubble to be processed are subtracted to obtain the third bubble to be processed.

[0265] For each sampling coordinate region, a coordinate transformation operation is performed on the sampling coordinate region according to a preset transformation scale to obtain the sampling coordinate region after size transformation;

[0266] For each sampled coordinate region after size transformation, a fourth bubble of a third size is drawn in the sampled coordinate region after size transformation, wherein the third size is smaller than the second size;

[0267] The target bubble is obtained by superimposing the third bubble to be processed and the fourth bubble to be processed.

[0268] According to one or more embodiments of this disclosure, after drawing a target bubble within each sampling coordinate region, the method further includes:

[0269] For each sampling coordinate region, the target parameter corresponding to the sampling coordinate region is calculated based on the coordinate value corresponding to the sampling coordinate region.

[0270] A multiplication operation is performed between the target bubble in each of the sampling coordinate regions and the target parameter to make the target bubble size different in each of the sampling coordinate regions.

[0271] According to one or more embodiments of this disclosure, after drawing a target bubble within each sampling coordinate region, the method further includes:

[0272] For each of the sampling coordinate regions, a Berlin noise map is extracted;

[0273] Based on the Berlin noise map, target bubbles are drawn within the sampling coordinate area and processed to obtain target bubbles of irregular size.

[0274] According to one or more embodiments of this disclosure, controlling the target bubble to rise based on the target rendering data includes:

[0275] For each time frame, the rising speed of the bubble corresponding to the time frame is determined according to the bubble rate pool;

[0276] The longitudinal offset value of the target bubble is determined based on the rising speed and time frame;

[0277] The target bubble is controlled to rise based on the longitudinal offset value.

[0278] Secondly, according to one or more embodiments of this disclosure, a liquid rendering apparatus is provided, comprising:

[0279] The acquisition module is used to acquire initial data generated based on the user-triggered interactive operation in response to a liquid rendering request.

[0280] The calculation module is used to calculate target rendering data for rendering preset content to be rendered based on the initial data, wherein the content to be rendered includes a liquid to be rendered and at least one object to be rendered generated by the liquid to be rendered in response to the interactive operation.

[0281] The rendering module is used to perform rendering operations on the content to be rendered based on the target rendering data, so as to obtain the rendered target content.

[0282] According to one or more embodiments of this disclosure, the acquisition module is configured to:

[0283] In response to a liquid rendering request triggered by the user's movement operation on the terminal device, motion data of the terminal device during movement is collected by a preset sensor in the terminal device.

[0284] The motion data is determined as the initial data, wherein the motion data includes spatial pose transformation information and motion speed information.

[0285] According to one or more embodiments of this disclosure, the computing module is configured to:

[0286] The initial data is preprocessed to obtain the data to be calculated for each time frame during the interaction process;

[0287] Calculate the target difference between two adjacent frames of data to be calculated, and obtain multiple target differences corresponding to the interactive operation;

[0288] Calculate the cumulative sum of the targets corresponding to the multiple target differences;

[0289] The target rendering data used to render the preset content to be rendered is calculated based on the target summation.

[0290] According to one or more embodiments of this disclosure, the computing module is configured to:

[0291] Based on the preset correspondence between the accumulated sum and the motion data of the content to be rendered, the target motion data corresponding to the target accumulated sum is determined;

[0292] Target rendering data for rendering preset content is calculated based on the target motion data and user-preset control data.

[0293] According to one or more embodiments of this disclosure, the content to be rendered includes a liquid to be rendered and / or foam generated by the liquid to be rendered in response to the interactive operation; the initial data includes motion speed information;

[0294] The computing module is used for:

[0295] For any moving point perpendicular to the surface of the liquid to be rendered, the tension information of the moving point on the preset target point in each time frame is calculated based on the position vector between the moving point and the preset target point in the liquid to be rendered and the velocity vector of the moving point. The tension information is then determined as the data to be calculated.

[0296] According to one or more embodiments of this disclosure, the content to be rendered includes bubbles generated by the liquid to be rendered in response to the interactive operation; the initial data includes spatial pose transformation information;

[0297] The computing module is used for:

[0298] Extract the Euler angles of rotation in a preset direction within each time frame from the spatial pose transformation information, and determine the Euler angles of rotation as the data to be calculated.

[0299] According to one or more embodiments of this disclosure, the content to be rendered includes foam generated by a liquid in response to the interactive operation; the target motion data includes the foam generation rate; and the control data includes the foam dissipation rate.

[0300] The computing module is used for:

[0301] A foam stockpile is constructed based on the foam generation rate and the foam dissipation rate, wherein the foam stockpile includes the thickness of the foam layer for each time frame.

[0302] According to one or more embodiments of this disclosure, the content to be rendered includes bubbles generated by a liquid to be rendered in response to the interactive operation; the target motion data includes bubble velocity increments; and the control data includes bubble velocity decrements.

[0303] The computing module is used for:

[0304] A bubble rate pool is constructed based on the bubble velocity increment and the bubble velocity decrement, wherein the bubble rate pool includes the bubble rise velocity for each time frame.

[0305] According to one or more embodiments of this disclosure, the content to be rendered includes a liquid to be rendered;

[0306] The computing module is used for:

[0307] Based on the preset correspondence between the cumulative sum and the turbidity of the liquid to be rendered, the target turbidity corresponding to the target cumulative sum is determined, and the target turbidity is determined as the target rendering data.

[0308] According to one or more embodiments of this disclosure, the content to be rendered includes a liquid to be rendered; the rendering module is configured to:

[0309] Based on the target rendering data, a color mixing rendering operation is performed on the preset shallow water area and the preset deep water area in the liquid to be rendered.

[0310] According to one or more embodiments of this disclosure, the target rendering data further includes the target turbidity corresponding to the liquid to be rendered;

[0311] The device further includes:

[0312] An adjustment module is used to adjust the transparency of the liquid to be rendered according to the target turbidity, wherein the target turbidity is inversely proportional to the transparency.

[0313] According to one or more embodiments of this disclosure, the content to be rendered includes foam generated by a liquid in response to the interactive operation; the target rendering data includes a foam storage pool.

[0314] The rendering module is used for:

[0315] For each time frame, the foam thickness corresponding to the current time frame is determined based on the foam stock pool;

[0316] Generate a target mask that matches the foam thickness based on the foam thickness;

[0317] The rendering operation is performed based on the target mask and the preset liquid and foam to be rendered to obtain the rendered target content.

[0318] According to one or more embodiments of this disclosure, the content to be rendered includes bubbles generated by a liquid to be rendered in response to the interactive operation, and the target rendering data includes a bubble rate pool.

[0319] The rendering module is used for:

[0320] The preset texture sampling coordinates are divided into blocks to obtain multiple sampling coordinate regions;

[0321] For each sampling coordinate region, draw the target bubble within the sampling coordinate region;

[0322] The target bubble is controlled to rise according to the target rendering data.

[0323] According to one or more embodiments of this disclosure, the rendering module is configured to:

[0324] The texture sampling coordinates are multiplied by a preset magnification factor to obtain the processed texture sampling coordinates;

[0325] The remainder corresponding to the preset value is taken from the processed texture sampling coordinates to obtain multiple sampling coordinate regions.

[0326] According to one or more embodiments of this disclosure, the rendering module is configured to:

[0327] For each sampling coordinate region, a first bubble to be processed with a first size and a second bubble to be processed with a second size are drawn within the sampling coordinate region, wherein the first size is larger than the second size;

[0328] The first bubble to be processed and the second bubble to be processed are subtracted to obtain the third bubble to be processed.

[0329] For each sampling coordinate region, a coordinate transformation operation is performed on the sampling coordinate region according to a preset transformation scale to obtain the sampling coordinate region after size transformation;

[0330] For each sampled coordinate region after size transformation, a fourth bubble of a third size is drawn in the sampled coordinate region after size transformation, wherein the third size is smaller than the second size;

[0331] The target bubble is obtained by superimposing the third bubble to be processed and the fourth bubble to be processed.

[0332] According to one or more embodiments of this disclosure, the rendering module is further configured to:

[0333] For each sampling coordinate region, the target parameter corresponding to the sampling coordinate region is calculated based on the coordinate value corresponding to the sampling coordinate region.

[0334] A multiplication operation is performed between the target bubble in each of the sampling coordinate regions and the target parameter to make the target bubble size different in each of the sampling coordinate regions.

[0335] According to one or more embodiments of this disclosure, the rendering module is further configured to:

[0336] For each of the sampling coordinate regions, a Berlin noise map is extracted;

[0337] Based on the Berlin noise map, target bubbles are drawn within the sampling coordinate area and processed to obtain target bubbles of irregular size.

[0338] According to one or more embodiments of this disclosure, the rendering module is configured to:

[0339] For each time frame, the rising speed of the bubble corresponding to the time frame is determined according to the bubble rate pool;

[0340] The longitudinal offset value of the target bubble is determined based on the rising speed and time frame;

[0341] The target bubble is controlled to rise based on the longitudinal offset value.

[0342] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;

[0343] The memory stores computer-executed instructions;

[0344] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the liquid rendering method as described in the first aspect and various possible designs of the first aspect.

[0345] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, implement the liquid rendering method described in the first aspect and various possible designs of the first aspect.

[0346] Fifthly, according to one or more embodiments of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the liquid rendering method described in the first aspect and various possible designs of the first aspect.

[0347] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0348] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0349] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A liquid rendering method, characterized in that, include: In response to a user-triggered liquid rendering request, initial data generated based on the user-triggered interactive operation is obtained; The initial data is preprocessed to obtain the data to be calculated for each time frame during the interaction process; Calculate the target difference between two adjacent frames of data to be calculated, obtain multiple target differences corresponding to the interaction operation, and the target summation corresponding to the multiple target differences; The target rendering data for rendering the preset content to be rendered is calculated based on the target summation; wherein, the content to be rendered includes the liquid to be rendered and at least one object to be rendered generated by the liquid to be rendered in response to the interactive operation; The content to be rendered is rendered based on the target rendering data to obtain the rendered target content.

2. The method according to claim 1, characterized in that, The process of responding to a user-triggered liquid rendering request and acquiring initial data generated based on the user-triggered interaction includes: In response to a liquid rendering request triggered by the user's movement operation on the terminal device, motion data of the terminal device during movement is collected by a preset sensor in the terminal device. The motion data is determined as the initial data, wherein the motion data includes spatial pose transformation information and motion speed information.

3. The method according to claim 1, characterized in that, The step of calculating the target rendering data for rendering the preset content to be rendered based on the target summation includes: Based on the preset correspondence between the accumulated sum and the motion data of the content to be rendered, the target motion data corresponding to the target accumulated sum is determined; Target rendering data for rendering preset content is calculated based on the target motion data and user-preset control data.

4. The method according to claim 1, characterized in that, The content to be rendered includes the liquid to be rendered; The step of calculating the target rendering data for rendering the preset content to be rendered based on the target summation includes: Based on the preset correspondence between the cumulative sum and the turbidity of the liquid to be rendered, the target turbidity corresponding to the target cumulative sum is determined, and the target turbidity is determined as the target rendering data.

5. The method according to any one of claims 1-4, characterized in that, The content to be rendered includes a liquid to be rendered; the rendering operation of the content to be rendered based on the target rendering data includes: Based on the target rendering data, a color mixing rendering operation is performed on the preset shallow water area and the preset deep water area in the liquid to be rendered.

6. The method according to claim 5, characterized in that, The target rendering data also includes the target turbidity of the liquid to be rendered; After performing color mixing rendering on the preset shallow water area and preset deep water area in the liquid to be rendered based on the target rendering data, the process further includes: The transparency of the liquid to be rendered is adjusted according to the target turbidity, wherein the target turbidity is inversely proportional to the transparency.

7. The method according to any one of claims 1-4, characterized in that, The content to be rendered includes foam generated by the liquid in response to the interactive operation. The target rendering data includes a foam stock pool; The rendering operation of the content to be rendered based on the target rendering data includes: For each time frame, the foam thickness corresponding to the current time frame is determined based on the foam stock pool; Generate a target mask that matches the foam thickness based on the foam thickness; The rendering operation is performed based on the target mask and the preset liquid and foam to be rendered to obtain the rendered target content.

8. The method according to any one of claims 1-4, characterized in that, The content to be rendered includes bubbles generated by the liquid to be rendered in response to the interactive operation, and the target rendering data includes a bubble rate pool. The rendering operation of the content to be rendered based on the target rendering data includes: The preset texture sampling coordinates are divided into blocks to obtain multiple sampling coordinate regions; For each sampling coordinate region, draw the target bubble within the sampling coordinate region; The target bubble is controlled to rise according to the target rendering data.

9. The method according to claim 8, characterized in that, The step of dividing the preset texture sampling coordinates into blocks to obtain multiple sampling coordinate regions includes: The texture sampling coordinates are multiplied by a preset magnification factor to obtain the processed texture sampling coordinates; The remainder corresponding to the preset value is taken from the processed texture sampling coordinates to obtain multiple sampling coordinate regions.

10. The method according to claim 8, characterized in that, After drawing the target bubble within each sampling coordinate region, the process further includes: For each sampling coordinate region, the target parameter corresponding to the sampling coordinate region is calculated based on the coordinate value corresponding to the sampling coordinate region; A multiplication operation is performed between the target bubble in each of the sampling coordinate regions and the target parameter to make the target bubble size different in each of the sampling coordinate regions.

11. The method according to claim 8, characterized in that, After drawing the target bubble within each sampling coordinate region, the process further includes: For each of the sampling coordinate regions, a Berlin noise map is extracted; Based on the Berlin noise map, target bubbles are drawn within the sampling coordinate area and processed to obtain target bubbles of irregular size.

12. The method according to claim 8, characterized in that, The step of controlling the target bubble to rise based on the target rendering data includes: For each time frame, the rising speed of the bubble corresponding to the time frame is determined according to the bubble rate pool; The longitudinal offset value of the target bubble is determined based on the rising speed and time frame; The target bubble is controlled to rise based on the longitudinal offset value.

13. A liquid rendering apparatus, characterized in that, include: The acquisition module is used to acquire initial data generated based on the user-triggered interactive operation in response to a liquid rendering request. The calculation module is used to preprocess the initial data to obtain the data to be calculated for each time frame during the interaction operation. Calculate the target difference between two adjacent frames of data to be calculated, obtain multiple target differences corresponding to the interaction operation, and the target summation corresponding to the multiple target differences; The target rendering data for rendering the preset content to be rendered is calculated based on the target summation; wherein, the content to be rendered includes the liquid to be rendered and at least one object to be rendered generated by the liquid to be rendered in response to the interactive operation; The rendering module is used to perform rendering operations on the content to be rendered based on the target rendering data, so as to obtain the rendered target content.

14. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the liquid rendering method as described in any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the liquid rendering method as described in any one of claims 1 to 12.

16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the liquid rendering method as described in any one of claims 1 to 12.