Flame special effect generation method, device and equipment and computer readable storage medium

By generating flame meshes and dynamically rendering them using effects shaders, the problem of insufficient detail and expressiveness of flame effects on complex character models was solved, achieving high-quality flame effect generation.

CN115999158BActive Publication Date: 2026-07-31NETEASE INTERACTIVE ENTERTAINMENT PTE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE INTERACTIVE ENTERTAINMENT PTE LTD
Filing Date
2022-12-26
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing methods for creating stylized fire effects on complex character models often result in poor detail and expressiveness.

Method used

By generating a flame mesh based on the character model's skeleton and then generating a functional texture based on the flame mesh, the flame vertices are dynamically rendered using preset effect shaders, including simulations of jitter, expansion, and tip splitting effects, resulting in realistic flame effects.

Benefits of technology

It enables the generation of detailed and expressive flame effects on complex character models, meeting the needs of next-generation art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115999158B_ABST
    Figure CN115999158B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and computer-readable storage medium for generating flame effects. The method generates a functional map based on a flame mesh and dynamically renders each flame vertex based on the functional map and an effects shader to obtain flame effects. The rendering of the flame is controlled by the functional map to achieve flame effects on a character model with volume. This method enables the generation of flame effects without considering the structure of the character model, greatly improving the detail and expressiveness of the special effects and meeting the next-generation art requirements of the project.
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 method, apparatus, device, and computer-readable storage medium for generating flame effects. Background Technology

[0002] As games continue to evolve, players' demands for game graphics are also increasing. When creating virtual game scenes, in order to make the virtual scenes more expressive, special effects need to be added to certain items and landscapes within the scene, such as fire. To better represent fire effects, in recent years, game development has mainly adopted the Mesh+Shader effect production method, which has been widely used, especially in the production of stylized shape visual effects. However, this method is mainly used to create stylized fire effects on character models with relatively simple shapes. While it can also be used on more complex character models, the resulting visual details and the expressiveness of the effects are relatively rough. Summary of the Invention

[0003] The main purpose of this invention is to solve the problem that existing flame effect production methods have poor image detail and expressiveness when creating stylized flame effects on complex character models.

[0004] The first aspect of this invention provides a method for generating flame effects, the method comprising:

[0005] A flame mesh is generated based on the character model's skeleton, and a functional texture is generated based on the flame mesh.

[0006] Dynamically render each flame vertex in the functional texture to obtain the corresponding flame effect.

[0007] A second aspect of the present invention provides a flame effect generation device, the flame effect generation device comprising:

[0008] The texture generation module is used to generate a flame mesh based on the skeleton of the character model, and generate a functional texture based on the flame mesh;

[0009] The special effects simulation module is used to dynamically render each flame vertex in the functional texture to obtain the corresponding flame effects.

[0010] A third aspect of the present invention provides a flame effect generation device, comprising: 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 circuit; the at least one processor invokes the instructions in the memory to cause the flame effect generation device to execute the above-described flame effect generation method.

[0011] 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 above-described flame effect generation method.

[0012] The aforementioned method, apparatus, device, and storage medium for generating flame effects generate functional maps based on flame meshes and dynamically render each flame vertex based on the functional maps and effect shaders to obtain flame effects. The rendering of the flames is controlled by the functional maps to achieve flame effects on character models with volume. This allows for the generation of flame effects without considering the structure of the character model, greatly improving the detail and expressiveness of the special effects and meeting the next-generation art requirements of the project.

[0013] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0014] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the first embodiment of the flame effect generation method in this invention;

[0016] Figure 2 This is a schematic diagram of a second embodiment of the flame effect generation method in this invention;

[0017] Figure 3 This refers to the flame mesh in an embodiment of the present invention;

[0018] Figure 4 This refers to the mask texture in the embodiments of the present invention;

[0019] Figure 5 This refers to a third-order grayscale texture in an embodiment of the present invention;

[0020] Figure 6 This is the flame effect after the terminal splitting in an embodiment of the present invention;

[0021] Figure 7 This is a schematic diagram of one embodiment of the flame effect generation device in this invention;

[0022] Figure 8 This is a schematic diagram of another embodiment of the flame effect generation device in this invention;

