Three-dimensional model display method and electronic equipment

By acquiring and smoothing the vertex and surface normals of the three-dimensional geological model, the problem of low display accuracy of complex geological models in the prior art is solved, and higher display accuracy and better lighting effects are achieved.

CN119904591AInactive Publication Date: 2025-04-29BEIJING LANGJING INNOVATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510386709.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-04-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing three-dimensional model generation and display methods have problems of large errors and low accuracy when rendering complex three-dimensional geological models.

Method used

By obtaining the vertex coordinate set of the target object, the three-dimensional initial model is determined, and smoothed according to the point normal vector of the vertex and the surface normal vector of the triangle face, the triangle face normal vector is updated, and the updated three-dimensional initial model is finally displayed.

Benefits of technology

It improves the display accuracy of complex geological tectonic models, eliminates sharp edges caused by discontinuity of vertex normals, and improves the surface lighting effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904591A_ABST
    Figure CN119904591A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional model display method and electronic equipment, and the method comprises the steps: obtaining a vertex coordinate set of a target object; determining a three-dimensional initial model of the target object according to the vertex coordinate set; wherein the three-dimensional initial model comprises a plurality of triangular surfaces, and each triangular surface is composed of three vertexes; for any vertex in the three-dimensional initial model, determining a point normal vector of the vertex according to a surface normal vector of a triangular surface adjacent to the vertex; for any triangular surface adjacent to the vertex, according to the point normal vector of the vertex and the surface normal vector of the triangular surface, determining a target normal vector of the triangular surface, and obtaining a plurality of target normal vectors corresponding to the plurality of triangular surfaces; and updating the three-dimensional initial model of the target object according to the plurality of target normal vectors of the plurality of triangular surfaces, and displaying the updated three-dimensional initial model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of geological modeling, and more specifically, to a three-dimensional model display method and electronic equipment. Background Art

[0002] The display of three-dimensional geological models is one of the key technologies in geological exploration, resource assessment and environmental research. The commonly used methods for generating and displaying three-dimensional geological models are: interpolation generation and display of measurement data, geological modeling and display based on physical models, and three-dimensional modeling and display methods based on machine learning. Although these three-dimensional model generation and display methods can generate high-precision three-dimensional models to a certain extent. However, under complex geological structures, the models displayed by the above three-dimensional model generation and display methods may have large errors and cannot display high-precision three-dimensional geological models. Summary of the invention

[0003] One purpose of the embodiments of the present disclosure is to provide a new technical solution for the generation and display of three-dimensional models, which can solve the problems of large errors and low precision in existing three-dimensional model generation and display methods when rendering complex three-dimensional geological models.

[0004] According to a first aspect of the present disclosure, a three-dimensional model display method is provided, comprising: Get the vertex coordinate set of the target object; Determine a three-dimensional initial model of the target object according to the vertex coordinate set; wherein the three-dimensional initial model includes a plurality of triangular faces, and a triangular face is composed of three vertices; For any vertex in the three-dimensional initial model, determine the point normal vector of the vertex according to the surface normal vector of the triangular face adjacent to the vertex; For any triangular face adjacent to the vertex, determine a target normal vector of the triangular face according to the point normal vector of the vertex and the surface normal vector of the triangular face, and obtain multiple target normal vectors corresponding to the multiple triangular faces; According to the multiple target normal vectors of the multiple triangular faces, the three-dimensional initial model of the target object is updated, and the updated three-dimensional initial model is displayed.

[0005] Optionally, determining the three-dimensional initial model of the target object according to the vertex coordinate set includes: Determine a plurality of triangle face indexes according to the vertex coordinate set; wherein one triangle face index is used to indicate the arrangement positions of three vertices constituting one triangle face in the vertex coordinate set; Determine the surface normal vector of the triangular surface corresponding to the triangular surface index according to the vertex coordinates of the vertices corresponding to each of the triangular surface indexes, and obtain multiple surface normal vectors corresponding to the multiple triangular surface indices; A three-dimensional initial model of the target object is determined according to the vertex coordinate set, the multiple triangular surface indices, and the multiple surface normal vectors corresponding to the multiple triangular surface indices.

