Afterimage effect display method, device, storage medium and electronic device

By calling the pre -set synchronous residual shadow model in the residual shadow effect display of the target object, and rendering the residual shadow data on the trajectory of the target object movement, solve the problem of poor shadow keton and synchronization in existing technologies, and achieve efficient efficiency. Real -time residual shadow effect display.

CN113610950BActive Publication Date: 2025-01-28SHANGHAI MIHAYOULIYUE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110887238.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-03
Publication Date
2025-01-28
Estimated Expiration
2041-08-03

AI Technical Summary

Technical Problem

The existing afterimage effect display method occupies a large amount of memory during the instantiation process, resulting in lag, and it is impossible to ensure real-time synchronization between the target object and the afterimage.

Method used

Trigger the signal by receiving the residual shadow effect of the target object, call the pre -set residual shadow model to keep it synchronized with the target object, obtain the image frame of the residual shadow model, and form the residual shadow data of the target object. Rendering.

Benefits of technology

The real -time synchronization of the residual shadow model and the target object has reduced the instantiated process, reduced the use of memory, and improved the real -time and user experience of the residual shadow effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113610950B_ABST
    Figure CN113610950B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention disclose a method, device, storage medium and electronic device for displaying afterimage effects. The method comprises: receiving an afterimage effect trigger signal of a target object, calling a preset afterimage model, wherein the afterimage model and the target object are in a synchronized state; acquiring an image frame of the afterimage model, and forming afterimage data of the target object based on the image frame of the afterimage model; and rendering the afterimage data of the target object at the current display position of the afterimage data. The above technical scheme of the embodiment of the present invention realizes the real-time synchronization of the afterimage model and the target object by calling a preset afterimage model; further, by acquiring the image frame of the afterimage model, the image frame of the afterimage model is formed into the afterimage data of the target object, thereby realizing the conversion from the image frame to the afterimage data. Compared with the prior art, the process of instantiation of the target object is reduced, thereby reducing the use of memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a method, device, storage medium and electronic device for displaying an afterimage effect. Background Art

[0002] With the development of animation technology, the expressiveness of the picture has been greatly improved. For example, in the process of video or game production, the motion trajectory of the target object in the picture can be rendered by using the afterimage effect, thereby generating a series of blurred images on the path of the target object's movement.

[0003] In the game production process, the afterimage effect display methods can be roughly divided into two types. The first method is real-time afterimage technology. Whenever the afterimage effect is triggered, multiple instantiated afterimage objects are created based on the player character body, and then stored in the afterimage pool. At regular intervals, an afterimage object is taken out of the afterimage pool for display. The second method is offline afterimage technology. Afterimages are generated based on the special effects editor, and the afterimages and character skill IDs are stored in pairs in the special effects table. When the skill is triggered, the afterimage is searched in the special effects table according to the skill ID for display.

[0004] However, the above-mentioned afterimage effect display method occupies a lot of memory during the instantiation process, which easily causes the afterimage to be stuck, and cannot guarantee the real-time synchronization between the target object and the afterimage, and the real-time performance is poor. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, storage medium and electronic device for displaying afterimage effects, so as to solve the problem of afterimage jamming and the problem of real-time synchronization between a target object and the afterimage.

[0006] In a first aspect, an embodiment of the present invention provides a method for displaying an afterimage effect, comprising:

[0007] Receiving an afterimage effect trigger signal of a target object, and calling a preset afterimage model, wherein the afterimage model is in a synchronized state with the target object;

[0008] Acquire an image frame of the afterimage model, and form afterimage data of the target object based on the image frame of the afterimage model;

[0009] The afterimage data of the target object is rendered at the current display position of the afterimage data.

[0010] In a second aspect, an embodiment of the present invention further provides a device for displaying an afterimage effect, comprising:

[0011] A model calling module, used for receiving a trigger signal of an afterimage effect of a target object and calling a preset afterimage model, wherein the afterimage model is in a synchronized state with the target object;

[0012] An afterimage generation module, used for acquiring an image frame of the afterimage model, and forming afterimage data of the target object based on the image frame of the afterimage model;

[0013] An object rendering module is used to render the afterimage data of the target object at a current display position of the afterimage data.

[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0015] one or more processors;

[0016] a storage device for storing one or more programs,

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the afterimage effect display methods described in the embodiments of the present invention.

[0018] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute any of the afterimage effect display methods described in the embodiments of the present invention.

