Shuttle special effect implementation method and device, storage medium and computer equipment

By detecting the preset rendering range of virtual characters entering the target barrier in the game, determining the shuttle contact area and displaying dynamic changes in special effects, the problem of the existing shuttle special effects is solved, and a more vivid and realistic game experience is achieved.

CN119280795APending Publication Date: 2025-01-10PERFECT WORLD INTERACTIVE ENTERTAINMENT (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311560768.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The shuttle effects in existing games are monotonous, unable to effectively enhance the visual effects of the game, and lack the sense of reality that matches the shapes and actions of virtual characters.

Method used

By detecting the preset special effect rendering range of virtual characters entering the target shuttle barrier, the shuttle contact area is determined, and the shuttle special effects matching the virtual character's shape and actions are displayed on the target barrier. Frame-by-frame update and depth information processing technology are used to generate dynamics Changeable profile effects.

Benefits of technology

It realizes a more vivid and realistic shuttle effect, enhances the player experience, provides a unique visual effect that matches the virtual character's shapes and actions, and enhances the visual richness and fun of the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119280795A_ABST
    Figure CN119280795A_ABST
Patent Text Reader

Abstract

The invention discloses a shuttling special effect implementation method and device, a storage medium and computer equipment, and the method comprises the steps: determining a shuttling contact region of a virtual character to a target shuttling barrier under the condition that the virtual character is detected to enter a preset special effect rendering range corresponding to the target shuttling barrier, the shuttle contact area is matched with the current shape and action of the virtual character; according to the shuttling contact area, the shuttling special effect of the virtual character on the target shuttling barrier is displayed on the target shuttling barrier, and the shuttling special effect is the special effect, related to the contour, of the virtual character when the virtual character shuttles the target shuttling barrier. According to the method and the device, the shuttle special effect of the virtual character on the target shuttle barrier is more vivid, more real and richer, so that a player can obtain more interesting experience when controlling the virtual character to pass through the barrier in the game, and the fun when the player experiences the game is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of game special effects, and in particular to a method and device for realizing shuttle special effects, a storage medium, and a computer device. Background Art

[0002] In order to enrich their daily lives, more and more people choose to spend their time playing games, especially some mobile games and online games. In order to enrich the game content and enhance the game visual effects, a large number of game special effects are usually set up and added to the game scenes.

[0003] In the game world, it is common for game characters to enter from one scene to another. In order to enrich the visual effects when the game characters enter the scene, some games currently set a transparent barrier at the dividing position of the two scenes. The game characters can shuttle from the barrier to another scene. When the game characters shuttle, in order to reflect the interaction between the game characters and the barrier, some special effects are displayed on the barrier to distinguish it from the performance when the barrier is not shuttled. At present, the more common practice is to use particle effects to show the interaction. When the game characters pass through the barrier, the particle effects are played at the shuttle position. However, the particle effects displayed in this way are relatively monotonous and the effect is not ideal. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a method and device for implementing a shuttle effect, a storage medium, and a computer device, so that the shuttle effect is more vivid, more realistic, and richer, so that players can have a more interesting experience when controlling virtual characters to pass through barriers in the game, thereby increasing the fun of players in experiencing the game.

[0005] According to one aspect of the present application, a method for realizing a shuttle special effect is provided, the method comprising:

[0006] In the case where it is detected that the virtual character enters a preset special effect rendering range corresponding to the target shuttling barrier, determining a shuttling contact area of ​​the virtual character to the target shuttling barrier, wherein the shuttling contact area matches the current shape and action of the virtual character;

[0007] According to the shuttling contact area, a shuttling special effect of the virtual character on the target shuttling barrier is displayed on the target shuttling barrier, wherein the shuttling special effect is manifested as a special effect related to the outline of the virtual character left behind when the virtual character shuttles the target shuttling barrier.

[0008] Optionally, determining the shuttling contact area of ​​the virtual character with respect to the target shuttling barrier includes:

[0009] Determining the shuttling contact area of ​​the virtual character on the target shuttling barrier frame by frame until it is detected that the virtual character leaves the preset special effect rendering range;

[0010] Accordingly, displaying the shuttling special effect of the virtual character on the target shuttling barrier according to the shuttling contact area includes:

[0011] According to the shuttle contact area in each frame, the shuttling special effects of the virtual character on the target shuttle barrier are displayed frame by frame on the target shuttle barrier, so as to show the contour-related special effects with dynamic changing effects left on the target shuttle barrier when the virtual character shuttles.

[0012] Optionally, displaying the shuttling special effect of the virtual character on the target shuttling barrier according to the shuttling contact area includes:

[0013] In the case where the current frame shuttling contact area is the first frame shuttling contact area, displaying the current frame shuttling special effect of the virtual character on the target shuttling barrier on the target shuttling barrier according to the current frame shuttling contact area;

[0014] When the current frame shuttling contact area is not the first frame shuttling contact area, the current frame shuttling special effects of the virtual character on the target shuttling barrier are displayed on the target shuttling barrier according to the current frame shuttling contact area and the previous frame shuttling contact area, so as to show the contour-related special effects with continuously changing effects left on the target shuttling barrier when the virtual character shuttles.

[0015] Optionally, determining the shuttling contact area of ​​the virtual character with respect to the target shuttling barrier includes:

[0016] Shooting the virtual character by an orthogonal projection camera disposed at a shooting position corresponding to the target shuttle barrier, and obtaining depth information of each frame of the virtual character;

[0017] According to the distance information corresponding to the depth information, a shuttle contact area of ​​the virtual character on the target shuttle barrier is extracted from the depth information.

[0018] Optionally, extracting the shuttling contact area of ​​the virtual character on the target shuttling barrier from the depth information according to the distance information corresponding to the depth information includes:

[0019] Draw a texture map according to the depth information, and determine the distance corresponding to each pixel based on the pixel information of each pixel in the texture map;

[0020] Pixel points within a preset contact range are extracted from the texture map as contact pixels, and a shuttle contact area of ​​the virtual character with respect to the target shuttle barrier is generated based on the pixel information of the contact pixels, wherein the preset contact range is determined based on a preset shooting distance between the shooting position and the target shuttle barrier and a special effect display distance corresponding to the target shuttle barrier.

[0021] Optionally, the orthogonal projection camera captures depth information of the virtual character frame by frame;

[0022] Displaying the shuttling special effect of the virtual character on the target shuttling barrier according to the shuttling contact area includes:

[0023] In the case where the current frame shuttle contact area is the first frame shuttle contact area, drawing the current frame shuttle contact map according to the current frame shuttle contact area;

[0024] When the current frame shuttle contact area is not the first frame shuttle contact area, a current frame preliminary shuttle contact map is drawn according to the current frame shuttle contact area, and a current frame shuttle contact map is generated according to the current frame preliminary shuttle contact map and the previous frame shuttle contact map;

[0025] According to the current frame shuttle contact map, the shuttling special effects of the virtual character are drawn on the material of the target shuttle barrier, so as to render the shuttling special effects of the virtual character on the target shuttle barrier on the target shuttle barrier using the drawn material.

[0026] Optionally, generating a current frame shuttle contact map according to the current frame preliminary shuttle contact map and the previous frame shuttle contact map includes:

[0027] Preprocessing the shuttle contact map of the previous frame, wherein the preprocessing includes at least one of blurring, distorting and fading;

[0028] The preliminary shuttle contact map of the current frame is superimposed with the preprocessed shuttle contact map of the previous frame to obtain the shuttle contact map of the current frame.

[0029] Optionally, photographing the virtual character by an orthogonal projection camera disposed at a photographing position corresponding to the target shuttling barrier to obtain depth information of the virtual character includes:

[0030] On a straight line passing through the position of the virtual character and perpendicular to the target shuttling barrier, determining the shooting position at a preset shooting distance from the target shuttling barrier;

[0031] The orthogonal projection camera is turned on at the shooting position, and the virtual character is shot by the orthogonal projection camera to obtain depth information of the virtual character.

[0032] Optionally, the method further comprises:

[0033] When it is detected that the virtual character leaves the preset special effect rendering range, the orthogonal projection camera is turned off.

[0034] Optionally, the method further comprises:

[0035] Using the collision box corresponding to the target shuttle barrier to perform collision detection, wherein the range of the collision box is the preset special effect rendering range;

[0036] In the case where it is detected that the virtual character enters the collision box, determining that the virtual character enters the preset special effect rendering range;

[0037] When it is detected that the virtual character leaves the collision box, it is determined that the virtual character leaves the preset special effect rendering range.

[0038] According to another aspect of the present application, a device for realizing a shuttle special effect is provided, the device comprising:

[0039] A contact area determination module, for determining a shuttling contact area of ​​the virtual character on the target shuttling barrier when detecting that the virtual character enters a preset special effect rendering range corresponding to the target shuttling barrier, wherein the shuttling contact area matches the current shape and action of the virtual character;

[0040] A shuttling special effect display module is used to display the shuttling special effect of the virtual character on the target shuttling barrier on the target shuttling barrier according to the shuttling contact area, wherein the shuttling special effect is manifested as a special effect related to the outline of the virtual character left behind when the virtual character shuttles the target shuttling barrier.

[0041] Optionally, the contact area determination module is further used to:

[0042] Determining the shuttling contact area of ​​the virtual character on the target shuttling barrier frame by frame until it is detected that the virtual character leaves the preset special effect rendering range;

[0043] The shuttle special effect display module is also used for:

[0044] According to the shuttle contact area in each frame, the shuttling special effects of the virtual character on the target shuttle barrier are displayed frame by frame on the target shuttle barrier, so as to show the contour-related special effects with dynamic changing effects left on the target shuttle barrier when the virtual character shuttles.

[0045] Optionally, the shuttle special effect display module is further used for:

[0046] In the case where the current frame shuttling contact area is the first frame shuttling contact area, displaying the current frame shuttling special effect of the virtual character on the target shuttling barrier on the target shuttling barrier according to the current frame shuttling contact area;

[0047] When the current frame shuttling contact area is not the first frame shuttling contact area, the current frame shuttling special effects of the virtual character on the target shuttling barrier are displayed on the target shuttling barrier according to the current frame shuttling contact area and the previous frame shuttling contact area, so as to show the contour-related special effects with continuously changing effects left on the target shuttling barrier when the virtual character shuttles.

[0048] Optionally, the contact area determination module is further used to:

[0049] Shooting the virtual character by an orthogonal projection camera disposed at a shooting position corresponding to the target shuttle barrier, and obtaining depth information of each frame of the virtual character;

[0050] According to the distance information corresponding to the depth information, a shuttle contact area of ​​the virtual character on the target shuttle barrier is extracted from the depth information.

[0051] Optionally, the contact area determination module is further used to:

[0052] Draw a texture map according to the depth information, and determine the distance corresponding to each pixel based on the pixel information of each pixel in the texture map;

[0053] Pixel points within a preset contact range are extracted from the texture map as contact pixels, and a shuttle contact area of ​​the virtual character with respect to the target shuttle barrier is generated based on the pixel information of the contact pixels, wherein the preset contact range is determined based on a preset shooting distance between the shooting position and the target shuttle barrier and a special effect display distance corresponding to the target shuttle barrier.

[0054] Optionally, the orthogonal projection camera captures depth information of the virtual character frame by frame;

[0055] The shuttle special effect display module is also used for:

[0056] In the case where the current frame shuttle contact area is the first frame shuttle contact area, drawing the current frame shuttle contact map according to the current frame shuttle contact area;

[0057] When the current frame shuttle contact area is not the first frame shuttle contact area, a current frame preliminary shuttle contact map is drawn according to the current frame shuttle contact area, and a current frame shuttle contact map is generated according to the current frame preliminary shuttle contact map and the previous frame shuttle contact map;

[0058] According to the current frame shuttle contact map, the shuttling special effects of the virtual character are drawn on the material of the target shuttle barrier, so as to render the shuttling special effects of the virtual character on the target shuttle barrier on the target shuttle barrier using the drawn material.

[0059] Optionally, the shuttle special effect display module is further used for:

[0060] Preprocessing the shuttle contact map of the previous frame, wherein the preprocessing includes at least one of blurring, distorting and fading;

[0061] The preliminary shuttle contact map of the current frame is superimposed with the preprocessed shuttle contact map of the previous frame to obtain the shuttle contact map of the current frame.

[0062] Optionally, the contact area determination module is further used to:

[0063] On a straight line passing through the position of the virtual character and perpendicular to the target shuttling barrier, determining the shooting position at a preset shooting distance from the target shuttling barrier;

[0064] The orthogonal projection camera is turned on at the shooting position, and the virtual character is shot by the orthogonal projection camera to obtain depth information of the virtual character.

[0065] Optionally, the device further comprises:

[0066] The camera control module is used to: turn off the orthogonal projection camera when it is detected that the virtual character leaves the preset special effect rendering range.

[0067] Optionally, the device further comprises: a detection module, configured to:

[0068] Using the collision box corresponding to the target shuttle barrier to perform collision detection, wherein the range of the collision box is the preset special effect rendering range;

[0069] In the case where it is detected that the virtual character enters the collision box, determining that the virtual character enters the preset special effect rendering range;

[0070] When it is detected that the virtual character leaves the collision box, it is determined that the virtual character leaves the preset special effect rendering range.

[0071] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for realizing the above-mentioned shuttle special effect is implemented.

[0072] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method for realizing the above-mentioned shuttle special effect when executing the program.

[0073] By means of the above-mentioned technical scheme, an implementation method and device of a shuttle special effect, a storage medium, and a computer device provided in an embodiment of the present application, when detecting that a virtual character enters a preset special effect rendering range of a target shuttle barrier, determines the shuttling contact area of ​​the virtual character with respect to the target shuttle barrier according to the current shape and action of the virtual character, thereby displaying the shuttle special effect on the target shuttle barrier based on the shuttling contact area, showing that when the virtual character shuttles through the target shuttle barrier, a special effect related to the outline of the virtual character is left on the barrier. The shuttle special effects demonstrated in the embodiments of the present application are generated based on the shuttle contact area between the virtual character and the target shuttle barrier when the virtual character shuttles through the target shuttle barrier. The virtual character can visually leave a contour special effect that matches the current shape and action of the virtual character when passing through the target shuttle barrier. Based on this method, different virtual characters can produce different shuttle special effects that match their respective shapes and actions. The same virtual character can also produce different shuttle special effects with different shapes or actions. The shuttle special effects are more vivid, more realistic, and richer, so that players can have a more interesting experience when controlling the virtual character to pass through the barriers in the game, which increases the fun of the players in experiencing the game, and provides technical support for game development for game developers.

[0074] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0076] Figure 1 A schematic diagram of a process for realizing a shuttle special effect provided in an embodiment of the present application is shown;

