Method for storing topological information of three-dimensional geometric model based on sparse voxel data block

CN122223269BActive Publication Date: 2026-10-16BEIJING DONGFANG CHUANGDA SOFTWARE CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610344439.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-20
Publication Date
2026-10-16
Estimated Expiration
2046-03-20

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明提供了一种基于稀疏体素数据块的三维几何模型拓扑信息存储方法,该方法基于稀疏体素数据块存储形式,在不破坏原有VDB数据结构的存储特征的基础上,解决了VDB数据结构无法精准记录拓扑信息的问题,可以实现精确保留并有效检索边界表达形式的三维几何模型中的拓扑信息

Benefits of technology

[0015] The method of this invention is easy to implement. Existing mature OpenVDB tools can be used to initialize voxel block labeling of the 3D geometric model in the form of boundary representation. The labeled voxel units are used as the input basis, or completely blank labeled voxel units (i.e., unlabeled voxel units) can be used as input data. The voxel unit labeling process has no special requirements on the voxel block resolution. Furthermore, the method of this invention can automatically label and identify various geometric feature units, and the topological voxel encoding used in this invention supports fast querying of geometric and topological information in constant time. It achieves accurate recording of topological information without destroying the storage characteristics of the original VDB data structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122223269B_ABST
    Figure CN122223269B_ABST
Patent Text Reader

Abstract

The application discloses a three-dimensional geometric model topology information storage method based on sparse voxel data blocks, and belongs to the technical field of computer graphics, computer animation and geometric modeling. The method firstly acquires a three-dimensional geometric model described by a boundary expression method and initializes a voxel index space, then accurately marks voxel units having a correlation relationship with geometric elements in the three-dimensional geometric model, classifies the marked voxel units, and finally constructs a bimodal hierarchical topology voxel code according to the classification mark information, so that the missing three-dimensional geometric model topology information in the sparse voxel data block storage form is completely recorded and used for subsequent efficient information retrieval and management. The method of the application solves the problem that the sparse voxel data block storage form cannot accurately record topology information without destroying the original sparse voxel data block storage characteristics, and realizes more efficient and more accurate information recording for complex three-dimensional geometric models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of computer graphics, computer animation and geometric modeling technology, and specifically relates to a method for storing topological information of three-dimensional geometric models based on sparse voxel data blocks. Background Technology

[0002] In computer graphics, the Voxel Data Base (VDB) file format (also known as Volumetric Data Block or Volumetric Dynamic B+tree) is a file format and data structure used to store sparse voxel (3D pixel) data. It is primarily used for storing and exchanging volumetric data, such as simulation data for special effects like smoke, flames, clouds, and liquids, or complex 3D geometric models. It features efficient storage, fast access, and support for dynamic topological transformations. OpenVDB is an open-source C++ library that provides code to implement the VDB data structure and a complete toolset for creating, editing, and manipulating volumetric data. It is currently the mainstream data management tool for recording geometric information in the form of sparse voxel data blocks.

[0003] Boundary Representation (B-Rep) is currently the mainstream model representation method in the field of 3D geometric modeling. This method assumes that a 3D object is precisely defined by its boundary surfaces. A complete B-Rep model typically follows a hierarchical topological structure of "volume-face-loop-edge-point," fully storing the model's geometric and topological information. However, the native design of the VDB data structure only provides a general topology to describe the active or inactive states of voxels, using bitmasks to mark active voxels and their corresponding positions. It lacks awareness of the model's geometric topology (such as vertices, edges, faces, and their connections). VDB / OpenVDB and similar methods lack topological awareness and cannot identify edge and point categories when representing 3D geometric models described by boundary representation methods. Although VDB data structures support implicit model representation, the discretized voxels cannot distinguish different topological information. The model represented by the VDB data structure identifies all voxel units as one class, making it impossible to retain the topological relationships between geometric elements in the original geometric model.

[0004] For 3D geometric models represented using boundary representation methods (i.e., 3D geometric models in boundary representation form), storing them in the form of sparse voxel data blocks facilitates many operations such as parallel geometric analysis, geometric feature discretization, and voxel-based geometric processing. Therefore, in the process of converting from boundary representation form to sparse voxel data block storage form, it is desirable to accurately preserve the original topological information. At the same time, while retaining the core storage and query advantages of the VDB data structure, considering the content and form of the recorded topological information storage and balancing the storage and query efficiency of topological information is of great significance for the efficient storage and accurate conversion of various forms of 3D geometric models. Summary of the Invention

[0005] In view of this, the present invention provides a method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks. This method, based on the storage format of sparse voxel data blocks, solves the problem that the VDB data structure cannot accurately record topological information without destroying the storage characteristics of the original VDB data structure. It can accurately preserve and effectively retrieve topological information in the three-dimensional geometric model with boundary representation.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks, comprising:

[0008] Step 1: Obtain the voxel space level parameters and the model data of the 3D geometric model; initialize the voxel index space according to the voxel space level parameters; and map the coordinate space of the 3D geometric model to the voxel index space; the 3D geometric model is represented using a boundary representation method; the model data includes the geometric information of the 3D geometric model and the topological association information between geometric elements; the voxel index space includes multiple voxel units;

[0009] Step 2: Mark the voxel units among the plurality of voxel units that have a relationship with the geometric elements of the three-dimensional geometric model; the geometric elements include points, edges, and faces;

[0010] Step 3: Based on the topological association information, classify the labeled voxel units to obtain the classification label information of each labeled voxel unit;

[0011] Step 4: Based on the classification labeling information of each labeled voxel unit, construct the bimodal hierarchical topological voxel code corresponding to each labeled voxel unit, and store each labeled voxel unit and its corresponding bimodal hierarchical topological voxel code based on the storage rules of sparse voxel data blocks.

