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

By generating dynamic masking information using a sky sphere model and combining it with scene textures to achieve automated scene switching, this solution addresses the issues of poor reusability and high art costs associated with scene switching, providing a low-cost, high-performance scene switching solution.

CN121544759APending Publication Date: 2026-02-17NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511654206.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In existing technologies, scene transitions require customized special effects images, which have poor reusability and high art costs.

Method used

Dynamic masking information is generated using a sky sphere model. Combined with the sky sphere textures of the first and second scenes, the texture display of each frame during scene switching is controlled by the dynamic masking information, thereby achieving automated scene switching.

Benefits of technology

It achieves low-cost, high-performance, and highly reusable scene switching control, enhancing the realism and visual experience of scene switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121544759A_ABST
    Figure CN121544759A_ABST
Patent Text Reader

Abstract

The invention provides a scene switching animation generation method and device, electronic equipment and a storage medium, and relates to the technical field of rendering. The method comprises the following steps: in response to a scene switching event, generating dynamic mask information according to a sky ball model; the sky ball model comprises information of each vertex forming a scene; obtaining the sky ball texture of the first scene and the sky ball texture of the second scene; and switching the first scene to the second scene according to the sky ball texture of the first scene, the sky ball texture of the second scene and the dynamic mask information. According to the method, the sky ball model is adopted as a carrier of the scene, texture sampling is controlled to be performed on the sky ball texture of the first scene and the sky ball texture of the second scene based on the dynamic mask information generated by the sky ball model, so that the scene switching effect is controlled, automatic scene switching animation is realized, and the scene switching efficiency is improved. And scene switching control with low cost, high performance and high reusability is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of rendering technology, and more specifically, to a method, apparatus, electronic device, and storage medium for generating scene transition animations. Background Technology

[0002] In game scene development, in order to optimize the game experience, support gameplay logic, and enhance immersion, some scene switching is usually carried out, such as switching from one scene to another, or switching from a daytime scene to a nighttime scene.

[0003] Currently, scene switching is controlled by pre-creating a special effects image the same size as the screen, then overlaying the special effects image onto the screen, and using two-dimensional special effects to achieve scene switching.

[0004] However, the above methods require customized production of special effects images for different scene transitions, resulting in poor reusability and high art costs. Summary of the Invention

[0005] The purpose of this application is to address the shortcomings of the prior art by providing a method, apparatus, electronic device, and storage medium for generating scene transition animations, so as to achieve automated scene transition control, improve the reusability of scene transition control, and reduce art costs.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a method for generating scene transition animations, displaying a first scene in the user interface of a terminal, the method comprising: In response to a scene switching event, dynamic masking information is generated based on a sky sphere model; the sky sphere model contains information about each vertex that constitutes the scene; the dynamic masking information includes masking information corresponding to each frame during the scene switching process; Obtain the sky sphere texture of the first scene and the sky sphere texture of the second scene; Based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information, the first scene is switched to the second scene.

[0007] Secondly, embodiments of this application also provide a scene switching animation generation device to display a first scene in the user interface of a terminal. The device includes: a generation module, an acquisition module, and a processing module. The generation module is used to generate dynamic masking information based on the sky sphere model in response to a scene switching event; the sky sphere model contains information about each vertex that constitutes the scene; the dynamic masking information includes masking information corresponding to each frame during the scene switching process. The acquisition module is used to acquire the sky sphere texture of the first scene and the sky sphere texture of the second scene; The processing module is used to switch the first scene to the second scene based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information.

[0008] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the scene switching animation generation method provided in the first aspect.

[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which is executed by a processor to perform the scene switching animation generation method provided in the first aspect.

[0010] The beneficial effects of this application are: This application provides a method, apparatus, electronic device, and storage medium for generating scene transition animations, comprising: generating dynamic masking information based on a sky sphere model in response to a scene transition event; the sky sphere model includes vertex information constituting the scene; acquiring the sky sphere textures of a first scene and a second scene; and switching the first scene to the second scene based on the sky sphere textures of the first scene, the second scene, and the dynamic masking information. This method uses a sky sphere model as the carrier of the scene, and controls texture sampling of the sky sphere textures of the first and second scenes based on the dynamic masking information generated by the sky sphere model, thereby controlling the scene transition effect and achieving automated scene transition animations. This results in low-cost, high-performance, and highly reusable scene transition control. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart illustrating a scene transition animation generation method provided in an embodiment of this application; Figure 2 A flowchart illustrating another scene switching animation generation method provided in this application embodiment; Figure 3A schematic diagram illustrating a sky sphere model and its bounding box is provided for an embodiment of this application. Figure 4 A flowchart illustrating another scene switching animation generation method provided in this application embodiment; Figure 5 A flowchart illustrating another scene switching animation generation method provided in this application embodiment; Figure 6 A flowchart illustrating another scene switching animation generation method provided in this application embodiment; Figure 7 A schematic diagram of the first axis result provided in the embodiments of this application; Figure 8 A flowchart illustrating another scene switching animation generation method provided in this application embodiment; Figure 9 A schematic diagram showing the second axis results at different time values ​​provided in the embodiments of this application; Figure 10 This is a schematic diagram illustrating the target masking information corresponding to different time values ​​provided in the embodiments of this application. Figure 11 A flowchart illustrating another scene switching animation generation method provided in this application embodiment; Figure 12 This is a schematic diagram of a scene switching animation generation device provided in an embodiment of this application; Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0014] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0015] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0016] To address the shortcomings of existing methods, this solution provides a method for generating scene transition animations. It does not rely on texture animation creation but instead focuses on the inherent animation characteristics of the scene transition animation itself. Using a sky sphere model as the scene carrier, dynamic masking information is generated. This dynamic masking information contains masking information corresponding to each time frame during the scene transition. Based on this dynamic masking information, combined with the sky sphere textures of both the first and second scenes, a transition from the first scene to the second scene can be achieved, generating a transition animation. Specifically, the dynamic masking information controls the display of scene textures in each frame during the scene transition, thus achieving a gradual switch from the sky sphere texture of the first scene to the sky sphere texture of the second scene, achieving the desired scene transition effect.

