Scene transition animation generation method and device, electronic equipment and storage medium

By obtaining the texture map of the state before and after transition of the target scene, the target transition area corresponding to the animation time progress is determined based on the preset animation start position, and the target transition area of ​​each animation time progress is smoothed, which solves the problem of unnatural scene switching in the prior art, and realizes scene transition animation generation with high flexibility and low performance consumption.

CN119888018APending Publication Date: 2025-04-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411611395.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art is difficult to achieve natural and flexible transitions when switching scenes, and the time cost of producing keyframe animations is high, so it cannot adapt to the switching needs of different scenarios.

Method used

By obtaining the texture map of the state before and after the transition of the target scene, based on the preset animation start position, the target transition area corresponding to the animation time progress is determined, and the target transition area of ​​each animation time progress is smoothly processed to generate a natural and smooth scene transition animation.

Benefits of technology

It realizes the generation of natural and smooth scene transition animations without making keyframes, improves the flexibility of animation generation, reduces the pressure of memory and rendering, and is suitable for smooth execution of mobile terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888018A_ABST
    Figure CN119888018A_ABST
Patent Text Reader

Abstract

The invention provides a scene transition animation generation method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a first texture map indicating a pre-transition state of a target scene and a second texture map indicating a post-transition state of the target scene; based on a preset animation initial position, determining a target transition area of the scene transition animation in a plurality of animation time progresses; and on the basis of the first texture map and the second texture map, performing smooth transition processing of a pre-transition state and a post-transition state on the target transition region of each animation time progress to obtain a scene transition animation of the target scene. According to the invention, the flexibility of scene transition animation generation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of animation technology, and in particular to a method, device, electronic device and storage medium for generating a scene transition animation. Background Art

[0002] Scene switching is a common animation, including switching from one scene to another, and also transitioning from one state of a scene to another. In order to make the scene switching more natural, the existing technology is usually achieved by making keyframe animations, which is time-consuming and cannot adapt to the switching requirements of different scenes, and has low flexibility. Summary of the invention

[0003] In view of this, an object of the present disclosure is to provide a method, device, electronic device and storage medium for generating a scene transition animation, so as to improve the flexibility of generating the scene transition animation.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for generating a scene transition animation, the method comprising: obtaining a first texture map indicating a target scene in a pre-transition state and a second texture map indicating a post-transition state; determining a target transition area of ​​the scene transition animation in multiple animation time progresses based on a preset animation starting position; and performing smooth transition processing between a pre-transition state and a post-transition state on the target transition area of ​​each animation time progress based on the first texture map and the second texture map to obtain the scene transition animation of the target scene.

[0005] In a second aspect, an embodiment of the present disclosure provides a device for generating a scene transition animation, the device comprising: a response module, used to obtain a first texture map indicating a target scene in a pre-transition state and a second texture map indicating a post-transition state; a determination module, used to determine a target transition area of ​​the scene transition animation in multiple animation time progresses based on a preset animation starting position; a processing module, used to perform smooth transition processing between a pre-transition state and a post-transition state on the target transition area of ​​each animation time progress based on the first texture map and the second texture map, to obtain the scene transition animation of the target scene.

[0006] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned method for generating the scene transition animation.

[0007] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned method for generating the scene transition animation.

[0008] The embodiments of the present disclosure bring the following beneficial effects:

[0009] The above-mentioned scene transition animation generation method, device, electronic device and storage medium determine different scene transition areas at different animation time progresses, and then for each animation time progress, smooth the scene transition area before and after the scene transition state, thereby generating a natural and smooth scene transition animation. There is no need to make key frames, only to define the scene texture map before and after the transition. The starting position of the animation can also be flexibly set according to the needs of different scenes, thereby improving the overall flexibility of animation generation. In addition, compared with the model animation played frame by frame, the above-mentioned implementation method does not need to load the model and material in each frame, and the pressure on memory and rendering is reduced. Therefore, the performance is also improved, and it can be executed smoothly on mobile terminals.

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

[0011] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0013] Figure 1 A flow chart of an embodiment of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0014] Figure 2 A schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0015] Figure 3 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0016] Figure 4 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0017] Figure 5 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0018] Figure 6 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0019] Figure 7 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0020] Figure 8 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0021] Fig. 9 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0022] Fig.10 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0023] Fig.11 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0024] Fig.12 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0025] Fig.13 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0026] Fig.14 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0027] Fig.15 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0028] Fig.16 is another schematic diagram of a method for generating a scene transition animation in an embodiment of the present disclosure;

[0029] Fig.17 A schematic diagram of a scene transition animation generation device provided by an embodiment of the present disclosure;

[0030] Fig.18 A schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

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

[0032] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] For ease of understanding, the specific process of the embodiment of the present disclosure is described below. Figure 1 , an embodiment of a method for generating a scene transition animation in an embodiment of the present disclosure includes:

