Wave point flame rendering method and device, electronic equipment and storage medium

By combining multi-channel flame data and multi-layered dot structures, the issues of realism and efficiency in flame effect rendering in particle systems were resolved, achieving realistic dynamic changes and rich detail in flames.

CN122244251APending Publication Date: 2026-06-19NETEASE (HANGZHOU) NETWORK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2026-03-17
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to precisely control the shape regularity and rhythmic changes when particle systems generate flame effects. They lack realistic physical layers and dynamic changes, and the rendering process is costly, failing to reflect the multi-layered structure and energy gradient of flames.

Method used

By combining multi-channel flame data and multi-layer dot structure, multiple flame physical property information is acquired, and multi-layer dot map is generated based on the UV coordinates of the surface to be rendered, and then rendered to realize the realistic dynamics and dynamic changes of the flame.

Benefits of technology

While reducing rendering overhead, it retains rich flame details, presenting a more realistic physical hierarchy and dynamic changes, with realistic dynamics and cartoonish texture, and realizes the color progression and energy difference of the inner and outer layers of the flame.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122244251A_ABST
    Figure CN122244251A_ABST
Patent Text Reader

Abstract

This application provides a rendering method, apparatus, electronic device, and storage medium for polka dot flames, relating to the field of animation production technology. The method includes: acquiring multi-channel flame data, which includes at least two types of flame physical attribute information; generating a multi-layer polka dot structure based on the UV coordinates of the area to be rendered, whereby the multi-layer polka dot structure includes at least two layers of polka dot maps with different frequency characteristics; rendering the area to be rendered based on the multi-channel flame data and the multi-layer polka dot structure, and determining the flame rendering result. This method achieves a more realistic physical hierarchy and dynamic changes in polka dot flames by combining multi-channel flame data and the multi-layer polka dot structure, and eliminates the need for volume calculations and real-time simulations during rendering, thus reducing rendering overhead while preserving richer flame details.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of animation production technology, and in particular to a rendering method, apparatus, electronic device and storage medium for polka dot flames. Background Technology

[0002] With the rapid development of computer graphics and real-time rendering technologies, particle systems have become a common technique for simulating natural phenomena such as flames, smoke, and water flow. Particle systems use the collective behavior of a large number of tiny particles to represent complex dynamic effects and are widely used in game development, film and television special effects, and virtual reality.

[0003] In existing technologies, when generating flame effects using particle systems, transparent textures are often overlaid on the particle systems to simulate the dynamic effect of rising flames, and gradient colors or noise textures are used to achieve the changes.

[0004] However, since the particle parameters in the particle system are mostly randomly generated, it is difficult to accurately control the shape and rhythmic changes of the flame. Furthermore, the movement, size, and color changes of the particles are often purely visually controlled, which cannot reflect the true physical layers and dynamic changes of the flame. Summary of the Invention

[0005] The purpose of this application is to address the shortcomings of the prior art by providing a rendering method, apparatus, electronic device, and storage medium for polka dot flames, which can make polka dot flames present a more realistic physical layer and dynamic changes, and can retain richer flame details while reducing rendering overhead.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, the present invention provides a method for rendering polka dot flames, the method comprising: Acquire multi-channel flame data, wherein the multi-channel flame data includes at least two types of flame physical property information; A multi-layered dot structure is generated based on the UV coordinates of the surface to be rendered. The multi-layered dot structure includes at least two layers of dot maps with different frequency characteristics. The rendering result of the flame is determined by rendering the surface to be rendered based on the multi-channel flame data and the multi-layer wave point structure.

[0007] Secondly, the present invention provides a rendering apparatus for polka dot flames, the rendering apparatus comprising: The acquisition module is used to acquire multi-channel flame data, which includes at least two types of flame physical property information. The generation module is used to generate a multi-layer dot structure based on the UV coordinates of the surface to be rendered. The multi-layer dot structure includes at least two layers of dot maps with different frequency characteristics. The rendering module is used to render the surface to be rendered based on the multi-channel flame data and the multi-layer dot structure, and to determine the flame rendering result.

[0008] Thirdly, the present invention provides an electronic device, comprising: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the rendering method for polka dot flame as described in any of the foregoing embodiments.

[0009] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the rendering method for the polka dot flame as described in any of the foregoing embodiments.

[0010] The beneficial effects of this application are: The rendering method, apparatus, electronic device, and storage medium for polka dot flames provided in this application include: acquiring multi-channel flame data, which includes at least two types of flame physical attribute information; generating a multi-layer polka dot structure based on the UV coordinates of the surface to be rendered, which includes at least two layers of polka dot maps with different frequency characteristics; rendering the surface to be rendered based on the multi-channel flame data and the multi-layer polka dot structure, and determining the flame rendering result. This method achieves that by combining multi-channel flame data and multi-layer polka dot structure, not only can the polka dot flame simultaneously possess realistic dynamics and cartoonish texture, but it also realizes the color progression and energy difference representation of the inner and outer layers of the polka dot flame, presenting a more realistic physical hierarchy and dynamic changes. Moreover, no volume calculation or real-time simulation is required during the rendering process, which can reduce rendering overhead while retaining richer flame details. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a method for rendering polka-dot flames provided in an embodiment of this application; Figure 2 A flowchart illustrating another method for rendering polka dot flames provided in this application embodiment; Figure 3 A schematic diagram of a dot pattern provided in an embodiment of this application; Figure 4 A flowchart illustrating another method for rendering polka dot flames provided in this application embodiment; Figure 5 A flowchart illustrating another method for rendering polka dot flames provided in this application embodiment; Figure 6 A flowchart illustrating another method for rendering polka dot flames provided in this application embodiment; Figure 7 A schematic diagram of a dotted flame provided in an embodiment of this application; Figure 8 A flowchart illustrating another method for rendering polka dot flames provided in this application embodiment; Figure 9 A schematic diagram of a flame animation frame provided in an embodiment of this application; Figure 10 A schematic diagram of a sequence frame animation texture provided in an embodiment of this application; Figure 11 A schematic diagram of the functional modules of a polka dot flame rendering device provided in an embodiment of this application; Figure 12 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0014] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0015] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0016] In related technologies, when generating flame effects using particle systems, transparent textures are often overlaid on the particle system to simulate the dynamic effect of rising flames, and gradient colors or noise textures are used to achieve changes. However, since the particle parameters in the particle system are mostly randomly generated, it is difficult to accurately control the shape and rhythmic changes of the flame, resulting in poor controllability. Furthermore, the movement, size, and color changes of particles are often purely visually controlled, lacking the constraints of real combustion physical parameters, resulting in poor physical consistency. In addition, although particles can be superimposed to form a brightness distribution, the overall visual effect is still relatively flat and cannot reflect the temperature difference between the center and the periphery of the flame or the multi-layered fluctuation structure.

