D5 scene automatic reconstruction method based on 3dsMax model file structure

CN122597720APending Publication Date: 2026-08-18NINGBO WOLS SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610936854.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]本发明针对现有技术的上述问题,提供基于3dsMax模型文件结构的D5场景自动重构方法,有效解决了现有方法中层级还原不完整、材质转换失真、联动更新弱、拓扑纠错不足的问题,实现3dsMax模型到D5场景的自动化、高精度、高效重构,降低人工干预成本,提升场景创作效率

Benefits of technology

(1)完整保留3dsMax模型的层级结构、材质效果与几何细节,材质转换误差降低,拓扑错误修复率提高,解决了现有方法重构效果失真的问题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597720A_ABST
    Figure CN122597720A_ABST
Patent Text Reader

Abstract

The application relates to the field of 3D scene reconstruction, and particularly discloses a D5 scene automatic reconstruction method based on a 3dsMax model file structure, which comprises the following steps: analyzing a binary file block structure, extracting geometry, hierarchical nesting, material nodes, light camera parameters, recursively constructing a scene hierarchical tree containing node sets and parent-child hierarchical edges, synchronously detecting and marking geometric topology abnormalities; constructing a third-party material node to a D5PBR channel mapping library, matching and analyzing node connection relationships through a node atlas, converting non-direct mapping parameters through a parameter fitting formula; reconstructing an instantiated model in a unique identification reference mode according to a hierarchical tree mapping scene structure; automatically repairing topology abnormalities, and importing processed data into a D5 renderer; and assigning a hash identification to a scene element, and generating an incremental update package through hash comparison to complete synchronous reconstruction. The application solves the problem of a large amount of manual repair in the prior art, and improves reconstruction precision and automation level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of 3D scene reconstruction technology, specifically a method for automatic reconstruction of D5 scenes based on the 3ds Max model file structure. Background Technology

[0002] Currently, 3ds Max, as a mainstream 3D modeling tool, is widely used in the creation of various 3D scenes. The D5 renderer, with its real-time rendering and WYSIWYG advantages, has become the preferred tool for scene rendering. Existing methods for reconstructing 3ds Max models into D5 scenes mainly rely on intermediate format conversion via plugins (such as the D5 converter), direct reading of native formats, or secondary processing of intermediate formats. These methods suffer from the following core technical shortcomings, making it difficult to meet the demands for efficient and high-precision scene reconstruction: Incomplete restoration of hierarchy and group structure: 3ds Max's multi-level group, layer, and instance structure is easily collapsed during export conversion, and only 1-2 levels of simple group structure can be retained. The original management logic of complex scenes is lost, and manual regrouping is required, which is extremely inefficient. Severe material conversion distortion: Third-party materials such as V-Ray and Corona, as well as complex nodes (such as Falloff and Mix) in 3ds Max cannot be fully parsed. Only basic PBR materials can be converted. The mapping accuracy of material metadata (roughness, metallicity, etc.) is insufficient, resulting in significant differences between the D5 scene and the original 3ds Max effect. Weak linkage update capability: Existing methods are mostly one-way imports. After the 3ds Max model and materials are modified, the D5 scene cannot be incrementally updated and needs to be completely imported again, which is time-consuming, inefficient and lacks a version control mechanism. The model topology and resource management are chaotic: complex polygons and non-manifold edges are prone to misalignment and normal flipping after import, texture paths are easily lost, and resolution is incompatible, requiring a lot of manual repair.

[0003] Currently, there is no integrated automatic reconstruction method that can simultaneously solve the problems of hierarchical restoration, material distortion, incremental synchronization, and topology error correction. Therefore, there is an urgent need for an innovative technical solution to fill the gap in existing technology and improve the reconstruction efficiency and accuracy of 3ds Max models to D5 scenes. Summary of the Invention

[0004] This invention addresses the aforementioned problems in existing technologies by providing an automatic reconstruction method for D5 scenes based on the 3ds Max model file structure. It effectively solves the problems of incomplete layer restoration, material conversion distortion, weak linkage updates, and insufficient topology correction in existing methods, achieving automated, high-precision, and efficient reconstruction of 3ds Max models into D5 scenes, reducing manual intervention costs, and improving scene creation efficiency.

