Data processing method and device, medium and program product

By occlusion detection and rendering of object data of virtual objects, the problem of poor occlusion and removal of virtual objects in the prior art is solved, and more efficient image display is achieved.

CN119809982APending Publication Date: 2025-04-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311318924.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-11
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the prior art, when displaying scene images of virtual scenes, the occlusion and removal effect of virtual objects is poor, which affects the efficiency of image display.

Method used

By obtaining the object data of the virtual object, including multiple triangle groups and its surrounding box information, occlusion detection is performed, unoccluded triangle groups are determined, and rendered to obtain the scene image of the virtual scene.

Benefits of technology

It realizes finer-grained occlusion detection, improves the occlusion and removal effect of virtual objects, reduces the processing and calculation amount during the rendering process, and improves the efficiency of image display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119809982A_ABST
    Figure CN119809982A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, a medium and a program product, and belongs to the technical field of virtual world. The method comprises the steps that object data of a virtual object in a virtual scene are acquired, the object data indicate a plurality of triangular groups of the virtual object and bounding box information of the triangular groups, and the triangular groups are obtained by dividing triangles on the surface of an object model of the virtual object; based on the object data, performing occlusion detection on the bounding boxes of the triangular groups, and determining unoccluded triangular groups; and rendering the unshielded triangle groups to obtain a scene image of the virtual scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of virtual world technology, and in particular to a data processing method, device, medium and program product. Background Art

[0002] In an application program including a virtual scene, a virtual object in the virtual scene is usually rendered as a two-dimensional image, and the rendered two-dimensional image is displayed on a screen.

[0003] In the related art, when displaying a scene image of a virtual scene, occlusion culling can be performed on virtual objects in the virtual scene, that is, virtual objects in the virtual scene that are completely occluded at the current viewing angle are detected, and virtual objects that are not occluded or not completely occluded are rendered and drawn.

[0004] However, the solutions in the above-mentioned related technologies have poor effects on occlusion culling of virtual objects, which affects the efficiency of image display. Summary of the invention

[0005] Each embodiment of the present application provides a data processing method, device, medium and program product, and the technical solution is as follows:

[0006] According to one aspect of the present application, a data processing method is provided, the method comprising:

[0007] Acquire object data of a virtual object in a virtual scene, the object data indicating a plurality of triangle groups of the virtual object and bounding box information of the triangle groups, the plurality of triangle groups being obtained by dividing triangles on a surface of an object model of the virtual object, and the bounding box information indicating coordinate positions of bounding boxes of the triangle groups;

[0008] Based on the object data, perform occlusion detection on the bounding boxes of the plurality of triangle groups to determine an unoccluded triangle group, where the unoccluded triangle group is an unoccluded triangle group among the plurality of triangle groups;

[0009] The unobstructed triangle groups are rendered to obtain a scene image of the virtual scene.

[0010] According to one aspect of the present application, a data processing method is provided, the method comprising:

[0011] Obtaining triangles of a surface of an object model of a virtual object;

[0012] Dividing the triangles on the surface of the object model into a plurality of triangle groups;

[0013] Generate bounding box information of the triangle group, wherein the bounding box information indicates a coordinate position of the bounding box of the triangle group;

[0014] generating object data of the virtual object based on the plurality of triangle groups and bounding box information of the triangle groups;

[0015] Among them, the object data is used for the display device to perform occlusion detection on the bounding boxes of the multiple triangle groups, determine unobstructed triangle groups, and render the unobstructed triangle groups to obtain a scene image of the virtual scene, and the unobstructed triangle groups are unobstructed triangle groups among the multiple triangle groups.

[0016] According to another aspect of the present application, a data processing device is provided, the device comprising:

[0017] An object data acquisition module, used to acquire object data of a virtual object in a virtual scene, wherein the object data indicates a plurality of triangle groups of the virtual object and bounding box information of the triangle groups, wherein the plurality of triangle groups are obtained by dividing triangles on a surface of an object model of the virtual object, and the bounding box information indicates coordinate positions of bounding boxes of the triangle groups;

[0018] An occlusion detection module, configured to perform occlusion detection on bounding boxes of the plurality of triangle groups based on the object data, and determine an unoccluded triangle group;

[0019] A rendering module is used to render the unobstructed triangle groups to obtain a scene image of the virtual scene.

[0020] According to another aspect of the present application, a data processing device is provided, the device comprising:

[0021] A triangle acquisition module, used to acquire triangles on the surface of the object model of the virtual object;

[0022] A grouping module, used for dividing the triangles on the surface of the object model into a plurality of triangle groups;

[0023] A bounding box information generating module, configured to generate bounding box information of the triangle group, wherein the bounding box information indicates a coordinate position of the bounding box of the triangle group;

[0024] A data generation module, configured to generate object data of the virtual object based on the plurality of triangle groups and bounding box information of the triangle groups;

[0025] The object data is used by the display device to perform occlusion detection on the bounding boxes of the multiple triangle groups, determine unoccluded triangle groups, and render the unoccluded triangle groups to obtain a scene image of the virtual scene.

[0026] On the other hand, a computer device is provided, comprising a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the above data processing method.

[0027] On the other hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the above data processing method.

[0028] In another aspect, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the data processing method provided in the above-mentioned various optional implementations.

[0029] The beneficial effects of the technical solution provided by this application include at least:

[0030] The object data of a virtual object can indicate multiple triangle groups of the virtual object and bounding box information of the triangle groups, and one virtual object corresponds to the bounding boxes of multiple triangle groups. When performing occlusion culling, the bounding boxes of the triangle groups are used as units for detection, the triangle groups whose bounding boxes are occluded in the virtual object are culled, and the triangle groups whose bounding boxes are not occluded are rendered. In the above scheme, the triangles in the object model of the virtual object are first grouped, and occlusion detection is performed on the bounding boxes of each group respectively, so that the granularity of the occlusion detection of the object model can be split from the entire object model into multiple bounding boxes, so that the occluded part of the virtual object can be culled, and the unoccluded part can be rendered, thereby achieving finer-grained occlusion detection, which can improve the occlusion culling effect of virtual objects in virtual scenes, reduce the amount of processing calculations in the rendering process, and thus improve the efficiency of image display. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a structural block diagram of a computer system provided by an exemplary embodiment of the present application;

[0032] Figure 2 is a flow chart of the data processing method provided by the present application;

[0033] Figure 3is a flow chart of the data processing method provided by the present application;

[0034] Figure 4 is a flow chart of the data processing method provided by the present application;

[0035] Figure 5 It is a framework diagram of an offline pre-computation process involved in this application;

[0036] Figure 6 It is a framework diagram of an offline pre-computation process involved in this application;

[0037] Figure 7 This is the effect diagram after triangle division;

[0038] Figure 8 It is a schematic diagram of the bounding box algorithm process;

[0039] Fig. 9 This is a schematic diagram of the triangle cluster involved in this application;

[0040] Fig.10 This is a schematic diagram of the optimization of splitting a large triangle Cluster involved in this application;

[0041] Fig.11 This is a schematic diagram of the small triangle Cluster merging optimization involved in this application;

[0042] Fig.12 This is the occlusion and cropping effect diagram involved in this application;

[0043] Fig.13 This is a schematic diagram of an occlusion mark involved in this application;

[0044] Fig.14 It is a batch submission rendering schematic diagram involved in this application;

[0045] Fig.15 is a block diagram of a data processing device provided by an embodiment of the present application;

[0046] Fig.16 is a block diagram of a data processing device provided by an embodiment of the present application;

[0047] Fig.17 It is a structural block diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0050] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0051] 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, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the object behaviors such as attack operations involved in this application are all obtained with full authorization.

[0052] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0053] For ease of understanding, several terms involved in this application are explained below.

[0054] 1) Virtual scene: A virtual scene is a virtual scene displayed (or provided) when an application is running on a terminal. The virtual scene can be a simulated environment scene of the real world, a semi-simulated and semi-fictitious three-dimensional environment scene, or a purely fictitious three-dimensional environment scene. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, and a three-dimensional virtual scene. The following embodiments are illustrated by taking the virtual scene as a three-dimensional virtual scene, but are not limited to this. Optionally, the virtual scene can also be used for a virtual scene battle between at least two virtual characters. Optionally, the virtual scene can also be used for a battle between at least two virtual characters using virtual props. Optionally, the virtual scene can also be used for a battle between at least two virtual characters using virtual props within a target area, and the target area will continue to shrink as time passes in the virtual scene.

[0055] The virtual scene is usually generated by an application in a computer device such as a terminal and displayed based on the hardware in the terminal (such as a screen). The terminal can be a mobile terminal such as a smart phone, tablet computer or e-book reader; or, the terminal can also be a personal computer device such as a laptop or a fixed computer.

[0056] 2) Homogeneous coordinates: Homogeneous coordinates are a method of representing coordinates used in geometry, computer graphics, and many other fields. In a homogeneous coordinate system, a point in n-dimensional space is represented by a point in n+1-dimensional space. For example, in three-dimensional space, a point is usually represented by three coordinates [x, y, z] T In homogeneous coordinates, it is represented as four coordinates [x, y, z, w] T , where w are homogeneous coordinates. Their main advantage is that they allow us to represent and manipulate affine transformations (such as translation, rotation, scaling) and perspective projections using matrices. In non-homogeneous coordinates, translations cannot be represented by matrix multiplication, which makes the combination and application of transformations more complicated. In homogeneous coordinates, all of these transformations can be represented by matrix multiplication, which makes the combination and application of transformations much simpler. In this article, all coordinates that use transformation matrices to transform the coordinate space are homogeneous coordinates.