[0019] The above-mentioned technical scheme of the embodiment of the present invention, by receiving the afterimage effect trigger signal of the target object and calling the pre-set afterimage model, realizes the real-time synchronization of the afterimage model and the target object, and improves the real-time display of the afterimage effect; further, by acquiring the image frame of the afterimage model, the image frame of the afterimage model is formed into the afterimage data of the target object, thereby realizing the conversion from image frame to afterimage data. Compared with the prior art, the process of instantiation of the target object is reduced, thereby reducing the use of memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 It is a flowchart of a method for displaying afterimage effect provided in the first embodiment of the present invention;

[0022] Figure 2 It is a flowchart of a method for displaying afterimage effect provided by Embodiment 2 of the present invention;

[0023] Figure 3It is a flowchart of a method for displaying afterimage effect provided by Embodiment 3 of the present invention;

[0024] Figure 4 It is a structural schematic diagram of a device for displaying afterimage effect provided by a fourth embodiment of the present invention;

[0025] Figure 5 It is a structural schematic diagram of an electronic device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention.

[0027] It should also be noted that, for ease of description, only the part relevant to the present invention but not all content is shown in the accompanying drawings. It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.

[0028] Embodiment 1

[0029] Figure 1 This is a flow chart of a method for displaying afterimage effects provided in the first embodiment of the present invention. This embodiment is applicable to the case where the target object generates afterimage effects in real time for display during the screen playback. The method can be performed by the afterimage effect display device provided in the embodiment of the present invention. The device can be implemented by software and / or hardware. The device can be configured on an electronic computing device, such as a desktop computer or a server. Specifically, the following steps are included:

[0030] S110, receiving a trigger signal of an afterimage effect of a target object, and calling a preset afterimage model, wherein the afterimage model and the target object are in a synchronized state.

[0031] The target object may be one or more objects in a game scene that need to be displayed with an afterimage effect, such as a character, mount, equipment or prop in the game. The target object may also be one or more objects in a film and television animation production scene that need to be displayed with an afterimage special effect, such as an animated character, an object, etc. The method provided in the embodiment of the present invention can be effectively applied to the above-mentioned scenarios, and this embodiment does not limit this.

[0032] In an embodiment of the present invention, the trigger signal may be an action signal used to trigger the target object to produce an afterimage effect. The action signal may be a continuous action signal or a single action signal, and there is no limitation on this. The trigger signal may include, but is not limited to, a signal formed by operations such as the walking of a character, the use of props, or the release of skills. Specifically, when the character starts walking, a corresponding walking action will be generated, triggering the target object to call a preset afterimage model, thereby producing an afterimage effect of the target object. For example, when the game character switches from normal walking to sprinting, the character generates a corresponding running action and generates a motion trajectory. The running action can trigger the call of a preset afterimage model to produce an afterimage effect of the character running. When using props, an action corresponding to the function of the props will be generated, triggering the target object to call a preset afterimage model, thereby producing an afterimage effect of the target object. For example, when the prop is an enlargement potion, the character will gradually grow from a normal size by using the enlargement potion, and the character will generate a corresponding transformation action. The transformation action can trigger the call of a preset afterimage model to produce an afterimage effect of the character transformation. When a skill is released, an action corresponding to the skill release will be generated, triggering the target object to call the preset afterimage model, thereby producing an afterimage effect of the target object. For example, when a character releases an attack skill, the character will generate an action to release the skill, and the action of releasing the skill can trigger the call of the preset afterimage model, thereby producing an afterimage effect of the character releasing the skill.

[0033] Based on the above embodiment, the method further includes: acquiring the current state of the target object based on the synchronization manager, and sending the current state to the afterimage model, so that the afterimage model obtains the current state for updating.

[0034] The synchronization manager is used to synchronize the target object with the afterimage model. Specifically, the synchronization manager can obtain the current state of the target object, which can be the state of the target object after the action changes (including but not limited to the prop state and action state), and synchronize the state of the target object after the action changes to the afterimage model.

[0035] Exemplarily, when the game protagonist releases a skill, the skill action of the game protagonist is synchronized with the afterimage model, so that the afterimage model plays the corresponding skill action at the same time.

[0036] The pre-set afterimage model is an imitation model. The afterimage model can clone the target object by extracting features from the target object, and the cloning proposed in this embodiment is a real-time cloning, that is, when the target object changes its motion, the afterimage model will produce corresponding motion changes. It can be understood that the afterimage model is in a synchronized state with the target object, and it is a real-time synchronization. Optionally, the synchronization state includes prop synchronization and action synchronization. Among them, props include but are not limited to clothing, accessories, weapons, etc.