[0006] Optionally, the vertex coordinate set includes vertex coordinates corresponding to each of the multiple meshes, and determining multiple triangle face indices according to the vertex coordinate set includes: From the vertex coordinate set, select the vertex coordinates located on the top surface of the mesh to obtain a top surface vertex coordinate set; A plurality of triangle face indexes are determined according to the vertex coordinates of the top face vertex coordinate set, wherein one triangle face index is used to indicate the arrangement positions of the vertex coordinates of three vertices constituting one triangle face in the top face vertex coordinate set.

[0007] Optionally, determining a target normal vector of the triangular face according to the point normal vector of the vertex and the face normal vector of the triangular face comprises: Determine a vector angle between the point normal vector of the vertex and the surface normal vector of the triangular surface according to the point normal vector of the vertex and the surface normal vector of the triangular surface; According to the vector angle, one of the point normal vector of the vertex and the surface normal vector of the triangular face is determined as the target normal vector of the triangular face.

[0008] Optionally, determining one of the point normal vector of the vertex and the surface normal vector of the triangular face as a target normal vector of the triangular face according to the vector angle includes: When the vector angle is less than or equal to the angle threshold, determining the point normal vector of the vertex as the target normal vector of the triangle surface; When the vector angle is greater than the angle threshold, the surface normal vector of the triangular face is determined as the target normal vector of the triangular face.

[0009] Optionally, for any vertex in the three-dimensional initial model, determining the point normal vector of the vertex according to the surface normal vector of a triangular face adjacent to the vertex includes: According to vertex coordinates of two adjacent vertices in the three-dimensional initial model, performing vertex merging processing on the three-dimensional initial model to obtain a processed three-dimensional model; For any processed vertex in the processed three-dimensional model, the point normal vector of the processed vertex is determined based on the face normal vector of the triangular face adjacent to the processed vertex; wherein the triangular face adjacent to the processed vertex is the triangular face adjacent to the processed vertex in the processed three-dimensional model.

[0010] Optionally, performing vertex merging processing on the three-dimensional initial model according to vertex coordinates of two adjacent vertices in the three-dimensional initial model includes: Determine the distance between the two adjacent vertices according to the vertex coordinates of the two adjacent vertices in the three-dimensional initial model; When the distance value between the two adjacent vertices is less than the distance threshold, the two adjacent vertices are merged into one vertex to obtain a processed vertex.

[0011] Optionally, the surface normal vector of the triangular face adjacent to the processed vertex includes a first surface normal vector, a second surface normal vector, and a third surface normal vector, and determining the point normal vector of the processed vertex according to the surface normal vector of the triangular face adjacent to the processed vertex includes: Determine an average surface normal vector according to the first surface normal vector, the second surface normal vector, and the third surface normal vector; The average surface normal vector is normalized to obtain the point normal vector of the processed vertex.

[0012] Optionally, updating the three-dimensional initial model of the target object according to the multiple target normal vectors of the multiple triangular faces and displaying the updated three-dimensional initial model includes: Create a model container; The three-dimensional initial model and a plurality of target normal vectors of the plurality of triangular faces are input into the model container, and the updated three-dimensional initial model is displayed through the model container.

[0013] According to a second aspect of the present disclosure, an electronic device is also provided, comprising a memory and a processor, wherein the memory is used to store executable instructions; the processor is used to operate according to the control of the instructions to execute the method as described in the first aspect of the present disclosure.

[0014] One beneficial effect of the present disclosure is that, according to the vertex coordinate set of the target object, a three-dimensional initial model of the target object composed of multiple triangular faces can be obtained, so as to realize the construction of the three-dimensional model of the target object, and because the triangular face mesh can flexibly represent structures of various shapes, it can solve the problem of poor display accuracy in the related art in complex geological structure scenes, and improve the model display accuracy of complex geological structures. In addition, by smoothing the face normal vectors of the triangular faces according to the point normal vectors of the vertices in the three-dimensional initial model and the face normal vectors of the triangular faces adjacent to the vertices, the sharp edges caused by the discontinuity of the vertex normals of the three-dimensional initial model can be eliminated, the surface lighting effect of the three-dimensional initial model is improved, and the display accuracy of the three-dimensional initial model is further improved.

[0015] Other features and advantages of the present application will become apparent from the following detailed description of exemplary embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0017] Figure 1 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present disclosure; Figure 2 is a flowchart of a three-dimensional model display method according to an embodiment of the present disclosure; Figure 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0019] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0020] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0021] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0022] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0023] <Hardware Configuration> Figure 1 is a block diagram of a hardware configuration of an electronic device 1000 according to an embodiment of the present disclosure.

