Fluid rendering method and device, electronic equipment and computer readable storage medium

CN116363277BActive Publication Date: 2026-09-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310190028.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2026-09-25
Estimated Expiration
2043-02-21

AI Technical Summary

Technical Problem

[0004]但是,三维软件依赖顶点、法线等模型信息,适合生成三维流体效果(例如,海浪、烟雾、流沙、云),但对于二维的Flowmap而言,制作过程过于复杂,生成效率低

Benefits of technology

[0010]本发明实施例提供的技术方案中,获取包含流体的目标HSV通道图像,目标HSV通道图像中包括多个灰度区域;对目标HSV通道图像进行采样,得到多个灰度值和初始UV向量,其中,灰度值用于指示对应的灰度区域中流体纹理的流动方向;根据多个灰度值和初始UV向量生成流体在多方向上的UV图像;通过预置的时间函数和多方向上的UV图像,渲染得到流体随时间在二维平面上的多方向流动效果。本发明实施例,通过在目标HSV通道图像上绘制不同的灰度区域来模拟不同的流动区域,再结合预置的时间函数模拟每个灰度区域中流体纹理的流动方向,从而模拟流体在二维平面上的多方向流动效果,提高了流体渲染效率,降低了内存的占用率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116363277B_ABST
    Figure CN116363277B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and discloses a fluid rendering method and device, electronic equipment and computer readable storage medium, which are used for simulating multiple flow directions of fluid on a two-dimensional plane by combining the gray value of an HSV channel image with a time function, improving fluid rendering efficiency and reducing memory occupancy. The method comprises the following steps: obtaining a target HSV channel image containing fluid, wherein the target HSV channel image comprises multiple gray regions; sampling the target HSV channel image to obtain multiple gray values and initial UV vectors, wherein the gray value is used to indicate the flow direction of fluid texture in the corresponding gray region; generating an UV image of fluid in multiple directions according to the multiple gray values and the initial UV vectors; and rendering the multiple-direction flow effect of fluid on a two-dimensional plane over time by using a preset time function and the UV image in multiple directions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Flow effects mainly include unidirectional flow effects and multidirectional flow effects. Unidirectional flow effects are mainly achieved by combining UV flow and seamless texture loop flow; while multidirectional flow effects usually use flowmaps.

[0003] Currently, Flowmap primarily uses 3D software to process model information, allowing a specific region of the model to exhibit quantitative flow characteristics, thereby simulating multi-directional flow effects.

[0004] However, 3D software relies on model information such as vertices and normals, which is suitable for generating 3D fluid effects (e.g., ocean waves, smoke, quicksand, clouds), but for 2D flowmaps, the production process is too complicated and the generation efficiency is low. Summary of the Invention

[0005] This invention provides a fluid rendering method, apparatus, electronic device, and computer-readable storage medium for simulating multiple flow directions of fluid on a two-dimensional plane by combining the grayscale values ​​of HSV channel images with a time function, thereby improving fluid rendering efficiency and reducing memory usage.

[0006] A first aspect of this invention provides a fluid rendering method, comprising: acquiring a target HSV channel image containing fluid, the target HSV channel image including multiple grayscale regions; sampling the target HSV channel image to obtain multiple grayscale values ​​and an initial UV vector, wherein the grayscale values ​​are used to indicate the flow direction of the fluid texture in the corresponding grayscale region; generating a multi-directional UV image of the fluid based on the multiple grayscale values ​​and the initial UV vector; and rendering the multi-directional flow effect of the fluid over time on a two-dimensional plane using a preset time function and the multi-directional UV image.

[0007] A second aspect of the present invention provides a fluid rendering apparatus, comprising: an acquisition module for acquiring a target HSV channel image containing fluid, the target HSV channel image including multiple grayscale regions; a sampling module for sampling the target HSV channel image to obtain multiple grayscale values ​​and an initial UV vector, wherein the grayscale values ​​are used to indicate the flow direction of the fluid texture in the corresponding grayscale region; a first generation module for generating a multi-directional UV image of the fluid based on the multiple grayscale values ​​and the initial UV vector; and a second generation module for rendering a multi-directional flow effect of the fluid over time on a two-dimensional plane using a preset time function and the multi-directional UV image.

[0008] A third aspect of the present invention provides an electronic device, including: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the electronic device to perform the fluid rendering method described above.

[0009] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the fluid rendering method described above.

[0010] The technical solution provided in this invention involves acquiring a target HSV channel image containing fluid, the target HSV channel image including multiple grayscale regions; sampling the target HSV channel image to obtain multiple grayscale values ​​and an initial UV vector, wherein the grayscale values ​​are used to indicate the flow direction of the fluid texture in the corresponding grayscale region; generating a multi-directional UV image of the fluid based on the multiple grayscale values ​​and the initial UV vector; and rendering the multi-directional flow effect of the fluid on a two-dimensional plane over time using a preset time function and the multi-directional UV image. This invention simulates different flow regions by drawing different grayscale regions on the target HSV channel image, and then combines this with a preset time function to simulate the flow direction of the fluid texture in each grayscale region, thereby simulating the multi-directional flow effect of the fluid on a two-dimensional plane, improving fluid rendering efficiency and reducing memory usage. Attached Figure Description

[0011] Figure 1 This is a schematic diagram of one embodiment of the fluid rendering method in this invention;

[0012] Figure 2 This is a schematic diagram of the grayscale region in the target HSV channel image in an embodiment of the present invention;

[0013] Figure 3 This is a schematic diagram of another embodiment of the fluid rendering method in this invention;

[0014] Figure 4 This is another schematic diagram of the grayscale region in the target HSV channel image in an embodiment of the present invention;

[0015] Figure 5 This is a schematic diagram of another embodiment of the fluid rendering method in this invention;

[0016] Figure 6 This is a schematic diagram illustrating the correspondence between grayscale values ​​and flow direction in an embodiment of the present invention;

