The method, system and electronic device for generating an above-ground environment model along a subway line
The automated generation system, which integrates multiple plugins in a deep manner, has solved the problem of low efficiency in modeling the ground environment along subway lines. It has achieved the generation of efficient and realistic ground environment models along subway lines, and promoted the development of subway environment digitization towards full-process intelligence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING AINIBABY HEALTH MANAGEMENT CO LTD
- Filing Date
- 2025-09-23
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies for modeling the above-ground environment along subway lines are inefficient, lack realism, and have poor toolchain data compatibility, resulting in long modeling cycles and susceptibility to human error.
An automated generation system with deep integration of multiple plug-ins is adopted. The path planning module generates the subway track and road distribution, the terrain generation module generates the terrain along the subway line, and the environment layout module performs the environment layout. By combining multi-tool collaboration and process standardization, the system can efficiently generate the ground environment model along the subway line.
It improves model generation efficiency, enhances model realism, improves tool synergy and model building flexibility, shortens modeling cycle, reduces human error, and supports smooth rendering and efficient resource management for scenes spanning hundreds of kilometers.
Smart Images

Figure CN120850619B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing, and specifically relates to a method, system and electronic device for generating a model of the above-ground environment along a subway line. Background Technology
[0002] With the rapid development of urban rail transit construction, the demand for 3D visualization in scenarios such as subway line planning, operation training, and safety drills is increasing. Currently, the generation of above-ground environments along subway lines mainly relies on manual modeling, GIS data-driven generation, and procedural generation technologies. However, manual modeling requires meticulously crafting elements such as buildings, vegetation, and roads, especially for subway lines tens of kilometers long, where the modeling cycle often takes months or even years, resulting in low efficiency and difficulty in supporting large-scale projects. While scenes generated based on GIS data can recreate terrain outlines and building blocks, they generally suffer from "hollowed-out details," lacking realism and interactivity. Procedural generation relies on manual or simple random algorithms to configure elements such as vegetation and buildings, lacking intelligent mechanisms that link with track alignment and terrain undulations.
[0003] Furthermore, when modeling the above-ground environment along subway lines, the processes of terrain generation, path planning, and environmental layout belong to different toolchains, resulting in poor data compatibility. A typical problem is that the track curves designed by CurvySpline cannot directly drive the adaptation of GaiaPro terrain height maps. Developers need to manually write scripts to parse the path curvature and elevation data, and then adjust the terrain slope segment by segment. This kind of "puzzle-like" workflow is not only time-consuming but also prone to introducing human error. Summary of the Invention
[0004] This application provides a method, system, and electronic device for generating ground environment models along subway lines, in order to improve model generation efficiency, enhance the realism of the constructed models, and improve the synergy of various tools and the flexibility of model construction during the model building process.
[0005] This application provides a method for generating a model of the above-ground environment along a subway line, including:
[0006] Obtain the path curve of the subway track;
[0007] The road distribution along the subway line is generated based on the path curve. The road distribution is indicated by multiple spline curves, including spline regions for indicating subway tracks and spline curves for indicating streets along the subway line or branch lines.
[0008] The roadbed elevation of the subway is determined based on the described path curve;
[0009] The terrain along the subway line is generated based on the roadbed elevation.
[0010] Based on the multiple spline curves and the terrain along the subway line, an environmental layout is carried out along the subway line to obtain a ground environment model along the subway line.
[0011] According to the method for generating a ground environment model along a subway line provided in this application, the step of performing environmental layout along the subway line based on the multiple spline curves and the terrain along the subway line to obtain a ground environment model along the subway line includes: obtaining the style of environmental elements, wherein the environmental elements include architectural or vegetation architectural style and vegetation ecological type; obtaining target environmental elements from a corresponding environmental element template library according to the style of the environmental elements; obtaining the environmental layout spacing of the subway tracks; and randomly distributing the target environmental elements along the multiple spline curves according to the layout spacing to obtain a ground environment model along the subway line.
[0012] According to the method for generating a ground environment model along a subway line provided in this application, after obtaining the ground environment model along the subway line, the method further includes: obtaining the world coordinates of the target environment element in the ground environment model along the subway line; dividing the ground environment model along the subway line into multiple terrain blocks; determining the terrain block to which the target environment element belongs based on the world coordinates; determining the terrain block index of the target environment element based on the terrain block to which the target environment element belongs; and mounting the target environment element to the hierarchical structure to which the corresponding terrain belongs based on the terrain block index.
[0013] According to the method for generating a ground environment model along a subway line provided in this application, after dividing the ground environment model along the subway line into multiple terrain blocks, the method further includes: obtaining the original height map of each terrain block in the multiple terrain blocks; normalizing the original height map to obtain a reference height map; performing grayscale processing on the reference height map to obtain a grayscale map; spatially compressing the grayscale map, and retaining the maximum and minimum height values of the terrain block corresponding to the grayscale map.
[0014] According to the method for generating a ground environment model along a subway line provided in this application, after obtaining the ground environment model along the subway line, the method further includes: obtaining the current track path after track path modification; constructing a path buffer with a preset width based on the centerline of the current track path, the path buffer being used to constrain the operation range of subsequent terrain reshaping and resource redeployment; obtaining the normal direction of each sampling point in the path buffer; obtaining the expected height based on the normal direction; and modifying the terrain along the subway line using a curve fitting method based on the expected height to achieve terrain reshaping.
[0015] According to the method for generating a ground environment model along a subway line provided in this application, after constructing a path buffer of a preset width based on the centerline of the current track path, the method further includes: obtaining model instances distributed within the path buffer, the model instances including building instances and vegetation instances; determining the spatial distribution legality and distribution density of the model instances within the path buffer; and adjusting the distribution of the model instances according to the spatial distribution legality and distribution density to achieve resource redeployment.
[0016] According to the method for generating a ground environment model along a subway line provided in this application, after constructing a path buffer of a preset width based on the centerline of the current track path, the method further includes: obtaining an adjustment instruction for a reference spline curve within the path buffer; adjusting the reference spline curve to a target spline curve according to the adjustment instruction to obtain the adjusted road distribution, wherein the reference spline curve and the target spline curve indicate different street types.
[0017] This application also provides an automated generation system based on deep integration of multiple plugins, including:
[0018] The path planning module is used to generate the road distribution along the subway line based on the obtained path curves. The road distribution is indicated by multiple spline curves, including spline regions for indicating subway tracks and spline curves for indicating streets along the subway line or branch lines.
[0019] The path planning module is also used to determine the roadbed elevation of the subway based on the path curve;
[0020] A terrain generation module is used to generate the terrain along the subway line based on the roadbed elevation from the path planning module.
[0021] The environment layout module is used to perform environmental layout of the subway line based on the multiple spline curves from the path planning module and the subway line terrain from the terrain generation module, so as to obtain the ground environment model of the subway line.
[0022] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for generating a model of the ground environment along a subway line as described above.
[0023] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for generating a model of the above-described ground environment along a subway line.
[0024] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method for generating a ground environment model along a subway line as described above.
[0025] The method, system, and electronic equipment provided in this application for generating ground environment models along subway lines first acquire the path curves of the subway tracks. Then, based on these path curves, the road distribution along the subway line is generated. This road distribution is indicated by multiple spline curves, including spline regions indicating the subway tracks and spline curves indicating streets along the subway line or branch lines. Next, the subway subgrade elevation is determined based on the path curves. Then, the terrain along the subway line is generated based on the subgrade elevation. Finally, the environmental layout along the subway line is performed based on the multiple spline curves and the terrain, resulting in a ground environment model of the subway line. This model construction, through multi-tool collaboration and process standardization, improves model generation efficiency and enhances the realism of the constructed model, increasing the synergy of various tools and the flexibility of model construction. It promotes the digitalization of subway environments from single-point tool optimization to full-process intelligence, providing a reusable technological paradigm for smart city and digital twin construction. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of the composition of the automated generation system based on deep integration of multiple plug-ins provided in this application.
[0028] Figure 2 This is one of the flowcharts illustrating the method for generating a model of the above-ground environment along a subway line provided in this application.
[0029] Figure 3 This is a schematic diagram of the user interface provided in this application.
[0030] Figure 4 This is the second flowchart illustrating the method for generating a model of the above-ground environment along a subway line provided in this application.
[0031] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0033] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0034] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0035] Currently, when modeling the above-ground environment along subway lines, terrain generation, path planning, and environmental layout belong to different toolchains, resulting in poor data compatibility. Furthermore, model building is either inefficient or produces models with poor realism.
[0036] To address the aforementioned problems, this application provides a method, system, and electronic device for generating a model of the above-ground environment along a subway line. The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0037] Please see Figure 1 , Figure 1 This is a schematic diagram of the automated generation system based on deep integration of multiple plugins provided in this application. The automated generation system 100 based on deep integration of multiple plugins includes a path planning module 101, a terrain generation module 102, and an environment layout module 103. The path planning module 101 can integrate the CurvySpline plugin, supporting dynamic drawing and parametric adjustment (such as radius of curvature and slope) of subway track curves. The terrain generation module 102 can generate subway line terrain in batches using preset parametric templates based on the Gaia Pro 2023 engine. The environment layout module 103 is used for environment layout.
[0038] In specific implementation, the path planning module 101 is used to generate the road distribution along the subway line based on the acquired path curves. The road distribution is indicated by multiple spline curves, including spline regions for indicating subway tracks and spline curves for indicating streets along the subway line or branch lines. The path planning module 101 is also used to determine the subway subgrade elevation based on the path curves. The terrain generation module 102 is used to generate the terrain along the subway line based on the subgrade elevation from the path planning module. The environment layout module 103 is used to perform environmental layout along the subway line based on the multiple spline curves from the path planning module and the terrain along the subway line from the terrain generation module, to obtain a ground environment model along the subway line.
[0039] In one possible embodiment, the automated generation system based on deep integration of multiple plug-ins further includes at least one of the following modules:
[0040] The dynamic sign module generates station name signs and highlighted terrain boundaries. This module also supports customization of parameters such as color, line width, and subdivision precision, and optimizes the editing experience through hierarchical management (e.g., "Ignore Select").
[0041] The data management module is used to configure the scenes and environments of the above-ground environment model along the subway line. For example, it uses ScriptableObject format configuration files to store scene numbers, community style configurations, lighting presets, etc.
[0042] The performance optimization module is used to merge duplicate models in the above-ground environment model along the subway line. Model mesh merging can be achieved through CombineMeshByGrids, such as automatically merging track components and standardized buildings, reducing rendering batches by more than 80%.
[0043] The LOD (Level of Detail) hierarchical management module is used to dynamically adjust the level of detail in the above-ground environment model along the subway line based on the view distance. It can automatically add LOD components and supports smooth rendering of scenes spanning hundreds of kilometers.
[0044] The terrain segmentation loading module is used to load or unload the above-ground environment model along the subway line according to terrain segments. For example, dynamic loading and unloading can be implemented based on Gaia Terrain Loader to reduce memory usage.
[0045] As can be seen, the automated generation system provided in this application, based on deep integration of multiple plugins, utilizes standardized data interfaces to connect toolchains such as CurvySpline, Gaia Pro, and GeNa Pro, enabling real-time linkage between track paths, terrain elevation, and environmental layout. For example, track curvature data directly drives dynamic adjustment of terrain slope, automatically generating terrain structures with higher outer edges and lower inner edges in curved areas, eliminating manual intervention. Non-destructive terrain editing supports local detail corrections (such as roadbed leveling and slope sculpting), ensuring flexible and efficient scene modification.
[0046] Please see Figure 2 , Figure 2 This is one of the flowcharts illustrating the method for generating a surface environment model along a subway line provided in this application. The method for generating a surface environment model along a subway line includes the following steps.
[0047] S201, obtain the path curve of the subway track.
[0048] The path curve can be the coordinate points entered by the user on the system interface, and the path curve is determined based on the coordinate points.
[0049] S202, Generate the road distribution along the subway line based on the path curve.
[0050] The road distribution is indicated by multiple spline curves, including spline regions for indicating subway tracks and spline curves for indicating streets along subway lines or branch lines.
[0051] This road distribution can be generated based on the system's path planning module. The path planning module integrates the CurvySpline plugin, supporting dynamic drawing and parametric adjustment of subway track curves (such as radius of curvature and slope). Track data drives terrain adaptation logic in real time, for example, automatically adjusting roadbed height and terrain slope based on the path curve, eliminating the need for manual point-by-point matching. Figure 3 As shown, during environment generation, the path planning module can automatically generate multiple roadside roads based on the path curve, and determine information such as the number of road segments, the distance of the road from the main line, and the road width, thereby generating spline curves. The monkey selects from the road expansion model. Users can also modify the generated road information on the operation interface, such as modifying the road width and the number of road segments. Then, based on the user-defined road-related information, splines on both sides of the main line are generated, as well as roads on both sides of the main line. During environment generation, HIA can generate multiple main line splines, for example... Figure 3 The mainline splines _1 and _2 are used. Additionally, the batch terrain parameter editing module allows for setting and applying the global heightmap resolution and the XYZ coordinates of the global terrain dimensions.
[0052] S203, Determine the roadbed elevation of the subway based on the aforementioned path curve.
[0053] In determining the roadbed elevation, the baseline (centerline) can first be determined based on the subway's design route. Then, based on the set slope standard and baseline, the slope change of each segment along the route curve is calculated to obtain the roadbed elevation.
[0054] S204, Generate the terrain along the subway line based on the roadbed elevation.
[0055] Specifically, the terrain generation module, based on the Gaia Pro 2023 engine, can batch generate terrain along the subway line using preset parametric templates to obtain topographic maps that indicate the roadbed elevation. In practice, the path data generated by CurvySpline can be converted in real-time into a texture or heightmap format mask. This mask can then be converted into a Gaia Stamp, which can be used to control the Gaia heightmap and drive the terrain generator to automatically match the roadbed elevation. For example, in areas with track curves, a terrain slope that is higher on the outside and lower on the inside is automatically generated to ensure physical plausibility.
[0056] S205. Based on the multiple spline curves and the terrain along the subway line, an environmental layout is performed along the subway line to obtain a ground environment model along the subway line.
[0057] Specifically, the environmental layout module can obtain the subway track spline curve from the path planning module. Based on terrain features, vegetation belts (such as street trees and green belts) and buildings along the subway track spline curve are automatically and randomly distributed to achieve the environmental layout. In particular, during environmental layout, such as... Figure 3 The system can also batch generate road splines (GeNaRoad) along track curves and automatically add extended functions such as carving and clearing vegetation. It uses CurvyGenerator to generate streetlight and roadside tree models along paths, and supports one-click baking and distributed storage to the corresponding plot scene. Specifically, users can select a streetlight generator prefab on the interface, determine the streetlight location, generate the main streetlight, bake it, and then distribute or delete all baked models.
[0058] As can be seen, in this embodiment, the path curve of the subway track is first obtained. Then, the road distribution along the subway line is generated based on the path curve. The road distribution is indicated by multiple spline curves, including spline regions for indicating the subway track and spline curves for indicating streets along the subway line or branch lines. Next, the roadbed elevation of the subway is determined based on the path curve. Then, the terrain along the subway line is generated based on the roadbed elevation. Finally, the environmental layout along the subway line is performed based on the multiple spline curves and the terrain along the subway line to obtain a ground environment model of the subway line. This model construction through multi-tool collaboration and process standardization can improve model generation efficiency and enhance the realism of the constructed model, improving the synergy of various tools and the flexibility of model construction. It promotes the digitalization of the subway environment from single-point tool optimization to full-process intelligence, providing a reusable technical paradigm for smart city and digital twin construction.
[0059] And such as Figure 3 As shown, this solution can also develop a customized Inspector panel based on the Odin plugin to provide visual parameter configuration, such as track curve editing, vegetation density slider, terrain range highlighting settings, station GUI drawing, and terrain name GUI drawing. It also supports track curve editing, terrain parameter slider adjustment, and real-time preview of the highlighting range; it supports a dynamic sign system: automatically generating station name signs and terrain range highlighting lines, supporting parameterized adjustments for line width (0.1-5.0m), color (RGB / HEX), and subdivision precision (8-64 segments). For example, in the baseline sign generation module, you can select the subway location sign prefab, determine the baseline range highlighting width, the baseline range curve subdivision number, terrain sign instance, terrain range highlighting color, and the height of the baseline range curve relative to the ground. Then, based on the parameters set above, you can generate or delete plot signs. When generating station name signs, you can select the station name prefab, select the station model location, parking point, and station sign entity, etc., to generate the station name sign, or delete the station sign with one click.
[0060] In one possible embodiment, the step of performing environmental layout along the subway line based on the plurality of spline curves and the terrain along the subway line to obtain a ground environment model along the subway line includes: obtaining the style of environmental elements, the environmental elements including architectural or vegetation architectural style and vegetation ecological type; obtaining target environmental elements from a corresponding environmental element template library according to the style of the environmental elements; obtaining the environmental layout spacing of the subway tracks; and randomly distributing the target environmental elements along the plurality of spline curves according to the layout spacing to obtain a ground environment model along the subway line.
[0061] The environmental layout spacing between the target building and the target vegetation can be different, meaning it can be set separately by the user through the interface. The system provided in this application is based on a modular design and can support plug-in function expansion, such as adding vegetation types or architectural style libraries, as well as providing API interfaces and script templates to support the integration of third-party tools (such as traffic simulation systems and light baking tools).
[0062] When performing environmental layout, the environment layout module first obtains the subway track spline curve from the path planning module to determine the distance between the object to be generated and the track. Then, it selects a set of prepared vegetation or building prefabricated bodies, and automatically and randomly distributes vegetation belts (such as street trees and green belts) and street-side buildings at specified intervals from the track along the subway track spline curve. The system provided in this application can also support a custom architectural style library (such as modern and traditional) and vegetation ecological models (such as broad-leaved forests and coniferous forests). In specific implementation, when setting the distribution of buildings and vegetation, the curvature corresponding to the spline curve can also be obtained, and the index density and building density of the street indicated by the corresponding spline curve can be adjusted according to the curvature.
[0063] It is possible Figure 3 As shown, users can set the distance between houses and roads through the interface, and select a prefab of a street-facing building generator of a specific style to generate the layout of street-facing buildings with one click. Users can also set the distance between street trees and roads, and select a street data generator prefab to generate street-facing trees with one click. Alternatively, they can delete buildings and trees uniformly. For example, when generating house-related content, users can select the distance to the road and choose a prefab of a street-facing building generator to generate street-facing buildings, bake and distribute them, or delete all baked buildings with one click. When generating streetlight-related content, users can select a prefab of a streetlight generator, generate the main streetlights, bake and distribute them, or delete all baked models with one click. When generating street tree-related content, users can select the distance to the road and a prefab of a street tree generator to generate street-facing trees, bake and distribute them, or delete all baked trees with one click.
[0064] As can be seen, in this embodiment, roads, buildings, vegetation, and streetlights are generated in batches along the track curve, and parametric configuration is supported (such as increasing vegetation density on the outside of curves and switching architectural style libraries), which can improve modeling efficiency. The intelligent distribution algorithm, combined with the track orientation and terrain features, can also dynamically optimize resource distribution (such as adjusting the density of green belts according to curvature) to avoid layout conflicts.
[0065] In one possible embodiment, after obtaining the ground environment model along the subway line, the method further includes: obtaining the world coordinates of the target environmental element in the ground environment model along the subway line; dividing the ground environment model along the subway line into multiple terrain blocks; determining the terrain block to which the target environmental element belongs based on the world coordinates; determining the terrain block index of the target environmental element based on the terrain block to which the target environmental element belongs; and mounting the target environmental element to the hierarchical structure to which the corresponding terrain belongs based on the terrain block index.
[0066] The terrain chunking and loading module utilizes the `DistributeModlesToTerrain` method to automatically assign generated environmental elements (such as buildings and vegetation) to corresponding terrain chunks based on their coordinates, ensuring consistency across large-scale scene data. Specifically, the automatic assignment mechanism analyzes the position of each environmental element (such as buildings and vegetation) in the world coordinate system, combined with spatial partitioning information from the terrain system (such as Gaia-divided tiles (smaller terrain chunks) or Terrain Chunks (larger terrain chunks)), to determine the terrain chunk to which the target element belongs. Specifically, the `DistributeModelsToTerrain` method iterates through all model data to be distributed at runtime, calculating the corresponding terrain tile index based on the offset between the model's world coordinates and the terrain's starting point.
[0067] For example, if a terrain is divided into multiple 256x256 meter blocks, a building located at world coordinates (x=540, z=780) will be mapped to terrain tile (2, 3). Once the element's assignment is determined, the system attaches the model prefab or instance to the corresponding terrain's GameObject hierarchy, ensuring orderly resource scheduling and consistent runtime terrain loading. This mechanism not only applies to initial deployment but also supports dynamic updates. For instance, when adjusting the Spline path or resource type in real-time in the editor, the element distribution of the corresponding tile can be automatically refreshed, improving development efficiency and scene consistency.
[0068] As can be seen, in this embodiment, attaching environmental elements to the corresponding terrain blocks based on coordinates can ensure the orderliness of resource scheduling and the consistency of terrain loading during runtime.
[0069] In one possible embodiment, after dividing the ground environment model along the subway line into multiple terrain blocks, the method further includes: obtaining the original height map of each terrain block; normalizing the original height map to obtain a reference height map; performing grayscale processing on the reference height map to obtain a grayscale map; spatially compressing the grayscale map and retaining the maximum and minimum height values of the terrain block corresponding to the grayscale map.
[0070] The terrain block loading module first normalizes the original heightmap of each terrain block, standardizing it to floating-point values between 0 and 1, and then further quantizes it into an 8-bit grayscale image to meet the input requirements of the compression algorithm. Subsequently, spatial compression is performed using a lossless image compression format (PNG Deflate algorithm) while preserving the precision mapping relationship of the heightmap (minHeight and maxHeight are recorded in metadata for decoding and reconstruction). Furthermore, the algorithm supports tile-based compressed block indexing, allowing on-demand loading of heightmap data for specified areas to adapt to asynchronous loading mechanisms, thereby reducing the overall overhead of heightmap data storage while ensuring terrain quality and fidelity.
[0071] As can be seen, this embodiment employs block baking and asynchronous loading techniques, which can support the generation of subway line scenes spanning hundreds of kilometers. Furthermore, data compression algorithms can significantly reduce storage requirements.
[0072] In one possible embodiment, after obtaining the ground environment model along the subway line, the method further includes: obtaining the current track path after track path modification; constructing a path buffer of a preset width based on the centerline of the current track path, the path buffer being used to constrain the operation range of subsequent terrain reshaping and resource redeployment; obtaining the normal direction of each sampling point in the path buffer; obtaining the expected height based on the normal direction; and modifying the terrain along the subway line using a curve fitting method based on the expected height to achieve terrain reshaping.
[0073] After the track path is modified, terrain reshaping and resource redistribution can be automatically triggered, reducing rework costs. Specifically, after a path change, the system can resample the path coordinate point set in real time to obtain the current track path. Using the path centerline as a reference, a "track influence zone" (i.e., a path buffer) with a width buffer is constructed. This area is used to constrain the scope of subsequent terrain reshaping and resource redistribution operations, thereby avoiding performance waste caused by full map reconstruction. During the terrain reshaping stage, the expected terrain height can be calculated based on the normal direction of each sampling point within the track buffer, and curve fitting can be used to locally modify the terrain. This process can be implemented by binding editor events or the Undo system.
[0074] As can be seen, in this embodiment, when reshaping the terrain, the expected height is calculated based on the normal direction within the determined buffer path, so as to make local modifications to the terrain, which can avoid the performance waste caused by full map reconstruction and improve reconstruction efficiency.
[0075] In one possible embodiment, after constructing a path buffer of a preset width based on the centerline of the current track path, the method further includes: obtaining model instances distributed within the path buffer, the model instances including building instances and vegetation instances; determining the spatial distribution legality and distribution density of the model instances within the path buffer; and adjusting the distribution of the model instances according to the spatial distribution legality and distribution density to achieve resource redeployment.
[0076] During the resource redistribution phase, all model instances (such as buildings and trees) originally distributed within the track buffer can be detected, and their spatial validity and distribution density can be reassessed based on the new path. Objects with illegal overlaps or height imbalances will be removed or moved to new, suitable areas, while objects at boundaries can maintain layout continuity through fine-tuning of their positions. This process can be implemented by binding editor events or the Undo system. Specifically, the system includes a ScriptableObject resource library, supporting quick replacement of configurations for buildings, vegetation, etc., and enabling one-click switching between styles such as "modern city" and "traditional neighborhood."
[0077] As can be seen, in this embodiment, when redistributing resources, fine-tuning is performed based on the legality and distribution density of the environmental elements around the modified path, which can improve the efficiency of resource redistribution.
[0078] In one possible embodiment, after constructing a path buffer of a preset width based on the centerline of the current track path, the method further includes: obtaining an adjustment instruction for a reference spline curve within the path buffer; adjusting the reference spline curve to a target spline curve according to the adjustment instruction to obtain the adjusted road distribution, wherein the reference spline curve and the target spline curve indicate different street types.
[0079] Curvy splines and GeNa splines can be converted in batches to support one-click generation of road distributions (including main and branch streets). Designers can modify spline curves in the interface to quickly test different path configurations, achieving integrated dynamic iteration of track and terrain environment, significantly reducing the cost of traditional manual rework.
[0080] For example Figure 4As shown, after receiving user input, the system performs path planning, terrain generation, environment layout, and model optimization based on the Gaia Ancillary Terrains Modifier (GATM) core plugin. First, the path planning module obtains information such as track curvature / elevation. Then, the terrain generation module obtains a terrain height map. Simultaneously, it retrieves target buildings from the architectural style library of the dynamic resource management module and target vegetation from vegetation templates. The environment layout module then implements the environmental layout of roads, buildings, and vegetation. Next, model optimization is performed based on LOD parameters and merging strategies. This model optimization includes terrain tile loading, LOD hierarchical rendering, and intelligent mesh merging to achieve smooth scene generation at the 100km level. It can be adapted to scenarios such as subway driving simulation, digital twin system construction, and emergency drill platform applications.
[0081] As can be seen, this solution has the following advantages:
[0082] 1. Deep integration of multiple plugins to establish standardized collaborative processes: The GATM plugin enables seamless integration with tools such as CurvySpline, Gaia Pro, GeNa Pro, and Mesh Baker, establishing a unified data interface and automated interaction mechanism. This achieves end-to-end collaboration across terrain generation, track path planning, environment layout, and resource optimization, eliminating data flow disruptions and repetitive work caused by switching between traditional tools. For example, real-time track-terrain linkage: CurvySpline path data directly drives the Gaia Pro terrain engine, automatically adapting to roadbed elevation and slope, and improving generation efficiency for terrain with higher outer edges and lower inner edges in curve areas. For long-distance subway lines, a batch generation mechanism is provided, compressing the modeling cycle from months to days, significantly reducing time and labor costs.
[0083] 2. One-click resource generation along the route. Based on track curves, environmental elements such as roads, buildings, vegetation, and streetlights are generated in batches, supporting parametric adjustments (such as green belt density and architectural style library switching), significantly improving modeling efficiency compared to manual operation. Scene optimization and model merging: Mesh Baker intelligently merges duplicate models (such as standardized track components and streetlights), combined with LOD grading and terrain block loading technology, reducing rendering batches and improving frame rate stability for scenes spanning hundreds of kilometers.
[0084] 3. Supports parallel development and seamless merging, shortening the overall cycle. Through modular design, the development of subway driving simulation program functions and environment creation can be carried out simultaneously. GATM provides dynamic data interfaces, allowing driving simulation systems (such as train control logic and signal light interaction) and environment scenarios to be developed independently and then merged with one click, avoiding the waiting and compatibility issues in traditional serial development, and shortening the overall project time.
[0085] 4. Highly flexible resource configuration, supporting rapid iteration. Architectural styles, vegetation ecology, and material textures are encapsulated as ScriptableObject configuration files, allowing users to replace or expand the resource library at any time via a visual panel. For example, switching from a "Modern City" to a "Traditional Street" architectural style simply requires selecting a preset template, and the system automatically redistributes buildings along the street. When a route is rerouted, the system automatically triggers terrain reshaping and resource redistribution, avoiding script reconstruction and data rework in traditional solutions, thus improving response speed.
[0086] 5. Overcoming performance and storage bottlenecks in large-scale scenarios. Through terrain-based lossless compression algorithms and distributed storage strategies, the data volume of scenarios spanning hundreds of kilometers is reduced by 50% (from 500GB to 240GB); combined with asynchronous loading and dynamic baking technologies, real-time editing and smooth operation of ultra-long-distance scenarios are achieved, providing high-performance underlying support for applications such as digital twins and emergency drills.
[0087] 6. Enhanced scalability and maintainability across the entire process. GATM provides standardized API interfaces and a parametric template library, supporting rapid integration of third-party tools (such as traffic simulation and weather systems); when track paths or environmental requirements change, the system automatically triggers terrain reshaping and resource redistribution, reducing rework costs and significantly enhancing project responsiveness.
[0088] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. For example... Figure 5 As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a method for generating a ground environment model along the subway line. This method includes: acquiring the path curve of the subway track; generating the road distribution along the subway line based on the path curve, the road distribution being indicated by multiple spline curves, including spline regions for indicating the subway track and spline curves for indicating streets along the subway line or branch lines; determining the subway subgrade elevation based on the path curve; generating the subway line terrain based on the subgrade elevation; and performing environmental layout along the subway line based on the multiple spline curves and the subway line terrain to obtain a ground environment model along the subway line.
[0089] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0090] On the other hand, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform a method for generating a ground environment model along a subway line. The method includes: acquiring path curves of the subway track; generating road distribution along the subway line based on the path curves, the road distribution being indicated by multiple spline curves, the multiple spline curves including spline regions for indicating the subway track and spline curves for indicating streets along the subway line or branch lines; determining the subway subgrade elevation based on the path curves; generating the subway line terrain based on the subgrade elevation; and performing environmental layout along the subway line based on the multiple spline curves and the subway line terrain to obtain a ground environment model along the subway line.
[0091] In another aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described methods for generating a ground environment model along a subway line. The method includes: acquiring the path curve of the subway track; generating road distribution along the subway line based on the path curve, the road distribution being indicated by multiple spline curves, the multiple spline curves including spline regions for indicating the subway track and spline curves for indicating streets along the subway line or branch lines; determining the subway subgrade elevation based on the path curve; generating the subway line terrain based on the subgrade elevation; and performing environmental layout along the subway line based on the multiple spline curves and the subway line terrain to obtain a ground environment model along the subway line.
[0092] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a model of the above-ground environment along a subway line, characterized in that, include: Obtain the path curve of the subway track; The road distribution along the subway line is generated based on the path curve. The road distribution is indicated by multiple spline curves, including spline regions for indicating subway tracks and spline curves for indicating streets along the subway line or branch lines. The roadbed elevation of the subway is determined based on the described path curve; The terrain along the subway line is generated based on the roadbed elevation. The style of environmental elements is obtained, including architectural or vegetation architectural style and vegetation ecological type; The target environment element is obtained from the corresponding environment element template library according to the style of the environment element; Obtain the environmental layout spacing of the subway tracks; Based on the layout spacing, the target environmental elements are randomly distributed along the multiple spline curves to obtain the ground environment model along the subway line. Obtain the world coordinates of the target environmental element in the above-ground environmental model along the subway line; The above-ground environment model along the subway line is divided into multiple terrain blocks; The terrain block to which the target environmental element belongs is determined based on the world coordinates; The terrain block index of the target environment element is determined according to the terrain block to which the target environment element belongs; The target environment element is mounted to the corresponding terrain hierarchy based on the terrain block index; Get the current orbit path after the orbit path has been modified; Using the centerline of the current track path as a reference, a path buffer of a preset width is constructed. The path buffer is used to constrain the operation range of subsequent terrain reshaping and resource redeployment. Obtain the normal direction of each sampling point in the path buffer; The expected height is obtained based on the normal direction; Based on the expected height, the terrain along the subway line is modified using a curve fitting method to achieve terrain reshaping.
2. The method according to claim 1, characterized in that, After dividing the above-ground environment model along the subway line into multiple terrain blocks, the method further includes: Obtain the original height map of each terrain block among the multiple terrain blocks; The original height map is normalized to obtain a reference height map; The reference height map is processed into a grayscale image. Spatially compress the grayscale image and retain the maximum and minimum height values of the terrain blocks corresponding to the grayscale image.
3. The method according to claim 1, characterized in that, After constructing a path buffer of a preset width based on the centerline of the current track path, the method further includes: Obtain model instances distributed within the path buffer, the model instances including building instances and vegetation instances; Determine the spatial distribution validity and distribution density of model instances within the path buffer; The distribution of model instances is adjusted based on the spatial distribution legality and distribution density to achieve resource redeployment.
4. The method according to claim 1, characterized in that, After constructing a path buffer of a preset width based on the centerline of the current track path, the method further includes: Obtain adjustment instructions for the reference spline curve within the path buffer; The reference spline curve is adjusted to the target spline curve according to the adjustment instruction to obtain the adjusted road distribution. The street types indicated by the reference spline curve and the target spline curve are different.
5. An automated generation system based on multi-plugin integration, characterized in that, include: The path planning module is used to generate the road distribution along the subway line based on the obtained path curves. The road distribution is indicated by multiple spline curves, including spline regions for indicating subway tracks and spline curves for indicating streets along the subway line or branch lines. The path planning module is also used to determine the roadbed elevation of the subway based on the path curve; A terrain generation module is used to generate the terrain along the subway line based on the roadbed elevation from the path planning module. The environment layout module is used to obtain the style of environmental elements, which include architectural or vegetation architectural style and vegetation ecological type; to obtain target environmental elements from the corresponding environmental element template library according to the style of the environmental elements; to obtain the environmental layout spacing of the subway track; and to randomly distribute the target environmental elements along the multiple spline curves according to the layout spacing to obtain the ground environment model along the subway line. The system includes: obtaining the world coordinates of the target environment element in the ground environment model along the subway line; dividing the ground environment model along the subway line into multiple terrain blocks; determining the terrain block to which the target environment element belongs based on the world coordinates; determining the terrain block index of the target environment element based on the terrain block to which the target environment element belongs; and mounting the target environment element to the hierarchical structure to which the corresponding terrain belongs based on the terrain block index. And used to obtain the current orbital path after the orbital path has been modified; Using the centerline of the current track path as a reference, a path buffer of a preset width is constructed. The path buffer is used to constrain the operation range of subsequent terrain reshaping and resource redeployment. The normal direction of each sampling point in the path buffer is obtained. The expected height is obtained based on the normal direction. Based on the expected height, the terrain along the subway line is modified using a curve fitting method to achieve terrain reshaping.
6. The automated generation system based on multi-plugin integration according to claim 5, characterized in that, The system also includes at least one of the following modules: The dynamic sign module is used to generate station name signs and terrain boundary highlight lines; The data management module is used to configure the scene and environment of the above-ground environment model along the subway line; The performance optimization module is used to merge duplicate models in the above-ground environment model along the subway line; The LOD hierarchical management module is used to dynamically adjust the level of detail of the above-ground environment model along the subway line according to the line of sight. The terrain segmentation loading module is used to load or unload the ground environment model along the subway line according to the terrain segmentation.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method for generating a model of the above-ground environment along the subway line as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Modeling method and system for subway interval building information model and storage medium
CN111581687A
Building information model and actual surrounding environment common rendering method and system
CN112927335A