[0024] The electronic device 1000 may be, for example, a notebook computer, a PC, etc., which is not limited here.

[0025] The electronic device 1000 may include a processor 1100 , a memory 1200 , an interface device 1300 , a communication device 1400 , a display device 1500 , an input device 1600 , a speaker 1700 , a microphone 1800 , and the like.

[0026] The processor 1100 may be a mobile version processor. The memory 1200 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The interface device 1300 may include, for example, a USB interface, a headphone interface, etc. The communication device 1400 may, for example, be capable of wired or wireless communication. The communication device 1400 may include a short-range communication device, for example, any device for short-range wireless communication based on short-range wireless communication protocols such as Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 1400 may also include a remote communication device, for example, any device for WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. The display device 1500 may be, for example, a liquid crystal display, a touch display, etc. The input device 1600 may include, for example, a touch screen, a keyboard, etc. The user may input / output voice information through the speaker 1700 and the microphone 1800.

[0027] In this embodiment, the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to at least execute the three-dimensional model display method performed by the electronic device 1000 according to any embodiment of the present disclosure. The technician can design instructions according to the scheme disclosed in the present disclosure. How the instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0028] Despite Figure 1 , multiple devices of the electronic device 1000 are shown; however, the present disclosure may only relate to some of the devices, for example, the electronic device 1000 only relates to the memory 1200 and the processor 1100 .

[0029] In this embodiment, the electronic device 1000 displays a three-dimensional model of the target object based on a vertex coordinate set of the target object.

[0030] <Method Example> Figure 2 It is a flowchart of a three-dimensional model display method according to an embodiment of the present disclosure, and the method can be implemented by the electronic device 1000.

[0031] according to Figure 2 As shown, the 3D model display method of this embodiment may include the following steps S2100 to S2500: Step S2100, obtaining a vertex coordinate set of the target object.

[0032] In this embodiment, the target object may be an object of any entity.

[0033] For example, the target object may be a geological structure, an urban building, or other entity object that needs to be modeled, which is not limited here.

[0034] The vertex coordinate set includes vertex coordinates of the geometric vertices of the target object.

[0035] The vertices of the target object may be geometric vertices, and the geometric vertices may be basic points constituting the geometric shape of the target object, that is, the geometric vertices may be vertices reflecting the geometric shape of the target object. The vertex coordinates of each geometric vertex may be expressed as (x, y, z), which may reflect the position of the geometric vertex in three-dimensional space.

[0036] For example, if the target object is a cube-shaped entity, the three-dimensional model of the cube-shaped entity may include multiple small cubes, then the vertex coordinate set of the target object includes the vertex coordinates of all vertices of the multiple small cubes. Moreover, a small cube includes eight vertices.

[0037] The vertex coordinate set of the target object can be obtained by measuring the target object.

[0038] In one example, the target object is a geological structure, and the vertex coordinate set of the target object can be obtained by the following steps: Collect the geological data of the target object (i.e., the target geological structure), which includes the geographic coordinate data, elevation and location information, drilling data, seismic data, geological map, etc. of the geological structure. Convert the above different types of geological data into a unified coordinate system (such as WGS84, UTM, etc.) to obtain processed geological data. Select a target grid type (such as a quadrilateral grid, etc.) that matches the target object, and generate a first geological model of the target object based on the processed geological data and the target grid type. Extract the grid vertex coordinates from the first geological model to obtain a vertex coordinate set of the target object.

[0039] The vertex coordinate set of the target object may also be obtained by indexing from the vertex coordinate sets of multiple objects stored in the memory.

[0040] In one example, the target object is a geological structure, and multiple vertex coordinate sets corresponding to multiple objects (i.e., multiple geological structures) are pre-stored. In order to facilitate searching, the multiple vertex coordinate sets of the multiple objects can be stored in the form of key-value pairs, with one object corresponding to one vertex coordinate set. Then, the vertex coordinate set of the target object (i.e., the target geological structure) is found by inputting a key.

[0041] Step S2200: determining a three-dimensional initial model of the target object according to the vertex coordinate set.

[0042] In this embodiment, the 3D initial model includes a plurality of triangular faces, and a triangular face is composed of three vertices. That is, a triangular face can be determined by the vertex coordinates of three vertices in the vertex coordinate set. The 3D initial model is a 3D model composed of a plurality of triangular faces.

