CN114445596B - Three-dimensional model display method, device, equipment and storage medium - Google Patents

Three-dimensional model display method, device, equipment and storage medium Download PDF

Info

Publication number
CN114445596B
CN114445596B CN202210363392.2A CN202210363392A CN114445596B CN 114445596 B CN114445596 B CN 114445596B CN 202210363392 A CN202210363392 A CN 202210363392A CN 114445596 B CN114445596 B CN 114445596B
Authority
CN
China
Prior art keywords
dimensional model
geometric data
selection unit
dimensional
grid structure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210363392.2A
Other languages
Chinese (zh)
Other versions
CN114445596A (en
Inventor
孟祥飞
李健增
杨林
杨灿群
夏梓峻
刘春伟
曹绪祥
段莉莉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National Supercomputer Center In Tianjin
Original Assignee
National Supercomputer Center In Tianjin
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National Supercomputer Center In Tianjin filed Critical National Supercomputer Center In Tianjin
Priority to CN202210363392.2A priority Critical patent/CN114445596B/en
Publication of CN114445596A publication Critical patent/CN114445596A/en
Application granted granted Critical
Publication of CN114445596B publication Critical patent/CN114445596B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Abstract

The embodiment of the disclosure relates to a processing method, a display method, a device, equipment and a storage medium of a three-dimensional model, which can acquire geometric data and index information of the three-dimensional model; three-dimensional reconstruction is carried out on the three-dimensional model based on the geometric data and the index information of the three-dimensional model, and the geometric data of the three-dimensional model is packaged in the same grid structure; and displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model. According to the method and the device for encapsulating the three-dimensional data, the geometric data of the three-dimensional model can be encapsulated in the same grid structure, and compared with the method that the geometric data of the three-dimensional model is encapsulated in a plurality of grid structures in a blocking mode, the size of the grid structure corresponding to the three-dimensional model can be reduced, so that the occupation of the grid structure of the three-dimensional model on the memory of a browser is reduced, and the speed of displaying the three-dimensional model by the terminal is increased.

Description

Three-dimensional model display method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a display method, a display device, display equipment and a storage medium of a three-dimensional model.
Background
Currently, with the development of Computer Aided Engineering (CAE) technology and network technology, a three-dimensional model designed by three-dimensional model software may be uploaded to a server, so that the server processes the three-dimensional model to obtain data in a format (e.g., geometric data of the three-dimensional model) that can be called by a browser, and thus, a terminal may access the server through a network and display the three-dimensional model.
However, as the volume of the three-dimensional model increases, the complexity increases, which leads to an increase in the number of grid structures corresponding to the three-dimensional model, and further leads to an increase in the occupation of the memory of the browser, and the display smoothness of the three-dimensional model decreases, which affects the user experience.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present disclosure provide a method, an apparatus, a device, and a storage medium for displaying a three-dimensional model.
A first aspect of an embodiment of the present disclosure provides a method for displaying a three-dimensional model, including:
acquiring geometric data and index information of the three-dimensional model;
three-dimensional reconstruction is carried out on the three-dimensional model based on the geometric data and the index information of the three-dimensional model, and the geometric data of the three-dimensional model is packaged in the same grid structure;
and displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model.
In another embodiment of the present disclosure, after displaying the three-dimensional model based on the mesh structure, the method further comprises:
in response to receiving a selection operation aiming at a minimum selection unit in the three-dimensional model, determining the minimum selection unit selected by the selection operation;
and responding to the received processing operation, and performing operation corresponding to the processing operation on the minimum selection unit selected by the selection operation.
In another embodiment of the present disclosure, the selecting operation includes a clicking operation;
wherein, in response to receiving a selection operation for a minimum selection unit in the three-dimensional model, determining the minimum selection unit selected by the selection operation includes:
in response to receiving the click operation, determining a screen coordinate corresponding to the click operation;
determining a three-dimensional coordinate associated with the screen coordinate based on the association relationship between the screen coordinate and the three-dimensional coordinate;
and determining the minimum selection unit to which the point corresponding to the three-dimensional coordinate belongs as the minimum selection unit selected by the selection operation.
In another embodiment of the present disclosure, before performing, in response to receiving the processing operation, an operation corresponding to the processing operation on the minimum selected unit selected by the selecting operation, the method further includes:
encapsulating the geometric data of the minimum selected unit selected by the selection operation in the same grid structure;
displaying a local structure corresponding to the minimum selection unit selected by the selection operation based on the network structure corresponding to the minimum selection unit selected by the selection operation; the local structure is covered above the three-dimensional model, and the display color of the local structure is different from that of the three-dimensional model.
In yet another embodiment of the present disclosure, a three-dimensional model includes at least one component, each component including a plurality of faces;
the index numbers of the geometric data corresponding to the same plane are consecutive.
In still another embodiment of the present disclosure, data having a correspondence relationship among geometric data of the three-dimensional model is provided with the same index number.
In another embodiment of the present disclosure, before three-dimensionally reconstructing the three-dimensional model based on the geometric data and the index information of the three-dimensional model and packaging the geometric data of the three-dimensional model in the same grid structure, the method further includes:
decompressing the geometric data of the three-dimensional model;
the method comprises the following steps of performing three-dimensional reconstruction on a three-dimensional model based on geometric data and index information of the three-dimensional model, and packaging the geometric data of the three-dimensional model in the same grid structure, wherein the method comprises the following steps:
and performing three-dimensional reconstruction on the three-dimensional model based on the decompressed geometric data and the index information of the three-dimensional model, and packaging the decompressed geometric data of the three-dimensional model in the same grid structure.
A second aspect of an embodiment of the present disclosure provides a display apparatus of a three-dimensional model, the apparatus including:
the acquisition module is used for acquiring geometric data and index information of the three-dimensional model;
the first packaging module is used for carrying out three-dimensional reconstruction on the three-dimensional model based on the geometric data and the index information of the three-dimensional model and packaging the geometric data of the three-dimensional model in the same grid structure;
and the first display module is used for displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model.
A third aspect of an embodiment of the present disclosure provides an electronic device including: a processor and a memory, wherein the memory has stored therein a computer program which, when executed by the processor, performs the method of the first aspect.
A fourth aspect of embodiments of the present disclosure provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method of the first aspect may be implemented.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the processing method, the display method, the device, the equipment and the storage medium of the three-dimensional model provided by the embodiment of the disclosure can acquire geometric data and index information of the three-dimensional model; three-dimensional reconstruction is carried out on the three-dimensional model based on the geometric data and the index information of the three-dimensional model, and the geometric data of the three-dimensional model is packaged in the same grid structure; and displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model. According to the method and the device for encapsulating the three-dimensional data, the geometric data of the three-dimensional model can be encapsulated in the same grid structure, and compared with the method that the geometric data of the three-dimensional model is encapsulated in a plurality of grid structures in a blocking mode, the size of the grid structure corresponding to the three-dimensional model can be reduced, so that the occupation of the grid structure of the three-dimensional model on the memory of a browser is reduced, and the speed of displaying the three-dimensional model by the terminal is increased.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a display method of a three-dimensional model according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another method for displaying a three-dimensional model provided by an embodiment of the disclosure;
FIG. 3 is a flowchart of a method for displaying a three-dimensional model according to an embodiment of the disclosure;
FIG. 4 is a schematic structural diagram of a display device of a three-dimensional model according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Fig. 1 is a flowchart of a method for displaying a three-dimensional model, which may be performed by an electronic device according to an embodiment of the present disclosure. The electronic device may be understood as an exemplary terminal such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a smart tv, etc. As shown in fig. 1, the method provided by this embodiment includes the following steps:
and S110, acquiring geometric data and index information of the three-dimensional model.
Specifically, the three-dimensional model may be a three-dimensional model corresponding to any real-world object or virtual object.
Specifically, the geometric data may include vertices, normal vectors, but is not limited thereto, and may also include, for example, color, texture coordinates, and the like.
The triangle model may include at least one part, each part may include a plurality of faces, each face may be cut into a plurality of sub-faces by face cutting, wherein the sub-faces include, but are not limited to, triangular faces or quadrangular faces. The vertex of each sub-surface is the vertex in the geometric data, and the normal vector of each vertex is the normal vector in the geometric data. The particular characterizing form of the vertices and normal vectors may include, but is not limited to, coordinates.
Specifically, different types of data in the geometric data may be separately stored in different files, or all the geometric data may be stored in the same file, which is not limited herein. For example, the vertex and normal vector belong to different kinds of data, and may be stored separately in different files or in the same file.
Specifically, the index information is used to describe at least a face-part-model structural relationship of the three-dimensional model based on the index number.
Specifically, for each kind of data in the geometric data, each of the data in the kind of data is configured with an index number, and for example, when the geometric data includes two kinds of data of a vertex and a normal vector, each vertex in the vertex kind is configured with an index number, and each normal vector in the normal vector kind is configured with an index number. For example, when the index information also describes the structural relationship between sub-surface edges and sub-surfaces, each sub-surface edge of a sub-surface may also be configured with an index number, and when the index information also describes the structural relationship between surface edges and surfaces, each surface edge of a surface may also be configured with an index number.
The index information may be stored in, but is not limited to, a json-formatted file.
Specifically, the electronic device may access the server through a network to acquire the geometric data and the index information of the three-dimensional model.
Accordingly, the server can acquire a three-dimensional model file of a three-dimensional model designed by any three-dimensional model software; and performing surface segmentation on the three-dimensional model based on the geometric information in the three-dimensional model file, extracting the geometric data of the three-dimensional model, and constructing index information. Of course, the server may also offload a task of "performing surface segmentation on the three-dimensional model based on the geometric information in the three-dimensional model file, extracting the geometric data of the three-dimensional model, and constructing index information" to other electronic devices through a related interface (e.g., a resource interface of cloud computing + supercomputing), so as to reduce occupation of computing resources of the server.
And S120, performing three-dimensional reconstruction on the three-dimensional model based on the geometric data and the index information of the three-dimensional model, and packaging the geometric data of the three-dimensional model in the same grid structure.
In particular, the Mesh structure may comprise a Mesh structure.
Specifically, the electronic device may determine at least components included in the three-dimensional model, planes included in each component, and geometric data included in each plane based on the index information, so as to perform three-dimensional reconstruction of the three-dimensional model, but is not limited thereto, and for example, when the index information also describes a sub-plane structural relationship, the electronic device may determine sub-planes included in each plane and geometric data corresponding to each sub-plane based on the index information. When the index information further describes a structural relationship between the sub-surface edge lines and the sub-surfaces, the electronic device may further determine, based on the index information, the sub-surface edge lines included in each sub-surface and the geometric data corresponding to each sub-surface edge line. When the index information further describes a face line-face structural relationship, the electronic device may further determine, based on the index information, a face line included in each face and geometric data corresponding to each face line.
In one example, the index information is used to describe a structural relationship of a face-part-model body of the three-dimensional model, and in this case, the index information includes: the three-dimensional model includes an index number of a part, an index number of a face each part includes, and an index number of geometry data corresponding to each face.
At this time, the electronic device may retrieve the geometric data corresponding to each face from the geometric data based on the index information; indexing, from a plurality of faces, the faces each part comprises; and determining the components included in the three-dimensional model, thereby realizing three-dimensional reconstruction.
At this time, for each face, the electronic device may store the geometric data of the face in an array, thus obtaining a plurality of arrays, and encapsulate the plurality of arrays in the same grid structure. It can be understood that, compared with the case that each array is packaged in a grid structure, the size of the grid structure corresponding to the three-dimensional model can be reduced, so that the memory occupation of the electronic device by the grid structure is reduced, and the display speed of the three-dimensional model is increased.
Alternatively, the index numbers of the geometric data corresponding to the same plane are consecutive.
It can be understood that, compared with the disordered index numbers of the geometric data corresponding to the same surface, the index numbers of the geometric data corresponding to the same surface are arranged continuously, so that the geometric data corresponding to the surfaces can be conveniently searched from the geometric data, the index speed is increased, and the reconstruction speed is further increased.
Alternatively, the data having the correspondence relationship in the geometric data of the three-dimensional model may be configured with the same index number.
Specifically, when two kinds of data in the geometric data have a one-to-one correspondence relationship, the data corresponding to each other in the two kinds of data may be configured with the same index number. For example, the geometric data includes two kinds of data of a vertex and a normal vector, and the vertex and the normal vector are in one-to-one correspondence, and thus, for each vertex, the index number of the vertex is the same as that of the normal vector corresponding thereto.
For example, the index information includes: the index number of the surface included in the component with the index number 1 is specifically as follows:
face with index number 1: start index number 0, index number 27; indicating that for each kind of data in the geometry data, the data with the index numbers from 0 to 26 correspond to the face with the index number of 1, for example, the geometry data includes two kinds of data of vertices and normal vectors, and then the vertices with the index numbers from 0 to 26 and the vertices with the index numbers from 0 to 26 correspond to the face with the index number of 1.
Face with index number 2: start index number 27, index number 33; for understanding here, reference may be made to the explanation of the face with index number 1, which is not described here in detail.
Face index number 3: start index number 60, index number 27; for understanding here, reference may be made to the explanation of the face with index number 1, which is not described here in detail.
It can be understood that the same index number may be configured by setting the data corresponding to each other, and the index information does not need to record the index numbers of the various types of data corresponding to each surface (for example, record the index numbers of the vertices and the index numbers of the normal vectors corresponding to each surface), which is beneficial to reducing the size of the index information and reducing the memory occupied by the index information. Moreover, when the index numbers of the geometric data corresponding to the same plane are consecutive, the index information of the geometric data corresponding to each plane may include a start index number and an index number, and compared to the case where the index information of the geometric data corresponding to each plane includes the index number of each geometric data corresponding to the plane, the index information may be concise, and the size of the index information may be further reduced.
In another example, the index information is used to describe a structural relationship of a sub-surface-component-model body of the three-dimensional model, and in this case, the index information includes: the three-dimensional model includes an index number of a part, an index number of a face each part includes, an index number of a sub-face each face includes, and an index number of geometry data corresponding to each sub-face.
At this time, the electronic device may retrieve the geometric data corresponding to each sub-surface from the geometric data based on the index information; indexing a sub-surface included in each surface from the plurality of sub-surfaces, and indexing a surface included in each component from the plurality of surfaces; and determining the components included by the three-dimensional model, thereby realizing three-dimensional reconstruction.
At this time, for each sub-surface, the electronic device may store the geometric data of the sub-surface in an array, so as to obtain a plurality of arrays, and encapsulate the plurality of arrays in the same grid structure. It can be understood that, compared with the case that each array is packaged in a grid structure, the size of the grid structure corresponding to the three-dimensional model can be reduced, so that the memory occupation of the electronic device by the grid structure is reduced, and the display speed of the three-dimensional model is increased.
Optionally, the index numbers of the geometric data corresponding to the sub-surfaces belonging to the same surface are consecutive.
It can be understood that, compared with the disordered index numbers of the geometric data corresponding to the same sub-surface, the index numbers of the geometric data corresponding to the same sub-surface are arranged continuously, so that the geometric data corresponding to the sub-surface can be conveniently indexed from the geometric data, the indexing speed is increased, and the reconstruction speed is further increased.
And S130, displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model.
Specifically, the electronic device displays a specific embodiment of the three-dimensional model based on the grid structure, and those skilled in the art can set the specific embodiment according to practical situations, which is not limited herein.
The processing method of the three-dimensional model provided by the embodiment of the disclosure can acquire the geometric data and the index information of the three-dimensional model; performing three-dimensional reconstruction on the three-dimensional model based on the geometric data and the index information, and packaging the geometric data of the three-dimensional model in the same grid structure; and displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model. The method and the device can package the geometric data of the three-dimensional model in the same grid structure, and can reduce the size of the grid structure corresponding to the three-dimensional model compared with the method of packaging the geometric data of the three-dimensional model in a plurality of grid structures in blocks, thereby reducing the occupation of the grid structure of the three-dimensional model on the memory of a browser and accelerating the speed of displaying the three-dimensional model by the terminal.
Fig. 2 is a flowchart of another method for displaying a three-dimensional model according to an embodiment of the present disclosure. The embodiments of the present disclosure are optimized based on the above embodiments, and the embodiments of the present disclosure may be combined with various alternatives in one or more of the above embodiments.
As shown in fig. 2, the method of displaying the three-dimensional model may include the following steps.
And S210, acquiring geometric data and index information of the three-dimensional model.
Specifically, the description of S210 may refer to S110, and is not repeated herein.
S220, three-dimensional reconstruction is carried out on the three-dimensional model based on the geometric data and the index information, and the geometric data of the three-dimensional model are packaged in the same grid structure.
Specifically, the description of S220 may refer to S120, which is not described herein again.
And S230, displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model.
Specifically, S130 may be referred to for the description of S230, and is not described herein again.
S240, in response to receiving the selection operation aiming at the minimum selection unit in the three-dimensional model, determining the minimum selection unit selected by the selection operation.
Specifically, the minimum selected unit may include, but is not limited to, a vertex of a sub-surface, a sub-surface edge, a sub-surface, a vertex of a surface, a surface edge, a surface, or a component.
Preferably, the minimum selected element comprises a face of the three-dimensional model. It can be understood that, in the practical application process, the surface of the three-dimensional model is usually used as the interaction unit for interaction, and therefore, the minimum selection unit is set to include the surface of the three-dimensional model, which facilitates the interaction between the user and the three-dimensional model.
Specifically, the selection operation may include, but is not limited to, a click operation on the three-dimensional model by touch, a keyboard, a mouse, or the like.
Optionally, the selecting operation comprises a clicking operation; wherein, S240 may include: s241, responding to the received click operation, and determining a screen coordinate corresponding to the click operation; s242, determining a three-dimensional coordinate associated with the screen coordinate based on the association relationship between the screen coordinate and the three-dimensional coordinate; s243 determines the minimum selection unit to which the point corresponding to the three-dimensional coordinate belongs as the minimum selection unit selected by the selection operation.
Specifically, the screen coordinates are two-dimensional coordinates.
Specifically, the association relationship between the screen coordinates and the three-dimensional coordinates describes the correspondence relationship between the screen coordinates and the three-dimensional coordinates of each point on the three-dimensional model when the three-dimensional model is displayed on the screen.
Specifically, when the minimum selection unit includes a vertex of the sub-surface (a vertex of the surface), the minimum selection unit to which a point corresponding to the three-dimensional coordinate belongs refers to a vertex that coincides with or is closest to the point corresponding to the three-dimensional coordinate; when the minimum selection unit comprises a sub-surface side line (surface side line), the minimum selection unit to which the point corresponding to the three-dimensional coordinate belongs refers to the sub-surface side line (surface side line) to which the point corresponding to the three-dimensional coordinate is closest or is located; when the minimum selection unit includes a sub-surface (surface or part), the minimum selection unit to which the point corresponding to the three-dimensional coordinate belongs refers to the sub-surface (surface or part) to which the point corresponding to the three-dimensional coordinate belongs.
It can be understood that, by determining the minimum selection unit to which the point corresponding to the three-dimensional coordinate belongs as the minimum selection unit selected by the selection operation, the requirement on the precision of the click operation input by the user is low, and the minimum selection unit is convenient for the user to select.
And S250, responding to the received processing operation, and performing operation corresponding to the processing operation on the minimum selected unit selected by the selecting operation.
Specifically, the processing operation may include a color setting operation, a line thickness setting operation, and the like, but is not limited thereto.
Optionally, before S250, the method further includes: s261, encapsulating the geometric data of the minimum selected unit selected by the selecting operation in the same grid structure; s262, displaying a local structure corresponding to the minimum selection unit selected by the selection operation based on the network structure corresponding to the minimum selection unit selected by the selection operation; the local structure is covered above the three-dimensional model, and the display color of the local structure is different from that of the three-dimensional model.
Specifically, the local structure is constructed by using a vertex sequence multiplexing mode, that is, geometric data of the minimum selection unit selected by the selection operation is stored in the same array, and the array is packaged in a grid structure.
Specifically, the local structure corresponding to the minimum selection unit selected by the selection operation is the portion of the three-dimensional model corresponding to the minimum selection unit selected by the selection operation.
Specifically, the local structure is overlaid on the three-dimensional model, and the local structure is displayed to be overlaid on the minimum selected unit selected by the selecting operation in the three-dimensional model.
It can be understood that the three-dimensional model and the selected part can be distinguished by superposing and displaying the local structure corresponding to the minimum selected unit selected by the selection operation on the minimum selected unit selected by the selection operation in the three-dimensional model, and setting the local structure to be different from the color of the three-dimensional model, so that the visual display of the click interaction is realized.
In the embodiment of the disclosure, the minimum selection unit selected by the selection operation is determined by setting, and the operation corresponding to the processing operation is performed on the minimum selection unit selected by the selection operation, so that a user can interact with a three-dimensional model displayed by the electronic device, and good interaction inductance and vividness are provided for the user.
Fig. 3 is a flowchart of a display method of a three-dimensional model according to an embodiment of the present disclosure. The embodiments of the present disclosure are optimized based on the above embodiments, and the embodiments of the present disclosure may be combined with various alternatives in one or more of the above embodiments.
As shown in fig. 3, the method for displaying the three-dimensional model may include the following steps.
And S310, acquiring geometric data and index information of the three-dimensional model.
Specifically, S310 may be described with reference to S110, and is not described herein again.
And S320, decompressing the geometric data of the three-dimensional model.
Specifically, after the server extracts the geometric data, the geometric data can be compressed, and accordingly, the electronic device can acquire the compressed geometric data when accessing the server through the network, and therefore the occupation of the geometric data on the memory of the browser can be reduced.
Specifically, the compressed geometric data may include binary data, but is not limited thereto.
Specifically, the electronic device may set, according to practical situations, a specific implementation manner of decompressing the obtained compressed geometric data, which is not limited herein.
S330, three-dimensional reconstruction is carried out on the three-dimensional model based on the decompressed geometric data and the index information of the three-dimensional model, and the decompressed geometric data of the three-dimensional model is packaged in the same grid structure.
Specifically, the description of S330 may refer to S120, which is not described herein again.
And S340, displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model.
Specifically, the description of S340 may refer to S130, and is not repeated herein.
According to the display method of the three-dimensional model, the geometric data obtained when the electronic equipment accesses the server are compressed geometric data, and the geometric data are decompressed for subsequent three-dimensional reconstruction, so that the geometric data can be lightened, and the occupation of the geometric data on the memory of a browser is reduced.
Fig. 4 is a schematic structural diagram of a display apparatus of a three-dimensional model according to an embodiment of the present disclosure, where the display apparatus of the three-dimensional model may be understood as the electronic device or a part of functional modules in the electronic device. As shown in fig. 4, the display device 400 of the three-dimensional model includes:
an obtaining module 410, configured to obtain geometric data and index information of a three-dimensional model;
the first encapsulation module 420 is configured to perform three-dimensional reconstruction on the three-dimensional model based on the geometric data and the index information, and encapsulate the geometric data of the three-dimensional model in the same grid structure;
a first display module 430 for displaying the three-dimensional model based on the grid structure.
The processing device of the three-dimensional model provided by the embodiment of the disclosure can acquire geometric data and index information of the three-dimensional model; performing three-dimensional reconstruction on the three-dimensional model based on the geometric data and the index information of the three-dimensional model, and packaging the geometric data of the three-dimensional model in the same grid structure; and displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model. According to the method and the device for encapsulating the three-dimensional data, the geometric data of the three-dimensional model can be encapsulated in the same grid structure, and compared with the method that the geometric data of the three-dimensional model is encapsulated in a plurality of grid structures in a blocking mode, the size of the grid structure corresponding to the three-dimensional model can be reduced, so that the occupation of the grid structure of the three-dimensional model on the memory of a browser is reduced, and the speed of displaying the three-dimensional model by the terminal is increased.
In another embodiment of the present disclosure, the apparatus may further include:
the determining module is used for responding to the received selection operation aiming at the minimum selection unit in the three-dimensional model after the three-dimensional model is displayed based on the grid structure, and determining the minimum selection unit selected by the selection operation;
and the processing module is used for responding to the received processing operation and performing operation corresponding to the processing operation on the minimum selection unit selected by the selection operation.
In yet another embodiment of the present disclosure, the selecting operation includes a clicking operation;
wherein, the determining module may include:
the first determining submodule is used for responding to the received click operation and determining the screen coordinate corresponding to the click operation;
the second determining submodule is used for determining a three-dimensional coordinate associated with the screen coordinate based on the association relationship between the screen coordinate and the three-dimensional coordinate;
and the third determining submodule is used for determining the minimum selection unit to which the point corresponding to the three-dimensional coordinate belongs as the minimum selection unit selected by the selection operation.
In still another embodiment of the present disclosure, the apparatus further includes:
the second packaging module is used for packaging the geometric data of the minimum selection unit selected by the selection operation into the same grid structure before the minimum selection unit selected by the selection operation is subjected to operation corresponding to the processing operation in response to the received processing operation;
the second display module is used for displaying the local structure corresponding to the minimum selection unit selected by the selection operation based on the network structure corresponding to the minimum selection unit selected by the selection operation; the local structure covers the three-dimensional model, and the display color of the local structure is different from that of the three-dimensional model.
In yet another embodiment of the present disclosure, a three-dimensional model includes at least one component, each component including a plurality of faces; the index numbers of the geometric data corresponding to the same plane are consecutive.
In still another embodiment of the present disclosure, data having a correspondence relationship among geometric data of the three-dimensional model is provided with the same index number.
In still another embodiment of the present disclosure, the apparatus may further include:
the decompression module is used for decompressing the geometric data of the three-dimensional model before the three-dimensional model is subjected to three-dimensional reconstruction based on the geometric data and the index information of the three-dimensional model and the geometric data of the three-dimensional model are packaged in the same grid structure;
the first encapsulation module 420 is specifically configured to: and performing three-dimensional reconstruction on the three-dimensional model based on the decompressed geometric data and the index information of the three-dimensional model, and packaging the decompressed geometric data of the three-dimensional model in the same grid structure.
The apparatus provided in this embodiment can execute the method in any one of the embodiments in fig. 1 to fig. 3, and the execution manner and the beneficial effects are similar, and are not described herein again.
An embodiment of the present disclosure further provides an electronic device, including: a memory having a computer program stored therein; a processor for executing the computer program, wherein the computer program, when executed by the processor, may implement the method of any one of the embodiments of fig. 1-3.
Embodiments of the present disclosure also provide a computer program product, which includes a computer program/instruction, when executed by a processor, implement the method of any one of the embodiments of fig. 1-3.
For example, fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. Referring now specifically to fig. 5, a schematic block diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 500 in the disclosed embodiment may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be alternatively implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring geometric data and index information of the three-dimensional model; three-dimensional reconstruction is carried out on the three-dimensional model based on the geometric data and the index information, and the geometric data of the three-dimensional model is packaged in the same grid structure; based on the grid structure, a three-dimensional model is displayed.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, 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 the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The embodiments of the present disclosure further provide a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is executed by a processor, the method of any one of the embodiments in fig. 1 to fig. 3 may be implemented, where the execution manner and the beneficial effects are similar, and are not described herein again.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description is only for the purpose of describing particular embodiments of the present disclosure, so as to enable those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method for displaying a three-dimensional model, comprising:
acquiring geometric data and index information of the three-dimensional model;
performing three-dimensional reconstruction on the three-dimensional model based on the geometric data of the three-dimensional model and the index information, and packaging the geometric data of the three-dimensional model in the same grid structure; wherein the Mesh structure comprises a Mesh structure; the encapsulating of the geometric data of the three-dimensional model in the same grid structure comprises: for each face in the three-dimensional model, storing the geometric data of the face in an array to obtain a plurality of arrays, and packaging the arrays in the same grid structure;
displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model;
after the displaying the three-dimensional model based on the corresponding mesh structure of the three-dimensional model, the method further comprises:
in response to receiving a selection operation for the minimum selection unit in the three-dimensional model, determining the minimum selection unit selected by the selection operation;
in response to receiving a processing operation, performing an operation corresponding to the processing operation on the minimum selection unit selected by the selection operation;
the minimum selection unit comprises a vertex of a sub-surface, a sub-surface side line, a sub-surface, a vertex of the surface, a surface side line, the surface or a component, and the sub-surface is obtained by cutting the surface through surface;
before the responding to the received processing operation and performing the operation corresponding to the processing operation on the minimum selection unit selected by the selection operation, the method further includes:
encapsulating the geometric data of the minimum selected unit selected by the selection operation in the same grid structure;
displaying a local structure corresponding to the minimum selection unit selected by the selection operation based on the network structure corresponding to the minimum selection unit selected by the selection operation; wherein the local structure overlies the three-dimensional model.
2. The method of claim 1, wherein the selection operation comprises a click operation;
wherein, the determining the minimum selection unit selected by the selection operation in response to receiving the selection operation for the minimum selection unit in the three-dimensional model comprises:
responding to the received click operation, and determining a screen coordinate corresponding to the click operation;
determining a three-dimensional coordinate associated with the screen coordinate based on an association relationship between the screen coordinate and the three-dimensional coordinate;
and determining the minimum selection unit to which the point corresponding to the three-dimensional coordinate belongs as the minimum selection unit selected by the selection operation.
3. The method of claim 1, wherein the localized structures are displayed in a color different from a color of the three-dimensional model.
4. The method of claim 1, wherein said three-dimensional model includes at least one of said components, each of said components including a plurality of said faces;
the index numbers of the geometric data corresponding to the same face are consecutive.
5. The method according to claim 1, wherein data having correspondence among the geometric data of the three-dimensional model is configured with the same index number.
6. The method of claim 1, wherein before said three-dimensional reconstruction of said three-dimensional model based on said geometric data and said index information and packaging of said three-dimensional model's geometric data in the same mesh structure, said method further comprises:
decompressing the geometry data;
wherein, the three-dimensional reconstruction of the three-dimensional model based on the geometric data and the index information and the encapsulation of the geometric data of the three-dimensional model in the same grid structure comprises:
and performing three-dimensional reconstruction on the three-dimensional model based on the decompressed geometric data and the index information, and packaging the geometric data of the three-dimensional model in the same grid structure.
7. A display device for a three-dimensional model, comprising:
the acquisition module is used for acquiring geometric data and index information of the three-dimensional model;
the first packaging module is used for carrying out three-dimensional reconstruction on the three-dimensional model based on the geometric data of the three-dimensional model and the index information and packaging the geometric data of the three-dimensional model in the same grid structure; wherein the Mesh structure comprises a Mesh structure; the first packaging module is further specifically configured to store, for each face in the three-dimensional model, the geometric data of the face in an array to obtain a plurality of arrays, and package the plurality of arrays in the same grid structure;
the first display module is used for displaying the three-dimensional model based on the grid structure corresponding to the three-dimensional model;
the determining module is used for responding to the received selection operation aiming at the minimum selection unit in the three-dimensional model after the three-dimensional model is displayed based on the grid structure, and determining the minimum selection unit selected by the selection operation;
the processing module is used for responding to the received processing operation and performing operation corresponding to the processing operation on the minimum selection unit selected by the selection operation; the minimum selection unit comprises a vertex of a sub-surface, a sub-surface side line, a sub-surface, a vertex of the surface, a surface side line, the surface or a component, and the sub-surface is obtained by cutting the surface;
the second packaging module is used for packaging the geometric data of the minimum selection unit selected by the selection operation into the same grid structure before the minimum selection unit selected by the selection operation is subjected to the operation corresponding to the processing operation in response to the received processing operation;
the second display module is used for displaying the local structure corresponding to the minimum selection unit selected by the selection operation based on the network structure corresponding to the minimum selection unit selected by the selection operation; wherein the local structure is overlaid on the three-dimensional model.
8. An electronic device, comprising:
a processor and a memory, wherein the memory has stored therein a computer program which, when executed by the processor, performs the method of any of claims 1-6.
9. A computer-readable storage medium, characterized in that a computer program is stored in the storage medium, which computer program, when being executed by a processor, carries out the method of any one of claims 1-6.
CN202210363392.2A 2022-04-08 2022-04-08 Three-dimensional model display method, device, equipment and storage medium Active CN114445596B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210363392.2A CN114445596B (en) 2022-04-08 2022-04-08 Three-dimensional model display method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210363392.2A CN114445596B (en) 2022-04-08 2022-04-08 Three-dimensional model display method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114445596A CN114445596A (en) 2022-05-06
CN114445596B true CN114445596B (en) 2022-07-15

Family

ID=81358606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210363392.2A Active CN114445596B (en) 2022-04-08 2022-04-08 Three-dimensional model display method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114445596B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021022122A (en) * 2019-07-26 2021-02-18 キヤノン株式会社 Information processing apparatus, information processing method, data structure, and program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049896B (en) * 2012-12-27 2015-09-16 浙江大学 The geometric data of three-dimensional model and data texturing autoregistration algorithm
EP3451191B1 (en) * 2017-08-29 2024-03-13 Repsol, S.A. Computer implemented method for manipulating a numerical model of a 3d domain
CN111199086A (en) * 2018-10-31 2020-05-26 上海索辰信息科技有限公司 Three-dimensional geometric discretization processing system
US11450030B2 (en) * 2019-09-24 2022-09-20 Apple Inc. Three-dimensional mesh compression using a video encoder
EP4085634A4 (en) * 2020-01-02 2024-01-10 Nokia Technologies Oy A method, an apparatus and a computer program product for volumetric video encoding and decoding
CN112231961B (en) * 2020-12-10 2021-06-22 上海索辰信息科技股份有限公司 Large-scale finite element grid data storage and indexing method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021022122A (en) * 2019-07-26 2021-02-18 キヤノン株式会社 Information processing apparatus, information processing method, data structure, and program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
产品三维数据模型轻量化表示实现;刘云华等;《计算机辅助设计与图形学学报》;20060420(第04期);全文 *
基于通用模型文件的城市三维景观面向对象可视化方法;刘洁等;《计算机工程与应用》;20050601(第18期);全文 *

Also Published As

Publication number Publication date
CN114445596A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN112184738B (en) Image segmentation method, device, equipment and storage medium
CN110298413B (en) Image feature extraction method and device, storage medium and electronic equipment
CN110413812B (en) Neural network model training method and device, electronic equipment and storage medium
CN110298851B (en) Training method and device for human body segmentation neural network
CN110188782B (en) Image similarity determining method and device, electronic equipment and readable storage medium
CN109766319B (en) Compression task processing method and device, storage medium and electronic equipment
CN111352957A (en) Remote dictionary service optimization method and related equipment
CN110489219B (en) Method, device, medium and electronic equipment for scheduling functional objects
CN114445596B (en) Three-dimensional model display method, device, equipment and storage medium
CN111199569A (en) Data processing method and device, electronic equipment and computer readable medium
CN115328429A (en) Display method, display device, electronic apparatus, and storage medium
CN113808238A (en) Animation rendering method and device, readable medium and electronic equipment
CN111338827B (en) Method and device for pasting form data and electronic equipment
CN110807114B (en) Method, device, terminal and storage medium for picture display
CN110825480A (en) Picture display method and device, electronic equipment and computer readable storage medium
CN115908679A (en) Texture mapping method, device, equipment and storage medium
CN113506356A (en) Drawing method and device of area map, readable medium and electronic equipment
CN110633121A (en) Interface rendering method and device, terminal equipment and medium
CN111258582A (en) Window rendering method and device, computer equipment and storage medium
CN111445551B (en) Image design method and device, electronic equipment and storage medium
CN115761248B (en) Image processing method, device, equipment and storage medium
CN112215789B (en) Image defogging method, device, equipment and computer readable medium
CN111461966B (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN116700874A (en) Asynchronous rendering method, device, equipment and storage medium
CN112070701A (en) Image generation method, device, equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Meng Xiangfei

Inventor after: Li Jianzeng

Inventor after: Yang Lin

Inventor after: Xia Zijun

Inventor after: Liu Chunwei

Inventor after: Cao Xuxiang

Inventor after: Duan Lili

Inventor before: Meng Xiangfei

Inventor before: Li Jianzeng

Inventor before: Yang Lin

Inventor before: Yang Canqun

Inventor before: Xia Zijun

Inventor before: Liu Chunwei

Inventor before: Cao Xuxiang

Inventor before: Duan Lili

CB03 Change of inventor or designer information