Method and device for generating dissolving special effect and electronic equipment
By merging multiple dissolution maps into a sequence map and determining the parameters of multiple dissolution positions, a dissolution effect starting at multiple positions is generated, which solves the problem of poor dissolution effect of a single map and achieves a more realistic and natural visual performance.
Patent Information
- Application Number
- CN202410502413.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-10-24
AI Technical Summary
In existing technologies, a single dissolution texture can only dissolve from one point, resulting in poor dissolution effects that lack realism and naturalness, and making it impossible to achieve dissolution effects that start from multiple locations.
By acquiring multiple dissolution maps and merging them into a sequence map, multiple dissolution locations and their corresponding dissolution parameters in the image to be dissolved are determined. Based on these parameters, the sequence map is applied to each dissolution location to generate a dissolution effect that starts at multiple locations.
The details, dynamic control, and physical realism of the dissolving effects have been improved, resulting in more realistic and natural dissolving effects with richer visual presentation.
Smart Images

Figure CN120833431A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a method and device for generating a dissolve effect, an electronic device, and a computer readable storage medium. BACKGROUND
[0002] Special effects have been widely used in virtual games, films and television dramas, virtual reality and other fields. The special effects can bring users more rich visual effects. The dissolve effect has attracted widespread attention due to its smooth transition effect. The dissolve effect refers to a process in which one picture gradually disappears (dissolves) while another picture gradually appears, so that the two pictures are smoothly switched, avoiding the abruptness when the pictures are switched. In related technologies, a dissolve map is usually applied to realize the dissolve effect. However, a dissolve map can only start dissolving from one point in a picture, resulting in poor performance of the dissolve effect. SUMMARY
[0003] The present application provides a method and device for generating a dissolve effect, an electronic device, and a computer readable storage medium, which can generate a dissolve effect starting from multiple positions, thereby improving the performance of the dissolve effect. The specific solutions are as follows:
[0004] In a first aspect, the present application provides a method for generating a dissolve effect, which includes:
[0005] obtaining a sequence map obtained by merging multiple dissolve maps;
[0006] determining each dissolve position in a first picture to be dissolved and each dissolve parameter corresponding to each dissolve position;
[0007] applying the sequence map to each corresponding dissolve position according to the dissolve manner indicated by each dissolve parameter, to generate a dissolve effect in the first picture to be dissolved.
[0008] In a second aspect, the present application provides a device for generating a dissolve effect, which includes:
[0009] an obtaining unit configured to obtain a sequence map obtained by merging multiple dissolve maps;
[0010] a determining unit configured to determine each dissolve position in a first picture to be dissolved and each dissolve parameter corresponding to each dissolve position;
[0011] a generating unit configured to apply the sequence map to each corresponding dissolve position according to the dissolve manner indicated by each dissolve parameter, to generate a dissolve effect in the first picture to be dissolved.
[0012] In a third aspect, the present application also provides an electronic device, comprising:
[0013] a processor; and
[0014] a memory for storing a data processing program, after the electronic device is powered on and the program is run by the processor, the method according to the first aspect is executed.
[0015] In a fourth aspect, the present application also provides a computer readable storage medium, storing a data processing program, after the program is run by a processor, the method according to the first aspect is executed.
[0016] Compared with the prior art, the present application has the following advantages:
[0017] The method for generating dissolving special effects provided by the present application comprises: obtaining a sequence map obtained by merging a plurality of dissolving maps; determining each dissolving position in a first picture to be dissolved and each dissolving parameter corresponding to each dissolving position; and according to a dissolving manner indicated by each dissolving parameter, applying the sequence map to each corresponding dissolving position to generate a dissolving special effect in the first picture to be dissolved. Since the plurality of dissolving maps can make the generated dissolving special effect have significant advantages in detail performance, dynamic control, physical authenticity and creativity, and the plurality of dissolving positions in the first picture to be dissolved start dissolving, which further makes the generated dissolving special effect more real and natural and the visual performance more rich, it can be seen that the method for generating dissolving special effects provided by the present application can generate a dissolving special effect starting from a plurality of positions, thereby improving the effect performance of the dissolving special effect. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 is a flowchart of the method for generating dissolving special effects provided by the present application;
[0019] Figure 2 is a schematic diagram of a plurality of dissolving maps produced in the method for generating dissolving special effects provided by the present application;
[0020] Figure 3 is an operation interface schematic diagram of the method for generating dissolving maps provided by the present application;
[0021] Figure 4 is a schematic diagram of generating a sequence map in the method for generating dissolving maps provided by the present application;
[0022] Figure 5 is a structural block diagram of an example of the device for generating dissolving special effects provided by the present application;
[0023] Figure 6 is a structural block diagram of an example of the electronic device provided by the present application. DETAILED DESCRIPTION
[0024] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. It will be apparent, however, to one skilled in the art that the present application can be practiced without the specific detail, that in some instances, well known methods have not been described in detail in order not to obscure the present application. Accordingly, it will be appreciated that the present application can be practiced with a wide and equivalent range of alternatives to the
[0025] It should be noted that the terms "first", "second", "third", and the like in the description and in the claims, if any, are used for distinguishing between similar objects and are not necessarily used to describe a particular sequential or chronological order. As used in this document, the term "or" as used between the last parallel branches of a list of two or more items suggests an inclusive "or" rather than the
[0026] Before embodiments of the present application are explained in detail, it is to be understood that the application is not limited in its application to the details of construction and the arrangement of the components set forth in the following description or illustrated in the above-described drawings. The application is capable of other embodiments and of being practiced or being carried out in various ways.
[0027] With the continuous development of computer technology, special effect technology has also been widely used. Among them, when switching from one picture to another, in order to avoid too abrupt switching, a dissolve special effect is often used to gradually dissolve the picture before switching and gradually show the picture after switching. The dissolve special effect can make the two pictures before and after switching smoothly transition.
[0028] At present, a single dissolve map is usually used to add a dissolve special effect between two pictures. However, this method has the following defects: (1) the dissolve special effect generated by the single dissolve map is too mechanical in transition, lacks authenticity, and makes the dissolve transition not natural enough; (2) the dissolve point is only one, and when it is desired to generate a special effect similar to ink dissolve, it is usually necessary to generate the start of dissolve at different times and different positions. This method cannot realize the dissolve special effect starting from multiple positions. Therefore, how to generate a dissolve special effect that is real and natural and has good effect performance becomes extremely important.
[0029] Based on the above reasons, in order to be able to generate a dissolve special effect starting from multiple positions, thereby improving the effect performance of the dissolve special effect, the first embodiment of the present application provides a dissolve special effect generation method. The method is applied to an electronic device, which can be a desktop computer, a notebook computer, a mobile phone, a tablet computer, a server, a terminal device, etc., or other electronic devices capable of generating a dissolve special effect. The present embodiment does not specifically limit it.
[0030] In the following, the dissolve special effect generation method provided by the present application is introduced. Figures 1-4 The dissolve special effect generation method provided by the present application is introduced.
[0031] As Figure 1 shown, the dissolve special effect generation method provided by the present application includes the following steps S101-S103.
[0032] Step S101: Obtain a sequence map obtained by merging multiple dissolve maps.
[0033] The dissolve map refers to a special type of texture map. The dissolve map is used to realize the dissolve, disappearance or semi-transparent effect of a model surface or a two-dimensional picture. The dissolve map is usually a grayscale image or a map with an Alpha (transparency) channel, where the color value of each pixel represents whether the corresponding pixel in the corresponding model surface or the corresponding two-dimensional picture should be dissolved and the degree of dissolution.
[0034] In actual applications, for example, in game engines or other Shader programming supported engines, the dissolve map can be used in combination with a shader (Shader) to control the transparency change of the model surface material or the transparency change of the two-dimensional picture. Among them, the area acted on by the white area in the dissolve map will not be dissolved at all, the area acted on by the black area will be completely dissolved, that is, completely transparent, and the area acted on by the gray area is used to realize different degrees of dissolution effect.
[0035] A game engine is a software framework used to design, develop, test and run electronic games. The game engine can be used to realize the core functions of the game, such as animation splicing, animation playing, graphic rendering, physical simulation, audio processing, script language, artificial intelligence, etc. The game engine provides a fast, efficient and reliable development environment for game developers. Commonly used game engines may include, but are not limited to, Unreal Engine, Unity, CryEngine.
[0036] In the specific implementation, a plurality of dissolve maps can be pre-produced, and the dissolve special effect can be generated by using the plurality of dissolve maps. It should be noted that, in the embodiments of the present application, in order to reduce the space occupation and reduce the performance consumption generated in the process of generating the dissolve special effect, the plurality of dissolve maps can be combined into a sequence map in advance, and the sequence map can be imported into a special effect production software (for example, a game engine) to generate the dissolve special effect.
[0037] In the specific implementation, a plurality of dissolve maps can be pre-produced in AE (Adobe After Effects, a graphic design and video special effect synthesis tool), and the plurality of dissolve maps can be a series of key frames arranged in time sequence to simulate the dissolve effect, that is, the plurality of dissolve maps can form a group of sequence frames.
[0038] In the embodiments of the present application, the sequence map is a map obtained by combining the plurality of dissolve maps, and the sequence map can also be understood as a map containing map information of the plurality of dissolve maps. In one embodiment, the plurality of dissolve maps can be compressed into a sequence map, and the arrangement order of the plurality of dissolve maps in the sequence frames can be recorded. The sequence frames formed by the plurality of dissolve maps can be obtained by analyzing the sequence map and based on the recorded arrangement order. In another embodiment, the plurality of dissolve maps can be preprocessed to obtain the sequence map, and the preprocessing will be described in detail in subsequent embodiments of the present application.
[0039] It should be noted that, compared with generating the dissolve special effect by using a single dissolve map, the sequence map obtained by combining the plurality of dissolve maps in the present application has the following advantages: (1) the gradient effect is more delicate: the plurality of dissolve maps can correspond to different stages of the dissolve process, thereby realizing smooth transition and continuous change in time. Each dissolve map represents a time point of the dissolve process, so that a more delicate and smooth dissolve animation can be exhibited when playing; (2) dynamic control is more flexible: by controlling the frame rate, the speed and rhythm of the dissolve can be flexibly adjusted to adapt to different scenes, video clips or visual special effect requirements; (3) physical realism is enhanced: the dissolve special effect is usually a dynamic process, and the plurality of dissolve maps can better simulate the realistic feeling of a picture gradually disappearing; (4) high resource reusability: the sequence map can be used as a general asset in multiple projects, and different speeds, directions or positions of the dissolve effect can be obtained by simply adjusting the related parameters. In summary, the dissolve special effect generated by using the sequence map obtained by combining the plurality of dissolve maps has significant advantages in detail performance, dynamic control, physical realism and creativity, while the single dissolve map can only express the dissolve result in a fixed state, so that the generated dissolve special effect is not natural and the effect performance is poor.
[0040] Step S102: determining each dissolving position in the first picture to be dissolved and each dissolving parameter corresponding to each dissolving position respectively.
[0041] In the embodiment of the present application, the first picture to be dissolved is the picture for which the dissolving special effect is to be made. In actual application, the interface can have two layers, the upper layer can be the first picture to be dissolved, and the lower layer can be referred to as the second picture to be displayed. The second picture can be a background picture or an interface for target operation. The sizes of the first picture and the second picture can be the same or different. In order to facilitate the introduction, the sizes of the first picture and the second picture are the same in the present application, which is not specifically limited in the present application.
[0042] It can be understood that, in the case where the sizes of the first picture and the second picture are the same, the interface will only display the first picture when the dissolving special effect is not generated.
[0043] An example of the application scenario of the embodiment of the present application can be a virtual game. The generation method of the dissolving special effect provided by the embodiment of the present application can realize visual effects such as corrosion and ink drop diffusion in the virtual game. For example, when logging into a virtual game, in order to avoid the process of loading game resources being too boring and thus leading to poor user experience, a first picture including game elements can be displayed during the process of loading game resources. As the game resource loading progress increases, the first picture can be gradually dissolved and disappeared, and a login interface can be displayed, which is the second picture described above. It should be noted that the application scenario of the generation method of the dissolving special effect provided by the embodiment of the present application can also be in the field of video production, film and television, etc., which is not specifically limited in the present application.
[0044] In order to facilitate the description, the embodiment of the present application takes the production of the ink diffusion dissolving special effect in the virtual game as an example for description. In this case, the plurality of dissolving maps in step S101 can be a series of images output in time sequence for simulating the diffusion effect of the simulated ink painting style and the process.
[0045] As shown in Figure 2 , it is a schematic diagram of the plurality of dissolving maps produced in the generation method of the dissolving special effect provided by the embodiment of the present application, Figure 2 which includes 64 dissolving maps 001-0064 and constitutes a group of sequence frames. The group of sequence frames is used to simulate the ink drop diffusion special effect.
[0046] In the specific implementation, a plurality of dissolving positions can be determined in the first picture to be dissolved, for example, 2 dissolving positions, 3 dissolving positions, 4 dissolving positions, etc. The dissolving positions can be determined according to actual needs, and the dissolving positions can be determined by user selection in the first picture or preselected positions based on historical data.
[0047] It should be noted that each dissolving position can be provided with a corresponding dissolving parameter. The dissolving parameter can be a preset parameter or set by the user. The dissolving parameter of one dissolving position can be used to indicate the dissolving manner of the dissolving position.
[0048] In an optional embodiment, the plurality of dissolving positions in the first picture to be dissolved and the plurality of dissolving parameters corresponding to the plurality of dissolving positions can be determined in response to a configuration operation of the coordinates of the plurality of dissolving positions and the corresponding plurality of dissolving parameters. The user can perform the above configuration operation in the game engine, that is, input the coordinates of the plurality of dissolving positions and input the corresponding plurality of dissolving parameters for the plurality of dissolving positions, that is, complete the configuration operation.
[0049] In the specific implementation, the dissolving parameter can include but is not limited to a dissolving start time, a rotation parameter, a scaling parameter, a dissolving speed, etc. The dissolving parameters of different dissolving positions can be the same or different, which is not limited in the present application.
[0050] It should be noted that in the embodiments of the present application, the dissolving position and the corresponding dissolving parameter can be understood as an action parameter for indicating how the sequence map acts on the first picture to be dissolved. The dissolving position, the rotation parameter, and the scaling parameter can be understood as the position transformation parameter of the sequence map, and the dissolving start time can be understood as the action time of the sequence map. Specifically, the dissolving position is used to indicate the offset of each position in the plurality of dissolving maps corresponding to the sequence map, the rotation parameter is used to indicate the rotation manner of the plurality of dissolving maps corresponding to the sequence map around the center position, and the scaling parameter is used to indicate the scaling manner of the plurality of dissolving maps corresponding to the sequence map. For example, if the dissolving position is (0.2, 0.5), when the sequence map acts on the first picture to be dissolved, the offset of each position is (0.2, 0.5), that is, the offset of each position on the X axis is 0.2 and the offset on the Y axis is 0.5; if the rotation parameter is 95, when the sequence map acts on the first picture to be dissolved, the center position is rotated by 95 degrees; if the scaling parameter is 2, when the sequence map acts on the first picture to be dissolved, the sequence map is enlarged by 2 times.
[0051] Step S103: According to the dissolving manner indicated by the plurality of dissolving parameters, the sequence map is applied to the corresponding plurality of dissolving positions to generate a dissolving special effect in the first picture to be dissolved.
[0052] It can be understood that, after the sequence map obtained by merging the plurality of dissolve maps used for generating the dissolve special effect is acquired in step S101, and the dissolve positions of the first picture to be dissolved and the dissolve parameters used for indicating the dissolve manner of the dissolve positions are determined in step S102, in step S103, the dissolve special effect can be generated at the dissolve positions of the first picture to be dissolved according to the sequence map and the dissolve parameters. Specifically, the dissolve special effect can be generated at the dissolve positions of the first picture to be dissolved according to the dissolve manner indicated by the dissolve parameters by applying the sequence map.
[0053] It should be noted that, if all the dissolve maps in the plurality of dissolve maps are set to be used to realize the dissolve special effect in the game engine, at each dissolve position, the dissolve processing will be performed on each dissolve position by the sequence frame obtained by combining all the dissolve maps, so as to generate the dissolve special effect corresponding to each position; if part of the dissolve maps in the plurality of dissolve maps are set to be used to realize the dissolve special effect in the game engine, at each dissolve position, the dissolve processing will be performed on each dissolve position by the sequence frame obtained by combining the part of the dissolve maps, so as to generate the dissolve special effect corresponding to each position.
[0054] The method for generating the dissolve special effect provided in the embodiments of the present application comprises: acquiring a sequence map obtained by merging a plurality of dissolve maps; determining dissolve positions in a first picture to be dissolved and respective dissolve parameters corresponding to the dissolve positions; and applying the sequence map to the respective dissolve positions according to the dissolve manner indicated by the respective dissolve parameters, so as to generate a dissolve special effect in the first picture to be dissolved. Since the plurality of dissolve maps can make the generated dissolve special effect have significant advantages in terms of detail performance, dynamic control, physical authenticity and creativity, and the dissolve of the plurality of dissolve positions in the first picture to be dissolved further makes the generated dissolve special effect more real and natural and the visual performance more rich, it can be seen that the method for generating the dissolve special effect provided in the embodiments of the present application can generate a dissolve special effect starting from a plurality of positions, so as to improve the effect performance of the dissolve special effect.
[0055] From the operation level of the user, the dissolve special effect can be generated by the following steps according to the embodiments of the present application:
[0056] The first step is to determine the sequence map as the sequence map used for generating the dissolve special effect in response to the import operation of the sequence map.
[0057] The second step is to determine the rows and columns of the sequence map in response to the parameter setting operation for the rows and columns of the sequence map.
[0058] Step 3: In response to the setting operation for the current frame, the set current frame is determined as the starting dissolve frame used when generating the dissolve special effect;
[0059] Step 4: In response to the configuration operation for the coordinates of each dissolve position and the corresponding dissolve parameter, determine each dissolve position in the first image to be dissolved and each dissolve parameter corresponding to each dissolve position, wherein the dissolve parameter includes at least one of the following: dissolve start time, rotation parameter, and scaling parameter;
[0060] Step 5. Parse the sequence map using the rows and columns set in the second step. Based on the dissolution method indicated by each dissolution parameter, use the set current frame as the starting dissolution frame to apply the parsed sequence map to the corresponding dissolution positions to generate a dissolution effect in the first frame to be dissolved.
[0061] In a specific embodiment, steps 1 to 5 can be performed within a game engine. The first step is an implementation of step S101, the second and third steps can be performed before step S102, the fourth step is an implementation of step S102, and the fifth step is an implementation of step S103. In a specific embodiment, there is no specific order in which the second and third steps can be performed. That is, the second step can be performed before or after the third step. Of course, in some possible cases, the second and third steps can also be performed simultaneously.
[0062] The following combination Figure 3 The operation interface of the method for generating a dissolve map provided in the embodiment of the present application is introduced. Figure 3 The figure is a schematic diagram of the operation interface of the method for generating a dissolve map provided by an embodiment of the present application. The user can configure the current frame in the operation interface. For example, if frame 0 is configured as the current frame, it means that the first frame in the sequence of frames composed of multiple dissolve maps is the starting dissolve frame used when generating the dissolve special effect. The user can select a sequence map and configure the rows and columns of the sequence map. Figure 3 The number of rows and columns of the sequence map in the operation interface shown is 4 respectively. After that, the dissolve position can be configured. Figure 3The three dissolving positions are configured, the coordinate of the dissolving position 1 is (0.42, -0.25), the scaling parameter of the dissolving position 1 is 1.25, the rotation parameter of the dissolving position 1 is 108, which means that before the sequence map generates the dissolving effect at the dissolving position 1, the sequence map is first enlarged by 1.25 times, and then rotated by 108 degrees around the center position, and the dissolving start time of the dissolving position 1 is 0, that is, the dissolving position 1 starts to dissolve at time 0; the coordinate of the dissolving position 2 is (-0.4, 0.3), the scaling parameter of the dissolving position 2 is -4, and the rotation parameter of the dissolving position 2 is 100.7, which means that before the sequence map generates the dissolving effect at the dissolving position 2, the sequence map is first reduced by 4 times, and then rotated by 100.7 degrees around the center position 2, and the dissolving start time of the dissolving position 2 is 17, that is, the dissolving position 2 starts to dissolve at time 17; the coordinate of the dissolving position 3 is (0, -0.5), the scaling parameter of the dissolving position 3 is 3, and the rotation parameter of the dissolving position 3 is 50, which means that before the sequence map generates the dissolving effect at the dissolving position 3, the sequence map is first enlarged by 3 times, and then rotated by 50 degrees around the center position, and the dissolving start time of the dissolving position 3 is 15, that is, the dissolving position 3 starts to dissolve at time 15.
[0063] It should be noted that, Figure 3 In the foregoing description, three dissolving positions are set as an example, and the rotation parameter, the scaling parameter and the dissolving start time are the dissolving parameters corresponding to each dissolving position. In specific implementation, the number of dissolving positions, the coordinates of the dissolving positions and the corresponding dissolving parameters can be set according to needs, for example, the dissolving positions can also be two, four, five, eight and the like. It should be understood that the dissolving parameters can include a dissolving speed and the like in addition to the scaling parameter, the rotation parameter and the dissolving start time, and the present application does not specifically limit this.
[0064] As known from the foregoing description, the dissolving parameters of each dissolving position can be the same or different, Figure 3 In the foregoing description, three dissolving positions are set as an example, and the rotation parameter, the scaling parameter and the dissolving start time are the dissolving parameters corresponding to each dissolving position. In specific implementation, the number of dissolving positions, the coordinates of the dissolving positions and the corresponding dissolving parameters can be set according to needs, for example, the dissolving positions can also be two, four, five, eight and the like. It should be understood that the dissolving parameters can include a dissolving speed and the like in addition to the scaling parameter, the rotation parameter and the dissolving start time, and the present application does not specifically limit this.
[0065] It can be understood that in the case that the dissolution parameters of the dissolution positions are different, the dissolution effects generated by each dissolution position will be different. For example, if the dissolution start times of the dissolution position 1 and the dissolution position 2 are different, the dissolution effects obtained by the dissolution position 1 and the dissolution position 2 will start to dissolve from different times. For another example, if the rotation parameters of the dissolution position 1 and the dissolution position 2 are different, when the sequence map acts on the dissolution position 1 and the dissolution position 2, the dissolution maps will rotate different angles, and the dissolution effects obtained by the dissolution position 1 and the dissolution position 2 will also be different. For another example, if the scaling parameters of the dissolution position 1 and the dissolution position 2 are different, when the sequence map acts on the dissolution position 1 and the dissolution position 2, the dissolution maps will be scaled differently, and the dissolution effects obtained by the dissolution position 1 and the dissolution position 2 will also be different.
[0066] It should be noted that in the present application, the dissolution can be controlled by K frames (key frames) of the current frame, so as to realize smooth transition between the current key frame and the next key frame, and further improve the realism and naturalness of the dissolution effect.
[0067] In this way, the user can generate the required dissolution effect according to the requirements. For example, when the user wants to generate a water dripping effect, the user can set multiple different dissolution positions, and configure different dissolution start times, scaling parameters and rotation parameters for the multiple dissolution positions. In this way, the dissolution effect for simulating water dripping and spreading at different positions at different times can be generated, and the realism and naturalness of the generated dissolution effect are further improved, so as to improve the effect performance of the dissolution effect.
[0068] In an optional embodiment, the sequence map in step S101 can be obtained by the following method:
[0069] Obtain a sequence frame containing multiple dissolution maps;
[0070] Divide the multiple dissolution maps into four map sets according to the order in the sequence frame, wherein the number of the dissolution maps included in each map set is the same;
[0071] Combine the dissolution maps included in each map set into an intermediate map, wherein the dissolution maps included in each map set do not overlap in the corresponding intermediate map;
[0072] Assign the four intermediate maps to four color channels respectively, and combine the color information corresponding to the four color channels of the same pixel to generate the sequence map.
[0073] It should be noted that the above method of generating the sequence map is the method of pre-processing the multiple dissolution maps to obtain the sequence map as mentioned above.
[0074] It can be understood that the above-mentioned sequence frames are a group of images in which multiple dissolve maps are arranged in a certain order. Each frame in the sequence frames is a dissolve map, which is used to achieve different stages of the dissolve special effect. In a specific embodiment, after obtaining the sequence frames, the multiple dissolve maps can be divided into four map sets according to the order of the multiple dissolve maps in the sequence frames, and the number of dissolve maps included in each two map sets is the same. In this way, the maps included in each map set can be combined into an intermediate map. After that, each intermediate map is assigned to one of the four color channels, and the color information corresponding to the four color channels belonging to the same pixel is merged to generate a sequence map.
[0075] Specifically, there are two cases when dividing multiple dissolve maps into four map sets: when multiple dissolve maps are divisible by 4, the multiple dissolve maps can be evenly divided into four map sets so that the number of dissolve maps in each map set is the same. For example, if there are 64 dissolve maps in total, then there are 16 dissolve maps in each map set. When multiple dissolve maps are not divisible by 4, blank maps can be added to the last group so that the number of dissolve maps in each map set is the same. For example, if there are 62 dissolve maps in total, then there are 16 dissolve maps in the first three map sets and 14 dissolve maps in the last map set. Two blank maps are added so that the number of dissolve maps in each map set is the same, so that the number of pixels of each intermediate map obtained subsequently is the same, which provides a basis for the subsequent generation of sequence maps.
[0076] The intermediate map can be a map formed by simply placing the dissolve maps included in the corresponding map set in non-overlapping positions according to the order in the sequence frame. For example, map set 1 includes dissolve maps. Figure 1 , dissolving patch Figure 2 , dissolving patch Figure 3 , dissolving patch Figure 4 , dissolving patch Figure 5 , dissolving patch Figure 6 , where the order in the sequence frame is: dissolve Figure 1 →Dissolving patch Figure 2 →Dissolving patch Figure 3 →Dissolving patch Figure 4 →Dissolving patch Figure 5 →Dissolving patch Figure 6 , then the middle map can be a dissolve map Figure 1 Located in the first row and first column, dissolve the sticker Figure 2 Located in the first row and second column, dissolve sticker Figure 3 Located in the first row and third column, dissolve sticker Figure 4 Located in the second row and first column, dissolve sticker Figure 5Located in the second row and second column, dissolve sticker Figure 6 Located in the second row and third column, since the number of dissolve maps in each map set is the same, the number of dissolve maps included in each intermediate map is the same. Therefore, the number of pixels contained in each intermediate map is the same. For example, the number of pixels in the intermediate map is the same. Figure 1 contains 1024 pixels, then the middle Figure 2 、Middle paste Figure 3 And the middle sticker Figure 4 Each contains 1024 pixels.
[0077] In the embodiment of the present application, the four color channels can be the R channel (red channel), G channel (green channel), B channel (blue channel), and A channel (transparency channel) in the RGBA color space, and each intermediate map is assigned to a color channel as the color information of the assigned color channel. For example, the intermediate map Figure 1 Assigned to the R channel as R channel color information, intermediate paste Figure 2 Assigned to G channel as G channel color information, intermediate paste Figure 3 Assigned to the B channel as B channel color information, middle paste Figure 4 Assigned to channel A as channel A color information. In this application, each intermediate map contains the same number of pixels, that is, each color channel contains color information corresponding to the same number of pixels. In this way, the color information corresponding to the four color channels of the same pixel can be merged to generate a sequential map.
[0078] like Figure 4 , which is a schematic diagram of generating a sequence map in the method for generating a dissolve map provided in an embodiment of the present application, Figure 4 In the above Figure 2 The 64 dissolve maps are divided into 4 map sets, each of which contains 16 dissolve maps. The maps in each map set are combined into a middle map, which are middle maps. Figure 1 、Middle paste Figure 2 、Middle paste Figure 3 And the middle sticker Figure 4 , among which, the middle Figure 1 Assigned to the R channel as R channel color information, intermediate paste Figure 2 Assigned to G channel as G channel color information, intermediate paste Figure 3 Assigned to the B channel as B channel color information, middle paste Figure 4 Assigned to the A channel as the A channel color information, and merge the color information corresponding to the four color channels of the same pixel to generate Figure 4 The sequence map shown.
[0079] The step of assigning the four intermediate maps to the four color channels respectively and merging the color information corresponding to the four color channels of the same pixel to generate the sequence map can be performed in Substance Designer (a material creation and editing software, referred to as SD) and can also be implemented in other possible software, which is not specifically limited in the present application.
[0080] By this technical means, the plurality of dissolve maps contained in a sequence frame for implementing each stage of a dissolve special effect are distributed into four color channels to generate a sequence map. Compared with the sequence frame containing the plurality of dissolve maps, the data amount of the sequence map is smaller, thereby reducing the space occupation.
[0081] The specific implementation of step S103 is described in detail as follows:
[0082] In an optional specific implementation, step S103 can be implemented by the following steps:
[0083] parsing the sequence map to obtain a sequence frame containing a plurality of dissolve maps;
[0084] According to the dissolve manner indicated by each dissolve parameter, the sequence frame is applied to the corresponding dissolve position to generate a corresponding dissolve special effect.
[0085] In the embodiment of the present application, for one dissolve position, when generating a dissolve special effect through a sequence map, the sequence map can be parsed first to obtain a sequence frame containing a plurality of dissolve maps, that is, to obtain a plurality of dissolve maps and the arrangement order of the plurality of dissolve maps. Then, according to the dissolve manner indicated by the dissolve parameter of the dissolve position, the plurality of dissolve maps are sequentially applied to the dissolve position according to the order in the sequence frame and the preset frame rate, thereby generating the dissolve special effect of the dissolve position.
[0086] For example, the arrangement order of the dissolve maps in the sequence frame is: dissolve map 1 Figure 1 → dissolve map 2 Figure 2 → dissolve map 3 Figure 3 → dissolve map 4 Figure 4 → dissolve map 5 Figure 5 → dissolve map 6 Figure 6 → dissolve map 7 According to the dissolve manner indicated by the dissolve parameter corresponding to the dissolve position 1, dissolve maps 1 Figure 1 ~ 7 are respectively applied to the dissolve position 1 to generate the dissolve special effect corresponding to the dissolve position 1, according to the dissolve manner indicated by the dissolve parameter corresponding to the dissolve position 2, dissolve maps 1 Figure 1 ~ 7 are respectively applied to the dissolve position 2 to generate the dissolve special effect corresponding to the dissolve position 2, according to the dissolve manner indicated by the dissolve parameter corresponding to the dissolve position 3, dissolve maps 1 Figure 1~7 respectively acting on the dissolving position 3 to generate the dissolving special effect corresponding to the dissolving position 3.
[0087] In the embodiment of the present application, the sequence frame is compressed first to obtain a sequence map with a smaller data amount, and when the dissolving special effect is generated, the sequence frame containing multiple dissolving maps can be restored by analyzing the sequence map, so that the real and natural dissolving special effect can be quickly generated through the sequence frame containing multiple dissolving maps.
[0088] Specifically, the step of "analyzing the sequence map to obtain the sequence frame containing multiple dissolving maps" can include the following steps:
[0089] The color information corresponding to each color channel of the sequence map is analyzed to obtain each intermediate map corresponding to each color channel.
[0090] According to the arrangement order of the intermediate maps and the arrangement order of the dissolving maps in the intermediate maps, the sequence frame containing multiple dissolving maps is determined.
[0091] As can be seen from the foregoing, when the sequence map is generated, the sequence frame containing multiple dissolving maps is divided into four map sets, each map set is combined into an intermediate map, each intermediate map is allocated to each color channel as corresponding color information, and the color information of each color channel corresponding to the same pixel is combined to generate the sequence map. The generation of the sequence map can be regarded as the encoding stage.
[0092] Correspondingly, the analysis of the sequence map into the sequence frame containing multiple dissolving maps can be regarded as the inverse process of generating the sequence map, that is, the decoding stage. First, the color information of each color channel corresponding to each pixel in the sequence map can be analyzed, so that the color information belonging to the same color channel in each pixel is combined to obtain each intermediate map. As can be seen from the foregoing, the map set is divided according to the order of each dissolving map in the sequence frame, so the intermediate map also has a certain arrangement order. In combination with the arrangement order of the intermediate maps and the arrangement order of the dissolving maps in the intermediate maps, the sequence frame containing multiple dissolving maps can be determined. Figure 4 As can be seen from the foregoing, the arrangement order of the intermediate maps is as follows: Figure 1 The intermediate map includes the dissolving map Figures 1-1 6, the intermediate map includes the dissolving map Figure 2 17-32, the intermediate map includes the dissolving map Figure 3 33-48, the intermediate map includes the dissolving map Figure 4 49-64, the arrangement order of the intermediate map is as follows: Figure 1 → the intermediate map Figure 2 → the intermediate map Figure 3 → the intermediate map Figure 4In addition, the arrangement order of each dissolve map in the intermediate map corresponds to the order in the sequence frame, and therefore, the sequence frame can be recovered according to the arrangement order of each intermediate map and the arrangement order of the dissolve maps in each intermediate map, so as to obtain the sequence frame containing multiple dissolve maps.
[0093] Specifically, the step of "applying the sequence frame to the corresponding dissolve position according to the dissolve manner indicated by the dissolve parameter to generate the corresponding dissolve effect" can include the following steps:
[0094] offsetting each position in the multiple dissolve maps in the sequence frame according to the offset indicated by the corresponding dissolve position to obtain the offset multiple dissolve maps;
[0095] aligning and superimposing each position in the offset multiple dissolve maps with the first picture to be dissolved according to the dissolve manner indicated by the dissolve parameter, the order in the sequence frame and the preset frame rate to obtain the transparency of each pixel point in the first picture to be dissolved at each time point;
[0096] generating the dissolve effect on the first picture to be dissolved according to the transparency at each time point.
[0097] In the embodiments of the present application, for one dissolve position, when the multiple dissolve maps are applied to the dissolve position to generate the dissolve effect corresponding to the dissolve position, each position in the multiple dissolve maps can be offset according to the dissolve position to obtain the offset multiple dissolve maps, then, according to the dissolve manner indicated by the dissolve parameter corresponding to the dissolve position, the order in the sequence frame and the preset frame rate, each position in the offset multiple dissolve maps is aligned with and superimposed on the first picture to be dissolved to obtain the transparency of each pixel point in the first picture to be dissolved at each time point, and finally, the dissolve effect is generated on the first picture to be dissolved according to the transparency at each time point.
[0098] It should be noted that in the present application, when the coordinate of the center position of the dissolve map is (0, 0), the center position will always be aligned with the corresponding dissolve position after offsetting.
[0099] Specifically, for a dissolve map, when it acts on a dissolve position, the coordinates of each position in the dissolve map can be added to the coordinates of the dissolve position to obtain the offset coordinates of each position in the dissolve map, and then the offset coordinates are aligned with the corresponding coordinates in the first picture to be dissolved, for example, the offset (0, 0) is aligned with the (0, 0) position in the first picture to be dissolved, and the offset (1, 1) is aligned with the (1, 1) in the first picture to be dissolved, and then the pixel value of the pixel in the dissolve map is multiplied by the pixel value of the pixel at the corresponding position in the first picture to be dissolved, so as to obtain the transparency of each pixel in the first picture to be dissolved. In the case of a black and white map, the transparency of the area corresponding to the black area of the dissolve map will be 0, the special effect to be dissolved will be displayed, so that the area corresponding to the black area displays the second picture. The transparency of the area corresponding to the white area of the dissolve map will be 1, and the special effect not to be dissolved will be displayed, so that the area corresponding to the white area still displays the first picture.
[0100] In an alternative implementation, step S103 can be implemented by the following steps:
[0101] According to the dissolve mode indicated by each dissolve parameter and the special effect parameter, the sequence map is applied to each corresponding dissolve position to generate a dissolve special effect in the first picture to be dissolved. The special effect parameter at least includes one of the background distortion special effect parameter and the aperture particle special effect parameter.
[0102] It should be noted that the background distortion special effect and the aperture particle special effect are common animation or visual effects in visual design, video editing and webpage dynamic effect.
[0103] The background distortion special effect usually refers to the deformation processing of the background of a video or image to produce the effects of flowing, corrugation, vortex, perspective change and various nonlinear transformations. The background distortion special effect can simulate visual experiences such as lens distortion, liquid fluctuation and space distortion, and is commonly used to enhance scene depth, increase science fiction feeling or express special emotional atmosphere. By applying the background distortion special effect, the originally flat background can simulate water wave, mirror reflection or glass breaking effect.
[0104] The aperture particle special effect is an animation special effect created based on computer graphics technology, which usually presents a dynamic light effect composed of many tiny particles. These particles move around a central point or along a specific path, forming effects similar to aperture diffusion, rotation or pulse. The aperture particle special effect can convey energy, speed, technology or mystery atmosphere. By applying the aperture particle special effect, a dynamic aperture can be simulated to spread out from a central point.
[0105] In the embodiments of the present application, the dissolving special effect is generated by applying the background distortion special effect and the aperture particle special effect, the visual attraction and artistic expression are enhanced, the performance form of the dissolving special effect is greatly enriched, the dissolving special effect is more personalized, and the effect performance of the dissolving special effect is further improved.
[0106] In an optional embodiment, when the dissolving parameter includes the dissolving start time, the step S103 can be implemented by the following steps.
[0107] For a dissolving position, at the corresponding dissolving start time, the sequence map is controlled to act on the dissolving position in the first picture to be dissolved, so as to generate the corresponding dissolving special effect at each dissolving position.
[0108] It should be noted that for a dissolving position, the sequence map can be controlled to act on the dissolving position in the first picture to be dissolved at the dissolving start time configured for the dissolving position, so as to generate the corresponding dissolving special effect at each dissolving position. In this way, in combination, the final dissolving special effect simulating the start of dissolving of each dissolving position at the corresponding dissolving start time can be obtained.
[0109] In combination with Figure 3 For the dissolving position (0.42, -0.25), at time 0, the dissolving maps in the sequence map act on the dissolving position (0.42, -0.25) at a certain frame rate according to the order in the sequence frame, so as to generate the corresponding dissolving special effect for the dissolving position (0.42, -0.25); for the dissolving position (-0.4, 0.3), at time 17, the dissolving maps in the sequence map act on the dissolving position (-0.4, 0.3) at a certain frame rate according to the order in the sequence frame, so as to generate the corresponding dissolving special effect for the dissolving position (-0.4, 0.3); for the dissolving position (0, -0.5), at time 15, the dissolving maps in the sequence map act on the dissolving position (0, -0.5) at a certain frame rate according to the order in the sequence frame, so as to generate the corresponding dissolving special effect for the dissolving position (0, -0.5).
[0110] In an optional embodiment, when the dissolving parameter includes the rotation parameter, the step S103 can be implemented by the following steps.
[0111] For each dissolving position, the sequence map is offset according to the corresponding dissolving position and rotated according to the corresponding rotation parameter to obtain a position-transformed sequence map; and the position-transformed sequence map is superimposed with the first picture to be dissolved to generate the corresponding dissolving special effect at each dissolving position.
[0112] It should be noted that for a dissolving position, each dissolving map corresponding to the sequence map can be controlled to be offset according to the dissolving position, and then be rotated according to the rotation parameter corresponding to the dissolving position to obtain the position-transformed dissolving map. Then, the position-transformed dissolving map is aligned with the corresponding position in the first picture to be dissolved according to the ordering in the sequence frame and the preset frame rate, and then is superimposed to generate the corresponding dissolving special effect at each dissolving position.
[0113] In combination Figure 3 For the dissolving position (0.42, -0.25), each position in each dissolving map in the sequence map is controlled to be offset (0.42, -0.25), and then is rotated 108° around the center position to obtain the position-transformed dissolving map corresponding to the dissolving position (0.42, -0.25). Then, the position-transformed dissolving map corresponding to the dissolving position (0.42, -0.25) is aligned with the corresponding position in the first picture to be dissolved according to the ordering in the sequence frame and the frame rate to generate the corresponding dissolving special effect at the dissolving position (0.42, -0.25). For the dissolving position (-0.4, 0.3), each position in each dissolving map in the sequence map is controlled to be offset (-0.4, 0.3), and then is rotated 100.7° around the center position to obtain the position-transformed dissolving map corresponding to the dissolving position (-0.4, 0.3). Then, the position-transformed dissolving map corresponding to the dissolving position (-0.4, 0.3) is aligned with the corresponding position in the first picture to be dissolved according to the ordering in the sequence frame and the frame rate to generate the corresponding dissolving special effect at the dissolving position (-0.4, 0.3). For the dissolving position (0, -0.5), each position in each dissolving map in the sequence map is controlled to be offset (0, -0.5), and then is rotated 50° around the center position to obtain the position-transformed dissolving map corresponding to the dissolving position (0, -0.5). Then, the position-transformed dissolving map corresponding to the dissolving position (0, -0.5) is aligned with the corresponding position in the first picture to be dissolved according to the ordering in the sequence frame and the frame rate to generate the corresponding dissolving special effect at the dissolving position (0, -0.5).
[0114] In an optional implementation, when the dissolving parameter includes the scaling parameter, the step S103 can be implemented through the following steps.
[0115] For each dissolving position, the sequence map is offset according to the dissolving position and is scaled according to the corresponding scaling parameter to obtain the position-transformed sequence map. The position-transformed sequence map is superimposed with the first picture to be dissolved to generate the corresponding dissolving special effect at each dissolving position.
[0116] It should be noted that for one dissolving position, each dissolving map corresponding to the sequence map can be controlled to be offset according to the dissolving position, then be scaled according to the scaling parameter corresponding to the dissolving position to obtain the position-transformed dissolving map, and then the position-transformed dissolving map is superimposed after being aligned with the corresponding position in the first picture to be dissolved according to the ordering in the sequence frame and the preset frame rate, so as to generate the corresponding dissolving special effect at each dissolving position. In this way, in combination, dissolving special effects of different areas at each dissolving position can be obtained.
[0117] In combination Figure 3 For the dissolving position (0.42, -0.25), each position offset (0.42, -0.25) in each dissolving map in the sequence map is controlled, then each position-transformed dissolving map corresponding to the dissolving position (0.42, -0.25) is obtained after being enlarged by 1.25 times, and then the corresponding dissolving special effect for the dissolving position (0.42, -0.25) is generated by aligning each position-transformed dissolving map corresponding to the dissolving position (0.42, -0.25) with the corresponding position in the first picture to be dissolved in sequence according to the ordering in the sequence frame and a certain frame rate; for the dissolving position (-0.4, 0.3), each position offset (-0.4, 0.3) in each dissolving map in the sequence map is controlled, then each position-transformed dissolving map corresponding to the dissolving position (-0.4, 0.3) is obtained after being reduced by 4 times, and then the corresponding dissolving special effect for the dissolving position (-0.4, 0.3) is generated by aligning each position-transformed dissolving map corresponding to the dissolving position (-0.4, 0.3) with the corresponding position in the first picture to be dissolved in sequence according to the ordering in the sequence frame and a certain frame rate; for the dissolving position (0, -0.5), each position offset (0, -0.5) in each dissolving map in the sequence map is controlled, then each position-transformed dissolving map corresponding to the dissolving position (0, -0.5) is obtained after being enlarged by 3 times, and then the corresponding dissolving special effect for the dissolving position (0, -0.5) is generated by aligning each position-transformed dissolving map corresponding to the dissolving position (0, -0.5) with the corresponding position in the first picture to be dissolved in sequence according to the ordering in the sequence frame and a certain frame rate.
[0118] In an optional implementation, when the dissolving parameter includes the scaling parameter and the rotation parameter, the step S103 can be implemented by the following steps:
[0119] For each dissolving position, the sequence map is offset according to the dissolving position, scaled according to the corresponding scaling parameter, and rotated according to the corresponding rotation parameter to obtain the position-transformed sequence map;
[0120] The sequence map after position transformation is superimposed on the first picture to be dissolved to generate a corresponding dissolve special effect at each dissolve position.
[0121] It should be noted that for a dissolve position, each dissolve map corresponding to the sequence map can be controlled to be offset according to the dissolve position, and then scaled and rotated according to the scaling parameter and the rotation parameter corresponding to the dissolve position, to obtain a dissolve map after position transformation. Then, the dissolve map after position transformation is aligned with the corresponding position in the first picture to be dissolved according to the order in the sequence frame and the preset frame rate, and superimposed, thereby generating a corresponding dissolve special effect at each dissolve position.
[0122] The above is an introduction to the method for generating a dissolve special effect provided by the first embodiment of the present application.
[0123] Corresponding to the method for generating a dissolve special effect provided by the first embodiment of the present application, the second embodiment of the present application also provides a device for generating a dissolve special effect, as shown in Figure 5 The device for generating a dissolve special effect 500 includes:
[0124] An acquisition unit 501 is configured to acquire a sequence map obtained by merging a plurality of dissolve maps.
[0125] A determination unit 502 is configured to determine each dissolve position in a first picture to be dissolved and each dissolve parameter corresponding to each dissolve position.
[0126] A generation unit 503 is configured to apply the sequence map to each corresponding dissolve position according to a dissolve manner indicated by each dissolve parameter, to generate a dissolve special effect in the first picture to be dissolved.
[0127] Optionally, the acquisition unit 501 is specifically configured to:
[0128] Acquire sequence frames containing the plurality of dissolve maps.
[0129] Divide the plurality of dissolve maps into four map sets according to an order in the sequence frames, wherein the number of dissolve maps included in each map set is the same.
[0130] Combine each dissolve map included in each map set into an intermediate map, wherein each dissolve map included in each map set does not overlap in the corresponding intermediate map.
[0131] Assign four intermediate maps to four color channels respectively, and combine color information corresponding to four color channels of the same pixel to generate the sequence map.
[0132] Optionally, the determining unit 502 is specifically configured to:
[0133] determine, in response to the configuration operation of the coordinates of each dissolving position and the corresponding dissolving parameters, each dissolving position in the first picture to be dissolved and each dissolving parameter corresponding to each dissolving position, wherein the dissolving parameters include at least one of a dissolving start time, a rotation parameter, and a scaling parameter.
[0134] Optionally, the dissolving parameters determined by the determining unit 502 include the dissolving start time, and the generating unit 503 is specifically configured to:
[0135] for one of the dissolving positions, control the sequence map to act on the corresponding dissolving position in the first picture to be dissolved at the corresponding dissolving start time, to generate a corresponding dissolving special effect at each of the dissolving positions.
[0136] Optionally, the dissolving parameters determined by the determining unit 502 include the rotation parameter and the scaling parameter, and the generating unit 503 is specifically configured to:
[0137] for each of the dissolving positions, offset the sequence map according to the corresponding dissolving position, scale the sequence map according to the corresponding scaling parameter, and rotate the sequence map according to the corresponding rotation parameter, to obtain a position-transformed sequence map;
[0138] superimpose the position-transformed sequence map and the first picture to be dissolved, to generate a corresponding dissolving special effect at each of the dissolving positions. Optionally, the generating unit 503 is specifically configured to:
[0139] parse the sequence map to obtain a sequence frame containing the plurality of dissolving maps;
[0140] according to the dissolving manners indicated by the dissolving parameters, act the sequence frame on the corresponding dissolving positions to generate a corresponding dissolving special effect.
[0141] Optionally, the generating unit 503 is specifically configured to:
[0142] parse the color information corresponding to each color channel of the sequence map to obtain each of the intermediate maps;
[0143] determine a sequence frame containing the plurality of dissolving maps according to the arrangement order of each of the intermediate maps and the arrangement order of the dissolving maps in each of the intermediate maps.
[0144] Optionally, the generating unit 503 is specifically configured to:
[0145] Offset each position in the plurality of dissolve maps in the sequence frame according to the offset indicated by the corresponding dissolve position, to obtain a plurality of offset dissolve maps;
[0146] According to the dissolve manner indicated by each of the dissolve parameters, align and superimpose each position in the plurality of offset dissolve maps with the corresponding position in the first picture to be dissolved according to the order in the sequence frame and a preset frame rate, to obtain the transparency of each pixel point in the first picture to be dissolved at each time point;
[0147] Generate a dissolve special effect on the first picture to be dissolved according to the transparency at each time point.
[0148] Optionally, the generation unit 503 is specifically configured to:
[0149] According to the dissolve manner indicated by each of the dissolve parameters and a special effect parameter, apply the sequence map to each of the corresponding dissolve positions, to generate a dissolve special effect in the first picture to be dissolved, the special effect parameter at least including one of a background distortion special effect parameter and an aperture particle special effect parameter.
[0150] Optionally, the dissolve special effect generation apparatus further includes a parameter setting unit, the parameter setting unit being configured to:
[0151] In response to a parameter setting operation for the rows and columns of the sequence map, determine the rows and columns of the sequence map;
[0152] In response to a setting operation for the current frame, determine the set current frame as a starting dissolve frame used when generating the dissolve special effect.
[0153] Corresponding to the dissolve special effect generation method provided by the first embodiment of the present application, the third embodiment of the present application further provides an electronic device for generating a dissolve special effect. As shown in Figure 6 The electronic device 600 includes a processor 601 and a memory 602 for storing the program of the dissolve special effect generation method. After the device is powered on and the processor runs the program of the dissolve special effect generation method, the following steps are performed:
[0154] Obtain a sequence map by merging a plurality of dissolve maps;
[0155] Determine each dissolve position in the first picture to be dissolved and each dissolve parameter corresponding to each of the dissolve positions;
[0156] According to the dissolve manner indicated by each of the dissolve parameters, apply the sequence map to each of the corresponding dissolve positions, to generate a dissolve special effect in the first picture to be dissolved.
[0157] Corresponding to the generation method of the dissolve special effect provided in the first embodiment of the present application, the fourth embodiment of the present application provides a computer readable storage medium, which stores a program of the generation method of the dissolve special effect. The program is run by a processor to perform the following steps:
[0158] obtaining a sequence map by merging a plurality of dissolve maps;
[0159] determining each dissolve position in the first picture to be dissolved and each dissolve parameter corresponding to each dissolve position respectively;
[0160] applying the sequence map to each corresponding dissolve position according to the dissolve manner indicated by each dissolve parameter, to generate a dissolve special effect in the first picture to be dissolved.
[0161] It should be noted that the detailed description of the device, electronic equipment and computer readable storage medium provided in the second embodiment, the third embodiment and the fourth embodiment of the present application can refer to the related description of the first embodiment of the present application, which will not be repeated here.
[0162] Although the present application is disclosed with the preferred embodiments as above, it is not intended to limit the present application, and any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be subject to the scope defined by the claims of the present application.
[0163] In a typical configuration, a node device in a blockchain includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0164] The memory can include non-permanent memory in a computer readable medium, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer readable medium.
[0165] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other properties of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage media, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition herein, computer-readable media does not include transitory media, such as modulated data signals and carriers.
[0166] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as a method, system or computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0167] Although the present application is disclosed with reference to the preferred embodiments above, it is not intended to limit the present application, and any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application should be defined by the scope defined by the claims of the present application.
Claims
1. A method for generating a solvated effect, characterized by, The method comprises: obtaining a sequence map by merging a plurality of dissolving maps; determining each dissolving position in a first picture to be dissolved and each dissolving parameter corresponding to each dissolving position; applying the sequence map to each corresponding dissolving position according to the dissolving manner indicated by each dissolving parameter to generate a dissolving special effect in the first picture to be dissolved.
2. The method of claim 1, wherein, The method comprises: obtaining a sequence frame containing the plurality of dissolving maps; dividing the plurality of dissolving maps into four map sets according to the order in the sequence frame, wherein the number of dissolving maps included in each map set is the same; combining each dissolving map included in each map set into an intermediate map, wherein each dissolving map included in each map set does not overlap in the corresponding intermediate map; allocating four intermediate maps to four color channels respectively, and merging the color information corresponding to the four color channels of the same pixel to generate the sequence map.
3. The method of claim 1, wherein, The method comprises: determining each dissolving position in a first picture to be dissolved and each dissolving parameter corresponding to each dissolving position in response to a configuration operation of coordinates of each dissolving position and corresponding dissolving parameters, wherein the dissolving parameters include at least one of the following: a dissolving start time, a rotation parameter, and a scaling parameter.
4. The method of claim 3, wherein, The dissolving parameters include the dissolving start time, and the method comprises: for one dissolving position, controlling the sequence map to act on the corresponding dissolving position in the first picture to be dissolved at the corresponding dissolving start time to generate a corresponding dissolving special effect at each dissolving position.
5. The method of claim 3, wherein, The dissolving parameters include the rotation parameter and the scaling parameter, and the method comprises: for each dissolving position, offsetting the sequence map according to the corresponding dissolving position, scaling the sequence map according to the corresponding scaling parameter, and rotating the sequence map according to the corresponding rotation parameter to obtain a position-transformed sequence map; superimposing the position-transformed sequence map and the first picture to be dissolved to generate a corresponding dissolving special effect at each dissolving position.
6. The method of claim 2, wherein, The method comprises: parsing the sequence map to obtain a sequence frame containing the plurality of dissolving maps; applying the sequence frame to each corresponding dissolving position according to the dissolving manner indicated by each dissolving parameter to generate a corresponding dissolving special effect.
7. The method of claim 6, wherein, The sequence map is parsed to obtain a sequence frame containing the plurality of dissolve maps, including: Color information corresponding to each color channel of the sequence map is parsed to obtain each intermediate map; According to the arrangement order of each intermediate map and the arrangement order of the dissolve maps in each intermediate map, a sequence frame containing the plurality of dissolve maps is determined.
8. The method of claim 6, wherein, According to the dissolve manner indicated by each dissolve parameter, the sequence frame is applied to the corresponding dissolve position to generate a corresponding dissolve special effect, including: Each position in the plurality of dissolve maps in the sequence frame is offset according to the offset amount indicated by the corresponding dissolve position to obtain a plurality of offset dissolve maps; According to the dissolve manner indicated by each dissolve parameter, each position in the plurality of offset dissolve maps is aligned and superimposed with the corresponding position in the first picture to be dissolved according to the order in the sequence frame and the preset frame rate, to obtain the transparency of each pixel point in the first picture to be dissolved at each time; According to the transparency at each time, a dissolve special effect is generated on the first picture to be dissolved.
9. The method of claim 1, wherein, According to the dissolve manner indicated by each dissolve parameter, the sequence map is applied to each corresponding dissolve position to generate a dissolve special effect in the first picture to be dissolved, including: According to the dissolve manner indicated by each dissolve parameter and the special effect parameter, the sequence map is applied to each corresponding dissolve position to generate a dissolve special effect in the first picture to be dissolved, the special effect parameter at least including one of a background distortion special effect parameter and an aperture particle special effect parameter.
10. The method of claim 1, wherein, Before the sequence map is applied to each corresponding dissolve position according to the dissolve manner indicated by each dissolve parameter to generate a dissolve special effect in the first picture to be dissolved, the method further includes: In response to a parameter setting operation for the rows and columns of the sequence map, determining the rows and columns of the sequence map; In response to a setting operation for the current frame, the set current frame is determined as the starting dissolve frame used when generating the dissolve special effect.
11. A device for generating a solvated effect, characterized in that The device includes: An acquisition unit configured to acquire a sequence map obtained by merging a plurality of dissolve maps; A determination unit configured to determine each dissolve position in a first picture to be dissolved and each dissolve parameter corresponding to each dissolve position; A generation unit configured to apply the sequence map to each corresponding dissolve position according to the dissolve manner indicated by each dissolve parameter to generate a dissolve special effect in the first picture to be dissolved.
12. An electronic device, comprising: including: a processor; and a memory for storing a data processing program, after the electronic device is powered on and the program is run by the processor, the method of any one of claims 1-10 is executed.
13. A computer-readable storage medium, characterized in that, A data processing program is stored, which is run by the processor to execute the method of any one of claims 1-10.