Virtual special effects generation method, device and electronic equipment

By solving the virtual special effect fluid and processing the dynamic fluid information, a sequence map of the virtual special effect is generated, and the fluid interpolation is calculated to control playback, the problem of uncontrollable form and playback lag during virtual special effect generation is solved, and efficient and smooth special effect generation is achieved.

CN115317902BActive Publication Date: 2025-04-01NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210774641.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2025-04-01
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

When virtual effects are generated in existing game scenes, the form is uncontrollable and there is a problem of lag during playback.

Method used

By solving the virtual special effect fluid, a sequence map with fluid dynamic information is generated, and the fluid interpolation between the two frames of special effects is calculated based on the fluid dynamic information, the map playback is controlled based on the interpolation, and the virtual special effects are generated.

Benefits of technology

It solves the problem of uncontrollable form and stuttering playback when generating virtual special effects, and achieves smooth special effects playback and higher special effects control accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115317902B_ABST
    Figure CN115317902B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for generating virtual special effects; the method comprises: solving a virtual special effect fluid to generate a sequence map with fluid dynamic information, wherein the sequence map comprises a plurality of texture maps containing different information; calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map; and controlling the playback of each texture map in the sequence map based on the fluid interpolation to generate virtual special effects. This method can complete the design of maps and the generation of sequences without the need for third-party plug-ins, simplifies the steps of special effect generation, and controls the smooth transition of maps between frames by setting fluid interpolation, reduces resource usage during rendering and playback, makes processing smoother, reduces latency, and avoids the sense of frustration caused by stuttering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a virtual special effect generation method, device and electronic equipment. Background Art

[0002] As games continue to develop, players have higher and higher requirements for game graphics. When making virtual scenes for games, in order to make the virtual scenes more expressive, special effects need to be added to some special objects and landscapes in the scenes, such as dynamic effects of virtual special effects such as smoke and fire, to show the layered dynamic effects of smoke and flames.

[0003] In the prior art, resources are generally searched online, or texture materials are obtained from free UE and Unity projects, and then made into sequence textures. Specifically, the sprite particles of the sequence texture can be used, and each subuv image on the sequence texture is played as the life value of the particles increases. Such a production process often takes a long time, and the dynamics are not controllable. The found materials are also likely to not be suitable for their own projects, or the accuracy of the texture materials is not enough, resulting in unsatisfactory final effects, such as uncontrollable shapes. And when playing each subuv image of the sequence texture, there will be a sense of frustration, especially when the sequence needs to be slowed down, the frustration is more obvious, which brings a bad gaming experience. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a virtual special effect generation method, device and electronic device to solve the problem that when generating virtual special effects in existing game scenes, the shape is uncontrollable and there is lag during playback.

[0005] In a first aspect, an embodiment of the present invention provides a method for generating a virtual special effect, the method comprising:

[0006] Solving the virtual special effect fluid to generate a sequence map with fluid dynamic information, wherein the sequence map includes a plurality of texture maps containing different information;

[0007] Calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map;

[0008] Based on the fluid interpolation, the playback of each texture map in the sequence map is controlled to generate a virtual special effect

[0009] Optionally, the above step of solving the virtual special effect fluid to generate a sequence map with fluid dynamic information includes:

[0010] Acquiring preset initial solution parameters, and performing special effect simulation based on the initial solution parameters to generate an initial form of the virtual special effect;

[0011] Acquiring preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain a material sequence of the virtual special effect;

[0012] The material sequence is baked, a fluid density information map and a fluid velocity information map therein are extracted, and a sequence map is generated based on the fluid density information map and the fluid velocity information map.

[0013] Optionally, the step of obtaining preset initial solution parameters, and performing special effect simulation based on the initial solution parameters to generate the initial form of the virtual special effect includes:

[0014] Obtaining the initial size parameters, initial velocity parameters and initial shape parameters of the preset fluid emission source;

[0015] Special effects simulation is performed based on the initial size parameter, the initial speed parameter and the initial shape parameter to generate the initial form of the virtual special effects.

[0016] Optionally, the step of obtaining preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain the material sequence of the virtual special effect includes:

[0017] Obtaining a preset first noise disturbance parameter and a preset second noise disturbance parameter;

[0018] Based on the first noise disturbance parameter, adjusting the intensity and density of the texture noise of the edge of the virtual special effect fluid in the area with low fluid density in the initial form to obtain a first special effect form sequence;

[0019] Based on the second noise disturbance parameter, adjusting the noise intensity and size of the non-virtual special effect fluid in the first special effect form sequence to obtain a second special effect form sequence;

[0020] The second special effect form sequence is photographed according to the shooting angle of the virtual camera to obtain the material sequence of the virtual special effect.

[0021] Optionally, the step of shooting the second special effect form sequence according to the shooting angle of the virtual camera to obtain a virtual special effect material sequence includes:

[0022] Shooting the second special effect form sequence according to the shooting angle of the virtual camera to generate a virtual special effect form sequence;

[0023] Detecting whether the fluid in the virtual special effect form sequence exceeds the shooting boundary of the virtual camera;

[0024] If it exceeds, one UV on the four sides of each frame in the second special effect form sequence is extracted for softening processing to obtain the material sequence of the virtual special effect.

[0025] Optionally, after the step of extracting a UV on four sides of each frame in the second special effect form sequence and performing softening processing to obtain the material sequence of the virtual special effect, the step further includes:

[0026] Acquire texture twist parameters, and adjust detail features of the fluid in each texture map based on the texture twist parameters to obtain a noise map;

[0027] The noise map is superimposed on each UV in the material sequence to obtain a new material sequence.

[0028] Before the step of calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map, the method further includes:

[0029] Using an exponential function to perform shrinkage calculation on the edge of the virtual special effect fluid in the fluid density information map to obtain a shrinkage parameter;

[0030] The fluid density information map is adjusted based on the contraction parameters to obtain a new fluid density information map.

[0031] Optionally, before the step of calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map, the method further includes:

[0032] A color gradient map is obtained, and the gradient map is mapped to the grayscale channel of the fluid density information map to obtain a new fluid density information map.

[0033] Optionally, the step of calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map includes:

[0034] Extracting fluid velocity information and / or normal information from the fluid velocity information maps of two frames in the sequence map;

[0035] Based on the fluid velocity information and / or the normal information, a fluid interpolation between two frames of special effects is calculated.

[0036] Optionally, the step of calculating the fluid interpolation between two frames of special effects based on the fluid velocity information and / or the normal information includes:

[0037] Based on the fluid velocity information and / or the normal information of the current frame, perform a UV positive offset perturbation on the fluid density information map of the current frame to obtain a first image;

[0038] Based on the fluid velocity information and / or the normal information of the next previous frame, perform reverse UV offset perturbation on the fluid density information map of the current frame to obtain a second image;

[0039] The first image and the second image are linearly fused, a degree value of fusion of the two images is calculated, and a fluid interpolation between two frames of special effects is determined based on all degree values ​​in the sequence map.

[0040] In a second aspect, an embodiment of the present invention provides a virtual special effect generation device, the virtual special effect generation device comprising:

[0041] A solving module, used for solving the virtual special effect fluid to generate a sequence map with fluid dynamic information, wherein the sequence map includes a plurality of texture maps containing different information;

[0042] A calculation module, used for calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map;

[0043] A generation module is used to control the playback of each texture map in the sequence map based on the fluid interpolation to generate a virtual special effect.

[0044] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein 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-mentioned virtual special effect generation method.

[0045] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned virtual special effects generation method.

[0046] The embodiments of the present invention bring the following beneficial effects:

[0047] The above-mentioned virtual special effects generation method, device and electronic device solve the virtual special effects fluid to generate a sequence map with fluid dynamic information, wherein the sequence map includes multiple texture maps containing different information; the fluid interpolation between two frames of special effects is calculated based on the fluid dynamic information in each texture map in the sequence map; the playback of each texture map in the sequence map is controlled based on the fluid interpolation to generate virtual special effects. This method solves the problem of uncontrollable shape and jamming during playback when generating virtual special effects in existing game scenes. At the same time, Houdini software is used to directly complete the design of the map and the generation of the sequence, simplifying the steps of special effects generation.

[0048] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0051] Figure 1 A flow chart of a method for generating virtual special effects provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of a game cover provided by an embodiment of the present invention;

[0053] Figure 3 Another flow chart of a method for generating virtual special effects provided by an embodiment of the present invention;

[0054] Figure 4 This is a schematic diagram of the morphology of relatively discrete and fragmented density;

[0055] Figure 5 This is a schematic diagram of the morphology of a relatively large and concentrated density;

[0056] Figure 6 The fluid schematic diagram of smoke and fire with low fluid density;

[0057] Figure 7 for Figure 6 Fluid diagram of smoke and fire after Disturbance adjustment;

[0058] Figure 8 Schematic diagram of the smoke and fire when Disturbance is assigned a value of 0;

[0059] Fig. 9 Schematic diagram of the smoke and fire when Disturbance is assigned a value of 1;

[0060] Fig.10 Schematic diagram of the smoke and fire when Turbulence is assigned a value of 0;

[0061] Fig.11 Schematic diagram of the smoke and fire when Turbulence is assigned a value of 0.3;

[0062] Fig.12 A structural schematic diagram of a virtual special effect generating device provided by an embodiment of the present invention;

[0063] Fig.13 Another structural schematic diagram of a virtual special effect generating device provided by an embodiment of the present invention;

[0064] Fig.14 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0066] First, the application scenarios to which the present application is applicable are introduced. The present application can be applied in the field of image processing technology.

[0067] In a three-dimensional game scene, in order to more realistically present the changes in the game scene, or the special game operations performed by the target virtual character, a variety of special effects need to be presented in the game scene, and smoke and fire effects are one of them. In the process of special scene simulation, the rendering of smoke and fire effects is indispensable.

[0068] Based on the above, an embodiment of the present invention provides a virtual special effects generation method, device and electronic device. The technology can be used in software or equipment with any virtual special effects; the technology can also be used in specific scene applications, such as game programs, instant messaging programs, or other applications that need to render fireworks special effects.

[0069] In one of the virtual special effects generation methods of the present invention, the method can be run on a terminal device or a server. The terminal device can be a local terminal device. When the virtual special effects generation method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device, and a corresponding application program, such as a game program, an APP, etc., is run on the client device.

[0070] In a possible implementation, an embodiment of the present invention provides a virtual special effect generation method, which provides a game scene through a terminal device, wherein the terminal device can be a local terminal device or a client device in a cloud interactive system. A game scene is provided through the terminal device, and the game scene can add scene special effects according to specific needs or special object requirements of the scene, such as virtual special effects of fireworks, smoke, smoke, fire, lightning, etc.

[0071] To facilitate understanding of this embodiment, a virtual special effect generation method disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, a game scene is provided by a terminal device, and the virtual special effect generation method includes the following steps:

[0072] Step S101, solving the virtual special effect fluid to generate a sequence map with fluid dynamic information, wherein the sequence map includes a plurality of texture maps containing different information;

[0073] In this step, when settling the virtual special effect fluid, Houdini software is used to implement the solution, and the virtual special effect fluid is solved and baked based on the preset solution parameters to obtain multiple maps, and finally the multiple maps are combined into a sequence map. The solution parameters are adjusted and configured by the user based on the parameter setting interface provided by Houdini software. The virtual special effect can be smoke, fire, fireworks, smoke and other special effects.

[0074] In this embodiment, a preset initial solution parameter is obtained, and a special effect simulation is performed based on the initial solution parameter to generate an initial form of the virtual special effect;

[0075] Acquiring preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain a material sequence of the virtual special effect;

[0076] The material sequence is baked, a fluid density information map and a fluid velocity information map therein are extracted, and a sequence map is generated based on the fluid density information map and the fluid velocity information map.

[0077] In practical applications, when the virtual special effect is fireworks, the initial form of smoke and fire is generated by obtaining initial solution parameters of the initial form of smoke and fire configured in advance in the interface of Houdini software, and performing fireworks simulation based on the initial solution parameters;

[0078] Acquire the texture noise disturbance parameters configured in the interface of Houdini software, and adjust the initial form based on the texture noise disturbance parameters to obtain a material sequence of smoke and fire;

[0079] The material sequence is baked, a fluid density information map and a fluid velocity information map therein are extracted, and a sequence map is generated based on the fluid density information map and the fluid velocity information map.