[0012] In a second aspect, the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks.

[0013] Thirdly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks.

[0014] The beneficial effects of this invention are as follows:

[0015] The method of this invention is easy to implement. Existing mature OpenVDB tools can be used to initialize voxel block labeling of the 3D geometric model in the form of boundary representation. The labeled voxel units are used as the input basis, or completely blank labeled voxel units (i.e., unlabeled voxel units) can be used as input data. The voxel unit labeling process has no special requirements on the voxel block resolution. Furthermore, the method of this invention can automatically label and identify various geometric feature units, and the topological voxel encoding used in this invention supports fast querying of geometric and topological information in constant time. It achieves accurate recording of topological information without destroying the storage characteristics of the original VDB data structure. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks according to the present invention.

[0017] Figure 2 This is a schematic diagram of the 6-connectivity rule, 18-connectivity rule, and 26-connectivity rule for voxel units.

[0018] Figure 3 A two-dimensional schematic diagram of the ordered voxel path completion process.

[0019] Figure 4 This is an example of a three-dimensional geometric model according to an embodiment of the present invention and a schematic diagram after voxel unit labeling.

[0020] Figure 5 This is a schematic diagram of the structure for bimodal hierarchical topological voxel encoding.

[0021] Figure 6 This is a diagram illustrating the types and codes of geometric elements.

[0022] Figure 7 A schematic diagram illustrating the encoding of 26-bit direction information bits.

[0023] Figure 8 This is a schematic diagram of the voxel classification model inside a leaf node.

[0024] Figure 9 A diagram illustrating the orientation encoding and orientation information for different types of peripheral voxel units. Detailed Implementation

[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0026] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0027] The terms “first”, “second”, etc., are used to distinguish similar objects, not to describe or indicate a specific order or sequence.

[0028] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.

[0029] Furthermore, to better illustrate the present invention, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that the present invention can be practiced without certain specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order to highlight the spirit of the invention.

[0030] In boundary-representation 3D geometric models, the topological relationships between vertices, edges, and faces (including adjacency and containment relationships) are crucial and play a vital role in computer processing. However, when converting boundary-representation 3D geometric models to traditional sparse voxel data block storage, only basic geometric information and overall model topology are preserved; the topological relationships between geometric elements cannot be retained in traditional VDB data structures.

[0031] In view of this, the present invention proposes a method for storing topological information of three-dimensional geometric models based on sparse voxel data blocks, which can solve the problem that the VDB data structure cannot accurately record topological information without destroying the storage characteristics of the original VDB data structure.

[0032] The principle of this invention is as follows: First, based on the input voxel space hierarchy parameters, an initial voxel index space is constructed to determine the basic voxel unit parameters. For all voxel units in the voxel index space, various methods, including but not limited to symbolic distance calculation, level set methods, and OpenVDB data import methods, can be used to construct initial labels, completely enclosing the corresponding voxel units of the 3D geometric model representing the input boundary. On this basis, further refinement of the intersection relationships between each voxel unit and geometric elements such as points, faces, and edges is achieved through point element positioning, face element judgment, and edge element feature extraction. Simultaneously, the voxel unit is classified and labeled based on the complete intersection features between each voxel unit and the aforementioned geometric elements. Finally, by constructing a bimodal hierarchical topological voxel encoding, the above topological information is embedded into the 3D geometric model stored in VDB form through encoding, realizing an efficient and fast-accessible topological information storage method.

[0033] Figure 1 The flowchart of the method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks according to the present invention is as follows: Figure 1 As shown, the method includes the following steps:

[0034] Step 1: Obtain the voxel space level parameters and the model data of the 3D geometric model; initialize the voxel index space according to the voxel space level parameters; and map the coordinate space of the 3D geometric model to the voxel index space; the 3D geometric model is represented using a boundary representation method; the model data includes the geometric information of the 3D geometric model and the topological association information between geometric elements; the voxel index space includes multiple voxel units;

[0035] Step 2: Mark the voxel units that are associated with the geometric elements of the three-dimensional geometric model among the multiple voxel units; the geometric elements (also referred to as topological elements) include points, edges, and faces;

[0036] Step 3: Based on the topological association information, classify the labeled voxel units to obtain the classification label information of each labeled voxel unit;

[0037] Step 4: Based on the classification labeling information of each labeled voxel unit, construct the bimodal hierarchical topological voxel code corresponding to each labeled voxel unit, and store each labeled voxel unit and its corresponding bimodal hierarchical topological voxel code based on the storage rules of sparse voxel data blocks.

[0038] from Figure 1As shown in the flowchart, the method of the present invention includes four stages. The first stage is to initialize the voxel index space based on the three-dimensional geometric model of the input boundary expression form. The voxel index space is used to establish a sparse voxel data block structure. The second stage is to mark the voxel units through which geometric elements such as vertices, faces and edges in the three-dimensional geometric model pass, based on the initial voxel index space. The third stage is to establish standard classification labels for the marked voxel units based on the hierarchical topological relationship of the three-dimensional geometric model. The fourth stage is to establish bimodal hierarchical topological voxel encoding based on the classification labels and embed it into the standard VDB data format.

[0039] The method for storing topological information of three-dimensional geometric models based on sparse voxel data blocks according to the present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0040] The method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks according to the present invention includes the following steps:

[0041] Step 1: Obtain the voxel space level parameters and the model data of the 3D geometric model; initialize the voxel index space according to the voxel space level parameters; and map the coordinate space of the 3D geometric model to the voxel index space; the 3D geometric model is represented by a boundary representation method; the model data includes the geometric information of the 3D geometric model and the topological association information between geometric elements; the voxel index space includes multiple voxel units.

