A method, device, equipment and medium for rendering a picture

By setting a target to observe the camera in the game scenario and respond to the trigger operation, determine the perspective space, solve the problem of great performance consumption in the existing technology, and improve the authenticity of the perspective effect.

CN114307142BActive Publication Date: 2025-01-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111658215.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-01-28
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

When the prior art realizes perspective effects in game scenes, the performance consumption is large and the authenticity of the perspective effects cannot be effectively improved.

Method used

By setting the target to observe the camera in the game scene, the response to the trigger operation determines the perspective space, and set the triangular dough on the target virtual object to transparent, and update the screen to display the perspective effect.

Benefits of technology

It reduces the performance consumption of the effect of seeing the effect, and improves the authenticity of the perspective effect in the game scene, so that the display position of the perspective space is consistent with the trigger position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114307142B_ABST
    Figure CN114307142B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and medium for rendering a picture, the rendering method comprising: rendering an initial picture according to a game scene including a target virtual object observed by a target observation camera, and displaying the initial picture on a graphical user interface; the target virtual object is composed of a plurality of opaque triangular facets; in response to a trigger operation on the target virtual object, determining a perspective space formed on the target virtual object; the perspective position of the perspective space is determined according to the trigger position of the trigger operation; after setting the triangular facets on the target virtual object included in the perspective space to be transparent, rendering an updated picture according to the game scene including the target virtual object observed by the target observation camera, and displaying the updated picture on the graphical user interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of picture rendering, and in particular to a picture rendering method, rendering device, equipment and medium. Background Art

[0002] With the development of technology, people's requirements for the quality of life are getting higher and higher. For the online games that people often use, people's quality requirements for online games generally refer to the authenticity of the game scenes.

[0003] In order to give users a sense of reality and create an immersive feeling, current online games basically set up game scenes based on real scenes. Perspective is a display effect in games. The existing technology generally uses a method of real-time shooting with multiple cameras or a method of pre-building a model to display perspective effects in game scenes, but either method has certain defects. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a picture rendering method, rendering device, equipment and medium, which are used to solve the problem in the prior art of how to improve the authenticity of the perspective effect in the game scene while reducing the performance consumption of achieving the perspective effect.

[0005] In a first aspect, an embodiment of the present application provides a method for rendering a picture, wherein a game scene of the game includes a target virtual object, and the game scene is provided with a target observation camera, and the rendering method includes:

[0006] Rendering an initial screen according to a game scene including a target virtual object observed by the target observation camera, and displaying the initial screen on a graphical user interface; the target virtual object is composed of a plurality of opaque triangular facets;

[0007] In response to a trigger operation on a target virtual object, determining a perspective space formed on the target virtual object; the perspective position of the perspective space is determined according to the trigger position of the trigger operation;

[0008] After setting the triangular facets on the target virtual object contained in the perspective space to be transparent, an updated screen is rendered according to the game scene containing the target virtual object observed by the target observation camera, and the updated screen is displayed on the graphical user interface.

[0009] Optionally, the size of the perspective space is determined according to the type of the trigger operation, and the type of the trigger operation includes an attack type; under the attack type, the size of the perspective space is determined according to the attack attributes and / or the material attributes of the target virtual object.

[0010] Optionally, after setting the triangular facets on the target virtual object contained in the perspective space to be transparent, rendering an updated screen according to the game scene containing the target virtual object observed by the target observation camera, and displaying the updated screen on the graphical user interface includes:

[0011] Determining a dissolving speed according to the attack attribute and the material attribute of the target virtual object;

[0012] According to the dissolving speed, gradually setting the triangular facets in the perspective space to be transparent along the direction from the trigger position to the edge position in the perspective space;

[0013] According to the game scene including the area where the triangular facet set to be transparent is located observed by the target observation camera, an updated picture is rendered, and the updated picture is displayed on the graphical user interface.

[0014] Optionally, the rendering method further includes:

[0015] Determining a texture style of a dissolve texture according to the attack attribute;

[0016] The dissolve map corresponding to the map style is displayed at the boundary position of the transparent area of ​​the perspective space in the game scene.

[0017] Optionally, gradually setting the triangular facets in the perspective space to be transparent includes:

[0018] Determining a feathering range around the perspective space according to the attack attribute;

[0019] Along the perspective space from the edge position to the trigger position, the transparency of the triangular facets within the feathering range is gradually reduced.

[0020] Optionally, the size of the perspective space is determined according to the type of the trigger operation, and the type of the trigger operation includes a viewing type; under the viewing type, the size of the perspective space is determined according to the thickness information of the target virtual object and / or the operation information of the trigger operation.

[0021] Optionally, the perspective space formed on the target virtual object is determined by the following steps, including:

[0022] In response to a trigger operation on a target virtual object, obtaining position information of each triangle in the game scene, position information of the trigger position, and the size of the perspective space;

[0023] The perspective space formed on the target virtual object is determined by calling the perspective space creation function and according to the position information of each triangle in the game scene, the position information of the trigger position and the size of the perspective space.

[0024] Optionally, the step of calling the perspective space creation function and determining the perspective space formed on the target virtual object according to the position information of each triangle in the game scene, the position information of the trigger position, and the size of the perspective space includes:

[0025] In the perspective space creation function, a vector from each triangle to the trigger position is calculated according to the position information of each triangle in the game scene and the position information of the trigger position;

[0026] According to the vector corresponding to each triangular facet and the size of the perspective space, the triangular facets belonging to the perspective space in the game scene are determined, and the perspective space formed on the target virtual object is determined according to the position information of the triangular facets belonging to the perspective space.

[0027] Optionally, the feathering range is determined by the following steps:

[0028] Acquire a feathering parameter; the feathering parameter is determined according to the operation type of the triggering operation;

[0029] The ratio of the magnitude of the vector corresponding to the triangular facet that does not belong to the perspective space to the feathering parameter is calculated, and the position range corresponding to the triangular facet whose ratio result meets the preset requirements is determined as the feathering range.

