Special effects processing method, device, terminal device and computer readable storage medium

By obtaining the special effect particles area in the object map and special effects map of the virtual object, the target special effect image is generated and the superimposed treatment is performed, which solves the problem of unrealistic effects on the special effects on the virtual object. Essence

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

Patent Information

Application Number
CN202111592869.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2025-01-28
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

It is difficult for the prior art to realize the real meteor effect on virtual objects with materials, resulting in the separation of special effects from virtual objects and affecting the display effect.

Method used

By obtaining the object map of the object of the virtual object and the special effect particles area in the pre -drawing special effects map, generate a special effect sub -map, and generate the target special effect image according to the UV mobile parameter. Finally Special effect display.

Benefits of technology

Avoid the separation of special effects and virtual objects, improve the display effect of special effects on the virtual object, and make the special effects performance more realistic and random.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114247135B_ABST
    Figure CN114247135B_ABST
Patent Text Reader

Abstract

The present application provides a special effect processing method, device, terminal device and computer-readable storage medium, which relates to the field of game technology. The method includes obtaining an object map of a virtual object to which special effects are to be added; collecting a special effect particle area in a pre-drawn special effect map to obtain a special effect sub-map; wherein the number of special effect sub-maps is the same as the number of collection times, and the special effect sub-map contains only one special effect particle; for each special effect sub-map, a target special effect image corresponding to the special effect sub-map is generated according to the UV flow parameters corresponding to the special effect sub-map; wherein the UV flow parameters are used to characterize the special effect movement state corresponding to the special effect particle; each target special effect image is superimposed on the object map to obtain a virtual object with special effects corresponding to the special effect particle. The present application can generate a target special effect image with a relatively realistic special effect effect, and a virtual object displaying a real special effect, thereby avoiding the separation of special effects from virtual objects and improving the display effect of special effects on virtual objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of games, and in particular to a special effects processing method, device, terminal equipment and computer-readable storage medium. Background Art

[0002] In virtual scenes, meteor showers are often used to enrich the sky effects of games. The special effect particle trails create a random feeling of falling meteors, sometimes appearing alone, and sometimes multiple meteors appearing together. However, the meteor effect achieved through the special effect particle trails cannot meet all scenarios. For example, when the meteor effect is achieved on some virtual objects with materials (such as game characters), the meteor shower and the virtual object are usually separated, thus affecting the effect of the meteor display. Summary of the invention

[0003] The purpose of the present invention is to provide a special effects processing method, apparatus, terminal device and computer-readable storage medium, which can generate a target special effects image with a relatively realistic special effects effect, and can obtain a virtual object that displays the real special effects, thereby avoiding the separation of special effects and virtual objects and improving the display effect of special effects on virtual objects.

[0004] In a first aspect, the present invention provides a special effect processing method, which provides a graphical user interface through a terminal, and the content displayed by the graphical user interface includes at least a virtual object; the method includes: obtaining an object map of the virtual object to which special effects are to be added; collecting special effect particle areas in a pre-drawn special effect map to obtain a special effect sub-image; wherein the number of special effect sub-images is the same as the number of collection times, and the special effect sub-image only contains one special effect particle; for each special effect sub-image, a target special effect image corresponding to the special effect sub-image is generated according to a UV flow parameter corresponding to the special effect sub-image; wherein the UV flow parameter is used to characterize the special effect movement state corresponding to the special effect particle; each target special effect image is superimposed on the object map to obtain a virtual object with special effects corresponding to the special effect particle.

[0005] In an optional implementation, the special effect map includes a background image and at least one special effect particle located in the background image; the background image is a black image.

[0006] In an optional embodiment, after the step of obtaining the special effect sub-image, the method further includes: in response to a parameter adjustment operation on the special effect sub-image, determining the UV flow parameters of the special effect sub-image according to the parameter adjustment operation; wherein the UV flow parameters include flow speed, flow direction and offset angle; wherein the offset angle is the offset angle of the start point and end point of the special effect particle in the screen space coordinate system.

[0007] In an optional embodiment, the step of collecting a special effect particle area in a pre-drawn special effect map to obtain a special effect sub-image includes: determining the special effect particle area in the pre-drawn special effect map; for the special effect particle area, sampling the special effect map according to a preset number of times to obtain a plurality of special effect sub-images corresponding to the preset number of times.

