Scene model processing method and apparatus, electronic device, and storage medium

CN116889724BActive Publication Date: 2026-10-20NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310871225.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2026-10-20
Estimated Expiration
2043-07-14

AI Technical Summary

Technical Problem

[0004]但是,由于场景模型在开发时通常为独立开发,因此,场景模型在复用组合时难免会存在一些穿插在一起的隐藏面,例如,在场景模型显示时隐藏或者遮挡在其他场景模型中的面片,而由于场景模型数量众多,相应的这类隐藏面的数量也会较多,对场景模型的渲染造成了一定的资源浪费,影响性能

Benefits of technology

[0018]本申请实施例中,通过确定用于筛选面片的目标虚拟对象网格模型,并确定该目标虚拟对象网格模型占据的几何空间,当确定出其他场景对象网格模型包含在该几何空间中的面片后,则实现对待删除的目标面片的筛选,提升了场景网格模型中无效面片的筛选效率。通过将场景网格模型中的该目标面片的删除处理,实现对场景网格模型的优化,减少场景网格模型渲染时所需渲染的面片数量,同时也避免了对无效面片的渲染处理,避免资源浪费,提升性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116889724B_ABST
    Figure CN116889724B_ABST
Patent Text Reader

Abstract

Embodiments of the application disclose a scene model processing method and device, electronic equipment and a storage medium. The method comprises: obtaining a scene grid model, the scene grid model being obtained by combining at least two scene object grid models; determining a target virtual object grid model for filtering facets from the scene object grid models, and determining a geometric space occupied by the target virtual object grid model in the scene grid model according to an outline of the target virtual object grid model; determining target facets contained in the geometric space in any scene object grid model other than the target virtual object grid model in the scene grid model; and deleting the target facets in the scene grid model to obtain an updated scene grid model. The accuracy of invalid facet identification and deletion is improved by the geometric space. The resource consumption of rendering is reduced after the invalid facets are deleted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of games, specifically to a scene model processing method, apparatus, electronic device, and storage medium, wherein the storage medium includes a computer-readable storage medium. Background Technology

[0002] As versions are continuously updated and iterated, the production specifications for scene assets vary at different stages, and the asset data gradually becomes enormous. Scene models are an important resource in scene assets, generating display images after rendering, such as 3D scene images like game screens. How to maintain and manage scene models is an important problem that needs to be solved.

[0003] Currently, a method has been designed to improve the development efficiency of scene resources and reduce the generation of new resources by reusing scene models. For example, scene models from PC games can be reused in mobile games, or scene models from other games can be reused in the development of scene resources for the current game.

[0004] However, since scene models are usually developed independently, some hidden surfaces inevitably exist when scene models are reused and combined. For example, these hidden surfaces may be hidden or occluded in other scene models when the scene model is displayed. Due to the large number of scene models, the number of such hidden surfaces is also large, which wastes resources and affects performance when rendering scene models. Manually screening and processing these hidden surfaces is inefficient and costly. Summary of the Invention

[0005] This application provides a scene model processing method, apparatus, electronic device, and storage medium, which can improve the screening efficiency of invalid patches in the scene model and facilitate the optimization of the scene model.

[0006] In a first aspect, embodiments of this application provide a scene model processing method, including:

[0007] Obtain a scene mesh model, which is obtained by combining at least two scene object mesh models;

[0008] The target virtual object mesh model for filtering patches is determined from the scene object mesh model, and the geometric space occupied by the target virtual object mesh model in the scene mesh model is determined according to the outline of the target virtual object mesh model.

[0009] For any scene object mesh model other than the target virtual object mesh model in the scene mesh model, determine the target patch contained in the geometric space in the scene object mesh model.

[0010] The target facet in the scene mesh model is deleted to obtain the updated scene mesh model.

[0011] Secondly, embodiments of this application also provide a scene model processing apparatus, including:

[0012] An acquisition module is used to acquire a scene mesh model, wherein the scene mesh model is obtained by combining at least two scene object mesh models;

[0013] The space determination module is used to determine the target virtual object mesh model for filtering patches from the scene object mesh model, and to determine the geometric space occupied by the target virtual object mesh model in the scene mesh model according to the outline of the target virtual object mesh model;

[0014] The patch determination module is used to determine, for any scene object mesh model other than the target virtual object mesh model in the scene mesh model, the target patch contained in the geometric space of the scene object mesh model.

[0015] The deletion module is used to delete the target facet in the scene mesh model to obtain an updated scene mesh model.

[0016] Thirdly, embodiments of this application also provide an electronic device, including a memory storing multiple instructions; the processor loads instructions from the memory to execute any of the scene model processing methods provided in embodiments of this application.

[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute any of the scene model processing methods provided in embodiments of this application.

[0018] In this embodiment, by determining the target virtual object mesh model for filtering faces and the geometric space occupied by the target virtual object mesh model, once faces of other scene object mesh models contained in this geometric space are identified, the filtering of target faces to be deleted is achieved, improving the efficiency of filtering invalid faces in the scene mesh model. By deleting the target face from the scene mesh model, the scene mesh model is optimized, reducing the number of faces required to be rendered during scene mesh model rendering. It also avoids rendering invalid faces, preventing resource waste and improving performance. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic flowchart of one embodiment of the scene model processing method provided in this application.

[0021] Figure 2 This is a schematic diagram of the interface of the scene mesh model provided in the embodiments of this application;

[0022] Figure 3 This is a graphical schematic diagram of the closed model provided in the embodiments of this application;

[0023] Figure 4 This is a schematic diagram of the operation interface for the scene model processing method provided in the embodiments of this application;

[0024] Figure 5 This is a schematic diagram illustrating the effect of scene model processing provided in the embodiments of this application;

[0025] Figure 6 This is a schematic diagram of the scene model processing device provided in the embodiments of this application;

[0026] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the described features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0028] This application provides a scene model processing method, apparatus, electronic device, and storage medium.

[0029] Specifically, this embodiment will be described from the perspective of a scene model processing device, which can be integrated into an electronic device. That is, the scene model processing method of this application embodiment can be executed by an electronic device, which can be a terminal device. The terminal device can be a tablet computer, a laptop computer, a touch screen, or a personal computer (PC), etc.