[0017] Figure 7 This is a schematic diagram illustrating the movement direction of each grayscale region in an embodiment of the present invention;

[0018] Figure 8 This is another schematic diagram illustrating the correspondence between grayscale values ​​and flow direction in an embodiment of the present invention;

[0019] Figure 9 This is another schematic diagram illustrating the correspondence between grayscale values ​​and flow direction in an embodiment of the present invention;

[0020] Figure 10 This is a schematic diagram of one embodiment of the fluid rendering device in this invention;

[0021] Figure 11 This is a schematic diagram of one embodiment of the electronic device in this invention. Detailed Implementation

[0022] This invention provides a fluid rendering method, apparatus, electronic device, and computer-readable storage medium for simulating multiple flow directions of fluid on a two-dimensional plane by combining the grayscale values ​​of HSV channel images with a time function, thereby improving fluid rendering efficiency and reducing memory usage.

[0023] It is understood that the present invention can be applied to electronic devices. By way of example and not limitation, the electronic device can be a mobile terminal. This application uses a mobile terminal as an example for illustration.

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

[0025] Please see Figure 1 A flowchart of a fluid rendering method provided in this embodiment of the invention specifically includes:

[0026] 101. Obtain the target HSV channel image containing the fluid. The target HSV channel image includes multiple grayscale regions.

[0027] This process acquires a target HSV channel image containing multiple grayscale regions. The HSV color model includes three channels: H (hue), S (saturation), and V (value). H represents hue in degrees, ranging from 0° to 360°; S represents saturation, ranging from 0 to 1; and V represents brightness, also ranging from 0 to 1. The target HSV channel image is a grayscale image, where 0 represents black, 1 represents white, and decimals between 0 and 1 represent different grayscale levels.

[0028] It is understandable that the brightness value can also be called the luminance value, because the HSV mode can also be called the HSB mode. Therefore, the brightness value (V value in HSV) can also be called the luminance value (B value in HSB). The value range in this embodiment and subsequent embodiments includes two endpoint values.

[0029] It should be noted that because a single-channel image is used, a single channel is a black and white grayscale image with a range of 0 to 1, and the V value of the V channel also ranges from 0 to 1. Changing the V value (brightness value) of the V channel changes the grayscale value, which can more intuitively show the change process and make it easier to understand. This embodiment and subsequent embodiments use the brightness value of the V channel as an example for explanation.

[0030] 102. Sample the target HSV channel image to obtain multiple gray values ​​and an initial UV vector, where the gray values ​​are used to indicate the flow direction of the fluid texture in the corresponding gray area.

[0031] Each grayscale region in the target HSV channel image is sampled to obtain multiple grayscale values. Simultaneously, the initial UV vector corresponding to the target HSV channel image is obtained. The grayscale value corresponding to each grayscale region is used to indicate the flow direction of the fluid texture within that grayscale region. For example, when the target HSV channel image is as follows... Figure 2 As shown, the V value corresponding to the white area in the upper left corner is 1, indicating that the fluid texture in that area has moved towards the area with V=1; the V value corresponding to the gray area in the lower left corner is 0.75, indicating that the fluid texture in that area has moved towards the area with V=0.75; and the V value corresponding to the gray area on the right is 0.5, indicating that the fluid texture in that area has moved towards the area with V=0.5.

[0032] 103. Generate a multi-directional UV image of the fluid based on multiple grayscale values ​​and an initial UV vector.

[0033] Multiple grayscale values ​​are converted into angle values, resulting in multiple rotation angles. Then, based on these rotation angles and the initial UV vector, a multi-directional UV image is generated, containing UV vectors in multiple different directions. Since the initial UV vector is a two-dimensional image, rotation in the two-dimensional plane is around the Z-axis. The initial UV vector is rotated around the Z-axis by a target angle to obtain the rotated UV vector. The target angle is obtained by converting the grayscale values ​​transmitted from the target HSV channel image. For example, when the grayscale value is 0.5, the calculation process is as follows: 0.5 * π = 90°, therefore, the rotation angle corresponding to the grayscale value of 0.5 is 90°.

[0034] 104. By using a preset time function and UV images in multiple directions, the multi-directional flow effect of fluid over time on a two-dimensional plane is rendered.

[0035] By offsetting the UVs in the UV image in multiple directions using a preset time function, and remapping the offset UVs, the multi-directional flow effect of the fluid over time on a two-dimensional plane is rendered. This two-dimensional image with multi-directional flow effect can be called the target manifold.

[0036] It should be noted that UV offset is achieved through a time function, which can be achieved by subtracting the time parameter from the UV vector, i.e., (u,v)-time*speed, where time is the time parameter and speed is the offset speed. When you want to change the flow direction, you can change the sign of the offset speed.

[0037] In this embodiment of the invention, different flow regions are simulated by drawing different grayscale regions on the target HSV channel image, and then the flow direction of the fluid texture in each grayscale region is simulated by combining a preset time function, thereby simulating the multi-directional flow effect of fluid on a two-dimensional plane, improving fluid rendering efficiency and reducing memory usage.

[0038] Please see Figure 3 Another flowchart of the fluid rendering method provided in this embodiment of the invention specifically includes:

[0039] 301. Obtain an initial texture containing fluid, which includes multiple HSV channels.

[0040] Specifically, an initial texture containing the fluid is obtained. The initial texture is a multi-channel image, which includes three HSV channels: H channel, S channel, and V channel. H (hues) represents hue, with the unit being angles and a value range of 0° to 360°. S (saturation) represents saturation, with a value range of 0 to 1. V (value) represents brightness, with a value range of 0 to 1.

[0041] 302. Extract the first channel image from the initial texture. The first channel image corresponds to the first channel among multiple HSV channels.