[0017] In addition, existing technologies also include methods for generating flame effects based on shaders. These methods primarily use noise functions, perturbations, and UV offsets to generate flame shapes in the shader layer and use color gradients to simulate temperature distribution. However, due to limitations in UV distortion and noise offset methods, the flame fluctuation patterns are prone to repetition, lacking a natural sense of irregular movement and exhibiting monotonous dynamic changes. Furthermore, typical shader layers usually contain only single or few layers of noise perturbations, lacking the energy gradient and flow feel between the multi-layered structure of a real flame. Moreover, this implementation method cannot respond to the game environment and can only change the shape by adjusting the noise frequency or offset speed, lacking interactive control parameters.

[0018] In view of this, the present application provides a rendering method for polka dot flames. By combining multi-channel flame data and the multi-layer polka dot structure, the polka dot flames can present a more realistic physical hierarchy and dynamic changes. Moreover, no volume calculation or real-time simulation is required during the rendering process, which can reduce rendering overhead while retaining richer flame details.

[0019] Figure 1 This is a flowchart illustrating a method for rendering polka-dot flames according to an embodiment of this application. The execution entity of this method can be an electronic device such as a computer, server, or processor. Optionally, the rendered polka-dot flame effect can be applied to 2D rendering scenes, game scenes, film and television scenes, etc., without limitation, and may vary depending on the actual application scenario. Figure 1 As shown, the method includes: S101. Obtain multi-channel flame data, which includes at least two types of flame physical property information.

[0020] In some implementations, multi-channel flame data can be stored in static flame frames, which can be derived from sequence frame animation textures. These sequence frame animation textures can be generated from flame animation sequences, which can be generated using fluid simulation and rendering software.

[0021] Optionally, the acquired multi-channel flame data may include at least two of the following: flame temperature information, flame morphology masking information, and flame depth information. Among them, flame temperature information can characterize the heat energy distribution and brightness levels inside the flame; flame morphology masking information can characterize the outer edge morphology and flow range of the flame; and flame depth information can characterize the outer contour masking and transparency of the flame.

[0022] S102. Generate a multi-layer dot structure based on the UV coordinates of the surface to be rendered. The multi-layer dot structure includes at least two layers of dot maps with different frequency characteristics.

[0023] The surface to be rendered can be a preset surface to be rendered as a polka dot flame. Optionally, the surface to be rendered can be any surface in a game scene or a movie scene.

[0024] Optionally, the frequency characteristics of each dot pattern in the multi-layer dot pattern can indicate the density of preset dots in each dot pattern. That is, the density of preset dots in at least two dot patterns in the multi-layer dot pattern should be different.

[0025] In some implementations, the number of dot plots in the multi-layer dot plot structure can be the same as the category of flame physical attribute information in the multi-channel flame data. Each dot plot can be used to sample the flame static frame corresponding to each flame physical attribute information to obtain the dot flame sampling data corresponding to each dot plot. For example, if the multi-channel flame data includes two types of flame physical attribute information, the generated multi-layer dot plot structure can include two layers of dot plots with different frequency characteristics. Of course, this application does not limit the correspondence between each dot plot and each flame physical attribute information, and it can be flexibly set according to the actual application scenario.

[0026] It should be noted that this application does not limit the shape or size of the preset dots in each dot pattern. Depending on the actual application scenario, the shape and / or size of the preset dots in each dot pattern can be the same. The shape of the preset dots can be a circle, square, rhombus, etc., and is not limited here.

[0027] In some implementations, when generating a multi-layer dot structure based on the UV coordinates of the surface to be rendered, the UV coordinates of the surface to be rendered can be tiled according to the tiling coefficients corresponding to each layer of the dot map to obtain the tiled UV coordinates corresponding to the surface to be rendered; a texture folding operation is performed on the tiled UV coordinates corresponding to the surface to be rendered to divide the tiled UV coordinates corresponding to the surface to be rendered into multiple grid units, and a corresponding dot map is generated according to the UV coordinates of each pixel in each grid unit.

[0028] S103. Render the surface to be rendered based on multi-channel flame data and multi-layer wave point structure, and determine the flame rendering result.

[0029] After obtaining the aforementioned multi-layered dot structure and multi-channel flame data, the static frames of flames corresponding to the physical attribute information of each flame can be sampled using each dot map to obtain the dot flame sampling data corresponding to each dot map. The dot flame sampling data of each layer is then used to render the surface to be rendered to obtain the dot flame rendering effect corresponding to each dot map. The dot flame rendering effects corresponding to each dot map are then superimposed to obtain the final flame rendering result. This demonstrates that by combining multi-channel flame data and multi-layered dot structures, the dot flames in the flame rendering result can present a more realistic physical hierarchy and dynamic changes.

[0030] In some implementations, it should be noted that during sampling, the current sampling time can be calculated using a preset time acquisition function (e.g., the Time function in the shader). Different sampling times can correspond to sampling different static flame frames. Specifically, during sampling, the static flame frame can be determined based on the current sampling time, and the physical property information of the flame in the static flame frame can be sampled using the dotted structure of each layer to obtain the dotted flame sampling data corresponding to each dotted image.