[0008] In an optional embodiment, the step of superimposing each target special effect image with the object map includes: obtaining a special effect mask image corresponding to the object map; and determining a display range of the special effect on the virtual object based on the special effect mask image.

[0009] In an optional embodiment, the step of superimposing each target special effect image with the object map to obtain a virtual object with special effects corresponding to the special effect particles includes: generating a target special effect map with special effects corresponding to the special effect particles in response to a first superimposition operation on multiple target special effect images; and obtaining a virtual object with special effects corresponding to the special effect particles in response to a second superimposition operation on the target special effect map and the object map.

[0010] In an optional embodiment, the step of superimposing each target special effect image and the object map to obtain a virtual object with special effects particles corresponding to the special effects includes: in response to a third superimposition operation on each target special effect image and the object map, superimposing each target special effect image and the object map to obtain a virtual object with special effects particles corresponding to the special effects.

[0011] In an optional embodiment, the step of superimposing each target special effect image with the object map to obtain a virtual object with special effects corresponding to the special effect particles includes: superimposing each channel of the color space of the target special effect image with the corresponding channel of the color space of the virtual object to obtain a virtual object displaying the special effect.

[0012] In an optional embodiment, the step of obtaining an object map of a virtual object to which special effects are to be added includes: obtaining a reflective index map corresponding to the virtual object to which special effects are to be added; and performing texture rendering and color rendering on the reflective index map to obtain an object map of the virtual object.

[0013] In a second aspect, the present invention provides a device for special effect processing, which provides a graphical user interface through a terminal, and the content displayed by the graphical user interface includes at least virtual objects; the device includes: an acquisition module, which is used to acquire an object map of the virtual object to which special effects are to be added; a collection module, which is used to collect special effect particle areas in a pre-drawn special effect map to obtain a special effect sub-image; wherein the number of special effect sub-images is the same as the number of collection times, and the special effect sub-image only contains one special effect particle; a special effect image generation module, which is used to generate a target special effect image corresponding to each special effect sub-image according to the UV flow parameters corresponding to the special effect sub-image; wherein the UV flow parameters are used to characterize the special effect movement state corresponding to the special effect particles; and a superposition module, which is used to superimpose each target special effect image with the object map to obtain a virtual object with special effects corresponding to the special effect particles.

[0014] In a third aspect, the present invention provides a terminal device, a processor and a storage device; the storage device stores a computer program, and when the computer program is run by the processor, it executes any method as described in the foregoing implementation manner.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement any one of the methods of the aforementioned implementations.

[0016] The embodiments of the present invention provide a special effect processing method, device, terminal device and computer-readable storage medium, which obtains an object map of a virtual object to which special effects are to be added, and collects a special effect particle area in a pre-drawn special effect map, to obtain a special effect sub-image with the same number of acquisition times and containing only one special effect particle. For each special effect sub-image, a target special effect image corresponding to the special effect sub-image is generated according to the UV flow parameter corresponding to the special effect sub-image for characterizing the special effect movement state corresponding to the special effect particle, so as to perform superposition processing on each target special effect image and the object map to obtain a virtual object with a special effect corresponding to the special effect particle. In this way, multiple special effect sub-images can be obtained by collecting the special effect particle area in the special effect map for a preset number of times, and a target special effect image with a relatively realistic special effect effect can be generated according to the UV flow parameter of the special effect sub-image. By superimposing the target special effect image and the object map, a virtual object showing a real special effect can be obtained, thereby avoiding the separation of special effects from virtual objects and improving the display effect of special effects on virtual objects.

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

[0018] 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

[0019] 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 ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart of a special effect processing method provided by an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of a special effect map provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a special effect particle area provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of a special effect mask image provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of a virtual object displaying special effects provided by an embodiment of the present invention;

[0025] Figure 6 A structural diagram of a special effect processing device provided by an embodiment of the present invention;

[0026] Figure 7 A structural diagram of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0028] First, the nouns involved in this application are introduced:

[0029] (1) Virtual scene (game scene)