[0042] Specifically, select any one of the three channels in the HSV channel. The single-channel image is a grayscale image, and the channel value is the grayscale value. 0 represents black, 1 represents white, and decimals between 0 and 1 represent different grayscale levels. For example, a channel value of 0.5 means a grayscale value of 0.5; a channel value of 0.75 means a grayscale value of 0.75.

[0043] It is understandable that the first channel image can be a brightness channel image, a saturation channel image, or a hue channel image; there are no specific limitations here.

[0044] 303. Draw multiple grayscale regions in the first channel image to obtain a target HSV channel image containing the fluid, wherein each grayscale region corresponds to a grayscale value.

[0045] Specifically, the calculation method for the target HSV channel image varies depending on the channel corresponding to the first channel.

[0046] Optionally, multiple grayscale regions are drawn in the first channel image to obtain a target HSV channel image containing the fluid. This includes: when the first channel image is a brightness channel image, determining multiple grayscale values ​​based on multiple preset brightness values, wherein each grayscale value corresponds to a brightness value; drawing multiple grayscale regions in the brightness channel image based on the multiple grayscale values ​​to generate a target HSV channel image containing the fluid. For example, different brightness values ​​correspond to different drawn grayscale regions, such as... Figure 2 As shown, the areas with a grayscale value of 0.75 and the areas with a grayscale value of 0.5 have different grayscale levels.

[0047] Optionally, multiple grayscale regions are drawn in the first channel image to obtain a target HSV channel image containing fluid, including: when the first channel image is a saturation channel image, multiple grayscale values ​​are determined according to multiple preset saturation values, wherein each grayscale value corresponds to a saturation value; multiple grayscale regions are drawn in the saturation channel image based on the multiple grayscale values ​​to generate a target HSV channel image containing fluid.

[0048] Optionally, multiple grayscale regions are drawn in the first channel image to obtain a target HSV channel image containing fluid, including: when the first channel image is a tone channel image, multiple grayscale values ​​are determined according to multiple preset tone angles, wherein each grayscale value corresponds to a tone angle; multiple grayscale regions are drawn in the tone channel image based on the multiple grayscale values ​​to generate a target HSV channel image containing fluid.

[0049] It should be noted that because a single-channel image is used, a single channel is a grayscale image, ranging from 0 to 1. The V value of the V channel also ranges from 0 to 1. Changing the V value of the V channel changes the grayscale value, making the change process more intuitive and easier to understand. This embodiment and subsequent embodiments use the V channel as an example for explanation. When the first channel image is a Hue (H) channel image, a corresponding conversion is required. For example, the Hue channel ranges from 0 to 360°, so the conversion process is as follows: 360° / π = 1, 0° / π = 0. Therefore, 360° corresponds to 1, and 0° corresponds to 0. When the first channel image is a Saturation (S) channel image, the range is from 0 to 1, and the S value of the S channel also ranges from 0 to 1. Changing the S value of the S channel also changes the grayscale value, which can also intuitively demonstrate the change process.

[0050] 304. Sample the target HSV channel image to obtain multiple gray values ​​and an initial UV vector, where the gray values ​​are used to indicate the flow direction of the fluid texture in the corresponding gray area.

[0051] Each grayscale region in the target HSV channel image is sampled to obtain multiple grayscale values. Simultaneously, the initial UV vector corresponding to the target HSV channel image is obtained. The grayscale value corresponding to each grayscale region is used to indicate the flow direction of the fluid texture within that grayscale region. For example, when the target HSV channel image is as follows... Figure 2 As shown, the V value corresponding to the white area in the upper left corner is 1, indicating that the fluid texture in that area has moved towards the V=1 region; the V value corresponding to the gray area in the lower left corner is 0.75, indicating that the fluid texture in that area has moved towards the V=0.75 region; and the V value corresponding to the gray area on the right is 0.5, indicating that the fluid texture in that area has moved towards the V=0.5 region. For example, when the target HSV channel image is as shown... Figure 4 As shown, the V value corresponding to the gray area on the left is 0.75, indicating that the fluid texture in that area has moved towards the area with V = 0.75; the V value corresponding to the gray area on the right is 0.5, indicating that the fluid texture in that area has moved towards the area with V = 0.5; and the V value corresponding to the remaining areas is 1.0, indicating that the fluid texture in that area has moved towards the area with V = 1.0.

[0052] 305. Calculate the initial UV vector and multiple gray values ​​using a preset rotation function to generate multiple rotated UV vectors, wherein each rotated UV vector is different from the initial UV vector.

[0053] Specifically, the rotation center point is determined by a preset rotation function, and the initial UV vector is adjusted according to the rotation center point to obtain the first UV vector; the first UV vector is rotated according to each of the multiple rotation angle values ​​to generate multiple rotated UV vectors.

[0054] It should be noted that the initial UV vector needs to be rotated pixel by pixel during rotation. For example, assuming the coordinates of the initial UV vector are (UV.x, UV.y), the first UV vector UV1 is obtained by rotating it around the rotation center point (0.5, 0.5) using the first preset function, where UV1 = float2((1-UV.x), UV.y) + (0.5, 0.5) * (-1). Then, the rotated UV vector UV2 is obtained by calculating UV1 using the second preset function, where UV2 = dot(UV1, float2(cos(tex.x), sin((-1) * tex.x))), dot(UV1, float2(sin(tex.x), cos(tex.x))). Here, UV is the initial UV vector, and tex.x is the rotation angle.

[0055] 306. Fluid texture sampling is performed on the target HSV channel image using multiple rotated UV vectors to generate a multi-directional UV image of the fluid.

[0056] Fluid texture sampling is performed on the target HSV channel image using multiple rotated UV vectors to generate UV images of the fluid in multiple directions. Specifically, a sampled image obtained by sampling the target channel image according to the rotated UV vectors generates a UV image of the fluid in one direction. The UV images of each single direction obtained by sampling each rotated UV vector are merged to generate a UV image of the fluid in multiple directions.

