Universal importing method for multi-format model

By setting a common data protocol across formats and format adaptation parsing, splitting and loading model components in real time, the problem of inefficient import of multi-format models in the existing technology is solved, and efficient model import and update is achieved.

CN120147489AActive Publication Date: 2025-06-13XIAN HONGYUAN VIDEO EQUIP CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510628964.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-06-13
Estimated Expiration
2045-05-16

AI Technical Summary

Technical Problem

The failure of the prior art to effectively process model files in multiple formats leads to low development efficiency and high time cost.

Method used

By setting up a common data protocol across formats, combining format adaptation parsing, splitting configurable components and real-time instantiation loading, the general import of multi-format models is realized.

Benefits of technology

It realizes the direct import of model files in multiple formats, improves development efficiency, reduces time costs, and supports real-time import and update of models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147489A_ABST
    Figure CN120147489A_ABST
Patent Text Reader

Abstract

The invention discloses a universal import method for a multi-format model, which relates to the technical field of model import and comprises the following steps of: setting a model import path and a cross-format universal data protocol; adding the external model file into the model import path to obtain an import model file; performing format adaptation analysis on the imported model file to obtain an analyzed file; extracting model data from the analysis file according to a general data protocol; splitting the model data into independent configurable components; and carrying out real-time instantiation loading on the configurable component. By setting the cross-format general data protocol and combining format adaptive analysis, configurable component splitting and real-time instantiation loading, model files in various formats can be directly imported, the development efficiency is improved, and the time cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of model import, and particularly to a general import method for multi-format models. Background Art

[0002] Currently, in a general virtual software application environment, if the scene map model and object detail model need to be changed or added, it is necessary to repackage the software or expand it in the form of hot updates, which greatly reduces the development efficiency and increases the time cost for the user. Therefore, it is necessary to study a general import method for multi-format models.

[0003] In the prior art, Chinese Patent CN115170765A discloses a model processing system, method and device. The model processing system includes: a task server and a dynamic loading module; the task server is used to obtain task information to be processed, where the task information to be processed includes the model identifier and model deployment information of the three-dimensional model to be processed; and send the task information to be processed to the dynamic loading module; the dynamic loading module is used to, after receiving the task information to be processed, obtain the mesh body information in the model file corresponding to the model identifier in the task information to be processed; and during the process of the three-dimensional rendering engine running the scene file of the virtual three-dimensional scene, process the three-dimensional model to be processed based on the model deployment information and the obtained mesh body information.

[0004] However, although the above prior art does not require repackaging the software, it does not consider the compatibility processing of model files in multiple formats and cannot directly import model files in multiple formats, resulting in low development efficiency and high time cost. Summary of the Invention

[0005] This application provides a general import method for multi-format models to solve the problems that the 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] On the one hand, this application provides a general import method for multi-format models, including the following steps: Step 1, set the model import path and a cross-format general data protocol.

[0007] Step 2, add an external model file to the model import path to obtain an imported model file.

[0008] Step 3, perform format adaptation parsing on the imported model file to obtain a parsed file.

[0009] Step 4, extract model data from the parsed file according to the general data protocol.

[0010] Step Five: Split the model data into independent configurable components.

[0011] Step Six: Perform real-time instantiation and loading on the configurable components.

[0012] In a possible implementation, in Step One, the setting process of the general data protocol includes: defining geometric data structures, material data structures, and bone data structures; the general data protocol is compatible with model files in different formats.

[0013] In a possible implementation, in Step Three, the format adaptation and parsing include: converting the coordinate system and unit of the imported model file into the coordinate system and unit of the Unreal Engine.

[0014] In a possible implementation, in Step Four, the extraction of the model data includes: extracting geometric data, material data, and bone data from the parsed file.

[0015] In a possible implementation, in Step Five, the configurable components include: geometric components, material components, and bone components.

[0016] After splitting to obtain the configurable components, perform Unreal Engine compatibility verification on the configurable components.

[0017] In a possible implementation, in Step Six, before the real-time instantiation and loading, create an index file for the configurable components in the directory of the model import path.