[0034] Step S10, obtaining a first texture map indicating a state of the target scene before the transition and a second texture map indicating a state of the target scene after the transition;

[0035] In one implementation, a rendering instruction of a target scene or a rendering instruction of a scene transition animation may be triggered in a virtual game, thereby obtaining a scene transition animation in the virtual game, wherein the virtual game includes a virtual game scene, and the target scene may be part / all of the virtual game scene. The specific process of the disclosed embodiment may be implemented through a game engine, which is not specifically limited here.

[0036] It should be noted that the target scene may be all or part of a preset scene model. When generating a scene transition animation, the target scene may be presented in different states by sampling a texture map of the three-dimensional model of the target scene.

[0037] For the same target scene, the texture maps of the pre-transition state and the post-transition state can be pre-designed. By sampling different texture maps of the three-dimensional model of the target scene, the target scene effect containing different states can be obtained. In this embodiment, the first texture map is used to indicate the state of the target scene before the transition, and the second texture map is used to indicate the state of the target scene after the transition. The first texture map and the second texture map are both suitable for sampling the three-dimensional model of the target scene, and the specific details are not limited here.

[0038] By way of example and not limitation, Figure 2 and Figure 3 It is a schematic diagram of the state before and after the target scene transition. Figure 2 and Figure 3 By comparison, Figure 2 The target scene shown is desolate, and Figure 3 The target scene shown presents a lively state. Through the scene transition animation, the target scene can be transitioned from a barren state to a lively state, so that the scene transition presents a better visual effect.

[0039] Step S20: determining a target transition area of ​​the scene transition animation in multiple animation time progresses based on a preset animation start position;

[0040] It can be understood that the scene transition animation can start from any position of the target scene. In this embodiment, at the starting moment of the scene transition animation, starting from the animation starting position, each animation time progress corresponds to a target transition area in the target scene, wherein the target transition area divides the target scene into a pre-transition area, a transition area, and a post-transition area. The transition area is the target transition area, which includes the pre-transition state and post-transition state of the target scene, while the pre-transition area only includes the pre-transition state of the target scene, and the post-transition area only includes the post-transition state of the target scene. No specific limitation is made here.

[0041] In one embodiment, the target transition area is a scene area that starts from the starting position of the animation and gradually changes as the animation time progresses. The way in which the target transition area changes with the animation time progress can be set by preset parameters. For example, the preset parameters may include: a preset mask map, and parameters indicating that the mask map deforms with the animation time progress, such as scaling parameters, rotation parameters, coordinate movement parameters, etc., which are not specifically limited here.

[0042] By way of example and not limitation, Figure 4 The following are three examples of how the target transition area changes as the animation progresses. Figure 4 Point O in the figure is the starting position of the animation. Figure 4In (a), the target transition area is a bar, and the target transition area moves from point O in the upper right corner to the lower left corner as the animation time progresses. The target transition area in (b) is a star ring, and the target transition area in (c) is a circular ring. The target transition areas in (b) and (c) both spread outward from the center as the animation time progresses, and the specific details are not limited here.

[0043] It should be noted that the animation time progress refers to the playback / generation progress of the scene transition animation, which can be determined based on the animation start time and the preset animation duration parameters. For example, assuming that 3 seconds have passed since the animation start time and the preset animation duration parameter is 10 seconds, then the current animation time progress is 30%. The specific details are not limited here.

[0044] In one embodiment, the duration of the scene transition animation can be preset by parameters. The duration of the scene transition animation can be adjusted by the preset animation duration parameters. When the frame rate is fixed, the playback speed of the scene transition animation can be changed by changing the animation duration parameters, thereby achieving a more flexible animation generation effect.

[0045] Step S30: Based on the first texture map and the second texture map, a smooth transition process is performed on the target transition area of ​​each animation time progress between the pre-transition state and the post-transition state to obtain a scene transition animation of the target scene.

[0046] In this implementation, after determining the target transition area corresponding to each animation time progress, the first texture map and / or the second texture map can be sampled through the model of the target scene. During the sampling process, the first texture map is sampled for the area before the transition, and the second texture map is sampled for the area after the transition. For the area in the transition, that is, the target transition area, the first texture map and the second texture map are sampled and a smooth transition process is performed, thereby obtaining the target scene state corresponding to each animation time progress. As the animation time progresses, the scene transition animation of the target scene can be obtained.

[0047] In one embodiment, when performing smooth transition processing on the pre-transition state and the post-transition state of the target transition area of ​​each animation time progress, the results obtained by sampling the first texture map and the second texture map of the target transition area can be interpolated to determine the sampling result of the target transition area. Through interpolation, the smooth transition state of the pre-transition state and the post-transition state of the target scene can be obtained, making the transition animation of the scene more natural.

