Ue5 unreal development-based city scene interaction model construction method and device
By dividing cities into grid areas in UE5 Unreal Engine and determining the modeling complexity index, optimizing resource allocation and thread processing, the problem of difficult-to-manage the complexity of the modeling process in UE5 is solved, and the modeling efficiency and consistency are improved. Adapt to the needs of building complex scenarios.
Patent Information
- Application Number
- CN202411276185.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-27
AI Technical Summary
In UE5 Unreal Engine, it is difficult to effectively manage and coordinate the modeling process in different regions, resulting in inefficient modeling and difficult to optimize complexity.
By dividing the target city into several grid areas and determining the modeling complexity index for each area, using topological algorithms to determine the model generation order, optimizing resource allocation and thread processing, and generating models in combination with Unreal Engine rendering and external model import techniques.
It improves modeling speed and consistency of effect, simplifies the development process, reduces waiting and conflicts, improves the processing capability of large and complex scenarios, and adapts to scenario construction of different scales and details.
Smart Images

Figure CN119203328A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Unreal Engine modeling, and in particular to a method and device for constructing a city scene interactive model based on UE5 Unreal development. Background Art
[0002] An urban scene refers to a virtual urban environment or scene. This can include elements such as the city's buildings, streets, and public facilities. Building an urban scene usually requires detailed planning and implementation of the city's layout, location and design of buildings, etc. An interaction model refers to a model created in a virtual environment for user interaction, including how users interact with various elements in the virtual urban environment (such as buildings, transportation facilities, public services, etc.). The interaction model involves how users interact with objects in the scene, how user operations are fed back, and how dynamic scene changes are achieved.
[0003] In the existing technology, data and maps of real cities are collected by using technologies such as geographic information systems (GIS), laser scanning, and drones, and then 3D modeling software is used to create virtual environment models such as buildings and streets. Traditional modeling tools usually focus on modeling and texture design, but may not be as efficient as UE5 in terms of integrated environment design, interactive functions, and optimization. Therefore, more and more modeling work has begun to be transferred to the UE5 platform. Traditional modeling tools are more independent in the modeling process of different areas, and can be modeled by simple partitions. However, in UE5, the rich functions and tools it provides may make the development process more complicated, especially when a high degree of customization and tuning is required. Compared with the traditional single modeling process, the multi-functional integration of UE5 requires more computing resources, and a higher level of modeling coordination capabilities is required to ensure the smooth modeling process and achieve the final modeling effect. Therefore, how to coordinate and manage the modeling process of different areas in UE5 modeling is an urgent problem to be solved. Summary of the invention
[0004] The present invention provides a method and device for constructing an interactive model of a city scene based on UE5 Unreal Development, so as to solve the defect that it is difficult to realize regional modeling management in UE5 in the prior art, and achieve the effect of completing the modeling process with high efficiency and high quality.
[0005] The present invention provides a method for constructing a city scene interactive model based on UE5 Unreal development, comprising:
[0006] Create the basic terrain and roads of the target city in Unreal Engine;
[0007] Based on the basic terrain and roads of the target city, the target city is divided into a number of grid areas, and a modeling complexity index of each grid area is determined; the modeling complexity index is used to represent the complexity of the model constructed in each grid area;
[0008] Based on the modeling complexity index of each grid area, determine the model generation order of each grid area;
[0009] Based on the model generation order of each grid area, a model of each grid area is generated.
[0010] According to a method for constructing an interactive model of a city scene based on UE5 Unreal development provided by the present invention, the modeling complexity index is determined based on the maximum level of detail, the maximum level of interactivity and the model generation method of the established model;
[0011] The level of detail is used to indicate the degree of detail that an object needs to dynamically adjust according to its distance or importance in the view;
[0012] The interactivity level is used to represent the complexity of the object's own interaction and the complexity of its interaction with objects in adjacent grid areas;
[0013] The model generation method includes Unreal Engine rendering and external model import.
[0014] According to a method for constructing an urban scene interaction model based on UE5 Unreal development provided by the present invention, the modeling complexity index CMI is determined by the following formula:
[0015]
[0016] Among them, D max is the maximum value of the level of detail, D view is the distance of the object in the view, D detail is the level of detail of the object; self is the interaction complexity of the object itself, I adj is the interaction complexity with adjacent grid regions; I inter is an exponential factor of the interaction complexity; G UE and G ext They are the generation complexity of Unreal Engine rendering and external model import; β UE and β ext They are the weight coefficients of Unreal Engine and external import respectively. α is the weight factor, which is used to adjust the contribution of interaction complexity in the final modeling complexity index; γ is the normalization factor, which is used to adjust all contribution levels to the same magnitude or range.
[0017] According to a method for constructing an interactive model of a city scene based on UE5 Unreal development provided by the present invention, the model generation order of each grid area is determined based on the modeling complexity index of each grid area, including:
[0018] Based on the complexity index of each grid area and the dependency relationship between the grid areas, a topological algorithm is used to determine the initial generation order of the models of each grid area;
[0019] Allocate corresponding threads for model generation in each grid area based on the complexity index of each grid area;
[0020] Based on the processing logic of different threads, the initial generation order is adjusted to obtain the model generation order of each grid area.
[0021] According to a method for constructing an interactive model of a city scene based on UE5 Unreal development provided by the present invention, when the model generation mode is an external model import, the model generation order of each grid area is based on the model generation order of each grid area, and the model of each grid area is generated, including:
[0022] Before importing, the model to be imported in each mesh area is parsed, and the framework structure of the detail level corresponding to the model is extracted according to the detail level of the model;
[0023] Import the framework structure of the detail level corresponding to the model into the virtual engine from outside;
[0024] Based on the imported framework structure, the model of each grid area is generated using virtual engine rendering.
[0025] According to a method for constructing an urban scene interactive model based on UE5 Unreal development provided by the present invention, when the detail level of the established model is high, generating the model of each grid area includes: generating models of multiple detail levels for each grid area; the models of multiple detail levels include models with high detail levels and models with low detail levels.
[0026] According to a method for constructing a city scene interactive model based on UE5 Unreal development provided by the present invention, the target city is divided into a plurality of grid areas based on the basic terrain and roads of the target city, including:
[0027] Extracting the height characteristics of the terrain based on the basic terrain of the target city, and using a clustering algorithm to divide the urban area into a number of groups of terrain areas according to the height characteristics of the terrain;
[0028] The structure of the road network is analyzed, and the segmentation boundaries are adjusted for several groups of terrain areas using roads as dividing lines, thus dividing the target city into several grid areas.
[0029] The present invention also provides a city scene interactive model construction device based on UE5 Unreal development, including:
[0030] Basic creation module, used to create the basic terrain and roads of the target city in Unreal Engine;
[0031] The first processing module is used to divide the target city into a plurality of grid areas based on the basic terrain and roads of the target city, and determine the modeling complexity index of each grid area; the modeling complexity index is used to represent the complexity of the model constructed in each grid area;
[0032] A second processing module is used to determine the model generation order of each grid area based on the modeling complexity index of each grid area;
[0033] The third processing module is used to generate a model of each grid area based on the model generation order of each grid area.
[0034] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for constructing an interactive model of a city scene based on UE5 Unreal development as described above is implemented.
[0035] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for constructing an urban scene interactive model based on UE5 Unreal development as described in any of the above is implemented.
[0036] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for constructing a city scene interactive model based on UE5 Unreal development.
[0037] The method and device for constructing an interactive model of an urban scene based on UE5 Unreal development provided by the present invention divide the target city into a number of grid areas and determine the modeling complexity index of each grid area. It can give priority to processing areas with higher complexity according to the demand for computing resources, optimize resource allocation, coordinate and manage the modeling process of different areas, reduce waiting and conflicts, improve the overall modeling speed and consistency of effects, make the modeling process more organized, improve the processing ability of large and complex scenes, and be more suitable for scene construction with different scales and detail requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present invention or 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 This is one of the flow charts of the method for constructing a city scene interactive model based on UE5 Unreal development provided by the present invention;
[0040] Figure 2 This is the second flow chart of the method for constructing a city scene interactive model based on UE5 Unreal development provided by the present invention;
[0041] Figure 3 It is a structural schematic diagram of a city scene interactive model construction device based on UE5 Unreal development provided by the present invention;
[0042] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.
[0044] Combine the following Figure 1-Figure 4 The present invention describes a method and device for constructing an interactive model of a city scene based on UE5 Unreal development.
[0045] like Figure 1 As shown, the method for constructing a city scene interaction model based on UE5 Unreal development according to an embodiment of the present invention mainly includes step 110, step 120, step 130 and step 140.
[0046] Step 110, creating the basic terrain and roads of the target city in the Unreal Engine.
[0047] Data and maps of real cities can be collected using tools such as geographic information systems (GIS), or they can be used directly.
[0048] On this basis, open the Unreal Engine and create a new project or open an existing project. You can select the "Landscape" tool in the main menu, click the "Create Terrain" button, set the size and resolution of the terrain, and then click "Create". Use the "Sculpt Tool" to adjust the height of the terrain and create terrain features such as hills and valleys. You can use the "Smooth Tool" to make the terrain more natural. In the "Terrain" tool, select the "Road Tool" or use the "Custom Mesh" to create a road. You can download ready-made road assets on the market, or use the modeling tool to make and import a custom road model.
[0049] If using the Road Tool, select an appropriate path type and width, draw the road path, and adjust the shape and texture of the road to ensure that the road meets the terrain naturally, and use the Terrain Sculpting Tools to adjust the terrain to accommodate the road.
[0050] Step 120 , based on the basic terrain and roads of the target city, the target city is divided into a plurality of grid areas, and a modeling complexity index of each grid area is determined.
[0051] The modeling complexity index is used to represent the complexity of the model constructed in each grid area.
[0052] Divide the target city into grid areas and determine the modeling complexity index for each area. This means dividing the city into multiple small areas and then evaluating the complexity of the buildings and details in each area. The modeling complexity index is used to quantify the level of detail and model complexity of each area, usually including factors such as the number of buildings, shape complexity, and richness of details. The modeling complexity index can help developers prioritize areas with higher complexity when optimizing and managing resources.
[0053] In some embodiments, the modeling complexity index is determined based on the maximum level of detail, the maximum level of interactivity, and the model generation method of the created model.
[0054] The level of detail is used to represent the level of detail that an object needs to dynamically adjust based on its distance or importance in the view.
[0055] The level of detail can dynamically adjust the level of detail of the model according to the distance of the model in the view. For example, when the user's perspective is closer to the building, the building will show more details; when the user's perspective is farther away from the building, the building's details will be reduced.
[0056] For example, in the city center, since there are many important buildings such as skyscrapers, landmarks, etc., these buildings will be set with a high level of detail to display fine textures and architectural details as the user approaches. In the outer areas of the city, the buildings have fewer details and can only show basic outlines and colors.
[0057] The interactivity level is used to represent the complexity of the object's own interaction and the complexity of its interaction with objects in adjacent grid areas.
[0058] The level of interactivity is the complexity of the interaction between the model itself and with models in adjacent grid areas. For example, some buildings may have complex interactive features such as opening and closing doors, windows, interacting with the environment, etc., while other buildings do not need these features.
[0059] For example, in a commercial area, there may be a large number of interactive models, such as store doors that can be opened, dynamic advertising screens, etc. The interactivity level of this area is high because these interactive features require complex models and logic to implement. In a residential area, these features are less and the interactivity level is lower.
[0060] Model generation methods include Unreal Engine rendering and external model import. Model generation methods refer to the use of different tools or methods to generate models. For example, using the tools provided by Unreal Engine for modeling, or importing models from external modeling software.
[0061] For example, in some areas, you can use the Unreal Engine's built-in architectural modeling tools to quickly create some simple buildings, and these models are usually generated in a standardized way with low complexity. In other areas, you can import highly customized architectural models from outside as needed, which saves the difficulty of re-modeling in the Unreal Engine, reduces the complexity of building higher models, and improves modeling efficiency.
[0062] Suppose there is a "future city" with grid area A (city center) and grid area B (suburbs). Grid area A (city center) has a high level of detail, rich building details, including tall buildings, fine decorations, high interactivity, and many dynamic elements in the buildings, such as interactive billboards, open and close doors, etc. The model generation method can partially use the Unreal Engine's own tools to quickly generate basic models, and partially use external imported highly detailed custom models.
[0063] Grid area B (suburbs) has a low level of detail, and the buildings are mainly simple residential buildings with few details and low interactivity, and the buildings do not have complex interactive functions. The model generation method can mainly use the tools provided by Unreal Engine to generate basic models to simplify the process, or directly import existing residential models from outside.
[0064] In some embodiments, the modeling complexity index CMI is determined by the following formula:
[0065]
[0066] Among them, D max is the maximum value of the level of detail, D view is the distance of the object in the view, D detail is the level of detail of the object; self is the interaction complexity of the object itself, I adj is the interaction complexity with adjacent grid regions; I inter is an exponential factor of the interaction complexity; G UE and G ext They are the generation complexity of Unreal Engine rendering and external model import; β UE and β ext They are the weight coefficients of Unreal Engine and external import respectively. α is the weight factor, which is used to adjust the contribution of interaction complexity in the final modeling complexity index; γ is the normalization factor, which is used to adjust all contribution levels to the same magnitude or range.
[0067] In this implementation, by quantifying the complexity of the model, the details of the model can be dynamically adjusted according to the viewing distance and interaction requirements, reducing unnecessary computing burden, improving rendering performance, and rationally allocating development and computing resources to ensure that high-complexity areas (such as important buildings) are adequately processed and that low-complexity areas do not waste too many resources.
[0068] In addition, it can simplify the development process and provide clear complexity standards, allowing the development team to handle modeling tasks in different areas in an orderly manner, reducing duplication of work and adjustment time.
[0069] Step 130 : determining the model generation order of each grid area based on the modeling complexity index of each grid area.
[0070] It is understood that the modeling complexity index (CMI) can be calculated for each mesh area, including the level of detail, interactivity level, and model generation method. The mesh areas are sorted from high to low complexity according to the CMI. The areas with high complexity are processed first because they require more resources and detailed work. Development resources and time are allocated to the areas with high complexity first to ensure that these mesh areas achieve the best effect in the overall model. Finally, the model is generated step by step according to the sorting, starting with the high complexity areas and gradually completing the modeling of all areas.
[0071] In some embodiments, Figure 2As shown, based on the modeling complexity index of each grid area, the model generation order of each grid area is determined, including step 210, step 220 and step 230.
[0072] Step 210, based on the complexity index of each grid area and the dependency relationship between the grid areas, a topological algorithm is used to determine the initial generation order of the models of each grid area;
[0073] Step 220, allocating corresponding threads for model generation of each grid area based on the complexity index of each grid area;
[0074] Step 230, based on the processing logic of different threads, the initial generation order is adjusted to obtain the model generation order of each grid area.
[0075] The topological algorithm is used to determine the initial generation order. According to the complexity index of the grid area and the dependency between areas, for example, the generation of some areas depends on other areas. A topological sorting algorithm is used to determine an initial generation order.
[0076] Specifically, a directed graph can be built, where each node represents a grid area and the edges represent dependencies. A topological sorting algorithm, such as Kahn's algorithm or depth-first search, is used to generate an ordered list that ensures that all dependencies are satisfied.
[0077] When allocating threads, the model generation task is assigned to multiple threads based on the complexity index of each region. Regions with high complexity may require more computing resources, so more threads are allocated or priority is given to them.
[0078] You can use a task scheduler or thread pool to distribute the generated tasks to threads, ensuring that the workload of the threads matches the regional complexity. For example, you can use a multithreaded programming framework, such as Java's ExecutorService or Python's concurrent.futures, to manage thread allocation.
[0079] The processing logic of different threads may include thread task allocation mechanism, load dynamic mechanism, error handling and retry mechanism, etc.
[0080] When adjusting the generation order, based on the actual processing situation of the threads, for example, some threads may be faster or slower than other threads, adjust the initial generation order to optimize the overall processing time and resource usage.
[0081] During this process, you can monitor the progress and performance of the threads, adjust the execution order of tasks or reallocate tasks to avoid bottlenecks, and use dynamic scheduling algorithms or adjust the initial topological sorting results to ensure that high-complexity areas are completed first when resources are sufficient.
[0082] The above method can effectively utilize system resources, speed up model generation, and ensure that dependencies in the generation process are properly handled.
[0083] Step 140: Generate a model of each grid area based on the model generation order of each grid area.
[0084] You can initialize the processing queue or thread pool according to the order of generation to ensure that the grid regions are processed in the correct order. Assign the grid regions to different threads or processing units to ensure that the complexity of each region matches the thread capacity. In each thread, generate the corresponding grid regions in order. Check the dependencies between grid regions during the generation process to ensure that the model generation of one region does not start until the models of all dependent regions are completed. Synchronize data between dependent regions to ensure the consistency and integrity of the generated model data.
[0085] After generation, the models of each grid area can be merged and finally optimized and verified to verify whether the generated model meets expectations, ensure quality and accuracy, ensure efficient generation of grid area models, and deal with the challenges brought by complexity and dependencies.
[0086] According to an embodiment of the present invention, a method for constructing an interactive model of an urban scene based on UE5 Unreal development is provided. By dividing the target city into several grid areas and determining the modeling complexity index of each grid area, it is possible to give priority to processing areas with higher complexity according to the demand for computing resources, optimize resource allocation, coordinate and manage the modeling process of different areas, reduce waiting and conflicts, improve the overall modeling speed and consistency of effects, make the modeling process more organized, improve the processing capability of large and complex scenes, and better adapt to the construction of scenes with different scales and detail requirements.
[0087] In some embodiments, when the model generation method is external model import, the model of each grid area is generated based on the model generation order of each grid area, including: before importing, parsing the model to be imported into each grid area, and extracting the framework structure of the detail level corresponding to the model according to the detail level level of the model; importing the framework structure of the detail level corresponding to the model from the outside into the virtual engine; based on the imported framework structure, using the virtual engine to render and generate the model of each grid area.
[0088] Before importing, external model files are parsed to extract data at different levels of detail. Levels of detail can include low, medium, and high resolution geometry and textures.
[0089] Extract the model's framework structure based on the level of detail, which includes mesh topology, material properties, texture mapping and other information. Convert the extracted level of detail framework structure into a format supported by Unreal Engine, such as FBX, OBJ, etc. Import the converted data into Unreal Engine. Unreal Engine needs to further process the data, such as generating necessary resources and configurations.
[0090] In Unreal Engine, each mesh area is rendered according to the imported frame structure. The engine will automatically select the appropriate level of detail to optimize performance based on the level of detail. Optimization techniques such as LOD switching and view distance culling are applied during the rendering process to improve rendering efficiency.
[0091] In this embodiment, the details of the model are allowed to be controlled at different levels to adapt to different viewing distances and performance requirements. By rendering only the necessary detail levels and areas, the rendering efficiency and real-time performance can be improved. In addition, multiple model formats and detail levels are supported, which improves the flexibility of model importing and use.
[0092] In some embodiments, when the detail level of the established model is high, a model of each grid area is generated, including: generating a model of multiple detail levels for each grid area; the model of multiple detail levels includes a model with a high detail level and a model with a low detail level.
[0093] Under different viewing distances and hardware conditions, the appropriate level of detail can be selected as needed to reduce unnecessary calculation and rendering burdens and improve performance. Therefore, models with different levels of detail need to be generated. When observing from a close distance, a model with a high level of detail is used to ensure a delicate visual effect. When observing from a distance, a model with a low level of detail is used to reduce resource consumption.
[0094] In this way, the model can provide the best visual experience on different devices and environments, balancing high-quality rendering and smooth user experience. By dynamically adjusting the level of detail, it helps to manage memory and resources more effectively and avoid excessive memory usage caused by high-detail models.
[0095] In some embodiments, based on the basic terrain and roads of the target city, the target city is divided into several grid areas, including: extracting the height characteristics of the terrain based on the basic terrain of the target city, and using a clustering algorithm to divide the urban area into several groups of terrain areas according to the height characteristics of the terrain; analyzing the structure of the road network, adjusting the segmentation boundaries for several groups of terrain areas with the roads as dividing lines, and dividing the target city into several grid areas.
[0096] First, it is necessary to extract the height information of the terrain from the basic terrain data of the target city. The height information usually comes from a digital elevation model (DEM) or similar data source. The terrain features such as terrain undulations, mountains, valleys, etc. are extracted from the height data. The height features help to understand the changes and undulations of the terrain.
[0097] When clustering algorithms are used to divide urban areas into several groups of terrain areas based on terrain height features, common clustering algorithms include K-means, DBSCAN, etc. Clustering algorithms divide cities into several areas based on the height features of the terrain, and each area has similar terrain features. For example, flat areas may be clustered into one group, while hilly or mountainous areas may be clustered into another group.
[0098] On this basis, the data of road network is used to analyze the distribution and structure of roads, including the layout of roads, the distribution of main roads and secondary roads, etc. The road network not only affects the traffic flow of the city, but also affects the function and division of the region. Therefore, it is necessary to consider the impact of the road network on the division of terrain regions.
[0099] Using roads as dividing lines Based on the preliminary demarcation of terrain areas, the areas are adjusted using roads as dividing lines. Roads are often used as natural dividing lines because they can significantly affect the functional division of a city and traffic flow.
[0100] In this embodiment, the boundaries of the terrain regions are adjusted by roads so that the divisions are more consistent with the actual urban structure. For example, major roads may separate certain terrain regions to reflect the actual urban layout and traffic patterns.
[0101] Finally, the adjusted areas can be integrated into final grid areas, which can better reflect the terrain characteristics and road network of the city.
[0102] Each of the several grid areas formed takes into account the height characteristics of the terrain and the distribution of roads, which can be used for subsequent analysis, modeling or other applications. This method can divide the city into more practical grid areas by combining the height characteristics of the terrain and the road network. The terrain characteristics provide the geographical background of the area, while the road network helps to adjust and optimize the regional division, so that the results are more in line with the actual urban structure and functional requirements.
[0103] The following is a description of the city scene interaction model construction device based on UE5 Unreal development provided by the present invention. The city scene interaction model construction device based on UE5 Unreal development described below and the city scene interaction model construction method based on UE5 Unreal development described above can be referenced to each other.
[0104] like Figure 3As shown, the urban scene interactive model construction device based on UE5 Unreal development in an embodiment of the present invention mainly includes a basic creation module 310, a first processing module 320, a second processing module 330 and a third processing module 340.
[0105] The basic creation module 310 is used to create the basic terrain and roads of the target city in the Unreal Engine;
[0106] The first processing module 320 is used to divide the target city into a plurality of grid areas based on the basic terrain and roads of the target city, and determine the modeling complexity index of each grid area; the modeling complexity index is used to represent the complexity of the model constructed in each grid area;
[0107] The second processing module 330 is used to determine the model generation order of each grid area based on the modeling complexity index of each grid area;
[0108] The third processing module 340 is used to generate a model of each grid area based on the model generation order of each grid area.
[0109] According to an embodiment of the present invention, a device for constructing an interactive model of a city scene based on UE5 Unreal development is provided. By dividing the target city into several grid areas and determining the modeling complexity index of each grid area, it is possible to give priority to processing areas with higher complexity according to the demand for computing resources, optimize resource allocation, coordinate and manage the modeling process of different areas, reduce waiting and conflicts, improve the overall modeling speed and consistency of effects, make the modeling process more organized, improve the processing capability of large and complex scenes, and better adapt to the construction of scenes with different scales and detail requirements.
[0110] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the city scene interactive model construction method based on UE5 Unreal development, the method comprising: creating the basic terrain and roads of the target city in the Unreal Engine; based on the basic terrain and roads of the target city, dividing the target city into a plurality of grid areas, and determining the modeling complexity index of each grid area; the modeling complexity index is used to represent the complexity of the model constructed in each grid area; based on the modeling complexity index of each grid area, determining the model generation order of each grid area; based on the model generation order of each grid area, generating the model of each grid area.
[0111] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0112] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the city scene interactive model construction method based on UE5 Unreal development provided by the above methods, the method including creating the basic terrain and roads of the target city in the Unreal Engine; based on the basic terrain and roads of the target city, dividing the target city into several grid areas, and determining the modeling complexity index of each grid area; the modeling complexity index is used to represent the complexity of the model constructed in each grid area; based on the modeling complexity index of each grid area, determining the model generation order of each grid area; based on the model generation order of each grid area, generating the model of each grid area.
[0113] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the city scene interactive model construction method based on UE5 Unreal development provided by the above methods, the method comprising: creating the basic terrain and roads of the target city in the Unreal Engine; based on the basic terrain and roads of the target city, dividing the target city into a number of grid areas, and determining the modeling complexity index of each grid area; the modeling complexity index is used to represent the complexity of the model constructed in each grid area; based on the modeling complexity index of each grid area, determining the model generation order of each grid area; based on the model generation order of each grid area, generating the model of each grid area.
[0114] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing an interactive model of a city scene based on UE5 Unreal Development, characterized in that: include: Create the basic terrain and roads of the target city in Unreal Engine; Based on the basic terrain and roads of the target city, the target city is divided into a number of grid areas, and a modeling complexity index of each grid area is determined; The modeling complexity index is used to represent the complexity of the model constructed in each grid area; Based on the modeling complexity index of each grid area, determine the model generation order of each grid area; Based on the model generation order of each grid area, a model of each grid area is generated.
2. The method for constructing an urban scene interactive model based on UE5 Unreal development according to claim 1 is characterized in that: The modeling complexity index is determined based on the maximum level of detail, the maximum level of interactivity, and the model generation method of the established model; The level of detail is used to indicate the degree of detail that an object needs to dynamically adjust according to its distance or importance in the view; The interactivity level is used to represent the complexity of the object's own interaction and the complexity of its interaction with objects in adjacent grid areas; The model generation method includes Unreal Engine rendering and external model import.
3. The method for constructing a city scene interactive model based on UE5 Unreal development according to claim 2 is characterized in that: The modeling complexity index CMI is determined by the following formula: Among them, D max is the maximum value of the level of detail, D view is the distance of the object in the view, D detail is the level of detail of the object; self is the interaction complexity of the object itself, I adj is the interaction complexity with adjacent grid regions; I inter is an exponential factor of the interaction complexity; G UE and G ext They are the generation complexity of Unreal Engine rendering and external model import; β UE and β ext They are the weight coefficients of Unreal Engine and external import respectively. α is the weight factor, which is used to adjust the contribution of interaction complexity in the final modeling complexity index; γ is the normalization factor, which is used to adjust all contribution levels to the same magnitude or range.
4. The method for constructing a city scene interactive model based on UE5 Unreal development according to claim 2 is characterized in that: The step of determining the model generation order of each grid area based on the modeling complexity index of each grid area includes: Based on the complexity index of each grid area and the dependency relationship between the grid areas, a topological algorithm is used to determine the initial generation order of the models of each grid area; Allocate corresponding threads for model generation in each grid area based on the complexity index of each grid area; Based on the processing logic of different threads, the initial generation order is adjusted to obtain the model generation order of each grid area.
5. The method for constructing a city scene interactive model based on UE5 Unreal development according to claim 4 is characterized in that: When the model generation method is external model import, the model generation order of each grid area is based on the model generation order of each grid area, and the model of each grid area is generated, including: Before importing, the model to be imported in each mesh area is parsed, and the framework structure of the detail level corresponding to the model is extracted according to the detail level of the model; Import the framework structure of the detail level corresponding to the model into the virtual engine from outside; Based on the imported framework structure, the model of each grid area is generated using virtual engine rendering.
6. The method for constructing a city scene interactive model based on UE5 Unreal development according to claim 4 is characterized in that: When the detail level of the established model is high, generating the model of each mesh area includes: generating models of multiple detail levels for each mesh area; the models of multiple detail levels include models with high detail levels and models with low detail levels.
7. The method for constructing a city scene interactive model based on UE5 Unreal development according to claim 1 is characterized in that: Based on the basic terrain and roads of the target city, the target city is divided into several grid areas, including: Extracting the height characteristics of the terrain based on the basic terrain of the target city, and using a clustering algorithm to divide the urban area into a number of groups of terrain areas according to the height characteristics of the terrain; The structure of the road network is analyzed, and the segmentation boundaries are adjusted for several groups of terrain areas using roads as dividing lines, thus dividing the target city into several grid areas.
8. A device for constructing an interactive model of a city scene based on UE5 Unreal Development, characterized in that: include: Basic creation module, used to create the basic terrain and roads of the target city in Unreal Engine; A first processing module is used to divide the target city into a plurality of grid areas based on the basic terrain and roads of the target city, and determine the modeling complexity index of each grid area; The modeling complexity index is used to represent the complexity of the model constructed in each grid area; A second processing module is used to determine the model generation order of each grid area based on the modeling complexity index of each grid area; The third processing module is used to generate a model of each grid area based on the model generation order of each grid area.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor executes the program, the method for constructing an urban scene interaction model based on UE5 Unreal development as described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the method for constructing an urban scene interaction model based on UE5 Unreal development as described in any one of claims 1 to 7 is implemented.