[0037] For example, when a character in the game switches weapons and equipment, the weapons and equipment are changed from an axe to a bow and arrow, and the afterimage model will also change accordingly, so as to ensure that the afterimage effect ultimately displays the afterimage of the bow and arrow. When a character in the game releases a skill, it is a set of actions, and this set of actions includes multiple actions, for example, the first action is jumping, the second action is kicking, and the third action is punching. When the character changes actions, the afterimage model also changes accordingly to achieve action synchronization. In an embodiment of the present invention, by calling a pre-set afterimage model, real-time synchronization of the afterimage model and the target object is achieved, thereby improving the user experience.

[0038] S120: Acquire image frames of the afterimage model, and form afterimage data of the target object based on the image frames of the afterimage model.

[0039] The image frame of the afterimage model can be formed by capturing images of the afterimage model. Each image capture obtains an image frame, which can be understood as a shadow image of the target object, and keeps the movement synchronized with the target object. It should be noted that the afterimage model is a model obtained after the afterimage effect processing, wherein the afterimage effect processing may include but is not limited to contour highlighting processing, detail blurring processing, etc. Image frames are captured for the afterimage model processed with the afterimage effect, and the obtained image frames can be directly used as the afterimage data of the target object without the need for secondary processing, thereby simplifying the process of obtaining the afterimage data and improving data processing efficiency.

[0040] Optionally, after acquiring the image frame of the afterimage model, the image frame of the afterimage model is faded or transparently processed to obtain the afterimage data of the target object. By fading or transparently processing the image frame of the afterimage model, a gradual blurred image can be achieved, which can improve the viewing quality of the picture and improve the user experience.

[0041] On the basis of the above embodiment, the afterimage model is mounted on a preset empty node, and the afterimage model is configured with a virtual camera for collecting image frames of the afterimage model. Among them, the preset empty node is a node without any model mounted. By shooting the afterimage model mounted on the empty node with a virtual camera, the shot image (i.e., the image frame of the afterimage model) can be obtained.

[0042] S130: Rendering the afterimage data of the target object at the current display position of the afterimage data.

[0043] Among them, the current display position refers to the position in the image where the afterimage effect is displayed, which can be one or more positions. The current display position can specifically be a position passed by the target object during the movement, or a position within a preset distance range of the target object outline, or a position with a fixed direction and / or a fixed distance relative to the target object. This embodiment does not specifically limit the current display position. The afterimage effect is displayed by rendering the afterimage data of the target object to the current display position. Exemplarily, when a character moves in the game, it will pass through multiple positions. One or more positions can be selected from the passed positions as the current display position, and the afterimage data of the game character can be rendered at the passed positions. When the character releases a skill, the animation of the skill is played around the character. The surrounding position of the character's outline can be used as the current display position, and the afterimage data related to the skill released by the game character can be rendered at the surrounding position of the character's outline.

[0044] In this embodiment, the afterimage effect is displayed by rendering the afterimage data of the target object to the current display position. It should be noted that in the process of realizing the afterimage effect, the afterimage effect is displayed by rendering the afterimage data, and there is no need to perform the model instantiation process every time the afterimage effect is displayed. Therefore, the data processing resources and storage resources required to realize the afterimage effect can be reduced, and the requirements for hardware can be reduced so that a smooth visual effect can be obtained even in devices with relatively low hardware performance.

[0045] Based on the above embodiment, the method of obtaining the image frame of the afterimage model includes: obtaining the display angle of the target object, controlling the acquisition angle of the virtual camera according to the display angle so that the acquisition angle is the same as the display angle of the target object; controlling the virtual camera to obtain the image frame of the afterimage model at the acquisition angle.

[0046] Specifically, when the target object is a three-dimensional target object, the target object has multiple display angles. When the target object moves, the display angle will also change with the movement of the target object. Therefore, if you want to collect image frames of the residual image model corresponding to the target object, you need to control the acquisition angle of the virtual camera to be the same as the display angle of the target object to improve the consistency between the residual image data and the display of the target object. Exemplarily, the display angle of the target object is 0 degrees, the acquisition angle of the virtual camera is adjusted to 0 degrees, and the image frame of the residual image model is obtained at this acquisition angle.

[0047] The embodiment of the present invention obtains the display angle of the target object and makes the acquisition angle of the virtual camera the same as the display angle of the target object, so that the image frame of the afterimage model captured by the virtual camera and the target object always remain in the same screen, thereby achieving the uniformity of the displayed screen and avoiding the occurrence of misalignment of the image frames of the target object and the afterimage model.