[0023] Figure 9 This is a schematic diagram of one embodiment of the flame effect generation device in this invention. Detailed Implementation

[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 specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “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] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 The method for generating this fire effect includes the following steps:

[0026] 101. Generate a flame mesh based on the character model's skeleton, and generate a functional texture based on the flame mesh;

[0027] In this embodiment, the character model refers to the virtual object of the fire effect to be rendered, such as a virtual character in a game. The fire effect can be equipment or body features attached to the character's surface, or it can be the fire effect corresponding to the fire skill generated by the character's release of a skill.

[0028] These fire effects are rendered by recreating the fire scene. Specifically, the bone positions of the fire effect are selected based on the target virtual object. Then, by solving the fire medium, the texture of the fire effect is obtained. The texture is further segmented, and the segmented texture is bound to the bones at the bone positions to obtain the corresponding fire mesh. Specifically, the fire mesh is obtained by meshing the fire effect into pixels, resulting in a fire effect formed by pixel stitching. The meshed fire effect is then attached and bound to the bones of the target virtual object to obtain a fire mesh adapted to the target virtual object.

[0029] Furthermore, corresponding parameters are added sequentially from the expansion and independent control dimensions for each flame mesh to obtain a functional texture.

[0030] In practical applications, this functional texture includes mask maps and / or level grayscale maps. Mask maps are used to create the expansion effect of the flames, while level grayscale maps are used to achieve the independent movement of each branch in the flame effect. That is, a flame model is first obtained based on the flame medium, and then a stylized mesh is created based on the flame model. This stylization can be understood as achieving a fluid effect for the flames, and the mesh can be understood as the UVs of each point in the flame model or a portion of the flame with the same fluid effect, such as... Figure 3 As shown, a flame shape is formed by multiple flame grids.

[0031] 102. Dynamically render each flame vertex in the function map to obtain the corresponding flame effects.

[0032] In this embodiment, dynamic rendering actually uses preset special effects shaders to simulate different characteristics of flames, such as jittering, expansion, random perturbation, and terminal splitting. Jittering and expansion are achieved through mask maps in the function map, and random perturbation and terminal splitting are achieved through grayscale maps. Of course, the process of achieving jittering based on mask maps also includes jittering calculations, but the jittering calculations here are achieved by adding misalignment parameters.

[0033] The simulation of different characteristics of flames is achieved by using two textures, thereby generating corresponding flame effects.

[0034] In summary, this method mainly controls the independent rendering of the dynamic features of each part of the flame by creating functional textures based on the flame mesh. It has rich special effects details, which makes it easier to improve the image quality and adapt to the generation of special effects for models with various complex shapes.

[0035] Reference Figure 2-6 This is the second embodiment of the flame effect generation method provided by the present invention. The method is described in detail below with the server as the execution subject. The flame effect generation method specifically includes the following steps:

[0036] 201. Generate a flame mesh based on the character model's skeleton, and generate a functional texture based on the flame mesh;

[0037] In this step, the functional texture includes a mask texture and / or a tiered grayscale texture. Specifically, generating the functional texture includes: solving the flame fluid to obtain a flame texture; binding the flame texture to the corresponding character model's skeleton to obtain a flame mesh; setting a corresponding transition threshold for the flame mesh to obtain a mask texture, wherein the transition threshold is used to control the expansion effect of the flame mesh; and setting a corresponding grayscale value for the flame mesh to obtain a tiered grayscale texture, wherein the grayscale value is used to identify different flame meshes.

[0038] Furthermore, the grayscale map is an N-level grayscale map, and the step of setting the corresponding grayscale value for the flame mesh to obtain the grayscale map includes:

[0039] Different grayscale values ​​are set for different flame grids to obtain single-level grayscale maps corresponding to each flame grid, forming an N-level grayscale map, where N is an integer greater than 2; specifically, the N-level grayscale map is obtained by merging the single-level grayscale maps.