[0080] In practical applications, the solution process is actually to construct the basic form of smoke and fire. The process can be a process from scratch or a process based on real smoke and fire maps after simulation and adjustment. Preferably, the process from scratch is selected here, and the process includes three parts: solution settings, camera settings, and map baking. That is, the user sets the parameters such as fluid emission source and shape in the parameter configuration interface of Houdini software to construct the initial form of smoke and fire, adjusts the fluid dynamic parameters based on the initial form, obtains dynamic materials, further adjusts the camera settings to adjust the parameters of the rendering area, and renders the adjusted rendering area based on the dynamic material scheduling to obtain a rendering map, and performs baking operations based on the rendering map to generate fluid dynamic information for each frame or each map, and constructs a sequence map for all rendering maps based on the fluid dynamic information.

[0081] Step S102, calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map;

[0082] In this embodiment, each texture map in the sequence map is divided according to the data frame to obtain a texture map set for each frame, and the maps in the texture map set in each frame are classified into two categories: fluid density information map and fluid velocity information map. The fluid dynamic information in the fluid density information map and the fluid velocity information map is extracted respectively, and the fluid interpolation between each pair of data frames is calculated based on the information.

[0083] In one embodiment, the fluid dynamic information includes fluid velocity information and normal information. The calculation of fluid interpolation between two frames of special effects includes: when the fluid is judged to be a smoke fluid, the fluid interpolation is calculated based on the fluid velocity information and the normal information; if the fluid is judged to be a fire fluid, the fluid interpolation is calculated based on the fluid velocity information.

[0084] In practical applications, for fireworks special effects, if the fluid is judged to be a fire fluid, in the process of calculating the fluid interpolation, the interpolation of the smoke can be calculated first, and then the interpolation of the fire can be calculated. The middle value is taken based on the two interpolations to obtain the final interpolation of the smoke and fire fluids.

[0085] In this embodiment, in the process of calculating the fluid interpolation of the current frame and the next frame, the fluid velocity information and normal information of the rendering map in the current frame and the next frame are first extracted respectively, and then the fluid velocity information and normal information of the current frame are used to adjust the fluid velocity information map in the current frame to obtain image A, and the fluid velocity information and normal information of the next frame are used to adjust the fluid velocity information map in the current frame to obtain image B, and finally, a fusion calculation is performed based on image A and image B to obtain fluid interpolation.

[0086] Step S103, based on the fluid interpolation control sequence map, the texture maps are played to generate virtual special effects.

[0087] Specifically, based on the texture atlas of each frame divided in the above steps, the map transition parameters between frames are set according to fluid interpolation, and the map of each frame is played based on the parameters to generate virtual special effects.

[0088] In actual applications, the last map and the first map are selected from the texture maps of each frame, and a transition value is set between the last map of each current frame and the first map of the next frame based on fluid interpolation. The maps between frames are switched based on the transition value. This not only achieves a smooth transition and avoids the frustration caused by stuttering, but also simplifies the operation of playback and rendering, and virtual special effects display can be achieved by direct playback.

[0089] The above virtual special effects generation method solves the virtual special effects fluid to generate a sequence map with fluid dynamic information, wherein the sequence map includes multiple texture maps containing different information; the fluid interpolation between two frames of special effects is calculated based on the fluid dynamic information in each texture map in the sequence map; the playback of each texture map in the sequence map is controlled based on the fluid interpolation to generate virtual special effects. Compared with the existing technology, the design of the map and the generation of the sequence can be completed without a third-party plug-in, the steps of special effects generation are simplified, the resource usage is reduced, the processing is smoother, the delay is reduced, and the frustration caused by the freeze is avoided.

[0090] The following embodiment provides a specific implementation method for generating virtual special effects, which is described by taking the fireworks special effects in a game scene as an example. Figure 2 This is an example of a smoke and fire special effect.

[0091] In this embodiment, the method is applied to a gaming device, which includes a client and a server. The client displays the game screen and smoke and fire special effects. The server runs the game program and displays the corresponding game scene according to the client's response to various operations, wherein the game scene includes a smoke and fire special effect screen. Based on this structure, a virtual special effect generation method is provided. The fluid elements required for the fireworks special effects in this embodiment are designed by Houdini software as an example. Figure 3 As shown, the method specifically comprises the following steps:

[0092] Step S301, obtaining preset initial solution parameters, and performing special effect simulation based on the initial solution parameters to generate an initial form of virtual special effects;

[0093] Specifically, initial solution parameters of the initial form of smoke and fire configured in advance in the interface of Houdini software are obtained, and fireworks simulation is performed based on the initial solution parameters to generate the initial form of smoke and fire.

[0094] In this step, the interface of the Houdini software includes a solver setting sub-interface, a camera setting sub-interface, and a texture baking setting sub-interface. The user sets different parameters in different sub-interfaces in advance to achieve the generation of sequence textures.

[0095] In this embodiment, when generating the initial form of smoke and fire, after setting the initial size parameters, initial speed parameters and initial shape parameters on the solution setting sub-interface, the initial size parameters, initial speed parameters and initial shape parameters of the fluid emission source pre-configured in the interface of the Houdini software are obtained; based on the initial size parameters, initial speed parameters and initial shape parameters, a fireworks simulation is performed to generate the initial form of smoke and fire.

[0096] Specifically, the first column PRE SIM in the parameter column of the solution setting sub-interface in Houdini software extracts the initial size, velocity direction and size, initial shape and texture flow of the fluid emission source of the fluid solution as parameters that can be controlled by artists for adjustment. In this way, artists do not need to understand the internal operation mechanism of the node, and can directly get started. It is very intuitive and can preview the adjusted effect in real time, and quickly solve the ideal dynamics. For the setting of the initial emission source shape, the initial shape of the fluid emission source can be controlled by setting the density of each area in the smoke and fire map, and the initial shape of smoke and fire can be simulated based on the emission source, such as setting a relatively discrete and fragmented density and a relatively large and concentrated density. For example, in the emission source shape of the first column in the solution setting sub-interface, the parameters control the size scaling of the emission source, the degree and frequency of the surface noise shape; the second column is density and speed, which control the initial velocity size and direction of the emission source, the size and density of the fluid emission source. After the above settings, different shapes of smoke and fire are obtained, such as Figure 4 and 5 As shown, Figure 4 This is a schematic diagram of the relatively discrete and fragmented density. Figure 5 This is a schematic diagram of the morphology of a relatively large and concentrated density.

[0097] Step S302, obtaining preset texture noise disturbance parameters, and adjusting the initial shape based on the texture noise disturbance parameters to obtain a material sequence of virtual special effects;

[0098] Specifically, the texture noise disturbance parameters configured in the Houdini software interface are obtained, and the initial shape is adjusted based on the texture noise disturbance parameters to obtain a material sequence of smoke and fire;