[0030] In some embodiments, the scene model processing device can also be integrated into the terminal and server cluster to realize cloud gaming; wherein, the terminal can transmit the received operation to the server, and the server updates the game interface based on the received operation, and then receives the updated interface information transmitted by the server to update the game interface.

[0031] For example, the scene model processing method provided in this application embodiment can be applied to a scene model processing system. This system can include a terminal and a server. The terminal can be a device that includes both receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication over a bidirectional communication link. Specifically, the terminal can be a terminal device used to run a game application, such as a mobile phone, tablet computer, or laptop computer. The terminal and server can communicate bidirectionally via a network. The server can store data required for game operation, such as scene model resources. The terminal obtains game data required for game operation from the server via the network to display the game interface of the target game and interact with the player, such as the terminal obtaining a game scene model and displaying the game scene interface on the terminal interface. The server can be a standalone server or a server network or server cluster, including but not limited to computers, network hosts, single network servers, multiple network server sets, or cloud servers composed of multiple servers. The cloud server consists of a large number of computers or network servers based on cloud computing.

[0032] The following detailed description is provided in conjunction with the accompanying drawings. This embodiment uses a terminal device equipped with a scene mesh model as the execution subject, and the scene model processing method provided in this embodiment is executed by the processor of the terminal device. For simplicity, this execution subject will be omitted in the following text. It should be noted that the order of description in the following embodiments is not intended to limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the accompanying drawings.

[0033] Please refer to Figure 1 The specific process of this scene model processing method can be summarized in steps 101 to 104, where:

[0034] 101. Obtain the scene mesh model, which is obtained by combining at least two scene object mesh models.

[0035] It should be noted that the scene mesh model is a model with size, shape, and representation of 3D objects. This scene mesh model represents the overall outline of the entire scene. Correspondingly, the scene object mesh model is a component of the scene mesh model. Typically, the scene object mesh model is a small, independently developed mesh model. For example, please refer to [link to relevant documentation]. Figure 2 , Figure 2 This is a schematic diagram of the interface of the scene mesh model provided in the embodiment of this application, which shows the scene mesh model representing the overall outline of the scene and multiple scene object mesh models that combine the scene mesh model.

[0036] It is understood that, in the embodiments of this application, the scene mesh model can be obtained from the server. For example, a scene mesh model acquisition instruction can be sent to the server, and the scene mesh model can be obtained by receiving the server's feedback on the instruction.

[0037] Accordingly, in the embodiments of this application, the scene mesh model can also be obtained from scene object mesh models from other devices and combined to obtain the scene mesh model. For example, the scene object mesh model sent by other terminal devices can be received, and then the scene object mesh model can be imported into the current terminal. By adjusting the position, size, etc., the scene mesh model can be combined to obtain the scene mesh model.

[0038] Because scene mesh models involve large amounts of data, they are typically derived from a combination of multiple scene object mesh models. This means that multiple scene object mesh models can be developed independently to accelerate development. For example, multiple developers can be assigned to develop scene object mesh models separately, and then these individual scene object mesh models can be combined to generate the overall scene mesh model.

[0039] Similarly, in order to improve the development efficiency of scene mesh models, related technologies also speed up the development process by reusing existing mesh models. For example, mesh models from other games can be copied into the current scene model and combined to obtain the scene mesh model.

[0040] However, since scene object mesh models are either independently developed or reused from other games, overlap and occlusion inevitably occur during the combination of scene object mesh models. Consequently, some faces in the scene mesh model will not be displayed in the scene interface. In order to filter out these invalid faces, in this embodiment of the application, the combined scene mesh model is obtained to identify and filter out invalid faces, thereby facilitating the optimization of the scene mesh model by deleting these invalid faces.

[0041] 102. Determine the target virtual object mesh model for filtering patches from the scene object mesh model, and determine the geometric space occupied by the target virtual object mesh model in the scene mesh model according to the outline of the target virtual object mesh model.

[0042] It is understandable that occlusion or hiding may exist between two scene object mesh models in a scene mesh model. Therefore, in this embodiment, any scene object mesh model can be selected as the target virtual object mesh model. Then, the target patch to be deleted is determined by comparing other scene object mesh models with the target virtual object mesh model. For example, in this embodiment, each scene object mesh model can be traversed, and the traversed scene object mesh model can be used as the target virtual object mesh model. Correspondingly, the untraversed scene object mesh models are compared with the target virtual object mesh model.

[0043] It is understood that in the embodiments of this application, geometric space refers to the space occupied by the outline of the target virtual object mesh model. Occlusion and hiding usually occur when a face is in the space occupied by other scene object mesh models. Therefore, in the embodiments of this application, the geometric space of the target virtual object mesh model can be determined, and the occluded or hidden faces in other scene object mesh models in that geometric space can be filtered out.

[0044] 103. For any scene object mesh model other than the target virtual object mesh model in the scene mesh model, determine the target patch contained in the geometric space in the any scene object mesh model.

[0045] Accordingly, since there may be occlusions and hidden faces between the two scene object mesh models, in this embodiment of the application, after selecting the target virtual object mesh model, it is necessary to compare each of the other scene object mesh models in the scene mesh model, except for the target virtual object mesh model, with the geometric space corresponding to the target scene virtual object mesh model to determine whether there are faces contained in the geometric space.

[0046] Accordingly, in this embodiment, the target patch is a patch contained in the geometric space of the target virtual object mesh model by other scene object mesh models. Since the patch is located in the geometric space of other mesh models, it is not displayed in the scene interface when the interface is displayed. Therefore, the patch is an invalid patch when the scene mesh model constructs the scene screen.

[0047] 104. Delete the target facet in the scene mesh model to obtain the updated scene mesh model.

[0048] It is understandable that, since the target facet is the facet that needs to be deleted to optimize the scene mesh model, once the target facet to be deleted is determined, it can be deleted from the scene mesh model to obtain the optimized and updated scene mesh model.

[0049] It is understood that, in this embodiment of the application, by determining the target virtual object mesh model for filtering faces and determining the geometric space occupied by the target virtual object mesh model, once faces of other scene object mesh models contained in this geometric space are determined, the filtering of target faces to be deleted is achieved, thereby improving the efficiency of filtering invalid faces in the scene mesh model. By deleting the target face from the scene mesh model, the scene mesh model is optimized, reducing the number of faces required to be rendered during scene mesh model rendering, while also avoiding rendering of invalid faces, avoiding resource waste, and improving performance.