[0040] In practical applications, a flame model is created by combining the skeleton of the character model. Based on this flame model, it is then segmented according to layers to obtain different flame meshes, such as... Figure 3 As shown, a flame model is constructed using multiple flame meshes. A transition threshold is then set for each flame mesh. Specifically, the model corresponding to each flame mesh is built by setting the transition threshold. By controlling the transition threshold to vary within a certain range, dynamic flames are obtained. Multiple flames combined together constitute the corresponding flame model. The transition threshold refers to the maximum and minimum thresholds for defining the misalignment parameter. Within this threshold range, the misalignment parameter is adjusted to simulate the expansion and jittering of the flame. This misalignment parameter includes the coordinates of the vertices changing within a certain range, or it can be the expansion coefficient of the vertex pixels. For example, setting the vertex coordinates to switch sequentially within a certain radius of the vertex's original coordinates to achieve flame jittering. The size of the flame outline is adjusted by setting the expansion coefficient to achieve flame jittering. Besides this parameter, changes in parameters such as phase can also be used.

[0041] Furthermore, a mask texture is generated using a flame model with a pre-set transition threshold, such as... Figure 4 As shown, in practical applications, the expansion of flames can be simulated by controlling the misalignment parameters of each flame mesh in the mask texture.

[0042] In this embodiment, after creating the mask texture, the process further includes creating a layered grayscale texture based on the flame model composed of flame meshes. This layered grayscale texture is actually obtained by grayscale processing of different flame meshes. When performing grayscale processing on each flame mesh, different grayscale values ​​need to be set for different flame meshes in the flame model. The flame model is then layered using different grayscale values ​​to obtain the layered grayscale texture.

[0043] In practical applications, it is preferable to choose an N-level grayscale map as a 3-level grayscale map, specifically with grayscale values ​​set to "0", "0.5", and "1", such as... Figure 6 As shown, this third-order grayscale map is used to perform information association calculations in the subsequent shader creation process to achieve independent and random motion of different branches, thus achieving a more random and realistic effect.

[0044] 202. Determine the vertices of the flame based on the mask map in the function map, and use the preset effect shader to add overlay misalignment parameters to the vertices to perform dithering and expansion calculations to obtain the prototype of the flame effect.

[0045] In this step, the vertices of the flame are determined based on the mask map; using a preset effect shader, the flame is expanded based on the vertices to obtain the flame effect.

[0046] Using a preset effects shader, the flame jitter parameters are determined by adding superimposed misalignment parameters to the vertices; the flame is then rendered based on the jitter parameters to obtain flame effects.

[0047] In practical applications, jitter and dilation are calculated using mask mapping. Jitter is essentially a series of vibrational movements. Here, jitter is calculated using a sine wave, with the formula: h(x) = f sin(xa), where h(x) is the ordinate value of the sine function substituted with x; x is the abscissa value of the flame vertex in the mask mapping, specifically a real number; f is the coefficient of the sin function, used to determine the maximum and minimum values ​​of the y-axis coordinate, i.e., the amplitude; and a is the coefficient of x, used to determine the period of the sin function, i.e., the frequency.

[0048] Furthermore, the flames in the prototype flame effect calculated using the above method exhibit relatively regular variations. To achieve random variations, a misalignment parameter is added during the calculation. The superimposed misalignment parameter further enhances the randomness of the vibrations in each flame mesh. The specific calculation formula is: h(x) = f sin(xa) + sin(wxa), where h(x) is the ordinate value of the sine function input to x; x is the abscissa value of the flame vertex in the mask texture, specifically a real number; f is the coefficient of the sin function, used to determine the maximum and minimum values ​​of the y-axis coordinate, i.e., the amplitude; a is the coefficient of x, used to determine the period of the sin function, i.e., the frequency; and w is the abscissa coefficient of the sin function, used to create sine curves with different periods.

[0049] Furthermore, after the jittering calculation is completed, the flame mesh is expanded. In practical applications, the flame expands due to heat transfer and airflow above. Based on this, the flame expansion, after completing the jittering calculation, is multiplied from 0 to positive infinity at each vertex to obtain a gradually expanding vibration. The specific calculation function is: h(x) = xd(f sin(xa) + sin(wxa)), where h(x) is the ordinate value of the sine function substituted with x; x is the abscissa value of the flame vertex in the mask texture, specifically a real number; f is the coefficient of the sin function, used to determine the maximum and minimum values ​​of the y-axis coordinate, i.e., the amplitude; a is the coefficient of x, used to determine the period of the sin function, i.e., the frequency; w is the abscissa coefficient of the sin function, used to create sine curves with different periods; d is the y-axis coefficient of the function "x(f ​​sin(xa) + sin(wxa))", used to adjust the maximum and minimum values ​​of the y-axis, i.e., the amplitude.