[0043] The three-dimensional initial model may be a three-dimensional geological initial model or other types of three-dimensional initial models, which may vary depending on the type of the target object and are not limited here.

[0044] In some embodiments, determining the three-dimensional initial model of the target object according to the vertex coordinate set in step S2200 includes: steps S2200.1 to S2200.3.

[0045] Step S2200.1, determining multiple triangle face indices according to the vertex coordinate set.

[0046] In this embodiment, the vertex coordinates of three vertices in the vertex coordinate set can constitute a foot face. A triangle face index is used to indicate the arrangement positions of three vertices constituting a triangle face in the vertex coordinate set.

[0047] For example, the vertex coordinates of three vertices are (1,1,0), (2,1,0), and (2,2,0), and their arrangement positions in the vertex coordinate set are 3, 4, and 5. The vertex coordinates of these three vertices can form a triangle face, and the triangle face index corresponding to the triangle face is (3,4,5).

[0048] Since the vertex coordinate set contains a large number of vertices, in order to improve the efficiency of building the three-dimensional initial model, the vertex coordinate set can be simplified first to reduce the amount of data calculation and improve the efficiency of building the three-dimensional initial model.

[0049] Based on this, in some embodiments, the vertex coordinate set includes vertex coordinates corresponding to each mesh in a plurality of meshes.

[0050] In this embodiment, the grid may be a cube, etc., which is not limited here.

[0051] In the example where the mesh is a cube, the mesh includes eight vertices.

[0052] In these embodiments, step S2200.1 determines a plurality of triangular face indices according to the vertex coordinate set, including: step S2200.11 and step S2200.12.

[0053] Step S2200.11, selecting the vertex coordinates located on the top surface of the mesh from the vertex coordinate set to obtain a top surface vertex coordinate set.

[0054] In this embodiment, in order to reduce the amount of calculation, only the vertex coordinates of the vertices located on the top surface of the mesh are selected for calculation.

[0055] Exemplarily, the mesh is a cubic mesh, which includes eight vertices and six faces. At this time, for a cubic mesh, only four vertices located on the top surface of the cubic mesh are selected for subsequent calculations to reduce the amount of calculations.

[0056] Step S2200.12, determining multiple triangle face indices according to the vertex coordinates of the top face vertex coordinate set.

[0057] In this embodiment, a triangle face index is used to indicate the arrangement position of the vertex coordinates of three vertices constituting a triangle face in the top face vertex coordinate set.

[0058] Step S2200.2, determining the surface normal vector of the triangular surface corresponding to the triangular surface index according to the vertex coordinates of the vertices corresponding to each of the triangular surface indexes, and obtaining multiple surface normal vectors corresponding to the multiple triangular surface indices.

[0059] In this embodiment, a triangle face index can determine the vertex coordinates of three vertices of the triangle face corresponding to the triangle face index, and the surface normal vector of the triangle face can be determined according to the vertex coordinates of the three vertices.

[0060] The face normal vector can represent the direction of the triangular face. The modulus of the face normal vector is 1, that is, the face normal vector only represents the direction of the triangular face. In the lighting model, the face normal vector can affect the angle between the light and the surface, thereby affecting the lighting intensity.

[0061] Those skilled in the art should understand that the method of determining the face normal vector by the vertex coordinates of the three vertices constituting the triangular face (obtaining the face normal vector by calculating the cross product of the vertex coordinates of the three vertices) is well known in the art and will not be described in detail here.

[0062] Step S2200.3, determining a three-dimensional initial model of the target object according to the vertex coordinate set, the multiple triangular surface indices, and the multiple surface normal vectors corresponding to the multiple triangular surface indices.

[0063] In this embodiment, for any triangular face index, the vertex coordinates of the three vertices corresponding to the triangular face index are determined from the vertex coordinate set, and then the vertex coordinates of the three vertices are combined into a triangular face according to the face normal vector corresponding to the triangular face index, thereby obtaining multiple triangular faces corresponding to multiple triangular face indices. The multiple triangular faces together constitute a complete mesh, thereby generating a three-dimensional initial model of the target object.

[0064] In order to eliminate the sharp edges caused by the discontinuity of the vertex normals of the 3D initial model, the 3D initial model can be smoothed to improve the surface lighting effect of the 3D initial model. The specific method of the smoothing process is as shown in step S2300 and step S2400.