[0005] To achieve the above objectives, this invention proposes an automatic reconstruction method for D5 scenes based on the 3ds Max model file structure, comprising the following steps: S1: Parse the block structure of the .max binary file of 3ds Max. By reading the block type identifier and block length field in the file header, recursively traverse each data block to extract model geometric data, nested hierarchical data, material node data, lighting and camera parameters, and recursively construct the scene hierarchy tree T(N, E), where N is the set of nodes and E is the set of parent and child hierarchical edges. At the same time, detect geometric topology anomalies and complete the marking. S2: A pre-built mapping library between 3ds Max third-party material nodes and D5PBR channels. The connection relationship between material nodes is analyzed based on the node graph matching algorithm. For non-directly mapped node parameters, a multi-dimensional parameter deconstruction and reconstruction method is used for conversion. S3: Map the 3ds Max scene hierarchy to the D5 scene according to the hierarchy tree T(N, E), and reconstruct the instantiated model by reference using the unique hash identifier of the mesh geometry data; S4: Perform automatic repair on marked topological anomalies, repair non-manifold edges by boundary ring triangulation, repair UV overlap by translating overlapping islands, and flip normals by comparing the direction of the line connecting the normal vector of the face with the center of the adjacent face; import the repaired geometric data, the converted material data, and the hierarchical structure into the D5 renderer. S5: Assign hash identifiers to each scene element, generate incremental update packets containing only element data whose hash values ​​have changed through hash comparison, and synchronize them to the D5 scene to complete the reconstruction. (Hash identifiers...) The allocation formula is: ; In the formula, To provide a unique identifier for each element, To modify the timestamp, This is the SHA-1 hash value of the element's content.

[0006] Preferably, in S1, the hierarchy tree T(N, E) is constructed using a depth-first recursive traversal. Each node in the node set contains a node ID, name, transformation matrix, list of child nodes, geometric data reference, and material reference. The node hierarchy depth is... The calculation formula is: ; In the formula, For any node in the hierarchy tree, , For nodes The parent node, Parent node The level depth value.

[0007] Preferably, in step S2, the mapping library includes material type identifiers, parameter names, and conversion function pointers; third-party materials include V-RayMtl and CoronaMtl materials, and the mapping library includes port mapping relationships of Falloff, Mix, and Composite nodes, which are stored in a directed acyclic graph structure.

[0008] Preferably, in step S2, for non-directly mapped node parameters, a multi-dimensional parameter deconstruction and reconstruction method is used for transformation, specifically including: For the roughness parameters of V-RayMtl material, three independent sub-parameters—reflection roughness, refraction roughness, and diffuse roughness—are analyzed. These three sub-parameters are then input into a pre-trained nonlinear regression model. This model fits the sample material using the least squares method and outputs a single roughness value adapted to the D5 GGX rendering model. For heterogeneous rendering model differences that cannot be directly fitted, including reflection tail length and edge hardness, secondary calibration is performed by looking up a preset correction mapping table. The expression of the nonlinear regression model is: ; in, The target parameter is the material parameter value that is converted and adapted to the D5PBR channel. For reflective roughness, For refractive roughness, For diffuse roughness, , , , The coefficients are obtained through sample regression, and their range is determined by the material type; For the CoronaMtl material, four sub-parameters are analyzed: reflective roughness, reflective gloss, metallicity, and IOR. These sub-parameters are input into a pre-trained multinomial regression model, which fits the sample material using the least squares method and outputs a single roughness value and metallicity value adapted to the D5 PBR channel. For subsurface scattering weights and Corona-specific parameters that cannot be directly fitted, secondary calibration is performed by looking up a preset correction mapping table. The expression of the multinomial regression model is as follows: ; ; In the formula, This is the converted D5 roughness value. This is the converted D5 metallicity value. The reflective roughness of CoronaMtl The reflective gloss of CoronaMtl The metallicity of CoronaMtl The refractive index of CoronaMtl The subsurface scattering weights of CoronaMtl ... , ... The coefficients are obtained through sample regression, and their range is determined by the material type and Corona version.