[0057] 3) Model matrix (M matrix): This matrix describes the position, direction and size of the 3D model in the world and is responsible for converting coordinates from its local space (also called object space) to world space. In other words, a coordinate value in local space multiplied by the M matrix can obtain the corresponding coordinate in world space.

[0058] 4) View matrix (V matrix): This matrix describes the position and direction of the camera (or observer) in the world and is responsible for converting coordinates from world space to view space (also called camera space). In other words, a coordinate value in world space multiplied by the V matrix can obtain the corresponding coordinate in view space.

[0059] 5) Projection matrix (P matrix): This matrix is ​​responsible for defining how to map the 3D world to the 2D screen, converting coordinates from the view space to the screen's clipping space. In other words, a coordinate value in the view space is multiplied by the P matrix to obtain the corresponding coordinate in the clipping space.

[0060] 6) Scene Depth: refers to the depth information of each pixel in the frame buffer after the rendering of the objects in the scene is completed during the rendering process, that is, the distance information from the pixel to the camera.

[0061] 7) Triangle cluster: A collection of triangles on the model surface of a virtual object (such as a virtual character), used to identify an area of ​​the object model.

[0062] 8) Triangle Cluster Single Frame Bounding Box: The object model area identified by the triangle Cluster, and the bounding box data corresponding to a certain action key frame of the virtual object.

[0063] 9) Triangle Cluster dynamic bounding box: The object model area represented by the triangle Cluster, and the bounding box corresponding to all key frames of its virtual object action.

[0064] Figure 1 The structure block diagram of a computer system provided by an exemplary embodiment of the present application is shown. The computer system 100 includes: a first terminal 110 and a server 120.

[0065] The first terminal 110 is installed and runs a client 111 that supports virtual scenes. When the first terminal runs the client 111, a user interface of the client 111 is displayed on the screen of the first terminal 110.

[0066] The device type of the first terminal 110 may include at least one of a smart phone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop computer, and a desktop computer.

[0067] Figure 1Only one first terminal is shown, but in different embodiments, there are multiple other first terminals that can access the server 120. Optionally, there are one or more second terminals 130 that are terminals corresponding to developers. A development and editing platform for a client supporting a virtual scene is installed on the second terminal 130. The developer can edit and update the client on the second terminal 130, and transmit the updated client installation package to the server 120 via a wired or wireless network. The first terminal 110 can download the client installation package from the server 120 to update the client.

[0068] The first terminal 110 and the second terminal 130 are connected to the server 120 via a wireless network or a wired network.

[0069] The server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 is used to provide background services for clients that support three-dimensional virtual scenes. Optionally, the server 120 undertakes the main computing work, and the terminal undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work, and the terminal undertakes the main computing work; or, the server 120 and the terminal adopt a distributed computing architecture for collaborative computing.

[0070] In an illustrative example, the server 120 includes a processor 122, a user account database 123, a scene service module 124, and a user-oriented input / output interface (I / O interface) 125. The processor 122 is used to load instructions stored in the server 120 and process data in the user account database 123 and the scene service module 124; the user account database 123 is used to store data of user accounts used by the first terminal 110 and other terminals, such as the user account's avatar, the user account's nickname, the user account's combat power index, and the service area where the user account is located; the scene service module 124 is used to provide multiple virtual scenes for users to control virtual objects to explore / act, such as 1V1 battle, 3V3 battle, 5V5 battle, etc.; the user-oriented I / O interface 125 is used to establish communication and exchange data with the first terminal 110 and / or other first terminals through a wireless network or a wired network.

[0071] Figure 2 A flowchart of a data processing method provided by an exemplary embodiment of the present application is shown. The method can be executed by a computer device. The computer device can be Figure 1 The first terminal 110 in the system shown, or the computer device may also be Figure 1 The server 120 in the system shown, or the computer device may also include the above Figure 1In the system shown, a first terminal 110 and a server 120; the method includes:

[0072] Step 210: Obtain object data of a virtual object in a virtual scene, where the object data indicates multiple triangle groups of the virtual object and bounding box information of the triangle groups. The multiple triangle groups are obtained by dividing the triangles on the surface of the object model of the virtual object, and the bounding box information indicates the coordinate position of the bounding box of the triangle group.

[0073] In an embodiment of the present application, the above-mentioned object data may be data generated and stored during the development process of a virtual object in a virtual scene. When a computer device displays a scene image of a virtual scene, the above-mentioned object data may be read from a pre-stored object file of the scene object.

[0074] In an embodiment of the present application, the surface of the object model can be composed of a grid composed of triangles, that is, the object model of a virtual object can be composed of several triangles, each triangle represents a triangular plane on the surface of the object model, and multiple triangles can be stitched together to represent the curved surface contour of the object model surface. Correspondingly, for a certain object model, the more triangles that make up the object model and the smaller the area of ​​a single triangle, the more refined the object model.

[0075] In order to accurately represent an object model through a triangular mesh, each triangle of the object model has its own attributes. For example, each triangle in the object model has its own vertex coordinates; wherein the above vertex coordinates can be the coordinates of the three vertices of a triangle in the object space. The above object space can also be called model space, which refers to the space used by the maker of the model when creating the object model. The three-dimensional coordinate system in the object space takes the center of the object model as its origin.

[0076] The triangles of the object model of the virtual object may be pre-divided into a plurality of triangle groups, where a triangle group is also called a triangle Cluster, corresponding to a plurality of triangles in an area of ​​the object model of the virtual object.

[0077] For each triangle group of the virtual object, a bounding box of the triangle group may be pre-set; that is, the triangle group and the bounding box are in one-to-one correspondence, and each triangle group corresponds to a bounding box. The bounding box of the triangle group may refer to a three-dimensional box of a specified shape that contains all the triangles in the triangle group. For example, the bounding box of the triangle group may refer to a minimum three-dimensional box of a specified shape that contains all the triangles in the triangle group.

[0078] For example, the specified shape may be a cuboid or a sphere.

[0079] The object data may include triangle grouping information of each of the plurality of triangle groups, and bounding box information of each triangle group.

[0080] Among them, the above-mentioned triangle partition information may include the coordinate information of the vertices in the triangles contained in the triangle grouping, and the triangle sequence information expressed by the vertex index in the triangles contained in the triangle grouping. Specifically, the triangles on the surface of the object model are composed of three vertices, and adjacent triangles will share some vertices. If the triangle sequence is directly recorded using the vertex data structure, storage space will be wasted. Therefore, in the embodiment of the present application, the vertices are indexed, and the index data structure is much smaller than the vertex data structure. The triangles are recorded only with the vertex index instead of the complete vertex data structure, which can save storage space.

[0081] The bounding box information of the triangle group may include coordinate information of the bounding box. For example, the bounding box information of the triangle group may include coordinate information of at least two points on the bounding box.

[0082] Step 220: Based on the object data, perform occlusion detection on the bounding boxes of the plurality of triangle groups to determine unoccluded triangle groups.

[0083] The above-mentioned unobstructed triangle group may be a triangle group that is not completely obstructed among the multiple triangle groups. That is to say, the above-mentioned triangle group that is not completely obstructed may refer to a triangle group that is not obstructed at any position, and a triangle group that is partially obstructed. Optionally, the above-mentioned partially obstructed triangle group may be a triangle group in which the proportion of the obstructed part to the entire triangle group is less than a proportion threshold.

[0084] Alternatively, the unobstructed triangle group may be a triangle group that is not obstructed at any position among multiple triangle groups.

[0085] In an embodiment of the present application, after the computer device acquires the object data, it can perform occlusion detection on the bounding boxes of the multiple triangle groups to determine the unoccluded triangle groups among the multiple triangle groups.

[0086] Among them, the above-mentioned occlusion detection of the bounding boxes of multiple triangle groups based on the object data may refer to emitting light to each position on the surface of the bounding box of the triangle group from the camera position at the current moment, and detecting whether the light is blocked before reaching the corresponding position on the surface of the bounding box, or in other words, detecting whether the light collides with other objects in the virtual scene before reaching the bounding box. If so, it means that the corresponding position on the bounding box is blocked, otherwise, it is considered that the corresponding position on the bounding box is not blocked.

[0087] Among them, the unobstructed triangle group among the above-mentioned multiple triangle groups may refer to a triangle group among the multiple triangle groups, whose corresponding bounding boxes are not completely obstructed; for example, if all positions on the bounding box of a triangle group among the multiple triangle groups are obstructed, then the triangle group is determined to be obstructed; if only part of the positions on the bounding box of a triangle group among the multiple triangle groups are obstructed, or all positions on the bounding box of the triangle group are not obstructed, then the triangle group is determined to be unobstructed.