[0048] In one embodiment, a scene transition animation can also be generated in a specified area of ​​the target scene. Specifically, the animation area where the scene transition animation needs to be generated can be limited by a regional mask, and the first texture map and the second texture map are respectively superimposed on the regional mask to obtain the masked first texture map and the second texture map. Based on the masked first texture map and the second texture map, a smooth transition processing is performed on the pre-transition state and the post-transition state of the target transition area of ​​each animation time progress, thereby obtaining the scene transition animation of the specified animation area in the target scene.

[0049] By way of example and not limitation, Figure 6 The following is a schematic diagram of a regional mask. Assume Fig.11 is the pre-transition state of the target scene, then, Fig.12 That is, the target scene is in a transitional state where the animation area is limited by the area mask. The animation area limited by the area mask of the target scene is Figure 6 The animation area defined by the white color is different. Figure 6 This is just an example and is not limited to this.

[0050] The method for generating scene transition animation provided by the above-mentioned implementation method determines different scene transition areas at different animation time progresses, and then smoothes the scene transition areas before and after the scene transition for each animation time progress, thereby generating a natural and smooth scene transition animation. There is no need to create key frames, only to define the scene texture maps before and after the transition. The starting position of the animation can also be flexibly set according to the needs of different scenes, thereby improving the overall flexibility of animation generation. Moreover, compared with the model animation played frame by frame, the above-mentioned implementation method does not need to load models and materials in each frame, and the pressure on memory and rendering is reduced. Therefore, the performance is also improved, and it can be executed smoothly on mobile terminals.

[0051] Next, the method for determining the target transition area is described in detail.

[0052] In one embodiment, when determining the target transition area of ​​the scene transition animation in multiple animation time progresses based on a preset animation starting position, a first mask map is obtained, and a second mask map is obtained; according to preset scaling parameters, the first mask map and the second mask map are scaled and fused along with multiple animation time progresses to obtain a third mask map corresponding to each animation time progress; wherein the third mask map is used to divide the mask area, the non-mask area and the mask transition area; with the preset animation starting position as the center, based on the mask transition area in the third mask map, the target transition area of ​​the scene transition animation in multiple animation time progresses is obtained.

[0053] In this embodiment, the target transition area in the target scene is limited by a mask image (i.e., the third mask map), so that the target scene can be divided into a mask area, a non-mask area and a mask transition area. The mask transition area is used to smoothly transition the effect between the mask area and the non-mask area, making the scene transition animation more natural.

[0054] In this embodiment, the first mask map and the second mask map can be preset, or only the first mask map can be preset, and the second mask map is generated according to the first mask map. The first mask map and the second mask map contain graphics similar to the preset shape. By adding, subtracting or multiplying the first mask map and the second mask map, a third mask map for dividing three areas can be obtained. The three areas are a mask area, a non-mask area, and a mask transition area. Among them, the preset shape can also be a ring, a square, a star, a cross, etc., which are not specifically limited here.

[0055] As an example but not limitation, the preset first mask map and the second mask map can be respectively as follows: Fig.14 and Fig.15 As shown, it can be seen that the first mask map and the second mask map respectively contain circles of opposite colors. By subtracting the second mask map from the first mask map, the following can be obtained: Fig.16 The third mask map including the circular ring is shown, in which the circular ring area can be used to indicate the target transition area of ​​the animation time progress, and the specific details are not limited here.

[0056] In one implementation, when acquiring the second mask map, the first mask map is inverted to obtain an inverted first mask map; and noise is superimposed on the inverted first mask map to obtain the second mask map.

[0057] It is understandable that when generating the second mask map according to the first mask map, the first mask map may be inverted and then noise may be superimposed, or noise may not be superimposed (noise may be added in the subsequent smooth transition process), so as to obtain a third mask map that can be used to divide the three regions. Figure 5 As shown, Figure 5 After the second mask map is obtained by inverting the color without superimposing the noise, the third mask map obtained after subsequent scaling and fusion can be as follows: Figure 7 As shown, no specific limitation is made here.

[0058] In one embodiment, the preset scaling parameters include: a first scaling factor and a second scaling factor that change with the animation time progress; when the first mask map and the second mask map are scaled and merged with multiple animation time progresses according to the preset scaling parameters to obtain a third mask map corresponding to each animation time progress, the first mask map and the second mask map are respectively multiplied by the first scaling factor and the second scaling factor corresponding to each animation time progress to obtain the first scaling map and the second scaling map corresponding to each animation time progress; wherein the first scaling factor is greater than the second scaling factor; the second scaling map is subtracted from the first scaling map to obtain a third mask map containing a preset shape corresponding to each animation time progress; wherein the preset shape is used to indicate a mask transition area.

[0059] In this embodiment, when performing scaling processing, the first mask map and the second mask map are multiplied by the first scaling factor and the second scaling factor respectively, so as to obtain the first scaling map and the second scaling map corresponding to each animation time progress, wherein the first scaling factor is greater than the second scaling factor. By multiplying the first mask map and the second mask map by a large and a small scaling factor respectively, a large and a small scaling map, namely the first scaling map and the second scaling map, can be obtained, wherein the first scaling map is greater than the second scaling map. Then, the second scaling map is subtracted from the first scaling map to form a hollow third mask map containing a preset shape. The preset shape is used to indicate the mask transition area, namely the target transition area.