[0030] In a second aspect, an embodiment of the present application provides a rendering device for a screen, wherein a game scene of the game includes a target virtual object, and the game scene is provided with a target observation camera, and the device includes:

[0031] A first rendering module, configured to render an initial screen according to a game scene including a target virtual object observed by the target observation camera, and display the initial screen on a graphical user interface; the target virtual object is composed of a plurality of opaque triangular facets;

[0032] A determination module, configured to respond to a trigger operation on a target virtual object and determine a perspective space formed on the target virtual object; the perspective position of the perspective space is determined according to a trigger position of the trigger operation;

[0033] The second rendering module is used to set the triangular facets on the target virtual object contained in the perspective space to be transparent, render an updated picture according to the game scene containing the target virtual object observed by the target observation camera, and display the updated picture on the graphical user interface.

[0034] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.

[0036] The screen rendering method proposed in the embodiment of the present application firstly renders an initial screen according to the game scene including the target virtual object observed by the target observation camera, and displays the initial screen on the graphical user interface; the target virtual object is composed of a plurality of opaque triangular facets; secondly, in response to a trigger operation on the target virtual object, determines the perspective space formed on the target virtual object; the perspective position of the perspective space is determined according to the trigger position of the trigger operation; finally, after setting the triangular facets on the target virtual object included in the perspective space to be transparent, renders an updated screen according to the game scene including the target virtual object observed by the target observation camera, and displays the updated screen on the graphical user interface.

[0037] In some embodiments, by determining the perspective space at the trigger position of the target virtual object and setting the perspective space to be transparent, it is achieved that the perspective space can adjust its display position according to the trigger position, rather than being able to be displayed in a pre-set position, so that the display position of the perspective space is consistent with the trigger position, thereby improving the display effect of the perspective space. On this basis, whether before or after the perspective space is set to be transparent, the game scene containing the target virtual object obtained by the target observation camera is always used, that is, a target observation camera is always used to render the game screen of the game scene containing the perspective space, and there is no need to set up a separate camera for shooting after the perspective space, and thus there is no need to use a separate camera for shooting after the perspective space to render the picture after the perspective space after rendering the picture without the perspective space, thereby reducing performance consumption.

[0038] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A schematic diagram of a flow chart of a method for rendering a picture provided in an embodiment of the present application;

[0041] Figure 2 A schematic diagram of a direction from a trigger position to a portion of an edge position in a perspective space provided by an embodiment of the present application;

[0042] Figure 3 A schematic diagram of feathering provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of an update screen provided in an embodiment of the present application;

[0044] Figure 5 A schematic diagram of the structure of a picture rendering device provided in an embodiment of the present application;

[0045] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0047] The existing technology uses multiple cameras to shoot in real time in the game scene to achieve the perspective effect. On the basis of the picture already rendered by one camera, another camera is used to render the picture after the perspective position, which is equivalent to using two cameras to render the picture twice, increasing performance consumption. The method of pre-building the model is to set the perspective area on the object to be seen when building the game scene. The position of the perspective area on the object to be seen is fixed and unchanged, which cannot guarantee the authenticity of the perspective effect in the game.

[0048] Based on the above defects, the present application embodiment provides a method for rendering a picture, such as Figure 1 As shown, the game scene of the game includes a target virtual object, the game scene is provided with a target observation camera, and the rendering method includes the following steps:

[0049] S101, rendering an initial screen according to a game scene including a target virtual object observed by the target observation camera, and displaying the initial screen on a graphical user interface; the target virtual object is composed of a plurality of opaque triangles;

[0050] S102, in response to a trigger operation on a target virtual object, determining a perspective space formed on the target virtual object; the perspective position of the perspective space is determined according to a trigger position of the trigger operation;

[0051] S103, after setting the triangular facets on the target virtual object contained in the perspective space to be transparent, rendering an updated screen according to the game scene containing the target virtual object observed by the target observation camera, and displaying the updated screen on the graphical user interface.

[0052] The rendering method of the screen in the embodiment of the present application can be run on a terminal device or a server. Among them, the terminal device can be a local terminal device. When the rendering method of the screen is run on a server, it can be a cloud game.

[0053] In an optional implementation, cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the screen rendering method are completed on the cloud gaming server. The terminal device is used for receiving and sending data and presenting the game screen. For example, the terminal device can be a display device with data transmission function close to the user side, such as a mobile terminal, a television, a computer, a handheld computer, etc.; but the terminal device for processing game data is a cloud gaming server in the cloud. When playing the game, the target player operates the terminal device to send an operation instruction to the cloud gaming server. The cloud gaming server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the terminal device through the network. Finally, the terminal device decodes and outputs the game screen.

[0054] In an optional embodiment, the terminal device may be a local terminal device. The local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the target player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the target player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal device, or provided to the target player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a portion of a game scene, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0055] The present application is described by running a rendering method of a picture on a terminal device, wherein the terminal device is an electronic device with a touch function, such as a smart phone. A graphical user interface is provided by the terminal device, and the graphical user interface refers to an interface for human-computer interaction rendered on the display screen of the terminal device. The human-computer interaction between the target player and the terminal device is realized through the operation area in the graphical user interface, and the mobile control area is included in the operation area. The game of the present application includes a game scene and a target virtual object located in the game scene. The content displayed in the graphical user interface also includes a game screen, and the game screen can be a game screen of a part of the game scene. The terminal device can respond to the touch operation acting on the operation area in the graphical user interface, and the game scene can include any one or more of the following game elements: landforms, rocks, flowers, rivers, buildings, virtual objects, game props, etc., and the above game elements can all be used as the target virtual objects mentioned in this application. Generally speaking, a virtual camera is provided in the game scene, and the game screen displayed on the graphical user interface is part of the game scene content captured by the virtual camera. For example, in a first-person game, a virtual camera can be set at the head (e.g., eye position) of a target virtual character controlled by a player, and the virtual camera moves with the movement of the target virtual character, and the direction of the virtual camera rotates with the rotation of the virtual subject, so that the game screen presented on the graphical user interface is a part of the game scene within a preset range in front of the target virtual character. For another example, in a third-person game, a virtual camera can be set directly above or above the target virtual character controlled by the player, so that the game screen presented on the graphical user interface is a part of the game scene including the target virtual character. The wooden puppet virtual object can be a virtual person, a virtual animal, an anime character, etc. The target virtual character is a character controlled by a player through a terminal device, or an artificial intelligence (AI) set in a virtual environment battle through training, or a non-player character (NPC) set in a virtual scene battle. The target observation camera mentioned in this application can be a virtual camera that rotates with the rotation of the virtual subject, or it can be other virtual cameras in addition to the virtual camera that rotates with the rotation of the virtual subject mentioned above.