[0077] Figure 2 A flow chart of another method for realizing a shuttle special effect provided in an embodiment of the present application is shown;

[0078] Figure 3 A schematic diagram showing the position of an orthogonal projection camera provided in an embodiment of the present application is shown;

[0079] Figure 4 A schematic diagram of a shuttle special effect provided by an embodiment of the present application is shown;

[0080] Figure 5 A schematic structural diagram of a device for realizing a shuttle special effect provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0081] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0082] In this embodiment, a method for realizing the shuttle special effect is provided, such as Figure 1 As shown, the method includes:

[0083] Step 101, when it is detected that the virtual character enters a preset special effect rendering range corresponding to a target shuttling barrier, determining a shuttling contact area of ​​the virtual character with respect to the target shuttling barrier, wherein the shuttling contact area matches the current shape and action of the virtual character.

[0084] Step 102, displaying the shuttling special effect of the virtual character on the target shuttling barrier according to the shuttling contact area, wherein the shuttling special effect is manifested as a special effect related to the outline of the virtual character left behind when the virtual character shuttles the target shuttling barrier.

[0085] In an embodiment of the present application, a target shuttle barrier refers to a virtual barrier in the game world that a virtual character can pass through and that leaves a shuttle special effect when passing through. For example, the target shuttle barrier can be a barrier, a virtual door, etc. that needs to be passed through to enter the immortal palace (or a sect, academy, etc.) from the game world. In the process of the virtual character moving in the game world, when it is detected that the virtual character has entered the preset special effect rendering range corresponding to the target shuttle barrier, when the virtual character approaches the target shuttle barrier, the area where the virtual character visually contacts the target shuttle barrier can be determined based on the current shape and action of the virtual character, that is, the shuttle contact area. Further, based on the shuttling contact area of ​​the virtual character to the target shuttle barrier, the shuttle special effect formed on the target shuttle barrier due to the virtual character shuttling through the target shuttle barrier is displayed, visually forming a special effect related to the virtual character's own outline when passing through the target shuttle barrier. The shuttle special effect can be directly expressed as leaving the outline of the shuttle contact area between the virtual character and the target shuttle barrier on the target shuttle barrier. In order to show a more vivid special effect, the shuttle special effect can also be processed by edge blurring, distortion, etc. based on the outline of the shuttle contact area to avoid the more blunt direct outline effect. For example, when the virtual character wears game costumes and passes through the target shuttle barrier, it leaves a special effect related to the outline that matches the shape of the game costumes it wears and the action of the virtual character when passing through the barrier. Compared with the single shuttle special effect currently generated by the particle system, the shuttle special effect generated by the embodiment of the present application is related to the shuttle contact area of ​​the target shuttle barrier when the virtual character passes through the target shuttle barrier. Different virtual characters can produce different shuttle special effects that match their respective shapes and actions. The same virtual character can also produce different shuttle special effects with different shapes or actions. The shuttle special effect is more vivid, more real, and richer.