[0017] Therefore, once the sky sphere model is determined, the vertex information of the scene can be obtained, and automated calculations can be performed according to this scheme to generate the final scene transition animation.

[0018] It's worth noting that the core of this solution is to achieve a controllable, outward-progressing visual tearing or replacement effect through mathematical transformations of spatial coordinates combined with time-driven dynamic masking. This solution can be used to implement a "sky tearing effect," and also to achieve day-night transitions. For example, using a daytime sky sphere texture and a nighttime sky sphere texture, based on generated dynamic masking information, it can simulate the gradual transition from day to night. Alternatively, it can be used to switch map regions, such as transitioning from a forest to a desert in open-world games.

[0019] Figure 1 This is a flowchart illustrating a method for generating scene transition animations according to an embodiment of this application; the execution subject of this method can be a computer device, such as... Figure 1 As shown, the method may include: S101. In response to scene switching events, generate dynamic masking information based on the sky sphere model.

[0020] The sky sphere model contains information about each vertex that makes up the scene; the dynamic masking information includes the masking information corresponding to each frame during scene transitions.

[0021] A sky sphere is a virtual geometric structure used in 3D computer graphics and game development to render background environments. Its main function is to provide a visual background that appears infinitely distant, such as the sky, clouds, stars, distant mountains, or city skylines. It is a closed, three-dimensional structure that surrounds the entire scene, with the observer at its center. Due to the extreme distance, the patterns on the sky sphere do not undergo parallax changes (i.e., their position remains unchanged) regardless of camera movement, thus creating the visual illusion of "infinity."

[0022] The scenes displayed through the sky sphere model are more realistic, allowing players to see a continuous and seamless scene no matter which direction they look, as if they are enveloped by the entire scene. Based on this, scene transitions are implemented through the sky sphere model, allowing players to continue moving during scene transitions without affecting their activities, thus enhancing the realism and visual experience of scene transitions.

[0023] Initially, the displayed scene can be the first scene, that is, the scene with the old texture. When the scene switching event is detected, dynamic masking information can be generated according to the sky sphere model. The sky sphere model contains the vertex information of all the vertices that make up the scene. In this embodiment, the sky scene switching is taken as an example, so the sky sphere model contains the vertex information of all the vertices that make up the sky.

[0024] The generated dynamic masking information includes masking information for consecutive time frames, that is, it includes masking information for each time frame between the start and end of the switching.

[0025] Masking information can be understood as a mask map. It contains the mask values ​​of each vertex and is used to control the texture information to be displayed at each vertex.

[0026] In some embodiments, dynamic masking information can be generated in advance based on the sky sphere model according to the scene switching animation to be implemented, and the dynamic masking information can be triggered and invoked after responding to the scene switching event.

[0027] S102. Obtain the sky sphere texture of the first scene and the sky sphere texture of the second scene.

[0028] The first scene can be the old scene before the switch, and the second scene can be the new scene after the switch. The sky sphere texture in the first scene can be understood as the normal sky texture that we usually see, and the sky sphere texture in the second scene can be understood as the new texture that appears after the sky is torn open.

[0029] The sky sphere textures for both the first and second scenes can be obtained directly from the texture database.

[0030] S103. Based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information, switch the first scene to the second scene.

[0031] Based on the dynamic masking information, the sampling texture information of each vertex in each frame can be controlled during scene transitions. The masking information in each frame indicates whether the pixel value of each vertex is 0 or 1. When the vertex's pixel value is 1, the control takes the vertex's texture information from the sky sphere texture of the first scene; when the vertex's pixel value is 0, the control takes the vertex's texture information from the sky sphere texture of the second scene. By sampling each frame, the scene image of each frame can be displayed. By continuously displaying the scene images of each frame, the scene transition animation is shown. Finally, the control switches from the first scene to the second scene.