[0088] Alternatively, the unobstructed triangle group among the above-mentioned multiple triangle groups may refer to a triangle group among the multiple triangle groups, in which the ratio between the area of ​​the obstructed position in the corresponding bounding box and the surface area of ​​the corresponding bounding box is less than a ratio threshold; for example, if all positions on the bounding box of a triangle group among the multiple triangle groups are obstructed, then the triangle group is determined to be obstructed; if only part of the position on the bounding box of a triangle group among the multiple triangle groups is obstructed, and the ratio of the area of ​​the obstructed position to the surface area of ​​the bounding box is greater than or equal to the above-mentioned ratio threshold, then the triangle group is determined to be obstructed; for another example, if only part of the position on the bounding box of a triangle group among the multiple triangle groups is obstructed, and the ratio of the area of ​​the obstructed position to the surface area of ​​the bounding box is less than the above-mentioned ratio threshold, then the triangle group is determined to be unobstructed, or, if all positions on the bounding box of the triangle group are unobstructed, then the triangle group is determined to be unobstructed.

[0089] Among them, the coordinate information contained in the triangle grouping information and the bounding box information in the pre-generated object data can be the coordinate information of the vertices of the triangles in the triangle grouping and the position points on the bounding box in the object space. When performing occlusion detection on the bounding boxes of multiple triangle groups, the computer device needs to perform occlusion detection in the space corresponding to the virtual scene (such as world space, observation space or clipping space). At this time, the computer device needs to first convert the coordinate information of the vertices of the triangles in the triangle grouping and the position points on the bounding box in the object space into coordinate information in the space corresponding to the virtual scene.

[0090] For ease of understanding, the following are some of the spaces involved:

[0091] 1) Object space: also known as model space / local space / modeling space, it is the coordinate system of the triangle that defines the model. Each model has its own coordinate system. For example, the geometric center of the model is the origin of this coordinate system. The position attributes of the vertices of the triangles in this model are all relative to the coordinate values ​​of this origin. This coordinate space can be called object space.

[0092] 2) World space: When placing a model into a virtual scene (such as a game world), a model matrix needs to be applied to the model. This matrix moves, rotates, and scales the model. The transformed model is placed in the world space at a specific angle, size, and position. There is no correlation between the object spaces of different objects, but the world space can provide a reference for the positions of different objects in a scene.

[0093] 3) Observation space: also known as perspective space, the coordinate system of this space is based on the camera; for example, with the position of the camera as the origin, the camera faces the positive direction of the Z axis, the right side is the positive direction of the X axis, and the top is the positive direction of the Y axis to establish a coordinate system, the coordinate space corresponding to this coordinate system is the observation space; the rendering pipeline is a series of processing processes that convert three-dimensional scene data into two-dimensional images, and in the world space, in addition to the model, there is also a camera that observes the model. At this time, defining the above observation space can correctly obtain the image observed by the camera, and it can be easily calculated.

[0094] 4) Clipping space: Clipping space is the space where the clipping operation is performed after the model of the world space is projected onto the corresponding projection surface. Since the models of virtual objects in the entire virtual scene are in the observation space, and the camera has a certain visible range, this range can be called a frustum. The objects inside the frustum are visible to the camera (can be displayed on the screen), while the objects outside the frustum are invisible. In order to distinguish which objects are visible and which are invisible, a perspective projection matrix is ​​applied to the vertices of the triangles of the model in the observation space, which can transform the vertices of the model into a new space, which is the clipping space.

[0095] In one possible implementation, the above-mentioned object data-based occlusion check is performed on the bounding boxes of multiple triangle groups. Before determining the unobstructed triangle groups, an instance-level occlusion check can be performed on the virtual object. That is, it is first detected whether the above-mentioned virtual object is occluded. If the detection result is that the virtual object is not occluded, then based on the object data, an occlusion check is further performed on the bounding boxes of multiple triangle groups to determine the unobstructed triangle groups.

[0096] For example, a computer device may obtain a bounding box of a virtual object, and then detect whether each position point in the bounding box of the virtual object is occluded. If each position point in the bounding box of the virtual object is not completely occluded, it is determined that the virtual object is not occluded. Further, based on the object data, an occlusion detection is performed on the bounding boxes of multiple triangle groups to determine unoccluded triangle groups.

[0097] Step 230: Render the unobstructed triangle groups to obtain a scene image of the virtual scene.

[0098] The above-mentioned process of rendering the unobstructed triangle group may refer to calling a graphics application programming interface, such as a glDrawElecments command or a DrawIndexedPrimitive command, to pass the triangle group information corresponding to the unobstructed triangle group and other information required for rendering to the GPU, so as to instruct the GPU to perform a rendering operation. The above-mentioned other information required for rendering may include information such as a color map and a shadow map.

[0099] The above-mentioned operation of calling the image application programming interface may also be referred to as a DrawCall operation.

[0100] In an embodiment of the present application, the computer device may execute the above steps 210 to 230 when the number of virtual objects contained in the screen of the virtual scene is greater than a threshold.

[0101] For example, when a computer device renders and displays a virtual scene, it can first obtain the number of virtual objects within the current camera's field of view (such as the above-mentioned observation space). If the number of virtual objects within the current camera's field of view is greater than a threshold, steps 210 to 230 are executed.

[0102] That is to say, the solution shown in the above-mentioned embodiment of the present application can be applied in the scene of large-scale virtual object rendering to reduce the processing calculation amount in the rendering and drawing process, thereby improving the efficiency of image display.

[0103] To summarize, in the scheme shown in the embodiment of the present application, the object data of the virtual object can indicate multiple triangle groups of the virtual object and bounding box information of the triangle groups, and one virtual object corresponds to the bounding boxes of multiple triangle groups. When performing occlusion culling, the bounding boxes of the triangle groups are used as units for detection, the triangle groups whose bounding boxes are occluded in the virtual object are culled, and the triangle groups whose bounding boxes are not occluded are rendered. In the above scheme, the triangles in the object model of the virtual object are first grouped, and occlusion detection is performed on the bounding boxes of each group respectively, so that the granularity of the occlusion detection of the object model can be split from the entire object model into multiple bounding boxes, so that the occluded part of the virtual object can be culled, and the unoccluded part can be rendered, thereby achieving finer-grained occlusion detection, which can improve the occlusion culling effect of the virtual objects in the virtual scene, reduce the processing calculation amount in the rendering and drawing process, and thus improve the efficiency of image display.

[0104] In some embodiments, the triangles contained in the triangle group are adjacent triangles sorted according to a specified sorting algorithm; the specified sorting algorithm is an algorithm for sorting triangles of the object model with the goal of optimizing the vertex cache. Figure 2 For the embodiments described, please refer to Figure 3 , which shows a flow chart of a data processing method provided by an exemplary embodiment of the present application. Figure 3 As shown, Figure 2 Step 230 in the illustrated embodiment may be implemented as step 230a and step 230b.

[0105] Step 230a: When there are multiple unobstructed triangle groups, merge adjacent triangle groups of triangles contained in the multiple unobstructed triangle groups to obtain a merged triangle group.

[0106] For example, suppose there are three triangle groups, namely triangle partition 1, triangle partition 2 and triangle group 3, where triangle group 1 is {triangle 0, triangle 1, triangle 2}; triangle group 2 is {triangle 3}, and triangle group 3 is {triangle 4, triangle 5, triangle 6}, where triangle 0 to triangle 6 are triangles that are renumbered after being sorted according to the specified sorting algorithm. That is to say, among the above triangles 0 to triangle 6, two triangles with adjacent serial numbers are also adjacent after being sorted according to the specified sorting algorithm.

[0107] Assuming that after the occlusion detection in step 220 , it is determined that triangle group 2 and triangle group 3 are not occluded and belong to unoccluded triangle groups, triangle group 2 and triangle group 3 are merged into one merged triangle group.

[0108] In some embodiments, the above-mentioned merging of adjacent triangle groups containing triangles in multiple unobstructed triangle groups to obtain a merged triangle group may mean adding triangles in triangle groups that meet the conditions (that is, the triangles they contain are adjacent) to the merged triangle group in the order sorted by a specified sorting algorithm.

[0109] For example, after merging triangle group 2 and triangle group 3 into a merged triangle group, the merged triangle group is {triangle 3, triangle 4, triangle 5, triangle 6}. That is to say, in the merged triangle group, the arrangement order of each triangle is also the result of sorting according to the specified sorting algorithm.

[0110] In an embodiment of the present application, since the triangles contained in the triangle group are adjacent triangles sorted according to a specified sorting algorithm, therefore, in the process of rendering and drawing triangles, if the rendering is submitted in the order in which the triangles are arranged, the vertex cache can be optimized to the maximum extent and the efficiency of hardware rendering can be improved. In this regard, in an embodiment of the present application, for multiple unobstructed triangle groups corresponding to the same virtual object, if the triangles in two or more of the unobstructed triangle groups are adjacent after being sorted according to the specified sorting algorithm (or are continuous in the sorting queue), then the triangles in the two or more unobstructed triangle groups can be submitted to the DrawCall operation together. At this time, the two or more unobstructed triangle groups can be merged.

[0111] Step 230b: When there are multiple merged triangle groups, submit the multiple merged triangle groups for rendering in sequence according to the arrangement order of the triangles contained in the multiple merged triangle groups to obtain a scene image of the virtual scene.