[0050] Furthermore, to achieve the aforementioned jitter and expansion, it is possible to calculate each UV coordinate in the flame model, and then superimpose the function map and UV coordinates to obtain a prototype of the flame effect.

[0051] In this embodiment, the process of shaking and expanding the flame grid also includes determining the grid normal of each flame grid and its corresponding coordinates, as well as associating an outward expansion force with the grid normal, and performing a second expansion process based on the expansion force.

[0052] 203. Based on the grayscale steps of the N-level grayscale map in the function map, the flame meshes in the flame effect prototype are misaligned using the preset effect shader to obtain each flame branch.

[0053] In this step, to improve the visual effect of the flame effects, after generating the initial flame effect prototype, an additional step was added to segment the flame mesh based on an N-level grayscale map, forming multiple independent moving bodies. Furthermore, the motion of the flame mesh was controlled based on misalignment processing. Specifically:

[0054] By identifying the flame mesh corresponding to the three grayscale values ​​in the three-level grayscale map, and using a preset special effects shader, the three flame meshes are added to the corresponding time axis, and different time axis values ​​are set to misalign the three flame meshes to obtain three independent flame branches.

[0055] In practical applications, to make each independent flame move independently, each flame grid must be positioned on a different time axis. The principle is to misalign the coordinates of each flame grid: h(x) = xd(fsin(xa) + sin((w + y)xa)), where h(x) is the ordinate value of the sine function input to x; x is the abscissa value of the flame vertex in the mask texture, specifically a real number; f is the coefficient of the sine function, used to determine the maximum and minimum values ​​of the y-axis coordinate, i.e., the amplitude; a is the coefficient of x, used to determine the period of the sine function, i.e., the frequency; w is the abscissa coefficient of the sine function, used to create sine curves with different periods; y is the sum of the abscissa values ​​in the sine function, used to create the image after the abscissa displacement; the result of inputting different values ​​into y and superimposing them is: y = 0 + y = 0.25 + y = 0.5.

[0056] Based on this, in this embodiment, each flame grid is divided into three major branches and three grayscale textures of "0", "0.5" and "1" are created. In practical applications, the number of levels can be increased or decreased according to the needs of the branches. The motion calculation of each branch is performed in a staggered manner to obtain three independent moving branches, making the flames more random.

[0057] In practical applications, when setting grayscale values ​​to "0", "0.5", and "1", the motion tracking calculation uses the sine function, and the results of "0" and "1" in the sine function are exactly the same, so they will not achieve different motion trajectories. Here, in order to ensure the independence of the three grayscale values, an additional calculation coefficient is added. Based on the aforementioned three coefficients, the three grayscale values ​​are adjusted by reducing their intensity. That is, a floating-point multiplication is performed after the grayscale value (e.g., grayscale * 0.5), thereby adjusting the three grayscale values ​​to "0", "0.25", and "0.5", thus achieving differentiated motion trajectories.

[0058] 204. Perform vertex-based rendering on each flame branch to obtain the corresponding flame effects.

[0059] In this embodiment, different noise waves are used to simulate the animation of the three flame branches, resulting in corresponding flame effects. Specifically, a scrolling 3D noise vertex animation is created to further enhance the randomness of the flames.

[0060] Furthermore, after performing vertex-following rendering on each of the flame branches to obtain the corresponding flame effects, the process also includes:

[0061] A transparent mask is added to each pixel of the flame effect, and the flame effect is then split at its tip based on the transparent mask. This involves using shaders to enhance the pixel art, adding an effect of the flame splitting at its tip due to energy reduction and breakage, and creating a pixel transparent mask animation shader to achieve more detailed flame effects.

[0062] In summary, by creating a layered grayscale texture based on a flame mesh to individually control each branch of the flame, and by using noise to control the random changes of each flame branch, a flame effect on a character model with volume can be achieved. This allows for the generation of flame effects without considering the structure of the character model, greatly improving the detail and expressiveness of the special effects and meeting the next-generation art requirements of the project.

