Method and device for generating interface transition animation, electronic equipment and storage medium
By generating interface transition animations that simulate three-dimensional motion effects on the terminal device, the problem of poor animation substitution during the switching of two-dimensional game interfaces in the prior art is solved, and a more realistic animation effect is achieved.
Patent Information
- Application Number
- CN202311240563.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2043-09-22
AI Technical Summary
In the prior art, the interface transition animation generated during the switching of two-dimensional game interfaces has a poor sense of substitution, and it is impossible to simulate the motion effect of the lens in a three-dimensional scene.
By providing the graphic user interface of the target game on the terminal device, in response to the switching interface event, determining the game interface to be transferred, and determining its scaling ratio based on the position information of the virtual object, generating an interface transition animation that simulates the three-dimensional motion effect.
When switching between two-dimensional game interfaces, the interface transition animation that simulates three-dimensional motion effects is realized, which increases the sense of substitution of animation effects and reduces the cost of scene modeling.
Smart Images

Figure CN119680191A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of texture generation, and in particular to a method, device, electronic device and storage medium for generating an interface transition animation. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] At present, two-dimensional game interfaces or activities often involve switching from one two-dimensional game interface to another two-dimensional game interface, such as switching from a main game interface to a different sub-game interface, or switching from a sub-game interface to a main game interface or another sub-game interface. When switching game interfaces, it is usually necessary to generate an interface transition animation during the interface switching process. However, in the current related technology, the generated interface transition animation has a poor sense of immersion, and the switching of two-dimensional game interfaces cannot simulate the movement effect of the camera in a three-dimensional scene. Summary of the invention
[0004] In view of this, the present application proposes a method, device, electronic device and storage medium for generating an interface transition animation.
[0005] The present application provides a method for generating an interface transition animation, which provides a graphical user interface of a target game through a terminal device, wherein the target game includes multiple game interfaces, and the game interface includes virtual objects; the method includes:
[0006] In response to triggering an interface switching event in a first game interface, determining a second game interface to be transferred to based on the interface switching event; wherein the first game interface is a game screen corresponding to a first virtual perspective, the second game interface is a game screen corresponding to a second virtual perspective, and the first game interface and the second game interface are two-dimensional game interfaces;
[0007] Determine a main game interface corresponding to the first game interface and the second game interface;
[0008] Determine the position information corresponding to the virtual object in the main game interface, and determine the scaling ratio of the virtual object based on the position information corresponding to the virtual object; wherein the position information is used to indicate the distance position relationship between the virtual object and the virtual perspective of the main game interface;
[0009] An interface transition animation is generated based on the scaling ratio of the virtual object to switch from the first game interface to the second game interface, so as to simulate a three-dimensional motion effect of moving from the first virtual perspective to the second virtual perspective.
[0010] Based on the same inventive concept, the exemplary embodiment of the present application further provides a device for generating an interface transition animation, which provides a graphical user interface of a target game through a terminal device, wherein the target game includes multiple game interfaces, and the game interface includes virtual objects; the device includes:
[0011] A response module, in response to triggering an interface switching event in a first game interface, determines a second game interface to be transferred to based on the interface switching event; wherein the first game interface is a game screen corresponding to a first virtual perspective, the second game interface is a game screen corresponding to a second virtual perspective, and the first game interface and the second game interface are two-dimensional game interfaces;
[0012] A first determining module determines a main game interface corresponding to the first game interface and the second game interface;
[0013] A second determination module determines the position information corresponding to the virtual object in the main game interface, and determines the scaling ratio of the virtual object based on the position information corresponding to the virtual object; wherein the position information is used to indicate the distance position relationship between the virtual object and the virtual perspective of the main game interface;
[0014] A generation module generates an interface transition animation for switching from the first game interface to the second game interface based on the scaling ratio of the virtual object to simulate a three-dimensional motion effect of moving from the first virtual perspective to the second virtual perspective.
[0015] Based on the same inventive concept, the exemplary embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method for generating the interface transition animation as described above when executing the program.
[0016] Based on the same inventive concept, the exemplary embodiment of the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method for generating an interface transition animation as described above.
[0017] As can be seen from the above, the method, device, electronic device and storage medium for generating an interface transition animation provided by the present application, when a switching interface event is triggered in a first game interface, the second game interface to be transferred to is determined according to the triggered switching interface event; wherein, the first game interface is a game screen corresponding to a first virtual perspective, the second game interface is a game screen corresponding to a second virtual perspective, and the first game interface and the second game interface are two-dimensional game interfaces; then the main game interface corresponding to the first game interface and the second game interface is determined; and the position information corresponding to each of the virtual objects in the main game interface is determined, and the scaling ratio of each of the virtual objects is determined based on the position information corresponding to each of the virtual objects; wherein the position information is used to indicate the distance position relationship between each of the virtual objects and the virtual perspective of the main game interface; finally, an interface transition animation is generated from the first game interface to the second game interface according to the scaling ratio of each of the virtual objects to simulate the three-dimensional motion effect of moving from the first virtual perspective to the second virtual perspective, so that each virtual object in the interface transition animation is animated according to its corresponding scaling ratio, simulating the motion effect of the lens in the three-dimensional scene, and increasing the sense of immersion of the animation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A schematic diagram of an application scenario of an embodiment of the present application;
[0020] Figure 2 A schematic diagram of a flow chart of a method for generating an interface transition animation according to an embodiment of the present application;
[0021] Figure 3 A schematic diagram of a process for determining position information corresponding to a virtual object according to an embodiment of the present application;
[0022] Figure 4 A schematic diagram of the structure of a game interface according to an embodiment of the present application;
[0023] Figure 5 A schematic diagram of the structure of another game interface according to an embodiment of the present application;
[0024] Figure 6 This is a schematic diagram of the structure of the first game interface in the actual application scenario of the embodiment of the present application;
[0025] Figure 7 This is a schematic diagram of the structure of a second game interface in an actual application scenario of an embodiment of the present application;
[0026] Figure 8 This is a schematic diagram of the structure of a third game interface in an actual application scenario of an embodiment of the present application;
[0027] Fig. 9 This is a schematic diagram of the structure of a fourth game interface in an actual application scenario of an embodiment of the present application;
[0028] Fig.10 A schematic diagram of the structure of a device for generating an interface transition animation according to an embodiment of the present application;
[0029] Fig.11 A schematic diagram of the structure of a specific electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0031] According to the implementation manner of the present application, a method, system, electronic device and storage medium for generating an interface transition animation are proposed.
[0032] It is understandable that before using the technical solutions of each embodiment of the present application, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0033] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to the electronic device, application, server, storage medium or other software or hardware that performs the operation of the technical solution of the present application according to the prompt message.
[0034] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0035] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation method of this application. Other methods that meet relevant laws and regulations may also be applied to the implementation method of this application.
[0036] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0037] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application. SUMMARY OF THE INVENTION
[0039] In the current related technologies, the generated two-dimensional interface transition animation is relatively simple. For example, in some related technologies, the appearance and disappearance of the transition interface is mainly achieved by controlling the transparency of the virtual objects in the game interface. However, this method will result in a poor connection between the virtual objects in the two interfaces when the transition interface appears, resulting in a relatively rigid overall interface and poor user immersion. In some other related technologies, the interface transition animation is mainly generated by displacing or scaling the game interface as a whole. This method causes all virtual objects in the game interface to move or scale in one way, giving users a feeling of overall stretching of the picture, resulting in a poor user experience. In addition, the above two related technologies cannot simulate the motion effect of the lens in the three-dimensional scene, resulting in a significant sense of fragmentation in the user experience.
[0040] In order to solve the above problems, the present application provides a method for generating an interface transition animation, which specifically includes:
[0041] When a switching interface event is triggered in the first game interface, a second game interface to be transferred to is determined according to the triggered switching interface event; wherein the first game interface is a game screen corresponding to the first virtual perspective, the second game interface is a game screen corresponding to the second virtual perspective, and the first game interface and the second game interface are two-dimensional game interfaces; then a main game interface corresponding to the first game interface and the second game interface is determined; and the position information corresponding to each virtual object in the main game interface is determined, and the scaling ratio of each virtual object is determined based on the position information corresponding to each virtual object; wherein the position information is used to indicate the distance position relationship between each virtual object and the virtual perspective of the main game interface; finally, an interface transition animation is generated for switching from the first game interface to the second game interface according to the scaling ratio of each virtual object to simulate the three-dimensional motion effect of moving from the first virtual perspective to the second virtual perspective, so that each virtual object in the interface transition animation is animated according to its corresponding scaling ratio, that is, different virtual objects can be scaled according to different scaling ratios, so that the interface transition animation can simulate the motion effect of the lens in the three-dimensional scene, increasing the sense of immersion of the animation effect.
[0042] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application are described in detail below.
[0043] Application Scenario Overview
[0044] In some specific application scenarios, the method for generating an interface transition animation of the present application can be applied to various systems that require generating an interface transition animation. Figure 1 , the application scenario includes at least one server 102 and at least one terminal 101. Terminal devices include but are not limited to desktop computers, mobile phones, mobile computers, tablet computers, media players, smart wearable devices, personal digital assistants (PDA) or other electronic devices that can realize the above functions. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (content distribution network), and big data and artificial intelligence platforms. The server and the terminal can communicate through the network to realize data transmission. Among them, the network can be a wired network or a wireless network, which is not specifically limited in this application.
[0045] The server can be a server that provides various services. Specifically, the server can be used to provide background services for applications running on the terminal. Optionally, in some implementations, the method for generating an interface transition animation provided in the embodiment of the present application can be executed by a terminal device. The server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. The embodiment of the present application does not specifically limit this.
[0046] Optionally, the wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including hypertext mark-up language (HTML), extensible markup language (XML), etc. In addition, conventional encryption technologies such as secure socket layer (SSL), transport layer security (TLS), virtual private network (VPN), and Internet protocol security (IPsec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.
[0047] The following describes the method for generating an interface transition animation according to an exemplary embodiment of the present application in conjunction with a specific application scenario. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principle of the present application, and the implementation of the present application is not limited in this regard. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0048] It should be understood that although Figure 2 and Figure 3The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0049] Exemplary Methods
[0050] refer to Figure 2 The embodiment of the present application provides a method for generating an interface transition animation. The execution subject of the method for generating an interface transition animation can be, but is not limited to, a server or a terminal device. The method provides a graphical user interface of a target game through a terminal device. The target game includes multiple game interfaces, and each game interface includes at least one virtual object. The method includes the following steps:
[0051] S101, in response to triggering an interface switching event in the first game interface, determining the second game interface to be transferred to based on the interface switching event; wherein, the first game interface is a game screen corresponding to a first virtual perspective, the second game interface is a game screen corresponding to a second virtual perspective, and the first game interface and the second game interface are two-dimensional game interfaces.
[0052] During specific implementation, both the first game interface and the second game interface can be any one of the multiple game interfaces. For the convenience of distinction, the game interface that is about to be switched out of the current interface can generally be referred to as the first game interface, and the game interface to be transferred to can be referred to as the second game interface. The switching interface event can be set as needed, and there is no limitation on this. For example, a virtual control that can jump to multiple game interfaces can be set in the first game interface. When a virtual control is selected, it is equivalent to triggering a switching interface event, and then the game interface corresponding to the selected virtual control is the second game interface. Optionally, in some embodiments, the target game also includes a target virtual character controlled by the user. When the target virtual character moves to a specified position in the first game interface, it is equivalent to triggering a switching interface event. At the same time, the second game interface can be determined according to the specified position, that is, different specified positions correspond to different game interfaces to be transferred to.
[0053] Taking into account the connection between different game interfaces and the overall continuity of the game when switching between different game interfaces, the first game interface and the second game interface include the same virtual object, that is, the same virtual object exists in both the first game interface and the second game interface, which ensures the continuity between different game interfaces, and it is often the switching between such game interfaces that needs to consider the user's sense of substitution. Optionally, the number of the same virtual objects is not limited, for example, the number of the same virtual objects can be 1, 2 or 3 or other numbers. Optionally, the virtual objects in the game interface can be virtual buildings, virtual plants, virtual mountains, virtual rivers, virtual animals and other virtual objects that exist in all target games. Optionally, the first game interface and the second game interface also do not include the same virtual objects, that is, the first game interface and the second game interface can belong to two parallel sub-game interfaces of a main game interface.
[0054] It should be noted that, since different game interfaces correspond to different game scenes, when the game scene changes, in order to highlight the change, the display form of each virtual object in the game interface will also change. Therefore, the display form of the same virtual object in the first game interface and the second game interface is different, and the display form can be the size of the virtual object, the occlusion, the integrity of the object, and the display surface of the object. Figure 4 and Figure 5 , Figure 4 and Figure 5 The game interface shown includes the virtual object Big Tree 002, but due to Figure 4 The corresponding scene is when the target virtual character 001 is far away from the tree 002. Figure 5 This is the game scene when the target virtual character 001 is close to the tree 002. Figure 5 The big tree 002 in Figure 4 The big tree 002 in the picture appears to be larger.
[0055] It should be noted that when the game interface is a three-dimensional game interface, each virtual object in the game is generally a three-dimensional virtual model, which is equivalent to establishing a virtual three-dimensional world in the game interface. In this way, when the interface is switched, the virtual camera in the virtual world can be directly controlled to move to show the animation effect when the game interface is switched. However, when the game interface is a two-dimensional game interface, the virtual objects in the game are equivalent to objects drawn on a plane. At this time, it is impossible to simulate the three-dimensional effect of the virtual objects in the three-dimensional scene by directly moving the virtual camera in the two-dimensional game interface. The generation method of the interface transition animation provided by the embodiment of the present application can also simulate the three-dimensional transition effect when the multiple game interfaces are all two-dimensional game interfaces. This is that even if the game interface is a three-dimensional game interface, the generation method of the interface transition animation provided by the embodiment of the present application can achieve a three-dimensional transition effect without moving the virtual camera.
[0056] S102: Determine a main game interface corresponding to the first game interface and the second game interface.
[0057] In specific implementation, the multiple game interfaces included in the target game can generally be divided into a global game interface and a sub-game interface. All virtual objects in the sub-game interface generally exist in the global game interface, that is, the number of virtual objects included in the sub-game interface is less than or equal to the number of virtual objects included in the global game interface. Therefore, in order to avoid missing a virtual object, when determining the position information corresponding to each of the virtual objects, first determine the main game interface corresponding to the first game interface and the second game interface. Optionally, the main game interface may include all virtual objects in the first game interface and the second game interface. In some embodiments, the main game interface may overlap with the first game interface or the second game interface. For example, when a first game interface includes 5 virtual objects and a second game interface includes 3 virtual objects and these 3 virtual objects belong to the above 5 virtual objects, at this time, the first game interface can be determined as the main game interface.
[0058] In order to quickly determine the main game interface, in some embodiments, determining the main game interface corresponding to the first game interface and the second game interface specifically includes:
[0059] Determining a global game interface including all virtual objects of the target game from the multiple game interfaces;
[0060] The global game interface is determined as the main game interface.
[0061] In specific implementation, in order to improve the efficiency of determining the main game interface, the global game interface including all virtual objects of the target game can be determined as the main game interface. It should be noted that, since the global game interface includes all virtual objects of the target game, the global game interface can be used as the main game interface corresponding to any two game interfaces.
[0062] In some embodiments, determining the main game interface corresponding to the first game interface and the second game interface specifically includes:
[0063] Determine, from the multiple game interfaces, a third game interface that includes virtual objects of both the first game interface and the second game interface;
[0064] The third game interface is determined as the main game interface.
[0065] In a specific implementation, in order to facilitate the computer to accurately determine the main game interface, a third game interface including virtual objects of both the first game interface and the second game interface may be determined from the multiple game interfaces, and then the third game interface may be determined as the main game interface. It should be noted that the third game interface may overlap with the first game interface or the second game interface.
[0066] refer to Figure 7 and Figure 8 ,in, Figure 7 The virtual objects (7 peaks) in the Figure 8 All virtual objects (two peaks) in Figure 7 The corresponding game interface includes Figure 7 and Figure 8 All the virtual objects (7 peaks) in the corresponding two game interfaces can be Figure 7 The corresponding game interface is determined as the main game interface. In addition, when the virtual objects included in the first game interface and the second game interface are exactly the same, the main game interface can be randomly determined therefrom.
[0067] In some embodiments, the main game interface may be determined by other methods, which are not limited to this. For example, the subordinate relationship of each game interface may be marked in advance, and then the main game interface may be determined from multiple game interfaces of the target game by the subordinate relationship.
[0068] S103, determining the position information corresponding to the virtual objects in the main game interface, and determining the scaling ratio of each virtual object based on the position information corresponding to the virtual objects; wherein the position information is used to indicate the distance relationship between the virtual objects and the virtual perspective of the main game interface.
[0069] In the specific implementation, it is taken into account that the objects in the real picture seen by the user in real life are not scaled proportionally with the movement of the user. For example, when a user faces east, he sees a mountain and a tree in front of the mountain. When the user moves towards the foot of the mountain, especially when he is very close to the tree, he can obviously feel that the tree has become larger than before, while the mountain does not have obvious size changes during the user's movement. That is, in real life, when the mountain is farther away from the user and the tree is closer to the user, even if the user moves the same distance to the tree and the mountain, the tree and the mountain are not enlarged proportionally in the user's perspective. In order to simulate this three-dimensional effect in the real world, in the embodiment of the present application, the position information corresponding to each of the virtual objects in the main game interface is first determined, and the position information is used to indicate the distance relationship between each of the virtual objects and the virtual perspective of the main game interface, and then the scaling ratio of each of the virtual objects is determined according to the position information corresponding to each of the virtual objects. Optionally, the scaling ratio of each virtual object can be determined directly based on the rule that objects appear larger when they are closer and smaller when they are farther away. For example, a main game interface includes two virtual objects A and B, and the distance between A and the virtual viewing angle is smaller than the distance between B and the virtual viewing angle. In this case, the scaling ratio of A is set to be greater than that of B.
[0070] In order to determine the position information of each virtual object in the two-dimensional game interface, in some embodiments, determining the position information corresponding to the virtual object in the main game interface specifically includes:
[0071] In the main game interface, the position information of each virtual object in the main game interface is determined based on the planar distance between each virtual object and the target virtual character; wherein the main game interface includes the target virtual character controlled by the user.
[0072] In the specific implementation, considering that in many two-dimensional game interfaces, each virtual object does not have the concept of depth, that is, all virtual objects are located on the same plane, at this time, it is not possible to directly obtain the distance position relationship between each virtual object and the virtual perspective of the main game interface. In addition, the inventor found that in the two-dimensional game interface, a target virtual character controlled by the user is generally included, and the user completes the exploration in each game interface by controlling the target virtual character. Therefore, the perspective seen by the user is generally consistent with the perspective of the target virtual character in the game interface, so the position of the target virtual character in the game interface can be used as the reference position of the virtual perspective. Further, the position information of each virtual object in the main game interface can be determined according to the plane distance between each virtual object and the target virtual character in the main game interface. Optionally, the above-mentioned plane distance can be directly determined as the position information of each virtual object. At this time, the position information represents the distance between the virtual object and the virtual perspective of the main game interface. Optionally, a distance conversion coefficient can also be set first, and then the position information of each virtual object is obtained by using the distance conversion coefficient and the above-mentioned plane distance.
[0073] refer to Figure 4 , Figure 4 001 represents the target virtual character. Optionally, the distance between the target virtual character and the visual lens can be directly set to 0, that is, the default virtual character is the virtual object closest to the visual lens, and then the six virtual objects 002 to 007 are Figure 4 The plane distance (straight line distance) between the target virtual character 001 and the target virtual character 001 is used as the position information of each of the six virtual objects. When determining the above plane distance, the center point of the target virtual character and a virtual object can be determined first, and then the distance between the two center points is determined as the position information of the virtual object. Figure 4 In the example, if the plane distance between the target virtual character and each virtual object is directly calculated, the order from small to large is: big tree 002, small tree 003, first mountain 004, second mountain 005, third mountain 006, sun 007. Figure 4 The order of the distances of the virtual objects in the corresponding game scenes from the virtual viewing angle from near to far is: big tree 002, small tree 003, first mountain 004, second mountain 005, third mountain 006, sun 007. It can be seen that the two are completed in the same way. Therefore, in some embodiments, the position information of each virtual object can be determined by using the planar distance between the virtual object and the target virtual character.
[0074] In order to further accurately determine the position information of each virtual object in the two-dimensional game interface, refer to Figure 3 In some embodiments, determining the position information corresponding to the virtual object in the main game interface specifically includes the following steps:
[0075] S301, determining the occlusion relationship between the virtual objects in the main game interface.
[0076] During specific implementation, it is considered that in the same game interface, virtual objects that are closer to the front, that is, closer to the virtual perspective, are less likely to be blocked, while those virtual objects that are farther from the virtual perspective, that is, are more likely to be blocked, therefore, the position information of each virtual object in the main game interface can be determined according to the occlusion relationship between each virtual object. Optionally, when determining the occlusion relationship between each virtual object in the main game interface, the occlusion relationship between each virtual object in the main game interface can be determined by image recognition technology in related technologies. For example, the occlusion relationship between each virtual object in the main game interface can be directly identified by AI image recognition or a trained neural network model.
[0077] In order to quickly and accurately determine the occlusion relationship between the virtual objects, in some embodiments, determining the occlusion relationship between the virtual objects in the main game interface specifically includes:
[0078] Determine each of the virtual objects in the main game interface as a target virtual object;
[0079] For each of the target virtual objects, determining a target game interface including the target virtual object from the multiple game interfaces, and determining an unobstructed complete display form corresponding to the target virtual object based on the display form of the target virtual object in each of the target game interfaces;
[0080] Based on the complete display form and the display form of the target virtual object in each of the target game interfaces, the occlusion relationship between each of the virtual objects in the main game interface is determined.
[0081] In specific implementation, the complete display form of the virtual object can be determined by comparing the forms of the same virtual object in different game interfaces. Figure 5 and Figure 4 , Figure 5 In the video, the first mountain 004 is obviously blocked by the big tree 002, but Figure 4 The first mountain in the middle is not blocked by any other big trees, so Figure 5 compared to, Figure 4 The shape of the first mountain 004 in the game is more complete, that is, a complete triangle. After determining the complete display shape of each target virtual object, the complete display shape can be compared with the display shape of the target virtual object in each target game interface, so as to obtain the occlusion relationship between each virtual object.
[0082] S302: performing occlusion sorting on all the virtual objects in the main game interface based on the occlusion relationship.
[0083] In specific implementation, after determining the occlusion relationship between the virtual objects in the main game interface, all the virtual objects in the main game interface can be sorted according to the occlusion relationship. For example, a main game interface includes three virtual objects A, B, and C, where A is occluded by B and B is occluded by C. Then the occlusion sorting result of the three can be determined as: C, B, A.
[0084] S303: Determine the distance relationship between each virtual object and the virtual viewing angle of the main game interface based on the occlusion sorting result corresponding to each virtual object.
[0085] In a specific implementation, after all the virtual objects in the main game interface are sorted for occlusion, the distance relationship between each virtual object and the virtual perspective of the main game interface can be determined according to the occlusion sorting result corresponding to each virtual object. For example, the occlusion sorting results of the above three virtual objects are: C, B, A. Then the distance relationship between the three objects and the virtual perspective is that C is less than B and less than A.
[0086] S304: Using the distance relationship corresponding to each of the virtual objects as position information corresponding to each of the virtual objects.
[0087] In a specific implementation, after determining the distance relationship between each virtual object and the virtual perspective, the distance relationship corresponding to each virtual object can be directly used as the position information corresponding to each virtual object. It should be noted that the position information corresponding to each virtual object is the specific distance between each virtual object and the visual lens, or it can be the distance relationship between the virtual object and the virtual perspective.
[0088] In some embodiments, determining the scaling ratio of the virtual object based on the position information corresponding to the virtual object specifically includes:
[0089] Determining the distance type of each virtual object based on the position information corresponding to each virtual object, wherein the virtual object is divided into a plurality of distance types according to the distance relationship from the virtual viewing angle of the main game interface; the plurality of distance types at least include a short distance type and a long distance type;
[0090] The scaling ratio of each virtual object is determined based on the distance type of each virtual object, wherein different scaling ratios are correspondingly set for different distance types.
[0091] In specific implementation, when determining the scaling ratio of each virtual object, the virtual objects can be first classified according to the position information corresponding to each virtual object, and then the corresponding scaling ratio is set for each distance type of virtual object. Optionally, different distance types are set with different scaling ratios. Generally, the farther the distance from the virtual perspective of the main game interface (i.e., long-distance type), the smaller the corresponding scaling ratio, and the closer the distance from the virtual perspective of the main game interface (i.e., close-distance type), the larger the corresponding scaling ratio. Optionally, the specific scaling ratios set for different distance types can be set as needed. Generally, they can be set according to the rule of near large and far small. For example, a certain distance type includes a close-distance type, a medium-distance type, and a long-distance type, wherein the scaling ratio corresponding to the close-distance type can be set to 3, the scaling ratio corresponding to the medium-distance type can be set to 1.6, and the scaling ratio corresponding to the long-distance type can be set to 1.
[0092] In some embodiments, determining the scaling ratio of the virtual object based on the position information corresponding to the virtual object specifically includes:
[0093] Determine the distance of each virtual object from the virtual viewing angle of the main game interface based on the position information corresponding to each virtual object;
[0094] Based on a preset conversion coefficient and the distance of each virtual object from the virtual viewing angle of the main game interface, the scaling ratio of each virtual object is determined; wherein the preset conversion coefficient is used to determine the mapping relationship between the distance length and the scaling ratio.
[0095] In a specific implementation, when determining the scaling ratio of each virtual object, the distance of each virtual object from the virtual viewing angle of the main game interface can be determined first according to the position information corresponding to each virtual object, and then the scaling ratio of each virtual object is determined according to the preset conversion coefficient and the distance of each virtual object from the virtual viewing angle of the main game interface. Optionally, the preset conversion coefficient can be set as needed, and there is no limitation on this. In general, the farther the distance of each virtual object from the virtual viewing angle of the main game interface, the smaller the corresponding scaling ratio.
[0096] S104: Generate an interface transition animation for switching from the first game interface to the second game interface based on the scaling ratio of the virtual object to simulate a three-dimensional motion effect of moving from the first virtual perspective to the second virtual perspective.
[0097] In specific implementation, after determining the scaling ratio of each virtual object, an interface transition animation can be generated from the first game interface to the second game interface according to the scaling ratio of each virtual object, so that different virtual objects correspond to different scaling ratios during animation playback, thereby simulating the movement effect of the camera in the three-dimensional scene. Figure 6 and Fig. 9 , Figure 6 The first game interface includes 7 peaks. Fig. 9 The second game interface is about to be transferred, including 2 peaks. Figure 6 There are many peaks, so Figure 6 Determine the main game interface, and then Figure 6 The corresponding game interface switches to Fig. 9 When, through Figure 6 The corresponding scaling ratios of the seven peaks are scaled (enlarged) respectively. Finally, different peaks have different final scaling ratios due to different perspectives, thus simulating that in a three-dimensional scene, the camera moves continuously from far to near towards the direction of the middle peak.
[0098] In some embodiments, generating an interface transition animation for switching from the first game interface to the second game interface based on the scaling ratio of the virtual object specifically includes:
[0099] Determining a scaling reference point of the interface transition animation in the first game interface;
[0100] The interface transition animation is generated based on the scaling ratio of each virtual object and the scaling reference point, wherein the first game interface serves as the starting key frame of the interface transition animation, and the second game interface serves as the ending key frame of the interface transition animation.
[0101] In specific implementation, the scaling reference point of the interface transition animation is the starting point for scaling the interface transition animation, and all virtual objects are scaled according to the scaling reference point. For example, when the scaling reference point is located at the center of the first game interface, all virtual objects are enlarged from the center to the surroundings, or reduced from the surroundings to the center. The specific scaling reference point can be set as needed. In some embodiments, a point can be randomly determined in the first game interface as the scaling reference point.
[0102] In some embodiments, determining the scaling reference point of the interface transition animation in the first game interface specifically includes:
[0103] Determining the same virtual objects included in both the first game interface and the second game interface;
[0104] In the first game interface, a scaling reference point of the interface transition animation is determined based on a position of the same virtual object in the first game interface.
[0105] In specific implementation, in order to ensure the best effect of the interface transition animation, the scaling reference point of the interface transition animation can be determined according to the position of the same virtual object included in both the first game interface and the second game interface in the first game interface.
[0106] In some embodiments, determining the scaling reference point of the interface transition animation based on the position of the same virtual object in the first game interface specifically includes:
[0107] Determining a center point of the same virtual object in the first game interface based on the position of the same virtual object in the first game interface;
[0108] The scaling reference point is determined based on the center point.
[0109] In specific implementation, in order to accurately determine the scaling reference point, the scaling reference point can be determined according to the center point of the same virtual object in the first game interface. Optionally, when the number of the same virtual objects is 1, the center point of the same virtual object can be directly used as the scaling reference point. When the number of the same virtual objects is multiple, the center point of each virtual object can be determined separately, and then the scaling reference point can be determined according to the connecting line of all the center points. Optionally, the point with the shortest distance from each of the connecting lines can be determined as the scaling reference point.
[0110] In some embodiments, generating an interface transition animation for switching from the first game interface to the second game interface based on the scaling ratio of each of the virtual objects specifically includes:
[0111] Determining a subject virtual object and other virtual objects except the subject virtual object from the main game interface based on the second game interface;
[0112] The transparency of the other virtual objects is adjusted in the interface transition animation.
[0113] In the specific implementation, it is taken into consideration that when scaling each virtual object according to its scaling ratio, some virtual objects may still exist in the second game interface after scaling, but the second game interface itself does not include the virtual object. If the interface transition animation is directly generated by scaling the virtual object alone, some fragmented images may appear. In order to avoid this situation, the main virtual object and other virtual objects other than the main virtual object are first determined in the second game interface. The main virtual object generally refers to the virtual object that is ultimately to be displayed in the second game interface. Optionally, all virtual objects in the second game interface can be directly determined as the main virtual object. After determining other virtual objects other than the main virtual object, the transparency of the other virtual objects can be adjusted to make the other virtual objects gradually fade during the animation playback and eventually disappear completely, thereby avoiding fragmented images.
[0114] In some embodiments, the method further comprises:
[0115] For any two game interfaces among the multiple game interfaces, determine the main game interface corresponding to the any two game interfaces, and determine the scaling ratio of the virtual object based on the position information corresponding to the virtual object in the any two game interfaces; generate an interface transition animation between the any two game interfaces based on the scaling ratio of the virtual object, and save the interface transition animation between the any two game interfaces into a transition animation data set;
[0116] In response to triggering an interface switching event between the arbitrary two game interfaces, an interface transition animation between the arbitrary two game interfaces is obtained from the transition animation data set.
[0117] During specific implementation, in order to ensure that the user can achieve a continuous lens depth movement effect in the game, that is, when the user switches the game interface continuously, multiple interface transition animations can be played quickly and smoothly, the interface transition animation between any two game interfaces in the target game can be generated in advance, and the interface transition animation between the any two game interfaces can be saved in the transition animation data set. When the interface switching event between the any two game interfaces is triggered, the interface transition animation between the any two game interfaces can be directly obtained from the transition animation data set without the need to generate the interface transition animation in real time. It should be noted that the process of generating the interface transition animation between any two game interfaces is similar to generating the interface transition animation from the first game interface to the second game interface. The specific process can refer to the above-mentioned embodiment of generating the interface transition animation from the first game interface to the second game interface, which will not be described in detail.
[0118] The present application provides a method for generating an interface transition animation. When a switching interface event is triggered in a first game interface, a second game interface to be switched to is determined according to the triggered switching interface event; wherein the first game interface and the second game interface include the same virtual object, and the display form of the same virtual object in the first game interface and the second game interface is different; then a main game interface in the first game interface and the second game interface is determined; and the position information corresponding to each of the virtual objects in the main game interface is determined, and the scaling ratio of each of the virtual objects is determined based on the position information corresponding to each of the virtual objects; wherein the position information is used to indicate the distance position relationship between each of the virtual objects and the virtual perspective of the main game interface; finally, an interface transition animation is generated for switching from the first game interface to the second game interface according to the scaling ratio of each of the virtual objects, so that each virtual object in the interface transition animation is animated according to its corresponding scaling ratio, that is, different virtual objects can be scaled according to different scaling ratios, so that the interface transition animation can simulate the movement effect of the lens in the three-dimensional scene, increasing the sense of immersion of the animation effect. In addition, the present application reduces the cost of scene modeling. When the game interface is a two-dimensional interface, there is no need to convert the two-dimensional interface into a three-dimensional interface. The movement simulation of the lens in the three-dimensional scene is achieved in a two-dimensional manner.
[0119] Exemplary Devices
[0120] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a device for generating an interface transition animation, which provides a graphical user interface of a target game through a terminal device, wherein the target game includes multiple game interfaces, and each game interface includes at least one virtual object.
[0121] refer to Fig.10 , the interface transition animation generation device includes:
[0122] The response module 201 is responsive to triggering an interface switching event in the first game interface, and determines a second game interface to be transferred to based on the interface switching event; wherein the first game interface is a game screen corresponding to a first virtual perspective, the second game interface is a game screen corresponding to a second virtual perspective, and the first game interface and the second game interface are two-dimensional game interfaces;
[0123] A first determining module 202 determines a main game interface corresponding to the first game interface and the second game interface;
[0124] The second determination module 203 determines the position information corresponding to the virtual object in the main game interface, and determines the scaling ratio of the virtual object based on the position information corresponding to the virtual object; wherein the position information is used to indicate the distance position relationship between each virtual object and the virtual perspective of the main game interface;
[0125] The generating module 204 generates an interface transition animation for switching from the first game interface to the second game interface based on the scaling ratio of the virtual object.
[0126] In some embodiments, the multiple game interfaces are all two-dimensional game interfaces.
[0127] In some embodiments, the first determining module is specifically configured to:
[0128] Determining a global game interface including all virtual objects of the target game from the multiple game interfaces;
[0129] The global game interface is determined as the main game interface.
[0130] In some embodiments, the first determining module is specifically configured to:
[0131] Determine, from the multiple game interfaces, a third game interface that includes virtual objects of both the first game interface and the second game interface;
[0132] The third game interface is determined as the main game interface.
[0133] In some embodiments, the second determining module information is specifically used to:
[0134] In the main game interface, the position information of each virtual object in the main game interface is determined based on the planar distance between the virtual object and the target virtual character; wherein the main game interface includes the target virtual character controlled by the user.
[0135] In some embodiments, the second determining module information is specifically used to:
[0136] Determining the occlusion relationship between each of the virtual objects in the main game interface;
[0137] Based on the occlusion relationship, all the virtual objects in the main game interface are sorted by occlusion;
[0138] Determine the distance relationship between each virtual object and the virtual viewing angle of the main game interface based on the occlusion sorting result corresponding to each virtual object;
[0139] The distance relationship corresponding to each of the virtual objects is used as the position information corresponding to each of the virtual objects.
[0140] In some embodiments, the second determining module information is specifically used to:
[0141] Determine each of the virtual objects in the main game interface as a target virtual object;
[0142] Determine a target game interface including the target virtual object from the multiple game interfaces, and determine an unobstructed complete display form corresponding to the target virtual object based on the display form of the target virtual object in each of the target game interfaces;
[0143] Based on the complete display form and the display form of the target virtual object in each of the target game interfaces, the occlusion relationship between each of the virtual objects in the main game interface is determined.
[0144] In some embodiments, the second determining module information is specifically used to:
[0145] Determining the distance type of each virtual object based on the position information corresponding to each virtual object, wherein the virtual object is divided into a plurality of distance types according to the distance relationship from the virtual viewing angle of the main game interface; the plurality of distance types at least include a short distance type and a long distance type;
[0146] The scaling ratio of each virtual object is determined based on the distance type of each virtual object, wherein different scaling ratios are correspondingly set for different distance types.
[0147] In some embodiments, the second determining module information is specifically used to:
[0148] Determine the distance of each virtual object from the virtual viewing angle of the main game interface based on the position information corresponding to each virtual object;
[0149] Based on a preset conversion coefficient and the distance of each virtual object from the virtual viewing angle of the main game interface, the scaling ratio of each virtual object is determined; wherein the preset conversion coefficient is used to determine the mapping relationship between the distance length and the scaling ratio.
[0150] In some embodiments, the generating module is specifically used to:
[0151] Determining a scaling reference point of the interface transition animation in the first game interface;
[0152] The interface transition animation is generated based on the scaling ratio of each virtual object and the scaling reference point, wherein the first game interface serves as the starting key frame of the interface transition animation, and the second game interface serves as the ending key frame of the interface transition animation.
[0153] In some embodiments, the generating module is specifically used to:
[0154] Determining the same virtual objects included in both the first game interface and the second game interface;
[0155] In the first game interface, a scaling reference point of the interface transition animation is determined based on a position of the same virtual object in the first game interface.
[0156] In some embodiments, the generating module is specifically used to:
[0157] Determining a center point of the same virtual object in the first game interface based on the position of the same virtual object in the first game interface;
[0158] The scaling reference point is determined based on the center point.
[0159] In some embodiments, the generating module is specifically used to:
[0160] Determining a subject virtual object and other virtual objects except the subject virtual object from the main game interface based on the second game interface;
[0161] The transparency of the other virtual objects is adjusted in the interface transition animation.
[0162] In some embodiments, the device further comprises a pre-stored module for:
[0163] For any two game interfaces among the multiple game interfaces, determine the main game interface corresponding to the any two game interfaces, and determine the scaling ratio of the virtual object based on the position information corresponding to the virtual object in the any two game interfaces; generate an interface transition animation between the any two game interfaces based on the scaling ratio of the virtual object, and save the interface transition animation between the any two game interfaces into a transition animation data set;
[0164] In response to triggering an interface switching event between the arbitrary two game interfaces, an interface transition animation between the arbitrary two game interfaces is obtained from the transition animation data set.
[0165] For the convenience of description, the above system is described by dividing the functions into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0166] The system of the above embodiment is used to implement the generation method of the corresponding interface transition animation in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0167] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating the interface transition animation described in any of the above embodiments is implemented.
[0168] Fig.11 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0169] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0170] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0171] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0172] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0173] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0174] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0175] The electronic device of the above-mentioned embodiment is used to implement the generation method of the corresponding interface transition animation in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0176] Exemplary Program Products
[0177] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for generating an interface transition animation as described in any of the above embodiments.
[0178] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0179] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method for generating the interface transition animation as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0180] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides a computer program product, which includes a computer program. In some embodiments, the computer program is executed by one or more processors so that the processor executes the method for generating the interface transition animation described in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0181] In some embodiments, computer program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0182] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; based on the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0183] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0184] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0185] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for generating an interface transition animation, characterized in that: Providing a graphical user interface of a target game through a terminal device, wherein the target game includes a plurality of game interfaces, and the game interfaces include virtual objects; the method includes: In response to triggering an interface switching event in a first game interface, determining a second game interface to be transferred to based on the interface switching event; wherein the first game interface is a game screen corresponding to a first virtual perspective, the second game interface is a game screen corresponding to a second virtual perspective, and the first game interface and the second game interface are two-dimensional game interfaces; Determine a main game interface corresponding to the first game interface and the second game interface; Determine the position information corresponding to the virtual object in the main game interface, and determine the scaling ratio of the virtual object based on the position information corresponding to the virtual object; wherein the position information is used to indicate the distance position relationship between the virtual object and the virtual perspective of the main game interface; An interface transition animation is generated based on the scaling ratio of the virtual object to switch from the first game interface to the second game interface, so as to simulate a three-dimensional motion effect of moving from the first virtual perspective to the second virtual perspective.
2. The method according to claim 1, characterized in that Determining a main game interface corresponding to the first game interface and the second game interface specifically includes: Determining a global game interface including all virtual objects of the target game from the multiple game interfaces; The global game interface is determined as the main game interface.
3. The method according to claim 1, characterized in that Determining a main game interface corresponding to the first game interface and the second game interface specifically includes: Determine, from the multiple game interfaces, a third game interface that includes virtual objects of both the first game interface and the second game interface; The third game interface is determined as the main game interface.
4. The method according to claim 1, characterized in that: Determining the position information corresponding to the virtual object in the main game interface specifically includes: In the main game interface, the position information of each virtual object in the main game interface is determined based on the planar distance between the virtual object and the target virtual character; wherein the main game interface includes the target virtual character controlled by the user.
5. The method according to claim 1, characterized in that Determining the position information corresponding to the virtual object in the main game interface specifically includes: Determining the occlusion relationship between each of the virtual objects in the main game interface; Based on the occlusion relationship, all the virtual objects in the main game interface are sorted by occlusion; Determining the distance relationship between the virtual object and the virtual viewing angle of the main game interface based on the occlusion sorting result corresponding to the virtual object; The distance relationship corresponding to the virtual object is used as position information corresponding to the virtual object.
6. The method according to claim 5, characterized in that Determining the occlusion relationship between the virtual objects in the main game interface specifically includes: Determine each of the virtual objects in the main game interface as a target virtual object; Determine a target game interface including the target virtual object from the multiple game interfaces, and determine an unobstructed complete display form corresponding to the target virtual object based on the display form of the target virtual object in each of the target game interfaces; Based on the complete display form and the display form of the target virtual object in each of the target game interfaces, the occlusion relationship between each of the virtual objects in the main game interface is determined.
7. The method according to claim 1, characterized in that Determining the scaling ratio of the virtual object based on the position information corresponding to the virtual object specifically includes: Determining the distance type of each virtual object based on the position information corresponding to each virtual object, wherein the virtual object is divided into a plurality of distance types according to the distance relationship from the virtual viewing angle of the main game interface; the plurality of distance types at least include a short distance type and a long distance type; The scaling ratio of each virtual object is determined based on the distance type of each virtual object, wherein different scaling ratios are correspondingly set for different distance types.
8. The method according to claim 1, characterized in that Determining the scaling ratio of the virtual object based on the position information corresponding to the virtual object specifically includes: Determine the distance of each virtual object from the virtual viewing angle of the main game interface based on the position information corresponding to each virtual object; Based on a preset conversion coefficient and the distance of each virtual object from the virtual viewing angle of the main game interface, the scaling ratio of each virtual object is determined; wherein the preset conversion coefficient is used to determine the mapping relationship between the distance length and the scaling ratio.
9. The method according to claim 1, characterized in that: Generating an interface transition animation for switching from the first game interface to the second game interface based on the scaling ratio of the virtual object specifically includes: Determining a scaling reference point of the interface transition animation in the first game interface; The interface transition animation is generated based on the scaling ratio of each virtual object and the scaling reference point, wherein the first game interface serves as the starting key frame of the interface transition animation, and the second game interface serves as the ending key frame of the interface transition animation.
10. The method according to claim 9, characterized in that Determining a scaling reference point of the interface transition animation in the first game interface specifically includes: Determining the same virtual objects included in both the first game interface and the second game interface; In the first game interface, a scaling reference point of the interface transition animation is determined based on a position of the same virtual object in the first game interface.
11. The method according to claim 10, characterized in that Determining a scaling reference point of the interface transition animation based on the position of the same virtual object in the first game interface specifically includes: Determining a center point of the same virtual object in the first game interface based on the position of the same virtual object in the first game interface; The scaling reference point is determined based on the center point.
12. The method according to claim 1, characterized in that Generating an interface transition animation for switching from the first game interface to the second game interface based on the scaling ratio of each of the virtual objects specifically includes: Determining a subject virtual object and other virtual objects except the subject virtual object from the main game interface based on the second game interface; The transparency of the other virtual objects is adjusted in the interface transition animation.
13. The method according to claim 1, characterized in that The method further comprises: For any two game interfaces among the multiple game interfaces, determine the main game interface corresponding to the any two game interfaces, and determine the scaling ratio of the virtual object based on the position information corresponding to the virtual object in the any two game interfaces; generate an interface transition animation between the any two game interfaces based on the scaling ratio of the virtual object, and save the interface transition animation between the any two game interfaces into a transition animation data set; In response to triggering an interface switching event between the arbitrary two game interfaces, an interface transition animation between the arbitrary two game interfaces is obtained from the transition animation data set.
14. A device for generating an interface transition animation, characterized in that: A graphical user interface of a target game is provided through a terminal device, wherein the target game includes a plurality of game interfaces, and the game interfaces include virtual objects; the device includes: A response module, in response to triggering an interface switching event in a first game interface, determines a second game interface to be transferred to based on the interface switching event; wherein the first game interface is a game screen corresponding to a first virtual perspective, the second game interface is a game screen corresponding to a second virtual perspective, and the first game interface and the second game interface are two-dimensional game interfaces; A first determining module determines a main game interface corresponding to the first game interface and the second game interface; A second determination module determines the position information corresponding to the virtual object in the main game interface, and determines the scaling ratio of the virtual object based on the position information corresponding to the virtual object; wherein the position information is used to indicate the distance position relationship between the virtual object and the virtual perspective of the main game interface; A generation module generates an interface transition animation for switching from the first game interface to the second game interface based on the scaling ratio of the virtual object to simulate a three-dimensional motion effect of moving from the first virtual perspective to the second virtual perspective.
15. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method according to any one of claims 1 to 13 when executing the program.
16. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Game control method and device, terminal and storage medium
CN113398565A
Game interface interaction method, game interface interaction device, medium and terminal equipment
CN113589992A
Interface switching control method, electronic equipment and computer storage medium
CN115113965A
Game interaction method and device, equipment and storage medium
CN115888086A
Game interface display method and apparatus, and device and medium
WO2022247318A1