[0060] It should be noted that the preset shape can also be a ring, a square, a star, a cross, etc. Preferably, the preset shape is a ring, specifically a circular ring, which can make the scene transition animation more natural. Fig.14 and Fig.15 As shown, it can be seen that the first mask map and the second mask map respectively contain circles of opposite colors. By multiplying the first mask map and the second mask map by a large and a small scaling factor respectively, a first scaled map and a second scaled map containing a large and a small circle are obtained. Then, the first scaled map is subtracted from the second scaled map to obtain the following: Fig.16 A third mask map containing a ring is shown.

[0061] Among them, the white area in the third mask map is the mask transition area, that is, the target transition area. In the scene transition animation, the ring-shaped target transition area gradually expands from the center to the outside. The circle in the ring shows the state of the target scene after the transition, the inside of the ring shows the smooth transition state before and after the transition, and the area outside the ring shows the state of the target scene before the transition, thus forming a scene transition animation that gradually transitions from the center to the outside, and the transition effect is more natural.

[0062] It should be noted that the first scaling factor and the second scaling factor are both parameter values ​​that change with the progress of the animation time, and the relationship between the two and the progress of the animation time can be the same or different. Specifically, the relationship between the two and the progress of the animation time can be a linear relationship, that is, a uniform change, so that the scene transition animation also forms a uniform change effect, which is not limited here.

[0063] Next, the smooth transition processing of the target transition area is described in detail.

[0064] In one embodiment, when a target transition area of ​​each animation time progress is subjected to smooth transition processing between a pre-transition state and a post-transition state based on a first texture map and a second texture map to obtain a scene transition animation of a target scene, a target mask map corresponding to each animation time progress is obtained; wherein the target mask map includes a mask transition area, and the mask transition area corresponds to the target transition area of ​​the scene transition animation; the mask transition area in the target mask map is subjected to edge blur processing to obtain a target blur map corresponding to each animation time progress; based on the target blur map corresponding to each animation time progress, the first texture map and the second texture map are interpolated and sampled to obtain the scene transition animation of the target scene.

[0065] In this embodiment, the target transition area of ​​the scene transition animation is represented by a target mask map, wherein the target mask map may be the first mask map or the third mask map mentioned above, and the specifics are not limited here. It should be noted that in order to make the target transition area present a smooth transition effect, this embodiment performs edge blurring processing on the mask transition area in the target mask map, and the obtained target blurring map is used to determine the interpolation sampling value between the first texture map and the second texture map, so that the target scene presents a smooth transition effect in the target transition area.

[0066] In one embodiment, when performing edge blur processing on the mask transition area, the target mask image can be superimposed with a preset noise map to obtain a target blur map with different noise shapes at the edge. Figure 8 The following is a target blur map with edge blur. Figure 7 It can be seen that the edge of the ring is softer and has some random textures, which can make the scene transition animation more natural.

[0067] By way of example and not limitation, Fig.10 The following is a preset noise map, which contains filled squares. Fig.11 The figure shows the pre-transition state of the target scene. Fig.12 The following is the state of the target scene after the transition. Then, if Fig.10 A scene state of the preset noise map shown can be as follows Fig.13 As shown, it can be seen that the transition area of ​​the scene state includes a flipping effect of the block. The scene state can be a scene state of any animation time progress in the scene transition animation of the target scene, and the specific details are not limited here.

[0068] In one embodiment, when the mask transition area in the target mask map is subjected to edge blurring to obtain the target blurred map corresponding to each animation time progress, the preset noise map is grayscale adjusted to obtain the target noise map; the target mask map corresponding to each animation time progress is multiplied by the target noise map to obtain the target blurred map corresponding to each animation time progress.

[0069] It can be understood that the noise map and the mask map are the same in that they are both grayscale images with values ​​​​of 0-1, where 0 represents black, 1 represents white, and any value between 0-1 is gray. Black multiplied by any target color is black, white multiplied by any target color is the target color, and gray multiplied by gray will obtain gray of different grayscales.

[0070] In this embodiment, by adjusting the grayscale of the preset noise map, a target noise map that can make the target transition area softer can be obtained, so that the effect of the scene transition animation is also softer. As an example but not a limitation, Fig. 9 The following is a schematic diagram of a target blur map. Fig. 9 It is obtained by multiplying the target mask map with the target noise map after grayscale reduction. Assume Figure 8 It is obtained by multiplying the preset noise map without grayscale reduction. Fig. 9 Compared to Figure 8 , the edges are therefore softer.

