A universal import method for multi-format models
Through the splitting and component processing of cross-format general data protocol and model files, the problem of inefficient import of multi-format model files is solved, and efficient and flexible model import and update are achieved.
Patent Information
- Application Number
- CN202510628964.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-05-16
AI Technical Summary
The existing technology fails to effectively handle model files compatibility in multiple formats, resulting in low development efficiency and high time cost, and the inability to directly import model files in multiple formats.
By setting a common data protocol across formats, format adaptation parsing is performed, model files are split into independent configurable components, and real-time instantiation loading is adopted, combined with asynchronous threading and custom adjustments, real-time import and update of model data is achieved.
It realizes direct import of model files in multiple formats, improves development efficiency, reduces time costs, supports decoupling and custom adjustment of model elements, and improves the flexibility and update efficiency of model use.
Smart Images

Figure CN120147489B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of model import, and in particular to a universal import method for multi-format models. Background Art
[0002] Currently, in general virtual software applications, changes or additions to scene map models and object detail models require repackaging the software or expanding it through hot updates, significantly reducing development efficiency and increasing user time costs. Therefore, research is needed on a universal import method for multi-format models.
[0003] In the prior art, Chinese patent CN115170765A discloses a model processing system, method and device, which includes: a task server and a dynamic loading module; the task server is used to obtain task information to be processed, wherein the task information to be processed includes a model identifier and model deployment information of a three-dimensional model to be processed; the task information to be processed is sent to the dynamic loading module; the dynamic loading module is used to obtain mesh information in a model file corresponding to the model identifier in the task information to be processed after receiving the task information to be processed; and in the process of a three-dimensional rendering engine running a scene file of a virtual three-dimensional scene, the three-dimensional model to be processed is processed based on the model deployment information and the obtained mesh information.
[0004] However, although the above-mentioned existing technology does not require repackaging of the software, it does not consider the compatibility processing of model files in various formats and cannot directly import model files in various formats, resulting in low development efficiency and high time cost. Summary of the Invention
[0005] This application provides a universal import method for multi-format models to solve the problems that existing model import technology does not consider the compatibility processing of model files in multiple formats, cannot directly import model files in multiple formats, has low development efficiency and high time cost.
[0006] In one aspect, the present application provides a general method for importing multi-format models, comprising the following steps:
[0007] Step 1: Set the model import path and common data protocol across formats.
[0008] Step 2: Add the external model file into the model import path to obtain the imported model file.
[0009] Step three: perform format adaptation parsing on the imported model file to obtain a parsed file.
[0010] Step 4: extract model data from the parsed file according to the general data protocol.
[0011] Step five: split the model data into independent configurable components.
[0012] Step six: instantiate and load the configurable component in real time.
[0013] In a possible implementation, in step 1, the process of setting up the universal data protocol includes: defining a geometric data structure, a material data structure, and a skeleton data structure; and the universal data protocol is compatible with model files of different formats.
[0014] In a possible implementation, in step three, the format adaptation and parsing includes: converting the coordinate system and unit of the imported model file into the coordinate system and unit of the Unreal Engine.
[0015] In a possible implementation, in step 4, extracting the model data includes extracting geometric data, material data, and skeleton data from the parsed file.
[0016] In a possible implementation, in step five, the configurable components include: a geometry component, a material component, and a skeleton component.
[0017] After the configurable components are split, Unreal Engine compatibility check is performed on the configurable components.
[0018] In a possible implementation, in step six, before the real-time instantiation loading, an index file of the configurable component is created in the directory of the model import path.
[0019] In a possible implementation, in step six, asynchronous thread processing is used to instantiate and load the configurable component in real time.
[0020] In a possible implementation, a universal import method for multi-format models further includes: step seven, customizing the configurable component to obtain an adjusted component.
[0021] In a possible implementation, a universal import method for multi-format models further includes: step eight, dynamically storing configuration parameters of the configurable component and the adjustment component.
[0022] When it is detected that a new external model file is added in step 2 and no custom adjustment is performed in step 7, step 8 stores the configuration parameters of the configurable component.
[0023] When it is detected that the customized adjustment is performed in step seven, step eight stores the configuration parameters of the adjustment component.
[0024] The universal import method for multi-format models in this application has the following advantages:
[0025] By setting up a universal data protocol across formats, combined with format adaptation parsing, splitting configurable components and real-time instantiation loading, model files in multiple formats can be directly imported, improving development efficiency and reducing time costs.
[0026] The proposed definition of geometric data structure, material data structure and skeleton data structure, and the universal data protocol are compatible with model files of different formats, eliminating the data format barriers between different software.
[0027] By converting the coordinate system and units of the imported model file to the Unreal Engine's coordinate system and units, we ensure that model data from different sources can be accurately converted into a format recognizable by the Unreal Engine, reducing the adaptation work for different formats during the development process.
[0028] By splitting model data into geometry, material, and skeleton components, we decouple model elements, allowing each component to be updated and replaced independently without reprocessing the entire model. This componentized structure also supports subsequent customization, increasing model flexibility.
[0029] By performing Unreal Engine compatibility verification on the configurable components after splitting them, the compatibility of the configurable components with the Unreal Engine is further improved.
[0030] By using asynchronous thread processing to instantiate and load configurable components in real time, real-time import and update of models are achieved. Users can directly use newly imported models at runtime without waiting for software repackaging or hot updates.
[0031] By customizing the configurable components, the adjusted components are obtained, thereby achieving personalized customization of the model usage.
[0032] The proposed method of dynamically storing the configuration parameters of the configurable components and the adjustment components processes only the changed components in an incremental update manner, thereby greatly improving the update efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0034] Figure 1 A flowchart of a universal import method for multi-format models provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0036] like Figure 1 As shown, the embodiment of the present application provides a universal import method for multi-format models, including the following steps:
[0037] Step 1: Set the model import path and common data protocol across formats.
[0038] Step 2: Add the external model file into the model import path to obtain the imported model file.
[0039] Step three: perform format adaptation parsing on the imported model file to obtain a parsed file.
[0040] Step 4: extract model data from the parsed file according to the general data protocol.
[0041] Step five: split the model data into independent configurable components.
[0042] Step six: instantiate and load the configurable component in real time.
[0043] Exemplarily, in step 1, the process of setting up the universal data protocol includes: defining a geometric data structure, a material data structure, and a skeleton data structure; and the universal data protocol is compatible with model files of different formats.
[0044] Specifically, in this embodiment, in the Unreal Engine development environment, an independent model import module is constructed, and a model import folder is created in the software installation directory as the model import path.
[0045] Specifically, the definition of the geometric data structure includes: a vertex coordinate array (containing the three-dimensional coordinates of all vertices in the model) and a face index array (defining which vertices each face is composed of), and each face index in the face index array points to the three vertex coordinates in the vertex coordinate array. The definition of the material data structure includes: the diffuse color RGB value (the diffuse color of each material) and the texture map path set (the texture map path used by the material). The definition of the bone data structure includes: a bone hierarchy tree (defining the hierarchical relationship of the bones) and keyframe animation data (defining the transformation matrix of the bones in each keyframe). In this embodiment, the universal data protocol is compatible with the core parameters of FBX files exported by software such as 3DS MAX and MAYA.
[0046] Exemplarily, in step three, the format adaptation and parsing includes: converting the coordinate system and unit of the imported model file into the coordinate system and unit of the Unreal Engine.
[0047] Specifically, in this embodiment, after the external model file is added to the model import path, the model import module starts the format adaptation parsing program through the parser, first reads the file header information, identifies the metadata generated by the software (such as the unit setting of 3DSMAX and the coordinate system of MAYA), and converts the coordinate system of the imported model file (such as the Y-axis upward of MAYA) into the Z-axis upward coordinate system of the Unreal Engine according to the preset conversion rules, and unifies the units.
[0048] Exemplarily, in step 4, extracting the model data includes: extracting geometric data, material data, and skeleton data from the parsed file.
[0049] Specifically, in this embodiment, according to the general data protocol, the vertex coordinate array and the face index array are extracted from the parsed file; the diffuse color RGB value and the texture map path set are extracted, and if there are multiple texture maps, they are sorted according to the preset priority; the bone hierarchy tree and the key frame animation data are extracted, the parent node index and the initial transformation matrix of each bone are recorded, and the displacement, rotation, and scaling parameters are stored in timeline order.
[0050] Exemplarily, in step five, the configurable components include: a geometry component, a material component, and a skeleton component.
[0051] After the configurable components are split, Unreal Engine compatibility check is performed on the configurable components.
[0052] Specifically, in this embodiment, a unique identifier is assigned to each of the split configurable components, such as the geometry component identifier G-001, the material component identifier M-001, and the skeleton component identifier A-001. In other possible embodiments, other forms of unique identifiers may also be set.
[0053] Specifically, in this embodiment, the Unreal Engine compatibility check includes: geometry component compatibility check, material component compatibility check, and skeleton component compatibility check.
[0054] The compatibility check of the geometric component includes checking whether the number of vertices of the geometric component exceeds the maximum limit of a single mesh of the Unreal Engine (the preset maximum limit in this embodiment is 1 million vertices). If it exceeds, the mesh splitting algorithm is automatically triggered to split the large mesh of the geometric component into multiple sub-meshes according to the spatial partitioning method. The number of vertices of each sub-mesh does not exceed the maximum limit.
[0055] Material component compatibility verification includes: checking the texture map format of the material component. If it is a format not supported by Unreal Engine (such as BMP), it will automatically call the built-in converter to convert it to DDS format and generate mipmaps texture image.
[0056] The compatibility check of the skeleton component includes: checking whether the key frame rate of the skeleton component matches the frame rate of the Unreal Engine (preset to 60FPS in this embodiment); if not, the frame rate is adapted through a linear interpolation algorithm.
[0057] Exemplarily, in step six, before the real-time instantiation loading, an index file of the configurable component is created in the directory of the model import path.
[0058] Specifically, in this embodiment, the index file of the configurable component is used to record the basic information of the imported model file (model name, import time, component list and storage path).
[0059] Exemplarily, in step six, asynchronous thread processing is used to instantiate and load the configurable component in real time.
[0060] Specifically, in this embodiment, when performing real-time instantiation loading, the index file of the configurable component is first read, and the corresponding component path is searched based on the model name selected by the user. Asynchronous thread processing is used to load the geometry component (creating a StaticMeshActor instance in Unreal Engine and writing the geometry component's vertex coordinate array and face index array into the mesh asset), the material component (creating a MaterialInstanceDynamic instance, applying the material component's diffuse color RGB value and texture map path set to the material instance, and associating it with the geometry component's mesh), and the skeleton component (creating a SkeletalMeshActor instance, loading the skeleton component's bone hierarchy tree into the skeleton asset, importing keyframe animation data into the animation controller, and establishing an animation state machine).
[0061] Exemplarily, a universal import method for multi-format models further includes: step seven, customizing the configurable component to obtain an adjusted component.
[0062] Specifically, in this embodiment, a model property configuration panel is provided, which includes basic transformation parameters such as position (X, Y, Z coordinates), rotation (Yaw, Pitch, Roll angles), scale (X, Y, Z axis scaling ratio), and material parameter adjustment (diffuse color picker, texture map replacement button, transparency slider). When the user modifies the parameters, the engine rendering update is triggered in real time. The position transformation of the geometric component is achieved by modifying the world transformation matrix of the Actor, and the material parameter adjustment directly modifies the corresponding properties of the MaterialInstanceDynamic instance. It supports users to combine multiple components, such as combining multiple geometric components into a composite model. The combination relationship is managed through a hierarchical tree structure, and the transformation operation of the parent component will be passed to the child component. It provides a component visibility control function, and users can display or hide a certain geometric component, material component or animation component separately to facilitate the adjustment of model details.
[0063] Exemplarily, a universal import method for multi-format models further includes: step eight, dynamically storing configuration parameters of the configurable component and the adjustment component.
[0064] When it is detected that a new external model file is added in step 2 and no custom adjustment is performed in step 7, step 8 stores the configuration parameters of the configurable component.
[0065] When it is detected that the customized adjustment is performed in step seven, step eight stores the configuration parameters of the adjustment component.
[0066] Specifically, in this embodiment, the configuration parameters of the configurable component are stored through the index file of the configurable component, and the configuration parameters of the adjustment component are stored in the Config.json file pre-set in the directory of the model import path in JSON format. The model import module continuously monitors the directory of the model import path. When it is detected that a new external model file has been added in step two and no custom adjustment has been made in step seven, step eight stores the configuration parameters of the configurable component obtained in steps three to six, and updates the model based on the configuration parameters of the configurable component; when it is detected that a custom adjustment has been made in step seven, step eight stores the configuration parameters of the adjustment component obtained in step seven, and updates the model based on the configuration parameters of the adjustment component. During the model update process, the scene instance that has loaded the model will receive an update notification and choose to apply the update immediately or apply it when the scene is reloaded.
[0067] The embodiment of the present application sets a universal data protocol across formats, combines format adaptation parsing, splitting configurable components and real-time instantiation loading, and can directly import model files in various formats, thereby improving development efficiency and reducing time costs.
[0068] The proposed definition of geometric data structure, material data structure and skeleton data structure, and the universal data protocol are compatible with model files of different formats, eliminating the data format barriers between different software.
[0069] By converting the coordinate system and units of the imported model file to the Unreal Engine's coordinate system and units, we ensure that model data from different sources can be accurately converted into a format recognizable by the Unreal Engine, reducing the adaptation work for different formats during the development process.
[0070] By splitting model data into geometry, material, and skeleton components, we decouple model elements, allowing each component to be updated and replaced independently without reprocessing the entire model. This componentized structure also supports subsequent customization, increasing model flexibility.
[0071] By performing Unreal Engine compatibility verification on the configurable components after splitting them, the compatibility of the configurable components with the Unreal Engine is further improved.
[0072] By using asynchronous thread processing to instantiate and load configurable components in real time, real-time import and update of models are achieved. Users can directly use newly imported models at runtime without waiting for software repackaging or hot updates.
[0073] By customizing the configurable components, the adjusted components are obtained, thereby achieving personalized customization of the model usage.
[0074] The proposed method of dynamically storing the configuration parameters of the configurable components and the adjustment components processes only the changed components in an incremental update manner, thereby greatly improving the update efficiency.
[0075] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0076] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A universal import method for multi-format models, characterized in that: The following steps are involved: Step 1: Set the model import path and the universal data protocol across formats; Step 2: Add the external model file to the model import path to obtain the imported model file; Step 3: Perform format adaptation analysis on the imported model file to obtain a parsed file; Step 4: extracting model data from the parsed file according to the general data protocol; Step 5: split the model data into independent configurable components; Step 6: instantiate and load the configurable component in real time; In step 1, the process of setting up the universal data protocol includes: defining a geometric data structure, a material data structure, and a skeleton data structure; the universal data protocol is compatible with model files of different formats; In step three, the format adaptation analysis includes: converting the coordinate system and unit of the imported model file into the coordinate system and unit of the Unreal Engine; In step 5, the configurable components include: geometry components, material components and skeleton components; After the configurable components are split, the configurable components are checked for compatibility with the Unreal Engine; Unreal Engine compatibility check includes: geometry component compatibility check, material component compatibility check, and skeleton component compatibility check; The compatibility check for geometric components includes checking whether the number of vertices in the geometric component exceeds the maximum limit for a single mesh in Unreal Engine. If so, the mesh splitting algorithm is automatically triggered to split the large mesh of the geometric component into multiple sub-meshes using a spatial partitioning method. The number of vertices in each sub-mesh does not exceed the maximum limit. Material component compatibility check includes: checking the texture map format of the material component. If it is a format not supported by Unreal Engine, it will automatically call the built-in converter to convert it to DDS format and generate mipmaps texture image; Skeletal component compatibility verification includes checking whether the key frame rate of the skeleton component matches the frame rate of the Unreal Engine. If not, the frame rate is adapted through a linear interpolation algorithm.
2. A universal import method for multi-format models according to claim 1, characterized in that: In step 4, extracting the model data includes extracting geometric data, material data and skeleton data from the parsed file.
3. A universal import method for multi-format models according to claim 1, characterized in that: In step six, before the real-time instantiation loading, an index file of the configurable component is created in the directory of the model import path.
4. A universal import method for multi-format models according to claim 1, characterized in that: In step six, asynchronous thread processing is used to instantiate and load the configurable component in real time.
5. A universal import method for multi-format models according to claim 1, characterized in that: The method further includes: step seven, performing custom adjustment on the configurable component to obtain an adjusted component.
6. A universal import method for multi-format models according to claim 5, characterized in that: The method further includes: step eight, dynamically storing configuration parameters of the configurable component and the adjustment component; When it is detected that a new external model file is added in step 2 and no custom adjustment is performed in step 7, step 8 stores the configuration parameters of the configurable component; When it is detected that the customized adjustment is performed in step seven, step eight stores the configuration parameters of the adjustment component.
Citation Information
Patent Citations
Model processing system, method and device
CN115170765A
Method and device for converting BIM model data into glTF data, equipment and medium
CN110751696A
Method and device for processing 3D model data
CN113744412A