[0050] Optionally, a face has multiple vertices. Therefore, whether a face is in geometric space can be determined by whether the vertices are in geometric space. Thus, in this embodiment, a face whose vertices are all in geometric space can be used as a target face. That is, optionally, in some embodiments of this application, the step "determining that any scene object mesh model contains a target face in the geometric space" includes:

[0051] Based on the geometric space, candidate faces of vertices in the mesh model of any scene object are determined, and candidate faces of the corresponding particles of the vertices that are also in the geometric space are taken as target faces.

[0052] To ensure the accuracy of determining whether a face is in geometric space, this embodiment further improves the accuracy of the determination by checking whether the mass corresponding to the vertex is in geometric space. That is, a face where both the vertex and its corresponding mass are in geometric space is considered the target face.

[0053] In this embodiment, the methods for determining whether a vertex and a mass are in geometric space are the same. Therefore, in this embodiment, the method for determining whether a vertex is in geometric space is used as an example for explanation, while the method for determining whether a mass is in geometric space can be understood by referring to the method for determining whether a vertex is in geometric space.

[0054] Optionally, in this embodiment of the application, the scene object mesh model may include a terrain resource mesh model and a ground resource mesh model above the terrain. The terrain resource mesh model corresponds to the terrain in the scene interface, such as the mesh model corresponding to mountains, plains, etc. The ground resource mesh model is a mesh model located above the terrain resource mesh model, such as the mesh model corresponding to plants, buildings, etc.

[0055] For the terrain resource grid model, the main focus is on identifying whether there are any patches located below the terrain resource grid model. Therefore, a geometric space can be constructed in the space below the terrain resource grid model to determine whether there are any patches located below the terrain resource grid model. For the above-ground resource grid model, the main focus is on determining whether there are any overlapping patches. Therefore, in this embodiment, corresponding geometric spaces can be constructed for the terrain resource grid model and the above-ground resource grid model respectively, and then the target patches to be deleted can be identified.

[0056] For example, taking the target virtual object mesh model as a ground resource mesh model, correspondingly, any other scene object mesh model can be a ground resource mesh model or a terrain resource mesh model. Specifically, the determination of whether something is included in the geometric space of the ground resource mesh model can be made by the angle between the line connecting the vertices of the face in the two mesh models and the normal vector corresponding to the face. That is, optionally, in some embodiments of this application, the step "the target virtual object mesh model is a ground resource mesh model, and the step of determining the candidate face in the geometric space where the vertices of any scene object mesh model are located" includes:

[0057] The surface of the above-ground resource grid model is used as the reference surface, and the surface of any scene object grid model is used as the surface to be processed.

[0058] For each facet to be processed, calculate the angle between the line connecting the vertex of the facet to be processed and the vertex of each reference facet, and the normal vector of the corresponding reference facet.

[0059] If the included angles corresponding to the reference facets are all within the preset angle range, then the reference facets are used as facets to be counted.

[0060] The number of unprocessed face pieces corresponding to each unprocessed face piece is counted. If the number exceeds a preset threshold, the unprocessed face piece is considered a candidate face piece.

[0061] It is understandable that if the angle between the line connecting the vertices of the face to be processed and the normal vector of the reference face is within a preset angle range, then the vertex is considered to be in the geometric space. If all the vertices of the face are in the geometric space, then the face is considered to be a candidate face.

[0062] Optionally, in this embodiment, the preset angle range is set to 0-90 degrees. Correspondingly, the preset angle range can be narrowed or increased according to actual needs to improve the accuracy of candidate patch recognition.

[0063] Accordingly, in this embodiment of the application, the accuracy of candidate patch recognition can be improved by configuring a preset number threshold.

[0064] Optionally, in this embodiment of the application, for the above-ground resource grid model, the geometric space of the above-ground resource grid model can be defined by the model geometry modifier. For example, the above-ground resource grid model can be defined as a geometric space using a model geometry modifier in 3ds Max, where the geometric space can be a spherical space, a grid space, etc.

[0065] Accordingly, the following explanation uses the terrain resource grid model as the target virtual object grid model as an example. Similarly, any scene object grid model other than the target virtual object grid model in the scene grid model can be a ground resource grid model. Specifically, since the facets below the terrain resource grid model after the grid models are combined are not visible in the scene interface (i.e., facets occluded by the terrain resource grid model), a geometric space can be constructed in the space below the terrain resource grid model. The facets located in this geometric space can then be used as target facets. Optionally, in some embodiments of this application, the step "determining the geometric space occupied by the target virtual object grid model in the scene grid model based on the outline of the target virtual object grid model" includes:

[0066] Using the surface containing the outline of the terrain resource grid model as the top surface, a closed space is generated at the bottom of the terrain resource grid model;

[0067] The enclosed space is taken as the geometric space.

[0068] In this embodiment, since the facets located in the geometric space of the target virtual object mesh model are taken as facets to be deleted, and in fact the facets below the terrain resource mesh model are taken as facets to be deleted, a geometric space can be constructed below the terrain resource mesh model for the terrain resource mesh model, and then the facets located below the terrain resource mesh model can be deleted through the geometric space.

[0069] It is understandable that using the terrain resource mesh model as the top surface of the enclosed space ensures that the geometric space can encompass all faces located below the terrain resource mesh model, ensuring that all invalid faces are deleted during rendering. Accordingly, in this embodiment, the depth of the geometric space relative to the top surface of the terrain resource mesh model should be sufficiently deep to ensure a complete and comprehensive wrapping of faces in the ground resource mesh model that extend below the terrain resource mesh model.

[0070] Optionally, when constructing a closed space using the surface containing the outline of the terrain resource grid model as the top surface, it can be obtained by translating the edge of the terrain resource grid model downwards. For example, multiple vertices on the edge of the terrain resource grid model can be translated downwards to form the side surface of the geometric space, thereby generating the bottom surface relative to the side surface, and then enclosing the closed space. That is, optionally, in some embodiments of this application, the step "using the surface containing the outline of the terrain resource grid model as the top surface, generating a closed space at the bottom of the terrain resource grid model" includes:

[0071] Control at least two vertices on the edge of the terrain resource grid model to translate downwards, generating the side surface of the closed space corresponding to the terrain resource grid model;