[0009] Preferably, in step S3, the hash-unique identifier is calculated using the following method: S31: Obtain raw mesh data: Extract the vertex array and face index array of the mesh from the geometry of the 3ds Max model, calculate the minimum and maximum points of the vertex bounding box, and the bounding box size, where: the vertex array is... each The coordinates are single-precision floating-point numbers; the face index array is... each Let be the indices of the three vertices that form the triangle face; the minimum point of the bounding box is . The largest point of the bounding box is The dimensions of the enclosure are: ; S32: For each vertex coordinate Normalization is performed, and the normalized vertex coordinate sequence and the original face index sequence are concatenated sequentially into a binary data block D. The vertex portion is then written into each normalized coordinate. The value, the face portion, is written sequentially to the index of each face. Among them, vertex coordinates Normalized to: ; In the formula, This is the minimum value; after normalization, the coordinates of all vertices fall within this range. Within the range; S33: Apply the SHA-1 hash function to the binary data block to obtain a 160-bit hash value. ; S34: The number of vertices, the number of faces, and the bounding box size of the additional mesh are used as verification fields to form the final hash unique identifier. : ; In the formula, n is the number of vertices and m is the number of faces. , , These are the three components of the bounding box dimensions; S35: When comparing two meshes, first compare the number of vertices, the number of faces, and the bounding box size. If any of these are different, they can be directly identified as different models without needing to perform a full SHA-1 comparison. If all three are the same, then perform the comparison. .

[0010] Preferably, in S1, topological anomalies include non-manifold edges, UV overlap, and normal flip. The determination condition for non-manifold edges is: counting the number of times each edge is referenced by the triangle face, and edges with a reference count not equal to 2 are marked as non-manifold edges. The determination condition for UV overlap is: detecting that the overlapping area of ​​UV coordinates in the interval [0,1] exceeds a preset threshold of 0.5. The determination condition for normal flip is: the angle between the normal vectors of adjacent faces is greater than 120° and the two faces share an edge.

[0011] Preferably, in step S5, the incremental update package is in JSON format and includes element ID, new content binary data and update type identifier. The synchronization process retains the original rendering parameters of the unchanged elements in the D5 scene.

[0012] Preferably, in step S5, after reconstruction, a Level of Depth (LOD) model is automatically generated based on the camera's line of sight. The LOD level calculation formula is as follows: ; In the formula, For LOD level, The distance from the center of the model's bounding box to the camera. The preset distance classification coefficient is set to 10.

[0013] Preferably, step S2 further includes relinking the texture resource path. The specific steps for relinking the texture resource path are as follows: search by the original absolute path; if the file does not exist, search the same level directory, the parent directory, and the preset resource root directory in sequence, using a breadth-first recursive search; and after finding the file, copy or link the texture file to the resource subdirectory of the D5 project.

[0014] Preferably, in step S1, the IES light parameters and light intensity mapping ratio of 3ds Max are simultaneously analyzed. for: ; In the formula, This refers to the light intensity of a D5 lamp. This refers to the light intensity of the 3ds Max lights.

[0015] Therefore, this invention proposes an automatic reconstruction method for D5 scenes based on the 3ds Max model file structure, the beneficial effects of which are as follows: (1) The hierarchical structure, material effects and geometric details of the 3ds Max model are fully preserved, the material conversion error is reduced, the topology error repair rate is improved, and the problem of distortion in the reconstruction effect of the existing method is solved; (2) Achieve full-process automated reconstruction, shorten the reconstruction time of large scenes, shorten the incremental update time, and greatly reduce the cost of manual intervention; adapt to .native files of different versions of 3ds Max, support mainstream materials such as V-Ray and Corona, and be compatible with various versions of D5 renderer to solve cross-version compatibility issues; (3) Integrating topology automatic detection, intelligent error correction and scene automatic optimization to form an integrated reconstruction process, reducing manual intervention, solving the defects of existing methods that require a lot of manual repair of models, materials and paths, improving reconstruction accuracy and automation level, applicable to multiple fields such as architectural visualization, interior design, and landscape design, without the need for professional technicians to operate, lowering the threshold of scene reconstruction and improving creation efficiency.