[0086] In an embodiment of the present application, optionally, determining the shuttling contact area of ​​the virtual character with respect to the target shuttling barrier in step 101 includes: determining the shuttling contact area of ​​the virtual character with respect to the target shuttling barrier frame by frame until it is detected that the virtual character leaves the preset special effect rendering range; accordingly, step 102 includes: displaying the shuttling special effects of the virtual character with respect to the target shuttling barrier on the target shuttling barrier frame by frame according to the shuttling contact area of ​​each frame, so as to express the contour-related special effects with dynamically changing effects left on the target shuttling barrier when the virtual character shuttles.

[0087] In this embodiment, it generally takes a process for the virtual character to pass through the target shuttle barrier. In order to display the shuttle special effects more dynamically and vividly, the shuttling contact area of ​​the virtual character on the target shuttle barrier can also be obtained frame by frame, and the shuttling special effects can be displayed on the target shuttle barrier frame by frame according to the shuttling contact area, thereby showing the effect of the virtual character leaving a dynamically changing outline-related special effects on the target shuttle barrier during the process of passing through the target shuttle barrier. The shuttle special effects formed on the target shuttle barrier in the game show a visual effect that changes with the change of the contact area with the target shuttle barrier during the movement of the virtual character, further making the shuttle special effects more vivid and realistic.