[0071] In one embodiment, when the first texture map and the second texture map are interpolated and sampled based on the target blur map corresponding to each animation time progress to obtain the scene transition animation of the target scene, for each animation time progress, the pixel value in the first texture map is used as the starting value of the interpolation function, the pixel value in the second texture map is used as the end value of the interpolation function, the pixel value in the target blur map is used as the interpolation ratio value of the interpolation function, and the result of the interpolation function is used as the scene state corresponding to each animation time progress to obtain the scene transition animation of the target scene.

[0072] In this implementation, after obtaining the target blurred map corresponding to each animation time progress, the scene state corresponding to each animation time progress can be calculated through the interpolation function. As the animation time progresses, the scene state advances accordingly, thereby obtaining the scene transition animation of the target scene.

[0073] In this embodiment, the pixel value in the mask map (ie, the target blur map) is used as the interpolation ratio value / t value of the interpolation (lerp) function, and interpolation is performed between the two pixel colors of the first texture map and the second texture map, thereby obtaining a natural transition effect.

[0074] In one embodiment, after performing edge blurring processing on the mask transition area in the target mask map to obtain the target blur map corresponding to each animation time progress, the vertex height of the target transition area of ​​the target scene model can be offset according to a preset undulation height parameter for each animation time progress to obtain the scene target model corresponding to each animation time progress; wherein the texture of the scene target model is sampled from the first texture map and / or the second texture map.

[0075] In this embodiment, the vertex height of the target scene model in the target transition area can also be adjusted to create a height difference in the target transition area of ​​the target scene, making the scene transition animation effect more natural. This embodiment is suitable for the transition animation of terrain scenes and can produce a more realistic ground-turning animation effect.

[0076] It should be noted that different animation time progresses correspond to different target transition areas. Therefore, the vertices offset by different animation time progresses are also different. The offset of the vertex height can be positive to obtain an arched effect, or negative to obtain a concave effect. The specifics are not limited here.

[0077] Corresponding to the above method embodiment, see Fig.17 A schematic diagram of a scene transition animation generation device is shown, the device comprising: a response module 1701, used to obtain a first texture map indicating a target scene in a pre-transition state and a second texture map indicating a post-transition state; a determination module 1702, used to determine a target transition area of ​​the scene transition animation in multiple animation time progresses based on a preset animation starting position; a processing module 1703, used to perform smooth transition processing of the pre-transition state and the post-transition state on the target transition area of ​​each animation time progress based on the first texture map and the second texture map, so as to obtain the scene transition animation of the target scene.

[0078] The above-mentioned scene transition animation generation device determines different scene transition areas at different animation time progresses, and then smoothes the scene transition areas before and after the scene transition for each animation time progress, thereby generating a natural and smooth scene transition animation. There is no need to make key frames, only to define the scene texture maps before and after the transition. The starting position of the animation can also be flexibly set according to the needs of different scenes, thereby improving the overall flexibility of animation generation. Moreover, compared with the model animation played frame by frame, the above-mentioned implementation method does not need to load models and materials in each frame, and the pressure on memory and rendering is reduced. Therefore, the performance is also improved, and it can be executed smoothly on mobile terminals.

[0079] Optionally, the above-mentioned determination module 1702 includes: an acquisition unit, used to acquire a first mask map, and to acquire a second mask map; a scaling unit, used to scale and fuse the first mask map and the second mask map along with multiple animation time progresses according to preset scaling parameters, to obtain a third mask map corresponding to each animation time progress; wherein the third mask map is used to divide the mask area, the non-mask area and the mask transition area; a transition unit, used to obtain the target transition area of ​​the scene transition animation in multiple animation time progresses based on the mask transition area in the third mask map, with the preset animation starting position as the center.

[0080] Optionally, the preset scaling parameters include: a first scaling factor and a second scaling factor that change with the animation time progress; the above-mentioned scaling unit is specifically used to: multiply the first mask map and the second mask map by the first scaling factor and the second scaling factor corresponding to each animation time progress, respectively, to obtain the first scaling map and the second scaling map corresponding to each animation time progress; wherein the first scaling factor is greater than the second scaling factor; subtract the second scaling map from the first scaling map to obtain a third mask map containing a preset shape corresponding to each animation time progress; wherein the preset shape is used to indicate a mask transition area.

[0081] Optionally, the acquisition unit is specifically used to: perform color inversion processing on the first mask map to obtain an inverted first mask map; and perform noise superposition on the inverted first mask map to obtain a second mask map.

[0082] Optionally, the above-mentioned processing module 1703 includes: an acquisition unit, used to obtain a target mask map corresponding to each animation time progress; wherein the target mask map includes a mask transition area, and the mask transition area corresponds to the target transition area of ​​the scene transition animation; a blurring unit, used to perform edge blurring processing on the mask transition area in the target mask map to obtain a target blurred map corresponding to each animation time progress; an interpolation unit, used to interpolate and sample the first texture map and the second texture map based on the target blurred map corresponding to each animation time progress to obtain the scene transition animation of the target scene.