[0065] Step S2300: for any vertex in the three-dimensional initial model, determine the point normal vector of the vertex according to the surface normal vector of the triangular face adjacent to the vertex.

[0066] In this embodiment, the triangular face adjacent to the vertex may be a triangular face including the vertex, that is, the vertex is a vertex constituting the triangular face.

[0067] The point normal vector of a vertex can represent the surface direction at that vertex.

[0068] For example, if there are eight triangular faces adjacent to a vertex, the average normal vector of the eight triangular faces can be calculated, and the average normal vector can be normalized to obtain the point normal vector of the vertex.

[0069] In order to simplify the computational complexity of the smoothing process and improve the model display efficiency, the three-dimensional initial model may be firstly subjected to vertex merging and then subjected to smoothing.

[0070] In some embodiments, for any vertex in the three-dimensional initial model, in step S2300, the point normal vector of the vertex is determined according to the surface normal vector of the triangular face adjacent to the vertex, including: step S2300.1 and step S2300.2.

[0071] Step S2300.1, performing vertex merging processing on the three-dimensional initial model according to vertex coordinates of two adjacent vertices in the three-dimensional initial model to obtain a processed three-dimensional model.

[0072] In this embodiment, the distance between two adjacent vertices in the three-dimensional initial model is determined by the vertex coordinates of the two adjacent vertices, and at least two vertices that are closer to each other in the three-dimensional initial model are merged to reduce the number of vertices in the three-dimensional initial model, thereby reducing the number of smoothing processes, thereby improving the display efficiency of the model without affecting the display accuracy of the model.

[0073] In some embodiments, step S2300.1 performs vertex merging processing on the three-dimensional initial model according to vertex coordinates of two adjacent vertices in the three-dimensional initial model, including: step S2300.11 and step S2300.12.

[0074] Step S2300.11, determining the distance value between the two adjacent vertices in the three-dimensional initial model according to the vertex coordinates of the two adjacent vertices.

[0075] Those skilled in the art should understand that distance calculation is well known in the art, and the distance calculation method is not described in detail here.

[0076] Step S2300.12: When the distance value between the two adjacent vertices is less than the distance threshold, the two adjacent vertices are merged into one vertex to obtain a processed vertex.

[0077] In this embodiment, the distance threshold can be flexibly set according to the accuracy requirements of the model, system load, etc. For example, when the system load is small, a smaller distance threshold can be set to meet the demand for high display accuracy. When the system load is large, a larger distance threshold can be set to merge more vertices and reduce calculation complexity.

[0078] In one example, the merged vertex may be one of the two adjacent vertices.

[0079] In another example, the merged vertex may be a point corresponding to the median value of the vertex coordinates of the two adjacent vertices.

[0080] Step S2300.2: for any processed vertex in the processed three-dimensional model, determine the point normal vector of the vertex according to the surface normal vector of the triangle face adjacent to the processed vertex.

[0081] In this embodiment, the triangular face adjacent to the processed vertex is the triangular face adjacent to the processed vertex in the processed three-dimensional model. Moreover, the face normal vector of the triangular face is recalculated and determined based on the vertex coordinates of the three vertices corresponding to the triangular face in the processed three-dimensional model.

[0082] It should be noted that the vertices of the processed 3D model have changed compared to the 3D initial model, and the vertex coordinate set of the processed 3D model is also different from the vertex coordinate set in step S2200.1. At this time, the face normal vector of the triangular face corresponding to the triangular face index in step S2200.2 cannot be directly used, and the face normal vector of the triangular face included in the processed 3D model needs to be recalculated based on the vertex coordinates of all vertices in the processed 3D model.

[0083] The method of re-determining the surface normal vectors of the triangular faces included in the processed three-dimensional model is basically the same as the steps in the above steps S2200.1 and S2200.2, except that the vertex coordinate set in step S2200.1 is the vertex coordinate set corresponding to the processed three-dimensional model.

[0084] In some embodiments, the surface normal vectors of the triangular surfaces adjacent to the processed vertex include a first surface normal vector, a second surface normal vector, and a third surface normal vector.