[0072] The vertices on the bottom edge of the side surface are aggregated to generate the bottom surface of the closed space corresponding to the terrain resource grid model;

[0073] The top surface is the surface containing the outline of the terrain resource grid model, and a closed space is generated by enclosing the top surface, the side surface, and the bottom surface.

[0074] For example, please see Figure 3 As shown, Figure 3 This is a graphical schematic diagram of a closed model provided in an embodiment of this application. The closed model is obtained by enclosing the top surface, side surface and bottom surface, and the space contained in the closed model is the closed space.

[0075] Optionally, in this embodiment, the length of the side surface is flexibly selected based on the depth of the above-ground resource grid model, thereby obtaining a closed model or closed space that meets the depth requirements.

[0076] Optionally, in this embodiment, the aggregation of vertices on the bottom edge of the side surface can be a horizontal aggregation based on a horizontal plane, or a diagonal aggregation by selecting the midpoint downwards.

[0077] Optionally, in this embodiment, Boolean operations can be used to delete target patches in geometric space. Specifically, in this embodiment, Boolean operations are used to delete target patches when the target virtual object mesh model is a terrain resource mesh model. That is, the step "deleting the target patches in the scene mesh model to obtain an updated scene mesh model" includes:

[0078] Perform a Boolean subtraction operation on the geometric space and the mesh model of any scene object to delete both the geometric space and the target patch from the scene mesh model, thereby obtaining a local scene mesh model. The local scene mesh model includes the newly generated bottom surface of the mesh model of any scene object after the Boolean subtraction operation.

[0079] The newly formed bottom surface is deleted from the local scene mesh model to obtain the transition scene mesh model;

[0080] The terrain resource grid model is recombined into the transition scene grid model to obtain the updated scene grid model.

[0081] It is understood that, in the embodiments of this application, the Boolean subtraction operation between the geometric space and the scene object mesh model is actually a Boolean subtraction operation between the closed model corresponding to the geometric space and the scene object mesh model. This Boolean subtraction operation is used to delete both the closed model corresponding to the geometric space and the scene object mesh model.

[0082] Understandably, Boolean subtraction operations are used to quickly delete patches below the terrain resource grid model.

[0083] Accordingly, based on the characteristics of Boolean subtraction, in this embodiment, the newly created bottom face of the scene object mesh model after the Boolean subtraction operation is also deleted. Consequently, the result is a mesh model that only contains the terrain resource mesh model and the mesh model above the terrain resource mesh model (including the complete scene object mesh model and the scene object mesh model after subtraction).

[0084] Accordingly, since the terrain resource grid model is the top surface of a closed model, in order to obtain a new scene grid model that includes the terrain resource grid model, the terrain resource grid model is recombined into the transition scene grid model to obtain the updated scene grid model.

[0085] Optionally, in this embodiment, the newly formed bottom surface can be removed from the local scene mesh model based on its material to obtain a transitional scene mesh model. For example, when performing a Boolean subtraction operation, the material of the newly formed bottom surface can be set to be different from the material of the corresponding scene object mesh model, and then the newly formed bottom surface can be removed from the local scene mesh model based on the difference in material.

[0086] It is understood that, in this embodiment of the application, by determining the target virtual object mesh model for filtering faces and determining the geometric space occupied by the target virtual object mesh model, once faces of other scene object mesh models contained in this geometric space are determined, the filtering of target faces to be deleted is achieved, thus improving the efficiency of filtering invalid faces in the scene mesh model. By deleting the target face in the scene mesh model, the scene mesh model is optimized, reducing the number of faces required to be rendered during scene mesh model rendering, while also avoiding rendering of invalid faces, avoiding resource waste, and improving performance. By deleting faces below the terrain resource mesh model, by constructing a geometric space below the terrain resource mesh model, and using this geometric space through Boolean subtraction operations, the invalid faces below the terrain resource mesh model are quickly deleted.

[0087] Accordingly, in this embodiment, the method for deleting invalid faces in the combined scene mesh model can be integrated into a corresponding application. By providing a visual interface, invalid faces can be deleted from the combined scene mesh model through button selection. For example, please refer to... Figure 4 , Figure 4 This is a schematic diagram of the operation interface for the scene model processing method provided in this application embodiment. The schematic diagram shows a selection control A and a deletion control B, where the selection and deletion controls are respectively for two types of face reduction processing. Specifically:

[0088] For the first scenario, namely deleting faces below the terrain resource grid model, select control A1 as "Select terrain first, then select model," meaning first select the terrain resource grid model, then select the above-ground resource grid model. Delete control B1 includes "Delete faces below the terrain." Accordingly, the user selects the terrain resource grid model using control A1, then selects the above-ground resource grid model, and subsequently uses delete control B1 to delete the faces below the terrain resource grid model within the above-ground resource grid model. The specific process of this deletion operation includes:

[0089] 1) Topographic surface closure treatment;

[0090] Terrain resource mesh models are typically non-closed groups of faces containing height information. To reduce the number of faces, they need to be processed into a closed state first. Specifically, this involves selecting multiple vertices on the edge of the terrain mesh (in 3ds Max, you can select four vertices on the edge), shifting them downwards a certain distance, and finally merging these multiple vertices into a single vertex using a merge operation. Figure 3 As shown, the terrain thus becomes a closed state, resulting in a closed model;

[0091] 2) Use the procutter modifier to reduce the number of faces;

[0092] The procutter modifier is a modifier provided by 3ds Max for manipulating resource mesh models. It allows performing specific Boolean operations between two resource mesh models, primarily used for splitting or subdividing resource mesh models. The specific processing steps are as follows:

[0093] First, a 3ds Max procutter modifier is created for the terrain resource mesh model via a script. This means treating the terrain mesh model as a clipping space (corresponding to a closed model) and initializing it using the addMethod and stockOutsideCutter methods of the Move type.

[0094] The `addMethod` of type `Move` means that the clipping object (ground resource mesh model) selected by this clipping space will become part of the Boolean operation and will no longer be a separate operable geometry object.

[0095] The stockOutsideCutter method represents a Boolean subtraction operation between the clipping space and the clipping object, meaning that the two model meshes will perform a Boolean subtraction operation.