[0088] By applying the technical solution of this embodiment, when it is detected that the virtual character enters the preset special effect rendering range of the target shuttle barrier, the shuttle contact area of ​​the virtual character to the target shuttle barrier is determined according to the current shape and action of the virtual character, so that the shuttle special effect is displayed on the target shuttle barrier according to the shuttle contact area, showing that the virtual character leaves a special effect related to the outline of the virtual character on the barrier when shuttling the target shuttle barrier. The shuttle special effect shown in the embodiment of the present application is generated based on the shuttle contact area of ​​the virtual character with the target shuttle barrier when shuttling the target shuttle barrier, and can visually show that the virtual character leaves a contour special effect matching the current shape and action of the virtual character when passing through the target shuttle barrier. Based on this method, different virtual characters can produce different shuttle special effects matching their respective shapes and actions, and the same virtual character can also produce different shuttle special effects when the shape or action is different. The shuttle special effect is more vivid, more real, and richer, so that players can get a more interesting experience when controlling the virtual character to pass through the barrier in the game, increase the fun of the player when experiencing the game, and provide technical support for game developers for game development.

[0089] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for realizing the shuttle special effect is provided, such as Figure 2 As shown, the method includes:

[0090] Step 201, when it is detected that the virtual character enters a preset special effect rendering range corresponding to a target shuttling barrier, the shuttling contact area of ​​the virtual character with respect to the target shuttling barrier is determined frame by frame until it is detected that the virtual character leaves the preset special effect rendering range, wherein the shuttling contact area matches the current shape and action of the virtual character.

