A method for loading 3D models at runtime based on UE5
By implementing the method of loading three-dimensional models at runtime in UnrealEngine 5, the problems of insufficient flexibility, low efficiency and poor user experience in the prior art are solved, and the three-dimensional model loading and synchronization with high flexibility, high efficiency and excellent user experience are achieved.
Patent Information
- Application Number
- CN202510020278.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-07
AI Technical Summary
In the development process of existing 3D engines, the loading of 3D models is usually carried out in the editor, resulting in insufficient flexibility, inefficiency and poor user experience, especially in application scenarios where dynamic or unknown models are loaded in real time.
A method of loading a three-dimensional model at runtime based on UnrealEngine5 is adopted. The asset management module is used to process the download task asynchronously. The loading module dynamically loads the three-dimensional model when the application runs, and synchronizes the position, scaling, orientation and collision information of the model in a multi-client environment through the synchronization module.
It significantly improves the flexibility and usability of the system, improves user experience, supports dynamic digital twins, user-defined scenarios and frequent updates of models, and enhances three-dimensional visualization efficiency and system security.
Smart Images

Figure CN119417994B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer systems, and in particular to a method for loading a three-dimensional model at runtime based on UE5. Background Art
[0002] With the rapid development of digital twin technology, 3D visualization has become an indispensable technical tool in the fields of smart cities, industrial manufacturing, architectural design, etc. Through 3D engines (including UnrealEngine5 or Unity), developers can create realistic virtual scenes that support complex data interaction and real-time dynamic updates.
[0003] In the development process of traditional 3D engines, 3D models are usually loaded in the editor. This means that developers need to embed model resources into the project during the design phase and package them into runtime applications. Although this method is suitable for projects with static or known models, it has significant limitations for application scenarios that require real-time loading of dynamic or unknown models (for example, dynamic scene generation or real-time data-driven digital twin systems), including:
[0004] 1. Lack of flexibility: Unable to dynamically adapt to changes in external models, limiting the scalability of the system.
[0005] 2. Inefficiency: Frequent model updates require repackaging of the project, which is time-consuming and labor-intensive.
[0006] 3. Poor user experience: New models cannot be loaded during runtime, affecting the real-time and interactivity of the application.
[0007] To solve these problems, we proposed a method for loading 3D models at runtime based on UnrealEngine 5. This method can dynamically load external 3D models when the application is running, without the need to embed the 3D models in the packaged content in advance, which greatly improves the flexibility and usability of the system.
[0008] This approach is particularly suitable for the following scenarios:
[0009] Dynamic digital twin: Associating data from external sensors or databases with 3D scenes in real time.
[0010] User-defined scenes: Allow users to import their own 3D models at runtime for personalized display or design.
[0011] Systems with frequent model updates: Supports rapid updates of 3D model resources without repackaging the application.
[0012] This invention not only expands the application scenarios of UnrealEngine5, but also provides new technical ideas for other 3D engines (including Unity), which is of great significance in improving 3D visualization efficiency and enhancing system flexibility. Summary of the invention
[0013] Technical issues solved
[0014] In view of the deficiencies of the prior art, the present invention provides a method for loading a three-dimensional model at runtime based on UE5, which solves the problems of the prior art.
[0015] Technical Solution
[0016] To achieve the above purpose, the present invention is implemented through the following technical solutions: a method for loading a 3D model at runtime based on UE5, wherein the system composition of the method for loading a 3D model includes the following modules: an asset management module, which is used to upload, review, and download 3D model files, and decide whether to download according to whether the file already exists, and decide whether to add the download address to the blacklist management according to the result returned by the background, wherein the download task is executed as an asynchronous task to reduce the jamming of the main thread and the rendering thread; a loading module, which is used to place the downloaded 3D model into the scene, and configure the scaling, position, and orientation; a synchronization module, which is used to synchronize the position, scaling, orientation, and collision information of the 3D model between multiple clients;
[0017] The steps of the method for loading a three-dimensional model include:
[0018] s1. Upload the 3D model file and perform format verification. Models that meet the standards will enter the review and download process. If the file already exists in the local cache, the download step will be skipped and the uploaded model will be reviewed to ensure the integrity and correctness of the file. If the file does not meet the standards, an error message will be returned.
[0019] s2. Asynchronously execute the model download task, and store it in the local cache after the download is completed. At the same time, dynamically manage the download address according to the feedback information from the background. After the model is downloaded, start the scene construction process and initialize the model's mesh data, material, camera, and node tree.
[0020] s3. According to the preset unit scaling factor, adjust the root node transformation matrix of the model, initialize the dynamic material instance related to the model, process the mapping parameters of the dynamic material instance, and update the normal, roughness, and metalness properties to enhance the realism of the material;
[0021] s4. Create a procedural mesh and bind the node data with the material information to complete the construction of the 3D model. Transmit the loaded 3D model information through the synchronization module to ensure synchronization of position, scale, and orientation transformation properties in a multi-client environment. Set a copy mark for the transformation properties and record the synchronization status of each client through the network mapping table.
[0022] s5. Transmit attribute data through UDP protocol. In each network update cycle, detect whether the transformation attribute has changed. If it has changed, package the update data and send it to all clients that meet the observation range. During the upload and download process, use generative adversarial networks and anomaly detection algorithms to monitor system behavior in real time, detect potential security threats, and ensure the security of system and user data.
[0023] s6. Encrypt sensitive data for transmission to ensure privacy protection of user data and 3D models during transmission, and blacklist unsafe model file addresses to ensure that the system does not load model data from untrusted sources;
[0024] s7. Optimize dynamic materials through deep learning algorithms, improve the real-time performance and dynamic adjustment capabilities of materials to adapt to different lighting and interactive environments, combine recursive neural networks and attention mechanisms to optimize eye tracking and improve synchronization accuracy, especially in multi-person online interactive scenarios, to ensure the response speed and accuracy of user perspective and interaction, and complete the download and loading process of the 3D model, triggering the rendering process of the model so that it is displayed correctly in the scene and begins to receive user interaction operations.
[0025] Preferably, the operation steps of the loading module include:
[0026] Build the scene: decide whether to wait based on the status of the asset manager; initialize the scene data in the 3D model, including meshes, cameras, materials, node trees, process unit scaling factors, and adjust the transformation matrix of the root node; traverse all materials in the scene, obtain soft references to material samples, convert them into material interfaces, and create dynamic material instances of the asset manager based on the interfaces; update the map parameter information in the dynamic material instance based on the map type in the model material, including normal, metalness, roughness, self-illumination, and transparency;
[0027] Perform procedural mesh construction: process the node data obtained after building the scene, obtain the node mesh data from the node data, assign the root node's transformation to the 3D model in the asset manager according to the material index; process the vertex, triangle, normal, UV, and tangent data in the mesh and assign them to the 3D model in the asset manager; store the dynamic material instances obtained in the building scene, and add the model data to the asset table in the asset manager;
[0028] Run Unreal Engine to get data: Change the status of the asset manager to completed and broadcast the relevant model data has been built to the subscribed programs.
[0029] Preferably, the operation steps of the synchronization module include:
[0030] After the user uploads the model data to the backend database, the corresponding model information is stored in a dedicated server;
[0031] A trigger box is set outside the 3D model. When the user collides with the trigger box, the download logic is executed to download the model to the client and then loaded into the scene through the loading module.
[0032] By adding replication flags to the transformation properties of the loaded 3D model and setting synchronization rules, including synchronizing only within the user's viewing range, the Unreal Engine stores this information in an internal network mapping table;
[0033] The server checks whether the transformed attribute has changed at each network update interval. If it has changed, it marks the attribute as "changed" and packages the attribute data, and sends it to the client connected to the dedicated server and meeting the set observation range through the UDP protocol;
[0034] After receiving the data sent by the dedicated server, the client updates the position information of the 3D model to achieve position synchronization.
[0035] Preferably, the asset management module further includes a step of determining whether the format of the uploaded 3D model file meets a predetermined standard, and the model file that meets the standard is subsequently reviewed and downloaded.
[0036] Preferably, in the step of constructing a scene, the dynamic material instance is generated based on a deep learning algorithm to enhance the realism and dynamic adjustment capability of the material.
[0037] Preferably, the synchronization module optimizes eye tracking through a recursive neural network and an attention mechanism to improve synchronization accuracy and user interaction experience.
[0038] Preferably, the loading module supports a variety of three-dimensional model formats and automatically adjusts the unit scaling factor of the model through an adaptive algorithm to adapt to different application scenarios.
[0039] Beneficial Effects
[0040] The present invention provides a method for loading a three-dimensional model at runtime based on UE5. It has the following beneficial effects:
[0041] The present invention uses asynchronous tasks to perform download operations through the asset management module, which significantly reduces the blocking phenomenon of the main thread and the rendering thread, thereby improving the overall response speed and operation smoothness of the system. By utilizing hash calculation and database query mechanisms, it is efficient to determine whether a file already exists, avoiding repeated downloads, and saving bandwidth and storage resources. In addition, the application of multi-threading and parallel processing technology enables downloading, loading and synchronization tasks to be executed in parallel, making full use of the performance of multi-core processors, and further improving the resource utilization efficiency and processing power of the system. These optimization measures ensure that users can obtain a seamless and fast loading experience during use, greatly improving the practicality of the system and user satisfaction.
[0042] The loading module of the present invention integrates deep learning algorithms such as generative adversarial networks (GAN) and convolutional neural networks (CNN) for dynamically generating and optimizing material textures, significantly improving the realism and visual quality of the three-dimensional model. The combination of multi-format support and adaptive scaling algorithm enables the system to flexibly respond to three-dimensional models of different formats and scales, ensuring the best display effect of the model in various application scenarios. Through real-time feedback mechanisms, including tactile feedback units and eye tracking technology, the user's interactive immersion and naturalness are enhanced, providing a more intuitive and user-friendly experience. In addition, the personalized recommendation system dynamically adjusts the recommended content according to user behavior data, further improving user satisfaction and stickiness, and enhancing the interactivity and attractiveness of the system.
[0043] 3. The synchronization module of the present invention uses recurrent neural network (RNN) and attention mechanism to optimize eye tracking technology, ensuring high-precision, low-latency synchronization of three-dimensional model position, scaling, orientation and collision information in a multi-client environment, ensuring the consistency and real-time performance of all client users. Combined with reinforcement learning to optimize the synchronization strategy, the synchronization efficiency and system consistency are further improved. The security and privacy protection module uses generative adversarial networks (GAN) and anomaly detection algorithms to monitor system behavior in real time, promptly detect and protect potential security threats, and ensure the security and privacy of user data is not leaked. Advanced encryption technology and access control measures are used to prevent unauthorized access and data leakage, thereby enhancing the security and reliability of the system. These security protection measures not only protect the rights and interests of users, but also enhance the competitiveness of the system in the market and the trust of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a system module diagram of the present invention;
[0045] Figure 2 is a system flow chart of the present invention;
[0046] Figure 3 It is the UV mapping flow chart of the present invention;
[0047] Figure 4 A flow chart for constructing a programmatic grid of the present invention;
[0048] Figure 5 The present invention is a flowchart of the construction scenario. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Specific embodiment 1
[0051] like Figure 1-5 As shown, a method for loading a 3D model at runtime based on UE5, the system module structure of the method for loading a 3D model is as follows Figure 1 As shown in the figure, the operation process of each module of the system is as follows Figure 2 As shown, the module structure and operation process of the system are as follows:
[0052] The asset management module is used to upload, review, and download 3D model files. It also decides whether to download the files based on whether they already exist. It also decides whether to add the download address to the blacklist based on the results returned by the background. The download task is executed as an asynchronous task to reduce the jamming of the main thread and rendering thread. The asset management module is responsible for uploading, reviewing, downloading, and managing 3D model files. Its main functions include determining whether the file already exists, adding the download address to the blacklist, and asynchronously processing the download task to reduce the jamming of the main thread and rendering thread.
[0053] File upload and review:
[0054] Upload process: The user uploads the 3D model file to the backend management system through the client. The upload process includes file format verification and content preprocessing.
[0055] Format verification: Use predefined file format standards (including FBX, OBJ, GLTF, etc.) for format verification. Preliminary verification can be performed by parsing file header information and file extensions, and further detailed parsing using libraries including Assimp to ensure that the file content meets the specifications.
[0056] Audit mechanism: The audit includes two parts: automated inspection and manual inspection. Automated inspection uses a rule engine to detect the geometric integrity, texture mapping, etc. of the model, while manual inspection is performed by professionals to evaluate the quality and applicability of the model.
[0057] File existence judgment:
[0058] Hash calculation: To efficiently determine whether a file already exists, the system calculates a unique hash value (including SHA-256) for each uploaded model file. The hash value stored in the database is used for quick duplication detection.
[0059] Database query: When a user requests to download a model, the system first queries the database through the hash value to determine whether the model already exists. If so, the download step is skipped and the existing model is directly referenced.
[0060] Blacklist management:
[0061] Structural analysis: The model structure information returned by the backend is used to determine whether the model meets safety and quality standards. If not, the corresponding download address will be added to the blacklist.
[0062] Blacklist mechanism: The blacklist is stored in the cache (including Redis) and checked in real time during download requests to prevent the download of illegal or harmful models.
[0063] Asynchronous download task:
[0064] Task scheduling: Use asynchronous task queues (including Celery and RabbitMQ) to process download tasks to ensure smooth operation of the main thread and rendering thread.
[0065] Thread management: Use multithreading or coroutine technology (including C++'s std::async or Python's asyncio) to implement parallel processing of download tasks to avoid blocking the main thread.
[0066] The loading module is used to place the downloaded 3D model into the scene and configure its scale, position, and orientation. This module includes steps such as scene construction, procedural mesh construction, and data acquisition.
[0067] Build Scene: Decide whether to wait for other resources to load to complete, based on the current state of the Asset Manager, to avoid resource conflicts.
[0068] Scene data initialization: Mesh initialization: parse the mesh data of the model, including vertex, edge, face and other information. Camera settings: configure the camera parameters in the scene, including viewing angle, focal length, etc. Material management: traverse all materials in the model, obtain soft references to material samples, and convert them into material interfaces.
[0069] Unit scaling factor processing: According to the design scale of the model, adjust the unit scaling factor to ensure that the model is of appropriate size in the scene.
[0070] Root node transformation matrix adjustment: Ensure the correct position and orientation of the model in the scene by adjusting the translation, rotation, and scale matrices of the root node.
[0071] Dynamic material instance generation uses a deep learning algorithm:
[0072] Generative Adversarial Network (GAN): Used to generate highly realistic material textures. The generator network generates new material samples, and the discriminator network determines whether the generated material is realistic, thereby improving the quality of the material.
[0073] Convolutional Neural Network (CNN): used for texture feature extraction and processing to enhance the details and realism of materials.
[0074] Map parameter update: According to the map type in the model material (including normal map, metalness map, roughness map, self-illumination map, transparency map, etc.), update the corresponding parameter information in the dynamic material instance.
[0075] Procedural Mesh Construction:
[0076] Node data processing: Get node data from the asset manager, extract mesh data, and assign the root node's transformation (position, orientation, scale) to the 3D model based on the material index.
[0077] Vertex and face data assignment: Process the vertices, triangles, normals, UV coordinates, tangents and other data in the mesh, and assign them to the 3D model in the asset manager.
[0078] Asset Table Update: Added dynamic material instances and model data to the Asset Manager's Asset Table to ensure efficient subsequent access.
[0079] UE data acquisition:
[0080] Status Change: Updates the status of the Asset Manager to "Complete", indicating that the model has been successfully loaded into the scene.
[0081] Message broadcast: Broadcast the relevant model data to the subscribed programs (including UE5 engine) that it has been built, triggering the subsequent rendering and interaction processes.
[0082] Loading a module involves the following steps:
[0083] Build the scene: decide whether to wait based on the status of the asset manager; initialize the scene data in the 3D model, including meshes, cameras, materials, node trees, process unit scaling factors, and adjust the transformation matrix of the root node; traverse all materials in the scene, obtain soft references to material samples, convert them into material interfaces, and create dynamic material instances of the asset manager based on the interfaces; update the map parameter information in the dynamic material instance based on the map type in the model material, including normal, metalness, roughness, self-illumination, transparency, etc.;
[0084] Procedural mesh construction: Process the node data obtained after building the scene, obtain the node mesh data from the node data, assign the root node's transformation (position, orientation, scale) to the 3D model in the asset manager according to the material index; process the vertex, triangle, normal, UV, tangent and other data in the mesh and assign them to the 3D model in the asset manager; store the dynamic material instances obtained in the building scene, and add the model data to the asset table in the asset manager;
[0085] Unreal Engine obtains data: changes the status of the asset manager to completed, and broadcasts to the subscribed program (ie UE) that the relevant model data has been built;
[0086] The synchronization module is used to synchronize the position, scale, orientation and collision information of the 3D model between multiple clients; the synchronization module is responsible for synchronizing the position, scale, orientation and collision information of the 3D model between multiple clients to ensure that the model status seen by all clients is consistent.
[0087] Model upload and storage:
[0088] Upload process: The user uploads the 3D model data to the back-end database, and the system stores the corresponding model information in a dedicated server.
[0089] Trigger box setting: Set a trigger box outside the 3D model. When the user collides with the trigger box, the download and loading logic is triggered.
[0090] Download and loading process:
[0091] Trigger download: After the user collides with the trigger box, the system executes the download logic, downloads the model to the client, and loads it into the scene through the loading module.
[0092] Loading configuration: The model's scale, position, and orientation are configured by loading the module to ensure that the model is displayed correctly in the client scene.
[0093] Attribute replication and synchronization rules:
[0094] Transform property replication: Add a Replicated tag to the Transform property of the loaded 3D model to facilitate synchronization across the network.
[0095] Synchronization rule settings: Examples include synchronizing only within the user's observation range to reduce network bandwidth and improve synchronization efficiency.
[0096] Network mapping and packet sending:
[0097] Network mapping table: UE5 stores the transformation attributes and their synchronization rules in the internal network mapping table to manage the synchronization status of each client.
[0098] Status check and data packaging:
[0099] The server checks for changes to transform properties every network update interval (100 milliseconds by default).
[0100] If the attribute changes, it is marked as "changed" and the transformation data is packaged into a network packet.
[0101] Sends data packets via UDP protocol to clients connected to the dedicated server and meeting the observation range conditions.
[0102] Client data reception and update:
[0103] Data reception: The client receives the UDP data packet sent by the dedicated server and parses the transformation attribute information therein.
[0104] Model update: Update the location information of the local 3D model based on the received transformation data to synchronize attributes such as position, scale, and orientation.
[0105] The synchronization module consists of the following parts:
[0106] After the user uploads the model data to the backend database, the corresponding model information is stored in a dedicated server;
[0107] A trigger box is set outside the 3D model. When the user collides with the trigger box, the download logic is executed to download the model to the client and then loaded into the scene through the loading module.
[0108] By adding a replicated tag to the Transform property of the loaded 3D model and setting synchronization rules, including synchronization only within the user's viewing range, the UE stores this information in the internal network mapping table;
[0109] The server checks whether the transformation attribute has changed at each network update interval (default 100 milliseconds). If it has changed, it marks the attribute as "changed" and packages the attribute data, and sends it to the client connected to the dedicated server and meeting the set observation range through the UDP protocol;
[0110] After receiving the data sent by the dedicated server, the client updates the position information of the 3D model to achieve position synchronization.
[0111] The asset management module further includes a step of determining whether the format of the uploaded 3D model file meets a predetermined standard, and the model file that meets the standard is subsequently reviewed and downloaded.
[0112] In the scene building step, dynamic material instances are generated based on deep learning algorithms to enhance the realism and dynamic adjustment capabilities of materials.
[0113] The synchronization module optimizes eye tracking through recurrent neural networks and attention mechanisms to improve synchronization accuracy and user interaction experience.
[0114] The loading module supports a variety of 3D model formats and automatically adjusts the unit scaling factor of the model through an adaptive algorithm to adapt to different application scenarios.
[0115] Multi-format support:
[0116] Format parser: Implement parsers for multiple 3D model formats (including FBX, OBJ, GLTF, DAE, etc.) to ensure that models in different formats can be loaded and rendered correctly.
[0117] Unified interface: Design a unified loading interface to convert model data in different formats into an internal common data structure to simplify subsequent processing.
[0118] Adaptive scaling algorithm:
[0119] Size calculation: Calculate the bounding box size (BoundingBox) and actual size of the model, and automatically adjust the scaling factor according to the application scenario requirements.
[0120] Deep Learning Optimization:
[0121] Regression model: Train a regression model to predict the appropriate scaling factor based on model features (including volume, surface area) and application scenario parameters (including display device resolution, user viewing angle).
[0122] Adaptive adjustment: Dynamically adjust the model’s scaling factor based on the output of the regression model to ensure the model’s best visual effects and interactive performance in different scenarios.
[0123] The method for loading a three-dimensional model further includes a security and privacy protection step, which uses a generative adversarial network and anomaly detection algorithm to monitor system behavior in real time, detect and protect against potential security threats, and ensure the privacy protection of user data. The security and privacy protection module uses a generative adversarial network (GAN) and anomaly detection algorithm to monitor system behavior in real time, detect and protect against potential security threats, and ensure the privacy protection of user data. Real-time monitoring and anomaly detection:
[0124] Anomaly Detection Algorithms:
[0125] Autoencoder: It is used to learn the characteristics of normal system behavior and detect abnormal behavior by reconstructing errors.
[0126] Isolation Forest: A tree-based unsupervised learning algorithm for identifying outliers in high-dimensional data.
[0127] Behavior monitoring: Continuously monitor various system indicators (including network traffic, file access records, user operation logs, etc.) and input them into the anomaly detection model to identify potential security threats in real time.
[0128] Generative Adversarial Network (GAN) Applications:
[0129] Data enhancement and protection: GAN is used to generate synthetic data to enhance the training data set of the anomaly detection model and improve the accuracy and robustness of detection.
[0130] Adversarial attack protection: Through adversarial training, the system can resist adversarial sample attacks carried out by malicious attackers using deep learning models.
[0131] Privacy protection measures:
[0132] Data encryption: Model files and related data uploaded and downloaded by users are encrypted, stored and transmitted using advanced encryption algorithms such as AES-256.
[0133] Access control: Role-based access control (RBAC) ensures that only authorized users can access and manipulate specific model data.
[0134] Data anonymization: Anonymize sensitive data to prevent leakage of user identity information.
[0135] Asset management module: Users can upload 3D models to the management backend. After the backend review is passed, users can download the models in the client. Decide whether to download based on whether the same file already exists; decide whether to add the download address to the blacklist management based on the backend return result. Download tasks as asynchronous tasks will not affect the execution of the main thread and rendering thread, reducing jams.
[0136] Loading module: After the download in the asset management module is completed, the user can use the loading module to place the model into the scene and configure the scale, position, and orientation. The main steps of loading the module are:
[0137] Including the following Figure 3 , build the scene: decide whether to wait according to the status of the asset manager; initialize the scene data in the 3D model, including meshes, cameras, materials, node trees, process unit scaling factors, adjust the transformation matrix of the root node, etc. Traverse all materials in the scene, obtain soft references to material samples, convert them into material interfaces, and create dynamic material instances of the asset manager based on this interface; update the parameter information of the map to the dynamic material instance according to the map type in the model material, including normal, metalness, roughness, self-illumination, transparency, etc.
[0138] Including the following Figure 4 , 5 ,Procedural mesh construction: process the node data obtained after building the scene, obtain the node mesh data from the node data, obtain the material index from the mesh data, assign the root node's transformation (position, orientation, scale) to the 3D model in the asset manager; process the vertices, triangles, normals, UVs, tangents and other data in the mesh and assign them to the 3D model in the asset manager; store the dynamic material instances obtained in the building scene, and add the model data to the asset table in the asset manager.
[0139] Unreal Engine obtains data: changes the status of the asset manager to completed, and broadcasts to the program that has subscribed to the message, that is, UE, that the relevant model data has been built.
[0140] Synchronization module: After the user uploads the model data to the backend database, the corresponding model information will be stored in the UE's dedicated server. There is a trigger box outside the 3D model. When the user collides with this trigger box, the download logic will be executed to download the model to the client and load it into the scene through the above loading module. At the same time, the model's position, scale, orientation, collision and other information can be synchronized to other clients through the dedicated server. The specific implementation includes the following:
[0141] By adding a replicated mark to the Transform property of the loaded 3D model and setting synchronization rules, including synchronization only within the user's observation range, the UE will store this information in the internal network mapping table. The server will check whether the transformation property has changed at each network update interval (default 100 milliseconds). If it has changed, it will mark the property as "changed" and package the property data, and send it to the client connected to this dedicated server and meeting the set observation range via the UDP protocol. After the client receives the data sent by the dedicated server, it updates the position information of the 3D model to achieve position synchronization.
[0142] Through deep learning algorithms and optimization technology, collaborative work is achieved to improve the overall system performance and user experience.
[0143] Multithreading and parallel processing:
[0144] Task parallelization: Use multi-threading or multi-process technology to parallelize downloading, loading, and synchronization tasks, fully utilize the performance of multi-core processors, and improve system response speed.
[0145] Resource Scheduling: Design intelligent resource scheduling algorithms to dynamically allocate computing resources based on task priority and system load to ensure efficient execution of critical tasks.
[0146] Deep Learning Model Optimization:
[0147] Model compression: Use model pruning, quantization and other technologies to compress the size of deep learning models, reduce computing overhead, and improve real-time processing capabilities.
[0148] Accelerate reasoning: Use hardware acceleration (including GPU, TPU) and optimization frameworks (including TensorRT, ONNXRuntime) to improve the reasoning speed of deep learning models.
[0149] Improved user experience:
[0150] Real-time feedback: Provide real-time user feedback through tactile feedback units and eye tracking to enhance the immersion and naturalness of interaction.
[0151] Personalized recommendations: Combined with user behavior data, the recommendation system module dynamically adjusts the recommended content to improve user satisfaction and stickiness.
[0152] The steps of loading a 3D model method include:
[0153] s1. Upload the 3D model file and perform format verification. Models that meet the standards will enter the review and download process. If the file already exists in the local cache, the download step will be skipped and the uploaded model will be reviewed to ensure the integrity and correctness of the file. If the file does not meet the standards, an error message will be returned.
[0154] s2. Asynchronously execute the model download task, and store it in the local cache after the download is completed. At the same time, dynamically manage the download address according to the feedback information from the background. After the model is downloaded, start the scene construction process and initialize the model's mesh data, material, camera, and node tree.
[0155] s3. According to the preset unit scaling factor, adjust the root node transformation matrix of the model, initialize the dynamic material instance related to the model, process the mapping parameters of the dynamic material instance, and update the normal, roughness, and metalness properties to enhance the realism of the material;
[0156] s4. Create a procedural mesh and bind the node data with the material information to complete the construction of the 3D model. Transmit the loaded 3D model information through the synchronization module to ensure synchronization of position, scale, and orientation transformation properties in a multi-client environment. Set a copy mark for the transformation properties and record the synchronization status of each client through the network mapping table.
[0157] s5. Transmit attribute data through UDP protocol. In each network update cycle, detect whether the transformation attribute has changed. If it has changed, package the update data and send it to all clients that meet the observation range. During the upload and download process, use generative adversarial networks and anomaly detection algorithms to monitor system behavior in real time, detect potential security threats, and ensure the security of system and user data.
[0158] s6. Encrypt sensitive data for transmission to ensure privacy protection of user data and 3D models during transmission, and blacklist unsafe model file addresses to ensure that the system does not load model data from untrusted sources;
[0159] s7. Optimize dynamic materials through deep learning algorithms to improve the real-time performance and dynamic adjustment capabilities of materials to adapt to different lighting and interactive environments. Combine recursive neural networks and attention mechanisms to optimize eye tracking and improve synchronization accuracy, especially in multi-person online interactive scenarios, to ensure the response speed and accuracy of user perspective and interaction. The download and loading process of the 3D model is completed, triggering the rendering process of the model so that it is displayed correctly in the scene and begins to receive user interaction operations.
[0160] It should be noted that, in this article, relational terms such as including first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "including a reference structure" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0161] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for loading a 3D model at runtime based on UE5, characterized in that: The system of the three-dimensional model loading method comprises: The asset management module is used to upload, review and download 3D model files; the loading module is used to place the downloaded 3D model into the scene and configure the scale, position and orientation; the synchronization module is used to synchronize the position, scale, orientation and collision information of the 3D model between multiple clients; the operation steps of the asset management module further include: determining whether the format of the uploaded 3D model file meets the predetermined standard, and the model file that meets the standard is subsequently reviewed and downloaded; The operation steps of the synchronization module include: After the user uploads the model data to the backend database, the corresponding model information is stored in a dedicated server; A trigger box is set outside the 3D model. When the user collides with the trigger box, the download logic is executed to download the model to the client and then loaded into the scene through the loading module. By adding replication flags to the transformation properties of the loaded 3D model and setting synchronization rules, including synchronizing only within the user's viewing range, the Unreal Engine stores this information in an internal network mapping table; The dedicated server checks whether the transformation attribute has changed at each network update interval. If it has changed, it marks the attribute as "changed" and packages the attribute data, and sends it to the client connected to the dedicated server and meeting the set observation range through the UDP protocol; After receiving the data sent by the dedicated server, the client updates the location information of the 3D model to achieve location synchronization; The method for loading a three-dimensional model comprises the following steps: s1. Upload the 3D model file and perform format verification. Models that meet the standards will enter the review and download process. If the file already exists in the local cache, the download step will be skipped and the uploaded model will be reviewed to ensure the integrity and correctness of the file. If the file does not meet the standards, an error message will be returned. s2. Asynchronously execute the model download task, and store it in the local cache after the download is completed. At the same time, dynamically manage the download address according to the feedback information from the background. After the model is downloaded, start the scene construction process and initialize the model's mesh data, material, camera, and node tree. s3. According to the preset unit scaling factor, adjust the root node transformation matrix of the model, initialize the dynamic material instance related to the model, process the mapping parameters of the dynamic material instance, and update the normal, roughness, and metalness properties to enhance the realism of the material; s4. Create a procedural mesh and bind the node data with the material information to complete the construction of the 3D model. Transmit the loaded 3D model information through the synchronization module to ensure synchronization of position, scale, and orientation transformation properties in a multi-client environment. Set a copy mark for the transformation properties and record the synchronization status of each client through the network mapping table. s5. Transmit attribute data through UDP protocol. In each network update cycle, detect whether the transformation attribute has changed. If it has changed, package the update data and send it to all clients that meet the observation range. During the upload and download process, use generative adversarial networks and anomaly detection algorithms to monitor system behavior in real time, detect potential security threats, and ensure the security of system and user data. s6. Encrypt sensitive data for transmission to ensure privacy protection of user data and 3D models during transmission, and blacklist unsafe model file addresses to ensure that the system does not load model data from untrusted sources; s7. Optimize dynamic materials through deep learning algorithms, improve the real-time performance and dynamic adjustment capabilities of materials to adapt to different lighting and interactive environments, combine recursive neural networks and attention mechanisms to optimize eye tracking, improve synchronization accuracy, and ensure the response speed and accuracy of user perspective and interaction in multi-person online interactive scenarios. The download and loading process of the 3D model is completed, triggering the rendering process of the model so that it is displayed correctly in the scene and begins to receive user interaction operations.
2. A method for loading a 3D model at runtime based on UE5 according to claim 1, characterized in that: The operation steps of the loading module include: Build the scene: decide whether to wait based on the status of the asset manager; initialize the scene data in the 3D model, including meshes, cameras, materials, node trees, process unit scaling factors, and adjust the transformation matrix of the root node; traverse all materials in the scene, obtain soft references to material samples, convert them into material interfaces, and create dynamic material instances of the asset manager based on the interfaces; update the map parameter information in the dynamic material instance based on the map type in the model material, including normal, metalness, roughness, self-illumination, and transparency; Perform procedural mesh construction: process the node data obtained after building the scene, obtain the node mesh data from the node data, assign the root node's transformation to the 3D model in the asset manager according to the material index; process the vertex, triangle, normal, UV, and tangent data in the mesh and assign them to the 3D model in the asset manager; store the dynamic material instances obtained in the building scene, and add the model data to the asset table in the asset manager; Run Unreal Engine to get data: Change the status of the asset manager to completed and broadcast the relevant model data has been built to the subscribed programs.
3. The method for loading a 3D model at runtime based on UE5 according to claim 2, characterized in that: In the scene building step, the dynamic material instance is generated based on a deep learning algorithm to enhance the realism and dynamic adjustment capability of the material.
4. The method for loading a 3D model at runtime based on UE5 according to claim 1, characterized in that: The synchronization module optimizes eye tracking through recursive neural networks and attention mechanisms to improve synchronization accuracy and user interaction experience.
5. The method for loading a 3D model at runtime based on UE5 according to claim 1, characterized in that: The loading module supports multiple three-dimensional model formats and automatically adjusts the unit scaling factor of the model through an adaptive algorithm to adapt to different application scenarios.
Citation Information
Patent Citations
Loading method and architecture based on unified storage of three-dimensional model data of multiple power stations
CN110535935A
Digital twinborn visualization method and platform based on unreal and GIS double engines
CN117216857A
Multi-user intelligent interaction system based on virtual reality and terminal equipment
CN118349118A