[0016] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0017] Figure 1 This is the overall flowchart of the D5 scene automatic reconstruction method based on the 3ds Max model file structure of the present invention; Figure 2 This is a schematic diagram of the scene hierarchy tree recursive construction and topology anomaly detection of the D5 scene automatic reconstruction method based on the 3ds Max model file structure of the present invention; Figure 3 This is a schematic diagram illustrating the principle of third-party material node to D5PBR channel mapping and parameter fitting conversion in the D5 scene automatic reconstruction method based on the 3ds Max model file structure of this invention. Figure 4 This is a flowchart of the hash incremental update synchronization and LOD model automatic generation process of the D5 scene automatic reconstruction method based on the 3ds Max model file structure of the present invention. Detailed Implementation

[0018] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of this application.

[0019] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0020] like Figures 1-4 As shown, the automatic reconstruction method for D5 scenes based on the 3ds Max model file structure provided by this invention includes: S1: Parse the block structure of the .max binary file of 3ds Max. By reading the block type identifier and block length field in the file header, recursively traverse each data block to extract model geometric data, nested hierarchical data, material node data, lighting and camera parameters, and recursively construct the scene hierarchy tree T(N, E), where N is the set of nodes and E is the set of parent and child hierarchical edges. At the same time, detect geometric topology anomalies and complete the marking. In S1, the IES light parameters and light intensity mapping ratio of 3ds Max are analyzed synchronously. for: ; In the formula, This refers to the light intensity of a D5 lamp. This refers to the light intensity of the 3ds Max lights.

[0021] The hierarchy tree T(N, E) is constructed using a depth-first recursive traversal. Each node in the node set contains a node ID, name, transformation matrix, list of child nodes, geometric data reference, and material reference. The node hierarchy depth is... The calculation formula is: ; In the formula, For any node in the hierarchy tree, , For nodes The parent node, Parent node The level depth value.

[0022] Topological anomalies include non-manifold edges, UV overlap, and normal flip. The criteria for determining non-manifold edges are: counting the number of times each edge is referenced by the triangle face, and edges with a reference count not equal to 2 are marked as non-manifold edges. The criteria for determining UV overlap are: detecting that the overlapping area of ​​UV coordinates in the interval [0,1] exceeds a preset threshold of 0.5. The criteria for determining normal flip are: the angle between the normal vectors of adjacent faces is greater than 120° and the two faces share an edge.

[0023] S2: A pre-built mapping library between 3ds Max third-party material nodes and D5PBR channels. The connection relationship between material nodes is analyzed based on the node graph matching algorithm. For non-directly mapped node parameters, a multi-dimensional parameter deconstruction and reconstruction method is used for conversion. The mapping library contains material type identifiers, parameter names, and conversion function pointers; third-party materials include V-RayMtl and CoronaMtl materials. The mapping library contains port mapping relationships for Falloff, Mix, and Composite nodes, which are stored in a directed acyclic graph structure.

[0024] For non-directly mapped node parameters, a multi-dimensional parameter deconstruction and reconstruction method is used for transformation, specifically including: For the roughness parameters of V-RayMtl materials, three independent sub-parameters—reflection roughness, refraction roughness, and diffuse roughness—are analyzed. These three sub-parameters are then input into a pre-trained nonlinear regression model. This model fits the sample materials using the least squares method and outputs a single roughness value adapted to the D5 GGX rendering model. For heterogeneous rendering model differences that cannot be directly fitted, including reflection tail length and edge hardness, secondary calibration is performed by looking up a pre-defined correction mapping table. The expression for the nonlinear regression model is: ; in, The target parameter is the material parameter value that is converted and adapted to the D5PBR channel. For reflective roughness, For refractive roughness, For diffuse roughness, , , , The coefficients are obtained through sample regression, and their range is determined by the material type; For the CoronaMtl material, four sub-parameters are analyzed: reflective roughness, reflective gloss, metallicity, and IOR. These sub-parameters are then input into a pre-trained multinomial regression model. This model fits the sample material using the least squares method and outputs a single roughness value and metallicity value adapted to the D5 PBR channel. For subsurface scattering weights and Corona-specific parameters that cannot be directly fitted, secondary calibration is performed by looking up a pre-defined correction mapping table. The expression for the multinomial regression model is: ; ; In the formula, This is the converted D5 roughness value. This is the converted D5 metallicity value. The reflective roughness of CoronaMtl The reflective gloss of CoronaMtl The metallicity of CoronaMtl The refractive index of CoronaMtl The subsurface scattering weights of CoronaMtl ... , ... The coefficients are obtained through sample regression, and their range is determined by the material type and Corona version.