[0032] In summary, the scene transition animation generation method provided in this embodiment includes: responding to a scene transition event, generating dynamic masking information based on a sky sphere model; the sky sphere model contains vertex information constituting the scene; acquiring the sky sphere textures of a first scene and a second scene; and switching the first scene to the second scene based on the sky sphere textures of the first scene, the second scene, and the dynamic masking information. This method uses a sky sphere model as the carrier of the scene, and based on the dynamic masking information generated by the sky sphere model, controls texture sampling of the sky sphere textures of the first and second scenes to control the scene transition effect, achieving automated scene transition animation and realizing low-cost, high-performance, and highly reusable scene transition control.

[0033] Figure 2 This is a flowchart illustrating another scene transition animation generation method provided in an embodiment of this application; optionally, in step S101, generating dynamic masking information based on the sky sphere model includes: S201. Determine the bounding box information of the sky sphere model based on the sky sphere model.

[0034] A bounding box is a simple geometric shape that completely encloses a sky sphere model and is often used to simplify related mathematical calculations.

[0035] Figure 3 A schematic diagram illustrating a sky sphere model and its bounding box is provided for an embodiment of this application, as shown below. Figure 3 As shown, the sky sphere model is the sky sphere located in the middle of the bounding box, which is the cube that encloses the sky sphere. Figure 3 The system also identifies the defined coordinate system, where the horizontal direction is the x-axis, the vertical direction is the y-axis, and the direction pointing inwards from the screen is the z-axis.

[0036] S202. Based on the bounding box information, normalize the original coordinate information of each vertex in the sky sphere model to obtain the target coordinate information of each vertex.

[0037] Based on the bounding box information, the maximum and minimum points of the bounding box can be found. Then, based on the maximum and minimum points, the original coordinate information of each vertex can be normalized to obtain the target coordinate information of each vertex.

[0038] S203. Generate the first axis result and the second axis result based on the target coordinate information of each vertex.

[0039] The target coordinate information of each vertex is three-dimensional. In this embodiment, the coordinate values ​​of the first axis and the second axis of each vertex can be processed separately. The first axis can refer to the x-axis in the set coordinate system, and the second axis can refer to the z-axis in the set coordinate system.

[0040] Based on the target coordinate information of the vertex, the x-coordinate and z-coordinate values ​​of the vertex can be determined. By processing the x-coordinate values ​​of each vertex, the first axis result, i.e., the x-axis processing result, can be obtained. By processing the z-coordinate values ​​of each vertex, the second axis result, i.e., the z-axis processing result, can be obtained.

[0041] It's worth noting that the first and second axis results are also dynamically generated, meaning that a first and second axis result are generated for each frame. The first axis result is used to control the gradual symmetrical transition of the second scene from the center outwards; the second axis result is used to control the transition progress of scene switching in the direction pointing inwards from the screen.

[0042] S204. Based on the results of the first axis and the second axis, obtain the dynamic masking information.

[0043] Based on the first axis result and the second axis result of each frame, the masking information of each frame can be determined, and thus the masking information of each frame constitutes dynamic masking information.

[0044] Figure 4 This is a flowchart illustrating another scene transition animation generation method provided in an embodiment of this application; optionally, in step S202, the original coordinate information of each vertex in the sky sphere model is normalized according to the bounding box information to obtain the target coordinate information of each vertex, including: S301. Determine the maximum and minimum points of the bounding box.

[0045] Continue as Figure 3As shown, with the center point of the sky sphere as the origin, the maximum and minimum points of the bounding box can be determined respectively. The maximum point is also the Max point in the figure, and the minimum point is also the Min point in the figure.

[0046] S302. Determine the range of values ​​based on the maximum and minimum values.

[0047] The spatial range of the entire bounding box can be determined by the maximum and minimum points, which is the numerical range. This numerical range refers to the range of coordinate information of each vertex.

[0048] Assume the minimum point of the bounding box is The maximum point is The numerical range can then be calculated using the following formula: ,in, This indicates the range of values ​​obtained from the calculation.

[0049] S303. Based on the original coordinate information and numerical range of each vertex, perform normalization calculations to obtain the target coordinate information of each vertex.

[0050] Based on calculations This can map the original coordinate information of each vertex to the range of 0-1, thus achieving normalization.

[0051] The original coordinate information of each vertex can be normalized using the following formula:

[0052] in, Represents the original coordinate information of the vertex. This represents the target coordinate information of a vertex. The values ​​of each component (x, y, z) in the vertex's target coordinate information are between 0 and 1.

[0053] The purpose of normalizing the original coordinates of the vertices is to "unify the measurement standard". Since the sky sphere model may be different in size and position in different scenarios, the range of coordinate values ​​of each vertex may vary greatly. By converting the range of coordinate values ​​of each vertex to a standard format between 0 and 1, subsequent processing operations can be universal, so the solution can be applied to any scenario without redesign, which greatly improves reusability.

[0054] Figure 5 This is a flowchart illustrating another scene transition animation generation method provided in an embodiment of this application; optionally, in step S203, generating a first axis result and a second axis result based on the target coordinate information of each vertex includes: S401. Perform central symmetry processing on the coordinate values ​​of the first axis in the target coordinate information of each vertex to obtain the first axis result.