[0057] 307. By using a preset time function and UV images in multiple directions, the multi-directional flow effect of fluid over time on a two-dimensional plane is rendered.

[0058] By offsetting the UVs in the UV image in multiple directions using a preset time function, and remapping the offset UVs, the multi-directional flow effect of the fluid over time on a two-dimensional plane is rendered. This two-dimensional image with multi-directional flow effect can be called the target manifold.

[0059] It should be noted that UV offset is achieved through a time function, which can be achieved by subtracting the time parameter from the UV vector, i.e., (u,v)-time*speed, where time is the time parameter and speed is the offset speed. When you want to change the flow direction, you can change the sign of the offset speed.

[0060] In this embodiment of the invention, different rotation angles are simulated by drawing different grayscale values ​​on the target HSV channel image. The target HSV channel image is sampled, and the multiple rotation angle values ​​obtained by sampling and the initial UV vector are passed to a preset rotation function to generate multiple rotating UV vectors. Then, multiple UV flow directions are obtained by combining them with a preset time function, thereby simulating the multi-directional flow effect of fluid on a two-dimensional plane, improving fluid rendering efficiency and reducing memory usage.

[0061] Please see Figure 5 Another flowchart of the fluid rendering method provided in this embodiment of the invention specifically includes:

[0062] 501. Obtain an initial texture containing the fluid. The initial texture includes multiple HSV channels.

[0063] 502. Extract the first channel image from the initial texture. The first channel image corresponds to the first channel among multiple HSV channels.

[0064] 503. Draw multiple grayscale regions in the first channel image to obtain the target HSV channel image containing the fluid, wherein each grayscale region corresponds to a grayscale value.

[0065] 504. Sample the target HSV channel image to obtain multiple gray values ​​and an initial UV vector, where the gray values ​​are used to indicate the flow direction of the fluid texture in the corresponding gray area.

[0066] 505. Calculate the initial UV vector and multiple grayscale values ​​using a preset rotation function to generate multiple rotated UV vectors, where each rotated UV vector is different from the initial UV vector.

[0067] 506. Fluid texture sampling is performed on the target HSV channel image using multiple rotated UV vectors to generate a multi-directional UV image of the fluid.

[0068] Steps 501-506 are similar to steps 301-306, and will not be described in detail here.

[0069] 507. Determine the horizontal and vertical flow velocities within the target time period using a preset time function to obtain the horizontal and vertical flow velocities.

[0070] The horizontal and vertical flow velocities within the target time period are determined by a preset time function.

[0071] It should be noted that there are many possible relationships between the flow direction (i.e., the vector field direction) and the rotation angle of UV. These relationships depend on the initial choice: whether the flow is initially in the U direction (horizontal), the V direction (vertical), or both UV flows simultaneously (at a 45-degree angle).

[0072] 508. Determine multiple flow directions based on horizontal and vertical flow velocities.

[0073] Specifically, when the vertical flow velocity is 0, a first horizontal flow direction and a second horizontal flow direction are determined based on the horizontal flow velocity. The first horizontal flow direction corresponds to a first value, and the second horizontal flow direction corresponds to a second value. The first horizontal flow direction and the second horizontal flow direction are opposite. When the horizontal flow velocity is 0, a first vertical flow direction and a second vertical flow direction are determined based on the vertical flow velocity. The first vertical flow direction corresponds to a first value, and the second vertical flow direction corresponds to a second value. The first vertical flow direction and the second vertical flow direction are opposite. When neither the horizontal nor the vertical flow velocity is 0, a first oblique flow direction and a second oblique flow direction are determined based on the vertical and horizontal flow velocities. The first oblique flow direction corresponds to a first value, and the second oblique flow direction corresponds to a second value. The first oblique flow direction and the second oblique vertical flow direction are perpendicular.

[0074] Understandably, when the vertical flow velocity is 0, the first value is 0, and the second value is 0.5. The correspondence between the grayscale value (V channel value) and the flow direction (vector field direction) can be set counter-clockwise. The generated correspondence is as follows: Figure 6 As shown, Figure 6 The direction of the arrow in the image indicates the flow direction, according to... Figure 6 The correspondence shown indicates the flow direction of each grayscale region as follows: Figure 7 As shown, the region where V(B) = 0.75 moves in the vertically upward direction, and the arrow direction represents the flow direction.

[0075] It's understandable that the directions of values ​​1 and 0 coincide, and when the V or B value is 1, the flow follows the direction of the V or B value being 0. For the same target HSV channel image, different flow effects can be achieved by setting different correspondences.

[0076] When the horizontal flow velocity is 0, the first value is 0, and the second value is 0.5. The correspondence between the grayscale value (V channel value) and the flow direction can be set counter-clockwise, as shown in the example below. Figure 8 As shown.

[0077] When neither the horizontal nor the vertical flow velocity is zero, the first value is 0, and the second value is 0.25. The grayscale value (V channel value) is set to correspond to the flow direction in a counter-clockwise direction, resulting in the following correspondence: Figure 9 As shown.

[0078] 509. By using multiple flow directions and UV images in multiple directions, the multi-directional flow effect of fluid over time on a two-dimensional plane is rendered.

[0079] By sampling UV images in multiple directions based on multiple flow directions, the multi-directional flow effect of the fluid over time on a two-dimensional plane is obtained. This two-dimensional image with multi-directional flow effect can be called the target manifold map.

[0080] In this embodiment of the invention, different rotation angles are simulated by drawing different grayscale values ​​on the target HSV channel image. The target channel image is sampled, and the multiple rotation angle values ​​and the initial UV vector obtained by sampling are passed to a preset rotation function to generate multiple rotating UV vectors. Then, multiple UV flow directions are obtained by combining them with a preset time function, thereby simulating the multi-directional flow effect of fluid on a two-dimensional plane, improving fluid rendering efficiency and reducing memory usage.

[0081] The fluid rendering method in the embodiments of the present invention has been described above. The fluid rendering apparatus in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 10One embodiment of the fluid rendering apparatus in this invention includes:

[0082] The acquisition module 1001 is used to acquire a target HSV channel image containing fluid, wherein the target HSV channel image includes multiple grayscale regions;

[0083] The sampling module 1002 is used to sample the target HSV channel image to obtain multiple gray values ​​and an initial UV vector, wherein the gray values ​​are used to indicate the flow direction of the fluid texture in the corresponding gray area;

[0084] The first generation module 1003 is used to generate a multi-directional UV image of the fluid based on the plurality of gray values ​​and the initial UV vector;

[0085] The second generation module 1004 is used to render the multi-directional flow effect of the fluid over time on a two-dimensional plane by using a preset time function and the UV images in the multi-directional directions.

[0086] In one feasible implementation, the acquisition module 1001 includes:

[0087] Acquisition unit 10011 is used to acquire an initial texture containing fluid, the initial texture including multiple HSV channels;

[0088] Extraction unit 10012 is used to extract a first channel image from the initial texture, wherein the first channel image corresponds to the first channel among the plurality of HSV channels;

[0089] The drawing unit 10013 is used to draw multiple grayscale regions in the first channel image to obtain a target HSV channel image containing fluid, wherein each grayscale region corresponds to a grayscale value.

[0090] In one feasible implementation, the drawing unit 10013 is specifically used for:

[0091] When the first channel image is a brightness channel image, multiple gray values ​​are determined according to multiple preset brightness values, wherein each gray value corresponds to a brightness value;

[0092] Based on the multiple gray values, multiple gray areas are drawn in the brightness channel image to generate a target HSV channel image containing the fluid.

[0093] In one feasible implementation, the drawing unit 10013 is further configured to:

[0094] When the first channel image is a saturation channel image, multiple gray values ​​are determined according to multiple preset saturation values, wherein each gray value corresponds to a saturation value;

[0095] Based on the multiple grayscale values, multiple grayscale regions are drawn in the saturation channel image to generate a target HSV channel image containing the fluid.

[0096] In one feasible implementation, the drawing unit 10013 is further configured to:

[0097] When the first channel image is a tone channel image, multiple gray values ​​are determined according to multiple preset tone angles, wherein each gray value corresponds to a tone angle;

[0098] Based on the multiple gray values, multiple gray regions are drawn in the tone channel image to generate a target HSV channel image containing the fluid.

[0099] In one feasible implementation, the first generation module 1003 includes:

[0100] The calculation unit 10031 is used to calculate the initial UV vector and the plurality of gray values ​​through a preset rotation function, and generate a plurality of rotated UV vectors, wherein each rotated UV vector is different from the initial UV vector;

[0101] The sampling unit 10032 is used to perform fluid texture sampling on the target HSV channel image through the multiple rotated UV vectors to generate a UV image of the fluid in multiple directions.

[0102] In one feasible implementation, the computing unit 10031 is specifically used for:

[0103] The rotation center point is determined by a preset rotation function, and the initial UV vector is adjusted according to the rotation center point to obtain the first UV vector;

[0104] The first UV vector is rotated according to each of the plurality of rotation angle values ​​to generate a plurality of rotated UV vectors.

[0105] In one feasible implementation, the second generation module 1004 includes:

[0106] The first determining unit 10041 is used to determine the horizontal and vertical flow velocities within a target time period through a preset time function, thereby obtaining the horizontal flow velocity and the vertical flow velocity.

[0107] The second determining unit 10042 is used to determine multiple flow directions based on the horizontal flow velocity and the vertical flow velocity;

[0108] The generation unit 10043 is used to render the multi-directional flow effect of the fluid over time on a two-dimensional plane using the multiple flow directions and the UV images in the multiple directions.

[0109] In one feasible implementation, the second determining unit 10042 is specifically used for:

[0110] When the vertical flow velocity is 0, a first horizontal flow direction and a second horizontal flow direction are determined according to the horizontal flow velocity. The first horizontal flow direction corresponds to a first value, and the second horizontal flow direction corresponds to a second value. The first horizontal flow direction is opposite to the second horizontal flow direction.

[0111] When the horizontal flow velocity is 0, a first vertical flow direction and a second vertical flow direction are determined based on the vertical flow velocity. The first vertical flow direction corresponds to a first value, and the second vertical flow direction corresponds to a second value. The first vertical flow direction is opposite to the second vertical flow direction.

[0112] When neither the horizontal flow velocity nor the vertical flow velocity is 0, a first oblique flow direction and a second oblique flow direction are determined based on the vertical flow velocity and the horizontal flow velocity. The first oblique flow direction corresponds to a first value, and the second oblique flow direction corresponds to a second value. The first oblique flow direction is perpendicular to the second oblique flow direction.

[0113] In this embodiment of the invention, different rotation angles are simulated by drawing different grayscale values ​​on the target HSV channel image. The target channel image is sampled, and the multiple rotation angle values ​​and the initial UV vector obtained by sampling are passed to a preset rotation function to generate multiple rotating UV vectors. Then, multiple UV flow directions are obtained by combining them with a preset time function, thereby simulating the multi-directional flow effect of fluid on a two-dimensional plane, improving fluid rendering efficiency and reducing memory usage.

[0114] Figure 11This is a schematic diagram of the structure of an electronic device 1100 provided in an embodiment of the present invention. The electronic device 1100 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 1110 (e.g., one or more processors) and a memory 1120, and one or more storage media 1130 (e.g., one or more mass storage devices) for storing application programs 1133 or data 1132. The memory 1120 and storage media 1130 can be temporary or persistent storage. The program stored in the storage media 1130 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the electronic device 1100. Furthermore, the processor 1110 may be configured to communicate with the storage media 1130 and execute the series of instruction operations in the storage media 1130 on the electronic device 1100.