[0056] In the above step S101, the target observation camera observes the game scene containing the target virtual object, and the target observation camera moves as the target virtual object moves in the game scene, and the relative position between the target observation camera and the target virtual object remains unchanged. The target virtual object can be any object composed of opaque triangular facets in the game scene, or it can be an object composed of opaque triangular facets and has a see-through condition. The see-through condition can be that a see-through tag is set in the attribute information of the target virtual object. The triangular facets are used to build a model of the target virtual object in the game scene. The position information of the triangular facets is the position information of the vertices of the triangular facets in the game scene. The initial screen is the game screen of the game scene containing the target virtual object observed by the target observation camera before the perspective space is set for the target virtual object. Transparency or opacity in the game scene is determined by the transparency of the triangular facets in the game scene. The transparency of opaque is 0%. Transparency can be divided into completely transparent and partially transparent. Completely transparent means that the transparency is 100%, and partially transparent corresponds to a transparency between 0%-100%, but not including 0% and 100%.

[0057] In a specific implementation, the target virtual camera observes the target virtual object at a preset position relative to the target virtual object, renders the observed game scene containing the target virtual object in the initial screen, and then displays the initial screen in the graphical user interface so that the player can observe the game screen containing the target virtual object.

[0058] In the above step S102, the trigger operation is the perspective space on the target virtual object, and the trigger condition of setting the perspective space to be transparent. The perspective space is a space that can be set to be transparent on the target virtual object. The perspective space set to be transparent can facilitate the player to observe the picture that was previously blocked by the perspective space that was not set to be transparent. The type of trigger operation includes any one of the following types: attack type and view type. The trigger position corresponding to the attack type is the attack position of the attack operation on the target virtual object. The trigger position corresponding to the view type is the selected position of the player for the target virtual object. The trigger position here is the position of a point. The perspective space is reflected by the size of the corresponding space. The size of the perspective space can be characterized by the size parameters of the space. For example, if the perspective space is a sphere, the size parameter is the radius of the sphere, or if the perspective space is a cube, the size parameter is the length, width and height of the cube. The size of the perspective space can be a pre-set fixed value, or it can be determined according to the operation type of the trigger operation.

[0059] In a specific implementation, after the target virtual object is triggered, the perspective space at the trigger position on the target virtual object is determined. The trigger position can be a point on the surface of the target virtual object, and the perspective space is set to observe the picture blocked by the perspective space. Therefore, the perspective space on the target virtual object uses a point on the side of the preset space facing the target observation camera as the trigger position, and then according to the vector between the point and other points in the preset space, and the vector between the trigger point and other points in the game scene, the perspective space equal to the size of the preset space at the trigger position is determined in the game scene. The size of the preset space is the same as the size of the perspective space mentioned above.

[0060] In the above step S103, the updated screen is a game screen of a game scene including a target virtual object observed by a target observation camera after the target virtual object is set in a perspective space and the perspective space is set to be transparent.

[0061] By setting the triangular facets on the target virtual object contained in the perspective space to be transparent, the scene behind the perspective space will no longer be blocked. Therefore, the target observation camera can observe the picture behind the perspective space. Therefore, the target observation camera reacquires the observed game picture of the game scene containing the target virtual object, renders an updated picture, and displays the updated picture in the graphical user interface, so that the player can observe the picture behind the perspective space.

[0062] The embodiment of the present application, through the above three steps, determines the perspective space at the trigger position of the target virtual object and sets the perspective space to be transparent, so that the perspective space can adjust its display position according to the trigger position, instead of being displayed only at a pre-set position, so that the display position of the perspective space is consistent with the trigger position, thereby improving the display effect of the perspective space. On this basis, whether before or after the perspective space is set to be transparent, the game scene containing the target virtual object obtained by the target observation camera is always used, that is, a target observation camera is always used to render the game screen of the game scene containing the perspective space, and there is no need to set up a separate camera for shooting the perspective space, and thus there is no need to use a separate camera for shooting the perspective space after rendering the picture without the perspective space to render the picture after the perspective space again, thereby reducing performance consumption.

[0063] If the type of the trigger operation is an attack type, the trigger operation is an attack operation. Under the attack type, the size of the perspective space is determined according to the attack attribute of the attack operation and / or the material attribute of the target virtual object. The attack attribute includes any one or two of the following information: the attack skill of the attack operation and the attack strength of the attack operation. If the size of the perspective space is determined by the attack skill and the attack strength, the attack skill can determine the attack area corresponding to the perspective space, and the attack strength can determine the attack depth corresponding to the perspective space. The material attribute includes any one or two of the following attributes: hardness and looseness. That is, in a certain embodiment, the size of the perspective space is determined according to the attack attribute of the attack operation. In a certain embodiment, the size of the perspective space is determined according to the material attribute of the target virtual object. In a certain embodiment, the size of the perspective space is determined according to the attack attribute and the material attribute of the target virtual object. When the size of the perspective space is determined by the attack attribute and the material attribute of the target virtual object, the material attribute of the target virtual object can be used to reduce the size of the perspective space determined according to the attack attribute, so that the size of the perspective space finally determined is smaller than the size of the perspective space determined by the attack attribute.