[0099] In this step, the texture noise disturbance parameter refers to the morphological change parameters of the smoke and fire fluid and the environmental fluid in the initial form. The detail changes of different elements in the map corresponding to the initial form are adjusted based on the morphological change parameters to generate multiple maps. The dynamic change material of the smoke and fire fluid is constructed based on the multiple maps.

[0100] In this embodiment, the texture noise disturbance parameter includes a first texture noise disturbance parameter and a second texture noise disturbance parameter, and specifically includes:

[0101] Obtain a preset first noise disturbance parameter and a second noise disturbance parameter; wherein the first noise disturbance parameter and the second noise disturbance parameter are configured in the interface of Houdini software.

[0102] Based on the first noise disturbance parameter, adjusting the intensity and density of the texture noise of the edge of the virtual special effect fluid in the area with low fluid density in the initial form to obtain a first special effect form sequence;

[0103] Based on the second noise disturbance parameter, adjusting the noise intensity and size of the non-virtual special effect fluid in the first special effect form sequence to obtain a second special effect form sequence;

[0104] The second special effect form sequence is photographed according to the shooting angle of the virtual camera to obtain the material sequence of the virtual special effect.

[0105] In practical applications, the settings of the first noise disturbance parameter and the second noise disturbance parameter are obtained by setting the parameters in the second column SIM in the solution setting sub-interface. The parameters in the second column SIM are mainly used to adjust the parameters of the shape in the solution operation. Disturbance is used to control the intensity and density of the texture noise at the edge of the fluid. This part of the noise control mainly occurs in the area with low fluid density, such as (0, 0.2). This density range will be affected by the force field of Disturbance. For example, the low-density area is Figure 6 As shown, in Figure 6 By setting the specific value of Disturbance, Figure 6 The fluid in the region is adjusted to obtain a two-dimensional cross-sectional view of the affected range by affecting the force field in the fluid, such as Figure 7 As shown in the figure, by assigning different values ​​to the Disturbance parameter, the shape and size of the fluid in the low-density area can be controlled, so that more details can be simulated at the edge of the fluid, and larger fluid materials can be simulated. Figure 8 and 9 The following are schematic diagrams of the smoke and fire shapes when Disturbance is assigned a value of 0 and 1 respectively.

[0106] Furthermore, after adjusting the edge of the fluid itself through Disturbance, it also includes adjusting elements outside the fluid itself, which is achieved by adjusting Turbulence. Turbulence is used to simulate the intensity and size control of large-scale noise caused by turbulence in the air. This part of the noise will affect the entire fluid shape. Fig.10 and 11 The following are schematic diagrams of the smoke and fire shapes when Turbulence is assigned values ​​of 0 and 0.3 respectively.

[0107] In one embodiment, after the material sequence is generated, the entire material sequence cache is stored in the hard disk, and frame offset processing is performed on the textures in the material sequence and the material is looped. The frame offset processing includes:

[0108] According to a plurality of preset offset directions and their corresponding preset offset speeds, respectively, the maps in the material sequence are sampled and offset to obtain a plurality of disturbance map components corresponding to each preset offset direction, wherein the maps in the material sequence include two-dimensional normal maps, and the preset offset directions include four directions formed by diagonal lines of the maps in the material sequence;

[0109] Determine a target disturbance map based on disturbance map components corresponding to each preset offset direction;

[0110] Sampling a target perturbation channel corresponding to the target perturbation map, wherein the target perturbation channel includes an R channel and a G channel;

[0111] The display area UV of the virtual scene is rendered based on the target disturbance channel to obtain a material sequence of the information to be offset.

[0112] In this embodiment, the second special effect form sequence is photographed according to the shooting angle of the virtual camera to obtain a virtual special effect material sequence including:

[0113] Shooting the second special effect form sequence according to the shooting angle of the virtual camera to generate a virtual special effect form sequence;

[0114] Detecting whether the smoke and fire fluids in the virtual special effect form sequence exceed the shooting boundary of the virtual camera;

[0115] If it exceeds, a UV on the four sides of each frame in the second special effect form sequence is extracted for softening to obtain a material sequence of virtual special effects.

[0116] Specifically, the best rendering area is obtained by adjusting various data in the third parameter column in the camera setting sub-interface, and the camera is adjusted to a suitable rendering area based on the parameters in the third parameter column to shoot the second special morphological sequence.

[0117] In practical applications, for this shooting, the principle is that as long as the entire sequence does not exceed the shooting boundary of the virtual camera, otherwise there will be hard edge cutting in the final rendering. However, this part of the art will inevitably miss a frame that exceeds the boundary during the production process. Therefore, the edge softening post-processing is automatically performed during the output process, so that each frame has a (0, 0.03) softening transition on the UV on all four sides, just in case.

[0118] In one embodiment, after the step of extracting a UV on four sides of each frame in the second special effect form sequence and performing softening processing to obtain a material sequence of virtual special effects, the step further includes:

[0119] Acquire texture twist parameters, and adjust detail features of the fluid in each texture map based on the texture twist parameters to obtain a noise map;

[0120] The noise map is superimposed on each UV in the material sequence to obtain a new material sequence.

[0121] In practical applications, materials are used to reflect more changes and details to improve the utilization of textures. One way is to twist the texture of the original texture to increase details. The principle is similar to flowmap. The noise map is superimposed on the UV, and then the density and flowmap maps are sampled. Twist perturbation is a very common technology in game special effects. It can also reflect more details and changes in the fluid of fireworks. The left picture below is without UV twist, and the right picture is the effect of twist:

[0122] Step S303, baking the material sequence, extracting the fluid density information map and the fluid velocity information map therein, and generating a sequence map based on the fluid density information map and the fluid velocity information map;

[0123] In this embodiment, the material sequence is baked mainly to bake two paste Figure 1 One is density, and the other is flowmap containing fluid velocity information and normal information. The flame process does not include the output of normal map, because flame is a self-luminous fluid and does not need to be illuminated.

[0124] In practical applications, the normal map only has R and G channels, which store the normal information of the fluid. Since the flowmap expresses the velocity information in the UV direction, it only has RG channels, and normal only needs RG 2 channels, so these two maps are automatically merged into one after merging, RG is flowmap, BA is normal information, and finally the sequence map is output, which contains the fluid density information map density and the fluid velocity information map flowmap+normal.

[0125] Step S304, extracting fluid velocity information and / or normal information from the fluid velocity information maps of two frames in the sequence map;

[0126] Step S305, calculating the fluid interpolation between two frames of special effects based on the fluid velocity information and / or normal information;