[0018] In a possible implementation, in Step Six, use an asynchronous thread to perform real-time instantiation and loading on the configurable components.

[0019] In a possible implementation, a general import method for multi-format models further includes: Step Seven, perform custom adjustments on the configurable components to obtain adjusted components.

[0020] In a possible implementation, a general import method for multi-format models further includes: Step Eight, dynamically store the configuration parameters of the configurable components and the adjusted components.

[0021] When it is detected that a new external model file is added in Step Two and no custom adjustments are made in Step Seven, Step Eight stores the configuration parameters of the configurable components.

[0022] When it is detected that custom adjustments are made in Step Seven, Step Eight stores the configuration parameters of the adjusted components.

[0023] A general import method for multi-format models in this application has the following advantages: By setting a universal data protocol across formats, combined with format adaptation parsing, splitting configurable components, and real-time instantiation loading, it is possible to directly import model files in multiple formats, improving development efficiency and reducing time costs.

[0024] The proposed definition of geometric data structure, material data structure, and skeletal data structure makes the universal data protocol compatible with model files in different formats, eliminating the data format barriers between different software.

[0025] By converting the coordinate system and unit of the imported model file into those of the Unreal Engine, it ensures 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.

[0026] By splitting the model data into geometric components, material components, and skeletal components, decoupling of model elements is achieved. Each component can be updated and replaced independently without reprocessing the entire model. The componentized structure also supports subsequent custom adjustments, enhancing the flexibility of model usage.

[0027] By performing Unreal Engine compatibility verification on the configurable components after splitting them into configurable components, the compatibility between the configurable components and the Unreal Engine is further improved.

[0028] By using asynchronous thread processing to perform real-time instantiation loading on the configurable components, real-time import and update of the model are achieved. Users can directly use the newly imported model at runtime without waiting for the software to be repackaged or hot updated.

[0029] By performing custom adjustments on the configurable components to obtain adjusted components, personalized customization of model usage is achieved.

[0030] The proposed dynamic storage of the configuration parameters of the configurable components and the adjusted components. This incremental update method only processes the changed components, significantly improving the update efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0032] Figure 1 It is a schematic flowchart of a multi-format model universal import method provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0033] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0034] As Figure 1 shown, the embodiments of the present application provide a multi-format model general import method, including the following steps: Step 1, set the model import path and a cross-format general data protocol.

[0035] Step 2, add an external model file into the model import path to obtain an imported model file.

[0036] Step 3, perform format adaptation parsing on the imported model file to obtain a parsed file.

[0037] Step 4, extract model data from the parsed file according to the general data protocol.

[0038] Step 5, split the model data into independent configurable components.

[0039] Step 6, perform real-time instantiation and loading on the configurable components.

[0040] Exemplarily, in Step 1, the setting process of the general data protocol includes: defining a geometric data structure, a material data structure, and a bone data structure; the general data protocol is compatible with model files of different formats.

[0041] Specifically, in this embodiment, in the Unreal Engine development environment, an independent model import module is built, and a model import folder is created under the software installation directory as the model import path.

[0042] Specifically, defining the geometric data structure includes: a vertex coordinate array (including the three-dimensional coordinates of all vertices in the model) and a face index array (defining which vertices each face consists of), and each face index in the face index array points to three vertex coordinates in the vertex coordinate array. Defining the material data structure includes: a diffuse color RGB value (the diffuse color of each material) and a texture map path set (the texture map paths used by the material). Defining the bone data structure includes: a bone hierarchy tree (defining the hierarchical relationship of the bones) and key frame animation data (defining the transformation matrix of the bones in each key frame). In this embodiment, the general data protocol is compatible with the core parameters of FBX files exported by software such as 3DS MAX and MAYA.

[0043] Exemplarily, in step three, the format adaptation and parsing includes: converting the coordinate system and unit of the imported model file into those of the Unreal Engine.

