Three-dimensional model lightweight method and system based on hierarchy-material dual merging and sub-object triangular facet indexing

By using a dual grouping method of hierarchy and material and a sub-object index record, the problem of component hierarchy structure and interaction after Web3D model merging is solved, achieving efficient 3D model lightweighting and interactive functions, and significantly reducing the number of DrawCalls.

CN121482274APending Publication Date: 2026-02-06MAGIC DOU (JINAN) DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511675108.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-15
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing Web3D technologies cannot effectively preserve the hierarchical structure of components and the precise correspondence between triangles when merging 3D models, resulting in limited interactive functions and a large number of DrawCalls, leading to high performance overhead.

Method used

A merging method based on hierarchy and material dual grouping is adopted. By recording the triangular face index of sub-objects and unique processing of instantiated objects, a nested structure is formed, and the data is serialized into a binary file. The browser directly constructs BufferGeometry for interaction.

Benefits of technology

It significantly reduces the number of DrawCalls, supports precise interaction at the component level and on-demand loading, and improves rendering performance and interaction efficiency on the browser side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention discloses a three-dimensional model lightweight method and system based on hierarchy-material dual merging and sub-object triangular facet indexing. Performing double grouping on the input models according to levels and materials; combining vertex, index and UV data in the same material group, and correcting index offset in real time; synchronously recording a triangular facet starting index and a triangular facet ending index of each original object in the merged index buffer area to form a sub-object index record table; uniquely processing the instantiated object, and adding a transformation matrix array of the instantiated object; storing the unified structured data as a binary file; and the browser side carries out sequential analysis and realizes component-level pickup, hiding, local loading and other interactions through an index table. According to the method, the object-level accurate mapping relation is reserved while the rendering calling number and the file size are reduced, and the method is suitable for large-scale three-dimensional model lightweight processing of Web3D / VR.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of 3D data processing and browser rendering technology, specifically relating to a method and system for lightweighting large-scale 3D models for Web3D / VR. Background Technology

[0002] In existing Web3D technologies, geometry with the same material is typically merged to reduce draw calls. However, current solutions only merge along a single dimension, disrupting the hierarchical structure of architectural / mechanical models. Furthermore, the precise correspondence between original components and triangles cannot be preserved after merging, making it impossible to implement interactive functions such as component picking, hiding, partial loading, and dynamic updates. Separating the instantiated matrix from the geometric data requires a secondary mapping on the browser side, resulting in significant performance overhead. Summary of the Invention

[0003] The technical problem of this invention is to provide a lightweight method and system for 3D models that significantly reduces DrawCall while retaining the start and end indices of the triangular faces of each original component in the merged mesh, and supports precise interaction and on-demand loading of components on the browser side.

[0004] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A lightweight 3D model method based on hierarchy-material dual merging and sub-object triangle face indexing, characterized by the following steps: S1, Double-layer grouping: For all objects in the input model, first group them according to their layer, and then group them according to their material ID within each layer, forming a nested structure of layer → material → object list; S2, Same Material Geometry Merging: Within each finest-grained material group, the vertex, UV, and index data of multiple objects are continuously appended to the shared buffer. During the appending process, the current cumulative vertex offset is recorded in real time, and the index value is corrected by index + vertexOffset. S3, Sub-object Triangle Face Range Index Record: When merging the face data of any object, the start index (start) and end index (end) of the triangle face in the merged index buffer are recorded synchronously, and a mapping is established with the original object ID (id) to form a sub-object index record table; S4. Uniqueness processing of instantiated objects: Deduplication of reference sources for instantiated objects. If it is the first time it appears, merge the geometry and initialize the transformation matrix array. If it already exists, only append the new transformation matrix to the corresponding matrix array. S5. Binary Export: Serializes data into a single binary file in a fixed order as follows: (1) Number of merged objects; (2) Number of vertices; (3) Vertex buffer; (4) Number of indexes; (5) Index buffer; (6) UV count; (7) UV buffer; (8) Material ID length; (9) Material ID (UTF-8 string, 4-byte aligned); (10) Number of sub-object records; (11) Sub-object record array (repeated M times: id length → id → start → end) (12) Number of instance matrices; (13) Instance matrix array (float32×16); S6. Efficient parsing and interaction on the browser side: The browser side reads the above binary stream sequentially through DataView and builds BufferGeometry in one go; all interactive operations (such as picking, hiding, highlighting) are performed by querying the sub-object index record table and converting the triangular face index obtained by ray detection into the original object ID, without the need to rebuild any mapping structure.

[0005] As a further aspect of the present invention: each data entry in the sub-object index record of S3 includes the following fields: (1) id: The original object's unique identifier (string); (2) start: The starting index of the triangle facet of the object in the merged index buffer (int32); (3) end: The triangular termination index (int32, inclusive) of the object in the merged index buffer.

[0006] As a further aspect of the present invention: the binary file in S5 adopts little-endian order, all variable-length strings are padded to 4-byte alignment, and the file header may be appended with a magic number (such as "MGEO") and a version number.

[0007] The present invention also provides a system comprising: (1) Grouping module; (2) Merging and offset correction module; (3) Sub-object index record module; (4) Module for unique instantiation of objects; (5) Binary export module; (6) Browser-side parsing and rendering module.