[0064] Specifically, the size of the perspective space is determined according to the type of the trigger operation. When the type of the trigger operation is an attack type, step S102, in response to the trigger operation on the target virtual object, determines the perspective space formed on the target virtual object, including:

[0065] In response to an attack operation directed to a target virtual object, a perspective space formed on the target virtual object is determined according to an attack position of the attack operation and a size of the perspective space.

[0066] Under the attack type, the perspective space set to be transparent in the above step can be considered as the wound space left by the attack operation on the target virtual object. The attack operation in the game scene can be an attack operation made by using weapons and props in the game scene, or it can be an attack operation made by using magic in the game scene. Different attack operations correspond to different display effects. Some display effects are that the perspective space becomes transparent immediately, while some display effects need to be gradually displayed as transparent. Therefore, step S103 of the present application includes:

[0067] Step 1031, determining a dissolving speed according to the attack attribute and the material attribute of the target virtual object;

[0068] Step 1032, gradually setting the triangular facets in the perspective space to be transparent along the direction from the trigger position to the edge position in the perspective space according to the dissolution speed;

[0069] Step 1033: Render an updated screen according to the game scene including the area where the triangular facet set to be transparent is located observed by the target observation camera, and display the updated screen on the graphical user interface.

[0070] In the above step 1031, the dissolving speed is used to characterize the speed at which a point in the perspective space gradually becomes completely transparent to the edge position, and can also be the step value per unit time for setting the triangular face to be transparent in the perspective space. If the attack skill and attack strength of the attack attribute are both strong, the dissolving speed will be faster, and if the attack skill and attack strength are opposite, the dissolving speed will be slower; if the hardness of the material attribute of the target virtual object is relatively hard and the looseness is relatively tight, the dissolving speed will be slower, and if the hardness and looseness are opposite, the dissolving speed will be faster.

[0071] In the above step 1032, if Figure 2 , which shows the direction from the trigger position to the partial edge position in the perspective space.

[0072] In the above step 1033, the target observation camera observes the game scene containing the transparent space in real time. The target observation camera will observe the game scene containing the area where the triangular facets set to be transparent are located. Therefore, as long as the transparent space appears in the perspective space, the update screen will be re-rendered according to the game scene containing the area where the triangular facets set to be transparent are located observed by the target observation camera, and the real-time rendered update screen will be displayed in the graphical user interface, so that the player can observe the transparency progress (that is, the dissolution speed) of the transparent space in real time, and increase the dissolution speed on the basis of setting the perspective space to transparent, so that the transparency effect of the perspective space in the game scene matches the objective scenario corresponding to the attack attributes and the material attributes of the target virtual object, thereby improving the playability of the game.

[0073] In addition to the dissolution speed, different attack attributes will also have different attack effects, and such attack effects are mainly manifested in the boundary position of the transparent area in the perspective space, such as flames, etc. That is, the rendering method of the present application also includes:

[0074] Step 1034, determining a texture style of a dissolve texture according to the attack attribute;

[0075] Step 1035: Display the dissolve map corresponding to the map style at the boundary position of the transparent area of ​​the perspective space in the game scene.

[0076] In the above step 1034, the texture style of the dissolving texture matches the attack skill in the attack attribute. For example, when the attack skill is fire attack, the texture style is a flame style, and if the attack skill is venom dissolving, the texture style is a purple foam style. Further, the texture style can also be determined in combination with the attack attribute and the material attribute of the target virtual object.

[0077] In the above step 1035, the transparent area of ​​the perspective space is an area composed of triangular facets set to be transparent. Displaying the dissolve map corresponding to the map style at the boundary position of the transparent area of ​​the perspective space in the game scene can intuitively let the player know that the target virtual object has been attacked, and also clearly understand the attack skills of the target virtual object.

[0078] In addition to adding a dissolve map to the game scene to improve the authenticity of the display effect in the game scene, the feathering effect can also be used to improve the authenticity of the display effect. The effect of the perspective space gradually becoming transparent can also be achieved, and the triangular facets in the perspective space will not immediately change from opaque to completely transparent. The transition process from opaque to transparent is increased. This realistic effect is closer to the real scene and improves the authenticity of the display effect. That is, step 1032 includes:

[0079] Step 10321, determining a feathering range around the perspective space according to the attack attribute;

[0080] Step 10322: gradually reduce the transparency of the triangular facets within the feathering range along the perspective space from the edge position toward the trigger position.

[0081] In the above step 10321, the feathering range is a position range, one of the range boundaries within the position range is the edge position of the perspective space, and the other range boundary is composed of the position of the completely opaque triangular facet closest to the perspective space outside the perspective space. Different attack attributes correspond to different feathering ranges. Further, the feathering range can also be determined by combining the attack attribute and the material attribute of the target virtual object.

[0082] In the above step 10322, the direction from the outside to the inside of the transparent area is equivalent to the direction from the edge position to the trigger position in the perspective space. Along the direction from the outside to the inside of the transparent area in the perspective space, the transparency of the triangular facets within the feathering range is gradually reduced, which means that within the feathering range, along the direction from the edge position to the trigger position in the perspective space, the transparency of the triangular facets is gradually set from 0% to 100%, such as Figure 3 shown.

[0083] Of course, the feathering effect may not be set within the feathering range, and the feathering effect may be replaced by a dissolve map. That is, step 1032 includes:

[0084] Step 10323, determining a texture style of a dissolve texture and a feathering range around the perspective space according to the attack attribute;

[0085] Step 10324, displaying the dissolve map corresponding to the map style on the triangle facets within the feathering range.

[0086] In the above step 10323, the mapping style and feathering range scheme are determined, which will not be introduced in detail here. Please refer to the above steps 1034 and 10321.

[0087] In the above step 10324, by displaying the dissolve map on the triangular facets within the feathering range, the display position of the dissolve map is planned, thereby improving the authenticity of the display effect.