[0031] In summary, this application provides a method for rendering polka dot flames. The method includes: acquiring multi-channel flame data, which includes at least two types of flame physical property information; generating a multi-layer polka dot structure based on the UV coordinates of the surface to be rendered, which includes at least two layers of polka dot maps with different frequency characteristics; rendering the surface to be rendered based on the multi-channel flame data and the multi-layer polka dot structure, and determining the flame rendering result. This method achieves the combination of multi-channel flame data and multi-layer polka dot structure, which not only enables polka dot flames to simultaneously possess realistic dynamics and cartoonish texture, but also realizes the color progression and energy difference representation of the inner and outer layers of the polka dot flame, presenting a more realistic physical hierarchy and dynamic changes. Moreover, no volume calculation or real-time simulation is required during the rendering process, which can reduce rendering overhead while retaining richer flame details.

[0032] Figure 2 This is a flowchart illustrating another method for rendering polka-dot flames provided in an embodiment of this application. In optional implementations, such as... Figure 2 As shown, the above-mentioned generation of multi-layered wave point structures based on the UV coordinates of the surface to be rendered includes: S201. Based on the tiling factor corresponding to each layer of the dot map, perform a tiling operation on the UV coordinates of the surface to be rendered to obtain the tiling UV coordinates corresponding to the surface to be rendered.

[0033] The tiling factor corresponding to each layer of the dot map determines the density of preset dots in the dot map. In some implementations, the UV coordinates of the surface to be rendered can be tiled according to the tiling factor corresponding to each layer of the dot map to obtain the tiled UV coordinates of the surface to be rendered.

[0034] For example, if the tiling factor corresponding to a certain dot pattern is 10, and the UV coordinates of the surface to be rendered are in the range of 0 to 1, then after tiling according to the tiling factor corresponding to the dot pattern, the tiling UV coordinates of the surface to be rendered will be in the range of 0 to 10.

[0035] S202. Perform texture folding operation on the tiled UV coordinates corresponding to the surface to be rendered to obtain multiple mesh units.

[0036] In this grid, the UV coordinates of each grid cell are located between 0 and 1.

[0037] In some implementations, the Frac function can be used to perform texture folding operations on the tiled UV coordinates of the area to be rendered, obtaining multiple mesh cells. According to the characteristics of the Frac function, the UV coordinates of each mesh cell obtained at this time will be between 0 and 1. Each mesh cell can be a square.

[0038] S203. For each grid cell, calculate the target distance between the UV coordinates of each pixel in the grid cell and the preset UV coordinates, and use the target distance corresponding to each pixel as the first gray value of each pixel.

[0039] Optionally, the preset UV coordinates can be the UV coordinates of the center point of the grid cell (0.5, 0.5). For each grid cell, the target distance between the UV coordinates of each pixel in the grid cell and the preset UV coordinates is calculated. Based on the target distance corresponding to each pixel, the gray value of each pixel can be updated to obtain the first gray value of each pixel.

[0040] Understandably, at this point, for each grid cell, a radial gradient effect from black to white can be achieved, with the center being black and the top corners being white, with the center as the origin.

[0041] S204. Generate dot maps for each layer based on the first grayscale value of each pixel, and generate a multi-layer dot structure based on the dot maps for each layer.

[0042] After obtaining the first grayscale value of each pixel, the preset dot area corresponding to each grid unit can be determined based on the first grayscale value of each pixel. It can be understood that after performing similar processing on each grid unit, the dot map of each layer can be obtained.

[0043] Of course, it should be noted that this application does not limit the density, shape, size, etc. of the preset dots in each layer of the dot pattern, and such limitation is not made here.

[0044] In some implementations, different tiling factors can be set for each flame physical attribute information, thereby allowing for different densities of preset dots in each layer of the dot plot. For example, in some scenarios, multi-channel flame data includes three types of flame physical attribute information: A1, A2, and A3. The dot plot corresponding to flame physical attribute information A1 can be a dense dot plot, the dot plot corresponding to flame physical attribute information A2 can be a medium-dense dot plot, and the dot plot corresponding to flame physical attribute information A3 can be a sparse dot plot. However, it should be noted that the specific settings are not limited to this and can vary depending on the actual application scenario.

[0045] By applying the embodiments of this application, it is possible to freely control the shape and layer of the flame according to the tiling coefficient corresponding to each flame physical property information based on the actual application scenario, and generate dot maps with different densities for each flame physical property information, thereby quickly realizing multi-style visual representation and improving the applicability of the method of this application.

[0046] In an optional implementation, in order to improve the production efficiency of the dot pattern for each channel, the shape of the preset dots in the dot pattern for each channel can be set to be the same. For example, the shape of the preset dots in the dot pattern for each channel can be set to be a circle. Of course, the specific setting method is not limited to this.

[0047] In some implementations, generating the dot map of each layer based on the first grayscale value of each pixel includes: The first grayscale value of each pixel is inverted to obtain the second grayscale value of each pixel; according to the preset softening function, the second grayscale value of each pixel is softened to generate the dot map of each layer.

[0048] Based on the above explanation, it can be understood that for each grid cell, after taking the target distance corresponding to each pixel as the first gray value of each pixel, the central area of ​​the obtained grid cell is black and the edge area is white. In some implementations, in order to obtain a preset spot with a bright center and dark edges, the first gray value of each pixel can be reversed to obtain the second gray value of each pixel.

[0049] Furthermore, the smoothstep function or a function of similar function type can be used to sharpen and soften the second grayscale value of each pixel. This can turn blurry dots in each grid cell into sharp dots and soften the edges of the dots, thus obtaining the preset polka dots corresponding to each grid cell. Based on the preset polka dots corresponding to each grid cell, the polka dot map of each layer can be generated, which can improve the production efficiency of the polka dot map of each layer.

[0050] Figure 3 This is a schematic diagram of a dot pattern provided in an embodiment of this application, wherein, from Figure 3 As can be seen, this dot pattern can include multiple circular dots. Of course, the shape, size, and density of the preset waveforms in each layer of the dot pattern in the multi-layer dot pattern structure are not fixed. Figure 3 Limited to.