[0127] In this embodiment, based on the fluid velocity information and / or the normal information of the current frame, the fluid density information map of the current frame is subjected to a forward UV offset perturbation to obtain a first image; based on the fluid velocity information and / or the normal information of the next previous frame, the fluid density information map of the current frame is subjected to a reverse UV offset perturbation to obtain a second image; the first image and the second image are linearly fused, the degree of fusion of the two images is calculated, and the fluid interpolation between the two frames of special effects is determined based on all degree values ​​in the sequence map.

[0128] In practical applications, fluid velocity information and normal information are extracted from the fluid velocity information map. Here, the fluid interpolation is calculated by using the information of the flowmap map to achieve interpolation between two frames to achieve a smooth fluid effect. The main principle is to use the flowmap color information of the current frame N to make a positive UV offset perturbation on the density image of the current frame N to generate image A, and then use the flowmap information of the next frame N+1 to make a reverse UV offset perturbation on the density image of the current frame N to generate image B, and then linearly fuse the two images (linearBlend), the formula is written as lerp(A, B, a), and this a is the degree of fusion, 0 is A, 1 is B, and the value of a is obtained by taking the decimal of the current frame. It should be noted that the information value range of the flowmap is (0, 1), and the velocity information is directional, so the value needs to be mapped to (-1, 1), so the flowmap needs to be first operated by a *2-1 and then interpolated.

[0129] In one embodiment, before the step of calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each rendering map in the sequence map, the method further includes:

[0130] The shrinkage calculation of the edge of the virtual special effect fluid in the fluid density information map is performed using an exponential function to obtain a shrinkage parameter; wherein the exponential function is a power exponential function.

[0131] The fluid density information map is adjusted based on the contraction parameters to obtain a new fluid density information map.

[0132] Specifically, performing power exponential function calculation on Alpha can achieve the effect of shrinking the edge, and can achieve the change of fluid, especially flame, from a flame to a big fire. Therefore, a set of textures can produce the effect of burning flames of different degrees, that is, performing exponential function operation on the Alpha channel of the output density sequence diagram to achieve the effect of frustrating the Alpha edge and achieving the effect of changing the flame.

[0133] In one embodiment, before the step of calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map, the method further includes:

[0134] A color gradient map is obtained, and the gradient map is mapped to the grayscale channel of the fluid density information map to obtain a new fluid density information map.

[0135] Specifically, by mixing different parameters, you can create rich fluid effects, but the size of the package will not increase. Another variation is to map a color gradient map to the alpha channel of the density map to achieve color variability. Specifically, for flames, you can show different colors for the inner and outer flames.

[0136] Step S306, based on the fluid interpolation control sequence map, the texture maps are played to generate virtual special effects.

[0137] In this embodiment, the last map and the first map are selected from the texture maps of each frame, a transition value is set between the last map of each current frame and the first map of the next frame based on fluid interpolation, and the maps between frames are switched based on the transition value to achieve the generation of special effects.

[0138] In summary, Houdini software is used to solve virtual special effects fluids and generate sequence maps with fluid dynamic information, where the sequence map includes multiple texture maps containing different information; the fluid interpolation between two frames of special effects is calculated based on the fluid dynamic information in each texture map in the sequence map; the playback of each texture map in the sequence map is controlled based on the fluid interpolation to generate virtual special effects. This method allows art production to produce efficient controllable fluid solutions through dynamic control, achieve fluid dynamic effects that meet specific application scenarios, and can be automatically baked into sequence maps without the need to use additional plug-ins to splice into SubUV maps to improve output efficiency.

[0139] At the same time, the use of pre-set materials can achieve smooth dynamic interpolation fluid effects, and through the adjustment of parameters and the use of ramp gradient color maps in the engine, more varied effects can be obtained under the same original data and the increase in the package size can be reduced.

[0140] Furthermore, the Flowmap information map also includes the normal map, so the volume of the smoke can be better expressed, and therefore point light sources can also be accepted.

[0141] Furthermore, since the smooth transition of the fluid interpolation is set, there is no need to bake the texture information into multiple rows and columns. Therefore, 8*8 or even 10*10 is not needed, only 6*6 is enough. Therefore, a single dynamic image can obtain a higher pixel ratio at the same size, thereby improving the pixel accuracy of the entire material.

[0142] Corresponding to the above method embodiment, see Fig.12 The schematic diagram of a virtual special effect generating device shown in FIG. 1 provides a game scene through a terminal device; the device includes:

[0143] A solving module 1201 is used to solve the virtual special effect fluid and generate a sequence map with fluid dynamic information, wherein the sequence map includes a plurality of texture maps containing different information;

[0144] A calculation module 1202, used to calculate the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map;

[0145] The generation module 1023 is used to control the playback of each texture map in the sequence map based on the fluid interpolation to generate a virtual special effect.

[0146] The above-mentioned virtual special effects generation device solves the virtual special effects fluid to generate a sequence map with fluid dynamic information, wherein the sequence map includes multiple texture maps containing different information; the fluid interpolation between two frames of special effects is calculated based on the fluid dynamic information in each texture map in the sequence map; the playback of each texture map in the sequence map is controlled based on the fluid interpolation to generate virtual special effects. This method can complete the design of maps and the generation of sequences without the need for third-party plug-ins, simplifies the steps of special effects generation, and also controls the smooth transition of maps between frames by setting fluid interpolation, reduces resource usage during rendering and playback, makes processing smoother, reduces latency, and avoids the frustration caused by freezes.

[0147] See also Fig.13 The second embodiment of the virtual special effect generating device in the embodiment of the present invention includes:

[0148] A solving module 1201 is used to solve the virtual fluid and generate a sequence map with fluid dynamic information, wherein the sequence map includes multiple texture maps containing different information;

[0149] A calculation module 1202, used to calculate the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map;

[0150] The generation module 1023 is used to control the playback of each texture map in the sequence map based on the fluid interpolation to generate a virtual special effect.

[0151] In this embodiment, the solving module 1201 includes:

[0152] A solving unit 12011 is used to obtain preset initial solving parameters, and perform special effect simulation based on the initial solving parameters to generate an initial form of the virtual special effect;

[0153] The rendering unit 12012 is used to obtain preset texture noise disturbance parameters, and adjust the initial form based on the texture noise disturbance parameters to obtain a material sequence of the virtual special effect;