[0063] The method for generating flame effects in the embodiments of the present invention has been described above. The apparatus for generating flame effects in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 6 One embodiment of the flame effect generation device in this invention includes:

[0064] The texture generation module 610 is used to generate a flame mesh based on the skeleton of the character model, and generate a functional texture based on the flame mesh.

[0065] The special effects simulation module 620 is used to dynamically render each flame vertex in the functional texture to obtain the corresponding flame effects.

[0066] In summary, this device generates a flame mesh based on the character model's skeleton and then generates a functional texture map based on the flame mesh. It then uses a preset effects shader to dynamically render each flame vertex in the functional texture map, resulting in corresponding flame effects. By controlling the rendering of flames based on the functional texture map, flame effects can be achieved on a character model with volume. This allows for the generation of flame effects without considering the character model's structure, significantly improving the detail and expressiveness of the effects and meeting the project's next-generation art requirements.

[0067] See Figure 7 This is a second embodiment of the flame effect generation device provided in this application, the flame effect generation device comprising:

[0068] The texture generation module 610 is used to generate a flame mesh based on the skeleton of the character model, and generate a functional texture based on the flame mesh.

[0069] The special effects simulation module 620 is used to dynamically render each flame vertex in the functional texture to obtain the corresponding flame effects.

[0070] The texture generation module 610 mentioned above includes:

[0071] The calculation unit 611 is used to calculate the flame fluid and obtain the flame texture;

[0072] Binding unit 612 is used to bind the flame texture to the skeleton of the corresponding character model to obtain a flame mesh.

[0073] The texture generation module 610 mentioned above also includes a generation unit 613, specifically used for:

[0074] A corresponding transition threshold is set for the flame mesh to obtain a mask texture, wherein the transition threshold is used to control the expansion effect of the flame mesh.

[0075] The aforementioned special effects simulation module 620 includes a computing unit 621, specifically used for:

[0076] The vertices of the flame are determined based on the mask map;

[0077] Using a preset special effects shader, the flame is expanded based on the vertices to obtain the flame effect.

[0078] The aforementioned arithmetic unit 621 is also specifically used for:

[0079] Using a preset special effects shader, the flame jitter parameters are determined by adding superimposed misalignment parameters to the vertex;

[0080] The flames are rendered based on the jitter parameters to obtain flame effects.

[0081] The aforementioned generating unit 613 is further used for:

[0082] A corresponding grayscale value is set for the flame mesh to obtain a graded grayscale map, wherein the grayscale value is used to identify different flame meshes.

[0083] The aforementioned grayscale texture is an N-level grayscale texture, and the generation unit 613 is specifically used for:

[0084] Different grayscale values ​​are set for different flame grids to obtain single-level grayscale maps corresponding to each flame grid, so as to form an N-level grayscale map, where N is an integer greater than 2.

[0085] The aforementioned special effects simulation module 620 includes a misalignment unit 622, specifically used for:

[0086] Based on the grayscale steps of the N-level grayscale map in the functional map, the flame meshes in the flame effect prototype are misaligned using a preset special effects shader to obtain each flame branch.

[0087] The simulation unit 623 is used to perform vertex-following rendering on each of the flame branches to obtain the corresponding flame effects.

[0088] The above-mentioned N-level grayscale map is a third-level grayscale map, and the misalignment unit 622 is specifically used for:

[0089] Identify the flame mesh corresponding to the three grayscale values ​​in the three-level grayscale map;

[0090] Using preset effect shaders, three flame meshes are added to the corresponding timelines, and different timeline values ​​are set to misalign the three flame meshes, resulting in three independent flame branches.

[0091] The aforementioned simulation unit 623 is specifically used for:

[0092] By using different noise waves, the three flame branches are animated and rendered accordingly to obtain the corresponding flame effects.

[0093] The aforementioned special effects simulation module 620 also includes:

[0094] Splitting unit 624 is used to add a transparent mask to each pixel in the flame effect and split the flame effect at the tip based on the transparent mask.