[0051] Of course, it should be noted that in some implementations, the smoothstep function can also be used to adjust the size of the dot waveform in the grid cell. This is not limited here and may vary depending on the actual application scenario.

[0052] Figure 4 This is a flowchart illustrating another method for rendering polka-dot flames provided in an embodiment of this application. In optional implementations, such as... Figure 4 As shown, the above-mentioned rendering of the surface to be rendered based on multi-channel flame data and multi-layer wave point structure, and determination of the flame rendering result, includes: S401. Sample the multi-channel flame data according to the UV coordinates of the face to be rendered, and obtain the sampled data corresponding to each channel.

[0053] Optionally, when multi-channel flame data is stored in a static flame frame, the static flame frame can be sampled according to the UV coordinates of the face to be rendered, and the sampled data corresponding to each channel can be obtained through sampling.

[0054] S402. Based on the sampling data corresponding to each channel, obtain the non-flame area mask corresponding to each channel.

[0055] It is understandable that the flame region corresponding to each channel can be determined based on the sampling data corresponding to each channel. Therefore, the non-flame region mask corresponding to each channel can be obtained based on the sampling data corresponding to each channel. The non-flame region mask can characterize the non-flame region of each channel.

[0056] S403. Render the surface to be rendered based on the multi-layered dot structure and the non-flame area mask corresponding to each channel to determine the flame rendering result.

[0057] In some implementations, during rendering, the dot maps in the multi-layer dot structure can be filtered out based on the non-flame region masks corresponding to each channel to obtain the dot grayscale images corresponding to each channel. The dot grayscale images for each channel do not include preset dots from non-flame regions, but retain preset dots from flame regions in each dot map. Then, the dot grayscale images can be sampled and rendered to obtain the flame rendering result.

[0058] Figure 5 This is a flowchart illustrating another method for rendering polka-dot flames provided in an embodiment of this application. In optional implementations, such as... Figure 5 As shown, the above process renders the surface to be rendered based on the multi-layered dot structure and the non-flame region mask corresponding to each channel, determining the flame rendering result, including: S501. Based on the multi-layer dot structure and the non-flame region mask corresponding to each channel, obtain the grayscale image of the dot corresponding to each channel.

[0059] S502. Render the surface to be rendered based on the grayscale image of the polka dots corresponding to each channel, and determine the flame rendering result.

[0060] Optionally, a mask for the non-flame region corresponding to each channel can be used to filter out the dot map corresponding to each channel, thereby filtering out the preset dots in the non-flame region of the dot grayscale image and retaining the preset dots in the flame region of the dot grayscale image. At this time, the dot grayscale image corresponding to each channel can be obtained.

[0061] After obtaining the grayscale images of the polka dots corresponding to each channel, the grayscale images of the polka dots corresponding to multiple channels can be superimposed to obtain a composite grayscale image of polka dots. This allows the preset polka dots in the composite grayscale image to continuously jump and change like breathing in time or space. Furthermore, by setting corresponding luminance channels and transparency channels for the composite grayscale image of polka dots, the target performance effect of generating polka dot flames can be rendered. This makes the shape of the polka dot flames no longer rigid, but rather exhibits random flashing, flowing, and varying brightness and darkness, making the overall appearance more vibrant and dynamic.

[0062] In an optional implementation, the multi-channel flame data includes at least two types of flame physical property information: flame temperature information, flame shape masking information, and flame depth information. The grayscale image includes at least two of the following: a first grayscale image, a second grayscale image, and a third grayscale image. The first grayscale image is used to characterize the thermal energy distribution and brightness levels inside the flame, the second grayscale image is used to characterize the outer edge shape and flow range of the flame, and the third grayscale image is used to characterize the depth information of the flame.

[0063] For example, if the flame physical attribute information corresponding to the first channel in multi-channel flame data is flame temperature information, the flame physical attribute information corresponding to the second channel is flame shape masking information, and the flame physical attribute information corresponding to the third channel is flame depth information.

[0064] Referring to the above explanation, by using a mask representing the non-flame area corresponding to the first channel to filter out the dot pattern corresponding to the first channel, the non-flame areas in the dot pattern corresponding to the first channel can be filtered out, while the flame areas are retained, resulting in a grayscale dot pattern corresponding to the first channel. Similarly, by using a mask representing the non-flame area corresponding to the second channel to filter out the dot pattern corresponding to the second channel, the non-flame areas in the dot pattern corresponding to the second channel can be filtered out, while the flame areas are retained, resulting in a grayscale dot pattern corresponding to the second channel.

[0065] Understandably, the grayscale image of the first channel obtained at this time can represent the heat energy distribution and brightness level inside the flame in the flame area, the grayscale image of the second channel can represent the outer edge shape and flow range of the flame in the flame area, and the grayscale image of the third channel can represent the depth information of the flame. Among them, the depth information of the flame can control the outer contour masking and transparency of the flame during the rendering process, realize the color progression and energy difference of the inner and outer layers of the flame, and enhance the visual depth.

[0066] Figure 6 This is a flowchart illustrating another method for rendering polka-dot flames provided in an embodiment of this application. In optional implementations, such as... Figure 6 As shown, the above process renders the surface to be rendered based on the grayscale image of each channel to determine the flame rendering result, including: S601. Overlay the grayscale images of the corresponding polka dots for each channel to obtain a composite grayscale image.

[0067] S602. Set the transparency parameter corresponding to the synthesized polka dot grayscale image, and set the self-illumination parameter of the polka dot grayscale image corresponding to each channel.

[0068] The composite polka dot grayscale image is obtained by overlaying the grayscale images of each channel. A corresponding transparency parameter can be set for this composite polka dot grayscale image. In some implementations, the self-emission parameters, such as self-emission color, can be set separately for the grayscale images of each channel; this is not limited here.

[0069] In some implementations, the self-emission parameters of the grayscale images of the corresponding channels can be the same or different, which is not limited here. They can be flexibly set according to the actual application scenario, so as to realize the free control of the flame shape and layer according to the self-emission parameters of the grayscale images of the corresponding channels, thereby quickly realizing multi-style visual representation and improving the applicability of the method of this application.