[0030] A virtual scene is a virtual scene displayed (or provided) when an application is running on a terminal or server. Optionally, the virtual scene is a simulation environment of the real world, or a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene is any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, and a three-dimensional virtual scene. The virtual environment can be the sky, land, ocean, etc., wherein the land includes environmental elements such as deserts and cities. Among them, the virtual scene is a scene with complete game logic of virtual objects such as user control. For example, for sandbox 3D shooting games, the virtual scene is a 3D game world for players to control virtual objects to fight. Example virtual scenes may include: at least one element of mountains, plains, rivers, lakes, oceans, deserts, skies, plants, buildings, and vehicles; for example, for 2D or 2.5D card games, the virtual scene is a scene for displaying released cards or displaying virtual objects corresponding to cards. Example virtual scenes may include: an arena, a decisive battlefield, or other "field" elements or other elements that can display the status of card battles; for 2D or 2.5D multiplayer online tactical competitive games, the virtual scene is a 2D or 2.5D terrain scene for virtual objects to fight. Example virtual scenes may include: canyon-style mountains, lines, rivers, classrooms, tables and chairs, podiums and other elements.

[0031] (2) Virtual Objects

[0032] A virtual object refers to a dynamic object that can be controlled in a virtual scene. Optionally, the dynamic object can be a virtual character, a virtual animal, an animated character, etc. The virtual object is a character controlled by a player through an input device, or an artificial intelligence (AI) set in a virtual environment battle through training, or a non-player character (NPC) set in a virtual scene battle. Optionally, the virtual object is a virtual object that presents special effects in a virtual scene. Optionally, the number of virtual objects in the virtual scene battle is preset, or is dynamically determined according to the number of clients joining the battle, and the embodiment of the present application does not limit this. In a possible implementation, the user can control the virtual object to move in the virtual scene, for example, control the virtual object to run, jump, crawl, etc., and can also control the virtual object to fight with other virtual objects using skills, virtual props, etc. provided by the application. In this embodiment, after the virtual object is loaded in the virtual environment, the pre-set special effects can be presented on the virtual object.

[0033] At present, special effect particles are usually produced in the form of special effect particle tailing. The tailing special effect (also called ribbon special effect) is a type of special effect particle, which is usually used to achieve the effect of fast movement of objects. The effect, length and color of the tailing can be controlled. Common special effects include bullet tailing, knife light tailing, etc. The tailing particle is actually the movement trajectory led by the front particle, that is, it is not the ribbon that drives the movement, but the ribbon head keeps generating the nodes of the ribbon particles.

[0034] At present, the method of presenting special effects in virtual scenes is to use special effect particle trailing to produce them. For example, in a game scene, when a player controls a virtual gun to fire bullets through attack operations, a bullet trailing special effect will be displayed in the game scene, or when a player attacks an enemy, by waving a knife, a knife light special effect will be displayed in the game scene, or a meteor shower effect will be presented in the virtual sky through special effect particle trailing, etc. However, the special effects currently generated by using special effect particle trailing cannot be applied to virtual characters with materials, which will separate the displayed special effects from the virtual characters, resulting in poor special effect display effects.

[0035] Based on this, the embodiments of the present invention provide a special effects processing method, device, terminal device and computer-readable storage medium, which can generate a target special effects image with relatively realistic special effects, and can obtain a virtual object that displays real special effects, thereby avoiding the separation of special effects and virtual objects and improving the display effect of special effects on virtual objects.

[0036] To facilitate understanding of this embodiment, the present invention provides a special effect processing method, which provides a graphical user interface through a terminal, and the content displayed by the graphical user interface includes at least a virtual object. To facilitate understanding, a special effect processing method disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:

[0037] Step S102, obtaining an object map of a virtual object to which special effects are to be added.

[0038] The object map may include an object map that has been rendered for a character, or may include an object map that has not been rendered originally. If the object map that has been rendered for a character is obtained, there is no need to further process the object map. If the original object map, such as an albedo map, is obtained, the albedo map (i.e., the original object map) may be used for character rendering by a rendering tool.

[0039] The object map rendered in this embodiment is an object map containing the character material.

[0040] Step S104, collecting the special effect particle area in the pre-drawn special effect map to obtain a special effect sub-image.

[0041] The above-mentioned pre-drawn special effect map may include one or more special effect particles. When there are multiple special effect particles, the types of the special effect particles may be different. For example, the special effect particles in the special effect map may include special effect particles such as water, fire, fog, gas, meteors, etc. If a virtual object can present multiple effects, in order to facilitate the subsequent generation of special effect maps, the pre-drawn special effect map may include a variety of different special effect particles, so that the special effect particle area can be selected according to actual needs to improve processing efficiency.