[0112] For example, suppose there are two merged triangle groups, namely merged triangle group 1 and merged triangle group 2, where merged triangle group 1 is {triangle 3, triangle 4, triangle 5, triangle 6}, and merged triangle group 2 is {triangle 12, triangle 13, triangle 14}. When submitting these two merged triangle groups for rendering and drawing, you can first submit merged triangle group 1 in one DrawCall operation, and then submit merged triangle group 2 in the next DrawCall operation.

[0113] In some embodiments, a triangle is bound to one or more bones in the object model, the virtual object has one or more action states, and the bounding box corresponding to the triangle group is a single bounding box of the triangle group in all action states of the virtual object.

[0114] Among them, the above-mentioned binding of a triangle to one or more bones can also be called associating a triangle with one or more bones. The association relationship between the triangle and the bones can be completed by the developer (such as action artist or action TA) in the development tool (such as DCC tool).

[0115] In an embodiment of the present application, for an object model, the object model may have a preset action. During the process of the virtual object performing the action, the position of the triangle in the object model (here refers to the position of the triangle in the object model in the object space, or, in other words, refers to the relative position of the triangle / vertex of the triangle with respect to the root node of the object model) will change. Therefore, in an embodiment of the present application, for a triangle group, a bounding box may be set, and the bounding box may include the positions of all triangles in the triangle group in all action states / part of the key action states of the virtual object. The above action states may also be referred to as action frames. In this case, when the virtual object is in different action states, the bounding box may include all triangles in the triangle group. The above scheme only needs to pre-set a bounding box for each triangle group, which can greatly reduce the amount of data storage and improve rendering efficiency.

[0116] In some embodiments, a triangle is bound to one or more bones in the object model, the virtual object has one or more action states, and the bounding boxes corresponding to the triangle groups include bounding boxes corresponding to the triangle groups in the one or more action states of the virtual object;

[0117] The above-mentioned method of performing occlusion detection on bounding boxes of multiple triangle groups based on object data to determine unoccluded triangle groups includes:

[0118] Based on the object data, occlusion detection is performed on bounding boxes of the current action states of the virtual objects corresponding to the multiple triangle groups to determine unoccluded triangle groups.

[0119] In another possible implementation of the embodiment of the present application, for a triangle group, a bounding box can be set respectively corresponding to each action state of the virtual object. That is to say, in different action states, the bounding box corresponding to the triangle group is different. Accordingly, when the image is subsequently rendered and drawn, the computer device determines the current bounding box of the triangle group according to the current motion state of the virtual object, and performs occlusion detection based on the current bounding box of the triangle group. Since the bounding box of the triangle group in the current action state is more accurate than the single bounding box of the triangle group in all action states of the virtual object, it can improve the accuracy of occlusion detection, thereby improving the accuracy of image rendering.

[0120] based on Figure 2 or Figure 3 In the embodiment shown, the object data involved can be generated in an offline stage. Figure 2 or Figure 3 The method for generating object data in the embodiment shown can refer to Figure 4 .

[0121] Figure 4 A flowchart of a data processing method provided by an exemplary embodiment of the present application is shown. The method can be executed by a computer device. The computer device can be Figure 1 The second terminal 130 in the system shown; Figure 4 As shown, the method includes:

[0122] Step 410: Acquire triangles of the surface of the object model of the virtual object.

[0123] In an embodiment of the present application, the triangles on the surface of the object model can be set by the developer when developing the object model and stored in the file of the object model. In the embodiment of the present application, the computer device can read the relevant information of the triangles on the surface of the object model from the file of the object model, such as the coordinates of the vertices on the triangle (such as the coordinates of the vertices on the triangle in the object space).

[0124] Step 420: Divide the triangles on the surface of the object model into a plurality of triangle groups.

[0125] In some embodiments, dividing triangles of the surface of the object model into a plurality of triangle groups includes:

[0126] sorting the triangles on the surface of the object model according to a specified sorting algorithm, wherein the specified sorting algorithm is an algorithm for sorting the triangles of the object model with the goal of optimizing the vertex cache;

[0127] According to the arrangement order of the triangles on the surface of the object model, the triangles on the surface of the object model are divided into a plurality of triangle groups, wherein the triangle groups contain sorted adjacent triangles.

[0128] The above-mentioned optimized vertex cache may refer to being friendly to the hardware vertex cache (VertexCache), for example, the vertex hit rate of the hardware VertexCache may be improved during subsequent runtime calculations.

[0129] For example, the specified sorting algorithm may be a linear speed vertex cache optimization algorithm.

[0130] For example, the computer device sorts the triangles on the surface of the object model according to the linear speed vertex cache optimization algorithm, and renumbers each triangle in sequence according to the arrangement order of each triangle, and then divides each triangle into multiple triangle groups according to the arrangement order of each triangle, each triangle group contains one triangle or multiple triangles with consecutive numbers.

[0131] The triangles are rearranged and grouped according to the specified sorting algorithm. When a DrawCall is subsequently submitted during the rendering and display process, the vertex hit rate of the hardware VertexCache can be improved to ensure rendering efficiency.

[0132] In another possible implementation, the computer device may also group the triangles on the surface of the object model in other ways. For example, the computer device may calculate a model bounding box in the object space of the virtual object, the model bounding box completely containing the object model of the virtual object, and then divide the model bounding box into multiple sub-bounding boxes, and group the triangles on the surface of the object model contained in each sub-bounding box into a triangle group, thereby obtaining the multiple triangle groups.

[0133] The model bounding box may be a bounding box of a preset shape, for example, the model bounding box may be a spherical bounding box, a cube bounding box or a rectangular bounding box.

[0134] The above-mentioned model bounding box can be the smallest circumscribed bounding box of the object model. For example, when the shape of the above-mentioned model bounding box is spherical, the model bounding box is the smallest spherical bounding box that completely contains the above-mentioned object model; or, when the shape of the above-mentioned model bounding box is a rectangular parallelepiped, the model bounding box is the smallest rectangular parallelepiped bounding box that completely contains the above-mentioned object model.

[0135] For example, taking the example that the above-mentioned model bounding box is the smallest rectangular bounding box that completely contains the above-mentioned object model, the computer device can divide the above-mentioned rectangular bounding box into multiple parts, for example, into 4 sub-bounding boxes, and divide the triangles on the surface of the object model contained in each sub-bounding box into a group, thereby obtaining 4 triangle groups.

[0136] In some embodiments, a triangle is bound to one or more bones in an object model, and the triangles on the surface of the object model are divided into a plurality of triangle groups according to the arrangement order of the triangles on the surface of the object model, including:

[0137] Dividing the triangles on the surface of the object model into a plurality of candidate triangle groups based on the arrangement order of the triangles on the surface of the object model and the bones to which the triangles on the surface of the object model are bound;

[0138] A specified process is performed on the plurality of candidate triangle groups to obtain a plurality of triangle groups, wherein the specified process includes at least one of a merging process and a splitting process.

[0139] In an embodiment of the present application, the process of dividing the triangles on the surface of the object model into multiple candidate triangle groups based on the arrangement order of the triangles on the surface of the object model and the bones bound to the triangles on the surface of the object model can refer to dividing the triangles on the surface of the object model whose positions after arrangement are continuous and bound to the same or similar bones into the same candidate triangle group; wherein, since the triangles on the surface of the object model are sorted with the goal of optimizing the vertex cache, the positions of triangles with adjacent arrangement orders in the sorted triangles may not be adjacent. After the candidate triangle group is obtained by grouping the bones bound to the triangles, since it takes time to meet the arrangement requirements, The column order is partial order, and the number of triangles in the arranged candidate triangle groups may be unevenly distributed, that is, some candidate triangle groups may have more triangles, while some candidate triangle groups may have fewer triangles. In this regard, the computer device can also merge or split multiple candidate triangle groups to obtain multiple triangle groups, wherein the above-mentioned merging or splitting may refer to merging or splitting two candidate triangle groups that are adjacent in the arrangement order of the triangles contained therein, to ensure that the triangles in the merged triangle group are adjacent after being sorted according to the specified sorting algorithm.

[0140] Among them, since the positions of triangles corresponding to the same or similar bones are also adjacent or close, the above scheme can be used to aggregate the triangles on the surface of the object model according to their positions, so that the positions of the triangles contained in each candidate triangle group are adjacent or close, and the positions of the triangles in different candidate triangle groups are separated, so that the bounding boxes of each triangle group obtained subsequently can avoid overlapping as much as possible. In addition, since multiple candidate triangle groups are merged or split, it can be ensured that the number of triangles contained in each triangle group is close, so that the size of the bounding box of each triangle group can be as close as possible. In other words, through the above scheme, triangle groups with similar bounding box sizes and avoiding overlap as much as possible can be divided, thereby ensuring the division effect of triangle grouping.

[0141] In the embodiment of the present application, the computer device may also use other methods to divide the triangles on the surface of the object model according to the arrangement order of the triangles. For example, the computer device evenly divides the triangles on the surface of the object model into multiple triangle groups according to the arrangement order of the triangles.