[0048] An embodiment of the present invention provides a method for displaying an afterimage effect, which receives an afterimage effect trigger signal of a target object and calls a preset afterimage model, wherein the afterimage model and the target object are in a synchronized state; obtains an image frame of the afterimage model, and forms afterimage data of the target object based on the image frame of the afterimage model; and renders the afterimage data of the target object at the current display position of the afterimage data. The above technical solution of the embodiment of the present invention receives an afterimage effect trigger signal of a target object and calls a preset afterimage model, thereby realizing real-time synchronization between the afterimage model and the target object, and improving the real-time performance of the afterimage effect display; further, by obtaining the image frame of the afterimage model, the image frame of the afterimage model is formed into the afterimage data of the target object, thereby realizing the conversion from image frame to afterimage data. Compared with the prior art, the instantiation process is reduced, thereby reducing the use of memory.

[0049] Embodiment 2

[0050] Figure 2 A flowchart diagram of a method for displaying afterimage effects provided in the second embodiment of the present invention, based on the above embodiment, can further refine the "obtaining the image frame of the afterimage model, and forming the afterimage data of the target object based on the image frame of the afterimage model" in the above embodiment, and its specific implementation method can refer to the detailed description of this technical solution. Among them, the technical terms that are the same as or corresponding to the above embodiment are not repeated here. Figure 2 As shown, the method of the embodiment of the present invention specifically includes the following steps:

[0051] S210, receiving a trigger signal of an afterimage effect of a target object, and calling a preset afterimage model, wherein the afterimage model and the target object are in a synchronized state.

[0052] S220. Collect image frames of the afterimage model in sequence according to preset time intervals.

[0053] The preset time can be a fixed value or a value that changes with some control parameters. For example, the greater the movement speed, the longer the interval between the afterimages of the target object. However, too large a distance will reduce the effect of the afterimage. Therefore, the time interval can be shortened. The standard for shortening the time interval can be set to make the distance between the image frames of two adjacent afterimage models less than a preset value. This preset value can be set with reference to the volume of the target object. The larger the volume of the target object, the larger the preset value.

[0054] Specifically, the virtual camera configured for the afterimage model shoots the afterimage model at preset time intervals to obtain image frames of the afterimage model. It should be noted that the shooting mentioned above is not shooting in the traditional sense, but an extraction of the image frames of the afterimage model, and other contents in the picture are ignored. Exemplarily, the virtual camera starts the shooting function every 0.5 seconds to track and shoot the afterimage model to obtain multiple image frames of the afterimage model.

[0055] The embodiment of the present invention collects image frames of the afterimage model in sequence at preset time intervals, so that the positions of the collected image frames of the afterimage model are reasonable, thereby ensuring the final afterimage effect and improving the user experience.

[0056] S230 , performing transparency processing on each image frame to obtain residual image data corresponding to each image frame.

[0057] Among them, in order to achieve the afterimage effect, transparent processing can be performed, and the processing object of the transparent processing is the image frame of the afterimage model. The specific process of transparent processing is to increase the transparency of the image frame in turn for any image frame to obtain image frames with different transparencies, and combine the above-mentioned image frames with different transparencies in sequence according to the transparency of each image frame, that is, to obtain the afterimage data corresponding to the corresponding image frame. Similarly, the above-mentioned transparent processing is performed on each acquired image frame to obtain the afterimage data corresponding to each image frame. In an embodiment of the present invention, by performing transparent processing on the image frames of each afterimage model, it can be achieved that the image frame of the afterimage model gradually disappears in the screen display, producing a fading effect.

[0058] On the basis of the above-mentioned embodiment, the transparent processing is performed on any image frame respectively to obtain the residual image data corresponding to each image frame, including: for any image frame, transparent processing is performed based on different transparencies to obtain image frames with different transparencies; image frames with different transparencies are combined to form corresponding residual image data.

[0059] Exemplarily, when a game character is moving, the virtual camera collects multiple shadow model images (i.e., image frames of the afterimage model) corresponding to the character at preset time intervals, and performs transparent processing on the shadow model images according to the collection order. For example, the transparency can be 10%, 30%, 50%, 80%, and 100% in sequence to obtain transparent image frames with different effects. It can be understood that since the collection time interval is set, multiple image frames are collected, and the actions in each image frame can be the same or different. Each of the above image frames can be processed to obtain multiple transparent image frames, i.e., the afterimage data of each image frame, and the afterimage data corresponding to each image frame are displayed separately to show the process of gradual disappearance of each image frame.

[0060] S240 . Determine a current display position corresponding to each image frame based on the motion trajectory of the target object, and render the residual image data formed by each image frame at the corresponding current display position.