[0154] The extraction unit 12013 is used to bake the material sequence, extract the fluid density information map and the fluid speed information map therein, and generate a sequence map based on the fluid density information map and the fluid speed information map.

[0155] In this embodiment, the solving unit 12011 is specifically used to: obtain the initial size parameters, initial speed parameters and initial shape parameters of the preset fluid emission source; perform special effects simulation based on the initial size parameters, initial speed parameters and initial shape parameters to generate the initial form of the virtual special effects.

[0156] In this embodiment, the solving unit 12011 is specifically used to: obtain a preset first noise disturbance parameter and a second noise disturbance parameter; based on the first noise disturbance parameter, adjust the intensity and density of the texture noise at the edge of the virtual special effect fluid in the area with low fluid density in the initial form to obtain a first special effect form sequence; based on the second noise disturbance parameter, adjust the noise intensity and size of the non-virtual special effect fluid in the first special effect form sequence to obtain a second special effect form sequence; shoot the second special effect form sequence according to the shooting angle of the virtual camera to obtain the material sequence of the virtual special effect.

[0157] In this embodiment, the solving unit 12011 is specifically used to: shoot the second special effect form sequence according to the shooting angle of the virtual camera to generate a virtual special effect form sequence; detect whether the fluid in the virtual special effect form sequence exceeds the shooting boundary of the virtual camera; if exceeded, extract a UV on the four sides of each frame of the second special effect form sequence for softening processing to obtain the material sequence of the virtual special effect.

[0158] In this embodiment, the solving unit 12011 is specifically used to: obtain texture twist parameters, and adjust the detail characteristics of the fluid in each texture map based on the texture twist parameters to obtain a noise map; superimpose the noise map on each UV in the material sequence to obtain a new material sequence.

[0159] In this embodiment, the virtual special effect generating device further includes a first adjustment module 1204, which is specifically used to:

[0160] Using an exponential function to perform shrinkage calculation on the edge of the virtual special effect fluid in the fluid density information map to obtain a shrinkage parameter;

[0161] The fluid density information map is adjusted based on the contraction parameters to obtain a new fluid density information map.

[0162] In this embodiment, the virtual special effect generating device further includes a second adjustment module 1205, which is specifically used for:

[0163] A color gradient map is obtained, and the gradient map is mapped to the grayscale channel of the fluid density information map to obtain a new fluid density information map.

[0164] In this embodiment, the calculation module 1202 includes:

[0165] An extraction unit 12021 is used to extract fluid velocity information and / or normal information from the fluid velocity information maps of two frames in the sequence map;

[0166] The calculation unit 12022 is used to calculate the fluid interpolation between two frames of special effects based on the fluid velocity information and / or the normal information.

[0167] In this embodiment, the calculation unit 12022 is specifically used for:

[0168] Used to perform a forward offset perturbation of UV on the fluid density information map of the current frame based on the fluid velocity information and / or the normal information of the current frame to obtain a first image;

[0169] Based on the fluid velocity information and / or the normal information of the next previous frame, perform reverse UV offset perturbation on the fluid density information map of the current frame to obtain a second image;

[0170] The first image and the second image are linearly fused, a degree value of fusion of the two images is calculated, and a fluid interpolation between two frames of special effects is determined based on all degree values ​​in the sequence map.

[0171] This embodiment also provides an electronic device, including a processor and a memory, wherein 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 virtual special effect generation method. The electronic device can be a server or a terminal device.

[0172] See also Fig.14 As shown, the electronic device includes a processor 600 and a memory 601 , wherein the memory 601 stores machine executable instructions that can be executed by the processor 600 , and the processor 600 executes the machine executable instructions to implement the above method for determining the false touch prevention area.

[0173] Further, Fig.14 The electronic device shown further includes a bus 602 and a communication interface 603 , and the processor 600 , the communication interface 603 and the memory 601 are connected via the bus 602 .

[0174] The memory 601 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 603 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 602 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.14 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0175] The processor 600 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 600. The above processor 600 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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 gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, or other mature storage media in the art. The storage medium is located in the memory 601, and the processor 600 reads the information in the memory 601 and completes the following steps in combination with its hardware:

[0176] Solving the virtual special effect fluid to generate a sequence map with fluid dynamic information, wherein the sequence map includes a plurality of texture maps containing different information;

[0177] Calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map;

[0178] The playback of each texture map in the sequence map is controlled based on the fluid interpolation to generate a virtual special effect.

[0179] The above-mentioned step of solving the virtual special effect fluid to generate a sequence map with fluid dynamic information includes: obtaining preset initial solution parameters, and performing special effects simulation based on the initial solution parameters to generate the initial form of the virtual special effect; obtaining preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain the material sequence of the virtual special effect; baking the material sequence, extracting the fluid density information map and the fluid velocity information map therein, and generating a sequence map based on the fluid density information map and the fluid velocity information map.

[0180] The above-mentioned step of obtaining preset initial solution parameters, performing special effects simulation based on the initial solution parameters, and generating the initial form of the virtual special effect includes: obtaining the initial size parameters, initial speed parameters and initial shape parameters of the preset fluid emission source; performing special effects simulation based on the initial size parameters, initial speed parameters and initial shape parameters, and generating the initial form of the virtual special effect.

[0181] The above-mentioned step of obtaining preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain the material sequence of the virtual special effect includes: obtaining preset first noise disturbance parameters and second noise disturbance parameters; based on the first noise disturbance parameters, adjusting the intensity and density of the texture noise at the edge of the virtual special effect fluid in the area with low fluid density in the initial form to obtain a first special effect form sequence; based on the second noise disturbance parameters, adjusting the noise intensity and size of the non-virtual special effect fluid in the first special effect form sequence to obtain a second special effect form sequence; shooting the second special effect form sequence according to the shooting angle of the virtual camera to obtain the material sequence of the virtual special effect.

[0182] The step of shooting the second special effect form sequence according to the shooting angle of the virtual camera to obtain the material sequence of the virtual special effect includes: shooting the second special effect form sequence according to the shooting angle of the virtual camera to generate a virtual special effect form sequence; detecting whether the fluid in the virtual special effect form sequence exceeds the shooting boundary of the virtual camera; if so, extracting a UV on the four sides of each frame of the second special effect form sequence for softening processing to obtain the material sequence of the virtual special effect.

[0183] After the step of extracting one UV on the four sides of each frame in the second special effect form sequence and softening it to obtain the material sequence of the virtual special effect, the method further includes: obtaining texture twisting parameters, and adjusting the detail features of the fluid in each texture map based on the texture twisting parameters to obtain a noise map; and superimposing the noise map on each UV in the material sequence to obtain a new material sequence.