[0042] In this embodiment, the voxel unit is a regular hexahedron with a side length of 1.

[0043] For example, the voxel space hierarchy parameters can be set by the user according to actual needs. These parameters may include the boundary range of the voxel index space (including the boundary ranges along the X, Y, and Z axes), the number of tree-like data structure levels, and the branching factor (logarithm to base 2) of each level node. Voxel units can be arranged according to the boundary range of the voxel index space; the three-dimensional space covered by the arranged voxel units constitutes the initialized voxel index space.

[0044] For example, the coordinate space of a 3D geometric model can be mapped to the voxel index space by a reversible continuous transformation function (either a linear or nonlinear function), thereby achieving a reversible continuous transformation between the two spaces (i.e., all points in the coordinate space of the 3D geometric model are continuously transformed to the voxel index space by a reversible continuous transformation function).

[0045] In the voxel index space, the index point is considered to be located at the center of each voxel unit. The coordinates of the index point (i.e., the center coordinates of the voxel unit) are represented by an integer triple (i, j, k) (where {i, j, k}∈Z, and Z is the integer space), where i, j, and k are the x-axis, y-axis, and z-axis components of the index point coordinates, respectively. The index point coordinates start at (0,0,0) and can be mapped back to their corresponding positions in world space through an inverse transformation.

[0046] For the coordinates (x, y, z) of a vertex p in the coordinate space of a 3D geometric model (where {x, y, z}∈R, and R is the real number space), after spatial mapping by an invertible transformation function, it can be transformed into the coordinates (x′, y′, z′) of the corresponding point p' in the voxel index space (where {x′, y′, z′}∈R).

[0047] Step 2: Mark the voxel units that are associated with the geometric elements of the three-dimensional geometric model among the multiple voxel units; the geometric elements include points, edges, and faces.

[0048] First, label the voxel units associated with vertices in the 3D geometric model.

[0049] For example, the voxel unit containing the point corresponding to the first vertex in the voxel index space can be marked as the voxel unit associated with the first vertex; where the first vertex is any vertex in the three-dimensional geometric model.

[0050] In the initial voxel index space, if the X-axis coordinate component of the center coordinate of a voxel cell is t (t∈Z), then the coordinate value interval [t - 0.5, t + 0.5) on the X-axis is all within that voxel cell. Therefore, for a real coordinate value r (r∈R) on the X-axis, the X-axis coordinate component of the center coordinate of the voxel cell containing that value can be obtained by calculating the integer part of r + 0.5. Similarly, if the real coordinate values ​​on the Y-axis / Z-axis are known, the Y-axis / Z-axis coordinate components of the center coordinate of the voxel cell containing that coordinate value can be calculated.

[0051] According to the above mapping rules, for a vertex p in the three-dimensional geometric model, the above calculation method is applied to each coordinate component of the corresponding point p′ in the voxel index space (x′, y′, z′) to determine the center coordinates (i1, j1, k1) of the voxel cell where point p′ is located in the voxel index space, i.e., i1=[x′+0.5], j1=[y′+0.5], k1=[z′+0.5]; where [·] is the floor function, and i1, j1, and k1 are the x-axis, y-axis, and z-axis components of the center coordinates of the voxel cell where p′ is located, respectively.

[0052] The corresponding voxel unit v can be determined based on the center coordinates (i, j, k) of the voxel unit, i.e., point p′ is in voxel unit v. Since point p′ is the point in the voxel index space corresponding to vertex p, voxel unit v can be called the voxel unit containing vertex p, and voxel unit v is marked as the voxel unit associated with vertex p. Performing the above operation on each vertex in the 3D geometric model will mark the voxel units associated with each vertex.

[0053] Then, the voxel units associated with the faces in the 3D geometric model are labeled.

[0054] For example, the voxel units associated with the first target surface in the voxel index space can be marked according to the shortest distance from the center point of each voxel unit in the voxel index space to the first target surface; wherein, the first target surface is any surface in the three-dimensional geometric model.

[0055] As an example, methods such as Level Set can be used to construct the unsigned distance field corresponding to each face in a 3D geometric model. The unsigned distance field corresponding to each face contains the shortest distance from the center point of each voxel unit to that face.

[0056] The specific implementation process of labeling voxel units associated with faces in the 3D geometric model is as follows:

[0057] First, construct the search voxel set. For the first target surface, select the voxel unit containing any point on the first target surface (i.e., the voxel unit containing the corresponding point after mapping each point to the voxel index space) as the seed voxel unit and add it to the search voxel set. The initial search voxel set only contains the voxel unit containing any point selected from the first target surface. If the search voxel set is not empty, perform the following operations for each seed voxel unit in the search voxel set:

[0058] (a) Calculate the shortest distance from the center point of the seed voxel unit to the first target surface.

[0059] (b) If the square of the shortest distance is less than 0.25 (i.e., the square of the radius of the inscribed sphere of the voxel unit), the seed voxel unit is considered to intersect the first target surface, and is marked as a voxel unit associated with the first target surface. If the square of the shortest distance is greater than 0.75 (i.e., the square of the radius of the circumscribed sphere of the voxel unit), the seed voxel unit is considered not to intersect the first target surface, and is marked as a processed voxel unit to avoid repeated processing of unmarked voxel units. If the square of the shortest distance is between 0.25 and 0.75 (inclusive), the intersection situation needs to be further determined based on the number of intersection points between the six faces of the seed voxel unit and the first target surface. If any face of the seed voxel unit intersects the first target surface, the seed voxel unit is considered to intersect the first target surface, and is marked as a voxel unit associated with the first target surface.

