Animation display method and device, computer equipment and computer readable storage medium
By partitioning animation frames and calculating UV information, the problem of performance burden of complex special effects computer equipment in traditional technology is solved, and the smoothness of the game and the efficiency of special effects production are improved.
Patent Information
- Application Number
- CN202410431623.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2024-09-03
AI Technical Summary
When the traditional shader programming model handles complex special effects, the performance of the computer equipment is overburdened, resulting in a decrease in game fluency. Especially when simulating special effects such as fire and smoke, a large amount of calculations are required, making it difficult to meet the needs of high realism.
By partitioning the target animation frame to be rendered, only the motion state of the UV information is calculated for the area where the special effects are in effect, and the shader is used to calculate the special effects display content based on the texture maps at different time points, reducing unnecessary calculations and improving performance. .
It reduces the performance burden on computer equipment when simulating complex special effects scenarios, and improves game fluency and special effects production efficiency.
Smart Images

Figure CN118587329A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an animation display method, device, computer equipment and computer-readable storage medium. Background Art
[0002] With the continuous development of computer communication technology, the widespread application of terminals such as smart phones, tablet computers and laptops, in order to meet people's pursuit of spiritual life, entertainment games that can be operated on terminals have emerged, such as role-playing games, tactical competitive games, shooting competitive games or massively multiplayer online role-playing games developed based on client or server architecture. In the game, players can manipulate the virtual characters on the screen to play the game, and can perform related operations such as walking, running, jumping, picking up props and fighting in the game scene based on the first or third perspective of the character operated by the player, so that players can experience the visual impact brought by the game in an immersive way. With the vigorous development of online games, people have higher and higher requirements for the realism of game scenes.
[0003] When developing games or producing film and television animations, some special effects are often created for game resources such as virtual scenes or virtual elements to transition between virtual scenes or to simulate the real effects of certain scenarios in real environments in virtual scenes. For example, there are usually flames, smoke, or broken effects in games, which are usually implemented using shaders. However, in the traditional shader programming model, the output of the shader is calculated at a specific number of frames, rather than changing continuously over time. This model may encounter difficulties when dealing with certain special needs. In addition, since a large amount of calculations are required to achieve special effects in scenarios that simulate certain special effects, the performance burden of the computer device is too heavy, which will affect the overall performance of the computer device and the smoothness of the game. Summary of the invention
[0004] The embodiments of the present application provide an animation display method, apparatus, computer equipment and computer-readable storage medium. By partitioning the target animation frame to be rendered, it is only necessary to calculate the motion state of UV information of the area in the target animation frame where special effects are in effect. In this way, in the scenario of simulating certain special effects, the performance burden of the computer equipment when producing special effects is reduced, the performance of the computer equipment when producing special effects is improved, and the fluency of the game is improved.
[0005] The present application provides an animation display method, the method comprising:
[0006] Determine a target animation frame to be rendered currently in a target special effect animation, and a first display area, a second display area, and a third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where special effects are to be effective, the second display area is an area in a state where special effects are effective, and the third display area is an area in a state where special effects have disappeared, and in at least two target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes a plurality of sub-areas for which special effect display parameters are to be calculated;
[0007] Determine at least one sub-region group corresponding to the second display region, and a calculation time point for each sub-region group, wherein sub-regions in the same sub-region group simultaneously calculate special effect display parameters;
[0008] Obtaining, by a shader, a first display content corresponding to the first display area based on a first texture map corresponding to a special effect ineffective state of the target special effect;
[0009] Calculating, by a shader, a UV offset of the corresponding sub-region group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-region corresponding to each sub-region group, and obtaining a second display content of the second display region based on the UV offset and a second texture map corresponding to the special effect taking effect state of the target special effect;
[0010] Obtaining, by a shader, a third display content corresponding to the third display area based on a third texture map corresponding to the effective state of the target special effect;
[0011] Based on the first display content, the second display content and the third display content, a target animation frame is obtained and displayed.
[0012] Accordingly, the embodiment of the present application further provides an animation display device, the animation display device comprising:
[0013] A first determination unit is used to determine a target animation frame to be rendered currently in a target special effect animation, and a first display area, a second display area, and a third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where special effects are to be effective, the second display area is an area in a state where special effects are effective, and the third display area is an area in a state where special effects have disappeared, and in at least two frames of target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes a plurality of sub-areas in which special effect display parameters are to be calculated;
[0014] A second determination unit, configured to determine at least one sub-region group corresponding to the second display region, and a calculation time point for each sub-region group, wherein sub-regions in the same sub-region group simultaneously calculate special effect display parameters;
[0015] A first processing unit, configured to obtain, by a shader, a first display content corresponding to the first display area based on a first texture map corresponding to a special effect ineffective state of a target special effect;
[0016] A second processing unit is used to calculate, through a shader, a UV offset of the corresponding sub-region group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-region corresponding to each group of sub-region groups, and obtain a second display content of the second display area based on the UV offset and a second texture map corresponding to the special effect in effect state of the target special effect;
[0017] A third processing unit, configured to obtain, through a shader, a third display content corresponding to the third display area based on a third texture map corresponding to the effective state of the target special effect;
[0018] The fourth processing unit is used to obtain and display a target animation frame based on the first display content, the second display content and the third display content.
[0019] Correspondingly, an embodiment of the present application also provides a computer device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, any one of the animation display methods described above is implemented.
[0020] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any of the animation display methods described above is implemented.
[0021] The embodiments of the present application provide an animation display method, apparatus, computer equipment and computer-readable storage medium, by determining a target animation frame to be rendered in a target special effect animation, and a first display area, a second display area and a third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where special effects are to be effective, the second display area is an area in a state where special effects are effective, and the third display area is an area in a state where special effects have disappeared, and in at least two frames of target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes several sub-areas for which special effect display parameters are to be calculated; then, at least one sub-area group corresponding to the second display area and a calculation time point for each sub-area group are determined, wherein the sub-areas in the same sub-area group The sub-areas simultaneously calculate the special effect display parameters; then, the shader is used to obtain the first display content corresponding to the first display area based on the first texture map corresponding to the special effect ineffective state of the target special effect; then, the shader is used to calculate the UV offset of the corresponding sub-area group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-area corresponding to each group of sub-area groups, and the second display content of the second display area is obtained based on the UV offset and the second texture map corresponding to the special effect effective state of the target special effect; then, the shader is used to obtain the third display content corresponding to the third display area based on the third texture map corresponding to the effective state of the target special effect; finally, based on the first display content, the second display content and the third display content, the target animation frame is obtained and displayed. The embodiment of the present application partitions the target animation frame to be rendered, and only needs to calculate the motion state of the UV information for the area in the target animation frame where the special effect is effective, thereby reducing the performance burden of the computer device in the production of special effects in the scenario of simulating certain special effects, improving the performance of the computer device in the production of special effects, and improving the fluency of the game. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 It is a system schematic diagram of the animation display device provided in an embodiment of the present application.
[0024] Figure 2 It is a flow chart of the animation display method provided in an embodiment of the present application.
[0025] Figure 3a It is a scene schematic diagram of the animation display method provided in an embodiment of the present application.
[0026] Figure 3b It is a scene schematic diagram of the animation display method provided in an embodiment of the present application.
[0027] Figure 4 It is a structural schematic diagram of the animation display device provided in an embodiment of the present application.
[0028] Figure 5 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0030] The embodiment of the present application provides an animation display method, device, computer equipment and computer readable storage medium. Specifically, the animation display method of the embodiment of the present application can be performed by a computer device, wherein the computer device can be a terminal or a server. The terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc. The terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms.
[0031] For example, when the animation display method is run on a terminal, the terminal device stores a game application and is used to present a virtual scene in the game screen. The terminal device is used to interact with the user through a graphical user interface, for example, the game application is downloaded and installed by the terminal device and run. The terminal device may provide the graphical user interface to the user in a variety of ways, for example, it may be rendered and displayed on the display screen of the terminal device, or the graphical user interface may be presented through holographic projection. For example, the terminal device may include a touch display screen and a processor, the touch display screen is used to present the graphical user interface and receive the operation instructions generated by the user acting on the graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, respond to the operation instructions, and control the display of the graphical user interface on the touch display screen.
[0032] For example, when the animation display method is run on a server, it can be a cloud game. Cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating body of the game application and the main body of the game screen presentation are separated, and the storage and operation of the animation display method are completed on the cloud gaming server. The game screen presentation is completed on the client of the cloud gaming. The cloud gaming client is mainly used for receiving and sending game data and presenting the game screen. For example, the cloud gaming client can be a display device with a data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, a personal digital assistant, etc., but the terminal device for processing game data is a cloud gaming server in the cloud. When playing the game, the user operates the cloud gaming client to send an operation instruction to the cloud gaming server. The cloud gaming server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network. Finally, the cloud gaming client decodes and outputs the game screen.
[0033] See also Figure 1 , Figure 1A schematic diagram of a scene of an animation display system provided for an embodiment of the present application. The system may include at least one terminal, at least one server, at least one database (not shown in the figure), and a network. The terminal held by the user can be connected to the server of different games through the network. The terminal is any device with computing hardware that can support and execute software products corresponding to the game. In addition, when the system includes multiple terminals, multiple servers, and multiple networks, different terminals can be connected to each other through different networks and different servers. The network can be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to servers, etc. For example, multiple users can be online through different terminals and connected and synchronized with each other through appropriate networks to support multi-player games. In addition, the system may include multiple databases, multiple databases are coupled to different servers, and information related to the game environment can be continuously stored in the database when different users are online for multi-player games.
[0034] The embodiment of the present application provides an animation display method, which can be executed by a terminal or a server. The embodiment of the present application takes the animation display method executed by a terminal as an example for explanation. Among them, the terminal may include a touch display screen and a processor (of course, the terminal may also use peripherals such as a mouse and a keyboard as input devices, and only the touch display screen is used as an example for explanation here), and the touch display screen is used to present a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. When the user operates the graphical user interface through the touch display screen, the graphical user interface can control the local content of the terminal by responding to the received operation instructions, and can also control the content of the opposite server by responding to the received operation instructions. For example, the operation instructions generated by the user acting on the graphical user interface include instructions for starting a game application, and the processor is configured to start the game application after receiving the instructions for starting the game application provided by the user. In addition, the processor is configured to render and draw a graphical user interface associated with the game on the touch display screen. The touch display screen is a multi-touch sensitive screen that can sense touch or sliding operations performed simultaneously at multiple points on the screen. The user uses a finger to perform a touch operation on the graphical user interface, and when the graphical user interface detects the touch operation, the different virtual objects in the graphical user interface of the game are controlled to perform actions corresponding to the touch operation. For example, the game can be any of the games such as casual games, action games, role-playing games, strategy games, sports games, puzzle games, etc. Among them, the game can include a virtual scene of the game drawn on a graphical user interface. In addition, the virtual scene of the game can include one or more virtual objects controlled by a user (or player), such as a virtual character. In addition, the virtual scene of the game can also include one or more obstacles, such as railings, gullies, walls, etc., to limit the movement of virtual objects, such as limiting the movement of one or more objects to a specific area in the virtual scene. Optionally, the virtual scene of the game also includes one or more elements, such as skills, scores, character health status, energy, etc., to provide help to players, provide virtual services, increase scores related to player performance, etc. In addition, the graphical user interface can also present one or more indicators to provide indication information to the player. For example, the game can include a virtual object controlled by a player and one or more other virtual objects (such as an enemy character). In one embodiment, one or more other virtual objects are controlled by other players of the game. For example, one or more other virtual objects can be controlled by a computer, such as a robot using an artificial intelligence (AI) algorithm, to achieve a man-machine battle mode. For example, a virtual object has various skills or abilities that game players use to achieve their goals. For example, a virtual object may have one or more weapons, props, tools, etc. that can be used to eliminate other objects from the game. Such skills or abilities can be activated by a player of the game using one of a plurality of preset touch operations with the touch display screen of the terminal.The processor may be configured to present a corresponding game screen in response to an operation instruction generated by a user's touch operation.
[0035] It should be noted that Figure 1 The scene diagram of the animation display system shown is merely an example. The animation display system and scene described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0036] Based on the above problems, the embodiments of the present application provide an animation display method, device, computer equipment and computer-readable storage medium, which can effectively improve the production efficiency of special effects, reduce the performance burden of computer equipment when producing special effects, improve the performance of computer equipment when producing special effects, and improve the fluency of the game. The following are detailed descriptions. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0037] See also Figure 2 , Figure 2 The following is a flow chart of an animation display method provided in an embodiment of the present application. The specific flow of the animation display method may be as follows: Steps 101 to 106:
[0038] 101. Determine a target animation frame to be rendered in a target special effect animation, and a first display area, a second display area, and a third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where special effects are to be effective, the second display area is an area in a state where special effects are effective, and the third display area is an area in a state where special effects have disappeared. In at least two frames of the target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes a plurality of sub-areas for which special effect display parameters are to be calculated.
[0039] For example, the target special effects animation may be a broken special effects animation. In the target animation frame, the first display area is an area in an unbroken state (i.e., a state where special effects are waiting to take effect), the second display area is an area in a broken state (i.e., a state where special effects are taking effect), and the third display area is an area that has been broken and the fragments have disappeared (i.e., a state where special effects have disappeared).
[0040] In one embodiment, after the step of “determining the second display area in the target animation frame”, the method further includes:
[0041] The second display area is divided into regions based on the target region division parameter to generate a plurality of target regions, wherein each target region includes at least one sub-region located in the target region.
[0042] Specifically, the second display area can be divided into areas based on the target area division parameters to generate a specified number of target areas, each of which includes at least one sub-area located in the target area. For example, the target special effect animation can be a broken special effect animation, and the second display area can include ten target areas, each of which includes two fragments (i.e., sub-areas).
[0043] In a specific embodiment, the target area division parameter includes the number of sub-areas; before the step of "dividing the second display area into areas based on the target area division parameter to generate a plurality of target areas", the method further includes:
[0044] The second display area is divided based on the number of sub-areas and a first preset rule to obtain a plurality of sub-areas.
[0045] For example, based on the number of sub-areas and the first preset rule, the second display area is divided to obtain the number of sub-areas. Specifically, the target special effect animation can be a broken special effect animation, and the second display area needs to have twenty fragments (i.e., sub-areas), then the second display area can be divided to obtain twenty fragments.
[0046] In one embodiment, the target area division parameter includes the number of patches, and the method further includes:
[0047] Based on the number of areas and a second preset rule, multiple sub-areas are divided into areas to generate multiple target areas, wherein each target area includes at least one sub-area located in the target area, and sub-areas belonging to the same target area belong to the same sub-area group.
[0048] For example, two adjacent broken fragments may be divided into the same sub-region group, so that UV calculation is performed on the two fragments at the same calculation time point.
[0049] In one embodiment, the method further comprises:
[0050] Time adjustment is performed for each sub-region in the sub-region group so that the calculation time points of each sub-region in the sub-region group are the same.
[0051] Specifically, the fragment area can be rounded to the whole number of segments, for example, see Figure 3a, there are ten fragments in the AB interval, which need to be gradually broken at a time interval of 0.1 seconds, so it needs to be calculated ten times. This proposal brings these ten fragments together to point A or point B respectively, so only point A and point B need to be calculated twice. Specifically, in the embodiment of the present application, the corresponding sub-areas in the broken area and the unbroken area (before point A and after point B in the figure, respectively) do not need to be calculated, only the content of the area being broken (that is, the sub-area in the AB interval) needs to be calculated, and the calculation time point of the first to fifth fragments arranged in sequence in the AB interval can be unified to be the same as the calculation time point of the fragment corresponding to point A, so that the UV information of the first to fifth fragments can be calculated at the same time when the fragment corresponding to point A is calculated; then, the calculation time point of the sixth to tenth fragments arranged in sequence in the AB interval can be unified to be the same as the calculation time point of the sixth fragment, so that the UV information of the sixth to tenth fragments can be calculated at the same time when the sixth fragment is calculated, so that the first to fifth fragments are uniformly broken, and the sixth to tenth fragments are uniformly broken. Among them, the horizontal axis is the fragmented area of all the contents of the special effect. The two endpoints of the horizontal axis correspond to the first piece of content to be simulated and the last piece of remaining content to be simulated respectively. The AB interval is the content that is simulating motion in the current frame. When there are a lot of "fragments", they can be understood as completely continuous. The vertical line between the AB intervals discretizes the continuous AB area into specific slices.
[0052] 102. Determine at least one sub-region group corresponding to the second display region and a calculation time point for each sub-region group, wherein sub-regions in the same sub-region group calculate special effect display parameters simultaneously.
[0053] Specifically, at least one sub-region group corresponding to the second display area and the calculation time point of each sub-region group can be determined, wherein the sub-regions in the same sub-region group calculate the special effect display parameters at the same time. For example, the second display area includes the first sub-region group, the second sub-region group and the third sub-region group, the first sub-region group corresponds to the first calculation time point, the second sub-region group corresponds to the second calculation time point, the third sub-region group corresponds to the third calculation time point, the first calculation time point is earlier than the second calculation time point, and the second time point is earlier than the third calculation time point, so the special effect display parameters can be calculated for each sub-region in the first sub-region group at the first calculation time point, the special effect display parameters can be calculated for each sub-region in the second sub-region group at the second calculation time point, and the special effect display parameters can be calculated for each sub-region in the third sub-region group at the third calculation time point in chronological order.
[0054] 103 , obtaining first display content corresponding to the first display area based on a first texture map corresponding to a special effect ineffective state of a target special effect through a shader.
[0055] Among them, a shader is a program used to render graphics. It can run on graphics hardware to achieve various visual effects. The main task of the shader is to calculate lighting and color, as well as other tasks related to graphics rendering. Shaders play a role in coloring and rendering images in graphics rendering. Shaders can control image effects such as lighting, materials, textures, and shadows, making the rendered images more realistic and detailed. In 3D graphics calculations, shaders replace the traditional fixed rendering pipeline and implement related calculations through editable programs, so as not to be limited by the fixed rendering pipeline of the graphics card and achieve a variety of image effects.
[0056] Specifically, the first display content corresponding to the first display area can be obtained by a shader based on a first texture map corresponding to a special effect ineffective state of the target special effect. Specifically, the first display content corresponding to the first display area can be obtained by a shader based on the first display area by sampling a first texture map corresponding to a special effect ineffective state of the target special effect.
[0057] 104. A shader is used to calculate, based on each calculation time point and the sub-regions corresponding to each group of sub-region groups, a UV offset of the corresponding sub-region group after the special effect takes effect in the target animation frame at each time point, and a second display content of the second display area is obtained based on the UV offset and a second texture map corresponding to the special effect in effect state of the target special effect.
[0058] In the embodiment of the present application, the display parameters such as fragmentation, movement, and flow of each sub-region in the sub-region group can be calculated, and the motion state of the UV information corresponding to each sub-region can be calculated. Specifically, the corresponding special effect hint parameters are determined by calculating the UV offset of each sub-region. UV is actually a texture coordinate, which is used to represent the texture coordinate. The UV coordinate is the basis for the texture map to be mapped to the model surface, and the points on the surface correspond to the pixels on the plane.
[0059] 105 . Obtain, through a shader, a third display content corresponding to the third display area based on a third texture map corresponding to the effective state of the target special effect.
[0060] Specifically, the third display content corresponding to the third display area can be obtained by a shader based on the third texture map corresponding to the effective state of the target special effect. Specifically, the third display content corresponding to the third display area can be obtained by sampling the third texture map corresponding to the effective state of the target special effect based on the third display area.
[0061] 106 . Obtain a target animation frame based on the first display content, the second display content, and the third display content, and display the target animation frame.
[0062] For example, see Figure 3b , the target animation frame displays the first display content corresponding to the first display area, the second display content corresponding to the second display area, and the third display content corresponding to the third display area.
[0063] In one embodiment, after obtaining the second display content of the second display area based on the UV offset and the second texture map corresponding to the special effect in effect state of the target special effect, the method further includes:
[0064] The second display content is processed based on the effect parameter of the designated special effect to obtain new second display content, wherein the new second display content is the second display content with the designated special effect.
[0065] In an embodiment of the present application, the specified special effect may also be a flame effect, a smoke effect, a fluid effect, etc. The flame effect, the smoke effect, the fluid effect, etc. may be blurred and disturbed based on the fragmentation effect, thereby simulating the expression style of the flame effect, the smoke effect, the fluid effect, etc.
[0066] Optionally, a specified special effect may be superimposed on the display content with the fragmentation effect, and specifically, the specified special effect may be superimposed on any one or more of the first display content, the second display content, and the third display content.
[0067] Furthermore, the method further comprises:
[0068] Based on the first display content, the new second display content and the third display content, a new target animation frame is obtained and displayed.
[0069] Optionally, the method further includes:
[0070] Get the region adjustment parameters;
[0071] Performing region adjustment on the second display region based on the region adjustment parameter to obtain a plurality of new sub-region groups of the second display region;
[0072] Through the shader, based on each calculation time point and the sub-area corresponding to each new sub-area group, the UV offset of the corresponding new sub-area group after the special effect takes effect in the target animation frame is calculated at each time point, and based on the UV offset and the second texture map corresponding to the special effect effective state of the target special effect, the new second display content of the second display area is obtained.
[0073] The embodiment of the present application provides a non-continuous shader programming model, which can be calculated based on discrete time. The output of the shader is calculated on a specific number of frames, rather than continuously changing over time, so that performance can be optimized and unnecessary calculations can be reduced. Specifically, time can be discretized based on frames, and then the output of the shader is calculated at each discrete time point, so that the output of the shader can be accurately controlled, rather than relying on the uncertainty of the continuous time model. In addition, the concepts and methods of discrete mathematics, such as graph theory and combinatorial mathematics, can be used to optimize the algorithm, thereby further improving performance. This model can solve problems that traditional continuous time models cannot solve, and can also optimize performance, and can be widely used in computer graphics, game development, virtual reality and other fields.
[0074] In a specific embodiment, if it is necessary to achieve the broken effect of the animation, it is broken into pieces. The initial velocity / acceleration of each fragment is different. Therefore, in the prior art, each fragment of each frame needs to be calculated / sampled once, which is very large given the current hardware limitations. The embodiment of the present application achieves the broken effect through calculation and texture sampling. For example, a broken animation is 3 seconds, and taking the terminal device mobile phone as an example, it is 1 second / frame. According to the performance and settings of the mobile phone, it can be determined that the refresh rate of the game on the mobile phone is 30 frames, and the special effect is a special effect that lasts for 3 seconds. Therefore, 3×30=90 frames can be calculated. For example, if the entire screen is broken into 1000 pieces, it needs to be calculated 90,000 times in 90 frames and the texture needs to be sampled 90,000 times. This part of the content will not continue forever, so it can be further divided. For example, after the broken area / unbroken area is divided ( Figure 3a The part before point A and after point B in the image does not need to be calculated; only the content of the area being broken needs to be calculated. The number of broken parts can be calculated according to the specific situation. Since it is displayed on a patch, if the patch fills the entire screen, it will naturally be the same as the screen display area of the display. Further division, the content between A and B is discretized, for example, 10 segments are divided, for example, A is completely unbroken (0), B is completely broken (1), then every 0.1 is a segment, and all fragmented areas are rounded to all segments. Therefore, only 10 calculations / samples are required to avoid discrete fragmentation. The segmentation here refers to the time of independent calculation. If it is broken, it can be understood as the time when multiple fragments start. If it is understood as a fluid, it is the specific motion state of an independent microelement. Since the calculation of the shader is generally continuous, it leads to a large amount of calculation content; when it is changed to discontinuous, the performance consumption will be greatly reduced. At this time, it needs to be matched with the refresh rate to ensure normal display.
[0075] Specifically, the specific example of "rounding all fragments to all segments" is: there are 10 fragments in the AB interval, which are gradually broken at an interval of 0.1, which requires 10 calculations; now they are brought together to A and B, so only A and B need to be calculated twice. In other words, it can be said that the offset of each fragment is the "starting time of breaking" or the time of unified breaking. For example, there are currently 1,000 pieces in the AB segment that are broken in sequence. In theory, they should be broken in queues. Now they are broken in batches (for example, five adjacent pieces are broken at the same time), and they will become pieces. For example, please refer to Figure 3b , we can see that due to the calculation together, the originally independent contents are merged, and the calculation amount is reduced by half. We can see that the parts belonging to the same circle (i.e., sub-region group) and the same circle color are calculated together, so there will be a situation where dozens of fragments only need to be calculated twice. For example, there can be 10 circles, 5 circles are the first color, and the other 5 circles are the second color. Then the contents in the 5 circles of the first color are calculated uniformly at the first time, and the contents in the 5 circles of the second color are calculated uniformly at the second time.
[0076] Optionally, the present application can also be applied to the overall time, and can be used to discretize the fragmented time or the application time of the effect. For example, the entire duration of the special effect is controlled by a value. After determining the approximate number of seconds (for example, 3 seconds), it can be discretized into 45 frames based on 90 frames, and updated every two frames, thereby saving half of the performance.
[0077] Specifically, the embodiment of the present application provides two implementation methods. One method is to discretize the fragments that are broken continuously in sequence, so that the fragments are broken part by part, thereby reducing the amount of calculation; the other method is to discretize the continuous time, for example, update the calculation once every two frames, thereby reducing the amount of calculation.
[0078] In summary, an embodiment of the present application provides an animation display method, by determining a target animation frame to be rendered in a target special effect animation, and a first display area, a second display area, and a third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where special effects are waiting to take effect, the second display area is an area in a state where special effects are taking effect, and the third display area is an area in a state where special effects have disappeared, and in at least two frames of target animation frames, the second display areas of each target animation frame do not completely overlap, and the second display area includes several sub-areas for which special effect display parameters are to be calculated; then, at least one sub-area group corresponding to the second display area and a calculation time point for each sub-area group are determined, wherein the sub-areas in the same sub-area group are calculated simultaneously. Special effect display parameters; then, through the shader, based on the first texture map corresponding to the special effect ineffective state of the target special effect, the first display content corresponding to the first display area is obtained; then, through the shader, based on each calculation time point and the sub-area corresponding to each group of sub-area groups, the UV offset of the corresponding sub-area group after the special effect takes effect in the target animation frame is calculated at each time point, and based on the UV offset and the second texture map corresponding to the special effect effective state of the target special effect, the second display content of the second display area is obtained; then, through the shader, based on the third texture map corresponding to the effective state of the target special effect, the third display content corresponding to the third display area is obtained; finally, based on the first display content, the second display content and the third display content, the target animation frame is obtained and displayed. The embodiment of the present application partitions the target animation frame to be rendered, and only needs to calculate the motion state of the UV information for the area in the target animation frame where the special effect is effective, thereby reducing the performance burden of the computer device in the production of special effects in the scenario of simulating certain special effects, improving the performance of the computer device in the production of special effects, and improving the fluency of the game.
[0079] In order to better implement the above method, the embodiment of the present application may also provide an animation display device, which may be specifically integrated into a computer device, for example, a computer device such as a terminal.
[0080] See also Figure 4 , Figure 4 A schematic diagram of the structure of an animation display device provided in an embodiment of the present application, the device comprising:
[0081] The first determination unit 201 is used to determine the target animation frame to be rendered in the target special effect animation, and the first display area, the second display area and the third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where the special effect is to be effective, the second display area is an area in a state where the special effect is effective, and the third display area is an area in a state where the special effect has disappeared, and in at least two frames of the target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes a plurality of sub-areas in which special effect display parameters are to be calculated;
[0082] A second determining unit 202, configured to determine at least one sub-region group corresponding to the second display region, and a calculation time point for each sub-region group, wherein sub-regions in the same sub-region group simultaneously calculate special effect display parameters;
[0083] A first processing unit 203 is configured to obtain, through a shader, a first texture map corresponding to a special effect ineffective state of a target special effect, a first display content corresponding to the first display area;
[0084] The second processing unit 204 is used to calculate, through a shader, a UV offset of the corresponding sub-region group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-region corresponding to each sub-region group, and obtain a second display content of the second display area based on the UV offset and a second texture map corresponding to the special effect in effect state of the target special effect;
[0085] A third processing unit 205 is configured to obtain, through a shader, a third display content corresponding to the third display area based on a third texture map corresponding to the effective state of the target special effect;
[0086] The fourth processing unit 206 is configured to obtain and display a target animation frame based on the first display content, the second display content, and the third display content.
[0087] In some embodiments, the animation display device includes a processing subunit for:
[0088] The second display area is divided into regions based on the target region division parameter to generate a plurality of target regions, wherein each target region includes at least one sub-region located in the target region.
[0089] In some embodiments, the animation display device includes a processing subunit for:
[0090] The second display area is divided based on the number of sub-areas and a first preset rule to obtain a plurality of sub-areas.
[0091] In some embodiments, the animation display device includes a processing subunit for:
[0092] Based on the number of areas and a second preset rule, multiple sub-areas are divided into areas to generate multiple target areas, wherein each target area includes at least one sub-area located in the target area, and sub-areas belonging to the same target area belong to the same sub-area group.
[0093] In some embodiments, the animation display device includes a processing subunit for:
[0094] Time adjustment is performed for each sub-region in the sub-region group so that the calculation time points of each sub-region in the sub-region group are the same.
[0095] In some embodiments, the animation display device includes a processing subunit for:
[0096] The second display content is processed based on the effect parameter of the designated special effect to obtain new second display content, wherein the new second display content is the second display content with the designated special effect.
[0097] In some embodiments, the animation display device includes a processing subunit for:
[0098] Based on the first display content, the new second display content and the third display content, a new target animation frame is obtained and displayed.
[0099] In some embodiments, the animation display device includes a processing subunit for:
[0100] Get the region adjustment parameters;
[0101] Performing region adjustment on the second display region based on the region adjustment parameter to obtain a plurality of new sub-region groups of the second display region;
[0102] Through the shader, based on each calculation time point and the sub-area corresponding to each new sub-area group, the UV offset of the corresponding new sub-area group after the special effect takes effect in the target animation frame is calculated at each time point, and based on the UV offset and the second texture map corresponding to the special effect effective state of the target special effect, the new second display content of the second display area is obtained.
[0103] The embodiment of the present application discloses an animation display device, which determines a target animation frame to be rendered in a target special effect animation, and a first display area, a second display area, and a third display area in the target animation frame through a first determination unit 201, wherein, in the target animation frame, the first display area is an area in a state where special effects are to be effective, the second display area is an area in a state where special effects are effective, and the third display area is an area in a state where special effects have disappeared, and in at least two frames of target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes a number of sub-areas for which special effect display parameters are to be calculated; the second determination unit 202 determines at least one sub-area group corresponding to the second display area, and a calculation time point for each sub-area group, wherein the sub-areas in the same sub-area group calculate special effect display parameters simultaneously; The first processing unit 203 obtains the first display content corresponding to the first display area through a shader based on the first texture map corresponding to the ineffective state of the target special effect; the second processing unit 204 calculates the UV offset of the corresponding sub-area group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-area corresponding to each group of sub-area groups, and obtains the second display content of the second display area based on the UV offset and the second texture map corresponding to the effective state of the target special effect; the third processing unit 205 obtains the third display content corresponding to the third display area through a shader based on the third texture map corresponding to the effective state of the target special effect; the fourth processing unit 206 obtains the target animation frame based on the first display content, the second display content and the third display content and displays it. The embodiment of the present application partitions the target animation frame to be rendered, and only needs to calculate the motion state of the UV information of the area in the target animation frame where the special effect is in effect, thereby reducing the performance burden of the computer device when producing special effects in the scene of simulating certain special effects, improving the performance of the computer device when producing special effects, and improving the fluency of the game.
[0104] Accordingly, the embodiment of the present application also provides a computer device, which may be a terminal or a server, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), or other terminal devices. Figure 5 As shown, Figure 5A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0105] The processor 301 is the control center of the computer device 300. It uses various interfaces and lines to connect the various parts of the entire computer device 300, executes various functions of the computer device 300 and processes data by running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, thereby monitoring the computer device 300 as a whole.
[0106] In the embodiment of the present application, the processor 301 in the computer device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions:
[0107] Determine a target animation frame to be rendered currently in a target special effect animation, and a first display area, a second display area, and a third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where special effects are to be effective, the second display area is an area in a state where special effects are effective, and the third display area is an area in a state where special effects have disappeared, and in at least two target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes a plurality of sub-areas for which special effect display parameters are to be calculated;
[0108] Determine at least one sub-region group corresponding to the second display region, and a calculation time point for each sub-region group, wherein sub-regions in the same sub-region group simultaneously calculate special effect display parameters;
[0109] Obtaining, by a shader, a first display content corresponding to the first display area based on a first texture map corresponding to a special effect ineffective state of the target special effect;
[0110] Calculating, by a shader, a UV offset of the corresponding sub-region group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-region corresponding to each sub-region group, and obtaining a second display content of the second display region based on the UV offset and a second texture map corresponding to the special effect taking effect state of the target special effect;
[0111] Obtaining, by a shader, a third display content corresponding to the third display area based on a third texture map corresponding to the effective state of the target special effect;
[0112] Based on the first display content, the second display content and the third display content, a target animation frame is obtained and displayed.
[0113] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0114] Optional, such as Figure 5 As shown, the computer device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art can understand that Figure 5 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0115] The touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the computer device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-EmittingDiode) and the like. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306 to realize the input function.
[0116] In the embodiment of the present application, the processor 301 executes the application to generate a graphical interface on the touch screen 303. The touch screen 303 is used to present the graphical interface and receive operation instructions generated by the user acting on the graphical interface.
[0117] The radio frequency circuit 304 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.
[0118] The audio circuit 305 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data, and then the audio data is output to the processor 301 for processing, and then sent to another computer device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earphone jack to provide communication between an external headset and the computer device.
[0119] The input unit 306 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0120] The power supply 307 is used to supply power to various components of the computer device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 307 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0121] although Figure 5 Not shown, the computer device 300 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0122] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0123] As can be seen from the above, the computer device provided by the present embodiment determines the target animation frame to be rendered in the target special effect animation, and the first display area, the second display area and the third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where the special effect is to be effective, the second display area is an area in a state where the special effect is effective, and the third display area is an area in a state where the special effect has disappeared, and in at least two frames of the target animation frame, the second display areas of the target animation frames do not completely overlap, and the second display area includes several sub-areas for which special effect display parameters are to be calculated; then, at least one sub-area group corresponding to the second display area and the calculation time point of each sub-area group are determined, wherein the sub-areas in the same sub-area group calculate the special effects at the same time. display parameters; then, the first display content corresponding to the first display area is obtained through the shader based on the first texture map corresponding to the ineffective state of the target special effect; then, the UV offset of the corresponding sub-area group after the special effect takes effect in the target animation frame is calculated at each time point based on each calculation time point and the sub-area corresponding to each group of sub-area groups, and the second display content of the second display area is obtained based on the UV offset and the second texture map corresponding to the effective state of the target special effect; then, the third display content corresponding to the third display area is obtained through the shader based on the third texture map corresponding to the effective state of the target special effect; finally, based on the first display content, the second display content and the third display content, the target animation frame is obtained and displayed. The embodiment of the present application partitions the target animation frame to be rendered, and only needs to calculate the motion state of the UV information for the area in the target animation frame where the special effect is in effect, thereby reducing the performance burden of the computer device in the production of special effects in the scenario of simulating certain special effects, improving the performance of the computer device in the production of special effects, and improving the fluency of the game.
[0124] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0125] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any animation display method provided in the embodiment of the present application. For example, the computer program can execute the following steps:
[0126] Determine a target animation frame to be rendered currently in a target special effect animation, and a first display area, a second display area, and a third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where special effects are to be effective, the second display area is an area in a state where special effects are effective, and the third display area is an area in a state where special effects have disappeared, and in at least two target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes a plurality of sub-areas for which special effect display parameters are to be calculated;
[0127] Determine at least one sub-region group corresponding to the second display region, and a calculation time point for each sub-region group, wherein sub-regions in the same sub-region group simultaneously calculate special effect display parameters;
[0128] Obtaining, by a shader, a first display content corresponding to the first display area based on a first texture map corresponding to a special effect ineffective state of the target special effect;
[0129] Calculating, by a shader, a UV offset of the corresponding sub-region group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-region corresponding to each sub-region group, and obtaining a second display content of the second display region based on the UV offset and a second texture map corresponding to the special effect taking effect state of the target special effect;
[0130] Obtaining, by a shader, a third display content corresponding to the third display area based on a third texture map corresponding to the effective state of the target special effect;
[0131] Based on the first display content, the second display content and the third display content, a target animation frame is obtained and displayed.
[0132] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0133] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0134] Due to the computer program stored in the storage medium, the steps of any animation display method provided in the embodiments of the present application can be executed, by determining the target animation frame to be rendered in the target special effect animation, and the first display area, the second display area and the third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where the special effect is to be effective, the second display area is an area in a state where the special effect is effective, and the third display area is an area in a state where the special effect has disappeared, and in at least two frames of the target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes several sub-areas for which special effect display parameters are to be calculated; then, at least one sub-area group corresponding to the second display area and the calculation time point of each sub-area group are determined, wherein the same sub-area group The sub-areas in the area group simultaneously calculate the special effect display parameters; then, the shader is used to obtain the first display content corresponding to the first display area based on the first texture map corresponding to the special effect ineffective state of the target special effect; then, the shader is used to calculate the UV offset of the corresponding sub-area group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-area corresponding to each group of sub-area groups, and the second display content of the second display area is obtained based on the UV offset and the second texture map corresponding to the special effect effective state of the target special effect; then, the shader is used to obtain the third display content corresponding to the third display area based on the third texture map corresponding to the effective state of the target special effect; finally, based on the first display content, the second display content and the third display content, the target animation frame is obtained and displayed. The embodiment of the present application partitions the target animation frame to be rendered, and only needs to calculate the motion state of the UV information for the area in the target animation frame where the special effect is effective, thereby reducing the performance burden of the computer device in the production of special effects in the scenario of simulating certain special effects, improving the performance of the computer device in the production of special effects, and improving the fluency of the game.
[0135] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0136] The above is a detailed introduction to an animation display method, device, computer equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present application. Ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents; and these modifications or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present application.
Claims
1. An animation display method, characterized in that: include: Determine a target animation frame to be rendered currently in a target special effect animation, and a first display area, a second display area, and a third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where special effects are to be effective, the second display area is an area in a state where special effects are effective, and the third display area is an area in a state where special effects have disappeared, and in at least two target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes a plurality of sub-areas for which special effect display parameters are to be calculated; Determine at least one sub-region group corresponding to the second display region, and a calculation time point for each sub-region group, wherein sub-regions in the same sub-region group simultaneously calculate special effect display parameters; Obtaining, by a shader, a first display content corresponding to the first display area based on a first texture map corresponding to a special effect ineffective state of the target special effect; Calculating, by a shader, a UV offset of the corresponding sub-region group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-region corresponding to each sub-region group, and obtaining a second display content of the second display region based on the UV offset and a second texture map corresponding to the special effect taking effect state of the target special effect; Obtaining, by a shader, a third display content corresponding to the third display area based on a third texture map corresponding to the effective state of the target special effect; Based on the first display content, the second display content and the third display content, a target animation frame is obtained and displayed.
2. The animation display method according to claim 1, characterized in that: After determining the second display area in the target animation frame, the method further includes: The second display area is divided into regions based on the target region division parameter to generate a plurality of target regions, wherein each target region includes at least one sub-region located in the target region.
3. The animation display method according to claim 2, characterized in that: The target area division parameters include the number of sub-areas; Before dividing the second display area into regions based on the target region division parameter to generate a plurality of target regions, the method further includes: The second display area is divided based on the number of sub-areas and a first preset rule to obtain a plurality of sub-areas.
4. The animation display method according to claim 3, characterized in that: The target area division parameter includes the number of areas, and the method further includes: Based on the number of areas and a second preset rule, multiple sub-areas are divided into areas to generate multiple target areas, wherein each target area includes at least one sub-area located in the target area, and sub-areas belonging to the same target area belong to the same sub-area group.
5. The animation display method according to claim 4, characterized in that: The method further comprises: Time adjustment is performed for each sub-region in the sub-region group so that the calculation time points of each sub-region in the sub-region group are the same.
6. The animation display method according to claim 1, characterized in that: After obtaining the second display content of the second display area based on the UV offset and the second texture map corresponding to the special effect in effect state of the target special effect, the method further includes: The second display content is processed based on the effect parameter of the designated special effect to obtain new second display content, wherein the new second display content is the second display content with the designated special effect.
7. The animation display method according to claim 6, characterized in that: The method further comprises: Based on the first display content, the new second display content and the third display content, a new target animation frame is obtained and displayed.
8. The animation display method according to claim 1, characterized in that: The method further comprises: Get the region adjustment parameters; Performing region adjustment on the second display region based on the region adjustment parameter to obtain a plurality of new sub-region groups of the second display region; Through the shader, based on each calculation time point and the sub-area corresponding to each new sub-area group, the UV offset of the corresponding new sub-area group after the special effect takes effect in the target animation frame is calculated at each time point, and based on the UV offset and the second texture map corresponding to the special effect effective state of the target special effect, the new second display content of the second display area is obtained.
9. An animation display device, characterized in that: include: A first determination unit is used to determine a target animation frame to be rendered currently in a target special effect animation, and a first display area, a second display area, and a third display area in the target animation frame, wherein, in the target animation frame, the first display area is an area in a state where special effects are to be effective, the second display area is an area in a state where special effects are effective, and the third display area is an area in a state where special effects have disappeared, and in at least two frames of target animation frames, the second display areas of the target animation frames do not completely overlap, and the second display area includes a plurality of sub-areas in which special effect display parameters are to be calculated; A second determination unit, configured to determine at least one sub-region group corresponding to the second display region, and a calculation time point for each sub-region group, wherein sub-regions in the same sub-region group simultaneously calculate special effect display parameters; A first processing unit, configured to obtain, by a shader, a first display content corresponding to the first display area based on a first texture map corresponding to a special effect ineffective state of a target special effect; A second processing unit is used to calculate, through a shader, a UV offset of the corresponding sub-region group after the special effect takes effect in the target animation frame at each time point based on each calculation time point and the sub-region corresponding to each group of sub-region groups, and obtain a second display content of the second display area based on the UV offset and a second texture map corresponding to the special effect in effect state of the target special effect; A third processing unit, configured to obtain, through a shader, a third display content corresponding to the third display area based on a third texture map corresponding to the effective state of the target special effect; The fourth processing unit is used to obtain and display a target animation frame based on the first display content, the second display content and the third display content.
10. A computer device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the animation display method according to any one of claims 1 to 8 when executed by the processor.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the animation display method according to any one of claims 1 to 8 is implemented.