[0083] Optionally, the blurring unit is specifically used to: adjust the grayscale of a preset noise map to obtain a target noise map; multiply a target mask map corresponding to each animation time progress by the target noise map to obtain a target blurring map corresponding to each animation time progress.

[0084] Optionally, the above-mentioned interpolation unit is specifically used to: for each animation time progress, use the pixel value in the first texture map as the starting value of the interpolation function, the pixel value in the second texture map as the end value of the interpolation function, the pixel value in the target blurred map as the interpolation ratio value of the interpolation function, and use the result of the interpolation function as the scene state corresponding to each animation time progress to obtain the scene transition animation of the target scene.

[0085] Optionally, the above-mentioned processing module 1703 also includes: an offset unit, which is used to offset the vertex height of the target transition area of ​​the target scene model according to a preset undulation height parameter for each animation time progress, so as to obtain the scene target model corresponding to each animation time progress; wherein the texture of the scene target model is sampled from the first texture map and / or the second texture map.

[0086] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned scene transition animation generation method. The electronic device can be a server or a terminal device.

[0087] See also Fig.18 As shown, the electronic device includes a processor 100 and a memory 101, wherein the memory 101 stores machine executable instructions that can be executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the above-mentioned method for generating the scene transition animation.

[0088] Further, Fig.18 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .

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

[0090] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware, for example:

[0091] Obtain a first texture map indicating a target scene in a pre-transition state and a second texture map indicating a post-transition state; determine a target transition region of a scene transition animation in multiple animation time progressions based on a preset animation start position; perform a smooth transition process between a pre-transition state and a post-transition state on the target transition region of each animation time progression based on the first texture map and the second texture map to obtain a scene transition animation of the target scene.

[0092] In this method, different scene transition areas are determined at different animation time progresses, and then for each animation time progress, the scene transition area is smoothed before and after the scene transition, thereby generating a natural and smooth scene transition animation. There is no need to make key frames, only to define the scene texture maps before and after the transition. The starting position of the animation can also be flexibly set according to the needs of different scenes, thereby improving the overall flexibility of animation generation. In addition, compared with the model animation played frame by frame, the above implementation method does not need to load models and materials in each frame, and the pressure on memory and rendering is reduced. Therefore, the performance is also improved, and it can be executed smoothly on mobile terminals.

[0093] Optionally, based on a preset animation starting position, the step of determining a target transition area of ​​a scene transition animation in multiple animation time schedules includes: obtaining a first mask map, and obtaining a second mask map; according to preset scaling parameters, scaling and fusing the first mask map and the second mask map along with multiple animation time schedules to obtain a third mask map corresponding to each animation time schedule; wherein the third mask map is used to divide the mask area, the non-mask area and the mask transition area; with the preset animation starting position as the center, based on the mask transition area in the third mask map, obtaining the target transition area of ​​the scene transition animation in multiple animation time schedules.

[0094] Optionally, the preset scaling parameters include: a first scaling factor and a second scaling factor that change with the animation time progress; according to the preset scaling parameters, scaling and fusing the first mask map and the second mask map with multiple animation time progresses to obtain a third mask map corresponding to each animation time progress, comprising: multiplying the first mask map and the second mask map by the first scaling factor and the second scaling factor corresponding to each animation time progress, respectively, to obtain the first scaling map and the second scaling map corresponding to each animation time progress; wherein the first scaling factor is greater than the second scaling factor; subtracting the second scaling map from the first scaling map to obtain a third mask map containing a preset shape corresponding to each animation time progress; wherein the preset shape is used to indicate a mask transition area.

[0095] Optionally, the step of obtaining the second mask map includes: inverting the first mask map to obtain an inverted first mask map; and superimposing noise on the inverted first mask map to obtain the second mask map.

[0096] Optionally, based on the first texture map and the second texture map, a smooth transition processing is performed on the target transition area of ​​each animation time progress between a pre-transition state and a post-transition state to obtain the step of scene transition animation of the target scene, including: obtaining a target mask map corresponding to each animation time progress; wherein the target mask map contains a mask transition area, and the mask transition area corresponds to the target transition area of ​​the scene transition animation; performing edge blur processing on the mask transition area in the target mask map to obtain a target blur map corresponding to each animation time progress; based on the target blur map corresponding to each animation time progress, interpolating and sampling the first texture map and the second texture map to obtain the scene transition animation of the target scene.

[0097] Optionally, the step of performing edge blurring on the mask transition area in the target mask map to obtain a target blurred map corresponding to each animation time progress includes: adjusting the grayscale of a preset noise map to obtain a target noise map; multiplying the target mask map corresponding to each animation time progress by the target noise map to obtain a target blurred map corresponding to each animation time progress.