[0061] Specifically, for a moving target object, a motion trajectory will be generated, and the motion trajectory may include the direction of motion. In the present embodiment, the current display position may include position information, but for many target objects, they may have rotated, and therefore may also include angle information. The change in position and the change in angle caused by rotation are both caused by motion. By analyzing the motion trajectory of the target object, the position information and angle information of the image frame on the motion trajectory can be obtained, thereby determining the current display position corresponding to each image frame. After the current display position is determined, the afterimage data formed by each image frame can be rendered at the corresponding current display position to produce an afterimage effect. Among them, the current display position corresponding to the afterimage data formed by each image frame can be determined based on the position of the target object at the time of image frame acquisition, for example, it can be a position on the motion trajectory of the target object at a preset distance from the position of the target object at the time of image frame acquisition.

[0062] Based on the above embodiment, the afterimage data formed by each image frame is rendered at the corresponding current display position, including: creating a display billboard at each current display position; and rendering the afterimage data formed by the corresponding image frame on each display billboard.

[0063] Among them, the display billboard is a picture display technology that makes the display picture always face the virtual camera. When the virtual camera moves in the scene, the display billboard also rotates. Therefore, the vector from the display billboard to the virtual camera is perpendicular to the surface of the display billboard.

[0064] Exemplarily, the shadow model image (i.e., the image frame of the afterimage model) corresponding to the character in the game is a two-dimensional image. By playing the shadow model image through a display billboard, a three-dimensional image effect can be produced.

[0065] The embodiment of the present invention can achieve a three-dimensional effect by creating a display billboard at each current display position and rendering the residual image data formed by the corresponding image frame on each display billboard. However, the essence is still a picture, that is, a three-dimensional object is displayed with a two-dimensional image, which greatly saves storage resources and improves the loading speed of the picture.

[0066] A method for displaying an afterimage effect provided by an embodiment of the present invention receives an afterimage effect trigger signal of a target object and calls a pre-set afterimage model, wherein the afterimage model and the target object are in a synchronized state, thereby realizing real-time synchronization between the afterimage model and the target object and improving the real-time performance of the afterimage effect display; sequentially collecting image frames of the afterimage model according to a preset time interval, performing transparent processing on each image frame to obtain afterimage data corresponding to each image frame, so that each image frame produces an afterimage effect; based on the motion trajectory of the target object, determining the current display position corresponding to each image frame, rendering the afterimage data formed by each image frame at the corresponding current display position, so that a series of continuous afterimage effects are produced on the motion trajectory of the target object, thereby improving the user experience.

[0067] Embodiment 3

[0068] Figure 3 A flowchart diagram of a method for displaying afterimage effects provided in the third embodiment of the present invention, based on the above embodiments, can further refine the "obtaining the image frame of the afterimage model, and forming the afterimage data of the target object based on the image frame of the afterimage model" in the above embodiments, and its specific implementation method can refer to the detailed description of this technical solution. Among them, the technical terms that are the same as or corresponding to the above embodiments are not repeated here. Figure 3 As shown, the method of the embodiment of the present invention specifically includes the following steps:

[0069] S310, receiving a trigger signal of an afterimage effect of a target object, and calling a preset afterimage model, wherein the afterimage model and the target object are in a synchronized state.

[0070] S320 , sequentially collecting image frames of the afterimage model according to a preset time interval, and forming a sequence frame based on the timestamp of each image frame.

[0071] The sequence frame is a dynamic image obtained by sorting multiple image frames of the afterimage model according to timestamps.

[0072] Exemplarily, the first image frame of the afterimage model corresponding to the game character is a jumping action picture of the character; after a preset time interval (for example, 0.5 seconds), the second image frame of the afterimage model corresponding to the game character is a kicking action picture of the character; after an interval of 0.5 seconds, the third image frame of the afterimage model corresponding to the game character is a punching action picture of the character. The three captured image frames are sorted according to the timestamps to obtain a coherent dynamic image of the striking skill, forming a sequence frame. The captured image frames all carry a timestamp, and the image frames are combined based on the timestamp to obtain a sequence frame.

[0073] S330: Perform afterimage fading processing on the sequence of frames to obtain afterimage data of the target object.

[0074] Among them, the afterimage fading process can be understood as fading each image frame in the sequence frame in order. Specifically, according to the sorting result, each image frame in the sequence frame is subjected to afterimage fading process in turn, and the faded image frames disappear in turn, showing a series of blurred images following the target object, just like the shadow of the target object, which will produce an afterimage effect visually. In the process of afterimage fading process, the image frames gradually disappear from the sequence frames, and the sequence frames form an afterimage effect, that is, the afterimage data of the target object is obtained, which improves the user experience.