[0008] Compared with the prior art, the beneficial effects of the present invention are: (1) Double grouping avoids cross-layer erroneous merging, with reasonable merging granularity, and measured DrawCall reduction of 85% to 95%; (2) The sub-object triangle range index is the first of its kind in the field, which completely solves the industry pain point of "unable to interact after merging", and supports picking, hiding, partial loading and attribute association of components; (3) The instance matrix is ​​bound to the geometric structure, and the browser can directly construct the InstancedMesh without secondary mapping; (4) Single-file binary format with extremely high parsing efficiency, and has been successfully integrated into SketchUp, Revit, 3ds Max and Blender export plugins. Attached Figure Description

[0009] Figure 1 This is a flowchart of the overall process of the method of the present invention.

[0010] Figure 2 Index records for sub-objects to represent intent.

[0011] Figure 3 This is a schematic diagram of the binary geometric file structure. Detailed Implementation

[0012] The present invention will now be described in further detail with reference to the accompanying drawings.

[0013] Step 1: Two-level grouping Iterate through all objects in the input model and establish a nested mapping structure: Map <layer, Map<materialId,Array <object>For example, in the architectural model, the "Walls" layer (layer="Walls") contains multiple wall objects, and all walls using the M_Concrete_01 material are grouped together.

[0014] Step 2: Merging and Offset Corrections of Geometry Based on the Same Material Within each material group, initialize the shared buffers (vertices, indices, uvs). Iterate through the objects within the group, executing the following steps sequentially: (1) Record the current total number of vertices as vertexOffset; (2) Append the vertices and UVs of the current object to the shared buffer; (3) Traverse its index array, perform index + vertexOffset correction and append to the shared index buffer; (4) Record the index length before this append divided by 3 as start, and the length after append divided by 3 minus 1 as end.

[0015] Step 3: Sub-object index record In step (4) of step 2, a sub-object record is generated synchronously, with the format: {id: object ID, start: triangle start index, end: triangle end index}.

[0016] Step 4: Instantiation of unique objects The instantiated object is deduplicated by reference source. If it appears for the first time, the geometry is merged and the transformation matrix array is initialized. If it already exists, the new transformation matrix is ​​appended to the corresponding matrix array.

[0017] Step 5: Binary Export A binary file is generated for each level group (supporting multiple merged object loops), and the writing order strictly follows the description in claim 1. All integers are in uint32 / int32 (little-endian), the length (uint32) is written before the string, and then padded with 0x00 to 4 bytes for alignment. The file may have an 8-byte header: magic number "MGEO" (4 bytes) + version number 0x00010000 (4 bytes).

[0018] Step Six: Browser-side Parsing and Interaction After loading the binary file using fetch and obtaining the ArrayBuffer: (1) Use DataView to read the data segments sequentially; (2) Construct a BufferGeometry and set its position, index, and uv properties; (3) Mount the parsed sub-object record table to mesh.userData.subObjects; (4) When picking, obtain the triangular face index faceIndex of the ray intersection point, traverse and search the subObjects table, locate the record start ≤ faceIndex ≤ end, and obtain the original object ID to realize operations such as highlighting, hiding, and attribute query.

[0019] Implementation effect A real-world test of a Revit building model containing 120,000 components showed the following results: Original glTF: 426MB, loading time 28s, DrawCall 9200; After processing with this invention: 48MB, loading time 4.1s, DrawCall 312; Component-by-component operations and local updates are still supported.

[0020] Those skilled in the art can make equivalent substitutions for data types, file extensions, buffer order, etc., based on the above embodiments without departing from the spirit of the present invention, and all such substitutions should fall within the protection scope of the present invention.< / object>

Claims

1. A lightweight method for 3D models based on hierarchical-material dual merging and sub-object triangular face indexing, characterized in that, include: (1) Double-layer grouping: Group objects into two layers based on hierarchy and material; (2) Merging and offset correction of geometry of the same material: Merge geometric data within the same material group and correct index offset in real time; (3) Sub-object index record: Records the start and end indices of the triangle face of each original object in the merged index buffer; (4) Uniqueness processing of instantiated objects: Deduplication of reference source for instantiated objects. If it appears for the first time, the geometry is merged and the transformation matrix array is initialized. If it already exists, only the new transformation matrix is ​​appended to the corresponding matrix array. (5) Binary export: Serialize vertices, indices, UVs, material IDs, sub-object index records, and instance matrices into a single binary geometry file in a fixed order; (6) Browser-side parsing and interaction: The browser parses the file sequentially, builds the buffer geometry at once, and realizes object picking, hiding and partial loading by querying the sub-object index records.

2. The method according to claim 1, characterized in that, The sub-object index record contains the original object ID, the triangle start index, and the end index.

3. The method according to claim 1 or 2, characterized in that, The binary file contains, in sequence: number of merged objects → vertex buffer → index buffer → UV buffer → material ID length → material ID → number of sub-objects → sub-object record array (repeated M times: id length → id → start → end) → number of instance matrices → instance matrix array.

4. The method according to claim 1, characterized in that, The browser uses the triangular facet index obtained through ray detection to directly query the sub-object index record table to determine the belonging object.

5. A lightweight 3D model system based on hierarchy-material dual merging and sub-object triangular face indexing, characterized in that, include: (1) Two-level grouping module; (2) Same material geometry merging and offset correction module; (3) Sub-object index record module; (4) Module for unique instantiation of objects; (5) Binary export module; (6) Browser-side parsing and interaction module.