Layer processing method and device, storage medium and electronic device
By using multi-layer processing methods, including masking and overlaying of mask layers, edge shape adjustment, and shading layers, the problems of low fun and poor scalability of virtual object disappearance effects are solved, achieving more aesthetically pleasing and diverse effect simulations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2026-04-07
AI Technical Summary
The appearance and disappearance effects of virtual objects in existing technologies are not very interesting and have poor scalability, making it difficult to replicate the effect to another virtual object.
By generating multiple layers, including a mask layer with a preset shape, an edge shape adjustment layer, and a gradient layer with a preset color, masking and overlay processing is performed to simulate the appearance and disappearance effects of virtual objects.
It enhances the fun and scalability of the appearance and disappearance effects of virtual objects, achieving more aesthetically pleasing and diverse effect simulations.
Smart Images

Figure CN115375797B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer technology and image processing, in particular to a layer processing method and device, a storage medium and an electronic device. BACKGROUND
[0002] In an application scenario of image processing using a computer (for example, a virtual game scene design), the appearance and disappearance effects of a virtual object are often involved. In the related art, the appearance and disappearance effects of a virtual object mainly include erasing types (for example, erasing appearance and erasing disappearance) and transparency types (for example, transparency weakening appearance and transparency gradual strengthening disappearance). However, the appearance and disappearance effects of the erasing types or the transparency types have the following disadvantages: low interest; low efficiency, poor scalability, and difficulty in replicating the appearance and disappearance effects of one virtual object to another different virtual object.
[0003] At present, no effective solution has been proposed for the above problems.
[0004] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present application, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] The embodiments of the present application provide a layer processing method and device, a storage medium and an electronic device to at least solve the technical problem of low interest and poor scalability caused by using erasing types or transparency types to simulate the appearance and disappearance of a virtual object in the related art.
[0006] According to an aspect of an embodiment of the present application, a layer processing method is provided, comprising:
[0007] generating a second layer based on a first layer and an original material, wherein the first layer is a mask layer of a preset shape, and the second layer is used to display a fusion result of the first layer and the original material; performing mask processing on a plurality of second layers at different time points to obtain a third layer, wherein the third layer is used to display an edge shape adjustment result of the second layer; generating a fifth layer based on the third layer and a fourth layer, wherein the fourth layer is a mask layer of a preset color, and the fifth layer is used to display a corresponding halo state of the original material; and performing superimposition processing on the second layer, the third layer and the fifth layer to obtain a target superimposition result, wherein the target superimposition result is used to simulate the appearance and / or disappearance of a corresponding virtual object of the original material.
[0008] According to another aspect of an embodiment of the present application, a layer processing device is also provided, comprising:
[0009] The first processing module is configured to generate a second layer based on the first layer and the original material, wherein the first layer is a mask layer of a preset shape, and the second layer is used to display a fusion result of the first layer and the original material; the second processing module is configured to perform mask processing on the second layers of the plurality of different time points to obtain a third layer, wherein the third layer is used to display an edge form adjustment result of the second layer; the third processing module is configured to generate a fifth layer based on the third layer and a fourth layer, wherein the fourth layer is a mask layer of a preset color, and the fifth layer is used to display a corresponding halo state of the original material; and the fourth processing module is configured to perform superimposition processing on the second layer, the third layer and the fifth layer to obtain a target superimposition result, wherein the target superimposition result is used to simulate appearance and / or disappearance of a virtual object corresponding to the original material.
[0010] According to another aspect of the embodiments of the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. The computer program is configured to execute the layer processing method in any of the above aspects when running.
[0011] According to another aspect of the embodiments of the present application, an electronic device is also provided, and the electronic device comprises a memory and a processor. The memory stores a computer program, and the processor is configured to execute the layer processing method in any of the above aspects by running the computer program.
[0012] In at least some embodiments of the present application, a second layer is generated based on a first layer and an original material, wherein the first layer is a mask layer of a preset shape, and the second layer is used to display a fusion result of the first layer and the original material. A third layer is obtained by performing mask processing on the second layers of a plurality of different time points, wherein the third layer is used to display an edge form adjustment result of the second layer. A fifth layer is generated based on the third layer and a fourth layer, wherein the fourth layer is a mask layer of a preset color, and the fifth layer is used to display a corresponding halo state of the original material. A target superimposition result is obtained by performing superimposition processing on the second layer, the third layer and the fifth layer, wherein the target superimposition result is used to simulate appearance and / or disappearance of a virtual object corresponding to the original material. The technical effect of improving the interestingness and expandability of the virtual object appearance and disappearance effect simulation process is achieved, and the technical problem of low interestingness and poor expandability caused by using erasing or transparency methods to simulate the appearance and disappearance of the virtual object in the related art is solved. BRIEF DESCRIPTION OF DRAWINGS
[0013] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
[0014] Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal according to an embodiment of the present application;
[0015] Figure 2 FIG. 2 is a flowchart of a layer processing method according to an embodiment of the present application;
[0016] Figure 3 FIG. 3 is a schematic diagram of an optional first layer according to an embodiment of the present application;
[0017] Figure 4 FIG. 4 is a schematic diagram of an optional sixth layer according to an embodiment of the present application;
[0018] Figure 5 FIG. 5 is a schematic diagram of an optional original material according to an embodiment of the present application;
[0019] Figure 6 FIG. 6 is a schematic diagram of an optional second layer according to an embodiment of the present application;
[0020] Figure 7 FIG. 7 is a schematic diagram of an optional third layer according to an embodiment of the present application;
[0021] Figure 8 FIG. 8 is a schematic diagram of an optional result of particle emission on a fourth layer according to an embodiment of the present application;
[0022] Figure 9 FIG. 9 is a schematic diagram of an optional seventh layer according to an embodiment of the present application;
[0023] Figure 10 FIG. 10 is a schematic diagram of an optional eighth layer according to an embodiment of the present application;
[0024] Figure 11 FIG. 11 is a schematic diagram of an optional fifth layer according to an embodiment of the present application;
[0025] Figure 12 FIG. 12 is a schematic diagram of an optional initial superimposition result according to an embodiment of the present application;
[0026] Figure 13 FIG. 13 is a schematic diagram of an optional target superimposition result according to an embodiment of the present application;
[0027] Figure 14 FIG. 14 is a structure block diagram of a layer processing apparatus according to an embodiment of the present application;
[0028] Figure 15 is a structural block diagram of an optional layer processing device according to an embodiment of the present application;
[0029] Figure 16 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.
[0031] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0032] According to an embodiment of the present application, an embodiment of a layer processing method is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.
[0033] The layer processing method in one embodiment of the present application can run on a terminal device or a server. The terminal device can be a local terminal device. When the layer processing method runs on the 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.
[0034] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of layer processing methods are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the terminal device for information processing is the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0035] In an alternative implementation, the terminal device can be a local terminal device. Taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally downloading, installing, and running the game program via an electronic device. The local terminal device can provide the graphical user interface to the player in various ways, such as rendering it on the terminal's display screen, or providing it to the player through holographic projection. For example, the local terminal device can include a display screen for displaying the graphical user interface, which includes game screens, and a processor for running the game, generating the graphical user interface, and controlling the display of the graphical user interface on the display screen.
[0036] In one possible implementation, the present invention provides a layer processing method that provides a graphical user interface through a terminal device, wherein the terminal device may be the aforementioned local terminal device or a client device in the aforementioned cloud interaction system.
[0037] Taking a mobile terminal running on a local terminal device as an example, the mobile terminal can be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet Device (MID), a PAD, a game console, and other terminal devices. Figure 1 This is a hardware structure block diagram of a mobile terminal for a layer processing method according to an embodiment of the present invention. For example... Figure 1 As shown, a mobile terminal may include one or more ( Figure 1The mobile terminal shown in FIG. 1 includes only one processor 102 (the processor 102 can include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.), and a memory 104 for storing data. Optionally, the above mobile terminal can also include a transmission device 106 for communication function, an input / output device 108, and a display device 110. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, and does not limit the structure of the above mobile terminal. For example, the mobile terminal can include more or fewer components than those shown, or have a different configuration of components than those shown. Figure 1 The structure shown is only schematic, and does not limit the structure of the above mobile terminal. For example, the mobile terminal can include more or fewer components than those shown, or have a different configuration of components than those shown. Figure 1 The structure shown is only schematic, and does not limit the structure of the above mobile terminal. For example, the mobile terminal can include more or fewer components than those shown, or have a different configuration of components than those shown.
[0038] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the layer processing method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, i.e., implements the above layer processing method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the mobile terminal through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0039] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network can include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
[0040] The input in the input / output device 108 can come from a plurality of human interface devices (HIDs). For example: keyboard and mouse, gamepad, other special game controllers (such as steering wheel, fishing rod, dance pad, remote controller, etc.). Some human interface devices can provide not only input function but also output function, for example: force feedback and vibration of gamepad, audio output of controller, etc.
[0041] The display device 110 can be, for example, a heads-up display (HUD), a liquid crystal display (LCD) with touch screen, and a touch display (also referred to as "touch screen" or "touch display screen"). The liquid crystal display can enable a user to interact with a user interface of the mobile terminal. In some embodiments, the above-mentioned mobile terminal has a graphical user interface (GUI), and a user can interact with the GUI through finger contact and / or gestures on a touch-sensitive surface. The human-computer interaction function can optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, gaming, video conferencing, instant messaging, sending and receiving emails, call interface, playing digital videos, playing digital music, and / or web browsing, etc. Executable instructions for performing the above-mentioned human-computer interaction functions are configured / stored in one or more computer program products or readable storage media executable by a processor.
[0042] The layer processing method in one embodiment of the present application can run on a local terminal device or a server. When the layer processing method runs on the 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.
[0043] In an optional embodiment, various cloud applications can run under the cloud interaction system, for example: cloud gaming. Taking cloud gaming as an example, cloud gaming refers to a game mode based on cloud computing. In the running mode of cloud gaming, the running body of the game program and the presentation body of the game picture are separated, and the storage and running of the layer processing method are completed on the cloud gaming server. The client device is used for receiving and sending data and presenting the game picture. For example, the client device can be a display device close to the user side with data transmission function, such as mobile terminal, television, computer, palm computer, etc.; but the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation instructions to the cloud gaming server, the cloud gaming server runs the game according to the operation instructions, encodes and compresses the game picture and other data, returns the data to the client device through the network, and finally decodes and outputs the game picture through the client device.
[0044] In an optional embodiment, taking a game as an example, the local terminal device stores a game program and is configured to present a game picture. The local terminal device is configured to interact with a player through a graphical user interface, i.e., a conventional game program is downloaded and installed through an electronic device and is run. The local terminal device can provide the graphical user interface to the player in various ways, for example, the graphical user interface can be rendered and displayed on a display screen of the terminal, or the graphical user interface can be provided to the player through holographic projection. For example, the local terminal device can include a display screen configured to present a graphical user interface including a game picture, and a processor configured to run the game, generate the graphical user interface, and control display of the graphical user interface on the display screen.
[0045] In a possible embodiment, the embodiment of the present application provides a layer processing method for providing a graphical user interface through a terminal device. The terminal device can be the aforementioned local terminal device or the aforementioned client device in the cloud interaction system. Figure 2 is a flowchart of a layer processing method according to an embodiment of the present application, as shown in Figure 2 The method includes the following steps:
[0046] In step S21, a second layer is generated based on a first layer and an original material, where the first layer is a mask layer of a preset shape, and the second layer is configured to display a fusion result of the first layer and the original material.
[0047] The first layer is a mask layer of a preset shape. In an actual application scenario, the preset shape can be specified by a technician according to scene requirements as a regular shape such as a circle, a rectangle, a triangle, and a pentagram, or as an irregular shape determined by an outer contour of a virtual object corresponding to the original material.
[0048] The original material can be a computer image material for displaying a virtual object in a virtual scene, which is pre-produced by an art personnel. In an actual application scenario, the original material can be given in the form of a vector graphic, a picture, and a digital asset.
[0049] The second layer can be a layer generated based on the first layer and the original material. The second layer can be configured to display a fusion effect of the first layer and the original material. For example, the fusion effect can be a superimposition effect, and the second layer can be configured to display the original material in a display area determined by the preset shape corresponding to the first layer.
[0050] Specifically, the step of generating the second layer based on the first layer and the original material further includes other method steps, which can be referred to the further description of the embodiments of the present application below, and will not be described here.
[0051] Step S22, performing mask processing on the second layers of the plurality of different time points to obtain a third layer, wherein the third layer is used to display the edge form adjustment result of the second layer.
[0052] The plurality of different time points can be a plurality of different time points in the appearing and / or disappearing process of the virtual object. The second layers corresponding to the plurality of different time points can be used to display different fusion results of the first layer and the original material.
[0053] The third layer can be a layer obtained by performing mask processing on the second layers of the plurality of different time points. The third layer is used to display the edge form adjustment result of the second layer. For example, the mask processing can be a strobe superimposition processing, the third layer can be used to display the edge form adjustment result determined by the plurality of different fusion results of the first layer and the original material, and the edge form adjustment result can be a result of form adjustment on the edge of the display area corresponding to the appearing and / or disappearing of the virtual object.
[0054] Specifically, performing mask processing on the second layers of the plurality of different time points to obtain a third layer further includes other method steps, which can be referred to the further introduction of the embodiments of the present application below, and will not be described here.
[0055] Step S23, generating a fifth layer based on the third layer and a fourth layer, wherein the fourth layer is a mask layer of a preset color, and the fifth layer is used to display a blooming state corresponding to the original material;
[0056] The fourth layer can be a mask layer of a preset color. In actual application scenarios, the preset color can be determined by a technician according to scene requirements, or can be determined according to the preference of a user for the appearing and / or disappearing effect of a virtual object.
[0057] The fifth layer can be a layer generated based on the third layer and the fourth layer, and the fifth layer can be used to display a blooming state corresponding to the original material. In actual application scenarios, the blooming state can be a dynamic change state (such as the appearing and disappearing state of oil painting pigment style, the appearing and disappearing state of ink blooming style, etc.) in the appearing and / or disappearing process of the original material.
[0058] Specifically, generating a fifth layer based on the third layer and the fourth layer further includes other method steps, which can be referred to the further introduction of the embodiments of the present application below, and will not be described here.
[0059] Step S24, performing superimposition processing on the second layer, the third layer and the fifth layer to obtain a target superimposition result, wherein the target superimposition result is used to simulate the appearing and / or disappearing of the virtual object corresponding to the original material.
[0060] The second layer is used to display the fusion effect of the first layer (preset shape mask layer) and the original material, the third layer is used to display the edge shape adjustment result of the second layer, and the fifth layer is used to display the corresponding halo state of the original material. Superimposition processing is performed on the second layer, the third layer and the fifth layer to obtain a target superimposition result used to simulate the appearance and / or disappearance of a virtual object corresponding to the original material.
[0061] Specifically, the superimposition processing of the second layer, the third layer and the fifth layer to obtain the target superimposition result further includes other method steps, which can be referred to the further introduction of the embodiments of the present application below, and will not be described here.
[0062] For example, when making the appearance effect template and / or the disappearance effect template of the virtual object A, the method provided by the embodiments of the present application can be used. Specifically, by controlling the second layer, the display mode of the fusion effect of the first layer and the original material can be further controlled, and then the appearance and / or disappearance of the virtual object A can be controlled. For example, adding the zoom attribute from nothing to something to the second layer can obtain the appearance effect of the virtual object A; adding the zoom attribute from something to nothing to the second layer can obtain the disappearance effect of the virtual object A; adding the zoom attribute from nothing to something and the zoom attribute from something to nothing to the second layer can respectively obtain the appearance effect and the disappearance effect of the virtual object A.
[0063] Taking making the appearance and disappearance effect templates of the virtual object A as an example, the making process of the appearance and disappearance effect templates is further described. Three layers are made for the virtual object A: a material mask layer Layer2 (equivalent to the second layer), a material outline layer Layer3 (equivalent to the third layer) and a halo layer Layer5 (equivalent to the fifth layer); then the material mask layer Layer2, the material outline layer Layer3 and the halo layer Layer5 are superimposed, and the appearance and disappearance effect templates of the virtual object A (equivalent to the target superimposition result) are obtained, which are recorded as Template_A.
[0064] Specifically, still taking making the appearance and disappearance effect templates of the virtual object A as an example, making the material mask layer Layer2 (equivalent to the second layer) includes: using a preset graphic design software to make a mask layer Mask1 (equivalent to the first layer), and a shape edge designed by a technician is displayed in the mask layer Mask1 (equivalent to the preset shape); obtaining the original material MA corresponding to the virtual object A; mapping the shape edge corresponding to the mask layer Mask1 to the original material MA to obtain the material mask layer Layer2. The material mask layer Layer2 can be used to display the fusion effect of the original material MA and the shape edge.
[0065] Specifically, still taking the virtual object A as an example, the production of the appearing and disappearing effect template includes: obtaining a plurality of different material mask layers Layer2 corresponding to a plurality of different time points; and performing mask processing on the plurality of different material mask layers Layer2 to obtain the material outline layer Layer3.
[0066] Specifically, still taking the virtual object A as an example, the production of the appearing and disappearing effect template includes: obtaining a plurality of different material mask layers Layer2 corresponding to a plurality of different time points; and performing mask processing on the plurality of different material mask layers Layer2 to obtain the material outline layer Layer3.
[0067] It should be noted that the target superimposition effect can be used as an appearing and disappearing effect template of a virtual object, which is associated with an original material, a preset shape mask layer and a preset color mask layer. The target superimposition effect can be adjusted by changing the preset shape mask layer and the preset color mask layer, and the appearing and disappearing effect template can be applied to a virtual object corresponding to the changed original material by changing the original material. Therefore, the method is beneficial to improve the interestingness and expandability of the virtual object appearing and disappearing effect simulation process.
[0068] In at least some embodiments of the present application, a second layer is generated based on a first layer and an original material, wherein the first layer is a preset shape mask layer, the second layer is used to display the fusion result of the first layer and the original material, a third layer is obtained by performing mask processing on the second layer at a plurality of different time points, wherein the third layer is used to display the edge shape adjustment result of the second layer, and a fifth layer is generated based on the third layer and a fourth layer, wherein the fourth layer is a preset color mask layer, and the fifth layer is used to display the shading state of the original material. The target superimposition result is obtained by superimposing the second layer, the third layer and the fifth layer, wherein the target superimposition result is used to simulate the appearance and / or disappearance of a virtual object corresponding to the original material. The technical effect of improving the interestingness and expandability of the virtual object appearing and disappearing effect simulation process is achieved, and the technical problem of low interestingness and poor expandability caused by using the erasing or transparency method to simulate the appearance and disappearance of the virtual object in the related art is solved.
[0069] The above method of the embodiments of the present application will be further introduced below.
[0070] Optionally, in step S21, generating the second layer based on the first layer and the original material can include the following execution steps:
[0071] In step S211, performing offset processing on the first layer to obtain a sixth layer, wherein the sixth layer is used to display the edge texture adjustment result of the first layer.
[0072] In step S212, performing fusion processing on the sixth layer and the original material based on the mask cover attribute of the original material to obtain the second layer.
[0073] The first layer is a mask layer of a preset shape. Figure 3 is a schematic diagram of an optional first layer according to an embodiment of the present application, as Figure 3 indicated, the preset shape can be a regular shape (in this example, a circle), however, the appearance and / or disappearance effect of a virtual object made based on a regular shape has lower aesthetic and interesting degree. Performing offset processing on the first layer can obtain the sixth layer, which is used to display the edge texture adjustment result of the preset shape edge of the first layer.
[0074] The offset processing can include adding an offset command (for example, a random offset command) to the first layer to obtain the sixth layer. Specifically, the offset command can be a turbulent replacement command, in which the following parameters can be set: turbulent replacement quantity parameter, turbulent replacement size parameter, turbulent replacement offset parameter (including offset component parameters in two perpendicular directions), turbulent replacement complexity parameter, and turbulent evolution parameter, etc. Through the setting of these parameters in the turbulent command, the adjustment size and adjustment density of the edge texture corresponding to the first layer can be controlled.
[0075] Figure 4 is a schematic diagram of an optional sixth layer according to an embodiment of the present application, as Figure 4 indicated, after random offset processing, the regular shape edge corresponding to the first layer can be adjusted to an irregular shape edge, which is beneficial to improve the aesthetic and interesting degree of the appearance and disappearance effect of the virtual object.
[0076] Figure 5 is a schematic diagram of an optional original material according to an embodiment of the present application, Figure 6 is a schematic diagram of an optional second layer according to an embodiment of the present application. Based on the mask cover attribute of the original material as Figure 5 indicated, performing fusion processing on the sixth layer as Figure 4 indicated and the original material as Figure 5 indicated can obtainFigure 6 The second layer shown.
[0077] Specifically, the fusion processing of the sixth layer and the original material to obtain the second layer can be: adding the original material as shown in Figure 5 to the layer channel (such as the alpha channel) of the sixth layer as shown in Figure 4 to obtain a fusion result; and then grouping the fusion result can obtain the second layer as shown in Figure 6
[0078] Optionally, the layer processing method can further include the following execution steps:
[0079] Step S25, configuring a scaling attribute and a key frame for the first layer to obtain a configuration result, wherein the scaling attribute is used to represent a display change trend of the virtual object, and the display change trend includes one of the following: the virtual object changes from appearing to disappearing, and the virtual object changes from disappearing to appearing; and the key frame is used to generate an animation corresponding to the scaling attribute.
[0080] The scaling attribute can be used to represent the display change trend of the virtual object. The display change trend can be that the virtual object changes from appearing to disappearing, and at this time the scaling attribute can be used to determine that the preset shape corresponding to the first layer changes from large to small; the display change trend can also be that the virtual object changes from disappearing to appearing, and at this time the scaling attribute can be used to determine that the preset shape corresponding to the first layer changes from small to large.
[0081] The key frame can be used to generate an animation corresponding to the scaling attribute. The key frame configured for the first layer can be a plurality of key frames. The configuration position of each key frame in the plurality of key frames on the first layer can be used to determine the speed of the animation corresponding to the scaling attribute (which can be the speed of the appearance of a plurality of materials in the animation).
[0082] Configuring the scaling attribute and the key frame for the first layer can obtain the configuration result. The configuration result can determine an animation corresponding to the virtual object changing from appearing to disappearing, or can determine an animation corresponding to the virtual object changing from disappearing to appearing.
[0083] Optionally, in step S22, the plurality of different time instants include: a first time instant and a second time instant, the first time instant is earlier than the second time instant, and the mask processing of the second layer at the plurality of different time instants can include the following execution steps:
[0084] Step S221, performing the mask processing on the second layer at the first time instant and the second layer at the second time instant by using the frame difference to obtain the third layer.
[0085] The aforementioned multiple different moments can be multiple different moments within the animation duration corresponding to the scaling property of the first layer. The first moment among these multiple moments can be at least one moment, and the second moment among these multiple moments can be at least one moment, with the first moment preceding the second moment.
[0086] By using a masking process with the second layer of the first time step and the second layer of the second time step at different frame intervals, a third layer can be obtained. For example, if the first time step is 4 frames earlier than the second time step, a masking process (such as overlay processing) can be performed using the second layer of the first time step and the second layer of the second time step to obtain the masking result; then, the masking result can be grouped to obtain the third layer with frame error processing.
[0087] Figure 7 This is a schematic diagram of an optional third layer according to one embodiment of the present invention, such as... Figure 7 As shown, after analyzing multiple different times, such as Figure 6 The second layer shown is masked to make the frame misalignment more dynamic, which can enhance the aesthetics and fun of the virtual object appearance and / or disappearance effects.
[0088] Optionally, in step S23, generating the fifth layer based on the third and fourth layers may include the following steps:
[0089] Step S231: Configure particle emission parameters for the fourth layer based on the third layer to obtain the seventh layer, wherein the seventh layer is used to display the image smoothness adjustment result of the fourth layer;
[0090] Step S232: Apply highlight processing to the seventh layer to obtain the eighth layer, whereby the eighth layer is used to display the image volume and light adjustment results of the seventh layer.
[0091] Step S233: Overlay the seventh and eighth layers to obtain the fifth layer.
[0092] The third layer mentioned above is used to display the edge shape adjustment results of the second layer, and the fourth layer mentioned above is a mask layer with a preset color. Based on the third layer, the particle emission parameters of the fourth layer are configured to obtain a seventh layer used to display the image smoothness adjustment results of the fourth layer.
[0093] Optionally, in step S231, configuring the particle emission parameters of the fourth layer based on the third layer to obtain the seventh layer may include the following steps:
[0094] Step S2311: Based on the third layer, configure the emitter type of the particle emitter corresponding to the fourth layer as layer mode;
[0095] Step S2312, in the layer mode, set the third layer as the particle emission source of the fourth layer;
[0096] Step S2313, determine the particle color corresponding to the fourth layer by using the particle emission source, and obtain the seventh layer.
[0097] The particle emitter corresponding to the fourth layer can be a particle emission instruction or a particle emission model in a preset graphic design software. Based on the third layer, the emitter type of the particle emitter corresponding to the fourth layer can be configured as a layer mode. The emitter type is used to determine the manner of emitting particles (such as the number of particles, the angle of emission, the speed of emission, and the position of emission) of the particle emitter. The layer mode is used to determine that the emission source of the particle emitter is a layer.
[0098] In the layer mode, the third layer is set as the particle emission source of the particle emitter. Further, the particle color corresponding to the fourth layer can be determined by using the particle emission source, and then the seventh layer for displaying the softness adjustment result of the fourth layer is obtained.
[0099] The high light processing is performed on the seventh layer to obtain the eighth layer for displaying the result of the adjustment of the sense of body and the sense of light of the seventh layer. Further, the superimposition processing is performed on the seventh layer and the eighth layer to obtain the fifth layer for displaying the state of the halo of the original material.
[0100] Figure 8 is a schematic diagram of the result of the particle emission of the fourth layer according to an embodiment of the present application. As shown in Figure 8 The particle emission process corresponding to the particle emission result includes: creating a solid color layer (equivalent to the fourth layer) of a preset color; configuring the particle emitter of the fourth layer; setting the third layer as shown in Figure 7 the particle emission source of the particle emitter of the fourth layer; and performing the particle emission on the fourth layer by using the configured particle emitter.
[0101] Specifically, configuring the particle emitter of the fourth layer includes: setting the number of particles emitted by the particle emitter (which can be determined by a technician according to an application scenario, and in this example, the number is set to 450000); and setting the emitter type of the particle emitter as the layer mode.
[0102] The particle emitter for configuring the fourth layer further includes, but is not limited to, setting a category of emission behavior of the particle emitter (in this case, continuous emission is set), setting a light effect of the particle emitter, setting an emission direction of the particle emitter (such as uniformly designated direction, random emission direction, etc.), setting a particle emission speed of the particle emitter (including emission speed value, emission speed random type, emission speed distribution, emission speed from motion parameter, emitter size), setting a layer sampling category corresponding to the particle emitter, setting a layer channel usage mode corresponding to the particle emitter, and setting an emission evolution parameter of the particle emitter (including pre-run parameter, period parameter, light independent seed parameter, etc.).
[0103] Specifically, in the process of performing particle emission on the fourth layer using the configured particle emitter, the following adjustment operations can be performed: using a disturbance tool or a disturbance model to add disturbance to the particle emission source of the particle emitter to improve the dynamic randomness of the particles; using a particle auxiliary system to determine the color of the particles emitted by the particle emitter. Based on the operation results of the above adjustment operations, particle emission can be performed on the fourth layer to obtain a particle emission result as shown in Figure 8
[0104] The above-mentioned adding disturbance to the particle emission source of the particle emitter can include setting the following parameters in the disturbance model: physical mode of disturbance; physical time scale parameter; air influence parameter (including motion path, air resistance, resistance rotation type, spin amplitude, spin frequency, rotation disappearance time parameter, wind direction parameter, visual domain field parameter, and turbulent field parameter).
[0105] The above-mentioned using a particle auxiliary system to determine the color of the particles emitted by the particle emitter can include setting the following parameters in the particle auxiliary system: particle emission type (in this case, continuous emission is set); particle emission probability (in this case, 100% is set); particle emission frequency (in this case, 100 per second is set); particle life (in this case, 1 second is set); start / stop particle emission time parameter; particle speed; inherit subject speed; life random parameter; feathering parameter; particle emission random parameter (such as size random parameter, particle size change with life parameter, rotation random parameter, and transparency random parameter). By setting multiple parameters of the particle auxiliary system, the particle emitter can determine the color of the corresponding particles according to the material stroke of the third layer corresponding to the particle emission source.
[0106] Figure 9 is a schematic diagram of an optional seventh layer according to an embodiment of the present application. Based on the particle emission result as shown in Figure 8 , the image softness of the layer corresponding to the particle emission result (i.e., the fourth layer after emitting particles) is adjusted by vector blur processing, the graininess of the layer is reduced, and a result as shown in Figure 9 The seventh layer shown.
[0107] Figure 10 This is a schematic diagram of an optional eighth layer according to one embodiment of the present invention. (Copy as shown) Figure 9 The seventh layer shown; perform highlight processing on the copied seventh layer (such as increasing exposure, increasing brightness, adjusting color curves, etc.) to enhance the light effect of the particle effect corresponding to the seventh layer; sharpen the highlight processing result to enhance the sense of volume of the particle effect corresponding to the seventh layer, thus obtaining the following... Figure 10 The eighth layer shown.
[0108] Figure 11 This is a schematic diagram of an optional fifth layer according to one embodiment of the present invention. (The image is shown below.) Figure 9 The seventh layer shown is as follows Figure 10 By overlaying and grouping the eighth layer shown, we can obtain the following: Figure 11 The fifth layer shown. This fifth layer is used to display the shading state corresponding to the original material.
[0109] Optionally, in step S24, the overlay process of the second layer, the third layer, and the fifth layer to obtain the target overlay result may include the following steps:
[0110] Step S241: Overlay the second, third, and fifth layers to obtain the initial overlay result;
[0111] Step S242: Perform layer replacement processing on the initial overlay result to obtain the target overlay result.
[0112] The second layer is used to display the blending effect between the first layer (the mask layer with the preset shape) and the original material. The third layer is used to display the edge shape adjustment result of the second layer. The fifth layer is used to display the shading state corresponding to the original material. By overlaying the second, third, and fifth layers, an initial overlay result can be obtained.
[0113] Furthermore, by performing layer displacement processing on the initial overlay result, a target overlay result can be obtained to simulate the appearance and / or disappearance of the virtual object corresponding to the original material.
[0114] Figure 12 This is a schematic diagram of an optional initial superposition result according to one embodiment of the present invention. (The diagram is as follows...) Figure 6 The second layer shown, as Figure 7 The third layer shown and as Figure 11 After overlaying the fifth layer as shown, the result is as follows: Figure 12 The initial overlay result shown has low image detail.
[0115] Figure 13 is a schematic diagram of an optional target overlay result according to an embodiment of the present application. By performing a displacement layer processing on the initial overlay result as shown in Figure 12 , a target overlay result as shown in Figure 13 may be obtained. Specifically, the displacement layer processing can be adding a displacement layer command to the fifth layer in the initial overlay result as shown in Figure 12 . In the displacement layer command, parameters such as layer horizontal displacement category, maximum horizontal displacement parameter, layer vertical displacement category, maximum vertical displacement parameter, displacement map characteristic parameter and edge characteristic parameter can be set.
[0116] It is easy to note that, by the above method provided by the embodiments of the present application, the original material corresponding to the virtual object is adjusted by multiple layers, masked and overlaid to simulate the appearance and / or disappearance of the virtual object. Thus, the technical effect of improving the interestingness and expandability of the simulation process of the appearance and disappearance of the virtual object is achieved.
[0117] It is easy to note that, according to the above method provided by the embodiments of the present application, the appearance and / or disappearance effect template of the virtual object can be adjusted by changing the mask layer of the preset shape and the mask layer of the preset color, and the appearance and / or disappearance effect template can be applied to the virtual object corresponding to the changed original material by changing the original material. Therefore, the above method has strong controllability for the appearance and / or disappearance effect of the virtual object, and is beneficial to reduce the difficulty and cost of effect replication.
[0118] Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and a general hardware platform as necessary, and of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present application.
[0119] In the present embodiment, a layer processing device is also provided, which is used to implement the above embodiments and preferred embodiments, and has been described above and will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.
[0120] Figure 14 This is a structural block diagram of a layer processing apparatus according to one embodiment of the present invention, such as... Figure 5 As shown, the device includes: a first processing module 1401, used to generate a second layer based on a first layer and the original material, wherein the first layer is a mask layer of a preset shape, and the second layer is used to display the fusion result of the first layer and the original material; a second processing module 1402, used to perform masking processing on the second layer at multiple different times to obtain a third layer, wherein the third layer is used to display the edge shape adjustment result of the second layer; a third processing module 1403, used to generate a fifth layer based on the third layer and the fourth layer, wherein the fourth layer is a mask layer of a preset color, and the fifth layer is used to display the bleed state corresponding to the original material; and a fourth processing module 1404, used to perform overlay processing on the second layer, the third layer and the fifth layer to obtain a target overlay result, wherein the target overlay result is used to simulate the appearance and / or disappearance of the virtual object corresponding to the original material.
[0121] Optionally, the first processing module 1401 described above is further configured to: perform offset processing on the first layer to obtain a sixth layer, wherein the sixth layer is used to display the edge texture adjustment result of the first layer; and perform fusion processing on the sixth layer and the original material based on the masking properties of the original material to obtain a second layer.
[0122] Optionally, Figure 15 This is a structural block diagram of an optional layer processing apparatus according to one embodiment of the present invention, such as... Figure 15 As shown, the device includes, in addition to Figure 14 In addition to all the modules shown, it also includes: a configuration module 1405, which is used to configure scaling attributes and keyframes for the first layer and obtain the configuration result. The scaling attributes are used to represent the display change trend of the virtual object. The display change trend includes one of the following: the virtual object changes from appearance to disappearance, or the virtual object changes from disappearance to appearance. The keyframes are used to generate the animation corresponding to the scaling attributes.
[0123] Optionally, the multiple different times include: a first time and a second time, where the first time is earlier than the second time. The second processing module 1402 is further used to: perform masking processing on the second layer at multiple different times to obtain a third layer, including: performing masking processing on the second layer at the first time and the second layer at the second time with misaligned frames to obtain a third layer.
[0124] Optionally, the third processing module 1403 is further configured to perform particle emission parameter configuration on the fourth layer based on the third layer to obtain a seventh layer, wherein the seventh layer is used to display a picture softness adjustment result of the fourth layer; perform high light processing on the seventh layer to obtain an eighth layer, wherein the eighth layer is used to display a picture body feeling and light feeling adjustment result of the seventh layer; and perform superimposition processing on the seventh layer and the eighth layer to obtain the fifth layer.
[0125] Optionally, the third processing module 1403 is further configured to configure an emitter type of a particle emitter corresponding to the fourth layer as a layer mode based on the third layer; set the third layer as a particle emission source in the layer mode; and determine a particle color corresponding to the fourth layer by using the particle emission source to obtain the seventh layer.
[0126] Optionally, the fourth processing module 1404 is further configured to perform superimposition processing on the second layer, the third layer and the fifth layer to obtain an initial superimposition result; and perform permutation layer processing on the initial superimposition result to obtain a target superimposition result.
[0127] It should be noted that each of the above modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: all the modules are located in the same processor; or each of the modules is located in a different processor in an arbitrary combination.
[0128] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0129] Optionally, in the present embodiment, the computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various computer program storage media.
[0130] Optionally, in the present embodiment, the computer readable storage medium can be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.
[0131] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: generating a second layer based on the first layer and the original material, wherein the first layer is a mask layer of a preset shape, and the second layer is used to display a fusion result of the first layer and the original material; performing mask processing on the second layer at multiple different time points to obtain a third layer, wherein the third layer is used to display an edge shape adjustment result of the second layer; generating a fifth layer based on the third layer and a fourth layer, wherein the fourth layer is a mask layer of a preset color, and the fifth layer is used to display a corresponding halo state of the original material; and performing superimposition processing on the second layer, the third layer and the fifth layer to obtain a target superimposition result, wherein the target superimposition result is used to simulate appearance and / or disappearance of a virtual object corresponding to the original material.
[0132] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: generating a second layer based on the first layer and the original material includes: performing offset processing on the first layer to obtain a sixth layer, wherein the sixth layer is used to display an edge texture adjustment result of the first layer; and performing fusion processing on the sixth layer and the original material based on a mask attribute of the original material to obtain the second layer.
[0133] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: configuring a scaling attribute and a key frame for the first layer to obtain a configuration result, wherein the scaling attribute is used to represent a display change trend of the virtual object, and the display change trend includes one of the following: the virtual object changes from appearance to disappearance, and the virtual object changes from disappearance to appearance, and the key frame is used to generate an animation corresponding to the scaling attribute.
[0134] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: the multiple different time points include: a first time point and a second time point, the first time point is earlier than the second time point, and the mask processing on the second layer at the multiple different time points includes: performing the mask processing on the second layer at the first time point and the second layer at the second time point to obtain the third layer.
[0135] Optionally, the computer readable storage medium is further configured to store program code for performing the following steps: generating a fifth layer based on the third layer and a fourth layer includes: performing particle emission parameter configuration on the fourth layer based on the third layer to obtain a seventh layer, wherein the seventh layer is used to display a picture softness adjustment result of the fourth layer; performing high light processing on the seventh layer to obtain an eighth layer, wherein the eighth layer is used to display a picture body feeling and light feeling adjustment result of the seventh layer; and performing superimposition processing on the seventh layer and the eighth layer to obtain the fifth layer.
[0136] Optionally, the computer readable storage medium is further configured to store program codes for performing the following steps: performing particle emission parameter configuration on the fourth layer based on the third layer to obtain the seventh layer, including: configuring the emitter type of the particle emitter corresponding to the fourth layer as a layer mode based on the third layer; setting the third layer as a particle emission source in the layer mode; and determining the particle color corresponding to the fourth layer by using the particle emission source to obtain the seventh layer.
[0137] Optionally, the computer readable storage medium is further configured to store program codes for performing the following steps: performing superimposition processing on the second layer, the third layer and the fifth layer to obtain the target superimposition result, including: performing superimposition processing on the second layer, the third layer and the fifth layer to obtain an initial superimposition result; and performing displacement layer processing on the initial superimposition result to obtain the target superimposition result.
[0138] In the computer readable storage medium of the embodiment, a technical scheme of a layer processing method is provided. A second layer is generated based on a first layer and an original material, wherein the first layer is a mask layer of a preset shape, the second layer is used to display a fusion result of the first layer and the original material, a third layer is obtained by performing mask processing on the second layer at multiple different times, wherein the third layer is used to display an edge shape adjustment result of the second layer, and a fifth layer is generated based on the third layer and a fourth layer, wherein the fourth layer is a mask layer of a preset color, and the fifth layer is used to display a corresponding halo state of the original material. The target superimposition result is obtained by performing superimposition processing on the second layer, the third layer and the fifth layer, wherein the target superimposition result is used to simulate the appearance and / or disappearance of a virtual object corresponding to the original material. The technical effect of improving the interest and expandability of the virtual object appearance and disappearance effect simulation process is achieved, and the technical problem of low interest and poor expandability caused by using an erasing type or transparency type method to simulate the appearance and disappearance of a virtual object in the related art is solved.
[0139] From the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical scheme according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a computer readable storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a plurality of instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present application.
[0140] In an example embodiment of the present application, a computer readable storage medium stores a program product capable of implementing the method described above. In some possible implementations, various aspects of the embodiments of the present application can also be implemented in the form of a program product, which includes program codes for causing an end device to perform the steps described in the "example method" section above according to various example embodiments of the present application when the program product is run on the end device.
[0141] The program product for implementing the method described above according to the embodiments of the present application can take the form of a portable compact disc read-only memory (CD-ROM) and include program codes, and can be run on an end device, such as a personal computer. However, the program product of the embodiments of the present application is not limited thereto, and in the embodiments of the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus or device.
[0142] The program product described above can take any combination of one or more computer readable media. The computer readable storage medium may, for example, be but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0143] It should be noted that the program code contained in the computer readable storage medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0144] The embodiments of the present application also provide an electronic device including a memory and a processor, the memory storing a computer program, and the processor being configured to run the computer program to perform the steps in any of the method embodiments described above.
[0145] Optionally, the electronic device described above can further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
[0146] Optionally, in the embodiment, the processor can be configured to execute the following steps by a computer program: generating a second layer based on the first layer and the original material, wherein the first layer is a mask layer of a preset shape, and the second layer is used to display a fusion result of the first layer and the original material; performing mask processing on the second layer at multiple different time points to obtain a third layer, wherein the third layer is used to display an edge shape adjustment result of the second layer; generating a fifth layer based on the third layer and a fourth layer, wherein the fourth layer is a mask layer of a preset color, and the fifth layer is used to display a corresponding halo state of the original material; and performing superimposition processing on the second layer, the third layer and the fifth layer to obtain a target superimposition result, wherein the target superimposition result is used to simulate appearance and / or disappearance of a virtual object corresponding to the original material.
[0147] Optionally, the processor can be further configured to execute the following steps by a computer program: generating the second layer based on the first layer and the original material comprises: performing offset processing on the first layer to obtain a sixth layer, wherein the sixth layer is used to display an edge texture adjustment result of the first layer; and performing fusion processing on the sixth layer and the original material based on a mask attribute of the original material to obtain the second layer.
[0148] Optionally, the processor can be further configured to execute the following steps by a computer program: configuring a scaling attribute and a key frame for the first layer to obtain a configuration result, wherein the scaling attribute is used to represent a display change trend of the virtual object, and the display change trend comprises one of the following: the virtual object changes from appearance to disappearance, and the virtual object changes from disappearance to appearance, and the key frame is used to generate an animation corresponding to the scaling attribute.
[0149] Optionally, the processor can be further configured to execute the following steps by a computer program: the multiple different time points comprise a first time point and a second time point, and the first time point is earlier than the second time point; and performing mask processing on the second layer at the multiple different time points to obtain the third layer comprises: performing mask processing on the second layer at the first time point and the second layer at the second time point by cross-fading to obtain the third layer.
[0150] Optionally, the processor can be further configured to execute the following steps by a computer program: generating the fifth layer based on the third layer and the fourth layer comprises: performing particle emission parameter configuration on the fourth layer based on the third layer to obtain a seventh layer, wherein the seventh layer is used to display a picture softness adjustment result of the fourth layer; performing highlight processing on the seventh layer to obtain an eighth layer, wherein the eighth layer is used to display a picture body and light adjustment result of the seventh layer; and performing superimposition processing on the seventh layer and the eighth layer to obtain the fifth layer.
[0151] Optionally, the processor can be further configured to perform the following steps by means of a computer program: performing particle emission parameter configuration on the fourth layer based on the third layer to obtain the seventh layer, including: configuring the emitter type of the particle emitter corresponding to the fourth layer as a layer mode based on the third layer; setting the third layer as a particle emission source in the layer mode; and determining the particle color corresponding to the fourth layer by using the particle emission source to obtain the seventh layer.
[0152] Optionally, the processor can be further configured to perform the following steps by means of a computer program: performing superimposition processing on the second layer, the third layer and the fifth layer to obtain the target superimposition result, including: performing superimposition processing on the second layer, the third layer and the fifth layer to obtain an initial superimposition result; and performing displacement layer processing on the initial superimposition result to obtain the target superimposition result.
[0153] In the electronic device of the embodiment, a technical scheme of a layer processing method is provided. The second layer is generated based on the first layer and the original material, wherein the first layer is a mask layer of a preset shape, the second layer is used to display the fusion result of the first layer and the original material, the third layer is obtained by performing mask processing on the second layer at multiple different times, wherein the third layer is used to display the edge shape adjustment result of the second layer, and the fifth layer is generated based on the third layer and the fourth layer, wherein the fourth layer is a mask layer of a preset color, and the fifth layer is used to display the tonal state corresponding to the original material. The target superimposition result is obtained by performing superimposition processing on the second layer, the third layer and the fifth layer, wherein the target superimposition result is used to simulate the appearance and / or disappearance of the virtual object corresponding to the original material. The technical effect of improving the interestingness and expandability of the virtual object appearance and disappearance effect simulation process is achieved, and the technical problem of low interestingness and poor expandability caused by using the erasing type or transparency type method to simulate the appearance and disappearance of the virtual object in the related art is solved.
[0154] Figure 16 is a schematic diagram of an electronic device according to an embodiment of the present application. As shown in Figure 16 , the electronic device 1600 is merely an example and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0155] As shown in Figure 16As shown, the electronic device 1600 is in the form of a general computing device. Components of the electronic device 1600 can include, but are not limited to, the at least one processor 1610 described above, the at least one memory 1620 described above, a bus 1630 that connects different system components, including the memory 1620 and the processor 1610, and a display 1640.
[0156] The memory 1620 described above stores program codes that can be executed by the processor 1610, so that the processor 1610 performs the steps described in the above method part of the embodiments of the present application according to various exemplary embodiments of the present application.
[0157] The memory 1620 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 16201 and / or a cache memory 16202, and can further include a read-only memory (ROM) 16203, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
[0158] In some examples, the memory 1620 can also include program / utility 16204 having a set of programs / modules 16205, including but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof can include implementation of a network environment. The memory 1620 can further include a memory that is remotely located with respect to the processor 1610, which can be connected to the electronic device 1600 through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0159] The bus 1630 can be one or more of several types of bus structures, including a storage unit bus or storage unit controller, a peripheral bus, a graphics acceleration port, a processor 1610, or a local bus using any of a variety of bus architectures.
[0160] The display 1640 can be, for example, a liquid crystal display (LCD) that is touch screen type, which can enable a user to interact with a user interface of the electronic device 1600.
[0161] Optionally, the electronic device 1600 can also communicate with one or more external devices 1400 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1600, and / or any device that enables the electronic device 1600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 1650. Furthermore, the electronic device 1600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via the network adapter 1660. Figure 16 As shown, network adapter 1660 communicates with other modules of electronic device 1600 via bus 1630. It should be understood that, although... Figure 16 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 1600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0162] The aforementioned electronic device 1600 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.
[0163] Those skilled in the art will understand that Figure 16 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, electronic device 1600 may also include components that are more... Figure 16 The more or fewer components shown, or having the same Figure 16 Different configurations are shown. The memory 1620 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the layer processing method in this embodiment of the invention. The processor 1610 executes various functional applications and data processing by running the computer program stored in the memory 1620, thereby implementing the aforementioned layer processing method.
[0164] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0165] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0166] In several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other manners. For example, the described unit embodiments can be divided into other ways, for example, the units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be implemented by using some interfaces, and the indirect couplings or communication connections can be implemented in electronic, mechanical, or other forms.
[0167] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, can be located in one place, or can be distributed on multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0168] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0169] When the integrated unit 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 solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various program codes that can be stored in the medium.
[0170] The above description is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. A layer processing method, characterized in that, include: A second layer is generated based on a first layer and the original material. The first layer is a mask layer with a preset shape, and the second layer is used to display the fusion result of the first layer and the original material. The preset shape includes an irregular shape determined by the outer contour of the virtual object corresponding to the original material. A third layer is obtained by masking the second layer at multiple different times. The third layer is used to display the edge shape adjustment results of the second layer. The multiple different times are multiple times during the appearance and / or disappearance process of the virtual object. A fifth layer is generated based on the third and fourth layers, wherein the fourth layer is a mask layer with a preset color, and the fifth layer is used to display the shading state corresponding to the original material; The second layer, the third layer, and the fifth layer are overlaid to obtain a target overlay result, wherein the target overlay result is used to simulate the appearance and / or disappearance of the virtual object corresponding to the original material.
2. The layer processing method according to claim 1, characterized in that, Generating the second layer based on the first layer and the original material includes: The first layer is offset to obtain a sixth layer, wherein the sixth layer is used to display the edge texture adjustment result of the first layer; Based on the masking properties of the original material, the sixth layer and the original material are merged to obtain the second layer.
3. The layer processing method according to claim 2, characterized in that, The layer processing method also includes: Configure scaling attributes and keyframes for the first layer to obtain the configuration result. The scaling attributes are used to represent the display change trend of the virtual object. The display change trend includes one of the following: the virtual object changes from appearance to disappearance, and the virtual object changes from disappearance to appearance. The keyframes are used to generate the animation corresponding to the scaling attributes.
4. The layer processing method according to claim 1, characterized in that, The multiple different times include: a first time and a second time, where the first time is earlier than the second time. A masking process is applied to the second layer at the multiple different times to obtain the third layer, which includes: The third layer is obtained by masking the second layer at the first moment and the second layer at the second moment with different frames.
5. The layer processing method according to claim 1, characterized in that, Generating the fifth layer based on the third layer and the fourth layer includes: Based on the third layer, the particle emission parameters of the fourth layer are configured to obtain the seventh layer, wherein the seventh layer is used to display the image smoothness adjustment result of the fourth layer; The seventh layer is subjected to highlight processing to obtain the eighth layer, wherein the eighth layer is used to display the image volume and light adjustment results of the seventh layer; The seventh layer and the eighth layer are overlaid to obtain the fifth layer.
6. The layer processing method according to claim 5, characterized in that, Based on the third layer, the particle emission parameters of the fourth layer are configured to obtain the seventh layer, which includes: Based on the third layer, the emitter type of the particle emitter corresponding to the fourth layer is configured as a layer mode; In the layer mode, the third layer is set as a particle emission source; The particle color corresponding to the fourth layer is determined using the particle emission source, thus obtaining the seventh layer.
7. The layer processing method according to claim 1, characterized in that, The target overlay result obtained by overlaying the second layer, the third layer, and the fifth layer includes: The second layer, the third layer, and the fifth layer are overlaid to obtain an initial overlay result; The initial overlay result is subjected to a layer displacement process to obtain the target overlay result.
8. A layer processing device, characterized in that, include: The first processing module is used to generate a second layer based on the first layer and the original material, wherein the first layer is a mask layer of a preset shape, and the second layer is used to display the fusion result of the first layer and the original material, and the preset shape includes an irregular shape determined by the outer contour of the virtual object corresponding to the original material; The second processing module is used to perform masking processing on the second layer at multiple different times to obtain a third layer, wherein the third layer is used to display the edge shape adjustment result of the second layer, and the multiple different times are multiple times during the appearance process and / or disappearance process of the virtual object; The third processing module is used to generate a fifth layer based on the third and fourth layers, wherein the fourth layer is a mask layer with a preset color, and the fifth layer is used to display the shading state corresponding to the original material; The fourth processing module is used to overlay the second layer, the third layer and the fifth layer to obtain a target overlay result, wherein the target overlay result is used to simulate the appearance and / or disappearance of the virtual object corresponding to the original material.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the layer processing method according to any one of claims 1 to 7 when run by a processor.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the layer processing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing method, device and system, and computer readable medium
CN112188262A
Image processor
US20050213853A1