[0070] S603. Based on the composite dot grayscale image, the transparency parameter corresponding to the composite dot grayscale image, the dot grayscale images corresponding to each channel, and the self-illumination parameters of the dot grayscale images corresponding to each channel, render the surface to be rendered and determine the flame rendering result.

[0071] In the specific rendering process, the transparency of the synthesized polka dot grayscale image can be rendered using the transparency parameter corresponding to the synthesized polka dot grayscale image, thereby generating a semi-transparent flame visual effect with dynamically changing contours and local void structures. The light effect of the polka dot grayscale image corresponding to each channel can be rendered using the self-illumination parameter corresponding to each channel, so that the polka dot flame can still present a dynamic light effect with rhythm and layered distribution even without the participation of external light. Finally, the special effect of the polka dot flame can be generated by rendering the surface to be rendered based on the adjusted synthesized polka dot grayscale image and the polka dot grayscale image corresponding to each channel.

[0072] In some implementations, the material shader's emission channel can be set according to the transparency parameter corresponding to the synthesized polka dot grayscale image, and the material shader's transparency channel can be set according to the self-emission parameter of the polka dot grayscale image corresponding to each channel, thereby rendering the target effect of generating polka dot flames.

[0073] Figure 7 This is a schematic diagram of a dotted flame provided in an embodiment of this application. As can be seen, as... Figure 7 As shown, this not only allows the polka dot flame to simultaneously possess realistic dynamics and a cartoonish texture, but also achieves color progression and energy difference representation between the inner and outer layers of the polka dot flame, presenting a more realistic physical hierarchy and dynamic changes.

[0074] In an optional implementation, the above-mentioned sampling of multi-channel flame data based on the UV coordinates of the surface to be rendered to obtain the sampling data corresponding to each channel includes: Based on the current sampling time, obtain the target frame identifier of the target flame static frame; based on the UV coordinates of the face to be rendered, perform multi-channel sampling on the target flame static frame corresponding to the target frame identifier in the sequence frame animation texture, and obtain the sampling data corresponding to each channel.

[0075] Optionally, the current sampling time can be obtained through the Time function in the material shader. Based on the correspondence between the sampling time and the frame identifier, the target frame identifier of the target flame static frame corresponding to the current sampling time can be obtained. Based on the UV coordinates of the face to be rendered, the multi-channel flame data stored in the target flame static frame corresponding to the target frame identifier in the sequence frame animation texture can be sampled separately to obtain the corresponding sampled data. This allows the subsequent generation of polka dot flames based on the sampled data corresponding to each channel to make the flames have both realistic dynamics and cartoon texture.

[0076] In some implementations, a material shader can be created in the UE engine, and the sequence frame animation texture can be imported as a texture 2D bitmap. The MaterialFunction FlipBook function can be used to dynamically sample the corresponding static flame frames based on the time frame index.

[0077] In summary, the polka dot flame rendering method provided in this application, by introducing sequential frame animation textures and multi-layer polka dot maps, can significantly reduce rendering overhead while retaining richer flame details, presenting a more realistic physical hierarchy and dynamic changes. In addition, this application can also support independent adjustment of flame speed during multi-channel sampling, and can support independent adjustment of flame color through the transparency channel, making it more applicable and able to meet the rendering needs of different scenarios.

[0078] Figure 8 This is a flowchart illustrating another method for rendering polka-dot flames provided in an embodiment of this application. In optional implementations, such as... Figure 8 As shown, the acquisition of multi-channel flame data includes: S801. Obtain various physical attribute parameters of each flame animation frame in the flame animation sequence.

[0079] Optionally, the flame animation sequence can be generated by fluid simulation and rendering software. In some implementations, the fluid simulation and rendering software can be Embergen, Blender, etc., which are not limited here.

[0080] To better understand this application, the following embodiments use Embergen software as an example. Specifically, when constructing a flame simulation scene in Embergen software, particle combustion parameters can be set to obtain flame volume data with realistic dynamic characteristics. These particle combustion parameters may include: fuel ignition threshold, flame gain coefficient, thermal expansion intensity, and oxygen-in-fuel ratio, etc., and are not limited thereto.

[0081] Of course, it should be noted that this application does not limit the number of fire animation frames in the fire animation sequence. Depending on the actual application scenario, it may include any number of frames, such as 36 frames, 50 frames, etc., and is not limited here.

[0082] Figure 9 The diagram shows a flame animation frame provided in an embodiment of this application. It can be seen that the flame animation frames in the generated flame animation sequence can present highly realistic flame behavior. Specifically, they can present various flame behaviors such as the natural rise and turbulent movement of flames, temperature-driven buoyancy effect, self-luminescence of light and shadow interaction, and morphological changes during dynamic combustion (such as ignition, spread, and extinguishing).

[0083] In some implementations, based on the constructed flame animation sequence, various physical attribute parameters of each flame animation frame can be obtained. Optionally, these various physical attribute parameters may include: flame temperature information, flame shape masking information, flame depth information, etc.

[0084] Among them, the flame temperature information of each flame animation frame is used to characterize the heat energy distribution and brightness level inside the flame corresponding to each flame animation frame; the flame shape masking information of each flame animation frame is used to characterize the outer edge shape and flow range of the flame corresponding to each flame animation frame; and the flame depth information of each flame animation frame is used to characterize the outer contour masking and transparency of the flame corresponding to each flame animation frame.

[0085] S802. Generate a sequence frame animation texture based on the various physical attribute parameters of each flame animation frame. The sequence frame animation texture includes multiple static flame frames, and each static flame frame stores multi-channel flame data.

[0086] The sequential frame animation texture is used to record the main forms of flame changes over time. In some implementations, after obtaining multiple physical attribute parameters of each flame animation frame, static flame frames corresponding to multi-channel flame data can be obtained based on these parameters. These static flame frames are then compressed into a single sequential frame animation texture (Flipbook) according to their animation frame identifiers and stored separately in the RGB channels of the texture. Compared to existing technologies, this channel merging method significantly reduces the number of textures and memory read overhead while ensuring the independent availability of each physical attribute, providing an efficient data structure for real-time rendering. Furthermore, the introduction of sequential animation textures can achieve complex lighting effects without requiring volumetric calculations or real-time simulations, reducing rendering overhead while preserving richer flame details.