[0075] On the basis of the above-mentioned embodiment, the afterimage fading processing is performed on the sequence frames to obtain the afterimage data of the target object, including: determining the image frame to be faded according to the order of each image frame in the current sequence frame, fading the determined image frame to obtain the next sequence frame, wherein the image frame to be faded is the first-order image frame in the current sequence frame; and forming the afterimage data of the target object based on each of the sequence frames.

[0076] Exemplarily, in a game scene, a striking skill includes three image frames, and these three image frames can be formed into a sequence frame. Among them, the first sequence image frame is a jumping picture, the second sequence image frame is a kicking picture, and the third sequence image frame is a punching picture. In the process of fading, the first sequence image frame is first faded, and the first sequence image frame disappears from the sequence frame, that is, the jumping picture completes the fade processing, and a new sequence frame (that is, the next sequence frame) is obtained. The remaining two image frames are included in the new sequence frame, the original second sequence image becomes the first sequence image, and the original third sequence image becomes the second sequence image, and the fade processing continues until all image frames have completed the fade processing, then the image frames that have completed the fade processing in all sequence frames generate the afterimage data of the target object.

[0077] The embodiment of the present invention determines the image frame to be faded according to the order of each image frame in the current sequence frame, fades the determined image frame to obtain the next sequence frame, thereby realizing the orderly formation of the afterimage, saving system resources and improving the speed of generating the afterimage data.

[0078] S340. Determine a current display position of the afterimage data according to a current position of the target object, create a display billboard at the current display position, and render the afterimage data based on the display billboard.

[0079] In an embodiment of the present invention, the current position of the target object can be determined as the current display position of the afterimage data. It is understandable that since the target object has not moved, but has only changed its movement in situ, the current position of the target object can be determined as the current display position of the afterimage data. After the current display position is determined, a display billboard is created at the current display position, and the afterimage data formed by each image frame is rendered on the display billboard to achieve a three-dimensional display of the afterimage effect.

[0080] A method for displaying an afterimage effect provided by an embodiment of the present invention receives an afterimage effect trigger signal of a target object and calls a preset afterimage model, wherein the afterimage model and the target object are in a synchronized state, thereby realizing real-time synchronization between the afterimage model and the target object and improving the real-time performance of the afterimage effect display; further, image frames of the afterimage model are sequentially collected according to preset time intervals, sequence frames are formed based on the timestamps of each image frame, afterimage fading processing is performed on the sequence frames to obtain afterimage data of the target object, thereby realizing the afterimage effect of the sequence frames; according to the current position of the target object, the current display position of the afterimage data is determined, a display billboard is created at the current display position, and the afterimage data is rendered based on the display billboard. The billboard can realize a three-dimensional display effect, but is essentially a picture, that is, a three-dimensional object is displayed using a two-dimensional image, which greatly saves storage resources and improves the loading speed of the picture.

[0081] Embodiment 4

[0082] Figure 4 This is a schematic diagram of the structure of a device for displaying afterimage effects provided in the fourth embodiment of the present invention. The device for displaying afterimage effects provided in this embodiment can be implemented by software and / or hardware, and can be configured in a terminal and / or a server to implement the afterimage effect display method in the embodiment of the present invention. The device can specifically include: a model calling module 410, an afterimage generating module 420, and an object rendering module 430.

[0083] Among them, the model calling module 410 is used to receive the afterimage effect trigger signal of the target object and call the pre-set afterimage model, wherein the afterimage model and the target object are in a synchronized state; the afterimage generation module 420 is used to obtain the image frame of the afterimage model and form the afterimage data of the target object based on the image frame of the afterimage model; the object rendering module 430 is used to render the afterimage data of the target object at the current display position of the afterimage data.

[0084] An embodiment of the present invention provides an afterimage effect display device, which receives an afterimage effect trigger signal of a target object and calls a preset afterimage model, wherein the afterimage model and the target object are in a synchronized state; obtains an image frame of the afterimage model, and forms afterimage data of the target object based on the image frame of the afterimage model; and renders the afterimage data of the target object at the current display position of the afterimage data. The above technical scheme of the embodiment of the present invention receives an afterimage effect trigger signal of a target object and calls a preset afterimage model, thereby realizing real-time synchronization between the afterimage model and the target object, and improving the real-time performance of the afterimage effect display; further, by obtaining the image frame of the afterimage model, the image frame of the afterimage model is formed into the afterimage data of the target object, thereby realizing the conversion from the image frame to the afterimage data. Compared with the prior art, the instantiation process is reduced, the memory usage is reduced, and the quality of the afterimage effect is improved.

[0085] On the basis of any optional technical solution in the embodiments of the present invention, optionally, the afterimage model is mounted on a preset empty node, and the afterimage model is configured with a virtual camera for collecting image frames of the afterimage model.