[0184] Before the above-mentioned step of calculating the fluid interpolation between two frames of special effects based on the fluid dynamic information in each texture map in the sequence map, it also includes: using an exponential function to shrink the edge of the virtual special effect fluid in the fluid density information map to obtain a shrinkage parameter; based on the shrinkage parameter, adjusting the fluid density information map respectively to obtain a new fluid density information map.

[0185] Before the step of calculating the fluid interpolation between two frames of special effects based on the fluid dynamic information in each texture map in the sequence map, the above step also includes: obtaining a color gradient map and mapping the gradient map to the grayscale channel of the fluid density information map to obtain a new fluid density information map.

[0186] The above-mentioned step of calculating the fluid interpolation between two frames of special effects based on the fluid dynamic information in each texture map in the sequence map includes: extracting the fluid speed information and / or normal information in the fluid speed information map of two frames in the sequence map; and calculating the fluid interpolation between the two frames of special effects based on the fluid speed information and / or the normal information.

[0187] Optionally, the above-mentioned step of calculating the fluid interpolation between two frames of special effects based on the fluid velocity information and / or the normal information includes: based on the fluid velocity information and / or the normal information of the current frame, performing a forward UV offset perturbation on the fluid density information map of the current frame to obtain a first image; based on the fluid velocity information and / or the normal information of the next previous frame, performing a reverse UV offset perturbation on the fluid density information map of the current frame to obtain a second image; linearly fusing the first image and the second image, calculating the degree of fusion of the two images, and determining the fluid interpolation between the two frames of special effects based on all degree values ​​in the sequence map.

[0188] In summary, the virtual special effect fluid is solved to generate a sequence map with fluid dynamic information, wherein the sequence map includes multiple texture maps containing different information; the fluid interpolation between two frames of special effects is calculated based on the fluid dynamic information in each texture map in the sequence map; the playback of each texture map in the sequence map is controlled based on the fluid interpolation to generate virtual special effects. This method solves the problem of uncontrollable shape and jamming during playback when generating virtual special effects in existing game scenes. At the same time, Houdini software is used to directly complete the design of the map and the generation of the sequence, simplifying the steps of special effect generation.

[0189] This embodiment further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the following steps:

[0190] Solving the virtual special effect fluid to generate a sequence map with fluid dynamic information, wherein the sequence map includes a plurality of texture maps containing different information;

[0191] Calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map;

[0192] The playback of each texture map in the sequence map is controlled based on the fluid interpolation to generate a virtual special effect.

[0193] The above-mentioned step of solving the virtual special effect fluid to generate a sequence map with fluid dynamic information includes: obtaining preset initial solution parameters, and performing special effects simulation based on the initial solution parameters to generate the initial form of the virtual special effect; obtaining preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain the material sequence of the virtual special effect; baking the material sequence, extracting the fluid density information map and the fluid velocity information map therein, and generating a sequence map based on the fluid density information map and the fluid velocity information map.

[0194] The above-mentioned step of obtaining preset initial solution parameters, performing special effects simulation based on the initial solution parameters, and generating the initial form of the virtual special effect includes: obtaining the initial size parameters, initial speed parameters and initial shape parameters of the preset fluid emission source; performing special effects simulation based on the initial size parameters, initial speed parameters and initial shape parameters, and generating the initial form of the virtual special effect.

[0195] The above-mentioned step of obtaining preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain the material sequence of the virtual special effect includes: obtaining preset first noise disturbance parameters and second noise disturbance parameters; based on the first noise disturbance parameters, adjusting the intensity and density of the texture noise at the edge of the virtual special effect fluid in the area with low fluid density in the initial form to obtain a first special effect form sequence; based on the second noise disturbance parameters, adjusting the noise intensity and size of the non-virtual special effect fluid in the first special effect form sequence to obtain a second special effect form sequence; shooting the second special effect form sequence according to the shooting angle of the virtual camera to obtain the material sequence of the virtual special effect.

[0196] The step of shooting the second special effect form sequence according to the shooting angle of the virtual camera to obtain the material sequence of the virtual special effect includes: shooting the second special effect form sequence according to the shooting angle of the virtual camera to generate a virtual special effect form sequence; detecting whether the fluid in the virtual special effect form sequence exceeds the shooting boundary of the virtual camera; if so, extracting a UV on the four sides of each frame of the second special effect form sequence for softening processing to obtain the material sequence of the virtual special effect.

[0197] After the step of extracting one UV on the four sides of each frame in the second special effect form sequence and softening it to obtain the material sequence of the virtual special effect, the method further includes: obtaining texture twisting parameters, and adjusting the detail features of the fluid in each texture map based on the texture twisting parameters to obtain a noise map; and superimposing the noise map on each UV in the material sequence to obtain a new material sequence.

[0198] Before the above-mentioned step of calculating the fluid interpolation between two frames of special effects based on the fluid dynamic information in each texture map in the sequence map, it also includes: using an exponential function to shrink the edge of the virtual special effect fluid in the fluid density information map to obtain a shrinkage parameter; based on the shrinkage parameter, adjusting the fluid density information map respectively to obtain a new fluid density information map.

[0199] Before the step of calculating the fluid interpolation between two frames of special effects based on the fluid dynamic information in each texture map in the sequence map, the above step also includes: obtaining a color gradient map and mapping the gradient map to the grayscale channel of the fluid density information map to obtain a new fluid density information map.

[0200] The above-mentioned step of calculating the fluid interpolation between two frames of special effects based on the fluid dynamic information in each texture map in the sequence map includes: extracting the fluid speed information and / or normal information in the fluid speed information map of two frames in the sequence map; and calculating the fluid interpolation between the two frames of special effects based on the fluid speed information and / or the normal information.

[0201] Optionally, the above-mentioned step of calculating the fluid interpolation between two frames of special effects based on the fluid velocity information and / or the normal information includes: based on the fluid velocity information and / or the normal information of the current frame, performing a forward UV offset perturbation on the fluid density information map of the current frame to obtain a first image; based on the fluid velocity information and / or the normal information of the next previous frame, performing a reverse UV offset perturbation on the fluid density information map of the current frame to obtain a second image; linearly fusing the first image and the second image, calculating the degree of fusion of the two images, and determining the fluid interpolation between the two frames of special effects based on all degree values ​​in the sequence map.

