A three-dimensional model index allocation method, device and medium
Patent Information
- Application Number
- CN202510473429.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2026-10-23
AI Technical Summary
[0003]本发明所要解决的技术问题是针对现有技术的上述不足,提供一种三维模型索引分配方法、装置及介质,用以解决现有技术中三维模型存在索引分配不合理,导致三维模型渲染速度慢的问题
[0033]本发明提供的三维模型索引分配方法、装置及介质,首先获取三维模型的顶点数据和索引数据;然后根据所述索引数据,将所述顶点数据转化为预设格式的顶点序列;再对所述预设格式的顶点序列进行三维重建,得到所述三维模型新的顶点数据;最后根据所述预设格式的顶点序列和新的顶点数据动态分配索引,得到所述三维模型新的索引数据。本发明通过三维模型的索引数据将三维模型的顶点数据转化为预设格式的顶点序列后,对预设格式的顶点序列进行三维重建,生成新的顶点数据,并重新动态分配索引,生成新的索引数据,从而大大提升了三维模型渲染效率,解决了现有技术中三维模型存在索引分配不合理,导致三维模型渲染速度慢的问题。
Smart Images

Figure CN122966828A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus and medium for indexing and allocating three-dimensional models. Background Technology
[0002] As we enter a new historical period of transformation and development, and against the backdrop of changing overall development requirements, 3D modeling faces higher standards and demands. Digital twin-based 3D models are the mainstream model for achieving sustainable development in the future. The processing and analysis of digital twin 3D model data differs significantly from traditional big data. Currently, most data models are created using 3D modeling software, then exported in different formats before digital twin 3D rendering. However, the export algorithms of 3D modeling software vary, and even when exported from the same software in different formats, data discrepancies exist. Furthermore, some 3D models suffer from unreasonable index allocation, leading to slow rendering speeds. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to address the above-mentioned shortcomings of the prior art by providing a three-dimensional model index allocation method, device and medium to solve the problem of slow three-dimensional model rendering speed due to unreasonable index allocation in the prior art.
[0004] In a first aspect, the present invention provides a three-dimensional model index allocation method, comprising:
[0005] Obtain vertex and index data of the 3D model;
[0006] Based on the index data, the vertex data is converted into a vertex sequence in a preset format;
[0007] The vertex sequence in the preset format is reconstructed in three dimensions to obtain new vertex data for the three-dimensional model;
[0008] Based on the vertex sequence in the preset format and the new vertex data, the index is dynamically allocated to obtain the new index data of the 3D model.
[0009] Furthermore, before acquiring the vertex data and index data of the 3D model, the method further includes:
[0010] Import the model data of the 3D model through the Uniform Resource Locator (URL) address of the 3D model;
[0011] Read the model data of the 3D model, which includes the vertex data and index data.
[0012] Further, the step of converting the vertex data into a vertex sequence of a preset format based on the index data specifically includes:
[0013] Determine whether an index exists in the 3D model based on the index data;
[0014] In response to the existence of an index in the 3D model, the vertex data is converted into a vertex sequence in the preset format according to the order of the index;
[0015] In response to the absence of an index in the 3D model, the vertex data is converted into a vertex sequence in the preset format according to a preset order.
[0016] Furthermore, the step of performing 3D reconstruction on the vertex sequence in the preset format to obtain new vertex data for the 3D model specifically includes:
[0017] All vertices in the preset format vertex sequence are sorted according to preset rules;
[0018] Filter out duplicate vertices in the sorted vertex sequence of the preset format;
[0019] The filtered vertex sequence in the preset format is converted into the new vertex data.
[0020] Furthermore, the step of dynamically allocating indices based on the preset vertex sequence and new vertex data to obtain new index data for the 3D model specifically includes:
[0021] Determine the vertex position of each vertex in the new vertex data in the preset format vertex sequence;
[0022] The new index data is obtained based on the vertex position of each vertex in the new vertex data.
[0023] Furthermore, after dynamically allocating indices according to the preset format vertex sequence and the new vertex data to obtain new index data for the 3D model, the method further includes:
[0024] The new vertex data and new index data are written into the 3D model.
[0025] Furthermore, the preset format vertex sequence is a vertex sequence in xyz format.
[0026] In a second aspect, the present invention provides a three-dimensional model index allocation device, comprising:
[0027] The acquisition module is used to acquire vertex data and index data of the 3D model;
[0028] A conversion module, connected to the acquisition module, is used to convert the vertex data into a vertex sequence in a preset format based on the index data;
[0029] A reconstruction module, connected to the conversion module, is used to perform three-dimensional reconstruction on the vertex sequence in the preset format to obtain new vertex data of the three-dimensional model;
[0030] The allocation module, connected to the reconstruction module, is used to dynamically allocate indices according to the vertex sequence in the preset format and the new vertex data to obtain new index data for the 3D model.
[0031] Thirdly, the present invention provides a three-dimensional model index allocation device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the three-dimensional model index allocation method described in the first aspect above.
[0032] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the three-dimensional model index allocation method described in the first aspect.
[0033] The present invention provides a 3D model index allocation method, apparatus, and medium. First, vertex data and index data of a 3D model are acquired. Then, based on the index data, the vertex data is converted into a vertex sequence in a preset format. Next, the vertex sequence in the preset format is reconstructed in 3D to obtain new vertex data for the 3D model. Finally, the index is dynamically allocated based on the vertex sequence in the preset format and the new vertex data to obtain new index data for the 3D model. This invention, by converting the vertex data of a 3D model into a vertex sequence in a preset format using the index data, performing 3D reconstruction on the preset format vertex sequence to generate new vertex data, and then dynamically reallocating the index to generate new index data, significantly improves the rendering efficiency of 3D models and solves the problem of slow 3D model rendering speed due to unreasonable index allocation in existing technologies. Attached Figure Description
[0034] Figure 1 This is a flowchart of a three-dimensional model index allocation method according to Embodiment 1 of the present invention;
[0035] Figure 2 This is a flowchart of another three-dimensional model index allocation method according to an embodiment of the present invention;
[0036] Figure 3 This is a schematic diagram of the structure of a three-dimensional model index allocation device according to Embodiment 2 of the present invention;
[0037] Figure 4 This is a schematic diagram of the structure of a three-dimensional model index allocation device according to Embodiment 3 of the present invention. Detailed Implementation
[0038] To enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0039] It is understood that the specific embodiments and accompanying drawings described herein are merely for explaining the invention and are not intended to limit the invention.
[0040] It is understood that, without conflict, the various embodiments and features in the embodiments of the present invention can be combined with each other.
[0041] It is understood that, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, while the parts unrelated to the present invention are not shown in the drawings.
[0042] It is understood that each unit or module involved in the embodiments of the present invention may correspond to only one entity structure, or may be composed of multiple entity structures, or multiple units or modules may be integrated into one entity structure.
[0043] It is understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of this invention may occur in a different order than that marked in the accompanying drawings.
[0044] It is understood that the flowcharts and block diagrams of this invention illustrate the possible architecture, functions, and operations of systems, apparatuses, devices, and methods according to various embodiments of this invention. Each block in the flowchart or block diagram may represent a unit, module, program segment, or code, containing executable instructions for implementing the specified function. Furthermore, each block or combination of blocks in the block diagram and flowchart can be implemented using a hardware-based system to achieve the specified function, or using a combination of hardware and computer instructions.
[0045] It is understood that the units and modules involved in the embodiments of the present invention can be implemented by software or by hardware. For example, the units and modules can be located in a processor.
[0046] Application Overview
[0047] As we enter a new historical period of transformation and development, and against the backdrop of changing overall development requirements, 3D modeling faces higher standards and demands. Digital twin-based 3D models are the mainstream model for achieving sustainable development in the future. The processing and analysis of digital twin 3D model data differs significantly from traditional big data. Currently, most data models are created using 3D modeling software, exported in different formats, and then rendered as digital twins. However, the export algorithms of 3D modeling software vary, and even when exported from the same software in different formats, data discrepancies exist. Furthermore, some 3D models have unreasonable index allocation or even no index at all, leading to significant differences in rendering efficiency; some 3D models render very slowly. Comparing the modeling software Blender and Cinema 4D, for the same 3D model, if the exported model is in GLB format, Blender will have an index, while Cinema 4D will not. If the exported model is in FBX format, Blender will not have an index, while Cinema 4D will. Even with an index, redundancy is common, resulting in very slow rendering.
[0048] To address the aforementioned technical problems, this application provides a method, apparatus, and medium for allocating indexes for a 3D model. The method involves converting the vertex data of a 3D model into a vertex sequence in a preset format using the index data of the 3D model, then performing 3D reconstruction on the preset format vertex sequence to generate new vertex data. The method also dynamically reallocates the indexes to generate new index data, thereby significantly improving the rendering efficiency of the 3D model. This addresses at least the problem in the prior art where unreasonable index allocation in 3D models leads to slow rendering speeds.
[0049] After introducing the basic principles of this application, various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0050] Example 1:
[0051] This embodiment provides a method for allocating a three-dimensional model index, such as... Figure 1 As shown, the method includes:
[0052] Step S101: Obtain vertex data and index data of the 3D model.
[0053] It should be noted that the vertex data of the 3D model includes the spatial position of each vertex of the 3D model, while the index data of the 3D model includes the vertex position of each vertex of the 3D model in the vertex data.
[0054] In an optional embodiment, before acquiring the vertex data and index data of the 3D model, the method further includes:
[0055] Import the model data of the 3D model through the URL (Uniform Resource Locator) address of the 3D model;
[0056] Read the model data of the 3D model, which includes the vertex data and index data.
[0057] Specifically, the model data corresponding to the 3D model is imported based on the URL of the model file corresponding to the 3D model, and the vertex data and index data in the model data corresponding to the 3D model are read.
[0058] Step S102: Based on the index data, convert the vertex data into a vertex sequence in a preset format.
[0059] In this embodiment, since there are differences in the model data structure read from different formats, the present invention converts the vertex data into a vertex sequence in a unified preset format based on the index data to facilitate subsequent work.
[0060] Optionally, the vertex sequence in the preset format is preferably a vertex sequence in xyz format.
[0061] In one optional embodiment, converting the vertex data into a vertex sequence of a preset format based on the index data specifically includes:
[0062] Determine whether an index exists in the 3D model based on the index data;
[0063] In response to the existence of an index in the 3D model, the vertex data is converted into a vertex sequence in the preset format according to the order of the index;
[0064] In response to the absence of an index in the 3D model, the vertex data is converted into a vertex sequence in the preset format according to a preset order.
[0065] Specifically, the system determines whether an index exists in the 3D model based on the index data. If an index exists in the 3D model, the vertex data is read in index order and converted into a vertex sequence in a preset format. If no index exists in the 3D model, the vertex data is read in a preset order and converted into a vertex sequence in a preset format.
[0066] Step S103: Perform three-dimensional reconstruction on the vertex sequence in the preset format to obtain new vertex data of the three-dimensional model.
[0067] Specifically, a 3D reconstruction is performed on a vertex sequence in a preset format to generate new vertex data for a 3D model with unified rules.
[0068] In one optional embodiment, the step of performing 3D reconstruction on the vertex sequence in the preset format to obtain new vertex data for the 3D model specifically includes:
[0069] All vertices in the preset format vertex sequence are sorted according to preset rules;
[0070] Filter out duplicate vertices in the sorted vertex sequence of the preset format;
[0071] The filtered vertex sequence in the preset format is converted into the new vertex data.
[0072] Specifically, to avoid a decrease in the rendering speed of the 3D model due to redundancy in vertex data or unreasonable vertex arrangement in the vertex data, the specific method for 3D reconstruction of the vertex sequence in the preset format to obtain new vertex data of the 3D model is as follows: read the vertex sequence in the preset format converted from vertex data, filter out duplicate vertices, sort all vertices according to preset rules, convert the sorted and filtered vertex sequence in the preset format back to the original format vertex data, and generate new vertex data. In this case, to facilitate computer addressing, it is preferable to sort all vertices according to the preset rules in ascending order of numerical value.
[0073] Step S104: Dynamically allocate indexes according to the vertex sequence in the preset format and the new vertex data to obtain new index data for the 3D model.
[0074] Specifically, based on a vertex sequence in a preset format and new vertex data, new index data for a 3D model with unified rules is generated.
[0075] In one optional embodiment, the step of dynamically allocating indices based on the preset vertex sequence and new vertex data to obtain new index data for the 3D model specifically includes:
[0076] Determine the vertex position of each vertex in the new vertex data in the preset format vertex sequence;
[0077] The new index data is obtained based on the vertex position of each vertex in the new vertex data.
[0078] Specifically, each vertex in the pre-formatted vertex sequence is compared with the new vertex data in turn to obtain the vertex position of each vertex in the new vertex data, and the vertex position of each vertex in the new vertex data is added to a new array in turn to generate new index data.
[0079] In an optional embodiment, after dynamically allocating indices according to the preset format vertex sequence and new vertex data to obtain new index data for the 3D model, the method further includes:
[0080] The new vertex data and new index data are written into the 3D model.
[0081] Specifically, new vertex data and new index data are written into the 3D model, replacing the original vertex data and index data of the 3D model.
[0082] It is worth mentioning that the 3D model index allocation method proposed in this invention targets 3D models in commonly used formats exported by mainstream modeling software. Based on their spatial nodes (i.e., vertex data) and index positions (i.e., index data), the spatial nodes are reconstructed to generate new vertex data with unified rules, and the index is dynamically reallocated, thereby improving the rendering efficiency of 3D models in different modeling software and formats.
[0083] In a specific embodiment, the present invention provides a three-dimensional model index allocation method. The implementation steps of the present invention are as follows: first, the vertex and index data of different three-dimensional models are read; then, the vertex data is reconstructed in three dimensions based on the vertex and index data. The vertex reconstruction idea is to reorder the vertices and filter out duplicate vertex data; then, the original vertex and index data are compared with the newly generated vertex data by an algorithm to generate a new dynamic index; finally, the new vertex and index data are written into the model.
[0084] The main differences between this invention and existing technologies are as follows:
[0085] (1) Compatibility differences: Due to the differences in model data structures in different formats, existing technologies cannot use a single algorithm to generate indexes with unified rules for 3D models in different formats. This invention aims to establish vertices and indexes with unified rules for 3D models in different formats.
[0086] (2) Difference in rendering efficiency: Existing technologies do not filter out duplicate vertices before rebuilding the index, or do not rebuild the vertex data. They only rebuild the index based on the original vertex data. If there is redundancy in the vertex data or the vertex arrangement is unreasonable, it will lead to a decrease in rendering speed. However, this invention not only rebuilds the index data, but also rebuilds the vertex data.
[0087] The main steps are as follows:
[0088] (1) Import model data
[0089]
[0090] (2) Analyzing model data
[0091]
[0092]
[0093] The main algorithm for implementing the above steps is as follows: Create new vertices and indices based on vertex information:
[0094]
[0095]
[0096]
[0097] Specifically, such as Figure 2 As shown, the specific steps of this 3D model index allocation method are as follows:
[0098] Step 1: Import model data;
[0099] The imported model is a 3D model, supporting common 3D formats such as glb, gltf, fbx, obj, etc. Before importing the model, it is usually necessary to upload the 3D model file to the server, then query the file URL through the interface, and then import it.
[0100] Step 2: Read the model data;
[0101] This typically involves importing all the data of the entire 3D model, such as model ID, name, material, texture, position, rotation, scaling, matrix parameters, vertices, index, UV parameters, etc., but mainly focuses on operating on the index and vertex data.
[0102] Step 3: Extract vertex data and index data from the model data;
[0103] Take the indices and vertices from the 3D model data read in step 2 and save them separately in a newly created variable;
[0104] Step 4: Determine if an index exists in the original model. If it does not exist, convert the vertex data into a vertex sequence in xyz format. If it exists, generate a vertex sequence in xyz format based on the index.
[0105] It should be noted that, in order to facilitate vertex data reconstruction, data of different formats are converted into a unified format of xyz vertex sequence data. In solid geometry, three-dimensional space is divided into three coordinate axes: x, y, and z, which correspond to the position of the point in three-dimensional space.
[0106] Specifically, assume that the original vertex sequence (i.e., the vertex data in the 3D model data) is a one-dimensional array, such as [100,80,90,200,100,90,300,500,80........];
[0107] If the index does not exist, it is read sequentially, and the returned xyz vertex sequence is: [{"x":100,"y":80,"z":90},{"x":200,"y":100,"z":90},{"x":300,"y":500,"z":80}.....];
[0108] If the index exists, it is read in index order and converted into an xyz vertex sequence. For example, if the index is [2,0,2,1,2......], the returned xyz vertex sequence is: [{"x":300,"y":500,"z":80},{"x":100,"y":80,"z":90},{"x":300,"y":500,"z":80},{"x":200,"y":100,"z":90},{"x":300,"y":500,"z":80}.....];
[0109] In the index, 0, 1, and 2 represent the first, second, and third vertices in the vertex data being read, respectively.
[0110] Step 5: Create new vertex data and index data based on the vertex sequence in xyz format;
[0111] The xyz vertex sequence generated in step 4 is read, duplicate vertex data is filtered out, and the data is sorted in ascending order of value (for easier computer addressing), converted into a one-dimensional array, and new vertex data is generated. Then, based on the new vertex data and the xyz vertex sequence, new index data is generated using an algorithm. Specifically, the process for creating new vertex data and new index data is as follows:
[0112] Step 5-1: Convert the three-dimensional vertices (i.e., the xyz vertex sequence) into strings in groups of three and store them in two arrays, points1 and points2, for easy comparison later;
[0113] Step 5-2: Sort the string "points1" in ascending order;
[0114] Step 5-3: Filter out duplicate data in points1, convert the strings in the elements into arrays, and then treat each vertex in this array as an independent element and store it in a new one-dimensional array. This one-dimensional array is the new vertex data.
[0115] Step 5-4: Create a new array points22, and use the values of the elements in points1 after deduplication as the keys of points22, and the element positions as the values of points22.
[0116] Step 5-5: Loop through points2, and retrieve the position of each element value in points2 in the new vertex data in turn through points22. Add this position value to the new one-dimensional array. This one-dimensional array is the new dynamic index data generated based on the new vertex.
[0117] Step 6: Write the new vertex data and index data into the model;
[0118] The new vertices and indices will be written into the model, replacing the original vertex and index data. This ensures that even if a vertex is used multiple times, it will only be stored once. The WebGL rendering order is read entirely according to the index, and the vertices are reordered. This will shorten the interval between two similar reads, which will greatly improve rendering efficiency.
[0119] The 3D model index allocation method provided in this invention first acquires the vertex data and index data of the 3D model; then, based on the index data, the vertex data is converted into a vertex sequence in a preset format; next, the vertex sequence in the preset format is reconstructed in 3D to obtain new vertex data for the 3D model; finally, the index is dynamically allocated based on the vertex sequence in the preset format and the new vertex data to obtain new index data for the 3D model. This invention, by converting the vertex data of the 3D model into a vertex sequence in a preset format using the index data, performing 3D reconstruction on the preset format vertex sequence to generate new vertex data, and then dynamically reallocating the index to generate new index data, greatly improves the rendering efficiency of the 3D model and solves the problem of slow 3D model rendering speed due to unreasonable index allocation in existing technologies.
[0120] Example 2:
[0121] like Figure 3 As shown, this embodiment provides a three-dimensional model index allocation device for executing the above-described three-dimensional model index allocation method, including:
[0122] Module 11 is used to acquire vertex data and index data of the 3D model;
[0123] The conversion module 12, connected to the acquisition module 11, is used to convert the vertex data into a vertex sequence in a preset format according to the index data;
[0124] The reconstruction module 13, connected to the conversion module 12, is used to perform three-dimensional reconstruction on the vertex sequence in the preset format to obtain new vertex data of the three-dimensional model.
[0125] The allocation module 14, connected to the reconstruction module 13, is used to dynamically allocate indexes according to the preset format vertex sequence and new vertex data to obtain new index data for the three-dimensional model.
[0126] Furthermore, the device also includes:
[0127] The import module is used to import the model data of the 3D model through the Uniform Resource Locator (URL) address of the 3D model;
[0128] The reading module is used to read the model data of the 3D model, which includes the vertex data and index data.
[0129] Furthermore, the conversion module 12 specifically includes:
[0130] The judgment unit is used to determine whether an index exists in the three-dimensional model based on the index data;
[0131] The first conversion unit is used to convert the vertex data into a vertex sequence of the preset format according to the order of the index in response to the existence of an index in the three-dimensional model.
[0132] The second conversion unit is used to convert the vertex data into a vertex sequence in the preset format according to a preset order in response to the absence of an index in the three-dimensional model.
[0133] Furthermore, the reconstruction module 13 specifically includes:
[0134] A sorting unit is used to sort all vertices in the vertex sequence of the preset format according to a preset rule;
[0135] A filtering unit is used to filter out duplicate vertices in the sorted vertex sequence of the preset format;
[0136] The third conversion unit is used to convert the filtered vertex sequence in the preset format into the new vertex data.
[0137] Furthermore, the allocation module 14 specifically includes:
[0138] A determining unit is used to determine the vertex position of each vertex in the preset format vertex sequence in the new vertex data;
[0139] The obtaining unit is used to obtain the new index data based on the vertex position of each vertex in the new vertex data.
[0140] Furthermore, the device also includes:
[0141] The writing module is used to write the new vertex data and new index data into the 3D model.
[0142] Furthermore, the preset format vertex sequence is a vertex sequence in xyz format.
[0143] Example 3:
[0144] refer to Figure 4 This embodiment provides a three-dimensional model index allocation device, including a memory 21 and a processor 22. The memory 21 stores a computer program, and the processor 22 is configured to run the computer program to execute the three-dimensional model index allocation method in Embodiment 1.
[0145] The memory 21 is connected to the processor 22. The memory 21 can be a flash memory, a read-only memory or other memory, and the processor 22 can be a central processing unit or a microcontroller.
[0146] Example 4:
[0147] This embodiment provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the three-dimensional model index allocation method in Embodiment 1 above.
[0148] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), DVD or other optical disc storage, cartridges, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer.
[0149] In summary, the 3D model index allocation method, apparatus, and medium provided in this embodiment of the invention first acquire vertex data and index data of a 3D model; then, based on the index data, convert the vertex data into a vertex sequence in a preset format; next, perform 3D reconstruction on the vertex sequence in the preset format to obtain new vertex data for the 3D model; finally, dynamically allocate indexes based on the vertex sequence in the preset format and the new vertex data to obtain new index data for the 3D model. This invention, by converting the vertex data of a 3D model into a vertex sequence in a preset format using the index data, performing 3D reconstruction on the vertex sequence in the preset format to generate new vertex data, and then dynamically reallocating indexes to generate new index data, greatly improves the rendering efficiency of 3D models and solves the problem of slow 3D model rendering speed due to unreasonable index allocation in existing technologies.
[0150] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A method for assigning indexes to three-dimensional models, characterized in that, The method includes: Obtain vertex and index data of the 3D model; Based on the index data, the vertex data is converted into a vertex sequence in a preset format; The vertex sequence in the preset format is reconstructed in three dimensions to obtain new vertex data for the three-dimensional model; Based on the vertex sequence in the preset format and the new vertex data, the index is dynamically allocated to obtain the new index data of the 3D model.
2. The method according to claim 1, characterized in that, Before acquiring the vertex data and index data of the 3D model, the method further includes: Import the model data of the 3D model through the Uniform Resource Locator (URL) address of the 3D model; Read the model data of the 3D model, which includes the vertex data and index data.
3. The method according to claim 1, characterized in that, The step of converting the vertex data into a vertex sequence of a preset format based on the index data specifically includes: Determine whether an index exists in the 3D model based on the index data; In response to the existence of an index in the 3D model, the vertex data is converted into a vertex sequence in the preset format according to the order of the index; In response to the absence of an index in the 3D model, the vertex data is converted into a vertex sequence in the preset format according to a preset order.
4. The method according to claim 1, characterized in that, The step of performing 3D reconstruction on the vertex sequence in the preset format to obtain new vertex data for the 3D model specifically includes: All vertices in the preset format vertex sequence are sorted according to preset rules; Filter out duplicate vertices in the sorted vertex sequence of the preset format; The filtered vertex sequence in the preset format is converted into the new vertex data.
5. The method according to claim 4, characterized in that, The step of dynamically allocating indices based on the preset vertex sequence and new vertex data to obtain new index data for the 3D model specifically includes: Determine the vertex position of each vertex in the new vertex data in the preset format vertex sequence; The new index data is obtained based on the vertex position of each vertex in the new vertex data.
6. The method according to claim 1, characterized in that, After dynamically allocating indices according to the preset format vertex sequence and new vertex data to obtain new index data for the 3D model, the method further includes: The new vertex data and new index data are written into the 3D model.
7. The method according to claim 1, characterized in that, The preset format vertex sequence is a vertex sequence in xyz format.
8. A three-dimensional model index allocation device, characterized in that, include: The acquisition module is used to acquire vertex data and index data of the 3D model; A conversion module, connected to the acquisition module, is used to convert the vertex data into a vertex sequence in a preset format based on the index data; A reconstruction module, connected to the conversion module, is used to perform three-dimensional reconstruction on the vertex sequence in the preset format to obtain new vertex data of the three-dimensional model; The allocation module, connected to the reconstruction module, is used to dynamically allocate indices according to the vertex sequence in the preset format and the new vertex data to obtain new index data for the 3D model.
9. A three-dimensional model index allocation device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the three-dimensional model indexing assignment method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the three-dimensional model index allocation method as described in any one of claims 1-7.