[0086] Based on any optional technical solution in the embodiments of the present invention, optionally, the synchronization state includes prop synchronization and action synchronization.

[0087] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:

[0088] The model updating module is used to obtain the current state of the target object based on the synchronization manager, and send the current state to the afterimage model so that the afterimage model obtains the current state for updating.

[0089] On the basis of any optional technical solution in the embodiment of the present invention, optionally, the afterimage generation module 420 may also be used for:

[0090] Acquire a display angle of the target object, and control a collection angle of the virtual camera according to the display angle so that the collection angle is the same as the display angle of the target object;

[0091] The virtual camera is controlled to acquire image frames of the afterimage model at the acquisition angle.

[0092] On the basis of any optional technical solution in the embodiment of the present invention, optionally, the afterimage generation module 420 may further include:

[0093] An image frame acquisition unit, used for sequentially acquiring image frames of the afterimage model according to a preset time interval;

[0094] The afterimage data generating unit is used to perform transparent processing on each image frame respectively to obtain the afterimage data corresponding to each image frame.

[0095] On the basis of any optional technical solution in the embodiments of the present invention, optionally, the afterimage data generating unit may be specifically used for:

[0096] For any image frame, transparent processing is performed based on different transparencies to obtain image frames with different transparencies;

[0097] The image frames with different transparency are combined to form corresponding residual image data.

[0098] Based on any optional technical solution in the embodiment of the present invention, optionally, the object rendering module 430 further includes:

[0099] a current position determination unit, which determines a current display position corresponding to each image frame based on a motion trajectory of the target object;

[0100] The current position rendering unit is used to render the residual image data formed by each image frame at the corresponding current display position.

[0101] Based on any optional technical solution in the embodiments of the present invention, optionally, the current position rendering unit may be specifically used for:

[0102] Create a display billboard in each current display location;

[0103] The residual image data formed by the corresponding image frame is rendered on each display billboard.

[0104] On the basis of any optional technical solution in the embodiment of the present invention, optionally, the afterimage generation module 420 may further include:

[0105] A sequence frame generating unit, configured to sequentially collect image frames of the afterimage model according to a preset time interval, and form a sequence frame based on a timestamp of each image frame;

[0106] The fade processing unit is used to perform afterimage fade processing on the sequence frames to obtain afterimage data of the target object.

[0107] Based on any optional technical solution in the embodiments of the present invention, optionally, the desalination processing unit may also be used for:

[0108] According to the order of the image frames in the current sequence of frames, an image frame to be faded for residual image is determined, and a fading process is performed on the determined image frame to obtain a next sequence of frames, wherein the image frame to be faded for residual image is the first-order image frame in the current sequence of frames;

[0109] Afterimage data of the target object is formed based on each of the sequence frames.

[0110] Based on any optional technical solution in the embodiment of the present invention, optionally, the object rendering module 430 may also be used for:

[0111] According to the current position of the target object, the current display position of the residual image data is determined, a display billboard is created at the current display position, and the residual image data is rendered based on the display billboard.

[0112] The afterimage effect display device provided in the embodiment of the present invention can execute the afterimage effect display method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0113] Embodiment 5

[0114] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. Figure 5 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 5 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0115] like Figure 5 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0116] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0117] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0118] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0119] A program / utility 36 having a set (at least one) of program modules 26 may be stored, for example, in system memory 28, such program modules 26 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 26 generally perform the functions and / or methods of the embodiments described herein.

[0120] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and / or any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 20. Figure 5 As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 5Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0121] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing a method for displaying an afterimage effect provided in the embodiment of the present invention.

[0122] Embodiment 6

[0123] Embodiment 6 of the present invention further provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to execute a method for displaying an afterimage effect when executed by a computer processor, the method comprising:

[0124] Receiving an afterimage effect trigger signal of a target object, and calling a preset afterimage model, wherein the afterimage model is in a synchronized state with the target object;

[0125] Acquire an image frame of the afterimage model, and form afterimage data of the target object based on the image frame of the afterimage model;

[0126] The afterimage data of the target object is rendered at the current display position of the afterimage data.

[0127] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0128] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0129] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0130] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0131] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for displaying afterimage effect, characterized in that: include: Receive a trigger signal of an afterimage effect of a target object, and call a preset afterimage model, wherein the afterimage model is in a synchronized state with the target object, the trigger signal is an action signal, the action signal includes a continuous action signal and a single action signal, and the trigger signal includes a signal formed by a character walking, a prop using, or a skill releasing operation; Acquire an image frame of the afterimage model, and form afterimage data of the target object based on the image frame of the afterimage model; Rendering the afterimage data of the target object at a current display position of the afterimage data; The acquiring the image frame of the afterimage model and forming the afterimage data of the target object based on the image frame of the afterimage model comprises: The image frames of the afterimage model are sequentially collected according to a preset time interval, and a sequence frame is formed based on the timestamp of each image frame; wherein the sequence frame is a dynamic image obtained by sorting the multiple image frames of the afterimage model according to the timestamp; The afterimage fading process is performed on the sequence frames to obtain the afterimage data of the target object.