[0096] Secondly, the created procuttermodifier is used to perform the addStock operation, which operates on the ground resource mesh model. This means that the terrain mesh will be used as the clipping space, and the ground resource mesh model will be selected as the clipping object within this clipping space, while retaining the original material. This will result in a closed model (local scene mesh model) clipped along the terrain surface.

[0097] 3) Hollow out the bottom facets of the local scene mesh model generated in step 2);

[0098] In step 2), the material of the generated bottom facet is assigned to the material of the terrain resource mesh model. Therefore, the script filters out the facets with the terrain resource mesh model material from the local scene mesh model and deletes them, thereby achieving facet reduction optimization.

[0099] For the second type, namely the deletion of overlapping faces between aboveground resource grid models, select control A2 as "Please select models to be reduced and merged," indicating the selection of two models to be reduced and merged. Deletion control B2 includes "Delete overlapping faces between models." Accordingly, the user selects two models to be reduced and merged using control A2, and then executes the deletion operation on the faces between the aboveground resource grid models using deletion control B2. The specific process of this deletion operation includes:

[0100] 1) Traverse each aboveground resource grid model and calculate the hidden face patches in pairs through permutation and combination;

[0101] 2) The calculation of the interleaved hidden facets between every two ground resource grid models uses the vol.selectmodifier method:

[0102] `vol.select moditier` is a model geometry modifier in 3ds Max. It allows you to define a ground resource mesh model as a geometric space (spherical space, mesh space, etc.) and perform spatial calculations using the defined geometry space with another resource mesh model (including ground resource mesh models and terrain resource mesh models). It selects model mesh sub-objects represented by vertices or faces (model sub-objects can be simply understood as subsets of the model mesh). Specifically:

[0103] First, a `vol.select` modifier is created in a ground-based resource grid model, initialized to use patches to represent spatially computed model sub-objects (i.e., model subsets) and stacked for passing to the `vol.select` modifier of another resource grid model. Here, the selection of model sub-objects is completely independent of the geometry of the original ground-based resource grid model;

[0104] Secondly, the `vol.select` modifier is used to filter the mesh of one resource mesh model, and the other resource mesh model object is used as the computation object. This calculates the faces of one resource mesh model that are completely contained within the geometric space of the other resource mesh model, and caches these faces. The specific calculation principle is as follows (taking the determination of whether a vertex is completely contained within the geometric space of a certain resource mesh model as an example):

[0105] 1. For each triangular facet of the resource grid model (target virtual object grid model) that serves as the filtering space (geometric space), calculate its normal vector;

[0106] 2. For the vertex to be judged (the vertex of a triangle facet in any scene object mesh model), calculate the angle between the line connecting it to each vertex of each triangle facet (the triangle facet in the target virtual object mesh model) and the normal vector of each triangle facet (the triangle facet in the target virtual object mesh model);

[0107] 3. If the angle between the vertex and the normal vector of a certain triangle (a triangle facet in the target virtual object mesh model) is between 0 and 90 degrees, then record the number of triangle facests in the target virtual object mesh model that meet this angle. If there are multiple triangle facests, then the vertex is located in the geometric space of the target virtual object mesh model.

[0108] 4. For any triangular facet of any scene object mesh model, if its three vertices are all located within the geometric space of the target virtual object mesh model, and its mass point is also located within the geometric space of the target virtual object mesh model, then the triangular facet is completely located within the geometric space of the target virtual object mesh model.

[0109] 5. Cache the triangle patches selected in step 4 and delete them. Group the remaining models and center the anchor points of the models using center pivot to obtain an updated scene mesh model that has been batch optimized.

[0110] For example, please see Figure 5 , Figure 5 This is a schematic diagram illustrating the effect of scene model processing provided in the embodiments of this application, wherein, Figure 5 The leftmost graphic a shows the overlapping parts of the scene mesh model, the middle graphic b shows the scene mesh model and its corresponding sub-models, and the rightmost graphic c shows the updated scene mesh model and its corresponding sub-models. In the rightmost graphic c, the black parts are the deleted faces.

[0111] It is understood that the embodiments of this application provide a visual operation interface to facilitate users in selecting models for face reduction processing. By deleting occluded or hidden faces during model combination, the number of facets of the model is reduced, thereby reducing the resource consumption during rendering of the combined model.

[0112] This embodiment also provides a scene model processing device, which can be integrated into an electronic device, such as a computer device, which can be a terminal, server or other device.

[0113] For example, in this embodiment, the method of this application embodiment will be described in detail using a specific integrated terminal of the scene model processing device as an example.

[0114] For example, such as Figure 6 As shown, the scene model processing device may include:

[0115] The acquisition module 1001 is used to acquire a scene mesh model, wherein the scene mesh model is obtained by combining at least two scene object mesh models;

[0116] The space determination module 1002 is used to determine the target virtual object mesh model for screening patches from the scene object mesh model, and to determine the geometric space occupied by the target virtual object mesh model in the scene mesh model according to the outline of the target virtual object mesh model.

[0117] The patch determination module 1003 is used to determine, for any scene object mesh model other than the target virtual object mesh model in the scene mesh model, the target patch contained in the geometric space of the scene object mesh model.

[0118] The deletion module 1004 is used to delete the target facet in the scene mesh model to obtain an updated scene mesh model.

[0119] In one example, the patch determination module 1003 includes:

[0120] The patch determination unit includes: determining, based on the geometric space, candidate patches in the mesh model of any scene object whose vertices are located in the geometric space, and taking the candidate patches whose corresponding particles are also located in the geometric space as target patches.

[0121] In one example, the target virtual object mesh model is a ground resource mesh model, and the patch determination element includes:

[0122] The first determining subunit is used to take the surface of the above-ground resource grid model as a reference surface and the surface of any scene object grid model as a surface to be processed.

[0123] The calculation subunit is used to calculate, for each facet to be processed, the angle between the line connecting the vertex of the facet to be processed and the vertex of each reference facet, and the normal vector of the corresponding reference facet.

[0124] The second determining subunit is used to take the reference surface as the surface to be counted if the included angles corresponding to the reference surface are all within the preset angle range.

[0125] The third determining subunit is used to count the number of face pieces to be counted corresponding to each face piece to be processed. If the number exceeds a preset number threshold, the face piece to be processed is taken as a candidate face piece.

[0126] In one example, the target virtual object mesh model is a terrain resource mesh model, and the spatial determination module 1002 includes:

[0127] A generation unit is used to generate a closed space at the bottom of the terrain resource grid model, with the surface containing the outline of the terrain resource grid model as the top surface.

[0128] A spatial determination unit is used to define the enclosed space as a geometric space.

[0129] In one example, the generating unit includes:

[0130] A control subunit is used to control at least two vertices on the edge of the terrain resource grid model to translate downwards, thereby generating the side surface of the closed space corresponding to the terrain resource grid model.

[0131] Aggregation sub-units are used to aggregate the vertices on the bottom edge of the side surface to generate the bottom surface of the closed space corresponding to the terrain resource grid model;

[0132] A sub-unit is generated, which is used to create a closed space by taking the surface where the outline of the terrain resource grid model is located as the top surface and enclosing it according to the top surface, the side surface and the bottom surface.

[0133] In one example, deleting module 1004 includes:

[0134] A Boolean operation unit is used to perform a Boolean subtraction operation on the geometric space and the mesh model of any scene object, deleting both the geometric space and the target face from the scene mesh model to obtain a local scene mesh model, which includes the newly generated bottom face of the mesh model of any scene object after the Boolean subtraction operation.

[0135] The deletion unit is used to delete the newly formed bottom surface from the local scene mesh model to obtain the transition scene mesh model;

[0136] The combination unit is used to recombine the terrain resource grid model into the transition scene grid model to obtain an updated scene grid model.

[0137] In one example, the module to be deleted also includes:

[0138] The assignment unit is used to assign the material of the newly generated bottom surface as the target material, wherein the target material is different from the material of the mesh model of any scene object;

[0139] The deletion unit includes:

[0140] Delete the faces belonging to the target material to obtain the transition scene mesh model.

[0141] Using the apparatus in this embodiment, by determining the target virtual object mesh model for filtering faces and determining the geometric space occupied by the target virtual object mesh model, once faces of other scene object mesh models contained in this geometric space are determined, the filtering of target faces to be deleted is achieved, improving the efficiency of filtering invalid faces in the scene mesh model. By deleting the target face from the scene mesh model, the scene mesh model is optimized, reducing the number of faces required to be rendered during scene mesh model rendering, while also avoiding rendering of invalid faces, avoiding resource waste, and improving performance.

[0142] Accordingly, embodiments of this application also provide an electronic device, which can be a terminal, such as a tablet computer, laptop computer, touch screen, game console, personal computer (PC), etc. Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 1100 includes a processor 1101 with one or more processing cores, a memory 1102 with one or more computer-readable storage media, and a computer program stored on the memory 1102 and executable on the processor. The processor 1101 and the memory 1102 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0143] The processor 1101 is the control center of the electronic device 1100. It connects various parts of the electronic device 1100 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 1102, and by calling data stored in the memory 1102, it executes various functions of the electronic device 1100 and processes data. The processor 1101 may be a CPU, GPU, network processor (NP), etc., and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0144] In this embodiment, the processor 1101 in the electronic device 1100 loads the instructions corresponding to the processes of one or more applications into the memory 1102 according to the following steps, and the processor 1101 runs the applications stored in the memory 1102 to realize various functions, such as:

[0145] Obtain a scene mesh model, which is obtained by combining at least two scene object mesh models;

[0146] The target virtual object mesh model for filtering patches is determined from the scene object mesh model, and the geometric space occupied by the target virtual object mesh model in the scene mesh model is determined according to the outline of the target virtual object mesh model.

[0147] For any scene object mesh model other than the target virtual object mesh model in the scene mesh model, determine the target patch contained in the geometric space in the scene object mesh model.

[0148] The target facet in the scene mesh model is deleted to obtain the updated scene mesh model.

[0149] In one example, the step "determining the target patch contained in the geometry space of any scene object mesh model" includes:

[0150] Based on the geometric space, candidate faces of vertices in the mesh model of any scene object are determined, and candidate faces of the corresponding particles of the vertices that are also in the geometric space are taken as target faces.

[0151] In one example, the target virtual object mesh model is a ground resource mesh model, and the step "determining candidate faces in the geometric space where vertices of any scene object mesh model are located" includes:

[0152] The surface of the above-ground resource grid model is used as the reference surface, and the surface of any scene object grid model is used as the surface to be processed.

[0153] For each facet to be processed, calculate the angle between the line connecting the vertex of the facet to be processed and the vertex of each reference facet, and the normal vector of the corresponding reference facet.

[0154] If the included angles corresponding to the reference facets are all within the preset angle range, then the reference facets are used as facets to be counted.

[0155] The number of unprocessed face pieces corresponding to each unprocessed face piece is counted. If the number exceeds a preset threshold, the unprocessed face piece is considered a candidate face piece.

[0156] In one example, the target virtual object mesh model is a terrain resource mesh model. The step "determining the geometric space occupied by the target virtual object mesh model in the scene mesh model based on the outline of the target virtual object mesh model" includes:

[0157] Using the surface containing the outline of the terrain resource grid model as the top surface, a closed space is generated at the bottom of the terrain resource grid model;

[0158] The enclosed space is taken as the geometric space.

[0159] In one example, the step "using the face containing the outline of the terrain resource grid model as the top face, generate a closed space at the bottom of the terrain resource grid model" includes:

[0160] Control at least two vertices on the edge of the terrain resource grid model to translate downwards, generating the side surface of the closed space corresponding to the terrain resource grid model;

[0161] The vertices on the bottom edge of the side surface are aggregated to generate the bottom surface of the closed space corresponding to the terrain resource grid model;

[0162] The top surface is the surface containing the outline of the terrain resource grid model, and a closed space is generated by enclosing the top surface, the side surface, and the bottom surface.

[0163] In one example, the step "delete the target patch from the scene mesh model to obtain an updated scene mesh model" includes:

[0164] Perform a Boolean subtraction operation on the geometric space and the mesh model of any scene object to delete both the geometric space and the target patch from the scene mesh model, thereby obtaining a local scene mesh model. The local scene mesh model includes the newly generated bottom surface of the mesh model of any scene object after the Boolean subtraction operation.

[0165] The newly formed bottom surface is deleted from the local scene mesh model to obtain the transition scene mesh model;

[0166] The terrain resource grid model is recombined into the transition scene grid model to obtain the updated scene grid model.