[0085] In this embodiment, in the processed three-dimensional model, the triangular faces adjacent to a processed vertex include a first triangular face, a second triangular face, and a third triangular face. The face normal vector of the first triangular face is the first face normal vector, the face normal vector of the second triangular face is the second face normal vector, and the face normal vector of the third triangular face is the third face normal vector.

[0086] In these embodiments, step S2300.2 determines the point normal vector of the processed vertex based on the face normal vector of the triangular face adjacent to the processed vertex, including: step S2300.21 and step S2300.22.

[0087] Step S2300.21, determining an average surface normal vector based on the first surface normal vector, the second surface normal vector, and the third surface normal vector.

[0088] In this embodiment, the average surface normal vector is an average value of the first surface normal vector, the second surface normal vector, and the third surface normal vector.

[0089] Step S2300.22, normalize the average surface normal vector to obtain the point normal vector of the processed vertex.

[0090] In this embodiment, the modulus of the point normal vector is 1, so after the average surface normal vector is obtained, it needs to be normalized to have a modulus of 1.

[0091] After obtaining the point normal vector of each vertex of the three-dimensional initial model, step S2400 is executed.

[0092] Step S2400, for any triangular face adjacent to the vertex, determine the target normal vector of the triangular face according to the point normal vector of the vertex and the surface normal vector of the triangular face, and obtain multiple target normal vectors corresponding to the multiple triangular faces.

[0093] In this embodiment, the target normal vector of the triangular surface may be a vector obtained by smoothing the surface normal vector of the triangular surface.

[0094] In one example, the target normal vector of the triangle surface may be calculated by an interpolation algorithm.

[0095] For example, the face normal vector of the triangle T adjacent to a vertex V is NT, and the point normal vector of vertex V is NV. Then the target normal vector NTsmooth of the triangle T can be calculated by the following formula (1): NTsmooth=αNT+(1-α)NV(1) Here, α is a weight factor between 0 and 1 that controls the degree of smoothing.

[0096] In another example, the target normal vector of the triangle face may be a face normal vector or a point normal vector of a vertex.

[0097] In the example of merging vertices of a three-dimensional initial model to obtain a processed three-dimensional model, step S2400 is performed on each processed vertex in the processed three-dimensional model, which will not be elaborated here.

[0098] In some embodiments, determining the target normal vector of the triangular face according to the point normal vector of the vertex and the face normal vector of the triangular face in step S2400 includes: step S2400.1 and step S2400.2.

[0099] Step S2400.1, determining the vector angle between the point normal vector of the vertex and the surface normal vector of the triangular face according to the point normal vector of the vertex and the surface normal vector of the triangular face.

[0100] In this embodiment, the point normal vector of the vertex can be expressed as NV, and the surface normal vector of the triangle surface can be expressed as NT. Then the vector angle between these two vectors is It can be calculated by the following formula (2): (2) If the point normal vector of the vertex and the face normal vector of the triangle face are in the same direction, the vector angle is 0°. If the point normal vector of the vertex and the face normal vector of the triangle face are perpendicular to each other, the vector angle is 90°. If the point normal vector of the vertex and the face normal vector of the triangle face are in opposite directions, the vector angle is 180°.

[0101] Step S2400.2: Determine one of the point normal vector of the vertex and the surface normal vector of the triangle as the target normal vector of the triangle according to the vector angle.

[0102] For example, when the vector angle is 10°, the point normal vector of the vertex is used as the target normal vector of the triangle surface. When the vector angle is 60°, the surface normal vector of the triangle surface is used as the target normal vector of the triangle surface.

[0103] In some embodiments, in step S2400.2, one of the point normal vector of the vertex and the face normal vector of the triangular face is determined as the target normal vector of the triangular face according to the vector angle, including: step S2400.21 and step S2400.22.

[0104] Step S2400.21, when the vector angle is less than or equal to the angle threshold, determine the point normal vector of the vertex as the target normal vector of the triangle surface.

[0105] In this embodiment, the angle threshold may be a critical value of the vector angle set for whether to perform smoothing processing.

[0106] If the vector angle is less than or equal to the angle threshold, it means that the surface normal vector and the point normal vector are not much different. At this time, the surface normal vector is smoothed, that is, the point normal vector is used as the target normal vector of the triangle surface.

[0107] Step S2400.22, when the vector angle is greater than the angle threshold, determine the face normal vector of the triangular face as the target normal vector of the triangular face.