[0042] The above-mentioned special effect particle area may be an area containing one special effect particle, and correspondingly, the generated special effect sub-image contains only one special effect particle. The number of special effect sub-images is the same as the number of acquisitions. In order to achieve a random staggered special effect, the number of acquisitions can be multiple, and the number of corresponding special effect sub-images is also multiple. By including only one special effect particle in the special effect sub-image, the subsequent generation of the target special effect image can be more realistic.

[0043] Step S106 : for each special effect sub-image, a target special effect image corresponding to the special effect sub-image is generated according to the UV flow parameters corresponding to the special effect sub-image.

[0044] The above-mentioned UV flow parameters are used to characterize the special effect movement state corresponding to the special effect particles, and the special effect movement state may include the special effect movement speed, the special effect movement angle, the state of the special effect presentation (such as the offset degree of the special effect particles, the size of the special effect particles), etc.

[0045] The UV flow parameters corresponding to each of the above special effect sub-images can be set to different parameters. By setting different UV flow parameters, when multiple target special effect images are superimposed together, the special effects will appear randomly, making the effect presented on the virtual object more realistic and not rigid.

[0046] Step S108, superimposing each target special effect image with the object map to obtain a virtual object with special effects corresponding to the special effect particles.

[0047] When performing overlay processing, you can first determine the area to which special effects are to be added. Since the object map is an image that has been rendered, the selected area is the area on the virtual object with character materials, such as the virtual pendant of the virtual object, the wings of the virtual object, the clothes of the virtual character, etc.

[0048] When superimposing, the target special effect image can be directly superimposed, or the size of the target special effect image can be adjusted according to the area to which the special effect is to be added. In this way, the special effects corresponding to the special effect particles presented on the virtual object obtained after superposition will not have the problem of inappropriate position of the special effects, thereby improving the effect of the special effect display.

[0049] The special effects processing method provided by the embodiment of the present invention can obtain multiple special effects sub-images by collecting the special effects particle area in the special effects map a preset number of times, and generate a target special effects image with a relatively realistic special effects effect according to the UV flow parameters of the special effects sub-images. By superimposing the target special effects image and the object map, a virtual object displaying the real special effects can be obtained, thereby avoiding the separation of the special effects and the virtual objects and improving the display effect of the special effects on the virtual objects.

[0050] In one embodiment, the method can be implemented in a shader. When implemented in a shader, when obtaining an object map of a virtual object to which special effects are to be added, the reflective index map (i.e., albedo map) corresponding to the virtual object to which special effects are to be added can be first obtained, and the reflective index map is texture rendered and color rendered to obtain the object map of the virtual object. The object map of the virtual object obtained is a map with a character material. The use of the special effect particle trailing effect will cause the virtual character and the special effect to be separated. Therefore, the following processing method is used to add special effects to the special effect map of the virtual object.

[0051] In this embodiment, it is necessary to first determine a special effect map. In one implementation, the special effect map includes a background map and at least one special effect particle located in the background map, wherein the background map can be a black map, see Figure 2 The schematic diagram of special effect particles shown in Figure 2 In the example, the special effect particles are special effect particles that realize the meteor effect on the virtual object. By setting the background image to a black background image, the subsequent overlay operation will not affect the overlay effect.

[0052] In addition, the background image can also be set to other colors. When it is set to other colors except black, in order to ensure the overlay effect, the other colors need to be processed into black before overlaying.

[0053] After the step of obtaining the special effect sub-image, the terminal can also respond to the parameter adjustment operation for the special effect sub-image, and determine the UV flow parameters of the special effect sub-image according to the parameter adjustment operation; wherein the UV flow parameters include flow speed, flow direction and offset angle; wherein the offset angle is the offset angle of the starting point and end point of the special effect particle in the screen space coordinate system. For example, for meteor special effect particles, the starting point and end point of the star have a certain offset angle relative to the coordinate axis of the screen space, so that there will be a more realistic meteor falling effect when the special effect is realized; for smoke special effects, the angle of smoke diffusion is also different, so for different smoke special effect particles, the offset angles of different special effect sub-images are set differently, which can make the smoke special effect more realistic. For other special effect particles, the special effects can be improved by setting different UV flow parameters, which will not be repeated here.