[0091] In an embodiment of the present application, starting from detecting that the virtual character enters the preset special effects rendering range of the target shuttling barrier, the shuttling contact area of ​​the virtual character with respect to the target shuttling barrier is determined frame by frame until the virtual character leaves the preset special effects rendering range, and the shuttling contact area of ​​each frame matches the shape and action of the virtual character corresponding to the frame.

[0092] In the embodiment of the present application, optionally, determining the shuttle contact area of ​​the virtual character on the target shuttle barrier in step 101 and step 201 includes:

[0093] Step 201-1, photographing the virtual character by an orthogonal projection camera disposed at a photographing position corresponding to the target shuttle barrier, to obtain depth information of each frame of the virtual character;

[0094] Step 201 - 2 : extracting the shuttle contact area of ​​the virtual character on the target shuttle barrier from the depth information according to the distance information corresponding to the depth information.

[0095] In the above embodiment, in the game, an orthogonal projection camera can be pre-created at the shooting position corresponding to the target shuttle barrier, and the orthogonal projection camera can be turned on when the virtual character enters the preset special effect rendering range corresponding to the target shuttle barrier; or when the virtual character enters the preset special effect rendering range corresponding to the target shuttle barrier, the orthogonal projection camera can be created and turned on at the shooting position corresponding to the target shuttle barrier. After turning on the orthogonal projection camera, the virtual character is photographed frame by frame to obtain the depth information of each frame corresponding to the virtual character. In order to ensure that the virtual character can quickly generate the shuttle special effect when shuttling the target shuttle barrier, the preset special effect rendering range can be larger than the preset contact range of the target shuttle barrier, that is, the virtual character is photographed when it enters the preset special effect rendering range, but it is not until the virtual character enters the preset contact range that it is considered that the virtual character has made contact with the target shuttle barrier and the shuttle special effect begins to be displayed. Next, the depth information can characterize the three-dimensional coordinate information of each point on the virtual character model (including the modeling model). By obtaining the depth information, the distance between each point on the virtual character model and the orthogonal projection camera that shoots the virtual character can be known, thereby calculating the distance between each point on the virtual character model and the target shuttle barrier. Further, according to the distance information corresponding to the depth information, the points on the virtual character model that are close to the target shuttle barrier can be extracted from the depth information, and the shuttling contact area of ​​the virtual character with the target shuttle barrier can be determined based on these points.

[0096] In an embodiment of the present application, optionally, step 201-1 includes: determining the shooting position at a preset shooting distance from the target shuttle barrier on a straight line passing through the position of the virtual character and perpendicular to the target shuttle barrier; turning on the orthogonal projection camera at the shooting position, and shooting the virtual character through the orthogonal projection camera to obtain depth information of the virtual character.

[0097] In the above embodiment, if Figure 3 As shown, the straight line formed by the shooting position of the orthogonal projection camera and the position of the virtual character is perpendicular to the target shuttle barrier, and the position of the virtual character is between the shooting position and the target shuttle barrier. Specifically, when it is detected that the virtual character enters the preset special effect rendering range, a point with a preset shooting distance from the target shuttle barrier is found on the straight line passing through the position of the virtual character and perpendicular to the target shuttle barrier as the shooting position, and the pre-created orthogonal projection camera is moved to the position and turned on, or an orthogonal projection camera is created and turned on at the position, so as to shoot the virtual character to obtain depth information.

[0098] In an embodiment of the present application, optionally, step 201-2 includes: drawing a texture map according to the depth information, and determining the distance corresponding to each pixel based on the pixel information of each pixel in the texture map; extracting pixels in the texture map whose distances fall within a preset contact range as contact pixels, and generating a shuttling contact area of ​​the virtual character with respect to the target shuttling barrier based on the pixel information of the contact pixels, wherein the preset contact range is determined based on a preset shooting distance between the shooting position and the target shuttling barrier and a special effect display distance corresponding to the target shuttling barrier.

[0099] In the above embodiment, the depth information can be drawn in the texture map, so as to determine the distance corresponding to each pixel based on the pixel depth information of each pixel in the texture map, and the distance is used to represent the distance from the orthogonal projection camera, and then the pixel corresponding to the pixel falling within the preset contact range is extracted from the texture map as the contact pixel, so as to determine the shuttling contact area of ​​the virtual character to the target shuttling barrier based on the contact pixel, and the shuttling contact area is the area formed by the contact pixel. Specifically, the preset contact range refers to the range in which the virtual character comes into contact with the target shuttling barrier, and the preset contact range covers the range in which the distance from the left and right sides of the target shuttling barrier is not greater than the special effect display distance, that is, the minimum value of the preset contact range is the difference between the shooting distance and the special effect display distance, and the maximum value of the preset contact range is the sum of the shooting distance and the special effect display distance. For example, the orthographic projection camera is placed 10 meters before the target shuttle barrier, and the preset special effect rendering range is 20 meters, that is, the virtual character will be photographed by the camera within 10 meters before and after the target shuttle barrier, and the special effect display distance is 1 meter. Since the distance between the camera and the target shuttle barrier is 10 meters, the depth information rendered into the Render Target texture map is compared with 10 meters. If the depth information is less than 1 meter away from 10 meters (for example, the depth is 9 to 11 meters), it is determined that the current pixel point can be regarded as the area where the player character is in contact with the door.