[0142] For example, the number N of triangle groups into which each object model is divided is pre-set in the computer device. When grouping, the computer device first reads or counts the number M of triangles on the surface of the object model, sorts the triangles on the surface of the object model according to a specified sorting algorithm, and then divides every K consecutive triangles among the sorted triangles into a triangle group, where K can be the result of rounding up or down after M / N.

[0143] In some embodiments, based on the arrangement order of the triangles on the surface of the object model and the bones bound to the triangles on the surface of the object model, the triangles on the surface of the object model are divided into a plurality of candidate triangle groups, including:

[0144] Obtaining bones bound to the first triangle and the second triangle respectively, where the first triangle and the second triangle are two triangles adjacent to each other in the order of arrangement among the triangles on the surface of the object model;

[0145] In response to the first triangle and the second triangle being bound to the same bone, the first triangle and the second triangle are added to the same candidate triangle group.

[0146] In an embodiment of the present application, after the computer device sorts the triangles on the surface of the object model according to a specified sorting algorithm, it can traverse every two adjacent triangles after the sorting. If the bones bound to the two triangles are the same, the two triangles are grouped into the same candidate triangle group.

[0147] For example, assuming that there are multiple triangles with consecutive numbers after being sorted according to a specified sorting algorithm, and assuming that the first four triangles are triangle 1, triangle 2, triangle 3, and triangle 4, the computer device first detects the bones bound to triangle 1 and triangle 2, determines that the bones bound to triangle 1 and triangle 2 are the same, and divides triangle 1 and triangle 2 into a candidate triangle group 1, then, the computer device detects the bones bound to triangle 2 and triangle 3, determines that the bones bound to triangle 2 and triangle 3 are also the same, and divides triangle 3 into candidate triangle group 1, then, the computer device detects the bones bound to triangle 3 and triangle 4, determines that the bones bound to triangle 3 and triangle 4 are different, at this time, the computer device divides triangle 4 into a new candidate triangle group 2, and then, the computer device detects whether the bones bound to triangle 4 and subsequent triangles are the same, and so on.

[0148] Among them, the bones bound to the first triangle and the second triangle are the same, which may mean that one or more bones bound to the first triangle and the second triangle are exactly the same, or it may also mean that one or more bones bound to the first triangle and the second triangle are partially the same.

[0149] Through the scheme shown in the above embodiment, a scheme is provided for determining candidate triangle groups by traversing sorted adjacent triangles, thereby ensuring the feasibility of dividing the triangles on the surface of the object model into multiple candidate triangle groups based on the arrangement order of the triangles on the surface of the object model and the skeletons bound to the triangles on the surface of the object model, and the algorithm logic is simple and easy to implement.

[0150] In an embodiment of the present application, the computer device may also use other methods to divide the triangles on the surface of the above-mentioned object model according to the arrangement order of the triangles and the skeletons to which the triangles are bound. For example, the computer device may divide the triangles corresponding to each skeleton in the object model into a triangle set, and then, for each triangle set, divide the continuous triangles sorted according to the specified sorting algorithm into a candidate triangle group; optionally, since a triangle may be bound to one or more skeletons, some of the triangles in the triangle sets corresponding to different skeletons may be the same. In this regard, before the computer device divides the triangles in the triangle set into the candidate triangle group, it may first deduplicate the triangles in each triangle set. For example, for any two triangle sets, the computer device may determine the same triangles therein (which may be called the common triangles of the two triangle sets), and then delete the above-mentioned common triangles in the triangle set.

[0151] In some embodiments, a plurality of candidate triangle groups are subjected to a specified process to obtain a plurality of triangle groups, including:

[0152] In response to the number of triangles included in the first candidate triangle group being greater than the number threshold, dividing the first candidate triangle group into two or more triangle groups, the first candidate triangle group being one of the plurality of candidate triangle groups, and the number of triangles included in the triangle group being not greater than the number threshold;

[0153] In response to the sum of the numbers of triangles contained in the second candidate triangle group and the third candidate triangle group being not greater than the number threshold, the second candidate triangle group and the third candidate triangle group are merged, and the second candidate triangle group and the third candidate triangle group are adjacent groups among the multiple candidate triangle groups.

[0154] The above quantity threshold may be a value preset by a developer. For example, the developer may choose to set a quantity threshold with optimal performance based on experimental results.

[0155] Alternatively, the quantity threshold may be a quantity threshold calculated by the computer device according to the number of triangles on the surface of the object model and the preset maximum number of triangle groups. For example, the quantity threshold may be the result of rounding up or down after dividing the number of triangles on the surface of the object model by the preset maximum number of triangle groups. The maximum number of triangle groups may be preset by the developer.

[0156] In an embodiment of the present application, for a candidate triangle grouping that contains a number of triangles greater than a quantity threshold, a computer device divides the triangles in the candidate triangle grouping into multiple triangle groups according to the arrangement order, to ensure that the number of triangles contained in each triangle group does not exceed the quantity threshold; for example, the computer device divides the first S triangles in the candidate triangle group into one triangle group according to the arrangement order of the triangles in the candidate triangle grouping, and removes the first S triangles from the candidate triangle group. If the number of remaining triangles in the candidate triangle group is still greater than the quantity threshold, the first S triangles of the remaining triangles continue to be divided into one triangle group, and the first S triangles are removed therefrom, and so on, until the number of remaining triangles in the candidate triangle group is no greater than the quantity threshold, at which point the candidate triangle group is treated as a new triangle group, and the division process of the candidate triangle group is terminated.

[0157] Through the above scheme, it can be ensured that the number of each triangle grouping does not exceed a certain number threshold, avoiding the problem of one or more triangle groups having too large bounding boxes (if the bounding box of a triangle group is too large, then during the rendering process, there is a greater probability that part of the bounding box of the triangle group is not occluded and a DrawCall needs to be submitted), thereby ensuring the effect of subsequent occlusion culling of the triangle grouping according to the bounding box of the triangle group.

[0158] In an embodiment of the present application, for two adjacent candidate triangle groups containing a small number of triangles, the computer device can merge the two candidate triangle groups. Specifically, if the sum of the numbers of triangles contained in the two adjacent candidate triangle groups does not exceed the quantity threshold, the computer device can merge the triangles in the two candidate triangle groups into the same candidate triangle group.

[0159] Through the above solution, it is possible to avoid as much as possible the situation where the number of triangles contained in each triangle group is too small, resulting in a large number of groups, reducing the number of triangle groups that need to be processed in the subsequent occlusion detection process, improving the efficiency of occlusion detection, and improving the GPU concurrency performance during rendering (that is, more triangles can be processed in one DrawCall process).

[0160] Step 430: Generate bounding box information of the triangle group, where the bounding box information indicates the coordinate position of the bounding box of the triangle group.

[0161] The bounding box information includes coordinate information for representing the bounding box. For example, taking the bounding box as a rectangular parallelepiped or a cube, the bounding box information may include coordinate values ​​of two or more vertices in the bounding box.

[0162] For example, taking the above-mentioned bounding box as an example, which is determined according to the AABB bounding box algorithm, the bounding box is a cuboid or a cube whose sides are parallel to the three coordinate axes (x-axis, y-axis and z-axis). At this time, the position of the bounding box can be represented by the coordinates of the two vertices of the bounding box, where the coordinate value of one vertex is the maximum value among the coordinate values ​​of each point in the bounding box (the coordinate values ​​of the x-axis coordinate, the y-axis coordinate and the z-axis coordinate are all the largest), and the other vertex is the minimum value among the coordinate values ​​of each point in the bounding box (the coordinate values ​​of the x-axis coordinate, the y-axis coordinate and the z-axis coordinate are all the smallest).

[0163] For another example, taking the case where the bounding box is a spherical bounding box, the bounding box information may include the center coordinates of the spherical bounding box and the radius of the spherical bounding box.

[0164] In some embodiments, the virtual object has one or more action states, and the bounding box information of the triangle group is generated, including:

[0165] Generate a single bounding box information of the triangle group in all action states of the virtual object;

[0166] Alternatively, bounding box information corresponding to the triangle groups in one or more action states of the virtual object is generated.

[0167] In an embodiment of the present application, for a virtual object having multiple action states, when generating the bounding box information of a triangle grouping, the computer device can generate a bounding box for each action state, or for some of the action states among the multiple action states (such as some key action states, or some randomly determined action states), respectively, to obtain multiple bounding boxes, and then determine a single bounding box that completely includes the multiple bounding boxes, and use the bounding box information of the single bounding box as the bounding box information of the triangle grouping.

[0168] Alternatively, for the above-mentioned multiple bounding boxes, the computer device can also generate the bounding box information of each bounding box as the bounding box information of the triangle group, and each bounding box information is bound to the corresponding action state (for example, adding the corresponding action state identifier to the bounding box information).

[0169] Step 440: Generate object data of a virtual object based on the plurality of triangle groups and bounding box information of the triangle groups.

[0170] In an embodiment of the present application, the computer device may add triangle grouping information of multiple triangle groups and bounding box information of the triangle groups to the object data of the above-mentioned virtual object to generate the above-mentioned object data.

[0171] Among them, the object data is used for the display device to perform occlusion detection on the bounding boxes of multiple triangle groups, determine unobstructed triangle groups, and render the unobstructed triangle groups to obtain a scene image of the virtual scene. The unobstructed triangle groups are unobstructed triangle groups among the multiple triangle groups.