[0054] In one embodiment, in order to achieve more realistic special effects on virtual objects, different UV flow parameters can be set for different special effects sub-images collected, so that the flow speed, flow direction, and offset angle of special effects particles in different special effects sub-images are different. By superimposing multiple special effects sub-images, a more random special effects effect can be produced, thereby improving the presentation effect of the special effects and the user's viewing experience of the special effects.

[0055] When collecting the special effect particle area in the pre-drawn special effect map to obtain the special effect sub-image, the special effect particle area can be first determined in the pre-drawn special effect map, and then the special effect map can be sampled according to the preset number of times for the special effect particle area to obtain multiple special effect sub-images corresponding to the preset number of times. The special effect particle area can include an area of ​​a special effect particle, so that multiple special effect sub-images containing a special effect particle can be obtained through multiple collections, so that it is convenient to assign different UV flow parameters to each special effect sub-image in the subsequent process, so as to obtain special effect images with different special effect flows. This method determines the special effect particle area and generates multiple special effect sub-images for the particle area, which is conducive to the subsequent generation of special effect images with more realistic special effect effects and improves the authenticity of the special effects.

[0056] For easier understanding, see Figure 3 As shown, Figure 3 (a) and Figure 3 The dotted box in (b) is the special effect particle area. Different dotted lines represent different flow speeds, and the arrow directions represent different flow directions. In addition, the offset direction of the meteor special effect particles can also be adjusted.

[0057] In order to control the range of special effects on the superimposed virtual character, in one embodiment, when each target special effects image and the object map are superimposed, a special effects mask image corresponding to the object map can be obtained, and the special effects mask image is superimposed with the target special effects image and the object map, thereby determining the range of special effects displayed on the virtual object based on the special effects mask image. Figure 4 A schematic diagram of a special effect mask image is shown in . This method can further improve the randomness of the special effects appearing on the virtual character, and further improve the effect of the special effect display.

[0058] In order to facilitate the operation of artists and improve their flexibility in processing, when each target special effect image is superimposed with the object map to obtain a virtual object with special effects corresponding to the special effect particles, the following two methods can be used:

[0059] Method 1, in response to a first superposition operation on multiple target special effect images, a target special effect map with special effects corresponding to special effect particles is generated; in response to a second superposition operation on the target special effect map and the object map, a virtual object with special effects corresponding to special effect particles is obtained.

[0060] Mode 2, in response to the third superposition operation on each target special effect image and the object map, each target special effect image and the object map are superimposed to obtain a virtual object with special effects corresponding to the special effect particles.

[0061] In order to ensure that the target special effect image and the object map are more realistic after superposition and avoid separation, when superimposing each target special effect image and the object map, each channel of the color space of the target special effect image can be superimposed with the corresponding channel of the color space of the virtual object to obtain a virtual object displaying the special effect.

[0062] This embodiment provides a schematic diagram of a virtual object displaying special effects. Figure 5 As shown, (a), (b), (c), and (d) are schematic diagrams of presenting special effects on virtual objects at different moments. The special effect is a meteor effect, and the location where it appears is on the wings of the virtual object. In actual applications, the location where the special effect appears can be selected from other locations. This is just an example. Figure 5 In a, the meteor is displayed on the right wing of the virtual object (corresponding to the left wing shown in the figure). Figure 5 In b, the meteor is displayed on the left wing of the virtual object (corresponding to the right wing shown in the figure). Figure 5 In c, no meteors are displayed. Figure 5 In d, the meteor is displayed on the left wing of the virtual object and is Figure 5The positions of the meteors in b are different. Since the positions of the special effects on the virtual objects are different at different times, it is more in line with the random characteristics of the meteor special effects, making the effect of the meteor special effects on the virtual objects more realistic.

[0063] In one example, an RGB color space may be selected, and the RGB channel of the target special effect image and the RGB channel of the object map may be added to obtain a virtual object displaying the special effect.

[0064] In one implementation, when the object map is an albedo map and the target special effect image is a meteor map, the meteor map rgb and albedo.rgb can be directly added to obtain a virtual object displaying the special effect.

[0065] In summary, the special effects processing method provided in the embodiment of the present invention can generate a target special effects image with relatively realistic special effects, and can obtain a virtual object that displays real special effects, thereby avoiding the separation of special effects and virtual objects and improving the display effect of special effects on virtual objects.

[0066] In view of the above-mentioned special effect processing method, an embodiment of the present invention provides a special effect processing device, which provides a graphical user interface through a terminal, and the content displayed by the graphical user interface at least includes a virtual object; Figure 6 As shown, the device includes the following parts:

[0067] An acquisition module 602 is used to acquire an object map of a virtual object to which special effects are to be added;

[0068] The acquisition module 604 is used to acquire the special effect particle area in the pre-drawn special effect map to obtain a special effect sub-image; wherein the number of special effect sub-images is the same as the number of acquisitions, and the special effect sub-image contains only one special effect particle;

[0069] The special effect image generation module 606 is used to generate a target special effect image corresponding to each special effect sub-image according to the UV flow parameters corresponding to the special effect sub-image; wherein the UV flow parameters are used to characterize the special effect movement state corresponding to the special effect particles;

[0070] The superposition module 608 is used to perform superposition processing on each target special effect image and the object map to obtain a virtual object with special effects corresponding to the special effect particles.

[0071] The special effects processing device provided by the embodiment of the present invention can obtain multiple special effects sub-images by collecting the special effects particle area in the special effects map a preset number of times, and generate a target special effects image with a relatively realistic special effects effect according to the UV flow parameters of the special effects sub-images. By superimposing the target special effects image and the object map, a virtual object displaying the real special effects can be obtained, thereby avoiding the separation of the special effects and the virtual objects and improving the display effect of the special effects on the virtual objects.

[0072] In some embodiments, the special effect map includes a background image and at least one special effect particle located in the background image; the background image is a black image.

[0073] In some embodiments, the device also includes: a parameter adjustment module, which is used to respond to a parameter adjustment operation on a special effect sub-image, and determine the UV flow parameters of the special effect sub-image according to the parameter adjustment operation; wherein the UV flow parameters include flow speed, flow direction and offset angle; wherein the offset angle is the offset angle of the start point and end point of the special effect particle in the screen space coordinate system.

[0074] In some embodiments, the acquisition module 604 is further used to determine a special effect particle region in a pre-drawn special effect map; for the special effect particle region, the special effect map is sampled a preset number of times to obtain a plurality of special effect sub-images corresponding to the preset number of times.

[0075] In one implementation, the superposition module 608 is further used to: obtain a special effect mask image corresponding to the object map; and determine a display range of the special effect on the virtual object based on the special effect mask image.

[0076] In one embodiment, the above-mentioned overlay module 608 is also used to: generate a target special effect map with special effects corresponding to special effect particles in response to a first overlay operation on multiple target special effect images; and obtain a virtual object with special effects corresponding to special effect particles in response to a second overlay operation on the target special effect map and the object map.

[0077] In one embodiment, the superposition module 608 is further used to: in response to the third superposition operation on each target special effect image and the object map, superimpose each target special effect image and the object map to obtain a virtual object with special effects corresponding to the special effect particles.

[0078] In one implementation, the superposition module 608 is further used to: superimpose each channel of the color space of the target special effect image with the corresponding channel of the color space of the virtual object to obtain a virtual object displaying the special effect.

[0079] In one embodiment, the acquisition module 602 is further used to: acquire a reflective refractive index map corresponding to the virtual object to which special effects are to be added; and perform texture rendering and color rendering on the reflective refractive index map to obtain an object map of the virtual object.

[0080] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0081] An embodiment of the present invention provides a terminal device. Specifically, the terminal device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes any method of the above implementation mode.

[0082] Figure 7 A structural diagram of a terminal device provided for an embodiment of the present invention, the terminal device 100 includes: a processor 70, a memory 71, a bus 72 and a communication interface 73, the processor 70, the communication interface 73 and the memory 71 are connected via the bus 72; the processor 70 is used to execute an executable module stored in the memory 71, such as a computer program.

[0083] The memory 71 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 73 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0084] The bus 72 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 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.

[0085] Among them, the memory 71 is used to store programs, and the processor 70 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any of the embodiments of the above-mentioned embodiments of the present invention can be applied to the processor 70 or implemented by the processor 70.

[0086] The processor 70 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 70. The above processor 70 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. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 71, and the processor 70 reads the information in the memory 71 and completes the steps of the above method in combination with its hardware.

[0087] The computer program product of the special effects processing method, apparatus, terminal device and computer-readable 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 method in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.

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

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

[0090] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it 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, server, or network device, etc.) to perform all or part of the steps of the methods of 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. Various media that can store program codes.

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