[0115] Electronic device 1100 may also include one or more power supplies 1140, one or more wired or wireless network interfaces 1150, one or more input / output interfaces 1160, and / or one or more operating devices 1131, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 11 The illustrated electronic device structure does not constitute a limitation on the electronic device and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0116] By way of example and not limitation, electronic device 1100 may be a mobile terminal.

[0117] This invention provides an electronic device, including a memory and at least one processor. The memory stores instructions. The at least one processor invokes the instructions in the memory to cause the electronic device to execute the aforementioned fluid rendering method. The specific method steps include: acquiring a target HSV channel image containing fluid, the target HSV channel image including multiple grayscale regions; sampling the target HSV channel image to obtain multiple grayscale values ​​and an initial UV vector, wherein the grayscale values ​​are used to indicate the flow direction of the fluid texture in the corresponding grayscale region; generating a multi-directional UV image of the fluid based on the multiple grayscale values ​​and the initial UV vector; and rendering a multi-directional flow effect of the fluid over time on a two-dimensional plane using a preset time function and the multi-directional UV image. By drawing different grayscale regions on the target HSV channel image to simulate different flow regions of the fluid, and combining this with a preset time function to simulate the flow direction of the fluid texture in each grayscale region, the multi-directional flow effect of the fluid on a two-dimensional plane is simulated, improving fluid rendering efficiency and reducing memory usage.

[0118] The above-mentioned acquisition of the target HSV channel image includes: acquiring an initial texture containing fluid, the initial texture including multiple HSV channels; extracting a first channel image from the initial texture, the first channel image corresponding to the first channel among the multiple HSV channels; drawing multiple grayscale regions in the first channel image to obtain the target HSV channel image containing fluid, wherein each grayscale region corresponds to a grayscale value. This method refines the process of acquiring the HSV channel image, clarifies that the flow direction of the fluid texture is recorded through the HSV channel values, reduces the number of channels occupied, and lowers memory usage.

[0119] The above-mentioned method of drawing multiple grayscale regions in the first channel image to obtain the target HSV channel image includes: when the first channel image is a brightness channel image, determining multiple grayscale values ​​based on multiple preset brightness values, wherein each grayscale value corresponds to a brightness value; drawing multiple grayscale regions in the brightness channel image based on the multiple grayscale values ​​to generate a target HSV channel image containing the fluid. This method clearly defines the drawing of grayscale values ​​within the brightness channel and provides an implementation method corresponding to the value range.

[0120] The above-mentioned method of drawing multiple grayscale regions in the first channel image to obtain the target HSV channel image includes: when the first channel image is a saturation channel image, determining multiple grayscale values ​​based on multiple preset saturation values, wherein each grayscale value corresponds to a saturation value; drawing multiple grayscale regions in the saturation channel image based on the multiple grayscale values ​​to generate a target HSV channel image containing the fluid. This method clarifies the drawing of grayscale values ​​within the saturation channel and provides another implementation method corresponding to the value range.

[0121] The above-mentioned method of drawing multiple grayscale regions in the first channel image to obtain the target HSV channel image includes: when the first channel image is a tone channel image, determining multiple grayscale values ​​according to multiple preset tone angles, wherein each grayscale value corresponds to a tone angle; drawing multiple grayscale regions in the tone channel image based on the multiple grayscale values ​​to generate a target HSV channel image containing the fluid. This method explicitly defines the drawing of grayscale values ​​within the tone channel and provides another implementation approach.

[0122] The above-described method for generating multi-directional UV images of a fluid based on multiple grayscale values ​​and an initial UV vector includes: calculating the initial UV vector and multiple grayscale values ​​using a preset rotation function to generate multiple rotated UV vectors, where each rotated UV vector is different from the initial UV vector; and sampling the target HSV channel image using these multiple rotated UV vectors to generate multi-directional UV images of the fluid. This method refines the process of generating multi-directional UV images of the fluid, simulating multiple flow directions of the fluid through multiple rotation angles, thus improving simulation efficiency.

[0123] The above method calculates an initial UV vector and multiple grayscale values ​​using a preset rotation function to generate multiple rotated UV vectors. This includes: determining the rotation center point using the preset rotation function and adjusting the initial UV vector according to the rotation center point to obtain a first UV vector; and rotating the first UV vector according to each of the multiple rotation angle values ​​to generate multiple rotated UV vectors. This method refines the generation process of rotated UV vectors, clarifies the rotation center point, and thus is applicable to different coordinate systems, improving its versatility across different engines.

[0124] The above-mentioned method, using a preset time function and multi-directional UV images, renders the multi-directional flow effect of fluid over time on a two-dimensional plane. This includes: determining the horizontal and vertical flow velocities within a target time period using a preset time function; determining multiple flow directions based on the horizontal and vertical flow velocities; and rendering the multi-directional flow effect of fluid over time on a two-dimensional plane using multiple flow directions and UV images in those directions. This method refines the generation process of the target manifold map, controlling the flow velocities in multiple flow directions through a time function, thus enhancing the controllability of the flow effect.

[0125] The above method determines multiple flow directions based on horizontal and vertical flow velocities, including: when the vertical flow velocity is 0, determining a first horizontal flow direction and a second horizontal flow direction based on the horizontal flow velocity, with the first horizontal flow direction corresponding to a first value and the second horizontal flow direction corresponding to a second value, and the first and second horizontal flow directions being opposite; when the horizontal flow velocity is 0, determining a first vertical flow direction and a second vertical flow direction based on the vertical flow velocity, with the first vertical flow direction corresponding to a first value and the second vertical flow direction corresponding to a second value, and the first and second vertical flow directions being opposite; when neither the horizontal nor the vertical flow velocity is 0, determining a first oblique flow direction and a second oblique flow direction based on the vertical and horizontal flow velocities, with the first oblique flow direction corresponding to a first value and the second oblique flow direction corresponding to a second value, and the first oblique flow direction being perpendicular to the second oblique vertical flow direction. This method refines the process of determining flow directions, provides multiple implementation methods, and improves the flexibility of simulating multi-directional flow effects of fluids.