[0055] This embodiment focuses on the numerical changes of each vertex along the x-axis. By performing central symmetry processing on the x-axis components of the target coordinate information of each vertex, the symmetry score of each vertex in the x-axis direction, i.e., the first axis result, can be obtained. Among them, the symmetry score of each vertex in the x-axis direction exhibits a linear symmetry characteristic with the center as 0 and increasing to 1 on both sides.

[0056] Before the central symmetry processing, the x-axis components of each vertex range from 0 to 1. For example, the left side is 0, the middle is 0.5, and the right side is 1. We want to achieve the effect of the middle being smaller and the two sides being larger, and the left and right sides being symmetrical. Therefore, we can obtain the first axis result by performing central symmetry processing on the x-axis components.

[0057] Based on the results of the first axis, we can simulate the visual effect of tearing starting from the middle and spreading to both sides. That is, during the scene switching process, the second scene starts to be displayed from the middle and spreads symmetrically to both sides until it is completely switched to the second scene.

[0058] S402. Based on the game time and the preset change rate, the coordinate values ​​of the second axis in the target coordinate information of each vertex are dynamically changed to obtain the second axis result.

[0059] This embodiment focuses on the numerical changes of each vertex along the z-axis. The z-axis components can be periodically modulated using a time variable to obtain the processed z-value, i.e., the second-axis result. This second-axis result changes cyclically over time, allowing control over the speed and rhythm of the tearing process.

[0060] Game time refers to how much time has passed since the start of the game. It can be understood as the timestamp of the current frame, since the game screen is continuously displayed based on the rendering of each frame. For each frame, the timestamp of the current frame can be obtained as the game time.

[0061] The preset speed change can be a preset speed value, which can be used to adjust how fast the speed changes.

[0062] This step enables the scene transition to unfold gradually in the screen direction.

[0063] Figure 6 This is a flowchart illustrating another scene transition animation generation method provided in this application embodiment; optionally, in step S401, the coordinate values ​​of the first axis in the target coordinate information of each vertex are subjected to central symmetry processing to obtain the first axis result, including: S501. Based on the preset distance, process the coordinate values ​​of the first axis of each vertex in the current frame, and perform an absolute value operation on the processing result to determine the intermediate result of each vertex in the current frame.

[0064] The preset distance is used to control the movement of the coordinate origin to the center of the scene.

[0065] This embodiment takes the calculation of any current frame as an example, and the first axis result of each vertex can be calculated using the following formula:

[0066] in, This represents the x-axis component of a vertex in the current frame. This represents the first axis result of the vertex, with a default distance of 0.5. This is for taking the absolute value.

[0067] This represents the deviation of the vertex from the center. The purpose of taking the absolute value is to eliminate the influence of the sign of the vertex coordinates on the result, and only care about the distance of the vertex from the center point, not which side of the center point the vertex is located on.

[0068] S502. According to preset parameters, scale the intermediate results of each vertex in the current frame to a specified range to obtain the first axis result of each vertex in the current frame.

[0069] Multiply the calculated result by 2 to obtain the calculated result. It can vary between 0 and 1.

[0070] The above calculations result in a value of 0 at the very center vertex (x=0.5); the value increases as you move left or right; and reaches 1 at the very edge (x=0 or x=1).

[0071] Figure 7 This is a schematic diagram of the image display of the first axis result provided in the embodiments of this application. Since 0 represents black and 1 represents white, and values ​​between 0 and 1 represent different shades of gray, the first axis result can be displayed as follows: Figure 7 The effect shown.

[0072] Figure 8 This is a flowchart illustrating another scene transition animation generation method provided in this application embodiment; optionally, in step S402, based on game time and a preset change rate, the coordinate values ​​of the second axis in the target coordinate information of each vertex are dynamically changed to obtain the second axis result, including: S601. Determine the target timestamp of the current frame based on the timestamp of the current frame and the preset speed threshold.

[0073] The target timestamp of the current frame can be calculated using the following formula:

[0074] in, The timestamp of the current frame, which is the actual time of the current frame; This refers to the target timestamp of the current frame, which is the timestamp adjusted from the real time. This indicates a preset speed threshold, used to adjust the rate of speed change; To indicate taking the decimal, by... It can retrieve the 0-1 variables of the loop. By following the steps above, you can adjust the rate at which time changes, making the time value faster or slower.

[0075] Calculated It's like a progress bar that automatically moves forward as the current frame changes, and then starts again from the beginning after reaching the end.

[0076] S602. Based on the target timestamp of the current frame and the coordinate values ​​of the second axis of each vertex in the current frame, determine the second axis result of each vertex in the current frame.

[0077] Next, based on the target timestamp of the current frame obtained from the above calculation, the second axis result of the vertex can be calculated using the following formula:

[0078] in, The z-axis component of the vertex. The result of the second axis of the vertex.

[0079] Based on the target timestamp, the z-axis component can be range-mapped to achieve dynamic processing of z-axis component changes.