2. The method according to claim 1, characterized in that: The afterimage model is mounted on a preset empty node, and the afterimage model is configured with a virtual camera for collecting image frames of the afterimage model.

3. The method according to claim 1, characterized in that The synchronization state includes prop synchronization and action synchronization.

4. The method according to claim 3, characterized in that The method further comprises: The current state of the target object is obtained based on the synchronization manager, and the current state is sent to the afterimage model, so that the afterimage model obtains the current state for updating.

5. The method according to claim 2, characterized in that: The step of acquiring the image frame of the afterimage model comprises: Acquire a display angle of the target object, and control a collection angle of the virtual camera according to the display angle so that the collection angle is the same as the display angle of the target object; The virtual camera is controlled to acquire image frames of the afterimage model at the acquisition angle.

6. A method for displaying afterimage effect, characterized in that: include: Receive a trigger signal of an afterimage effect of a target object, and call a preset afterimage model, wherein the afterimage model is in a synchronized state with the target object, the trigger signal is an action signal, the action signal includes a continuous action signal and a single action signal, and the trigger signal includes a signal formed by a character walking, a prop using, or a skill releasing operation; Acquire an image frame of the afterimage model, and form afterimage data of the target object based on the image frame of the afterimage model; Rendering the afterimage data of the target object at a current display position of the afterimage data; The acquiring the image frame of the afterimage model and forming the afterimage data of the target object based on the image frame of the afterimage model comprises: Sequentially collecting image frames of the afterimage model according to preset time intervals; Transparency processing is performed on each image frame to obtain residual image data corresponding to each image frame.

7. The method according to claim 6, characterized in that The transparent processing is performed on each image frame to obtain the residual image data corresponding to each image frame, including: For each image frame, transparent processing is performed based on different transparencies to obtain image frames with different transparencies; The image frames with different transparency are combined to form corresponding residual image data.

8. The method according to claim 6, characterized in that The rendering of the afterimage data of the target object at the current display position of the afterimage data includes: Based on the motion trajectory of the target object, determining a current display position corresponding to each image frame; The residual image data formed by each image frame is rendered at the corresponding current display position.

9. The method according to claim 8, characterized in that The rendering of the residual image data formed by each image frame at the corresponding current display position includes: Create a display billboard in each current display location; The residual image data formed by the corresponding image frame is rendered on each display billboard.

10. The method according to claim 1, characterized in that The performing afterimage fading processing on the sequence frames to obtain afterimage data of the target object includes: According to the order of the image frames in the current sequence of frames, an image frame to be faded for residual image is determined, and a fading process is performed on the determined image frame to obtain a next sequence of frames, wherein the image frame to be faded for residual image is the first-order image frame in the current sequence of frames; Afterimage data of the target object is formed based on each of the sequence frames.

11. The method according to claim 1, characterized in that: The rendering of the afterimage data of the target object at the current display position of the afterimage data includes: According to the current position of the target object, the current display position of the residual image data is determined, a display billboard is created at the current display position, and the residual image data is rendered based on the display billboard.

12. A device for displaying afterimage effect, characterized in that: include: A model calling module is used to receive a trigger signal of an afterimage effect of a target object and call a preset afterimage model, wherein the afterimage model is in a synchronized state with the target object, the trigger signal is an action signal, the action signal includes a continuous action signal and a single action signal, and the trigger signal includes a signal formed by a character walking, a prop using, or a skill releasing operation; An afterimage generation module, used for acquiring an image frame of the afterimage model, and forming afterimage data of the target object based on the image frame of the afterimage model; An object rendering module, used for rendering the afterimage data of the target object at a current display position of the afterimage data; The residual image generation module also includes: A sequence frame generation unit, configured to sequentially collect image frames of the afterimage model according to a preset time interval, and form a sequence frame based on a timestamp of each image frame; wherein the sequence frame is a dynamic image obtained by sorting multiple image frames of the afterimage model according to the timestamp; The fade processing unit is used to perform afterimage fade processing on the sequence frames to obtain afterimage data of the target object.

13. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the afterimage effect display method as described in any one of claims 1-11.

14. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the afterimage effect display method as described in any one of claims 1-11 when executed by a computer processor.