[0087] Figure 10 This is a schematic diagram of a sequence frame animation texture provided in an embodiment of this application, such as... Figure 10As shown, the sequence frame animation texture can be an N×M tile structure, specifically a 6×6 tile structure, where each tile region can store one static flame frame. Of course, this application does not limit the values ​​of N and M, and they can vary depending on the actual application scenario.

[0088] In some implementations, one channel of the sequence frame animation texture can store a physical attribute information. Optionally, the first channel of the sequence frame animation texture can store the flame temperature information corresponding to each static flame frame, the second channel can store the flame shape masking information corresponding to each static flame frame, and the third channel can store the flame depth information corresponding to each static flame frame.

[0089] In some implementations, the first channel can be an R channel, the second channel can be a G channel, and the third channel can be a B channel. Of course, it should be noted that, depending on the actual application scenario, the first channel can also be a G or B channel, the second channel can be an R or B channel, and the third channel can be an R or G channel. There are no limitations here, and the settings can be flexibly configured according to the actual application scenario.

[0090] Figure 11 This is a functional module diagram of a polka-dot flame rendering device provided in an embodiment of this application. The basic principle and technical effects of this device are the same as those in the aforementioned corresponding method embodiments. For the sake of brevity, parts not mentioned in this embodiment can be referred to the corresponding content in the method embodiments. Figure 11 As shown, the rendering apparatus 100 includes: The acquisition module 110 is used to acquire multi-channel flame data, which includes at least two types of flame physical property information. The generation module 120 is used to generate a multi-layer dot structure based on the UV coordinates of the surface to be rendered. The multi-layer dot structure includes at least two layers of dot maps with different frequency characteristics. The rendering module 130 is used to render the surface to be rendered based on the multi-channel flame data and the multi-layer dot structure, and to determine the flame rendering result.

[0091] In an optional implementation, the generation module 120 is specifically used to perform a tiling operation on the UV coordinates of the surface to be rendered according to the tiling coefficients corresponding to each layer of the dot map, and obtain the tiling UV coordinates corresponding to the surface to be rendered. A texture folding operation is performed on the tiled UV coordinates corresponding to the surface to be rendered to obtain multiple mesh units, wherein the UV coordinates of each mesh unit are between 0 and 1; For each grid cell, calculate the target distance between the UV coordinates of each pixel in the grid cell and the preset UV coordinates, and use the target distance corresponding to each pixel as the first gray value of each pixel; Based on the first grayscale value of each pixel, generate a dot map of each layer, and based on the dot map of each layer, generate a multi-layer dot structure.

[0092] In an optional implementation, the generation module 120 is specifically used to invert the first grayscale value of each pixel to obtain the second grayscale value of each pixel. According to the preset softening function, the second gray value of each pixel is softened to generate a dot map of each layer.

[0093] In an optional implementation, the rendering module 130 is specifically used to sample the multi-channel flame data according to the UV coordinates of the surface to be rendered, and obtain the sampling data corresponding to each channel. Based on the sampling data corresponding to each channel, obtain the non-flame area mask corresponding to each channel; The surface to be rendered is rendered based on the multi-layered dot structure and the non-flame region mask corresponding to each channel to determine the flame rendering result.

[0094] In an optional implementation, the rendering module 130 is specifically used to obtain the grayscale image of each channel based on the multi-layer dot structure and the non-flame region mask corresponding to each channel. The surface to be rendered is rendered based on the grayscale image of the polka dots corresponding to each channel to determine the flame rendering result.

[0095] In an optional implementation, the multi-channel flame data includes at least two types of flame physical property information: flame temperature information, flame shape masking information, and flame depth information. The grayscale image includes at least two of the following: a first grayscale image, a second grayscale image, and a third grayscale image. The first grayscale image is used to characterize the thermal energy distribution and brightness levels inside the flame, the second grayscale image is used to characterize the outer edge shape and flow range of the flame, and the third grayscale image is used to characterize the depth information of the flame.

[0096] In an optional implementation, the rendering module 130 is specifically used to overlay the grayscale images of the polka dots corresponding to each of the channels to obtain a composite grayscale image of the polka dots. Set the transparency parameter corresponding to the synthesized polka dot grayscale image, and set the self-illumination parameter of the polka dot grayscale image corresponding to each channel; Based on the synthesized grayscale image, the transparency parameter corresponding to the synthesized grayscale image, the grayscale images of each channel, and the self-illumination parameters of the grayscale images of each channel, the surface to be rendered is rendered to determine the flame rendering result.

[0097] In an optional implementation, the acquisition module 110 is specifically used to acquire multiple physical attribute parameters of each flame animation frame in the flame animation sequence; Based on various physical attribute parameters of each flame animation frame, a sequence frame animation texture is generated. The sequence frame animation texture includes multiple static flame frames, and each static flame frame stores multi-channel flame data.

[0098] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0099] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0100] Figure 12 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. This electronic device can be integrated into the aforementioned rendering device. Figure 12 As shown, the electronic device may include a processor 210, a storage medium 220, and a bus 230. The storage medium 220 stores machine-readable instructions executable by the processor 210. When the electronic device is running, the processor 210 communicates with the storage medium 220 via the bus 230. The processor 210 executes the machine-readable instructions to perform the steps of the following method embodiment: Acquire multi-channel flame data, wherein the multi-channel flame data includes at least two types of flame physical property information; A multi-layered dot structure is generated based on the UV coordinates of the surface to be rendered. The multi-layered dot structure includes at least two layers of dot maps with different frequency characteristics. The rendering result of the flame is determined by rendering the surface to be rendered based on the multi-channel flame data and the multi-layer wave point structure.