[0098] Optionally, based on the target blur map corresponding to each animation time progress, the first texture map and the second texture map are interpolated and sampled to obtain the scene transition animation of the target scene, comprising: for each animation time progress, using the pixel value in the first texture map as the starting value of the interpolation function, the pixel value in the second texture map as the end value of the interpolation function, the pixel value in the target blur map as the interpolation ratio value of the interpolation function, and using the result of the interpolation function as the scene state corresponding to each animation time progress, to obtain the scene transition animation of the target scene.

[0099] Optionally, after the step of performing edge blurring on the mask transition area in the target mask map to obtain the target blurred map corresponding to each animation time progress, the method further includes: for each animation time progress, according to a preset undulation height parameter, offsetting the vertex height of the target transition area of ​​the target scene model to obtain the scene target model corresponding to each animation time progress; wherein the texture of the scene target model is sampled from the first texture map and / or the second texture map.

[0100] This embodiment further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned method for generating the scene transition animation, for example:

[0101] Obtain a first texture map indicating a target scene in a pre-transition state and a second texture map indicating a post-transition state; determine a target transition region of a scene transition animation in multiple animation time progressions based on a preset animation start position; perform a smooth transition process between a pre-transition state and a post-transition state on the target transition region of each animation time progression based on the first texture map and the second texture map to obtain a scene transition animation of the target scene.

[0102] In this method, different scene transition areas are determined at different animation time progresses, and then for each animation time progress, the scene transition area is smoothed before and after the scene transition, thereby generating a natural and smooth scene transition animation. There is no need to make key frames, only to define the scene texture maps before and after the transition. The starting position of the animation can also be flexibly set according to the needs of different scenes, thereby improving the overall flexibility of animation generation. In addition, compared with the model animation played frame by frame, the above implementation method does not need to load models and materials in each frame, and the pressure on memory and rendering is reduced. Therefore, the performance is also improved, and it can be executed smoothly on mobile terminals.

[0103] Optionally, based on a preset animation starting position, the step of determining a target transition area of ​​a scene transition animation in multiple animation time schedules includes: obtaining a first mask map, and obtaining a second mask map; according to preset scaling parameters, scaling and fusing the first mask map and the second mask map along with multiple animation time schedules to obtain a third mask map corresponding to each animation time schedule; wherein the third mask map is used to divide the mask area, the non-mask area and the mask transition area; with the preset animation starting position as the center, based on the mask transition area in the third mask map, obtaining the target transition area of ​​the scene transition animation in multiple animation time schedules.

[0104] Optionally, the preset scaling parameters include: a first scaling factor and a second scaling factor that change with the animation time progress; according to the preset scaling parameters, scaling and fusing the first mask map and the second mask map with multiple animation time progresses to obtain a third mask map corresponding to each animation time progress, comprising: multiplying the first mask map and the second mask map by the first scaling factor and the second scaling factor corresponding to each animation time progress, respectively, to obtain the first scaling map and the second scaling map corresponding to each animation time progress; wherein the first scaling factor is greater than the second scaling factor; subtracting the second scaling map from the first scaling map to obtain a third mask map containing a preset shape corresponding to each animation time progress; wherein the preset shape is used to indicate a mask transition area.

[0105] Optionally, the step of obtaining the second mask map includes: inverting the first mask map to obtain an inverted first mask map; and superimposing noise on the inverted first mask map to obtain the second mask map.

[0106] Optionally, based on the first texture map and the second texture map, a smooth transition processing is performed on the target transition area of ​​each animation time progress between a pre-transition state and a post-transition state to obtain the step of scene transition animation of the target scene, including: obtaining a target mask map corresponding to each animation time progress; wherein the target mask map contains a mask transition area, and the mask transition area corresponds to the target transition area of ​​the scene transition animation; performing edge blur processing on the mask transition area in the target mask map to obtain a target blur map corresponding to each animation time progress; based on the target blur map corresponding to each animation time progress, interpolating and sampling the first texture map and the second texture map to obtain the scene transition animation of the target scene.

[0107] Optionally, the step of performing edge blurring on the mask transition area in the target mask map to obtain a target blurred map corresponding to each animation time progress includes: adjusting the grayscale of a preset noise map to obtain a target noise map; multiplying the target mask map corresponding to each animation time progress by the target noise map to obtain a target blurred map corresponding to each animation time progress.

[0108] Optionally, based on the target blur map corresponding to each animation time progress, the first texture map and the second texture map are interpolated and sampled to obtain the scene transition animation of the target scene, comprising: for each animation time progress, using the pixel value in the first texture map as the starting value of the interpolation function, the pixel value in the second texture map as the end value of the interpolation function, the pixel value in the target blur map as the interpolation ratio value of the interpolation function, and using the result of the interpolation function as the scene state corresponding to each animation time progress, to obtain the scene transition animation of the target scene.

[0109] Optionally, after the step of performing edge blurring on the mask transition area in the target mask map to obtain the target blurred map corresponding to each animation time progress, the method further includes: for each animation time progress, according to a preset undulation height parameter, offsetting the vertex height of the target transition area of ​​the target scene model to obtain the scene target model corresponding to each animation time progress; wherein the texture of the scene target model is sampled from the first texture map and / or the second texture map.