[0126] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the fluid rendering method, the steps specifically including:

[0127] The process involves acquiring a target HSV channel image containing the fluid, which includes multiple grayscale regions. The target HSV channel image is sampled to obtain multiple grayscale values ​​and an initial UV vector. The grayscale values ​​indicate the flow direction of the fluid texture within the corresponding grayscale region. Based on the multiple grayscale values ​​and the initial UV vector, a multi-directional UV image of the fluid is generated. Using a preset time function and the multi-directional UV image, the multi-directional flow effect of the fluid over time on a two-dimensional plane is rendered. By drawing different grayscale regions on the target HSV channel image to simulate different fluid flow regions, and combining this with a preset time function to simulate the flow direction of the fluid texture in each grayscale region, the multi-directional flow effect of the fluid on a two-dimensional plane is simulated, improving fluid rendering efficiency and reducing memory usage.

[0128] The above-mentioned acquisition of the target HSV channel image includes: acquiring an initial texture containing fluid, the initial texture including multiple HSV channels; extracting a first channel image from the initial texture, the first channel image corresponding to the first channel among the multiple HSV channels; drawing multiple grayscale regions in the first channel image to obtain the target HSV channel image containing fluid, wherein each grayscale region corresponds to a grayscale value. This method refines the process of acquiring the HSV channel image, clarifies that the flow direction of the fluid texture is recorded through the HSV channel values, reduces the number of channels occupied, and lowers memory usage.

[0129] The above-mentioned method of drawing multiple grayscale regions in the first channel image to obtain the target HSV channel image includes: when the first channel image is a brightness channel image, determining multiple grayscale values ​​based on multiple preset brightness values, wherein each grayscale value corresponds to a brightness value; drawing multiple grayscale regions in the brightness channel image based on the multiple grayscale values ​​to generate a target HSV channel image containing the fluid. This method clearly defines the drawing of grayscale values ​​within the brightness channel and provides an implementation method corresponding to the value range.

[0130] The above-mentioned method of drawing multiple grayscale regions in the first channel image to obtain the target HSV channel image includes: when the first channel image is a saturation channel image, determining multiple grayscale values ​​based on multiple preset saturation values, wherein each grayscale value corresponds to a saturation value; drawing multiple grayscale regions in the saturation channel image based on the multiple grayscale values ​​to generate a target HSV channel image containing the fluid. This method clarifies the drawing of grayscale values ​​within the saturation channel and provides another implementation method corresponding to the value range.

[0131] The above-mentioned method of drawing multiple grayscale regions in the first channel image to obtain the target HSV channel image includes: when the first channel image is a tone channel image, determining multiple grayscale values ​​according to multiple preset tone angles, wherein each grayscale value corresponds to a tone angle; drawing multiple grayscale regions in the tone channel image based on the multiple grayscale values ​​to generate a target HSV channel image containing the fluid. This method explicitly defines the drawing of grayscale values ​​within the tone channel and provides another implementation approach.

[0132] The above-described method for generating multi-directional UV images of a fluid based on multiple grayscale values ​​and an initial UV vector includes: calculating the initial UV vector and multiple grayscale values ​​using a preset rotation function to generate multiple rotated UV vectors, where each rotated UV vector is different from the initial UV vector; and sampling the target HSV channel image using these multiple rotated UV vectors to generate multi-directional UV images of the fluid. This method refines the process of generating multi-directional UV images of the fluid, simulating multiple flow directions of the fluid through multiple rotation angles, thus improving simulation efficiency.

[0133] The above method calculates an initial UV vector and multiple grayscale values ​​using a preset rotation function to generate multiple rotated UV vectors. This includes: determining the rotation center point using the preset rotation function and adjusting the initial UV vector according to the rotation center point to obtain a first UV vector; and rotating the first UV vector according to each of the multiple rotation angle values ​​to generate multiple rotated UV vectors. This method refines the generation process of rotated UV vectors, clarifies the rotation center point, and thus is applicable to different coordinate systems, improving its versatility across different engines.

[0134] The above-mentioned method, using a preset time function and multi-directional UV images, renders the multi-directional flow effect of fluid over time on a two-dimensional plane. This includes: determining the horizontal and vertical flow velocities within a target time period using a preset time function; determining multiple flow directions based on the horizontal and vertical flow velocities; and rendering the multi-directional flow effect of fluid over time on a two-dimensional plane using multiple flow directions and UV images in those directions. This method refines the generation process of the target manifold map, controlling the flow velocities in multiple flow directions through a time function, thus enhancing the controllability of the flow effect.

[0135] The above method determines multiple flow directions based on horizontal and vertical flow velocities, including: when the vertical flow velocity is 0, determining a first horizontal flow direction and a second horizontal flow direction based on the horizontal flow velocity, with the first horizontal flow direction corresponding to a first value and the second horizontal flow direction corresponding to a second value, and the first and second horizontal flow directions being opposite; when the horizontal flow velocity is 0, determining a first vertical flow direction and a second vertical flow direction based on the vertical flow velocity, with the first vertical flow direction corresponding to a first value and the second vertical flow direction corresponding to a second value, and the first and second vertical flow directions being opposite; when neither the horizontal nor the vertical flow velocity is 0, determining a first oblique flow direction and a second oblique flow direction based on the vertical and horizontal flow velocities, with the first oblique flow direction corresponding to a first value and the second oblique flow direction corresponding to a second value, and the first oblique flow direction being perpendicular to the second oblique vertical flow direction. This method refines the process of determining flow directions, provides multiple implementation methods, and improves the flexibility of simulating multi-directional flow effects of fluids.

[0136] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0137] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

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