[0202] In summary, the virtual special effect fluid is solved to generate a sequence map with fluid dynamic information, wherein the sequence map includes multiple texture maps containing different information; the fluid interpolation between two frames of special effects is calculated based on the fluid dynamic information in each texture map in the sequence map; the playback of each texture map in the sequence map is controlled based on the fluid interpolation to generate virtual special effects. Compared with the existing technology, the design of the map and the generation of the sequence can be completed without a third-party plug-in, the steps of special effect generation are simplified, the resource usage is reduced, the processing is smoother, the delay is reduced, and the frustration caused by the freeze is avoided.

[0203] The computer program product of the virtual special effects generation method, device, electronic device and storage medium 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 previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0204] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0205] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0206] If the functions are implemented in the form of 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 the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0207] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0208] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for generating virtual special effects, characterized in that: The virtual special effects generation method comprises: Solving and baking the virtual special effect fluid based on preset solving parameters to generate a sequence map with fluid dynamic information, wherein the sequence map includes multiple texture maps containing different information, and the solving parameters are adjusted and configured by the user based on the parameter setting interface provided by Houdini software; Calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map; Controlling the playback of each texture map in the sequence map based on the fluid interpolation to generate a virtual special effect; The step of solving and baking the virtual special effect fluid based on preset solving parameters to generate a sequence map with fluid dynamic information includes: Acquiring preset initial solution parameters, and performing special effect simulation based on the initial solution parameters to generate an initial form of the virtual special effect; Acquiring preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain a material sequence of the virtual special effect; The material sequence is baked, a fluid density information map and a fluid velocity information map therein are extracted, and a sequence map is generated based on the fluid density information map and the fluid velocity information map.

2. The method for generating virtual special effects according to claim 1, characterized in that: The step of obtaining preset initial solution parameters, and performing special effect simulation based on the initial solution parameters to generate the initial form of the virtual special effect includes: Obtaining the initial size parameter, initial velocity parameter and initial shape parameter of the preset fluid emission source; Special effects simulation is performed based on the initial size parameter, the initial speed parameter and the initial shape parameter to generate the initial form of the virtual special effects.

3. The method for generating virtual special effects according to claim 1, characterized in that: The step of obtaining preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain the material sequence of the virtual special effect includes: Obtaining a preset first noise disturbance parameter and a preset second noise disturbance parameter; Based on the first noise disturbance parameter, adjusting the intensity and density of the texture noise of the edge of the virtual special effect fluid in the area with low fluid density in the initial form to obtain a first special effect form sequence; Based on the second noise disturbance parameter, adjusting the noise intensity and size of the non-virtual special effect fluid in the first special effect form sequence to obtain a second special effect form sequence; The second special effect form sequence is photographed according to the shooting angle of the virtual camera to obtain the material sequence of the virtual special effect.

4. The method for generating virtual special effects according to claim 3, characterized in that: The step of shooting the second special effect form sequence according to the shooting angle of the virtual camera to obtain a material sequence of virtual special effects includes: Shooting the second special effect form sequence according to the shooting angle of the virtual camera to generate a virtual special effect form sequence; Detecting whether the fluid in the virtual special effect form sequence exceeds the shooting boundary of the virtual camera; If it exceeds, one UV on the four sides of each frame in the second special effect form sequence is extracted for softening processing to obtain the material sequence of the virtual special effect.

5. The method for generating virtual special effects according to claim 4, characterized in that: After the step of extracting a UV on four sides of each frame in the second special effect form sequence and performing softening processing to obtain the material sequence of the virtual special effect, the method further includes: Acquire texture twist parameters, and adjust detail features of the fluid in each texture map based on the texture twist parameters to obtain a noise map; The noise map is superimposed on each UV in the material sequence to obtain a new material sequence.

6. The method for generating virtual special effects according to claim 1, characterized in that: Before the step of calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map, the method further includes: Using an exponential function to perform shrinkage calculation on the edge of the virtual special effect fluid in the fluid density information map to obtain a shrinkage parameter; The fluid density information map is adjusted based on the contraction parameters to obtain a new fluid density information map.

7. The method for generating virtual special effects according to claim 1, characterized in that: Before the step of calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map, the method further includes: A color gradient map is obtained, and the gradient map is mapped to the grayscale channel of the fluid density information map to obtain a new fluid density information map.

8. The method for generating virtual special effects according to claim 1, 6 or 7, characterized in that: The step of calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map comprises: Extracting fluid velocity information and / or normal information from the fluid velocity information maps of two frames in the sequence map; Based on the fluid velocity information and / or the normal information, a fluid interpolation between two frames of special effects is calculated.

9. The method for generating virtual special effects according to claim 8, characterized in that: The step of calculating the fluid interpolation between two frames of special effects based on the fluid velocity information and / or the normal information comprises: Based on the fluid velocity information and / or the normal information of the current frame, perform a UV positive offset perturbation on the fluid density information map of the current frame to obtain a first image; Based on the fluid velocity information and / or the normal information of the next previous frame, perform reverse UV offset perturbation on the fluid density information map of the current frame to obtain a second image; The first image and the second image are linearly fused, a degree value of fusion of the two images is calculated, and a fluid interpolation between two frames of special effects is determined based on all degree values ​​in the sequence map.

10. A virtual special effect generating device, characterized in that: The virtual special effect generating device comprises: A solving module, used for solving and baking virtual special effect fluid based on preset solving parameters, generating a sequence map with fluid dynamic information, wherein the sequence map includes multiple texture maps containing different information, and the solving parameters are adjusted and configured by the user based on the parameter setting interface provided by Houdini software; A calculation module, used for calculating the fluid interpolation between two frames of special effects according to the fluid dynamic information in each texture map in the sequence map; A generation module, used for controlling the playback of each texture map in the sequence map based on the fluid interpolation to generate a virtual special effect; The solution module includes: A solving unit, used for obtaining preset initial solving parameters, and performing special effect simulation based on the initial solving parameters to generate an initial form of the virtual special effect; A rendering unit, used for acquiring preset texture noise disturbance parameters, and adjusting the initial form based on the texture noise disturbance parameters to obtain a material sequence of the virtual special effect; The extraction unit is used to bake the material sequence, extract the fluid density information map and the fluid speed information map therein, and generate a sequence map based on the fluid density information map and the fluid speed information map.

11. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the virtual special effect generation method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the virtual special effect generation method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Realistic fluid effect production method in virtual stage environment

    CN104899913A

  • Fountain simulation realization method based on particle system

    CN105303601A