[0060] (c) Remove the seed voxel unit from the search voxel set. If the seed voxel unit is marked as a voxel unit associated with the first target face, add its 26 adjacent voxel units (i.e., adjacent voxel units that have a common face, common edge, or common point with the seed voxel unit) to the search voxel set and continue with step (a) until the search voxel set is empty.

[0061] By performing the above operations on each face in the 3D geometric model, the voxel units associated with each face can be labeled.

[0062] Finally, mark the voxel units associated with the edges in the 3D geometric model.

[0063] For example, the voxel units associated with the first target edge in the voxel index space can be marked based on the intersection of the voxel unit sets associated with each face adjacent to the first target edge in the three-dimensional geometric model and the one-dimensional topological properties of the edge; the first target edge is any edge in the three-dimensional geometric model.

[0064] The three-dimensional geometric model addressed in this embodiment is a watertight model. For a watertight model represented by the boundary representation method, each edge element of the three-dimensional geometric model is a common boundary of two or more face elements. Therefore, the voxel unit associated with the edge element should be a subset of the set of voxel units associated with the face with that edge as the boundary. In order to avoid the violation of this principle caused by the calculation error of the voxel unit obtained by calculating the intersection of edges separately, this invention further determines the set of voxel units associated with edges based on the intersection of the determined set of voxel units associated with faces.

[0065] Furthermore, the voxel cell labeling of edges in the 3D geometric model is not limited to recording the voxel cells associated with the edge. It also requires constructing an ordered voxel path between the two endpoints of the edge based on the voxel cells associated with the edge, and recording the entry and exit directions of each voxel cell. An edge is essentially a one-dimensional continuous manifold, and theoretically, the voxel cell extension path from the starting point to the ending point is strictly limited by bidirectional topological constraints. The ordered voxel path of an edge should satisfy path uniqueness; apart from the two endpoints constituting the edge, the voxel cell containing any point on the edge has only two adjacent directions: the forward direction (i.e., the extension direction along the starting endpoint to the ending endpoint) and the backward direction (i.e., the extension direction along the ending endpoint to the starting endpoint).

[0066] As an example, the voxel unit associated with an edge in a 3D geometric model can include:

[0067] For the first target edge, first determine the voxel units associated with each adjacent face of the edge (i.e. the face adjacent to the edge). All voxel units associated with each adjacent face constitute the set of voxel units associated with that adjacent face. Calculate the common intersection of the voxel unit sets associated with all adjacent faces of the edge, which is used as the initially determined set of voxel units associated with the first target edge.

[0068] Based on this, further testing is conducted to determine whether each voxel in the initially determined voxel set satisfies the 6-connectivity rule. For example... Figure 2 As shown, the 6-connectivity rule indicates that two adjacent voxel units share a common interface, while the 18-connectivity rule indicates that two adjacent voxel units share a common interface or edge, and the 26-connectivity rule indicates that adjacent voxel units share a common face, edge, or point. For the 26-connectivity and 18-connectivity rules, when processing edge voxel units, multiple adjacent voxel units are recorded simultaneously. This strategy can lead to divergence in edge directions; a single edge may map to multiple voxel branches, resulting in no unique path and contradicting the topological properties of edges. In contrast, the 6-connectivity rule only allows voxel adjacency sharing a complete face, requiring the path to extend strictly along the coordinate axis direction, and the adjacency direction to be unique. Therefore, this invention adopts the 6-connectivity topological connectivity rule for edge voxel unit labeling to ensure the uniqueness of edge path directions and topological consistency, avoiding path divergence.

[0069] However, due to the size of the voxel units relative to the geometric model, it is difficult to ensure that the set of voxel units associated with the initially determined first target edge satisfies the strict bidirectional topological constraint on the voxel unit extension path from the start point to the end point using only the 6-connectivity rule. This often results in the intersection of the set of voxel units associated with surfaces containing not only voxel units associated with edges, but also other voxel units not associated with edges.

[0070] Therefore, for the set of voxel units associated with the first target edge initially determined in the previous step, a local correction strategy is adopted. Starting from the voxel unit at the starting point of the edge, each unit is checked to see if it meets the requirement of strict face adjacency along the edge path. When the path diverges, that is, when there are two backward directions, the correct path is corrected by performing the following precise intersection detection on the face-associated voxel units.

[0071] When modifying the set of voxel units associated with the first target edge, only voxel units that are penetrated by the first target edge are marked as voxel units associated with the first target edge. That is, only voxel units that have two or more intersections with the first target edge (the intersections are not the endpoints of the edge) are marked to ensure that the path is unique.

[0072] Furthermore, the set of voxel units associated with the first target edge obtained through the preliminary correction process may not satisfy the 6-connectivity rule. This invention further detects and processes this set, sorting the voxel units intersecting the first target edge based on the parameter value of the intersection point relative to the starting point of the first target edge, thus forming an ordered voxel path corresponding to the first target edge. Since there are cases where the first target edge passes through the voxel unit boundary but does not penetrate the voxel unit, adjacent voxel units on the ordered voxel path may not spatially conform to the 6-connectivity topological connectivity principle. To address this, the ordered voxel path is optimized by inserting voxel units to ensure that voxel units are adjacent through shared surfaces. The specific processing method is as follows:

[0073] Record the center coordinates (i1, j1, k1) of the previous voxel v1 and the center coordinates (i2, j2, k2) of the current voxel v2 along the forward or reverse path from the starting voxel v1. Calculate the number of coordinate axes jumped: d = dx + dy + dz, where dx = |i1 - i2|, dy = |j1 - j2|, dz = |k1 - k2|, and |·| represents the absolute value. Different values ​​of d are handled in the following three ways:

[0074] [1] When d=1, it means that only one coordinate axis is jumped (i.e., one of dx, dy or dz is 1 and the others are 0), which satisfies the topological connectivity rule of 6-connectivity and does not insert any voxel unit in the ordered voxel path.

[0075] [2] When d=3, it means that all three coordinate axes are jumped (i.e. dx=1, dy=1, dz=1), and intermediate voxel units v3 and v4 with center point coordinates (i2, j1, k1) are inserted in the ordered voxel path.

[0076] [3] When d=2, there are three different cases of coordinate axis jumps, which are handled separately:

[0077] ① If the x-axis and y-axis jump simultaneously (i.e. dx=1, dy=1, dz=0), insert an intermediate voxel unit v3 with center point coordinates (i2, j1, k1) in the ordered voxel path;

[0078] ② If the y-axis and z-axis jump simultaneously (i.e., dx=0, dy=1, dz=1), insert an intermediate voxel unit v3 with center point coordinates (i1, j2, k1) in the ordered voxel path;

[0079] ③ If the x-axis and z-axis jump simultaneously (i.e., dx=1, dy=0, dz=1), insert an intermediate voxel unit v3 with center point coordinates (i1, j1, k2) in the ordered voxel path.

[0080] The process of inserting intermediate voxel units described above is called the ordered voxel path completion process. After completion, an ordered voxel path that strictly satisfies the 6-connectivity rule is obtained. Figure 3 A two-dimensional schematic diagram of the ordered voxel path completion process is shown; where, Figure 3 The left-hand diagram in the image is a two-dimensional schematic diagram of an ordered voxel path that does not conform to the 6-connectivity rule; Figure 3 The right-hand side of the diagram is a two-dimensional schematic diagram of the ordered voxel path that conforms to the 6-connectivity rule after completion; Figure 3 The blue cells in the diagram represent the voxel cells contained in the ordered voxel path before completion. Figure 3 The green cells in the diagram represent intermediate voxel cells inserted during the completion process. By performing the above operation on each edge in the 3D geometric model, the voxel cells associated with each edge can be marked and the ordered voxel paths corresponding to each edge can be recorded.

[0081] Figure 4 This diagram illustrates a three-dimensional geometric model example of an embodiment of the present invention and its schematic diagram after voxel unit labeling.

[0082] Step 3: Based on the topological association information, classify the marked voxel units to obtain the classification label information of each marked voxel unit.

[0083] Based on the hierarchical topological relationships of points, edges, and faces provided by the boundary representation method in the 3D geometric model (the structured hierarchical relationships formed by connections and organization between different geometric elements in the model), the labeled voxel units are classified. In this embodiment, the 3D geometric model is a watertight model; voxel units marked by lower-level geometric elements are necessarily marked by higher-level geometric elements of their parent class. According to the operation in step 2, the voxel units in the current voxel index space have been marked and assigned to associated vertices, edges, and faces, among other geometric elements. Two cases exist:

[0084] (1) The voxel unit is simultaneously labeled as associated with multiple types of geometric elements at different levels, and the associated geometric elements have a hierarchical topological relationship.

[0085] (2) A voxel is simultaneously marked as associated with multiple types of geometric elements at the same level, but not with lower-level geometric elements that form an intersection, or a voxel is simultaneously marked as associated with geometric elements of different types, and there is no association between the associated geometric elements. This situation is mainly due to the fact that the mesh resolution is too large, resulting in geometric elements without topological relationships marking voxel elements at the same position.

[0086] Based on the above two situations, the labeled voxel units are classified as follows:

[0087] Based on the geometric element category information associated with voxel units, two concepts, pseudo-edge voxels and pseudo-vertex voxels, are proposed according to the principle of topological hierarchy inheritance. Specifically, if a voxel unit is marked as being associated with two faces, but these two faces do not have a topological relationship, it is classified as a pseudo-edge voxel according to the topological hierarchy inheritance logic; if a voxel unit is marked as being associated with multiple unrelated faces, or multiple unrelated vertices, or multiple unrelated edges, it is classified as a pseudo-vertex voxel.

[0088] Based on this, the present invention proposes five types of voxel units: face voxel units, true edge voxel units, false edge voxel units, true point voxel units, and false point voxel units.

[0089] For example, based on the topological association information between geometric elements in a 3D geometric model, the labeled voxel units can be classified into face voxel units, true edge voxel units, false edge voxel units, true point voxel units, and false point voxel units. The classification criteria are as follows:

[0090] ① Face voxel element: If a voxel element is marked as being associated with a real face in a 3D geometric model, and the voxel element intersects with the real face, the voxel element is classified as a face voxel element.

[0091] ② True edge voxel: If a voxel is marked as being associated with a real edge in the 3D geometric model, and the voxel intersects with the real edge (including cases where the real edge penetrates the voxel and cases where it does not), the voxel is classified as a true edge voxel.

[0092] ③ False edge voxel element: If a voxel element is marked as being associated with two faces in a 3D geometric model at the same time, but there is actually no edge intersecting with the voxel element, the voxel element is classified as a false edge voxel element.

[0093] ④ True point voxel unit: If a voxel unit is marked as being associated with a real vertex in the 3D geometric model, and that real vertex is in the voxel unit, the voxel unit is classified as a true point voxel unit.

[0094] ⑤ Pseudo-vertex voxel: If a voxel is marked as being associated with multiple vertices, faces, or edges in a 3D geometric model simultaneously, but has no real vertices, it is classified as a pseudo-vertex voxel. For example, the classification information may include the category of the voxel and its label.