[0025] S2 also includes relinking the path of texture resources. The specific steps for relinking the path of texture resources are as follows: search by the original absolute path. If the file does not exist, search the same directory, the parent directory, and the preset resource root directory in turn. Use breadth-first recursive search. Once found, copy or link the texture file to the resource subdirectory of the D5 project.

[0026] S3: Map the 3ds Max scene hierarchy to the D5 scene according to the hierarchy tree T(N, E), and reconstruct the instantiated model by reference using the unique hash identifier of the mesh geometry data; In S3, the hash-unique identifier is calculated using the following method: S31: Obtain raw mesh data: Extract the vertex array and face index array of the mesh from the geometry of the 3ds Max model, calculate the minimum and maximum points of the vertex bounding box, and the bounding box size, where: the vertex array is... each The coordinates are single-precision floating-point numbers; the face index array is... each Let be the indices of the three vertices that form the triangle face; the minimum point of the bounding box is . The largest point of the bounding box is The dimensions of the enclosure are: ; S32: For each vertex coordinate Normalization is performed, and the normalized vertex coordinate sequence and the original face index sequence are concatenated sequentially into a binary data block D. The vertex portion is then written into each normalized coordinate. The value, the face portion, is written sequentially to the index of each face. Among them, vertex coordinates Normalized to: ; In the formula, This is the minimum value; after normalization, the coordinates of all vertices fall within this range. Within the range; S33: Apply the SHA-1 hash function to the binary data block to obtain a 160-bit hash value. ; S34: The number of vertices, the number of faces, and the bounding box size of the additional mesh are used as verification fields to form the final hash unique identifier. : ; In the formula, n is the number of vertices and m is the number of faces. , , These are the three components of the bounding box dimensions; S35: When comparing two meshes, first compare the number of vertices, the number of faces, and the bounding box size. If any of these are different, they can be directly identified as different models without needing to perform a full SHA-1 comparison. If all three are the same, then perform the comparison. .

[0027] S4: Perform automatic repair on marked topological anomalies, repair non-manifold edges by boundary ring triangulation, repair UV overlap by translating overlapping islands, and flip normals by comparing the direction of the line connecting the normal vector of the face with the center of the adjacent face; import the repaired geometric data, the converted material data, and the hierarchical structure into the D5 renderer. S5: Assign hash identifiers to each scene element, generate incremental update packets containing only element data whose hash values ​​have changed through hash comparison, and synchronize them to the D5 scene to complete the reconstruction. (Hash identifiers...) The allocation formula is: ; In the formula, To provide a unique identifier for each element, To modify the timestamp, This is the SHA-1 hash value of the element's content.

[0028] The incremental update package is in JSON format and includes the element ID, new content binary data, and update type identifier. The synchronization process preserves the original rendering parameters of unchanged elements in the D5 scene.

[0029] After reconstruction, a Level of Detail (LOD) model is automatically generated based on the camera's line of sight. The LOD level calculation formula is as follows: ; In the formula, For LOD level, The distance from the center of the model's bounding box to the camera. The preset distance classification coefficient is set to 10.