[0172] To sum up, in the scheme shown in the embodiment of the present application, the object data of the virtual object can indicate multiple triangle groups of the virtual object and the bounding box information of the triangle groups, and one virtual object corresponds to the bounding boxes of multiple triangle groups. When performing occlusion culling, the bounding boxes of the triangle groups are used as units for detection, and the triangle groups obscured by the bounding boxes in the virtual object are culled, and the triangle groups not obscured by the bounding boxes are rendered. In this way, the occluded parts of the virtual object can be culled and the unobstructed parts can be rendered, which can improve the occlusion culling effect of the virtual objects in the virtual scene, reduce the processing calculation amount in the rendering process, and thus improve the efficiency of image display.

[0173] The solution shown in the embodiment of the present application can be applied in large-scale character rendering scenes. Figures 2 to 4 The overall framework of the above embodiment of the present application includes two parts: offline pre-calculation and runtime processing. First, the character triangle Cluster and its dynamic bounding box are pre-calculated offline for the character action and saved, and then the character instance level and triangle Cluster level are clipped and culled based on the GPU at runtime, and finally the DrawCall information is integrated and submitted for rendering to complete the entire rendering process.

[0174] Please refer to Figure 5 and Figure 6 ,in, Figure 5 A framework diagram of an offline pre-calculation process involved in this application is shown. Figure 6 A framework diagram of a runtime processing process involved in this application is shown. Figure 5 and Figure 6 As shown:

[0175] 1. Offline Precomputation Process

[0176] In order to more accurately and efficiently calculate and eliminate the occlusion relationship between dynamic characters and scenes, and between dynamic characters, this application designs a bone-based triangle cluster generation (Cluster Generation Based OnBone) algorithm. The main process is to first perform a triangle clustering process to obtain a triangle Cluster set of the character model. In this step, the character model is divided into several small areas according to the bone association information. Each small area after the division corresponds to a group of triangles, and this group of triangles is called a triangle Cluster. The effect after the triangle division is as follows Figure 7 As shown. Figure 7 In the figure, the dark triangle in area 71 is a triangle Cluster.

[0177] Next, calculate the dynamic bounding box of all the triangle clusters of the character. Assuming that the character action contains n key frames, for each triangle cluster, calculate its single-frame bounding box for each of the n key frames, and then add these n single-frame bounding boxes to get the dynamic bounding box of the triangle cluster. In this algorithm, the AABB bounding box algorithm can be used. The schematic diagram of this bounding box algorithm process can be shown as follows: Figure 8 As shown. Figure 8 As shown, for three different action states of a limb part, in these three different action states, the position of a triangle Cluster (i.e., the triangle in the elliptical dotted box 80 in the figure) in the limb part is different. Assuming that the single-frame bounding boxes under the three key frames on the left are bounding boxes 81, 82, and 83, the final dynamic bounding box is bounding box 84, which contains the above-mentioned bounding boxes 81, 82, and 83.

[0178] Among them, the above Figure 8 The bounding box in is in two-dimensional form. In fact, since the model is three-dimensional, the bounding box calculated here is also a three-dimensional bounding box.

[0179] Among them, Figure 5 As shown, the specific algorithm process of the above offline pre-calculation is described as follows:

[0180] Step S1: Get character triangles, bones, triangle-bone association information: traverse and record all character triangles, and call the linear speed vertex cache optimization algorithm to rearrange the vertex data order, and arrange it into a vertex array that is friendly to the hardware VertexCache, thereby reducing the computing overhead and improving performance; at the same time, record all the bone information associated with each triangle, and a triangle may be associated with multiple bone information. Assuming that the number of character triangles is m, and the triangle is represented by v, then the triangle array V={vi, i=0,1,…,m-1}; Assuming that the number of bones is r, and the bone is represented by b, then the bone array B={bi, i=0,1,…,b-1}; the bone array associated with each triangle vi is Bi={bj, bj∈B and bj is associated with vi}, and all the bone information associated with the triangle VB={(vi,Bi), i=0,1,…,m-1}.

[0181] Step S2: Triangle Cluster Grouping, for example, please refer to Fig. 9 , which shows a schematic diagram of the triangle cluster involved in this application. Fig. 9 As shown, traverse the array V, query the bone association information VB, and traverse the adjacent nodes v in the array V i and v i+1 , determine node v i and v i+1 Associated bone information B i With B i+1 Are they the same? If B i With B i+1 If they are exactly the same, then their node v i and v i+1 Divide into the same triangle Cluster vc k Otherwise, determine whether the traversal of the nodes in V is complete. If not, start from v i+1 Start dividing to the next triangle Cluster vc k+1 After all vertices are processed in sequence in the above manner, s triangle clusters are obtained. Obviously, s≤m. The obtained triangle cluster array after grouping is recorded as VC={vc k ,k=0,1,…,s-1}.

[0182] Step S3: Large triangle cluster split optimization, for example, please refer to Fig.10 , which shows a schematic diagram of the large triangle Cluster splitting optimization involved in this application. Fig.10 As shown, for the classified triangle Cluster array VC, specify the constant α and traverse the vc in the array VC k And judge in turn, if vc kIf the number of nodes in exceeds α, vc is further split according to the size of α. k , after splitting, each vc k The number of triangles in the VC does not exceed α; then determine whether the node traversal in VC is finished. If not, continue to traverse the next VC. k After all the operations are executed, a new triangle cluster array VC is obtained. In the actual algorithm, α can be set to 192 or other values ​​according to the system parameters.

[0183] Among them, splitting the large triangle Cluster into small triangles has the following effects:

[0184] ①The number of triangles α is the number that is beneficial to rendering after actual measurement;

[0185] ②After splitting, the bounding box will be smaller, which is conducive to the accuracy of cropping.

[0186] Step S4: Small triangle cluster merging optimization, for example, please refer to Fig.11 , which shows a schematic diagram of the small triangle Cluster merging optimization involved in this application. Fig.11 As shown, for the split triangle Cluster array VC, traverse the vc in the array VC k And judge in turn, that is, judge vc k and vc k+1 Is the number of nodes less than α / 2? For example, if vc k The number of nodes in is less than α / 2, then its adjacent vc k+1 Is the number of nodes also less than α / 2? If so, vc k and vc k+1 Aggregate into a new triangle Cluster, and then determine whether the node traversal in VC is finished. If not, continue to traverse the next vc k , until each vc k The number of nodes contained is between α / 2 and α; at this point, the calculation of the triangle Cluster array VC is completed, and the number of vc contained in it is represented by s', VC = {vc k ,k=0,1,…,s'-1}.