[0167] In one example, before the step "removing the newly formed bottom surface from the local scene mesh model to obtain the transition scene mesh model", the method further includes:

[0168] The material of the newly formed bottom surface is assigned as the target material, wherein the target material is different from the material of any scene object mesh model;

[0169] The step "deleting the newly formed bottom surface from the local scene mesh model to obtain the transition scene mesh model" includes:

[0170] Delete the faces belonging to the target material to obtain the transition scene mesh model.

[0171] Therefore, the electronic device provided in this embodiment can achieve the following technical effects: by determining the target virtual object mesh model for filtering faces and determining the geometric space occupied by the target virtual object mesh model, once faces of other scene object mesh models contained in this geometric space are determined, the filtering of target faces to be deleted is realized, improving the filtering efficiency of invalid faces in the scene mesh model. By deleting the target face in the scene mesh model, the scene mesh model is optimized, reducing the number of faces required to be rendered when rendering the scene mesh model, while also avoiding rendering of invalid faces, avoiding resource waste, and improving performance.

[0172] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0173] Optional, such as Figure 7 As shown, the electronic device 1100 also includes: a touch display screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch display screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107. Those skilled in the art will understand that... Figure 7 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0174] The touch display screen 1103 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 1103 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1101. It can also receive and execute commands from the processor 1101. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 1101 to determine the type of touch event. Subsequently, the processor 1101 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 1103 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 1103 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 1103 can also be used as part of the input unit 1106 to achieve input functions.

[0175] The radio frequency circuit 1104 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.

[0176] Audio circuit 1105 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuit 1105 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 1105, converted back into audio data, and then processed by processor 1101 before being transmitted via radio frequency circuit 1104 to, for example, another electronic device, or output to memory 1102 for further processing. Audio circuit 1105 may also include an earphone jack to provide communication between peripheral headphones and electronic devices.

[0177] The input unit 1106 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0178] Power supply 1107 is used to supply power to various components of electronic device 1100. Optionally, power supply 1107 can be logically connected to processor 1101 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 1107 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0179] although Figure 7 As not shown in the diagram, the electronic device 1100 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0180] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0181] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0182] To this end, embodiments of this application provide a storage medium, which includes a computer-readable storage medium storing a plurality of computer programs. These computer programs can be loaded by a processor to execute any of the scene model processing methods provided in embodiments of this application. For example, the computer program can execute the steps of the following scene model processing method:

[0183] Obtain a scene mesh model, which is obtained by combining at least two scene object mesh models;

[0184] The target virtual object mesh model for filtering patches is determined from the scene object mesh model, and the geometric space occupied by the target virtual object mesh model in the scene mesh model is determined according to the outline of the target virtual object mesh model.

[0185] For any scene object mesh model other than the target virtual object mesh model in the scene mesh model, determine the target patch contained in the geometric space in the scene object mesh model.

[0186] The target facet in the scene mesh model is deleted to obtain the updated scene mesh model.

[0187] In one example, the step "determining the target patch contained in the geometry space of any scene object mesh model" includes:

[0188] Based on the geometric space, candidate faces of vertices in the mesh model of any scene object are determined, and candidate faces of the corresponding particles of the vertices that are also in the geometric space are taken as target faces.

[0189] In one example, the target virtual object mesh model is a ground resource mesh model, and the step "determining candidate faces in the geometric space where vertices of any scene object mesh model are located" includes:

[0190] The surface of the above-ground resource grid model is used as the reference surface, and the surface of any scene object grid model is used as the surface to be processed.

[0191] For each facet to be processed, calculate the angle between the line connecting the vertex of the facet to be processed and the vertex of each reference facet, and the normal vector of the corresponding reference facet.

[0192] If the included angles corresponding to the reference facets are all within the preset angle range, then the reference facets are used as facets to be counted.

[0193] The number of unprocessed face pieces corresponding to each unprocessed face piece is counted. If the number exceeds a preset threshold, the unprocessed face piece is considered a candidate face piece.

[0194] In one example, the target virtual object mesh model is a terrain resource mesh model. The step "determining the geometric space occupied by the target virtual object mesh model in the scene mesh model based on the outline of the target virtual object mesh model" includes:

[0195] Using the surface containing the outline of the terrain resource grid model as the top surface, a closed space is generated at the bottom of the terrain resource grid model;

[0196] The enclosed space is taken as the geometric space.

[0197] In one example, the step "using the face containing the outline of the terrain resource grid model as the top face, generate a closed space at the bottom of the terrain resource grid model" includes:

[0198] Control at least two vertices on the edge of the terrain resource grid model to translate downwards, generating the side surface of the closed space corresponding to the terrain resource grid model;

[0199] The vertices on the bottom edge of the side surface are aggregated to generate the bottom surface of the closed space corresponding to the terrain resource grid model;

[0200] The top surface is the surface containing the outline of the terrain resource grid model, and a closed space is generated by enclosing the top surface, the side surface, and the bottom surface.

[0201] In one example, the step "delete the target patch from the scene mesh model to obtain an updated scene mesh model" includes:

[0202] Perform a Boolean subtraction operation on the geometric space and the mesh model of any scene object to delete both the geometric space and the target patch from the scene mesh model, thereby obtaining a local scene mesh model. The local scene mesh model includes the newly generated bottom surface of the mesh model of any scene object after the Boolean subtraction operation.

[0203] The newly formed bottom surface is deleted from the local scene mesh model to obtain the transition scene mesh model;

[0204] The terrain resource grid model is recombined into the transition scene grid model to obtain the updated scene grid model.

[0205] In one example, before the step "removing the newly formed bottom surface from the local scene mesh model to obtain the transition scene mesh model", the method further includes:

[0206] The material of the newly formed bottom surface is assigned as the target material, wherein the target material is different from the material of any scene object mesh model;

[0207] The step "deleting the newly formed bottom surface from the local scene mesh model to obtain the transition scene mesh model" includes:

[0208] Delete the faces belonging to the target material to obtain the transition scene mesh model.

[0209] As can be seen, the computer program can be loaded by the processor to execute any of the scene model processing methods provided in the embodiments of this application, thereby bringing the following technical effects: By determining the target virtual object mesh model for filtering faces and determining the geometric space occupied by the target virtual object mesh model, once faces of other scene object mesh models contained in the geometric space are determined, the filtering of target faces to be deleted is realized, improving the filtering efficiency of invalid faces in the scene mesh model. By deleting the target face in the scene mesh model, the scene mesh model is optimized, reducing the number of faces required to be rendered when rendering the scene mesh model, while also avoiding rendering of invalid faces, avoiding resource waste, and improving performance.