[0088] Under the viewing type, the size of the perspective space can be a preset fixed size, or it can be determined according to the thickness information of the target virtual object and / or the operation information of the trigger operation. The thickness information of the target virtual object is the distance between the side of the target virtual object facing the target virtual camera and the side away from the target virtual camera. The trigger operation is a viewing operation, and the viewing operation can be a selection operation or a touch operation on the viewing control. The operation information of the selection operation can be the area information selected by the player on the target virtual object. In a certain embodiment, the area information selected by the player on the target virtual object is used as the side of the perspective space facing the target observation camera, and then the size of the perspective space is determined according to the area information and the preset thickness information. Or in a certain embodiment, the size of the perspective space is directly determined by using the area information selected by the player on the target virtual object and the thickness information of the target virtual object. Or in a certain embodiment, the size of the perspective space is determined according to the thickness information of the target virtual object and the preset area on the side of the target virtual object facing the target observation camera. The operation information of the touch operation can be the long press duration, heavy press pressure, etc. of the player on the viewing control. Different long press durations correspond to different sizes of the perspective space, and the longer the duration, the larger the perspective space. Different pressing pressures correspond to different perspective space sizes. The greater the pressure, the larger the perspective space. In this way, players can adjust the size of the perspective space according to their own operations, which improves the convenience of determining the perspective space.

[0089] Specifically, the size of the perspective space is determined according to the type of the trigger operation. When the operation type of the trigger operation is a viewing type, step S102, in response to the trigger operation on the target virtual object, determines the perspective space formed on the target virtual object, including:

[0090] In response to a viewing operation on a target virtual object, a perspective space formed on the target virtual object is determined according to a selection position of the viewing operation and a size of the perspective space.

[0091] Of course, when the operation type of the triggering operation is the viewing type, in a certain embodiment, the dissolution speed of the perspective space can also be determined, and then the perspective space can be gradually set to be transparent according to the dissolution speed. That is, step 103 includes:

[0092] Step 1034, determining a dissolving speed according to the material properties of the target virtual object;

[0093] Step 1035, gradually setting the triangular facets in the perspective space to be transparent along the direction from the trigger position to the edge position in the perspective space according to the dissolving speed;

[0094] Step 1036: Render an updated screen based on the game scene including the area where the triangular facet set to be transparent is located observed by the target observation camera, and display the updated screen on the graphical user interface.

[0095] In the above step 1034, the dissolving speed is used to represent the speed at which a point in the perspective space gradually becomes completely transparent to the edge position, and can also be the step value per unit time for setting the triangle face to be transparent in the perspective space. If the hardness of the material attribute of the target virtual object is relatively hard and the looseness is relatively tight, the dissolving speed will be relatively slow, and on the contrary, the hardness and looseness will be relatively fast.

[0096] For a detailed discussion of step 1035 , please refer to step 1032 , and for a detailed discussion of step 1036 , please refer to step 1033 .

[0097] Of course, when the operation type of the triggering operation is a viewing type, in a certain embodiment, a dissolve map may also be set. The rendering method further includes:

[0098] Step 1037, determining a texture style of the dissolve texture according to the material properties of the target virtual object;

[0099] Step 1038: Display the dissolve map corresponding to the map style at the boundary position of the transparent area of ​​the perspective space in the game scene.

[0100] In the above step 1037, in the display scene, different material properties correspond to different dissolving effects. Therefore, in order to make the display effect in the game scene closer to the display, the texture style of the dissolving map will be determined according to the material properties of the target virtual object.

[0101] For a detailed discussion of step 1038 , please refer to step 1035 .

[0102] Of course, when the operation type of the triggering operation is the viewing type, in a certain embodiment, the feathering range can also be set. The step 1035 includes:

[0103] Step 10351, determining a feathering range around the perspective space according to the material properties of the target virtual object;

[0104] Step 10352: gradually reduce the transparency of the triangular facets within the feathering range along the direction from the edge position toward the trigger position in the perspective space.

[0105] In the above step 10351, the feathering range is a distance range, which represents the distance between the edge position of the perspective control in the perspective space and the completely opaque triangular face. Different attack attributes correspond to different feathering ranges. Different material attributes correspond to different feathering ranges.

[0106] For a detailed discussion of step 10352, please refer to step 10322.

[0107] Of course, when the operation type of the triggering operation is the viewing type, in a certain embodiment, the dissolve map can also be set within the feathering range. The step 1035 includes:

[0108] Step 10353, determining a texture style of a dissolve texture and a feathering range around the perspective space according to the material properties of the target virtual object;

[0109] Step 10354, displaying the dissolve map corresponding to the map style on the triangle facets within the feathering range.

[0110] In the above step 10333, the mapping style and feathering range scheme are determined, which will not be described in detail here, and reference may be made to the above steps 1034 and 10321. Step 10354 may refer to the above step 10324.

[0111] The technical solutions mentioned in the above embodiments all need to be implemented using the game engine provided by the present application, so specifically at the program application layer, the perspective space formed on the target virtual object is determined by the following steps, including:

[0112] Step 104, in response to a trigger operation on the target virtual object, obtaining position information of each triangle in the game scene, position information of the trigger position, and the size of the perspective space;

[0113] Step 105, determining the perspective space formed on the target virtual object by calling the perspective space creation function and according to the position information of each triangle in the game scene, the position information of the trigger position and the size of the perspective space.

[0114] In the above steps 104 and 105, after receiving the trigger condition of the trigger operation for the target virtual object, the game engine will obtain the position information of each triangular face in the game scene, the position information of the trigger position and the size of the perspective space; then the position information of each triangular face in the above game scene, the position information of the trigger position and the size of the perspective space are input into the called perspective space creation function, and the perspective space creation function can be used to determine the perspective space at the trigger position in the game scene that meets the size of the perspective space.

[0115] Specifically, in the perspective space creation function, the perspective space in the game scene is determined through the following detailed steps, and step 105 includes:

[0116] Step 1051, in the perspective space creation function, according to the position information of each triangle in the game scene and the position information of the trigger position, calculate the vector from each triangle to the trigger position;