[0100] Furthermore, in order to reduce the game device cost, it is not necessary to continue to shoot the virtual character with the orthogonal projection camera after the virtual character leaves the preset special effect rendering range. Optionally, when it is detected that the virtual character leaves the preset special effect rendering range, the orthogonal projection camera is turned off.

[0101] Step 202, when the current frame shuttle contact area is the first frame shuttle contact area, display the current frame shuttle special effect of the virtual character on the target shuttle barrier on the target shuttle barrier according to the current frame shuttle contact area.

[0102] In the embodiment of the present application, if the current frame shuttle contact area is the first frame, then the current frame shuttle contact area can be directly used to display the shuttle special effects of the current frame.

[0103] Optionally, step 202 includes: when the current frame shuttling contact area is the first frame shuttling contact area, drawing a current frame shuttling contact map according to the current frame shuttling contact area; drawing the shuttling special effects of the virtual character on the material of the target shuttling barrier according to the current frame shuttling contact map, so as to render the shuttling special effects of the virtual character on the target shuttling barrier on the target shuttling barrier using the drawn material.

[0104] In the above embodiment, for the first frame shuttle contact area, it can be directly drawn as the current frame shuttle contact map, and based on the map, the shuttle special effects are drawn on the material of the target shuttle barrier, so as to use the drawn material to render the virtual character's shuttle special effects on the target shuttle barrier.

[0105] Step 203, when the current frame shuttling contact area is not the first frame shuttling contact area, the current frame shuttling special effects of the virtual character on the target shuttling barrier are displayed on the target shuttling barrier according to the current frame shuttling contact area and the previous frame shuttling contact area, so as to show the contour-related special effects with continuously changing effects left on the target shuttling barrier when the virtual character shuttles.

[0106] In the embodiment of the present application, if the shuttle contact area of ​​the current frame is not the first frame, then in order to show the continuous change effect of the shuttle special effect, the shuttle special effect of the current frame can be displayed based on the fusion effect of the shuttle contact area of ​​the current frame and the shuttle contact area of ​​the previous frame. Figure 4 The figure shows a schematic diagram of a frame of shuttle special effects.

[0107] Optionally, step 203 includes: when the current frame shuttling contact area is not the first frame shuttling contact area, drawing a current frame preliminary shuttling contact map according to the current frame shuttling contact area, and generating a current frame shuttling contact map according to the current frame preliminary shuttling contact map and the previous frame shuttling contact map; drawing the shuttling special effects of the virtual character on the material of the target shuttling barrier according to the current frame shuttling contact map, so as to render the shuttling special effects of the virtual character on the target shuttling barrier on the target shuttling barrier using the drawn material.

[0108] In the above embodiment, for the shuttle contact area that is not the first frame, the current frame shuttle contact area can be first drawn as a current frame preliminary shuttle contact map, and the map is merged with the previous frame shuttle contact map to obtain the current frame shuttle contact map, and then the shuttle special effects are drawn on the material of the target shuttle barrier based on the map, so as to use the drawn material to render the virtual character's shuttle special effects on the target shuttle barrier.

[0109] Among them, generating the current frame shuttle contact map according to the current frame preliminary shuttle contact map and the previous frame shuttle contact map can be: preprocessing the previous frame shuttle contact map, wherein the preprocessing includes at least one of blurring, distortion and fading; superimposing the current frame preliminary shuttle contact map and the preprocessed previous frame shuttle contact map to obtain the current frame shuttle contact map.

[0110] In this embodiment, the shuttle contact map of the previous frame may be blurred, distorted and faded first, and then the preliminary shuttle contact map of the current frame and the processed shuttle contact map of the previous frame may be superimposed to obtain the shuttle contact map of the current frame.

[0111] In an embodiment of the present application, optionally, it also includes: performing collision detection using a collision box corresponding to the target shuttle barrier, wherein the range of the collision box is the preset special effect rendering range; when it is detected that the virtual character enters the collision box, determining that the virtual character enters the preset special effect rendering range; when it is detected that the virtual character leaves the collision box, determining that the virtual character leaves the preset special effect rendering range.

[0112] In this embodiment, a collision box can be added to the game scene. The range of the collision box is the preset special effect rendering range. When the virtual character is detected to enter the collision box, it is determined that the virtual character enters the preset special effect rendering range. When the virtual character is detected to leave the collision box, it is determined that the virtual character leaves the preset special effect rendering range. At this time, the orthogonal projection camera can be turned off to prevent the camera from continuously shooting and executing subsequent texture mapping based on the shooting depth information and the process of calculating the shuttle contact area based on the drawn map, thereby avoiding performance consumption.

[0113] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a device for realizing the shuttle special effect, such as Figure 5 As shown, the device comprises:

[0114] A contact area determination module 51 is used to determine the shuttling contact area of ​​the virtual character to the target shuttling barrier when it is detected that the virtual character enters a preset special effect rendering range corresponding to the target shuttling barrier, wherein the shuttling contact area matches the current shape and action of the virtual character;

[0115] The shuttling special effect display module 52 is used to display the shuttling special effect of the virtual character on the target shuttling barrier on the target shuttling barrier according to the shuttling contact area, wherein the shuttling special effect is manifested as a special effect related to the outline of the virtual character left behind when the virtual character shuttles the target shuttling barrier.

[0116] Optionally, the contact area determination module 51 is further configured to:

[0117] Determining the shuttling contact area of ​​the virtual character on the target shuttling barrier frame by frame until it is detected that the virtual character leaves the preset special effect rendering range;

[0118] The shuttle special effect display module 52 is also used for:

[0119] According to the shuttle contact area in each frame, the shuttling special effects of the virtual character on the target shuttle barrier are displayed frame by frame on the target shuttle barrier, so as to show the contour-related special effects with dynamic changing effects left on the target shuttle barrier when the virtual character shuttles.

[0120] Optionally, the shuttle special effect display module 52 is further used for:

[0121] In the case where the current frame shuttling contact area is the first frame shuttling contact area, displaying the current frame shuttling special effect of the virtual character on the target shuttling barrier on the target shuttling barrier according to the current frame shuttling contact area;

[0122] When the current frame shuttling contact area is not the first frame shuttling contact area, the current frame shuttling special effects of the virtual character on the target shuttling barrier are displayed on the target shuttling barrier according to the current frame shuttling contact area and the previous frame shuttling contact area, so as to show the contour-related special effects with continuously changing effects left on the target shuttling barrier when the virtual character shuttles.

[0123] Optionally, the contact area determination module 51 is further configured to:

[0124] Shooting the virtual character by an orthogonal projection camera disposed at a shooting position corresponding to the target shuttle barrier, and obtaining depth information of each frame of the virtual character;

[0125] According to the distance information corresponding to the depth information, a shuttle contact area of ​​the virtual character on the target shuttle barrier is extracted from the depth information.

[0126] Optionally, the contact area determination module 51 is further configured to:

[0127] Draw a texture map according to the depth information, and determine the distance corresponding to each pixel based on the pixel information of each pixel in the texture map;

[0128] Pixel points within a preset contact range are extracted from the texture map as contact pixels, and a shuttle contact area of ​​the virtual character with respect to the target shuttle barrier is generated based on the pixel information of the contact pixels, wherein the preset contact range is determined based on a preset shooting distance between the shooting position and the target shuttle barrier and a special effect display distance corresponding to the target shuttle barrier.

[0129] Optionally, the orthogonal projection camera captures depth information of the virtual character frame by frame;

[0130] The shuttle special effect display module 52 is also used for:

[0131] In the case where the current frame shuttle contact area is the first frame shuttle contact area, drawing the current frame shuttle contact map according to the current frame shuttle contact area;

[0132] When the current frame shuttle contact area is not the first frame shuttle contact area, a current frame preliminary shuttle contact map is drawn according to the current frame shuttle contact area, and a current frame shuttle contact map is generated according to the current frame preliminary shuttle contact map and the previous frame shuttle contact map;

[0133] According to the current frame shuttle contact map, the shuttling special effects of the virtual character are drawn on the material of the target shuttle barrier, so as to render the shuttling special effects of the virtual character on the target shuttle barrier on the target shuttle barrier using the drawn material.

[0134] Optionally, the shuttle special effect display module 52 is further used for:

[0135] Preprocessing the shuttle contact map of the previous frame, wherein the preprocessing includes at least one of blurring, distorting and fading;

[0136] The preliminary shuttle contact map of the current frame is superimposed with the preprocessed shuttle contact map of the previous frame to obtain the shuttle contact map of the current frame.

[0137] Optionally, the contact area determination module 51 is further configured to:

[0138] On a straight line passing through the position of the virtual character and perpendicular to the target shuttling barrier, determining the shooting position at a preset shooting distance from the target shuttling barrier;

[0139] The orthogonal projection camera is turned on at the shooting position, and the virtual character is shot by the orthogonal projection camera to obtain depth information of the virtual character.

[0140] Optionally, the device further comprises:

[0141] The camera control module 53 is used to: turn off the orthogonal projection camera when it is detected that the virtual character leaves the preset special effect rendering range.

[0142] Optionally, the device further includes: a detection module 54, configured to:

[0143] Using the collision box corresponding to the target shuttle barrier to perform collision detection, wherein the range of the collision box is the preset special effect rendering range;

[0144] In the case where it is detected that the virtual character enters the collision box, determining that the virtual character enters the preset special effect rendering range;

[0145] When it is detected that the virtual character leaves the collision box, it is determined that the virtual character leaves the preset special effect rendering range.

[0146] It should be noted that for other corresponding descriptions of the functional units involved in the device for realizing the shuttle special effect provided in the embodiment of the present application, reference can be made to Figure 1 to Figure 2 The corresponding description in the method will not be repeated here.

[0147] The embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory and a communication interface, and can also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.

[0148] Those skilled in the art will appreciate that the structure of the above-mentioned computer device is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0149] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0150] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0151] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0152] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0153] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0154] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for realizing a shuttle special effect, characterized in that: The method comprises: In the case where it is detected that the virtual character enters a preset special effect rendering range corresponding to the target shuttling barrier, determining a shuttling contact area of ​​the virtual character to the target shuttling barrier, wherein the shuttling contact area matches the current shape and action of the virtual character; According to the shuttling contact area, a shuttling special effect of the virtual character on the target shuttling barrier is displayed on the target shuttling barrier, wherein the shuttling special effect is manifested as a special effect related to the outline of the virtual character left behind when the virtual character shuttles the target shuttling barrier.