[0080] Figure 9 This is a schematic diagram showing the second axis results corresponding to different time values ​​provided in the embodiments of this application. Figure 9 (a) in the middle is The diagram shows the result on the second axis when the value is 0.0. Figure 9 (b) in the middle is The diagram shows the result for the second axis when the value is 0.25. Optionally, in step S204, dynamic masking information is obtained based on the first axis result and the second axis result, including: performing step processing on the first axis result and the second axis result of each vertex in the current frame to obtain the target masking information of the current frame. The target masking information includes the mask value corresponding to each vertex, and the mask value is 0 or 1.

[0081] Next, the results of the first axis and the second axis can be processed by step operation to obtain the target masking information, as shown in the following formula:

[0082] in, This represents the mask value of each vertex, also known as the mask value.

[0083] The Step function is if the parameter Greater than the parameter Output 1 if parameter Less than parameter Output 0.

[0084] For example, at the initial moment, The value is very small (e.g., 0.1), and only the very middle small area satisfies this condition. ≤ Therefore, the area with an output of 0 is very small; the tear has just opened, and only the middle area displays the second scene. As time goes on... As the value increases (e.g., 0.5), more regions meet the conditions, the region that outputs 0 becomes wider, the tear becomes larger, and more regions successfully switch to the second scene.

[0085] At the same time, due to It's smaller in the middle and larger on both sides, so only the part closest to the middle is easy to satisfy. ≤ Since the edge area is never satisfied, the switching is "expanding from the center line to both sides".

[0086] Through the above calculations, the target mask information can be obtained, which is essentially a black and white image: black corresponds to a pixel value of 0, and white corresponds to a pixel value of 1. A pixel value of 1 represents displaying the sky sphere texture of the first scene, and a pixel value of 0 represents displaying the sky sphere texture of the second scene.

[0087] By calculating the target masking information, spatial and temporal information can be combined to intelligently determine whether each vertex in each frame should display the sky sphere texture of the first scene or the sky sphere texture of the second scene during scene switching, thus realizing an automated and controllable scene switching mechanism.

[0088] Figure 10 This is a schematic diagram showing the target masking information corresponding to different time values ​​provided in the embodiments of this application. Figure 10 (a) in the middle is This illustrates the target masking information corresponding to a value of 0.0. Figure 10 (b) in the middle is This illustrates the target masking information corresponding to a value of 0.25. Figure 10 (c) in the middle is This illustrates the target masking information corresponding to a value of 0.5. Figure 10 (d) in the middle is This is a diagram illustrating the target masking information corresponding to a value of 0.75.

[0089] Figure 11 This is a flowchart illustrating another scene switching animation generation method provided in an embodiment of this application; optionally, in step S103, switching the first scene to the second scene based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and dynamic masking information includes: S701. Based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information, determine the target rendering texture of each vertex in the sky sphere model at each time frame.

[0090] The mask information corresponding to each frame is different. Based on the mask value corresponding to each vertex in the mask information, it can be determined whether to sample from the sky sphere texture of the first scene or the sky sphere texture of the second scene.

[0091] When the mask value corresponding to a vertex is 1, the target rendering texture of the vertex is sampled from the sky sphere texture of the first scene, that is, the texture information of the vertex at the corresponding position in the sky sphere texture of the first scene is sampled; when the mask value corresponding to a vertex is 0, the target rendering texture of the vertex is sampled from the sky sphere texture of the second scene, that is, the texture information of the vertex at the corresponding position in the sky sphere texture of the second scene is sampled.

[0092] S702. Render the scene in each time frame according to the target rendering texture of each vertex in each time frame, so as to realize the dynamic switching from the first scene to the second scene.

[0093] During scene transitions, the target rendering texture of each vertex in each frame is known, so the scene image of each frame can be generated, and the scene images of each time frame together constitute the scene transition animation.

[0094] like Figure 10 As shown, initially, the target mask information is white, that is, the mask value of all vertices is 1. At this time, the texture information of all vertices comes from the sky sphere texture of the first scene, so the first scene is displayed initially. During the process of switching from the first scene to the second scene, black gradually appears in the target mask information, and the black gradually expands. The black part corresponds to the display of the second scene, thus realizing the transition from the first scene to the second scene, until the second scene is completely switched.

[0095] In summary, the scene switching animation generation method provided in this embodiment includes: responding to a scene switching event, generating dynamic masking information based on a sky sphere model; the sky sphere model contains information about each vertex constituting the scene; and obtaining the sky sphere texture of the first scene and the sky sphere texture of the second scene. Based on the sky sphere textures of the first scene and the second scene, as well as dynamic masking information, the method switches from the first scene to the second scene. This method uses a sky sphere model as the scene carrier and, based on the dynamic masking information generated by the sky sphere model, controls texture sampling of the sky sphere textures of both the first and second scenes to control the scene switching effect, achieving automated scene switching animation. This results in low-cost, high-performance, and highly reusable scene switching control.

[0096] The following describes the apparatus, device, and storage medium used to execute the scene switching animation generation method provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.