[0117] Step 1052, determining the triangular facets in the game scene that belong to the perspective space according to the vector corresponding to each triangular facet and the size of the perspective space, and determining the perspective space formed on the target virtual object according to the position information of the triangular facets that belong to the perspective space.

[0118] In the above steps 1051 and 1052, the vector from each triangle to the trigger position can be calculated using the position information of each triangle in the game scene and the position information of the trigger position, and then the difference between the vector and the size of the perspective space is calculated, wherein the triangle corresponding to the difference less than 0 is the triangle located in the perspective space, and then based on the position information of the triangle corresponding to the difference less than 0, the perspective space formed on the target virtual object is determined, that is, the position of the perspective space in the game scene.

[0119] For the difference between the calculated vector and the size of the perspective space, perspective spaces of different shapes will have different difference calculation methods. That is, according to the vector corresponding to each triangle and the size of the perspective space, as well as the shape of the perspective space, the triangles in the game scene belonging to the perspective space are determined.

[0120] For example, if the shape of the perspective space is a sphere and the trigger position is the center of the perspective space, i.e., the center of the sphere, then it is necessary to use the modulus of the vector of each triangle and the radius of the sphere to calculate the difference, and determine the triangles corresponding to the difference less than 0 as the triangles in the sphere. For another example, if the shape of the perspective space is a cube and the trigger position is the center of the perspective space, firstly, it is necessary to multiply the value corresponding to the size of the cube (length, width, height) in each dimension by 0.5 to obtain the first distance between the center of the cube and each face in the cube, and then calculate the difference by subtracting the value of each dimension in the vector of each triangle from the first distance of the corresponding dimension, and determine the triangles whose calculated difference in each dimension is less than 0 as the triangles in the cube.

[0121] For example, if the perspective space is spherical with a radius of 5 and the trigger position is the center of the perspective space, i.e., the center of the sphere, then the difference between the modulus of the vector of each triangle and the radius of the sphere needs to be calculated, and the triangles corresponding to the difference less than 0 are determined as the triangles in the sphere. There are two triangles, the vector 1 corresponding to triangle A is (1,1,1) and the vector 2 corresponding to triangle B is (3,4,5). The modulus of vector 1 is The magnitude of vector 2 is The radius of the perspective space is 5, This means that triangle A belongs to perspective space. This means that triangle B does not belong to the perspective space. For another example, if the perspective space is a cube, the length, width and height of the cube are (6, 6, 6) respectively, and the trigger position is the center of the perspective space, then the values ​​corresponding to the size of the cube are multiplied by 0.5 to obtain the first distance (3, 3, 3), and then the value of each dimension in the vector is subtracted from the value of the corresponding dimension of the first distance of the cube, and the triangles whose calculated difference values ​​corresponding to each dimension are less than 0 are determined to belong to the perspective space. There are two triangles, the vector 3 corresponding to triangle C is (1, 1, 1) and the vector 4 corresponding to triangle D is (3, 4, 5). After subtracting each dimension in vector 3 from (3, 3, 3), we get (-2, -2, -2), which means that triangle C belongs to the perspective space. After subtracting each dimension in vector 4 from (3, 3, 3), we get (0, 1, 2), which means that triangle D does not belong to the perspective space.

[0122] If the trigger position is not the center of the perspective space, different trigger positions in the perspective space will have different difference calculation methods for calculating the difference between the calculated vector and the size of the perspective space. That is, the triangles in the game scene belonging to the perspective space are determined based on the vector corresponding to each triangle, the size of the perspective space, the shape of the perspective space, and the position of the trigger position relative to the perspective space.

[0123] For example, the shape of the perspective space is a cube, and the trigger position is the center position of one side of the perspective space facing the target observation camera. First, the corresponding values ​​of the side of the cube facing the target observation camera in the corresponding dimensions need to be multiplied by 0.5, and the values ​​of the other dimensions remain unchanged to obtain the second distance between the trigger position and each face in the cube. Then, the value of each dimension in the vector of each triangle is subtracted from the second distance of the corresponding dimension to calculate the difference, and the triangles whose calculated differences in each dimension are less than 0 are determined as triangles in the cube.

[0124] For example, if the perspective space is a cube, the length, width and height of the cube are (6, 6, 6) respectively, and the trigger position is the center position of one side of the camera facing the target, then the corresponding values ​​of the sizes of the one side of the cube facing the target camera are multiplied by 0.5, and the corresponding sizes of the remaining dimensions remain unchanged, and the second distance of the cube is obtained (3, 3, 6). Then, the value of each dimension in the vector is subtracted from the value of the corresponding dimension in the second distance of the cube, and the triangular faces whose calculated difference values ​​of each dimension are less than 0 are determined to be triangular faces belonging to the perspective space. There are two triangles respectively. The vector 3 corresponding to triangle C is (1,1,7) and the vector 4 corresponding to triangle D is (3,4,5). After subtracting each dimension of vector 3 from (3,3,6), we get (-2, -2, 1), which means that triangle C does not belong to the triangle in perspective space. After subtracting each dimension of vector 4 from (3,3,3), we get (0, 1, -1), which means that triangle D belongs to the triangle in perspective space.

[0125] In the game engine, the feathering range is determined by the following steps:

[0126] Step 106, obtaining a feathering parameter; the feathering parameter is determined according to the operation type of the triggering operation;

[0127] Step 107, calculating the ratio of the magnitude of the vector corresponding to the triangular facet that does not belong to the perspective space to the feathering parameter, and determining the position range corresponding to the triangular facet whose ratio result meets the preset requirement as the feathering range.

[0128] In the above steps 106 and 107, the feathering parameter is determined according to the operation type of the triggering operation. Specifically, the feathering parameter can be determined according to the attack attributes and / or the material attributes of the target object. The feathering parameter represents the distance from the edge position of the perspective control of the perspective space to the completely opaque triangular facet. The ratio of the absolute value of the vector corresponding to the triangular facet that does not belong to the perspective space to the feathering parameter is calculated, and the ratio result is greater than 0 and less than 1, indicating that the distance between this part of the triangular facet and the boundary position of the perspective space is less than or equal to the feathering parameter value, and this part of the triangular facet is a triangular facet that meets the preset requirements, and then the position range corresponding to the triangular facet that meets the preset requirements is determined as the feathering range.