[0101] In an optional implementation, generating a multi-layered dot structure based on the UV coordinates of the surface to be rendered includes: Based on the tiling factor corresponding to each layer of the dot map, the UV coordinates of the surface to be rendered are tiled to obtain the tiled UV coordinates of the surface to be rendered. A texture folding operation is performed on the tiled UV coordinates corresponding to the surface to be rendered to obtain multiple mesh units, wherein the UV coordinates of each mesh unit are between 0 and 1; For each grid cell, calculate the target distance between the UV coordinates of each pixel in the grid cell and the preset UV coordinates, and use the target distance corresponding to each pixel as the first gray value of each pixel; Based on the first grayscale value of each pixel, generate a dot map of each layer, and based on the dot map of each layer, generate a multi-layer dot structure.

[0102] In an optional implementation, generating the dot map of each layer based on the first grayscale value of each pixel includes: The first grayscale value of each pixel is inverted to obtain the second grayscale value of each pixel. According to the preset softening function, the second gray value of each pixel is softened to generate a dot map of each layer.

[0103] In an optional implementation, rendering the surface to be rendered based on the multi-channel flame data and the multi-layer dot structure to determine the flame rendering result includes: The multi-channel flame data is sampled according to the UV coordinates of the face to be rendered, and the sampled data corresponding to each channel is obtained. Based on the sampling data corresponding to each channel, obtain the non-flame area mask corresponding to each channel; The surface to be rendered is rendered based on the multi-layered dot structure and the non-flame region mask corresponding to each channel to determine the flame rendering result.

[0104] In an optional implementation, the step of rendering the surface to be rendered based on the multi-layered dot structure and the non-flame region mask corresponding to each channel, and determining the flame rendering result, includes: Based on the multi-layer dot structure and the non-flame region mask corresponding to each channel, obtain the dot grayscale image corresponding to each channel; The surface to be rendered is rendered based on the grayscale image of the polka dots corresponding to each channel to determine the flame rendering result.

[0105] In an optional implementation, the multi-channel flame data includes at least two types of flame physical property information: flame temperature information, flame shape masking information, and flame depth information. The grayscale image includes at least two of the following: a first grayscale image, a second grayscale image, and a third grayscale image. The first grayscale image is used to characterize the thermal energy distribution and brightness levels inside the flame, the second grayscale image is used to characterize the outer edge shape and flow range of the flame, and the third grayscale image is used to characterize the depth information of the flame.

[0106] In an optional implementation, the step of rendering the surface to be rendered based on the grayscale image of each channel to determine the flame rendering result includes: The grayscale images of the polka dots corresponding to each of the channels are superimposed to obtain a composite grayscale image of the polka dots. Set the transparency parameter corresponding to the synthesized polka dot grayscale image, and set the self-illumination parameter of the polka dot grayscale image corresponding to each channel; Based on the synthesized grayscale image, the transparency parameter corresponding to the synthesized grayscale image, the grayscale images of each channel, and the self-illumination parameters of the grayscale images of each channel, the surface to be rendered is rendered to determine the flame rendering result.

[0107] In an optional implementation, acquiring multi-channel flame data includes: Obtain multiple physical property parameters for each fire animation frame in the fire animation sequence; Based on various physical attribute parameters of each flame animation frame, a sequence frame animation texture is generated. The sequence frame animation texture includes multiple static flame frames, and each static flame frame stores multi-channel flame data.

[0108] The specific implementation methods and technical effects of the above-described method embodiments are similar to those described above, and will not be repeated here.

[0109] Optionally, this application also provides a storage medium storing a computer program, which, when run by a processor, executes the steps of the following method embodiments: Acquire multi-channel flame data, wherein the multi-channel flame data includes at least two types of flame physical property information; A multi-layered dot structure is generated based on the UV coordinates of the surface to be rendered. The multi-layered dot structure includes at least two layers of dot maps with different frequency characteristics. The rendering result of the flame is determined by rendering the surface to be rendered based on the multi-channel flame data and the multi-layer wave point structure.

[0110] In an optional implementation, generating a multi-layered dot structure based on the UV coordinates of the surface to be rendered includes: Based on the tiling factor corresponding to each layer of the dot map, the UV coordinates of the surface to be rendered are tiled to obtain the tiled UV coordinates of the surface to be rendered. A texture folding operation is performed on the tiled UV coordinates corresponding to the surface to be rendered to obtain multiple mesh units, wherein the UV coordinates of each mesh unit are between 0 and 1; For each grid cell, calculate the target distance between the UV coordinates of each pixel in the grid cell and the preset UV coordinates, and use the target distance corresponding to each pixel as the first gray value of each pixel; Based on the first grayscale value of each pixel, generate a dot map of each layer, and based on the dot map of each layer, generate a multi-layer dot structure.

[0111] In an optional implementation, generating the dot map of each layer based on the first grayscale value of each pixel includes: The first grayscale value of each pixel is inverted to obtain the second grayscale value of each pixel. According to the preset softening function, the second gray value of each pixel is softened to generate a dot map of each layer.

[0112] In an optional implementation, rendering the surface to be rendered based on the multi-channel flame data and the multi-layer dot structure to determine the flame rendering result includes: The multi-channel flame data is sampled according to the UV coordinates of the face to be rendered, and the sampled data corresponding to each channel is obtained. Based on the sampling data corresponding to each channel, obtain the non-flame area mask corresponding to each channel; The surface to be rendered is rendered based on the multi-layered dot structure and the non-flame region mask corresponding to each channel to determine the flame rendering result.

[0113] In an optional implementation, the step of rendering the surface to be rendered based on the multi-layered dot structure and the non-flame region mask corresponding to each channel, and determining the flame rendering result, includes: Based on the multi-layer dot structure and the non-flame region mask corresponding to each channel, obtain the dot grayscale image corresponding to each channel; The surface to be rendered is rendered based on the grayscale image of the polka dots corresponding to each channel to determine the flame rendering result.

[0114] In an optional implementation, the multi-channel flame data includes at least two types of flame physical property information: flame temperature information, flame shape masking information, and flame depth information. The grayscale image includes at least two of the following: a first grayscale image, a second grayscale image, and a third grayscale image. The first grayscale image is used to characterize the thermal energy distribution and brightness levels inside the flame, the second grayscale image is used to characterize the outer edge shape and flow range of the flame, and the third grayscale image is used to characterize the depth information of the flame.