[0097] Figure 12 This diagram illustrates a scene transition animation generation device provided in an embodiment of this application. The function implemented by this device corresponds to the steps performed by the method described above. This device can be understood as the aforementioned computer equipment or server, or the processor of a server, or it can be understood as a component independent of the aforementioned server or processor that implements the functions of this application under the control of the server, such as... Figure 12 As shown, the device includes: a generation module 100, an acquisition module 200, and a processing module 300; The generation module 100 is used to generate dynamic masking information based on the sky sphere model in response to scene switching events; the sky sphere model contains information about each vertex that constitutes the scene; the dynamic masking information includes masking information corresponding to each frame during scene switching. The acquisition module 200 is used to acquire the sky sphere texture of the first scene and the sky sphere texture of the second scene; The processing module 300 is used to switch the first scene to the second scene based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and dynamic masking information.

[0098] Optionally, the generation module 100 is specifically used to determine the bounding box information of the sky sphere model based on the sky sphere model; Based on the bounding box information, the original coordinate information of each vertex in the sky sphere model is normalized to obtain the target coordinate information of each vertex; Based on the target coordinate information of each vertex, generate the first axis result and the second axis result; Based on the results of the first axis and the second axis, dynamic masking information is obtained.

[0099] Optionally, the generation module 100 is specifically used to determine the maximum and minimum points of the bounding box; Determine the range of values ​​based on the maximum and minimum values; Based on the original coordinate information and numerical range of each vertex, normalization calculations are performed to obtain the target coordinate information of each vertex.

[0100] Optionally, the generation module 100 is specifically used to perform central symmetry processing on the coordinate values ​​of the first axis in the target coordinate information of each vertex to obtain the first axis result; Based on game time and preset change rate, the coordinate values ​​of the second axis in the target coordinate information of each vertex are dynamically changed to obtain the second axis result.

[0101] Optionally, the generation module 100 is specifically used to process the coordinate values ​​of the first axis of each vertex in the current frame according to a preset distance, and to perform an absolute value operation on the processing result to determine the intermediate result of each vertex in the current frame. The preset distance is used to control the movement of the coordinate origin to the center of the scene. Based on preset parameters, the intermediate results of each vertex in the current frame are scaled to a specified range to obtain the first axis result of each vertex in the current frame.

[0102] Optionally, the generation module 100 is specifically used to determine the target timestamp of the current frame based on the timestamp of the current frame and a preset speed threshold; Based on the target timestamp of the current frame and the coordinates of the second axis of each vertex in the current frame, determine the second axis result of each vertex in the current frame.

[0103] Optionally, the generation module 100 is specifically used to perform step processing on the first axis result of each vertex in the current frame and the second axis result of each vertex in the current frame to obtain the target mask information of the current frame. The target mask information includes the mask value corresponding to each vertex, and the mask value is 0 or 1. Dynamic masking information is constructed based on the target masking information of each frame.

[0104] Optionally, the processing module 300 is specifically used to determine the target rendering texture of each vertex in the sky sphere model at each time frame based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information. Based on the target rendering texture of each vertex in each time frame, the scene scene in each time frame is rendered to achieve dynamic switching from the first scene to the second scene.

[0105] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0106] The modules described above can be connected or communicate with each other via wired or wireless connections. Wired connections can include metal cables, optical fibers, hybrid cables, or any combination thereof. Wireless connections can include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any module can be divided into two or more units. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here.

[0107] Figure 13 A schematic diagram of an electronic device provided in this application embodiment includes: a processor 801, a storage medium 802, and a bus 803. The storage medium 802 stores machine-readable instructions executable by the processor 801. When the electronic device runs a scene switching animation generation method as described in the embodiment, the processor 801 communicates with the storage medium 802 via the bus 803. The processor 801 executes the machine-readable instructions to perform the following steps: In response to scene switching events, dynamic masking information is generated based on the sky sphere model; the sky sphere model contains information about each vertex that makes up the scene; the dynamic masking information includes the masking information corresponding to each frame during the scene switching process. Obtain the sky sphere texture of the first scene and the sky sphere texture of the second scene; Based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information, switch from the first scene to the second scene.

[0108] In one feasible implementation, when the processor 801 generates dynamic masking information based on the sky sphere model, it is specifically used to: determine the bounding box information of the sky sphere model based on the sky sphere model; Based on the bounding box information, the original coordinate information of each vertex in the sky sphere model is normalized to obtain the target coordinate information of each vertex; Based on the target coordinate information of each vertex, generate the first axis result and the second axis result; Based on the results of the first axis and the second axis, dynamic masking information is obtained.

[0109] In a feasible implementation, when the processor 801 performs normalization processing on the original coordinate information of each vertex in the sky sphere model based on the bounding box information to obtain the target coordinate information of each vertex, it is specifically used to: determine the maximum and minimum points of the bounding box. Determine the range of values ​​based on the maximum and minimum values; Based on the original coordinate information and numerical range of each vertex, normalization calculations are performed to obtain the target coordinate information of each vertex.

[0110] In a feasible implementation, when the processor 801 generates the first axis result and the second axis result based on the target coordinate information of each vertex, it specifically performs: central symmetry processing on the coordinate values ​​of the first axis in the target coordinate information of each vertex to obtain the first axis result; Based on game time and preset change rate, the coordinate values ​​of the second axis in the target coordinate information of each vertex are dynamically changed to obtain the second axis result.