[0095] In summary, by generating functional maps based on flame meshes and dynamically simulating each flame vertex based on functional maps and effect shaders, flame effects are obtained. The rendering of flames is controlled by functional maps to achieve flame effects on character models with volume. This allows for the generation of flame effects without considering the structure of the character model, greatly improving the detail and expressiveness of the special effects and meeting the next-generation art requirements of the project.

[0096] This embodiment also provides a flame effects generation device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described flame effects generation method. This flame effects generation device can be a server or a terminal device, etc.

[0097] See Figure 8 As shown, the flame effect generation device includes a processor 800 and a memory 8101. The memory 801 stores machine-executable instructions that can be executed by the processor 800. The processor 800 executes the machine-executable instructions to implement the above-mentioned flame effect generation method.

[0098] Furthermore, Figure 8 The flame effects generation device shown also includes a bus 802 and a communication interface 803. The processor 800, the communication interface 803 and the memory 801 are connected through the bus 802.

[0099] The memory 801 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 803 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 802 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0100] The processor 800 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 800 or by instructions in software form. The processor 800 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 801. The processor 800 reads the information in memory 801 and, in conjunction with its hardware, completes the following flame effect generation method:

[0101] A flame mesh is generated based on the character model's skeleton, and a functional texture is generated based on the flame mesh.

[0102] Dynamically render each flame vertex in the functional texture to obtain the corresponding flame effect.

[0103] The above-mentioned process of generating a flame mesh based on the character model's skeleton and generating a functional texture based on the flame mesh includes:

[0104] The flame fluid is solved to obtain the flame texture;

[0105] The flame texture is then bound to the corresponding character model's skeleton to obtain a flame mesh.

[0106] The aforementioned functional texture includes a mask texture, and the step of generating a functional texture based on the flame mesh includes:

[0107] A corresponding transition threshold is set for the flame mesh to obtain a mask texture, wherein the transition threshold is used to control the expansion effect of the flame mesh.

[0108] The above-mentioned dynamic rendering of each flame vertex in the functional texture to obtain the corresponding flame effects includes:

[0109] The vertices of the flame are determined based on the mask map;

[0110] Using a preset special effects shader, the flame is expanded based on the vertices to obtain the flame effect.

[0111] The above-mentioned dynamic rendering of each flame vertex in the functional texture to obtain the corresponding flame effect also includes:

[0112] Using a preset special effects shader, the flame jitter parameters are determined by adding superimposed misalignment parameters to the vertex;

[0113] The flames are rendered based on the jitter parameters to obtain flame effects.

[0114] The aforementioned functional texture includes a grayscale texture; the generation of the functional texture based on the flame mesh includes:

[0115] A corresponding grayscale value is set for the flame mesh to obtain a graded grayscale map, wherein the grayscale value is used to identify different flame meshes.

[0116] The aforementioned grayscale texture is an N-level grayscale texture. The step of setting the corresponding grayscale value for the flame mesh to obtain the grayscale texture includes:

[0117] Different grayscale values ​​are set for different flame grids to obtain single-level grayscale maps corresponding to each flame grid, so as to form an N-level grayscale map, where N is an integer greater than 2.

[0118] The above-mentioned method uses a preset effects shader to dynamically render each flame vertex in the functional texture to obtain the corresponding flame effects, including:

[0119] Based on the grayscale steps of the N-level grayscale map, each flame mesh is misaligned using a preset special effects shader to obtain each flame branch.

[0120] Vertex-based rendering is performed on each of the flame branches to obtain the corresponding flame effects.

[0121] The aforementioned N-level grayscale map is a third-level grayscale map. Based on the grayscale steps of the N-level grayscale map, a preset effect shader is used to misalign each flame mesh to obtain each flame branch, including:

[0122] Identify the flame mesh corresponding to the three grayscale values ​​in the three-level grayscale map;

[0123] Using preset effect shaders, three flame meshes are added to the corresponding timelines, and different timeline values ​​are set to misalign the three flame meshes, resulting in three independent flame branches.

[0124] The above-mentioned vertex-following rendering of each flame branch yields the corresponding flame effects, including:

[0125] By using different noise waves, the three flame branches are animated and rendered accordingly to obtain the corresponding flame effects.