[0210] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0211] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0212] Since the computer program stored in the computer-readable storage medium can execute any of the scene model processing methods provided in the embodiments of this application, it can achieve the beneficial effects that any of the scene model processing methods provided in the embodiments of this application can achieve, as detailed in the preceding embodiments, and will not be repeated here.

[0213] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.

[0214] In the above embodiments of the scene model processing device, computer-readable storage medium, and electronic device, the descriptions of each embodiment have different focuses. For parts not described in detail in a particular embodiment, please refer to the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the scene model processing device, computer-readable storage medium, electronic device, and their corresponding units described above can be referred to the description of the scene model processing method in the above embodiments, and will not be repeated here.

[0215] The above provides a detailed description of a scene model processing method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A scene model processing method, characterized in that, The method includes: Obtain a scene mesh model, which is obtained by combining at least two scene object mesh models; The target virtual object mesh model for filtering patches is determined from the scene object mesh model, and the geometric space occupied by the target virtual object mesh model in the scene mesh model is determined according to the outline of the target virtual object mesh model. For any scene object mesh model other than the target virtual object mesh model in the scene mesh model, determine the target patch contained in the geometric space in the scene object mesh model. The target patch is deleted from the scene mesh model to obtain the updated scene mesh model; The target virtual object grid model includes a terrain resource grid model; Determining the geometric space occupied by the target virtual object mesh model in the scene mesh model based on the outline of the target virtual object mesh model includes: At least two vertices on the edge of the terrain resource mesh model are translated downwards to generate the side surface of the closed space corresponding to the terrain resource mesh model; the vertices on the bottom edge of the side surface are aggregated to generate the bottom surface of the closed space corresponding to the terrain resource mesh model; a closed space is generated by using the face where the outline of the terrain resource mesh model is located as the top surface, and enclosing the top surface where the outline of the terrain resource mesh model is located, the side surface of the closed space corresponding to the terrain resource mesh model, and the bottom surface of the closed space corresponding to the terrain resource mesh model; the closed space is used as the geometric space. The step of deleting the target patch from the scene mesh model to obtain the updated scene mesh model includes: Perform a Boolean subtraction operation on the geometric space and the mesh model of any scene object to delete both the geometric space and the target patch from the scene mesh model, resulting in a local scene mesh model. The local scene mesh model includes the newly generated bottom surface of the mesh model of any scene object after the Boolean subtraction operation. Delete the newly generated bottom surface from the local scene mesh model to obtain a transitional scene mesh model. Recombine the terrain resource mesh model into the transitional scene mesh model to obtain an updated scene mesh model.

2. The scene model processing method according to claim 1, characterized in that, Determining that any scene object mesh model contains a target patch in the geometric space includes: Based on the geometric space, candidate faces in the mesh model of any scene object whose vertices are located in the geometric space are determined, and candidate faces in the geometric space whose corresponding particles are also located in the geometric space are taken as target faces.

3. The scene model processing method according to claim 2, characterized in that, The target virtual object mesh model is a ground resource mesh model, and determining the candidate facets whose vertices in any scene object mesh model are located in the geometric space includes: The surface of the above-ground resource grid model is used as a reference surface, and the surface of any scene object grid model is used as the surface to be processed. For each facet to be processed, calculate the angle between the line connecting the vertex of the facet to be processed and the vertex of each reference facet, and the normal vector of the corresponding reference facet. If the included angles corresponding to the reference facets are all within the preset angle range, then the reference facets are used as facets to be counted. The number of unprocessed face pieces corresponding to each unprocessed face piece is counted. If the number exceeds a preset threshold, the unprocessed face piece is considered a candidate face piece.

4. The scene model processing method according to claim 1, characterized in that, Before deleting the newly formed bottom surface from the local scene mesh model to obtain the transition scene mesh model, the method further includes: The material of the newly formed bottom surface is assigned as the target material, wherein the target material is different from the material of any scene object mesh model; The step of deleting the newly formed bottom surface from the local scene mesh model to obtain the transition scene mesh model includes: Delete the faces belonging to the target material to obtain the transition scene mesh model.

5. A scene model processing device, characterized in that, The device includes: An acquisition module is used to acquire a scene mesh model, wherein the scene mesh model is obtained by combining at least two scene object mesh models; The space determination module is used to determine the target virtual object mesh model for filtering patches from the scene object mesh model, and to determine the geometric space occupied by the target virtual object mesh model in the scene mesh model according to the outline of the target virtual object mesh model; The patch determination module is used to determine, for any scene object mesh model other than the target virtual object mesh model in the scene mesh model, the target patch contained in the geometric space of the scene object mesh model. The deletion module is used to delete the target facet in the scene mesh model to obtain an updated scene mesh model. The target virtual object grid model includes a terrain resource grid model; The space determination module is further configured to control at least two vertices on the edge of the terrain resource grid model to translate downwards, generating a side surface of the closed space corresponding to the terrain resource grid model; aggregate the vertices on the bottom edge of the side surface to generate the bottom surface of the closed space corresponding to the terrain resource grid model; use the face where the outline of the terrain resource grid model is located as the top surface, and enclose a closed space according to the top surface where the outline of the terrain resource grid model is located, the side surface of the closed space corresponding to the terrain resource grid model, and the bottom surface of the closed space corresponding to the terrain resource grid model; and use the closed space as the geometric space. The deletion module is further configured to perform a Boolean subtraction operation on the geometric space and the mesh model of any scene object, deleting both the geometric space and the target patch from the scene mesh model to obtain a local scene mesh model, the local scene mesh model including the newly generated bottom surface of the mesh model of any scene object after the Boolean subtraction operation; deleting the newly generated bottom surface from the local scene mesh model to obtain a transitional scene mesh model; and recombining the terrain resource mesh model into the transitional scene mesh model to obtain an updated scene mesh model.

6. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to execute the scene model processing method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to execute the scene model processing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Interactive prop display method and device, terminal and storage medium

    CN111408133A

  • Navigation grid updating method, device and equipment and computer readable storage medium

    CN114177613A