[0095] Step 4: Based on the classification labeling information of each labeled voxel unit, construct the bimodal hierarchical topological voxel code corresponding to each labeled voxel unit, and store each labeled voxel unit and its corresponding bimodal hierarchical topological voxel code based on the storage rules of sparse voxel data blocks, so as to achieve consistent storage of geometric information and topological information in the sparse voxel data block storage form.

[0096] Based on the aforementioned voxel unit classification and labeling, the voxel units (i.e., the labeled voxel units) traversed by the 3D geometric model are stored. The main storage method is based on the VDB data structure. For each labeled voxel unit in the voxel index space, a hierarchical sparse voxel grid is constructed, and only voxel units with non-zero labels are actually stored. During storage, a hierarchical hash table is constructed according to the hierarchy definitions of the input root node, intermediate nodes, and leaf nodes, following the VDB data structure. The hierarchical hash table divides the raster into multiple levels, each containing a set of voxel grid units (one voxel grid unit corresponds to one voxel unit). When a voxel grid unit has a non-zero value (a voxel grid unit with a non-zero value corresponds to a voxel unit with a non-zero label), it is stored in the corresponding level.

[0097] In order to preserve the efficient storage and fast access and query features of the original VDB data structure, this invention constructs a 64-bit bimodal hierarchical topological voxel code corresponding to each voxel unit based on the classification label information in step 3. This code is stored in the voxel unit as topological information data.

[0098] Bimodal hierarchical topological voxel encoding is divided into a 64-bit general encoding for point, edge, and face elements, and a 64-bit specific encoding for standard edges. The two types of encoding employ differentiated designs in bits 34-59 (26 bits in total). A standard edge refers to an edge that, when discretized into an ordered sequence of voxels, is uniquely constrained to appear only once in the path (excluding loops). The general encoding enables universal querying of topological information for all geometric elements, while the specific encoding provides directional indexing information for standard edges.

[0099] The bit allocation and functions of the common parts of the two types of encoding are described below.

[0100] Figure 5 This is a schematic diagram of the dual-modal hierarchical topological voxel encoding of the present invention. To achieve efficient encoding of topological information in voxel units, a compact 64-bit encoding scheme is adopted, utilizing the lower 16 bits (bits 0-15) and bits 60-62, a total of 19 bits, to comprehensively express and distinguish the geometric element category and its index information. Specifically, the lower 16 bits of the encoding are used to record the specific index value of the geometric element. Since all geometric elements (including points, edges, and faces) are sequentially numbered starting from 0 from a unified index pool, and during storage, geometric elements are further divided into real geometric elements (i.e., real topological entities existing in the 3D geometric model) and pseudo geometric elements (pseudo topological entities generated during storage), additional bits are needed to mark the geometric element type and authenticity. Therefore, bit 62 of the encoding is specifically defined as the geometric element authenticity flag bit:

[0101] When the 62nd bit is 0, it means that the voxel unit is associated with a real geometric element that actually exists in the three-dimensional geometric model;

[0102] When bit 62 is 1, it indicates that the voxel unit is associated with a pseudo-geometric element generated during priority dynamic coloring.

[0103] Furthermore, the 60th and 61st bits of the encoding, a total of 2 bits, are used to represent the specific type of the geometric element:

[0104] The 60th and 61st positions are "00": This indicates that the voxel unit is associated with a face element.

[0105] The 60th and 61st positions are "01": This indicates that the voxel unit is associated with a point element.

[0106] The 60th and 61st positions are "1x": This indicates that the voxel unit is associated with an edge element. Among them, "10" indicates an edge element stored in a general encoding method, while "11" indicates an edge element stored in a specific encoding method.

[0107] Therefore, by combining the geometric element authenticity flag (bit 62) and the geometric element type (bits 60-61), a variety of geometric element types and their codes are fully identified. Figure 6The diagram illustrates the 60-62 bit encodings corresponding to several different types of geometric elements according to an embodiment of the present invention. It should be noted that edge elements with a specific encoding (i.e., bits 60-61 being 11) are only applicable to edge-class topological entities that meet the local feature size requirements. However, the set of voxel units associated with logical pseudo-edge classes generated during storage cannot meet this feature condition, therefore there are no voxel units associated with pseudo-edges with a 60-62 bit encoding of 111.

[0108] The 16th to 33rd bits of the encoding are a doubly linked list pointer field, used to implement fast predecessor and successor lookup of the same voxel unit within the leaf node.

[0109] Specifically, the linked list pointer field does not store absolute voxel coordinate information, but rather stores the offset information of logically adjacent predecessor and successor voxel units relative to their respective leaf nodes. According to the default VDB configuration, each leaf node manages a 23×23×23 voxel array; therefore, the local coordinates (x, y, z) of each voxel unit within a leaf node can be converted into a 9-bit offset representation. This invention divides bits 16-33 (18 bits in total) into two 9-bit subfields: the high 9 bits (bits 25-33) are used to store the local coordinate offsets of logically adjacent predecessor voxel units, and the low 9 bits (bits 16-24) are used to store the local coordinate offsets of logically adjacent successor voxel units.

[0110] Relying solely on the relative offset information within the leaf nodes stored in bits 16-33 is insufficient for global localization of adjacent voxel units across leaf nodes. Therefore, this invention further utilizes bits 34-59 as an additional supplement to store or assist in determining the global spatial coordinate information of adjacent voxel units, thereby enabling efficient querying across leaf nodes.