[0139] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0140] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A fluid rendering method, characterized in that, include: Acquire a target HSV channel image containing fluid, the target HSV channel image including multiple grayscale regions; The target HSV channel image is sampled to obtain multiple gray values ​​and an initial UV vector, wherein the gray values ​​are used to indicate the flow direction of the fluid texture in the corresponding gray area; The fluid's UV image in multiple directions is generated based on the plurality of gray values ​​and the initial UV vector; The multi-directional flow effect of the fluid over time on a two-dimensional plane is rendered using a preset time function and the UV images in multiple directions. The acquisition of the target HSV channel image containing the fluid includes: Obtain an initial texture containing fluid, the initial texture including multiple HSV channels; Extract a first channel image from the initial texture, wherein the first channel image corresponds to the first channel among the plurality of HSV channels; Multiple grayscale regions are drawn in the first channel image to obtain a target HSV channel image containing the fluid, wherein each grayscale region corresponds to a grayscale value.

2. The fluid rendering method according to claim 1, characterized in that, The step of drawing multiple grayscale regions in the first channel image to obtain a target HSV channel image containing the fluid includes: When the first channel image is a brightness channel image, multiple gray values ​​are determined according to multiple preset brightness values, wherein each gray value corresponds to a brightness value; Based on the multiple gray values, multiple gray areas are drawn in the brightness channel image to generate a target HSV channel image containing the fluid.

3. The fluid rendering method according to claim 1, characterized in that, The step of drawing multiple grayscale regions in the first channel image to obtain a target HSV channel image containing the fluid includes: When the first channel image is a saturation channel image, multiple gray values ​​are determined according to multiple preset saturation values, wherein each gray value corresponds to a saturation value; Based on the multiple grayscale values, multiple grayscale regions are drawn in the saturation channel image to generate a target HSV channel image containing the fluid.

4. The fluid rendering method according to claim 1, characterized in that, The step of drawing multiple grayscale regions in the first channel image to obtain a target HSV channel image containing the fluid includes: When the first channel image is a tone channel image, multiple gray values ​​are determined according to multiple preset tone angles, wherein each gray value corresponds to a tone angle; Based on the multiple gray values, multiple gray regions are drawn in the tone channel image to generate a target HSV channel image containing the fluid.

5. The fluid rendering method according to claim 1, characterized in that, The step of generating a multi-directional UV image of the fluid based on the plurality of gray values ​​and the initial UV vector includes: The initial UV vector and the multiple gray values ​​are calculated using a preset rotation function to generate multiple rotated UV vectors, wherein each rotated UV vector is different from the initial UV vector; Fluid texture sampling is performed on the target HSV channel image using the multiple rotated UV vectors to generate a multi-directional UV image of the fluid.

6. The fluid rendering method according to claim 5, characterized in that, The step of calculating the initial UV vector and the multiple grayscale values ​​using a preset rotation function to generate multiple rotated UV vectors includes: The rotation center point is determined by a preset rotation function, and the initial UV vector is adjusted according to the rotation center point to obtain the first UV vector; The first UV vector is rotated according to each of the multiple rotation angle values ​​to generate multiple rotated UV vectors.

7. The fluid rendering method according to any one of claims 1-6, characterized in that, The process of rendering the multi-directional flow effect of the fluid over time on a two-dimensional plane using a preset time function and the multi-directional UV images includes: The horizontal and vertical flow velocities within the target time period are determined by a preset time function, thus obtaining the horizontal and vertical flow velocities. Multiple flow directions are determined based on the horizontal flow velocity and the vertical flow velocity; The multi-directional flow effect of the fluid over time on a two-dimensional plane is obtained by rendering the multiple flow directions and the UV images in those multiple directions.

8. The fluid rendering method according to claim 7, characterized in that, The determination of multiple flow directions based on the horizontal flow velocity and the vertical flow velocity includes: When the vertical flow velocity is 0, a first horizontal flow direction and a second horizontal flow direction are determined according to the horizontal flow velocity. The first horizontal flow direction corresponds to a first value, and the second horizontal flow direction corresponds to a second value. The first horizontal flow direction is opposite to the second horizontal flow direction. When the horizontal flow velocity is 0, a first vertical flow direction and a second vertical flow direction are determined based on the vertical flow velocity. The first vertical flow direction corresponds to a first value, and the second vertical flow direction corresponds to a second value. The first vertical flow direction is opposite to the second vertical flow direction. When neither the horizontal flow velocity nor the vertical flow velocity is 0, a first oblique flow direction and a second oblique flow direction are determined based on the vertical flow velocity and the horizontal flow velocity. The first oblique flow direction corresponds to a first value, and the second oblique flow direction corresponds to a second value. The first oblique flow direction is perpendicular to the second oblique flow direction.

9. A fluid rendering apparatus, characterized in that, include: The acquisition module is used to acquire a target HSV channel image containing fluid, wherein the target HSV channel image includes multiple grayscale regions; The sampling module is used to sample the target HSV channel image to obtain multiple gray values ​​and an initial UV vector, wherein the gray values ​​are used to indicate the flow direction of the fluid texture in the corresponding gray area; The first generation module is used to generate a multi-directional UV image of the fluid based on the plurality of gray values ​​and the initial UV vector; The second generation module is used to render the multi-directional flow effect of the fluid over time on a two-dimensional plane using a preset time function and the UV images in the multi-directional directions. The acquisition module includes: An acquisition unit is used to acquire an initial texture containing fluid, the initial texture including multiple HSV channels; Extraction unit, used to extract a first channel image from the initial texture, the first channel image corresponding to the first channel among the plurality of HSV channels; The drawing unit is used to draw multiple grayscale regions in the first channel image to obtain a target HSV channel image containing fluid, wherein each grayscale region corresponds to a grayscale value.

10. An electronic device, characterized in that, The electronic device includes: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor invokes the instructions in the memory to cause the electronic device to perform the fluid rendering method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a processor, implement the fluid rendering method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Fluid rendering method and device, storage medium and terminal equipment

    CN111986303A