[0129] The screen rendering method provided in this application, when applied in a game scene, can obtain the following Figure 4 The update screen shown in the figure includes virtual objects A, B, C and D, wherein virtual objects A, B and C are all provided with see-through tags, and the material attributes corresponding to virtual objects A, B and C are different, while virtual object D is provided with a non-see-through tag, and virtual objects B, C and D are located inside the virtual object A. If a trigger operation is performed on virtual object A, the trigger position is point E (E is a point in the plane directly in front of virtual object A), and after the perspective space is determined on virtual object A according to the size of the perspective space, the perspective space includes a part of the plane directly in front of the object, a part of the top surface and a part of the rear surface, as well as virtual characters B, C and D. However, since the material attributes corresponding to virtual objects A, B and C are different, the sizes of the perspective spaces corresponding to virtual objects A, B and C are inconsistent. Therefore, it can be seen from the figure that the heights of the lowest horizontal planes of the perspective spaces corresponding to virtual objects A, B and C are different. Since virtual object D is provided with a non-see-through tag, even if virtual object D is located inside virtual object A, it will not be seen through. For virtual objects B and C nested inside virtual object A, the perspective spaces of these two virtual objects are also determined based on the trigger position of point E and the corresponding perspective space sizes.

[0130] like Figure 5 As shown, an embodiment of the present application provides a rendering device for a picture, wherein the game scene of the game includes a target virtual object, and the game scene is provided with a target observation camera, and the method includes:

[0131] A first rendering module 501 is used to render an initial screen according to the game scene including the target virtual object observed by the target observation camera, and display the initial screen on a graphical user interface; the target virtual object is composed of a plurality of opaque triangles;

[0132] A determination module 502 is used to determine a perspective space formed on the target virtual object in response to a trigger operation on the target virtual object; the perspective position of the perspective space is determined according to the trigger position of the trigger operation;

[0133] The second rendering module 503 is used to set the triangular facets on the target virtual object contained in the perspective space to be transparent, render an updated screen according to the game scene containing the target virtual object observed by the target observation camera, and display the updated screen on the graphical user interface.

[0134] Optionally, the size of the perspective space is determined according to the type of the trigger operation, and the type of the trigger operation includes an attack type; under the attack type, the size of the perspective space is determined according to the attack attributes and / or the material attributes of the target virtual object.

[0135] Optionally, the second rendering module includes:

[0136] A speed determination unit, used to determine a dissolution speed according to the attack attribute and the material attribute of the target virtual object;

[0137] A setting unit, configured to gradually set the triangular facets in the perspective space to be transparent along a direction from the trigger position to an edge position in the perspective space according to the dissolution speed;

[0138] The rendering unit is used to render an updated picture according to the game scene including the area where the triangular facet set to be transparent is located observed by the target observation camera, and display the updated picture on the graphical user interface.

[0139] Optionally, the rendering method further includes:

[0140] A style determination module, used to determine a texture style of a dissolve texture according to the attack attribute;

[0141] A display module is used to display the dissolve map corresponding to the map style at the boundary position of the transparent area of ​​the perspective space in the game scene.

[0142] Optionally, set the unit, including:

[0143] A range determination subunit, used to determine a feathering range around the perspective space according to the attack attribute;

[0144] The transparency setting subunit is used to gradually reduce the transparency of the triangular facets within the feathering range along the direction from the edge position to the trigger position in the perspective space.

[0145] Optionally, the size of the perspective space is determined according to the type of the trigger operation, and the type of the trigger operation includes a viewing type; under the viewing type, the size of the perspective space is determined according to the thickness information of the target virtual object and / or the operation information of the trigger operation.

[0146] Optionally, the determining module includes:

[0147] An acquisition unit, configured to acquire, in response to a trigger operation on a target virtual object, position information of each triangular face in the game scene, position information of the trigger position, and the size of the perspective space;

[0148] A determination unit is used to determine the perspective space formed on the target virtual object by calling the perspective space creation function and according to the position information of each triangle face in the game scene, the position information of the trigger position and the size of the perspective space.

[0149] Optionally, the determining unit includes:

[0150] A calculation subunit, used for calculating the vector from each triangular face to the trigger position according to the position information of each triangular face in the game scene and the position information of the trigger position in the perspective space creation function;

[0151] A determination subunit is used to determine the triangular facets belonging to the perspective space in the game scene according to the vector corresponding to each triangular facet and the size of the perspective space, and determine the perspective space formed on the target virtual object according to the position information of the triangular facets belonging to the perspective space.

[0152] Optionally, the scope determination subunit:

[0153] An acquisition subunit, used for acquiring a feathering parameter; the feathering parameter is determined according to the operation type of the triggering operation;

[0154] The range determination subunit is used to calculate the ratio of the absolute value of the vector corresponding to the triangular facet that does not belong to the perspective space to the feathering parameter, and determine the position range corresponding to the triangular facet whose ratio result meets the preset requirements as the feathering range.

[0155] Corresponds to Figure 1 The present application embodiment also provides a computer device 600, such as Figure 6 As shown, the device includes a memory 601, a processor 602, and a computer program stored in the memory 601 and executable on the processor 602, wherein the processor 602 implements the method for rendering the above-mentioned picture when executing the above-mentioned computer program.

[0156] Specifically, the above-mentioned memory 601 and processor 602 can be general-purpose memories and processors, which are not specifically limited here. When the processor 602 runs the computer program stored in the memory 601, it can execute the rendering method of the above-mentioned picture, which solves the problem in the prior art of how to improve the authenticity of the perspective effect in the game scene while reducing the performance consumption of achieving the perspective effect.