[0111] In one feasible implementation, when the processor 801 performs centrosymmetric processing on the coordinate values ​​of the first axis in the target coordinate information of each vertex to obtain the first axis result, it specifically performs the following: Based on the preset distance, the coordinate values ​​of the first axis of each vertex in the current frame are processed, and the absolute value operation is performed on the processing result to determine the intermediate result of each vertex in the current frame. The preset distance is used to control the movement of the coordinate origin to the center of the scene. Based on preset parameters, the intermediate results of each vertex in the current frame are scaled to a specified range to obtain the first axis result of each vertex in the current frame.

[0112] In one feasible implementation, when the processor 801 performs dynamic change processing on the coordinate values ​​of the second axis in the target coordinate information of each vertex based on game time and a preset change rate to obtain the second axis result, it is specifically used for: Determine the target timestamp of the current frame based on the timestamp of the current frame and the preset speed threshold; Based on the target timestamp of the current frame and the coordinates of the second axis of each vertex in the current frame, determine the second axis result of each vertex in the current frame.

[0113] In a feasible implementation, when the processor 801 executes the process of obtaining dynamic masking information based on the first axis result and the second axis result, it is specifically used to: perform step processing on the first axis result and the second axis result of each vertex in the current frame to obtain the target masking information of the current frame. The target masking information includes the mask value corresponding to each vertex, and the mask value is 0 or 1. Dynamic masking information is constructed based on the target masking information of each frame.

[0114] In a feasible implementation, when the processor 801 switches from the first scene to the second scene based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information, it is specifically used to: determine the target rendering texture of each vertex in the sky sphere model at each time frame based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information. Based on the target rendering texture of each vertex in each time frame, the scene scene in each time frame is rendered to achieve dynamic switching from the first scene to the second scene.

[0115] The storage medium 802 stores program code, which, when executed by the processor 801, causes the processor 801 to perform various steps in the scene switching animation generation method according to various exemplary embodiments of this application as described in the "Exemplary Methods" section above.

[0116] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0117] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. Storage medium 802 in the embodiments of this application can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0118] Optionally, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is executed by a processor, and the processor performs the following steps: In response to scene switching events, dynamic masking information is generated based on the sky sphere model; the sky sphere model contains information about each vertex that makes up the scene; the dynamic masking information includes the masking information corresponding to each frame during the scene switching process. Obtain the sky sphere texture of the first scene and the sky sphere texture of the second scene; Based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information, switch from the first scene to the second scene.

[0119] In one feasible implementation, when the processor 801 generates dynamic masking information based on the sky sphere model, it is specifically used to: determine the bounding box information of the sky sphere model based on the sky sphere model; Based on the bounding box information, the original coordinate information of each vertex in the sky sphere model is normalized to obtain the target coordinate information of each vertex; Based on the target coordinate information of each vertex, generate the first axis result and the second axis result; Based on the results of the first axis and the second axis, dynamic masking information is obtained.

[0120] In a feasible implementation, when the processor 801 performs normalization processing on the original coordinate information of each vertex in the sky sphere model based on the bounding box information to obtain the target coordinate information of each vertex, it is specifically used to: determine the maximum and minimum points of the bounding box. Determine the range of values ​​based on the maximum and minimum values; Based on the original coordinate information and numerical range of each vertex, normalization calculations are performed to obtain the target coordinate information of each vertex.

[0121] In a feasible implementation, when the processor 801 generates the first axis result and the second axis result based on the target coordinate information of each vertex, it specifically performs: central symmetry processing on the coordinate values ​​of the first axis in the target coordinate information of each vertex to obtain the first axis result; Based on game time and preset change rate, the coordinate values ​​of the second axis in the target coordinate information of each vertex are dynamically changed to obtain the second axis result.

[0122] In one feasible implementation, when the processor 801 performs centrosymmetric processing on the coordinate values ​​of the first axis in the target coordinate information of each vertex to obtain the first axis result, it specifically performs the following: Based on the preset distance, the coordinate values ​​of the first axis of each vertex in the current frame are processed, and the absolute value operation is performed on the processing result to determine the intermediate result of each vertex in the current frame. The preset distance is used to control the movement of the coordinate origin to the center of the scene. Based on preset parameters, the intermediate results of each vertex in the current frame are scaled to a specified range to obtain the first axis result of each vertex in the current frame.

[0123] In one feasible implementation, when the processor 801 performs dynamic change processing on the coordinate values ​​of the second axis in the target coordinate information of each vertex based on game time and a preset change rate to obtain the second axis result, it is specifically used for: Determine the target timestamp of the current frame based on the timestamp of the current frame and the preset speed threshold; Based on the target timestamp of the current frame and the coordinates of the second axis of each vertex in the current frame, determine the second axis result of each vertex in the current frame.