[0030] This invention uses a 120m 2 Taking an interior home decoration 3ds Max scene as an example, this scene includes multi-level floor plan structures, instantiated furniture models such as sofas and tables and chairs, V-RayMtl wood grain or leather materials, CoronaMtl stone materials, IES spotlights, and an indoor standard camera. The model has a small number of non-manifold edges, normal flips, and UV overlap topology anomalies. Texture resources are stored in local multi-level directories. The specific implementation process is as follows: Step S1: Parse the .max file and construct the scene hierarchy tree, and detect topology anomalies; The .max binary file structure of the interior scene is directly parsed to extract geometric data, multi-level nested group data, material node data, IES lighting parameters, and camera parameters for walls, floors, furniture, lighting, and cameras. A depth-first recursive traversal is used to construct the scene hierarchy tree, with the apartment layout group as the root node, recursively generating parent-child hierarchical edges such as "living room group → sofa group → single sofa child node" and "bedroom group → cabinet group → cabinet door child node," and so on. The node hierarchy depth is calculated using the formula... Calculate the layer depth of each node to fully restore the original multi-level management logic of 3ds Max.

[0031] Simultaneously detect geometric topological anomalies, marking non-manifold edges of furniture models, normal flipping issues in wall models, and UV overlap problems in stone models, determining the normal anomaly threshold based on the angle between the normal vectors of adjacent faces; simultaneously analyze IES spotlight parameters and use the light intensity mapping ratio formula. Complete the preliminary mapping calculation of light intensity.

[0032] Execute step S2: Build a material mapping library and complete parameter conversion and texture relinking; Based on the node graph matching algorithm, the connection relationship between V-RayMtl and CoronaMtl is analyzed. The three sub-parameters of V-RayMtl, namely reflective roughness, refractive roughness, and diffuse roughness, are fitted with a nonlinear regression model and calibrated by a modified mapping table to output a single roughness value adapted to the D5 GGX model. The sub-parameters of CoronaMtl, namely reflective roughness, reflective gloss, metallicity, and IOR, are fitted with a multinomial regression model to output D5 roughness and metallicity values. At the same time, the texture resources are searched sequentially according to the original absolute path, including the sibling directory, the parent directory, and the preset resource root directory. A breadth-first recursive search is used to relink to the D5 project resource subdirectory.

[0033] Execution step S3: Hierarchical structure mapping and instantiation model reference-based refactoring; Based on the constructed scene hierarchy tree, the multi-level group structure of the 3ds Max interior scene is fully mapped to the D5 scene, preserving all hierarchical relationships such as apartment layout, living room, bedroom, and furniture.

[0034] The instantiated models of sofas, tables and chairs are reconstructed by reference using the unique hash identifier of the mesh geometry data.

[0035] Execution step S4: Automatic topology anomaly repair and scene data import; The marked non-manifold edges are repaired by boundary ring triangulation, UV overlap is repaired by translation of overlapping islands, and normals are flipped by comparing the direction of the line connecting the normal vector of the face with the center of the adjacent face. The repaired geometric data, the converted material data and the hierarchical structure are then imported into the D5 renderer.

[0036] Execute S5: Incremental hash update and automatic LOD generation; Assign hash identifiers to each scene element, generate incremental update packages through hash comparison and synchronize them to the D5 scene, and automatically generate LOD models based on camera line of sight after reconstruction.

[0037] This embodiment fully restores the hierarchical structure, material effects, and lighting parameters of the 3ds Max interior decoration scene through the above process, automatically repairs all topological anomalies, achieves incremental synchronous updates, requires no manual repair throughout the process, significantly improves the reconstruction accuracy and automation level, and fully meets the actual application needs of 3D rendering for interior design.

[0038] Therefore, this invention provides an automatic reconstruction method for D5 scenes based on the 3ds Max model file structure, solving the problems of hierarchical structure collapse, material conversion distortion, lack of incremental synchronization, and large workload of manual repair in existing reconstruction technologies. It integrates .max binary structure parsing, hierarchical tree recursive construction, material node graph fitting and conversion, instance-referenced reconstruction, and hash comparison incremental updates, combined with automatic topology detection, intelligent error correction, and scene optimization to form an integrated process. This reduces manual intervention, improves reconstruction accuracy and full-process automation, and achieves efficient and accurate automatic reconstruction of 3ds Max to D5 scenes, balancing hierarchical integrity, material fidelity, and large-scene operation efficiency. It provides reliable automated reconstruction technology support for 3D rendering scenes such as architectural visualization and interior design.