[0044] Specifically, in this embodiment, after the external model file is added to the model import path, the model import module starts the format adaptation and parsing program through the parser. First, it reads the file header information to identify the metadata generated by the software (such as the unit settings of 3DSMAX and the coordinate system of MAYA). According to the preset conversion rules, it converts the coordinate system of the imported model file (such as the Y-axis upward in MAYA) into the Z-axis upward coordinate system of the Unreal Engine and unifies the units.

[0045] Exemplarily, in step four, the extracting of model data includes: extracting the geometric data, material data, and skeletal data from the parsed file.

[0046] Specifically, in this embodiment, according to the general data protocol, the vertex coordinate array and face index array are extracted from the parsed file; the diffuse color RGB values and the texture map path set are extracted. If there are multiple texture maps, they are sorted according to the preset priority; the skeletal hierarchical relationship tree and key frame animation data are extracted, recording the parent node index and initial transformation matrix of each bone, and storing the displacement, rotation, and scaling parameters in chronological order of the time axis.

[0047] Exemplarily, in step five, the configurable components include: geometric components, material components, and skeletal components.

[0048] After splitting to obtain the configurable components, a Unreal Engine compatibility check is performed on the configurable components.

[0049] Specifically, in this embodiment, a unique identifier is assigned to each component in the split configurable components. For example, the identifier of the geometric component is G-001, the identifier of the material component is M-001, and the identifier of the skeletal component is A-001. In other possible embodiments, other forms of unique identifiers can also be set.

[0050] Specifically, in this embodiment, the Unreal Engine compatibility check includes: geometric component compatibility check, material component compatibility check, and skeletal component compatibility check.

[0051] Among them, the geometric component compatibility check includes: checking whether the number of vertices of the geometric component exceeds the maximum limit of a single mesh body in the Unreal Engine (the preset maximum limit in this embodiment is 1 million vertices). If it exceeds, the mesh body splitting algorithm is automatically triggered, and the large mesh of the geometric component is split into multiple sub-mesh bodies, with the number of vertices of each sub-mesh body not exceeding the maximum limit.

[0052] The compatibility check of the material component includes: checking the texture map format of the material component. If it is a format not supported by the Unreal Engine (such as BMP), the built-in converter is automatically called to convert it to the DDS format, and the mipmaps texture image is generated.

[0053] The compatibility check of the skeletal component includes: checking whether the key frame rate of the skeletal component matches the frame rate of the Unreal Engine (preset to 60 FPS in this embodiment). If not, the frame rate adaptation is performed through the linear interpolation algorithm.

[0054] Exemplarily, in step six, before the real-time instantiation loading, an index file of the configurable component is established under the directory of the model import path.

[0055] 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).

[0056] Exemplarily, in step six, the asynchronous thread processing is adopted to perform the real-time instantiation loading of the configurable component.

[0057] Specifically, in this embodiment, when performing the real-time instantiation loading, first read the index file of the configurable component, and find the corresponding component path according to the model name selected by the user. The asynchronous thread processing is used to load the geometry component (create a StaticMeshActor instance in the Unreal Engine, and write the vertex coordinate array and face index array of the geometry component into the mesh resource), the material component (create a MaterialInstanceDynamic instance, apply the diffuse color RGB value and the texture map path set of the material component to the material instance, and associate it with the mesh of the geometry component), and the skeletal component (create a SkeletalMeshActor instance, load the skeletal hierarchy tree of the skeletal component into the skeleton resource, import the key frame animation data into the animation controller, and establish the animation state machine).

[0058] Exemplarily, a general import method for multi-format models further includes: step seven, performing custom adjustment on the configurable component to obtain an adjusted component.

[0059] 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), and scaling (scaling ratios of the X, Y, and Z axes), as well as material parameter adjustments (diffuse color picker, texture map replacement button, transparency slider). When the user modifies the parameters, the engine rendering is updated in real time. The position transformation of the geometric components is achieved by modifying the world transformation matrix of the Actor, and the material parameter adjustments directly modify the corresponding properties of the MaterialInstanceDynamic instance. It supports the user to perform combined operations on multiple components, such as combining multiple geometric components into a composite model, and manages the combined relationship through a hierarchical tree structure. The transformation operations of the parent component will be passed to the child components. A component visibility control function is provided, and the user can individually display or hide a certain geometric component, material component, or animation component, which is convenient for adjusting the model details.