[0111] For a general encoding scheme, this invention uses bits 34-59, a total of 26 bits, as direction information bits to identify whether there are voxel units of the same label type (i.e., voxel units with the same label type as the current voxel unit) among the 26 adjacent leaf nodes surrounding the current leaf node. Each bit is labeled in binary form:

[0112] "1": indicates that there is a target type voxel unit in the adjacent leaf node in the corresponding direction.

[0113] "0": indicates that there are no target type voxel units in the adjacent leaf nodes in the corresponding direction.

[0114] By traversing and judging these 26 directional bits, the distribution of target type voxel units in the surrounding adjacent leaf nodes can be quickly determined. The specific spatial orientation and correspondence of the 26 directional bits are as follows: Figure 7 As shown.

[0115] For standard edges, this invention employs a specific encoding method for optimized representation. In this specific encoding, the lower 6 bits of the 26-bit code (bits 34-59) are used to mark the direction of the extended leaf node of the edge. Combined with the offset information stored in the doubly linked list pointer field, this is used to locate the global spatial position information of adjacent voxel units. For an edge, the set of voxel units intersecting it has the ordered connection characteristic of face adjacency between voxel units. Normally, adjacent voxel units of the internal voxel units of a leaf node remain within the same leaf node. Only when a voxel unit belongs to the voxel unit surrounding the leaf node can it cross over to an adjacent leaf node.

[0116] Based on the characteristics of spatial adjacency, this invention refines the classification of voxels within leaf nodes: the voxels constituting leaf nodes are divided into peripheral voxels and internal voxels. For example... Figure 8 As shown, the outer voxels are further subdivided into face-adjacent outer voxels ( Figure 8 The light blue voxels in the middle), the adjacent outer voxels ( Figure 8 (dark blue voxels in the middle), points adjacent to the outer voxels ( Figure 8 (The red voxel in the text). The above concepts will be explained below:

[0117] (1) Internal voxels: voxels inside a leaf node that are not adjacent to other leaf nodes.

[0118] (2) Peripheral voxels: The voxels inside a leaf node that are adjacent to other leaf nodes are called peripheral voxels.

[0119] Each leaf node contains a voxel array that forms a regular hexahedron, possessing the characteristics of points, edges, and faces. Based on their spatial location, this invention categorizes them as follows:

[0120] [1] Adjacent peripheral voxels: voxels that are adjacent to other leaf node faces in the peripheral voxel category.

[0121] [2] Edge-adjacent outer voxels: Voxels in the outer voxels that are adjacent to the edges of other leaf nodes.

[0122] [3] Point adjacent peripheral voxels: voxels in the peripheral voxels that are adjacent to other leaf nodes.

[0123] For queries involving cross-leaf nodes, accessing adjacent leaf nodes only involves visiting the adjacent voxel element when the currently accessed voxel element is a peripheral voxel element. Since the set of voxel elements intersecting with standard edges satisfies the strict face adjacency property, the direction of an edge must enter from the face of one voxel element and exit from the face of another voxel element. Therefore, from this perspective, we can analyze the characteristics of the face adjacency directions of different types of peripheral voxel elements inside a leaf node: face-adjacent peripheral voxel elements have only one adjacent leaf node direction; edge-adjacent peripheral voxel elements have two faces adjacent to other leaf nodes, possessing two adjacent leaf node directions; and point-adjacent peripheral voxel elements have three adjacent leaf node directions.

[0124] Based on this, the present invention encodes and records the direction information of adjacent leaf nodes using 3 bits, where "000" represents the current leaf node, and other specific encoded values ​​need to be determined separately based on the specific type of the peripheral voxel unit and its possible extension directions. The direction encoding of adjacent leaf nodes for different types of peripheral voxel units is mapped to the offset direction of adjacent leaf nodes as follows: Figure 9 As shown, Figure 9 In this context, p1-p8 represent the voxel unit point orientation, and e1-e... 12 f1-f6 represent the voxel element edge direction, and f1-f6 represent the voxel element face direction; only 3 bits are needed to effectively identify the direction information of the leaf node where the predecessor or successor voxel element is located. The specific allocation is as follows:

[0125] Positions 37-39: Used to identify the leaf node direction to which the precursor voxel unit belongs.

[0126] Positions 34-36: Used to identify the leaf node direction to which the successor voxel unit belongs.

[0127] The present invention provides a method for storing topological information of 3D geometric models based on sparse voxel data blocks. First, it acquires a 3D geometric model described by a boundary representation method and initializes the voxel index space. Then, it precisely marks voxel units that are associated with geometric elements in the 3D geometric model and classifies these marked voxel units. Finally, it constructs a bimodal hierarchical topological voxel encoding based on the classification and marking information, completely recording the missing topological information of the 3D geometric model in the sparse voxel data block storage format for subsequent efficient information retrieval and management. The method of this invention is highly efficient and accurate. Without disrupting the storage characteristics of the original VDB data structure, it solves the problem that the VDB data structure cannot accurately record topological information, achieving more efficient and accurate information recording for complex 3D geometric models, facilitating further use of the 3D geometric model.

[0128] The present invention also provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks.

[0129] The present invention also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks.

[0130] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0131] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0132] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0133] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0134] The contents not described in detail in this specification are existing technologies known to those skilled in the art.