[0115] In an optional implementation, the step of rendering the surface to be rendered based on the grayscale image of each channel to determine the flame rendering result includes: The grayscale images of the polka dots corresponding to each of the channels are superimposed to obtain a composite grayscale image of the polka dots. Set the transparency parameter corresponding to the synthesized polka dot grayscale image, and set the self-illumination parameter of the polka dot grayscale image corresponding to each channel; Based on the synthesized grayscale image, the transparency parameter corresponding to the synthesized grayscale image, the grayscale images of each channel, and the self-illumination parameters of the grayscale images of each channel, the surface to be rendered is rendered to determine the flame rendering result.

[0116] In an optional implementation, acquiring multi-channel flame data includes: Obtain multiple physical property parameters for each fire animation frame in the fire animation sequence; Based on various physical attribute parameters of each flame animation frame, a sequence frame animation texture is generated. The sequence frame animation texture includes multiple static flame frames, and each static flame frame stores multi-channel flame data.

[0117] The specific implementation methods and technical effects of the above-described method embodiments are similar to those described above, and will not be repeated here.

[0118] Optionally, this application also provides a computer program product, the computer program product including instructions, which, when executed on an electronic device, cause the electronic device to perform the steps of the above method embodiments.

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

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

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

[0122] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0123] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0124] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

Claims

1. A method for rendering polka-dot flames, characterized in that, The method includes: Acquire multi-channel flame data, wherein the multi-channel flame data includes at least two types of flame physical property information; A multi-layered dot structure is generated based on the UV coordinates of the surface to be rendered. The multi-layered dot structure includes at least two layers of dot maps with different frequency characteristics. The rendering result of the flame is determined by rendering the surface to be rendered based on the multi-channel flame data and the multi-layer wave point structure.

2. The method according to claim 1, characterized in that, The generation of a multi-layered wave point structure based on the UV coordinates of the surface to be rendered includes: Based on the tiling factor corresponding to each layer of the dot map, the UV coordinates of the surface to be rendered are tiled to obtain the tiled UV coordinates of the surface to be rendered. A texture folding operation is performed on the tiled UV coordinates corresponding to the surface to be rendered to obtain multiple mesh units, wherein the UV coordinates of each mesh unit are between 0 and 1; For each grid cell, calculate the target distance between the UV coordinates of each pixel in the grid cell and the preset UV coordinates, and use the target distance corresponding to each pixel as the first gray value of each pixel; Based on the first grayscale value of each pixel, generate a dot map of each layer, and based on the dot map of each layer, generate a multi-layer dot structure.

3. The method according to claim 2, characterized in that, The step of generating wavelet maps for each layer based on the first grayscale value of each pixel includes: The first grayscale value of each pixel is inverted to obtain the second grayscale value of each pixel. According to the preset softening function, the second gray value of each pixel is softened to generate a dot map of each layer.

4. The method according to claim 1, characterized in that, The process of rendering the surface to be rendered based on the multi-channel flame data and the multi-layer wave point structure, and determining the flame rendering result, includes: The multi-channel flame data is sampled according to the UV coordinates of the face to be rendered, and the sampled data corresponding to each channel is obtained. Based on the sampling data corresponding to each channel, obtain the non-flame area mask corresponding to each channel; The surface to be rendered is rendered based on the multi-layered dot structure and the non-flame region mask corresponding to each channel to determine the flame rendering result.

5. The method according to claim 4, characterized in that, The step of rendering the surface to be rendered based on the multi-layered dot structure and the non-flame region mask corresponding to each channel, and determining the flame rendering result, includes: Based on the multi-layer dot structure and the non-flame region mask corresponding to each channel, obtain the dot grayscale image corresponding to each channel. The surface to be rendered is rendered based on the grayscale image of the polka dots corresponding to each channel to determine the flame rendering result.

6. The method according to claim 5, characterized in that, The multi-channel flame data includes at least two types of flame physical attribute information: flame temperature information, flame shape masking information, and flame depth information. The grayscale image includes at least two of the following: a first grayscale image, a second grayscale image, and a third grayscale image. The first grayscale image is used to characterize the thermal energy distribution and brightness levels inside the flame, the second grayscale image is used to characterize the outer edge shape and flow range of the flame, and the third grayscale image is used to characterize the depth information of the flame.

7. The method according to claim 4, characterized in that, The step of rendering the surface to be rendered based on the grayscale image of each channel to determine the flame rendering result includes: The grayscale images of the polka dots corresponding to each of the channels are superimposed to obtain a composite grayscale image of the polka dots. Set the transparency parameter corresponding to the synthesized polka dot grayscale image, and set the self-illumination parameter of the polka dot grayscale image corresponding to each channel; The surface to be rendered is rendered based on the synthesized grayscale image, the transparency parameter corresponding to the synthesized grayscale image, the grayscale images of each channel, and the self-illumination parameters of the grayscale images of each channel to determine the flame rendering result.

8. The method according to any one of claims 1-7, characterized in that, The acquisition of multi-channel flame data includes: Obtain multiple physical property parameters for each fire animation frame in the fire animation sequence; Based on various physical attribute parameters of each flame animation frame, a sequence frame animation texture is generated. The sequence frame animation texture includes multiple static flame frames, and each static flame frame stores multi-channel flame data.

9. A rendering device for polka-dot flames, characterized in that, The rendering device includes: The acquisition module is used to acquire multi-channel flame data, which includes at least two types of flame physical property information. The generation module is used to generate a multi-layer dot structure based on the UV coordinates of the surface to be rendered. The multi-layer dot structure includes at least two layers of dot maps with different frequency characteristics. The rendering module is used to render the surface to be rendered based on the multi-channel flame data and the multi-layer dot structure, and to determine the flame rendering result.

10. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the rendering method for the dotted flame as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the rendering method for the polka dot flame as described in any one of claims 1-8.