[0126] After performing vertex-following simulation on each of the aforementioned flame branches to obtain the corresponding flame effects, the method further includes:

[0127] A transparent mask is added to each pixel of the flame effect, and the flame effect is split at the tip based on the transparent mask.

[0128] In summary, by generating functional maps based on flame meshes and dynamically rendering each flame vertex based on the functional maps and effect shaders, flame effects are obtained. The rendering of flames is controlled by functional maps to achieve flame effects on character models with volume. This allows for the generation of flame effects without considering the structure of the character model, greatly improving the detail and expressiveness of the special effects and meeting the next-generation art requirements of the project.

[0129] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to perform the following steps:

[0130] A flame mesh is generated based on the character model's skeleton, and a functional texture is generated based on the flame mesh.

[0131] Dynamically render each flame vertex in the functional texture to obtain the corresponding flame effect.

[0132] The above-mentioned process of generating a flame mesh based on the character model's skeleton and generating a functional texture based on the flame mesh includes:

[0133] The flame fluid is solved to obtain the flame texture;

[0134] The flame texture is then bound to the corresponding character model's skeleton to obtain a flame mesh.

[0135] The aforementioned functional texture includes a mask texture, and the step of generating a functional texture based on the flame mesh includes:

[0136] A corresponding transition threshold is set for the flame mesh to obtain a mask texture, wherein the transition threshold is used to control the expansion effect of the flame mesh.

[0137] The above-mentioned dynamic rendering of each flame vertex in the functional texture to obtain the corresponding flame effects includes:

[0138] The vertices of the flame are determined based on the mask map;

[0139] Using a preset special effects shader, the flame is expanded based on the vertices to obtain the flame effect.

[0140] The above-mentioned dynamic rendering of each flame vertex in the functional texture to obtain the corresponding flame effect also includes:

[0141] Using a preset special effects shader, the flame jitter parameters are determined by adding superimposed misalignment parameters to the vertex;

[0142] The flames are rendered based on the jitter parameters to obtain flame effects.

[0143] The aforementioned functional texture includes a grayscale texture; the generation of the functional texture based on the flame mesh includes:

[0144] A corresponding grayscale value is set for the flame mesh to obtain a graded grayscale map, wherein the grayscale value is used to identify different flame meshes.

[0145] The aforementioned grayscale texture is an N-level grayscale texture. The step of setting the corresponding grayscale value for the flame mesh to obtain the grayscale texture includes:

[0146] Different grayscale values ​​are set for different flame grids to obtain single-level grayscale maps corresponding to each flame grid, so as to form an N-level grayscale map, where N is an integer greater than 2.

[0147] The above-mentioned method uses a preset effects shader to dynamically render each flame vertex in the functional texture to obtain the corresponding flame effects, including:

[0148] Based on the grayscale steps of the N-level grayscale map, each flame mesh is misaligned using a preset special effects shader to obtain each flame branch.

[0149] Vertex-based rendering is performed on each of the flame branches to obtain the corresponding flame effects.

[0150] The aforementioned N-level grayscale map is a third-level grayscale map. Based on the grayscale steps of the N-level grayscale map, a preset effect shader is used to misalign each flame mesh to obtain each flame branch, including:

[0151] Identify the flame mesh corresponding to the three grayscale values ​​in the three-level grayscale map;

[0152] Using preset effect shaders, three flame meshes are added to the corresponding timelines, and different timeline values ​​are set to misalign the three flame meshes, resulting in three independent flame branches.

[0153] The above-mentioned vertex-following rendering of each flame branch yields the corresponding flame effects, including:

[0154] By using different noise waves, the three flame branches are animated and rendered accordingly to obtain the corresponding flame effects.

[0155] After performing vertex-following simulation on each of the aforementioned flame branches to obtain the corresponding flame effects, the method further includes:

[0156] A transparent mask is added to each pixel of the flame effect, and the flame effect is split at the tip based on the transparent mask.

[0157] In summary, by generating functional maps based on flame meshes and dynamically rendering each flame vertex based on the functional maps and effect shaders, flame effects are obtained. The rendering of flames is controlled by functional maps to achieve flame effects on character models with volume. This allows for the generation of flame effects without considering the structure of the character model, greatly improving the detail and expressiveness of the special effects and meeting the next-generation art requirements of the project.