[0135] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. The above descriptions are exemplary and not exhaustive. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks, characterized in that, This method, applied in the field of computer animation, is used to record the topological information of a 3D geometric model when storing voxel data of the model in the form of sparse voxel data blocks. The method includes: Step 1: Obtain the voxel space hierarchy parameters and the model data of the 3D geometric model. Initialize the voxel index space according to the voxel space hierarchy parameters, and map the coordinate space of the 3D geometric model to the voxel index space. The 3D geometric model is represented using a boundary representation method. The model data includes the geometric information of the 3D geometric model and the topological association information between geometric elements. The voxel index space includes multiple voxel units. Initial markers are constructed using symbolic distance calculation, level set method, and OpenVDB data import method to completely wrap the corresponding voxel units of the 3D geometric model. Step 2: Mark the voxel units among the plurality of voxel units that have a relationship with the geometric elements of the three-dimensional geometric model; the geometric elements include points, edges, and faces; Step 3: Based on the topological association information, classify the labeled voxel units to obtain the classification label information of each labeled voxel unit; Step 4: Based on the classification labeling information of each labeled voxel unit, construct the bimodal hierarchical topological voxel code corresponding to each labeled voxel unit, and store each labeled voxel unit and its corresponding bimodal hierarchical topological voxel code based on the storage rules of sparse voxel data blocks; wherein, by constructing the bimodal hierarchical topological voxel code, the topological association information is embedded into the three-dimensional geometric model stored in the form of sparse voxel data blocks through encoding. Step 3 includes: Based on the topological association information, the marked voxel units are classified into face voxel units, true edge voxel units, false edge voxel units, true point voxel units, and false point voxel units; the classification labeling information includes the category of each of the marked voxel units. Specifically, if a voxel is marked as being associated with a real face in the 3D geometric model and intersects with that face, the voxel is classified as a face voxel. If a voxel is marked as being associated with a real edge in the 3D geometric model and intersects with that edge, the voxel is classified as a true edge voxel. If a voxel is marked as being associated with two faces in the 3D geometric model, but there is actually no intersecting edge with that voxel, the voxel is classified as a false edge voxel. If a voxel is marked as being associated with a real vertex in the 3D geometric model, and that real vertex is within the voxel, the voxel is classified as a true vertex voxel. If a voxel is marked as being associated with multiple vertices, multiple faces, or multiple edges in the 3D geometric model, but there are no real vertices within the voxel, the voxel is classified as a false vertex voxel.

2. The method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks according to claim 1, characterized in that, The voxel unit is a regular hexahedron with a side length of 1; the voxel space hierarchy parameters include the boundary range of the voxel index space; in step 1, initializing the voxel index space according to the voxel space hierarchy parameters includes: The voxel units are arranged according to the boundary range of the voxel index space to obtain the initialized voxel index space.

3. The method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks according to claim 1, characterized in that, Step 1, mapping the coordinate space of the three-dimensional geometric model to the voxel index space, includes: The coordinate space of the three-dimensional geometric model is mapped to the voxel index space through a reversible continuous transformation function.

4. The method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks according to claim 3, characterized in that, Step 2 includes: The voxel unit containing the point corresponding to the first vertex in the voxel index space is marked as the voxel unit associated with the first vertex; Based on the shortest distance from the center point of each voxel unit in the voxel index space to the first target surface, the voxel units associated with the first target surface among the plurality of voxel units are marked; Based on the intersection of the sets of voxel units associated with each face adjacent to the first target edge in the three-dimensional geometric model and the one-dimensional topological properties of the edge, the voxel units associated with the first target edge among the plurality of voxel units are marked. Wherein, the first vertex is any vertex in the three-dimensional geometric model; the first target face is any face in the three-dimensional geometric model; and the first target edge is any edge in the three-dimensional geometric model.

5. The method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks according to claim 4, characterized in that, Based on the shortest distance from the center point of each voxel unit in the voxel index space to the first target surface, the voxel units associated with the first target surface among the plurality of voxel units are marked, including: Construct a search voxel set; the initial search voxel set includes the voxel unit containing any point selected from the first target surface; If the search voxel set is not empty, for each voxel unit in the search voxel set, perform the following operations: Calculate the shortest distance L from the center point of the voxel unit to the first target surface; If L 2 If L < 0.25, the voxel unit is considered to intersect with the first target surface, and the voxel unit is marked as a voxel unit associated with the first target surface; if L 2 If the value is greater than 0.75, the voxel unit is considered not to intersect with the first target surface and is marked as a processed voxel unit; if 0.25 ≤ L 2 If the value is ≤0.75, determine whether there is at least one face among the six faces of the voxel unit that intersects with the first target face. If it does, the voxel unit is considered to intersect with the first target face and is marked as a voxel unit associated with the first target face. Otherwise, the voxel unit is marked as a processed voxel unit. Remove the voxel unit from the search voxel set. At the same time, if the voxel unit is marked as a voxel unit associated with the first target surface, add the 26 voxel units adjacent to the voxel unit to the search voxel set.

6. The method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks according to claim 4, characterized in that, Step 2 also includes: The voxel units intersecting with the first target edge are sorted to obtain the ordered voxel path corresponding to the first target edge; wherein, the voxel unit intersecting with the first target edge is a voxel unit that has two or more intersection points with the first target edge; the intersection points are not endpoints of the first target edge.

7. The method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks according to claim 1, characterized in that, The bimodal hierarchical topological voxel encoding includes general encoding and specific encoding; the general encoding is used to realize general query of the geometric elements; the specific encoding is used to provide orientation information for the orientation index of standard edges in the three-dimensional geometric model.

8. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by the one or more processors, the one or more processors implement the method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed by a processor, enable the processor to implement the method for storing topological information of a three-dimensional geometric model based on sparse voxel data blocks as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Access method of topological element of three-dimensional CSG-BRep (Constructive Solid Geometry-Boundary Representation) model

    CN105022910A

  • Self-adaptive standard part three-dimensional CAD model retrieval system

    CN110941732A