[0092] 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 special effect processing method, characterized in that: A graphical user interface is provided by a terminal, wherein the content displayed by the graphical user interface at least includes a virtual object; the method comprises: Obtain an object map of a virtual object to which special effects are to be added; Collecting a special effect particle area in a pre-drawn special effect map to obtain a special effect sub-map; wherein the special effect map includes a background map and at least one special effect particle located in the background map; the background map is a black map, the number of the special effect sub-maps is the same as the number of collections, and the special effect sub-map contains only one special effect particle; For each of the special effect sub-images, a target special effect image corresponding to the special effect sub-image is generated according to the UV flow parameters corresponding to the special effect sub-image; wherein the UV flow parameters are used to characterize the special effect movement state corresponding to the special effect particles; Superimposing each of the target special effect images with the object map to obtain a virtual object with special effects corresponding to the special effect particles; The step of superimposing each of the target special effect images with the object map to obtain a virtual object with special effects corresponding to the special effect particles includes: superimposing each channel of the color space of the target special effect image with the corresponding channel of the color space of the virtual object to obtain a virtual object displaying the special effect.

2. The method according to claim 1, characterized in that After the step of obtaining the special effect sub-image, the method further comprises: In response to a parameter adjustment operation on the special effect sub-image, UV flow parameters of the special effect sub-image are determined according to the parameter adjustment operation; wherein the UV flow parameters include flow speed, flow direction and offset angle; wherein the offset angle is an offset angle between a start point and an end point of the special effect particle in a screen space coordinate system.

3. The method according to claim 1, characterized in that: The step of collecting the special effect particle area in the pre-drawn special effect map to obtain the special effect sub-image includes: Determine the special effect particle area in the pre-drawn special effect map; For the special effect particle area, the special effect map is sampled according to a preset number of times to obtain a plurality of special effect sub-images corresponding to the preset number of times.

4. The method according to claim 1, characterized in that The step of superimposing each of the target special effect images with the object map comprises: Obtaining a special effects mask image corresponding to the object map; The range in which the special effect is displayed on the virtual object is determined based on the special effect mask image.

5. The method according to claim 1, characterized in that The step of superimposing each of the target special effect images with the object map to obtain a virtual object with special effects corresponding to the special effect particles comprises: In response to a first superposition operation on a plurality of the target special effect images, generating a target special effect map with special effects corresponding to the special effect particles; In response to a second superposition operation on the target special effect map and the object map, a virtual object with special effects corresponding to the special effect particles is obtained.

6. The method according to claim 1, characterized in that The step of superimposing each of the target special effect images with the object map to obtain a virtual object with special effects corresponding to the special effect particles comprises: In response to the third superposition operation on each of the target special effect images and the object map, each of the target special effect images and the object map is superimposed to obtain a virtual object with a special effect corresponding to the special effect particle.

7. The method according to claim 1, characterized in that The step of obtaining an object map of a virtual object to which special effects are to be added comprises: Obtain the reflective refractive index map corresponding to the virtual object to which the special effect is to be added; Texture rendering and color rendering are performed on the reflected refractive index map to obtain an object map of the virtual object.

8. A special effect processing device, characterized in that: A graphical user interface is provided through a terminal, and the content displayed by the graphical user interface at least includes a virtual object; the device comprises: An acquisition module, used to acquire an object map of a virtual object to which special effects are to be added; A collection module, used for collecting a special effect particle area in a pre-drawn special effect map to obtain a special effect sub-image; wherein the special effect map includes a background image and at least one special effect particle located in the background image; the background image is a black image, the number of the special effect sub-images is the same as the number of collection times, and the special effect sub-image contains only one special effect particle; A special effect image generation module, for each of the special effect sub-images, generating a target special effect image corresponding to the special effect sub-image according to a UV flow parameter corresponding to the special effect sub-image; wherein the UV flow parameter is used to characterize a special effect movement state corresponding to the special effect particle; A superposition module, used for superimposing each of the target special effect images with the object map to obtain a virtual object with special effects corresponding to the special effect particles; The superposition module is further used to superimpose each channel of the color space of the target special effect image with the channel corresponding to the color space of the virtual object to obtain a virtual object displaying a special effect.

9. A terminal device, characterized in that: A processor and a storage device; the storage device stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is executed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video processing method and device, electronic equipment and storage medium

    CN113160244A

  • Special effect verification method and device and electronic equipment

    CN113706371A