[0060] Exemplarily, a general import method for multi-format models further includes: Step Eight, dynamically storing the configuration parameters of the configurable components and the adjustment components.

[0061] When it is detected that a new external model file is added in Step Two and no custom adjustment is made in Step Seven, Step Eight stores the configuration parameters of the configurable components.

[0062] When it is detected that a custom adjustment is made in Step Seven, Step Eight stores the configuration parameters of the adjustment components.

[0063] Specifically, in this embodiment, the configuration parameters of the configurable components are stored through the index file of the configurable components, and the configuration parameters of the adjustment components are stored in the pre-set Config.json file 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 is added in Step Two and no custom adjustment is made in Step Seven, Step Eight stores the configuration parameters of the configurable components obtained from Step Three to Step Six, and updates the model based on the configuration parameters of the configurable components; when it is detected that a custom adjustment is made in Step Seven, Step Eight stores the configuration parameters of the adjustment components obtained from Step Seven, and updates the model based on the configuration parameters of the adjustment components. During the model update process, the scene instances that have loaded this model will receive an update notification and can choose to apply the update immediately or when the scene is reloaded.

[0064] By setting a cross-format general data protocol, combining format adaptation parsing, splitting configurable components, and real-time instantiation loading, the embodiments of this application can directly import model files of multiple formats, improving the development efficiency and reducing the time cost.

[0065] The proposed definition of geometric data structure, material data structure, and skeletal data structure, and the general data protocol is compatible with model files in different formats, eliminating the data format barriers between different software.

[0066] By converting the coordinate system and unit of the imported model file into the coordinate system and unit of the Unreal Engine, it ensures 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.

[0067] By splitting the model data into geometric components, material components, and skeletal components, the decoupling of model elements is achieved. Each component can be updated and replaced independently without reprocessing the entire model. The componentized structure also supports subsequent custom adjustments, enhancing the flexibility of model usage.

[0068] By performing Unreal Engine compatibility verification on the configurable components after splitting them into configurable components, the compatibility between the configurable components and the Unreal Engine is further improved.

[0069] By using asynchronous thread processing to perform real-time instantiation and loading of the configurable components, the real-time import and update of the model are achieved. Users can directly use the newly imported model at runtime without waiting for the software to be repackaged or hot updated.

[0070] By performing custom adjustments on the configurable components to obtain adjusted components, the personalized customization of model usage is achieved.

[0071] The proposed dynamic storage of the configuration parameters of the configurable components and the adjusted components. This incremental update method only processes the changed components, greatly improving the update efficiency.

[0072] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0073] Obviously, those skilled in the art can make various changes and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also 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, adding the external model file into the model import path to obtain the imported model file; Step 3, performing format adaptation parsing 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 six: instantiate and load the configurable component in real time.

2. A multi-format model universal import method according to claim 1, characterized in that: In step 1, the setting process of 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.

3. A multi-format model universal import method according to claim 1, characterized in that: 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.

4. A multi-format model universal import method according to claim 1, characterized in that: In step 4, the extracting model data includes: extracting geometric data, material data and skeleton data in the parsed file.

5. A multi-format model universal import method according to claim 1, characterized in that: In step 5, the configurable components include: a geometry component, a material component and a skeleton component; After the configurable components are separated, Unreal Engine compatibility check is performed on the configurable components.

6. A multi-format model universal import method 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.

7. A multi-format model universal import method 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.

8. A multi-format model universal import method according to claim 1, characterized in that: The method also includes: step seven, performing custom adjustment on the configurable component to obtain an adjusted component.

9. A multi-format model universal import method according to claim 8, characterized in that: The method further comprises: 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 custom 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

  • Virtual engine model loading method, electronic equipment and storage medium

    CN112817649A

  • Method and device for processing 3D model data

    CN113744412A

  • Skeleton model generation method and system, medium and electronic terminal

    CN113920233A