[0108] In this embodiment, if the vector angle is greater than the angle threshold, the face normal vector and the point normal vector differ greatly and no smoothing is performed, that is, the face normal vector of the triangle face is used as the target normal vector of the triangle face.

[0109] Step S2500: updating the three-dimensional initial model of the target object according to the multiple target normal vectors of the multiple triangular faces, and displaying the updated three-dimensional initial model.

[0110] In this embodiment, the three-dimensional initial model of the target object is updated by using multiple target normal vectors corresponding to multiple triangular faces obtained after smoothing to obtain an updated three-dimensional initial model, and the updated three-dimensional initial model is displayed.

[0111] In some embodiments, in step S2500 , the three-dimensional initial model of the target object is updated according to the multiple target normal vectors of the multiple triangular faces, and the updated three-dimensional initial model is displayed: step S2500.1 and step S2500.2.

[0112] Step S2500.1, create a model container.

[0113] In this embodiment, the model container is used to carry model data, that is, the model data of the updated three-dimensional initial model.

[0114] In one example, the model container is a Mesh Filter component.

[0115] Step S2500.2: input the three-dimensional initial model and multiple target normal vectors of the multiple triangular faces into the model container, and display the updated three-dimensional initial model through the model container.

[0116] In this embodiment, the model data of the three-dimensional initial model includes a vertex coordinate set, multiple triangular face indexes, and surface normal vectors corresponding to multiple triangular faces. After multiple target normal vectors of multiple triangular faces are input into the model container, the model container can update the surface normal vectors corresponding to multiple triangular faces in the three-dimensional initial model to the multiple target normal vectors according to the multiple target normal vectors. In other words, for any triangular face, its corresponding surface normal vector is updated to the target normal vector. Then, according to the updated model data, the updated three-dimensional initial model is displayed. Among them, the updated model data includes a vertex coordinate set, multiple triangular face indexes, and multiple target normal vectors of multiple triangular faces.

[0117] According to the embodiment of the present application, a three-dimensional initial model of the target object composed of multiple triangular faces can be obtained according to the vertex coordinate set of the target object, thereby realizing the construction of a three-dimensional model of the target object. Moreover, since the triangular face mesh can flexibly represent structures of various shapes, the problem of poor display accuracy in complex geological structure scenes in the related technology can be solved, thereby improving the model display accuracy of complex geological structures. In addition, by smoothing the face normal vectors of the triangular faces according to the point normal vectors of the vertices in the three-dimensional initial model and the face normal vectors of the triangular faces adjacent to the vertices, the sharp edges caused by the discontinuity of the vertex normals of the three-dimensional initial model can be eliminated, thereby improving the surface lighting effect of the three-dimensional initial model and further improving the display accuracy of the three-dimensional initial model.

[0118] <Storage Medium Embodiment> An embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in any of the above method embodiments are implemented.

[0119] <Electronic Equipment Embodiment> Figure 3 is a structural block diagram of an electronic device 300 according to an embodiment of the present disclosure.

[0120] In this embodiment, if Figure 3 As shown, the electronic device 300 includes a memory 310 and a processor 320, wherein the memory 310 is used to store executable instructions, and the processor 320 is used to operate according to the control of the instructions to execute the method described in any of the above embodiments.

[0121] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0122] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0123] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0124] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.

[0125] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0126] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0127] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0128] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and the module, a program segment or a part of an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0129] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims

1. A three-dimensional model display method, characterized in that: The method comprises: Get the vertex coordinate set of the target object; Determine a three-dimensional initial model of the target object according to the vertex coordinate set; wherein the three-dimensional initial model includes a plurality of triangular faces, and a triangular face is composed of three vertices; For any vertex in the three-dimensional initial model, determine the point normal vector of the vertex according to the surface normal vector of the triangular face adjacent to the vertex; For any triangular face adjacent to the vertex, determine a target normal vector of the triangular face according to the point normal vector of the vertex and the surface normal vector of the triangular face, and obtain multiple target normal vectors corresponding to the multiple triangular faces; According to the multiple target normal vectors of the multiple triangular faces, the three-dimensional initial model of the target object is updated, and the updated three-dimensional initial model is displayed.