[0124] In a feasible implementation, when the processor 801 executes the process of obtaining dynamic masking information based on the first axis result and the second axis result, it is specifically used to: perform step processing on the first axis result and the second axis result of each vertex in the current frame to obtain the target masking information of the current frame. The target masking information includes the mask value corresponding to each vertex, and the mask value is 0 or 1. Dynamic masking information is constructed based on the target masking information of each frame.

[0125] In a feasible implementation, when the processor 801 switches from the first scene to the second scene based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information, it is specifically used to: determine the target rendering texture of each vertex in the sky sphere model at each time frame based on the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic masking information. Based on the target rendering texture of each vertex in each time frame, the scene scene in each time frame is rendered to achieve dynamic switching from the first scene to the second scene.

[0126] In this embodiment, the computer program, when run by the processor, can also execute other machine-readable instructions to perform other methods as described in the embodiments. For details on the specific execution steps and principles, please refer to the description of the embodiments, which will not be repeated here.

[0127] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0129] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0130] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for generating a scene transition animation, characterized by, Displaying a first scene in a user interface of a terminal, the method comprising: generating dynamic mask information according to a sky sphere model in response to a scene switching event; the sky sphere model containing vertex information of the scene; the dynamic mask information including mask information corresponding to each frame in the scene switching process; obtaining a sky sphere texture of the first scene and a sky sphere texture of a second scene; switching the first scene to the second scene according to the sky sphere texture of the first scene, the sky sphere texture of the second scene and the dynamic mask information.

2. The method of claim 1, wherein, The generating dynamic mask information according to the sky sphere model comprises: determining bounding box information of the sky sphere model according to the sky sphere model; normalizing original coordinate information of each vertex in the sky sphere model to obtain target coordinate information of each vertex according to the bounding box information; generating a first axis result and a second axis result according to the target coordinate information of each vertex; obtaining the dynamic mask information according to the first axis result and the second axis result.

3. The method of claim 2, wherein, The normalizing original coordinate information of each vertex in the sky sphere model to obtain target coordinate information of each vertex according to the bounding box information comprises: determining a maximum point and a minimum point of the bounding box; determining a numerical range according to the maximum point and the minimum point; performing normalization calculation according to the original coordinate information of each vertex and the numerical range to obtain the target coordinate information of each vertex.

4. The method of claim 2, wherein, The generating a first axis result and a second axis result according to the target coordinate information of each vertex comprises: performing center-symmetry processing on the coordinate value of the first axis in the target coordinate information of each vertex to obtain the first axis result; performing dynamic change processing on the coordinate value of the second axis in the target coordinate information of each vertex based on game time and a preset change speed to obtain the second axis result.

5. The method of claim 4, wherein, The performing center-symmetry processing on the coordinate value of the first axis in the target coordinate information of each vertex to obtain the first axis result comprises: processing the coordinate value of the first axis of each vertex in the current frame according to a preset distance, and performing an absolute value operation on the processing result to determine an intermediate result of each vertex in the current frame, the preset distance being used to control moving the coordinate origin to the scene center; scaling the intermediate result of each vertex in the current frame to a specified range according to a preset parameter to obtain the first axis result of each vertex in the current frame.

6. The method of claim 4, wherein, The performing dynamic change processing on the coordinate value of the second axis in the target coordinate information of each vertex based on game time and a preset change speed to obtain the second axis result comprises: determining a target timestamp of the current frame according to a timestamp of the current frame and a preset speed threshold; determining the second axis result of each vertex in the current frame according to the target timestamp of the current frame and the coordinate value of the second axis of each vertex in the current frame.

7. The method of claim 2, wherein, The obtaining the dynamic mask information according to the first axis result and the second axis result comprises: The first axis result of each vertex in the current frame and the second axis result of each vertex in the current frame are step-processed to obtain target mask information of the current frame, the target mask information including mask values corresponding to each vertex, the mask value being 0 or 1; According to the target mask information of each frame, the dynamic mask information is constructed.

8. The method of claim 1, wherein, The first scene is switched to the second scene according to the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic mask information, including: According to the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic mask information, a target rendering texture of each vertex in the sky sphere model on each time frame is determined; According to the target rendering texture of each vertex on each time frame, a scene picture on each time frame is rendered to realize dynamic switching of the first scene to the second scene.

9. A scene cut animation generation apparatus characterized by comprising: A first scene is displayed in a user interface of a terminal, and the device includes a generation module, an acquisition module, and a processing module; The generation module is configured to generate dynamic mask information according to a sky sphere model in response to a scene switching event, the sky sphere model containing vertex information of a scene, and the dynamic mask information including mask information corresponding to each frame in a scene switching process; The acquisition module is configured to acquire a sky sphere texture of the first scene and a sky sphere texture of a second scene; The processing module is configured to switch the first scene to the second scene according to the sky sphere texture of the first scene, the sky sphere texture of the second scene, and the dynamic mask information.

10. An electronic device, comprising: including: A processor, a storage medium, and a bus, the storage medium storing program instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the scene switching animation generation method according to any one of claims 1 to 8.

11. A computer readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by the processor to execute the scene switching animation generation method according to any one of claims 1 to 8.