2. The method according to claim 1, characterized in that Determining the shuttling contact area of ​​the virtual character with respect to the target shuttling barrier includes: Determining the shuttling contact area of ​​the virtual character on the target shuttling barrier frame by frame until it is detected that the virtual character leaves the preset special effect rendering range; Accordingly, displaying the shuttling special effect of the virtual character on the target shuttling barrier on the target shuttling barrier according to the shuttling contact area includes: According to the shuttle contact area in each frame, the shuttling special effects of the virtual character on the target shuttle barrier are displayed frame by frame on the target shuttle barrier, so as to show the contour-related special effects with dynamic changing effects left on the target shuttle barrier when the virtual character shuttles.

3. The method according to claim 2, characterized in that According to each frame of the shuttle contact area, the shuttle special effect of the virtual character on the target shuttle barrier is displayed frame by frame on the target shuttle barrier, including: In the case where the current frame shuttling contact area is the first frame shuttling contact area, displaying the current frame shuttling special effect of the virtual character on the target shuttling barrier on the target shuttling barrier according to the current frame shuttling contact area; When the current frame shuttling contact area is not the first frame shuttling contact area, the current frame shuttling special effects of the virtual character on the target shuttling barrier are displayed on the target shuttling barrier according to the current frame shuttling contact area and the previous frame shuttling contact area, so as to show the contour-related special effects with continuously changing effects left on the target shuttling barrier when the virtual character shuttles.

4. The method according to claim 1, characterized in that: Determining the shuttling contact area of ​​the virtual character with respect to the target shuttling barrier includes: Shooting the virtual character by an orthogonal projection camera disposed at a shooting position corresponding to the target shuttle barrier, and obtaining depth information of each frame of the virtual character; According to the distance information corresponding to the depth information, a shuttle contact area of ​​the virtual character on the target shuttle barrier is extracted from the depth information.

5. The method according to claim 4, characterized in that Extracting the shuttle contact area of ​​the virtual character on the target shuttle barrier from the depth information according to the distance information corresponding to the depth information includes: Draw a texture map according to the depth information, and determine the distance corresponding to each pixel based on the pixel information of each pixel in the texture map; Pixel points within a preset contact range are extracted from the texture map as contact pixels, and a shuttle contact area of ​​the virtual character with respect to the target shuttle barrier is generated based on the pixel information of the contact pixels, wherein the preset contact range is determined based on a preset shooting distance between the shooting position and the target shuttle barrier and a special effect display distance corresponding to the target shuttle barrier.

6. The method according to claim 5, characterized in that The orthogonal projection camera captures the depth information of the virtual character frame by frame; Displaying the shuttling special effect of the virtual character on the target shuttling barrier according to the shuttling contact area includes: In the case where the current frame shuttle contact area is the first frame shuttle contact area, drawing the current frame shuttle contact map according to the current frame shuttle contact area; When the current frame shuttle contact area is not the first frame shuttle contact area, a current frame preliminary shuttle contact map is drawn according to the current frame shuttle contact area, and a current frame shuttle contact map is generated according to the current frame preliminary shuttle contact map and the previous frame shuttle contact map; According to the current frame shuttle contact map, the shuttling special effects of the virtual character are drawn on the material of the target shuttle barrier, so as to render the shuttling special effects of the virtual character on the target shuttle barrier on the target shuttle barrier using the drawn material.

7. The method according to claim 6, characterized in that Generating a current frame shuttle contact map according to the current frame preliminary shuttle contact map and the previous frame shuttle contact map, including: Preprocessing the shuttle contact map of the previous frame, wherein the preprocessing includes at least one of blurring, distorting and fading; The preliminary shuttle contact map of the current frame is superimposed with the preprocessed shuttle contact map of the previous frame to obtain the shuttle contact map of the current frame.

8. The method according to claim 4, characterized in that The method of photographing the virtual character by an orthogonal projection camera disposed at a photographing position corresponding to the target shuttle barrier to obtain depth information of the virtual character includes: On a straight line passing through the position of the virtual character and perpendicular to the target shuttling barrier, determining the shooting position at a preset shooting distance from the target shuttling barrier; The orthogonal projection camera is turned on at the shooting position, and the virtual character is shot by the orthogonal projection camera to obtain depth information of the virtual character.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Using the collision box corresponding to the target shuttle barrier to perform collision detection, wherein the range of the collision box is the preset special effect rendering range; In the case where it is detected that the virtual character enters the collision box, determining that the virtual character enters the preset special effect rendering range; When it is detected that the virtual character leaves the collision box, it is determined that the virtual character leaves the preset special effect rendering range.

10. A device for realizing a shuttle special effect, characterized in that: The device comprises: A contact area determination module, for determining a shuttling contact area of ​​the virtual character on the target shuttling barrier when detecting that the virtual character enters a preset special effect rendering range corresponding to the target shuttling barrier, wherein the shuttling contact area matches the current shape and action of the virtual character; A shuttling special effect display module is used to display the shuttling special effect of the virtual character on the target shuttling barrier on the target shuttling barrier according to the shuttling contact area, wherein the shuttling special effect is manifested as a special effect related to the outline of the virtual character left behind when the virtual character shuttles the target shuttling barrier.

11. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

12. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.