[0039] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for automatic reconstruction of D5 scenes based on 3ds Max model file structure, characterized in that, Includes the following steps: S1: Parse the block structure of the .max binary file of 3ds Max. By reading the block type identifier and block length field in the file header, recursively traverse each data block to extract model geometric data, nested hierarchical data, material node data, lighting and camera parameters, and recursively construct the scene hierarchy tree T(N, E), where N is the set of nodes and E is the set of parent and child hierarchical edges. At the same time, detect geometric topology anomalies and complete the marking. S2: A pre-built mapping library between 3ds Max third-party material nodes and D5PBR channels. The connection relationship between material nodes is analyzed based on the node graph matching algorithm. For non-directly mapped node parameters, a multi-dimensional parameter deconstruction and reconstruction method is used for conversion. S3: Map the 3ds Max scene hierarchy to the D5 scene according to the hierarchy tree T(N, E), and reconstruct the instantiated model by reference using the unique hash identifier of the mesh geometry data; S4: Perform automatic repair on marked topological anomalies, repair non-manifold edges by boundary ring triangulation, repair UV overlap by translating overlapping islands, and flip normals by comparing the direction of the line connecting the normal vector of the face with the center of the adjacent face; import the repaired geometric data, the converted material data, and the hierarchical structure into the D5 renderer. S5: Assign hash identifiers to each scene element, generate incremental update packets containing only element data whose hash values ​​have changed through hash comparison, and synchronize them to the D5 scene to complete the reconstruction. (Hash identifiers...) The allocation formula is: ; In the formula, To give each element a unique identifier To modify the timestamp, This is the SHA-1 hash value of the element's content.

2. The method for automatic reconstruction of D5 scenes based on 3ds Max model file structure according to claim 1, characterized in that, In S1, the hierarchical tree T(N, E) is constructed using a depth-first recursive traversal. Each node in the node set contains a node ID, name, transformation matrix, child node list, geometric data reference, and material reference, with a node hierarchy depth. The calculation formula is: ; In the formula, For any node in the hierarchy tree, , For nodes The parent node, Parent node The level depth value.

3. The method for automatic reconstruction of D5 scenes based on 3ds Max model file structure according to claim 2, characterized in that, In step S2, the mapping library contains material type identifiers, parameter names, and conversion function pointers; third-party materials include V-RayMtl and CoronaMtl materials, and the mapping library contains port mapping relationships for Falloff, Mix, and Composite nodes, which are stored in a directed acyclic graph structure.

4. The method for automatic reconstruction of D5 scenes based on 3ds Max model file structure according to claim 3, characterized in that, In step S2, for non-directly mapped node parameters, a multi-dimensional parameter deconstruction and reconstruction method is used for transformation, specifically including: For the roughness parameters of V-RayMtl material, three independent sub-parameters—reflection roughness, refraction roughness, and diffuse roughness—are analyzed. These three sub-parameters are then input into a pre-trained nonlinear regression model. This model fits the sample material using the least squares method and outputs a single roughness value adapted to the D5 GGX rendering model. For heterogeneous rendering model differences that cannot be directly fitted, including reflection tail length and edge hardness, secondary calibration is performed by looking up a preset correction mapping table. The expression of the nonlinear regression model is: ; in, The target parameter is the material parameter value that is converted and adapted to the D5PBR channel. For reflective roughness, For refractive roughness, For diffuse roughness, , , , The coefficients are obtained through sample regression, and their range is determined by the material type; For the CoronaMtl material, four sub-parameters are analyzed: reflective roughness, reflective gloss, metallicity, and IOR. These sub-parameters are input into a pre-trained multinomial regression model, which fits the sample material using the least squares method and outputs a single roughness value and metallicity value adapted to the D5 PBR channel. For subsurface scattering weights and Corona-specific parameters that cannot be directly fitted, secondary calibration is performed by looking up a preset correction mapping table. The expression of the multinomial regression model is as follows: ; ; In the formula, This is the converted D5 roughness value. This is the converted D5 metallicity value. The reflective roughness of CoronaMtl The reflective gloss of CoronaMtl The metallicity of CoronaMtl The refractive index of CoronaMtl The subsurface scattering weights of CoronaMtl ... , ... The coefficients are obtained through sample regression, and their range is determined by the material type and Corona version.