[0187] Step S5: Calculate the dynamic bounding box of the triangle Cluster. Assume that the total number of frames of the character action is n. For each triangle Cluster vc in the triangle Cluster array VC, k , for i=0,1,…,n-1, calculate vc successively k The single-frame bounding box of the i-th frame action (that is, the single-frame bounding box of each frame action is calculated), denoted as b_vc kiThen, the dynamic bounding box is obtained by summing up the bounding boxes of each single frame, vc k The dynamic bounding box b_vc k =Σi=0,1,…,n-1b_vc ki In this algorithm, we can use the AABB bounding box algorithm, using two points to represent P min =[X min ,Y min ,Z min ], P max =[X max ,Y max ,Z max ], then b_vc ki =(Pmin ki ,Pmax ki ), the sum of the AABB bounding box can be calculated by adding vertices to the bounding box, that is, b_vc ki +b_vc kj =add(add(b_vc ki ,Pmin kj ),Pmax kj ), where the add function is a general algorithm for adding vertices to the AABB bounding box. After all calculations are completed, the bounding box data of all triangles Cluster is obtained B_VC = {b_vc k ,k=0,1,…,s'-1}. The offline calculation is completed.

[0188] Among them, the small triangle Cluster merging has the following two effects:

[0189] ① Avoid excessive number of clusters that may affect the pruning performance;

[0190] ② Small triangle clusters are not conducive to GPU concurrent operation during actual rendering. After merging, they are more conducive to GPU concurrent operation during actual rendering.

[0191] Finally, the computer device saves the triangle Cluster array VC and the bounding box data B_VC of all triangle Clusters.

[0192] 2. Runtime Processing

[0193] The runtime process is based on the offline pre-calculated triangle Cluster array VC and the corresponding dynamic bounding box B_VC information, and then performs clipping and culling before actually submitting for rendering. Please refer to Fig.12 , which shows the occlusion and cropping effect diagram involved in this application. After a character is occluded and cropped by a scene object, the remaining rendering area needs to be submitted as follows Fig.12 shown.

[0194] like Figure 6 As shown, the algorithm process of runtime processing is described as follows:

[0195] Step S1: Character instance clipping: Because the position of the character may not be within the displayable range of the screen, if all characters are calculated and submitted for rendering, it will cause performance waste. Therefore, the character instance level clipping and culling are first performed on the GPU's ComputeShader computing unit. Based on the frustum clipping and HZB clipping algorithms, the characters that are not in the displayable range can be removed from the character instance level.

[0196] Step S2: Triangle Cluster level clipping: for each vc in VC k , read the B_VC of the corresponding index to get vc k Dynamic bounding box data b_vc k , also using the cone clipping and HZB clipping algorithm, on the GPU's ComputeShader computing unit, calculate each vc k The occlusion situation of vc k Is it blocked? If b_vc k If it is blocked by other areas or scene objects, it does not need to be rendered. Fig.13 , which shows a schematic diagram of an occlusion mark involved in the present application, such as Fig.13 As shown, in the embodiment of the present application, an occlusion information flag bit array can be used to store information on whether all triangle Clusters need to be drawn, 1 means that they need to be rendered, and 0 means that they do not need to be rendered; that is, if vc k If it is blocked, the corresponding bit position is 0, otherwise, the corresponding bit position is 1.

[0197] Step S3: Batch submitting triangle clusters for rendering: Based on the bit array information in step S2, merge the adjacent vcs that need to be rendered, and batch submit the merged vc vertices for rendering through the system's MDI interface. Please refer to Fig.14 , which shows a schematic diagram of batch submission rendering involved in this application. Fig.14 As shown, vc0 and vc1 are adjacent and need to be submitted, then vc0 and vc1 are submitted in the same DrawCall, vc4 to vc6 are adjacent and not adjacent to vc0 and vc1, then vc4 to vc6 are submitted in the next DrawCall, and so on.

[0198] In the embodiment of the present application, the clustering algorithm used in the offline generation part currently adopts the skeleton-based triangle clustering generation (Cluster Generation Based On Bone) algorithm, that is, a character model only generates a triangle Cluster result according to the skeleton information in the above algorithm. In addition, the clustering generation (Cluster Generation Based On Animation) algorithm based on animation can also be adopted. That is, if a character model has multiple actions, then each action of the character model generates its own triangle Cluster result. This will require saving more offline calculation results, but will obtain more accurate culling results in the subsequent occlusion culling calculation during runtime.

[0199] In addition, in the calculation of the dynamic bounding box of the triangle Cluster in the offline generation step S5, the embodiment of the present application uses AABB bounding box calculation, and other bounding box calculation methods may also be used, such as bounding sphere, directional bounding box OBB, and fixed directional convex hull FDH.

[0200] During the runtime, the triangle clusters of step S3 are submitted for batch rendering. In addition to merging and submitting the rendering based on the occlusion information mark bit array of this algorithm, the submission can also be merged by calling the system wave interface.

[0201] The solutions shown in the above-mentioned embodiments of the present application propose a GPU-driven large-scale character real-time rendering technical solution, and the overall solution framework includes two parts: offline pre-calculation and runtime processing. First, the character triangle Cluster information and triangle Cluster dynamic bounding box information are pre-calculated and saved for the character action offline, and then, based on the computing power of the GPU at runtime, the massive dynamic characters are clipped and culled at the instance level and the triangle Cluster level, and finally the DrawCall is integrated to submit the rendering to complete the entire rendering process. This technical solution fully considers the friendliness of vertex storage to the hardware VertexCache during offline calculations, fully utilizes the GPU computing power during runtime calculations, simplifies rendering information, and submits rendering in batches to reduce DrawCall overhead, thereby realizing the large-scale massive dynamic character rendering requirements under the same scene and the same screen, solving the performance bottleneck problem, and achieving performance indicators such as high frame rate.

[0202] Specifically, the solutions shown in the above-mentioned embodiments of the present application can be used in application scenarios in game scenes where a large number of dynamic characters need to be displayed on the same screen at the same time, and can ensure high frame rate, smooth performance and experience without lag, and present high-quality game performance.

[0203] Compared with the hardware instance solution, in a large-scale character rendering scenario with 5,000 characters on the same screen and 7,000 faces for each character, the performance of the solution shown in the embodiment of the present application is significantly improved, as follows:

[0204] (1) Comparison between this solution and the hardware instantiation solution on a certain graphics card model:

[0205] The time consumption was reduced from 6.63ms to 2.3ms, a reduction of 61%;

[0206] 63% reduction in vertex triangle workload;

[0207] L2 utilization increased from 23% to 41%;

[0208] Shader usage efficiency increased from 66% to 73%;

[0209] The tile L1 cache hit rate dropped from 94% to 80%, but the L2 hit rate increased from 82% to 96%.

[0210] (2) Comparison between this solution and the hardware instantiation solution on another graphics card model:

[0211] The time consumption was reduced from 4.65ms to 2.7ms, a reduction of 42%;

[0212] 58% reduction in vertex triangle workload;

[0213] L2 utilization remained roughly flat, fluctuating from 46% to 43%;

[0214] Shader usage efficiency remained roughly the same, fluctuating from 63% to 60%%;

[0215] The hit rate of the L1 cache of the texture remained basically the same, fluctuating from 70% to 72%; at the same time, the L2 maintained a high hit rate, fluctuating from 99.3% to 98%.

[0216] In summary, from the comparison of experimental data of different graphics cards, it can be seen that the algorithm provided in the embodiment of the present application can significantly reduce the time consumption of a single frame, significantly reduce the workload of vertex triangles, and the L2 utilization, Shader usage efficiency and cache hit rate can remain the same or achieve a certain degree of improvement.

[0217] Fig.15 A block diagram of a data processing device provided by an exemplary embodiment of the present application is shown. The device includes:

[0218] The object data acquisition module 1501 is used to acquire object data of a virtual object in a virtual scene, wherein the object data indicates a plurality of triangle groups of the virtual object and bounding box information of the triangle groups, the triangle groups that are not blocked at any position, and the bounding box information indicates the coordinate position of the bounding box of the triangle group;

[0219] An occlusion detection module 1502 is used to perform occlusion detection on the bounding boxes of the plurality of triangle groups based on the object data to determine an unoccluded triangle group;

[0220] The rendering module 1503 is used to render the unobstructed triangle groups to obtain a scene image of the virtual scene.

[0221] In some embodiments, the triangles included in the triangle group are adjacent triangles sorted according to a specified sorting algorithm; the specified sorting algorithm is an algorithm for sorting triangles of the object model with the goal of optimizing vertex cache;

[0222] The rendering module 1503 is used to:

[0223] In the case that there are multiple unobstructed triangle groups, adjacent triangle groups of triangles contained in the multiple unobstructed triangle groups are merged to obtain a merged triangle group;

[0224] In the case that there are multiple merged triangle groups, the multiple merged triangle groups are submitted for rendering in sequence according to the arrangement order of the triangles contained in the multiple merged triangle groups to obtain the scene image of the virtual scene.

[0225] In some embodiments, one of the triangles is bound to one or more bones in the object model, the virtual object has one or more action states, and the bounding box corresponding to the triangle group is a single bounding box of the triangle group in all action states of the virtual object.

[0226] In some embodiments, one of the triangles is bound to one or more bones in the object model, the virtual object has one or more action states, and the bounding boxes corresponding to the triangle groups include bounding boxes corresponding to the one or more action states of the virtual object respectively;

[0227] The occlusion detection module 1502 is configured to perform occlusion detection on the bounding boxes of the multiple triangle groups corresponding to the current action states of the virtual object based on the object data, and determine the unoccluded triangle group.

[0228] Fig.16A block diagram of a data processing device provided by an exemplary embodiment of the present application is shown. The device includes:

[0229] A triangle acquisition module 1601 is used to acquire triangles on the surface of the object model of the virtual object;

[0230] A grouping module 1602, configured to divide the triangles on the surface of the object model into a plurality of triangle groups;

[0231] A bounding box information generating module 1603 is used to generate bounding box information of the triangle group, wherein the bounding box information indicates the coordinate position of the bounding box of the triangle group;

[0232] A data generating module 1604, configured to generate object data of the virtual object based on the plurality of triangle groups and bounding box information of the triangle groups;

[0233] The object data is used by the display device to perform occlusion detection on the bounding boxes of the multiple triangle groups, determine unoccluded triangle groups, and render the unoccluded triangle groups to obtain a scene image of the virtual scene.

[0234] In some embodiments, the grouping module 1602 is used to:

[0235] Sorting the triangles on the surface of the object model according to a specified sorting algorithm, wherein the specified sorting algorithm is an algorithm for sorting the triangles of the object model with the goal of optimizing the vertex cache;

[0236] According to the arrangement order of the triangles on the surface of the object model, the triangles on the surface of the object model are divided into the plurality of triangle groups, wherein the triangle groups contain sorted adjacent triangles.

[0237] In some embodiments, one of the triangles is bound to one or more bones in the object model.

[0238] The grouping module 1602 is used to:

[0239] Dividing the triangles on the surface of the object model into a plurality of candidate triangle groups based on the arrangement order of the triangles on the surface of the object model and the skeletons bound to the triangles on the surface of the object model;

[0240] The plurality of candidate triangle groups are subjected to designated processing to obtain the plurality of triangle groups, wherein the designated processing includes at least one of a merging process and a splitting process.

[0241] In some embodiments, the grouping module 1602 is used to:

[0242] Obtaining bones bound to a first triangle and a second triangle respectively, wherein the first triangle and the second triangle are two triangles adjacent to each other in order of arrangement among triangles on the surface of the object model;

[0243] In response to the first triangle and the second triangle being bound to the same bone, the first triangle and the second triangle are added to the same candidate triangle group.

[0244] In some embodiments, the grouping module 1602 is used to:

[0245] In response to the number of triangles included in the first candidate triangle group being greater than a quantity threshold, dividing the first candidate triangle group into two or more triangle groups, the first candidate triangle group being one of the plurality of candidate triangle groups, and the number of triangles included in the triangle groups being not greater than the quantity threshold;

[0246] In response to the sum of the numbers of triangles contained in the second candidate triangle group and the third candidate triangle group being not greater than the number threshold, the second candidate triangle group and the third candidate triangle group are merged, and the second candidate triangle group and the third candidate triangle group are adjacent groups among the multiple candidate triangle groups.

[0247] In some embodiments, the virtual object has one or more action states.

[0248] The bounding box information generating module 1603 is used to:

[0249] Generate the single bounding box information of the triangle group in all action states of the virtual object;

[0250] or,

[0251] Generate the bounding box information corresponding to the triangle group in one or more action states of the virtual object.

[0252] One point that needs to be explained is that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0253] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method; the technical effects achieved by each module performing operations are the same as those in the embodiment of the method, and will not be elaborated here.