2. The method according to claim 1, characterized in that Determining the three-dimensional initial model of the target object according to the vertex coordinate set includes: Determine a plurality of triangle face indexes according to the vertex coordinate set; wherein one triangle face index is used to indicate the arrangement positions of three vertices constituting one triangle face in the vertex coordinate set; Determine the surface normal vector of the triangular surface corresponding to the triangular surface index according to the vertex coordinates of the vertices corresponding to each of the triangular surface indexes, and obtain multiple surface normal vectors corresponding to the multiple triangular surface indices; A three-dimensional initial model of the target object is determined according to the vertex coordinate set, the multiple triangular surface indices, and the multiple surface normal vectors corresponding to the multiple triangular surface indices.

3. The method according to claim 1, characterized in that The vertex coordinate set includes vertex coordinates corresponding to each of the multiple meshes, and determining multiple triangle face indexes according to the vertex coordinate set includes: From the vertex coordinate set, select the vertex coordinates located on the top surface of the mesh to obtain a top surface vertex coordinate set; A plurality of triangle face indexes are determined according to the vertex coordinates of the top face vertex coordinate set, wherein one triangle face index is used to indicate the arrangement positions of the vertex coordinates of three vertices constituting one triangle face in the top face vertex coordinate set.

4. The method according to claim 1, characterized in that The step of determining a target normal vector of the triangular face according to the point normal vector of the vertex and the surface normal vector of the triangular face comprises: Determine a vector angle between the point normal vector of the vertex and the surface normal vector of the triangular surface according to the point normal vector of the vertex and the surface normal vector of the triangular surface; According to the vector angle, one of the point normal vector of the vertex and the surface normal vector of the triangular face is determined as the target normal vector of the triangular face.

5. The method according to claim 4, characterized in that The step of determining one of the point normal vector of the vertex and the surface normal vector of the triangular face as a target normal vector of the triangular face according to the vector angle includes: When the vector angle is less than or equal to the angle threshold, determining the point normal vector of the vertex as the target normal vector of the triangle surface; When the vector angle is greater than the angle threshold, the surface normal vector of the triangular face is determined as the target normal vector of the triangular face.

6. The method according to claim 1, characterized in that For any vertex in the three-dimensional initial model, determining the point normal vector of the vertex according to the surface normal vector of the triangular surface adjacent to the vertex includes: According to vertex coordinates of two adjacent vertices in the three-dimensional initial model, performing vertex merging processing on the three-dimensional initial model to obtain a processed three-dimensional model; For any processed vertex in the processed three-dimensional model, the point normal vector of the processed vertex is determined based on the face normal vector of the triangular face adjacent to the processed vertex; wherein the triangular face adjacent to the processed vertex is the triangular face adjacent to the processed vertex in the processed three-dimensional model.

7. The method according to claim 6, characterized in that The step of performing vertex merging processing on the three-dimensional initial model according to vertex coordinates of two adjacent vertices in the three-dimensional initial model includes: Determine the distance between the two adjacent vertices according to the vertex coordinates of the two adjacent vertices in the three-dimensional initial model; When the distance value between the two adjacent vertices is less than the distance threshold, the two adjacent vertices are merged into one vertex to obtain a processed vertex.

8. The method according to claim 6, characterized in that The surface normal vectors of the triangular faces adjacent to the processed vertex include a first surface normal vector, a second surface normal vector, and a third surface normal vector. The step of determining the point normal vector of the processed vertex according to the surface normal vectors of the triangular faces adjacent to the processed vertex includes: Determine an average surface normal vector according to the first surface normal vector, the second surface normal vector, and the third surface normal vector; The average surface normal vector is normalized to obtain the point normal vector of the processed vertex.

9. The method according to claim 1, characterized in that: The method of updating the three-dimensional initial model of the target object according to the multiple target normal vectors of the multiple triangular faces and displaying the updated three-dimensional initial model comprises: Create a model container; The three-dimensional initial model and a plurality of target normal vectors of the plurality of triangular faces are input into the model container, and the updated three-dimensional initial model is displayed through the model container.

10. An electronic device comprising a memory and a processor, wherein the memory is used to store executable instructions; and the processor is used to operate according to the control of the instructions to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Optimization method of surface drawing triangular mesh

    CN115409950A

  • Three-dimensional model segmentation method and device, equipment and storage medium

    CN116310261A

  • Three-dimensional surface extraction method and device and storage medium

    CN117152341A

  • Program, information storage medium, model data structure, and image generation system

    JP2006268103A

  • Coding method and terminal

    WO2023179710A1