5. The method for automatic reconstruction of D5 scenes based on 3ds Max model file structure according to claim 4, characterized in that, In step S3, the hash-unique identifier is calculated using the following method: S31: Obtain raw mesh data: Extract the vertex array and face index array of the mesh from the geometry of the 3ds Max model, calculate the minimum and maximum points of the vertex bounding box, and the bounding box size, where: the vertex array is... Each The coordinates are single-precision floating-point numbers; the face index array is... Each Let be the indices of the three vertices that form the triangle face; the minimum point of the bounding box is . The largest point of the bounding box is The dimensions of the enclosure are: ; S32: For each vertex coordinate Normalization is performed, and the normalized vertex coordinate sequence and the original face index sequence are concatenated sequentially into a binary data block D. The vertex portion is then written into each normalized coordinate. The value, the face portion, is written sequentially to the index of each face. Among them, vertex coordinates Normalized to: ; In the formula, This is the minimum value; after normalization, the coordinates of all vertices fall within this range. Within the range; S33: Apply the SHA-1 hash function to the binary data block to obtain a 160-bit hash value. ; S34: The number of vertices, the number of faces, and the bounding box size of the additional mesh are used as verification fields to form the final hash unique identifier. : ; In the formula, n is the number of vertices and m is the number of faces. , , These are the three components of the bounding box dimensions; S35: When comparing two meshes, first compare the number of vertices, the number of faces, and the bounding box size. If any of these are different, they can be directly identified as different models without needing to perform a full SHA-1 comparison. If all three are the same, then perform the comparison. .

6. The method for automatic reconstruction of D5 scenes based on the 3ds Max model file structure according to claim 5, characterized in that, In S1, topological anomalies include non-manifold edges, UV overlap, and normal flip. The criteria for determining non-manifold edges are: counting the number of times each edge is referenced by the triangle face, and edges with a reference count not equal to 2 are marked as non-manifold edges. The criteria for determining UV overlap are: detecting that the overlapping area of ​​UV coordinates in the interval [0,1] exceeds a preset threshold of 0.

5. The criteria for determining normal flip are: the angle between the normal vectors of adjacent faces is greater than 120° and the two faces share an edge.

7. The method for automatic reconstruction of D5 scenes based on 3ds Max model file structure according to claim 6, characterized in that, In S5, the incremental update package is in JSON format, containing element ID, new content binary data and update type identifier. The synchronization process retains the original rendering parameters of the unchanged elements in the D5 scene.

8. The method for automatic reconstruction of D5 scenes based on 3ds Max model file structure according to claim 7, characterized in that, In step S5, after reconstruction, a Level of Distance (LOD) model is automatically generated based on the camera's line of sight. The LOD level calculation formula is as follows: ; In the formula, For LOD level, The distance from the center of the model's bounding box to the camera. The preset distance classification coefficient is set to 10.

9. The method for automatic reconstruction of D5 scenes based on 3ds Max model file structure according to claim 8, characterized in that, S2 also includes relinking the texture resource path. The specific steps for relinking the texture resource path are as follows: search by the original absolute path. If the file does not exist, search the same level directory, the parent directory, and the preset resource root directory in sequence. Use breadth-first recursive search. After finding it, copy or link the texture file to the resource subdirectory of the D5 project.

10. The method for automatic reconstruction of D5 scenes based on the 3ds Max model file structure according to claim 9, characterized in that, In step S1, the IES light parameters and light intensity mapping ratio of 3ds Max are simultaneously analyzed. for: ; In the formula, This refers to the light intensity of a D5 lamp. This refers to the light intensity of the 3ds Max lights.