[0254] Fig.17 The structure block diagram of a computer device 1700 provided by an exemplary embodiment of the present application is shown. The computer device 1700 may be a portable mobile terminal, such as a smart phone or a tablet computer. The computer device 1700 may also be called a user device, a portable terminal, or other names.

[0255] Typically, the computer device 1700 includes a processor 1701 and a memory 1702 .

[0256] The processor 1701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0257] The memory 1702 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 1702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1702 is used to store at least one instruction, which is used to be executed by the processor 1701 to implement the data processing method provided in the embodiment of the present application.

[0258] In some embodiments, the computer device 1700 may further include: a peripheral device interface 1703 and at least one peripheral device. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1704 , a touch display screen 1705 , a camera 1706 , an audio circuit 1707 and a power supply 1708 .

[0259] In some embodiments, the computer device 1700 further includes one or more sensors 1709 , including but not limited to: an acceleration sensor 1710 , a gyroscope sensor 1711 , a pressure sensor 1712 , an optical sensor 1713 , and a proximity sensor 1714 .

[0260] Those skilled in the art will appreciate that the structure shown above does not constitute a limitation on the computer device 1700 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0261] In an exemplary embodiment, a chip is also provided. The chip includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement the data processing method described in the above aspects.

[0262] In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the data processing methods provided in the above-mentioned method embodiments.

[0263] In an exemplary embodiment, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the data processing methods provided by the above-mentioned method embodiments.

[0264] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0265] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0266] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data processing method, characterized in that: The method comprises: Acquire object data of a virtual object in a virtual scene, the object data indicating a plurality of triangle groups of the virtual object and bounding box information of the triangle groups, the plurality of triangle groups being obtained by dividing triangles on a surface of an object model of the virtual object, and the bounding box information indicating coordinate positions of bounding boxes of the triangle groups; Based on the object data, performing occlusion detection on the bounding boxes of the plurality of triangle groups to determine unoccluded triangle groups; The unobstructed triangle groups are rendered to obtain a scene image of the virtual scene.

2. The method according to claim 1, characterized in that The triangles included in the triangle group are adjacent triangles sorted according to a specified sorting algorithm; the specified sorting algorithm is an algorithm for sorting triangles of the object model with the goal of optimizing vertex cache; The rendering of the unobstructed triangle groups to obtain a scene image of the virtual scene includes: In the case that there are multiple unobstructed triangle groups, adjacent triangle groups of triangles contained in the multiple unobstructed triangle groups are merged to obtain a merged triangle group; In the case that there are multiple merged triangle groups, the multiple merged triangle groups are submitted for rendering in sequence according to the arrangement order of the triangles contained in the multiple merged triangle groups to obtain the scene image of the virtual scene.

3. The method according to claim 1 or 2, characterized in that: One of the triangles is bound to one or more bones in the object model, the virtual object has one or more action states, and the bounding box corresponding to the triangle group is a single bounding box of the triangle group in all action states of the virtual object.

4. The method according to claim 1 or 2, characterized in that: One of the triangles is bound to one or more bones in the object model, the virtual object has one or more action states, and the bounding boxes corresponding to the triangle groups include bounding boxes corresponding to the one or more action states of the virtual object respectively; The step of performing occlusion detection on the bounding boxes of the plurality of triangle groups based on the object data to determine unoccluded triangle groups includes: Based on the object data, occlusion detection is performed on the bounding boxes of the multiple triangle groups corresponding to the current action states of the virtual object to determine the unoccluded triangle group.

5. A data processing method, characterized in that: The method comprises: Obtaining triangles of a surface of an object model of a virtual object; Dividing the triangles on the surface of the object model into a plurality of triangle groups; Generate bounding box information of the triangle group, wherein the bounding box information indicates a coordinate position of the bounding box of the triangle group; generating object data of the virtual object based on the plurality of triangle groups and bounding box information of the triangle groups; The object data is used by the display device to perform occlusion detection on the bounding boxes of the multiple triangle groups, determine unoccluded triangle groups, and render the unoccluded triangle groups to obtain a scene image of the virtual scene.

6. The method according to claim 5, characterized in that The step of dividing the triangles on the surface of the object model into a plurality of triangle groups comprises: Sorting the triangles on the surface of the object model according to a specified sorting algorithm, wherein the specified sorting algorithm is an algorithm for sorting the triangles of the object model with the goal of optimizing the vertex cache; According to the arrangement order of the triangles on the surface of the object model, the triangles on the surface of the object model are divided into the plurality of triangle groups, wherein the triangle groups contain sorted adjacent triangles.

7. The method according to claim 6, characterized in that One of the triangles is bound to one or more bones in the object model, The step of dividing the triangles on the surface of the object model into the plurality of triangle groups according to the arrangement order of the triangles on the surface of the object model comprises: Dividing the triangles on the surface of the object model into a plurality of candidate triangle groups based on the arrangement order of the triangles on the surface of the object model and the skeletons bound to the triangles on the surface of the object model; The plurality of candidate triangle groups are subjected to designated processing to obtain the plurality of triangle groups, wherein the designated processing includes at least one of a merging process and a splitting process.

8. The method according to claim 7, characterized in that The step of dividing the triangles on the surface of the object model into a plurality of candidate triangle groups based on the arrangement order of the triangles on the surface of the object model and the skeletons bound to the triangles on the surface of the object model comprises: Obtaining bones bound to a first triangle and a second triangle respectively, wherein the first triangle and the second triangle are two triangles adjacent to each other in order of arrangement among triangles on the surface of the object model; In response to the first triangle and the second triangle being bound to the same bone, the first triangle and the second triangle are added to the same candidate triangle group.

9. The method according to claim 7 or 8, characterized in that: The performing specified processing on the plurality of candidate triangle groups to obtain the plurality of triangle groups includes: In response to the number of triangles included in the first candidate triangle group being greater than a quantity threshold, dividing the first candidate triangle group into two or more triangle groups, the first candidate triangle group being one of the plurality of candidate triangle groups, and the number of triangles included in the triangle groups being not greater than the quantity threshold; In response to the sum of the numbers of triangles contained in the second candidate triangle group and the third candidate triangle group being not greater than the number threshold, the second candidate triangle group and the third candidate triangle group are merged, and the second candidate triangle group and the third candidate triangle group are adjacent groups among the multiple candidate triangle groups.

10. The method according to any one of claims 7 to 9, characterized in that: The virtual object has one or more action states, The generating the bounding box information of the triangle group includes: Generate the single bounding box information of the triangle group in all action states of the virtual object; or, Generate the bounding box information corresponding to the triangle group in one or more action states of the virtual object.

11. A data processing device, characterized in that: The device comprises: An object data acquisition module, used to acquire object data of a virtual object in a virtual scene, wherein the object data indicates a plurality of triangle groups of the virtual object and bounding box information of the triangle groups, wherein the plurality of triangle groups are obtained by dividing triangles on a surface of an object model of the virtual object, and the bounding box information indicates coordinate positions of bounding boxes of the triangle groups; An occlusion detection module, configured to perform occlusion detection on bounding boxes of the plurality of triangle groups based on the object data, and determine an unoccluded triangle group; A rendering module is used to render the unobstructed triangle groups to obtain a scene image of the virtual scene.

12. A data processing device, characterized in that: The device comprises: A triangle acquisition module, used to acquire triangles on the surface of the object model of the virtual object; A grouping module, used for dividing the triangles on the surface of the object model into a plurality of triangle groups; A bounding box information generating module, configured to generate bounding box information of the triangle group, wherein the bounding box information indicates a coordinate position of the bounding box of the triangle group; A data generation module, configured to generate object data of the virtual object based on the plurality of triangle groups and bounding box information of the triangle groups; The object data is used by the display device to perform occlusion detection on the bounding boxes of the multiple triangle groups, determine unoccluded triangle groups, and render the unoccluded triangle groups to obtain a scene image of the virtual scene.

13. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the data processing method according to any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer instruction, and the computer instruction is loaded and executed by a processor to implement the data processing method according to any one of claims 1 to 10.

15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; the computer instructions are read and executed by a processor of a computer device to implement the data processing method according to any one of claims 1 to 10.