[0158] The computer program product of the flame effect generation method and related equipment provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0159] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0160] 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.

[0161] 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.

[0162] 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.

[0163] 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 method of flame special effect generation, characterized by, The method for generating flame effects includes: Generate a flame mesh based on the character model's skeleton; A corresponding transition threshold is set for the flame mesh to obtain a mask texture, wherein the transition threshold is used to control the expansion effect of the flame mesh; A grayscale value is set for the flame mesh to obtain a graded grayscale map, wherein the grayscale value is used to identify different flame meshes; The vertices of the flame are determined based on the mask map; Based on the grayscale steps in the grayscale map, the flame meshes in the flame effect are misaligned using a preset special effects shader to obtain each flame branch. By using a preset effect shader to add overlapping misalignment parameters to the vertices for dithering and expansion calculations, and by performing vertex follow-up rendering on each of the flame branches, the corresponding flame effects are obtained.

2. The flame special effect generating method according to claim 1, characterized by, The process of generating a flame mesh based on the character model's skeleton includes: The flame fluid is solved to obtain the flame texture; The flame texture is then bound to the corresponding character model's skeleton to obtain a flame mesh.

3. The flame special effect generating method according to claim 1, characterized by, The method of adding superimposed misalignment parameters to vertices using a preset special effects shader to perform dithering and dilation calculations includes: Using a preset special effects shader, the flame jitter parameters are determined by adding superimposed misalignment parameters to the vertex; The flame is rendered based on the jitter parameters.

4. The flame special effect generating method according to claim 1, characterized by, The grayscale map is an N-level grayscale map. The process of setting corresponding grayscale values ​​for the flame mesh to obtain the grayscale map includes: Different grayscale values ​​are set for different flame grids to obtain single-level grayscale maps corresponding to each flame grid, so as to form an N-level grayscale map, where N is an integer greater than 2.

5. The flame special effect generating method according to claim 4, characterized by, The N-level grayscale map is a third-level grayscale map. Based on the grayscale steps of the N-level grayscale map, a preset effect shader is used to misalign the flame meshes in the flame effect to obtain the flame branches, including: Identify the flame mesh corresponding to the three grayscale values ​​in the three-level grayscale map; Using preset effect shaders, three flame meshes are added to the corresponding timelines, and different timeline values ​​are set to misalign the three flame meshes, resulting in three independent flame branches.

6. The flame special effect generating method according to claim 5, characterized by, The step of performing vertex-following rendering on each of the flame branches to obtain the corresponding flame effects includes: By using different noise waves, the three flame branches are animated and rendered accordingly to obtain the corresponding flame effects.

7. The flame special effect generating method according to claim 6, characterized by, After performing vertex-following simulation on each of the flame branches to obtain the corresponding flame effects, the method further includes: A transparent mask is added to each pixel of the flame effect, and the flame effect is split at the tip based on the transparent mask.

8. A flame special effect generating device, characterized by The flame effects generation device includes: The texture generation module is used to generate a flame mesh based on the skeleton of the character model; set a corresponding transition threshold for the flame mesh to obtain a mask texture, wherein the transition threshold is used to control the expansion effect of the flame mesh; set a corresponding grayscale value for the flame mesh to obtain a hierarchical grayscale texture, wherein the grayscale value is used to identify different flame meshes; The special effects simulation module is used to determine the vertices of the flames based on the mask texture; based on the grayscale steps in the grayscale texture, it uses a preset special effects shader to misalign each flame mesh in the flame effect to obtain each flame branch; it uses a preset special effects shader to add superimposed misalignment parameters to the vertices for dithering and expansion calculations, and performs vertex follow-up rendering on each flame branch to obtain the corresponding flame effect.

9. A flame special effect generating apparatus characterized by comprising: The flame effects generation device includes: 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 flame effects generation device to execute the flame effects generation method as described in any one of claims 1-7.

10. A computer-readable storage medium having stored thereon instructions, the instructions comprising, When the instruction is executed by the processor, it implements the flame effect generation method as described in any one of claims 1-7.