[0157] Corresponds to Figure 1 The method for rendering a picture in the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for rendering the above picture are executed.

[0158] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the rendering method of the above-mentioned picture can be executed, which solves the problem of how to improve the authenticity of the perspective effect in the game scene under the premise of reducing the performance consumption of realizing the perspective effect in the prior art. The present application determines the perspective space at the trigger position of the target virtual object and sets the perspective space to be transparent, so that the perspective space can adjust its display position according to the trigger position, instead of being displayed only in a pre-set position, so that the display position of the perspective space is consistent with the trigger position, and the display effect of the perspective space is improved. On this basis, whether before the perspective space is set to be transparent or after the perspective space is set to be transparent, the game scene containing the target virtual object obtained by the target observation camera is always used, that is, the game screen containing the game scene containing the perspective space is always rendered using a target observation camera, and there is no need to set a separate camera for shooting the perspective space, and then there is no need to use a separate camera for shooting the perspective space after rendering the picture without the perspective space to render the picture after the perspective space again, thereby reducing performance consumption.

[0159] In the embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0161] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0162] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0163] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0164] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for rendering a picture, characterized in that: The game scene of the game includes a target virtual object, and the game scene is provided with a target observation camera. The rendering method includes: Rendering an initial screen according to a game scene including a target virtual object observed by the target observation camera, and displaying the initial screen on a graphical user interface; the target virtual object is composed of a plurality of opaque triangular facets; In response to a trigger operation on a target virtual object, a perspective space formed on the target virtual object is determined; the perspective position of the perspective space is determined according to the trigger position of the trigger operation; the size of the perspective space is determined according to the type of the trigger operation, and the type of the trigger operation includes any one of the following types: an attack type and a viewing type; under the attack type, the size of the perspective space is determined according to the attack attribute and / or the material attribute of the target virtual object; under the viewing type, the size of the perspective space is determined according to the thickness information of the target virtual object and / or the operation information of the trigger operation; After setting the triangular facets on the target virtual object contained in the perspective space to be transparent, an updated screen is rendered according to the game scene containing the target virtual object observed by the target observation camera, and the updated screen is displayed on the graphical user interface.

2. The rendering method according to claim 1, characterized in that: After setting the triangular facets on the target virtual object contained in the perspective space to be transparent, rendering an updated screen according to the game scene containing the target virtual object observed by the target observation camera, and displaying the updated screen on the graphical user interface, comprises: Determining a dissolving speed according to the attack attribute and the material attribute of the target virtual object; According to the dissolving speed, gradually setting the triangular facets in the perspective space to be transparent along the direction from the trigger position to the edge position in the perspective space; According to the game scene including the area where the triangular facet set to be transparent is located observed by the target observation camera, an updated picture is rendered, and the updated picture is displayed on the graphical user interface.

3. The rendering method according to claim 2, characterized in that: The rendering method further comprises: Determining a texture style of a dissolve texture according to the attack attribute; The dissolve map corresponding to the map style is displayed at the boundary position of the transparent area of ​​the perspective space in the game scene.

4. The rendering method according to claim 2, characterized in that: Gradually setting the triangular facets in the perspective space to be transparent, including: Determining a feathering range around the perspective space according to the attack attribute; Along the perspective space from the edge position to the trigger position, the transparency of the triangular facets within the feathering range is gradually reduced.

5. The rendering method according to claim 4, characterized in that: The perspective space formed on the target virtual object is determined by the following steps, including: In response to a trigger operation on a target virtual object, obtaining position information of each triangle in the game scene, position information of the trigger position, and the size of the perspective space; The perspective space formed on the target virtual object is determined by calling the perspective space creation function and according to the position information of each triangle in the game scene, the position information of the trigger position and the size of the perspective space.

6. The rendering method according to claim 5, characterized in that: The method of calling the perspective space creation function and determining the perspective space formed on the target virtual object according to the position information of each triangle in the game scene, the position information of the trigger position and the size of the perspective space includes: In the perspective space creation function, a vector from each triangle to the trigger position is calculated according to the position information of each triangle in the game scene and the position information of the trigger position; According to the vector corresponding to each triangular facet and the size of the perspective space, the triangular facets belonging to the perspective space in the game scene are determined, and the perspective space formed on the target virtual object is determined according to the position information of the triangular facets belonging to the perspective space.

7. The rendering method according to claim 6, characterized in that: The feathering range is determined by the following steps: Acquire a feathering parameter; the feathering parameter is determined according to the operation type of the triggering operation; The ratio of the magnitude of the vector corresponding to the triangular facet that does not belong to the perspective space to the feathering parameter is calculated, and the position range corresponding to the triangular facet whose ratio result meets the preset requirements is determined as the feathering range.

8. A rendering device for a picture, characterized in that: The game scene of the game includes a target virtual object, and the game scene is provided with a target observation camera. The device includes: A first rendering module, configured to render an initial screen according to a game scene including a target virtual object observed by the target observation camera, and display the initial screen on a graphical user interface; the target virtual object is composed of a plurality of opaque triangular facets; A determination module, for responding to a trigger operation on a target virtual object, and determining a perspective space formed on the target virtual object; the perspective position of the perspective space is determined according to the trigger position of the trigger operation; the size of the perspective space is determined according to the type of the trigger operation, and the type of the trigger operation includes any one of the following types: an attack type and a viewing type; under the attack type, the size of the perspective space is determined according to the attack attribute and / or the material attribute of the target virtual object; under the viewing type, the size of the perspective space is determined according to the thickness information of the target virtual object and / or the operation information of the trigger operation; The second rendering module is used to set the triangular facets on the target virtual object contained in the perspective space to be transparent, render an updated picture according to the game scene containing the target virtual object observed by the target observation camera, and display the updated picture on the graphical user interface.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are performed.

Citation Information

Patent Citations

  • Method and system for updating three-dimensional image in real time

    CN104504760A

  • Image data enhancement method and device, computer equipment and storage medium

    CN111784588A