[0110] The computer program product of the scene transition animation generation method, device, electronic device and storage medium provided in the embodiments of the present disclosure includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

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

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

[0113] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

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

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

Claims

1. A method for generating a scene transition animation, characterized in that: The method comprises: Obtaining a first texture map indicating a state of the target scene before transition and a second texture map indicating a state of the target scene after transition; Based on a preset animation start position, determining a target transition area of ​​the scene transition animation at multiple animation time progresses; Based on the first texture map and the second texture map, a smooth transition process is performed on the target transition area of ​​each animation time progress between a pre-transition state and a post-transition state to obtain a scene transition animation of the target scene.

2. The method according to claim 1, characterized in that The step of determining the target transition area of ​​the scene transition animation in multiple animation time schedules based on the preset animation starting position includes: Obtaining a first mask map, and obtaining a second mask map; According to preset scaling parameters, scaling and fusing the first mask map and the second mask map along with multiple animation time progresses to obtain a third mask map corresponding to each animation time progress; wherein the third mask map is used to divide the mask area, the non-mask area and the mask transition area; Taking the preset animation start position as the center and based on the mask transition area in the third mask map, the target transition area of ​​the scene transition animation in multiple animation time progresses is obtained.

3. The method according to claim 2, characterized in that The preset scaling parameters include: a first scaling factor and a second scaling factor that vary with the animation time progress; The step of scaling and fusing the first mask map and the second mask map along with multiple animation time progresses according to preset scaling parameters to obtain a third mask map corresponding to each animation time progress includes: Multiplying the first mask map and the second mask map by the first scaling factor and the second scaling factor corresponding to each animation time progress respectively, to obtain the first scaling map and the second scaling map corresponding to each animation time progress; wherein the first scaling factor is greater than the second scaling factor; The second scaling map is subtracted from the first scaling map to obtain a third mask map containing a preset shape corresponding to each animation time progress; wherein the preset shape is used to indicate a mask transition area.

4. The method according to claim 2, characterized in that: The steps of obtaining the second mask map include: Performing color inversion processing on the first mask map to obtain an inverted first mask map; The noise is superimposed on the inverted first mask map to obtain the second mask map.

5. The method according to claim 1, characterized in that The step of performing smooth transition processing of a pre-transition state and a post-transition state on a target transition area of ​​each animation time progress based on the first texture map and the second texture map to obtain a scene transition animation of the target scene comprises: Obtaining a target mask map corresponding to each animation time progress; wherein the target mask map includes a mask transition area, and the mask transition area corresponds to a target transition area of ​​the scene transition animation; Performing edge blur processing on the mask transition area in the target mask map to obtain a target blur map corresponding to each animation time progress; Based on the target blur map corresponding to each animation time progress, the first texture map and the second texture map are interpolated and sampled to obtain the scene transition animation of the target scene.

6. The method according to claim 5, characterized in that The step of performing edge blurring processing on the mask transition area in the target mask map to obtain the target blurring map corresponding to each animation time progress comprises: Adjust the grayscale of the preset noise map to obtain the target noise map; The target mask map corresponding to each animation time progress is multiplied by the target noise map to obtain the target blur map corresponding to each animation time progress.

7. The method according to claim 5, characterized in that The step of performing interpolation sampling on the first texture map and the second texture map based on the target blur map corresponding to each animation time progress to obtain the scene transition animation of the target scene comprises: For each animation time progress, the pixel value in the first texture map is used as the starting value of the interpolation function, the pixel value in the second texture map is used as the end value of the interpolation function, the pixel value in the target blurred map is used as the interpolation ratio value of the interpolation function, and the result of the interpolation function is used as the scene state corresponding to each animation time progress to obtain the scene transition animation of the target scene.

8. The method according to claim 5, characterized in that After the step of performing edge blurring processing on the mask transition area in the target mask map to obtain the target blurring map corresponding to each animation time progress, the method further includes: For each animation time progress, according to the preset undulation height parameter, the vertex height of the target transition area of ​​the target scene model is offset to obtain the scene target model corresponding to each animation time progress; The texture of the scene target model is sampled from the first texture map and / or the second texture map.

9. A device for generating a scene transition animation, characterized in that: The device comprises: A response module, used to obtain a first texture map indicating a state of the target scene before the transition and a second texture map indicating a state of the target scene after the transition; A determination module, used to determine a target transition area of ​​the scene transition animation at multiple animation time progresses based on a preset animation start position; A processing module is used to perform smooth transition processing between a pre-transition state and a post-transition state on a target transition area of ​​each animation time progress based on the first texture map and the second texture map, so as to obtain a scene transition animation of the target scene.

10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for generating the scene transition animation according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method for generating a scene transition animation according to any one of claims 1 to 8.