A river model dynamic generation method and system based on unreal engine

CN120495550BActive Publication Date: 2026-08-07HANGZHOU YIZHI MICRO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU YIZHI MICRO TECH CO LTD
Filing Date
2025-04-21
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

渲染效率低,现有技术中如单独模型加载、粒子特效或实例化技术受限于虚幻引擎UE的DrawCall数量,当模型数量超过1万时,渲染性能显著下降

Benefits of technology

[0012] This invention presents a method and system for dynamically generating river models based on Unreal Engine. By parsing river geographic information data, it dynamically generates a single integrated model. It utilizes vertex color arrays to visualize attribute data and combines block processing and ray detection techniques to solve the technical challenges of low rendering performance, poor dynamic update efficiency, and high interaction latency in large-scale river models. This improves the rendering performance and dynamic update capability of displaying large amounts of river information in Unreal Engine. The block update mechanism supports real-time color updates for models with millions of vertices, enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495550B_ABST
    Figure CN120495550B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on unreal engine's river model dynamic generation method and system, comprising: obtaining one or more river geographic information data, and the river geographic information data is parsed, to generate associated file, the associated file includes vertex position file, patch vertex index file, face and river ID mapping file, river vertex set file;Utilize unreal engine according to vertex coordinate file and triangular face vertex index file, dynamically constructs one or more river geographic information data corresponding one or more river models;Output the overall model of a river or merge multiple river models into overall model.The application based on unreal engine's river model dynamic generation method and system improve the rendering performance and dynamic updating river data capacity of a large number of river information in unreal engine.Experience is improved by the block updating mechanism supports the real-time color updating of million vertex model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer graphics processing technology, and in particular to a method and system for dynamically generating river models based on Unreal Engine. Background Technology

[0002] In 3D visualization scenarios, the dynamic rendering and interactive display of river models face the following technical bottlenecks: Rendering efficiency is low. Existing technologies such as individual model loading, particle effects, or instantiation are limited by the number of DrawCalls in Unreal Engine (UE). When the number of models exceeds 10,000, rendering performance drops significantly. Interactive functionality is lacking. Particle effects do not support mouse click interaction, and instantiation requires completely consistent model styles, failing to meet the diverse needs of river formations. Dynamic updates are difficult. Existing technologies (such as GeometryScript) only support small-scale models, such as those with fewer than 10,000 vertices, when updating vertex colors, making it difficult to handle the real-time update requirements of massive amounts of data. Summary of the Invention

[0003] To address the technical problems existing in the background art, this invention proposes a method and system for dynamically generating river models based on Unreal Engine.

[0004] This invention proposes a method for dynamically generating river models based on Unreal Engine, comprising: Obtain one or more river geographic information data, and parse the river geographic information data to generate an association file, which includes a vertex location file, a face vertex index file, a face-to-river ID mapping file, and a river vertex set file; Using Unreal Engine, one or more river models corresponding to one or more river geographic information data are dynamically constructed based on vertex coordinate files and triangle vertex index files. Output a complete model of a single river channel or merge multiple river channel models into a single model.

[0005] Preferably, the river geographic information data includes the geometric coordinates of the river and the river-related attribute information; the geometric coordinates of the river are specifically a set of lines or line segments composed of longitude and latitude; the river-related attribute information includes, but is not limited to, river ID, name, flow rate, and water level.

[0006] Preferably, the step of parsing the river geographic information data to generate associated files specifically includes: Expand the line segments in the geometric coordinates of the river channel into patches to generate vertex position files and patch vertex index files; Establish a mapping relationship between the river ID in the attribute information associated with the face and the river, and record the vertex ID sequence contained in each river to obtain the face-to-river ID mapping file and the river vertex set file.

[0007] Preferably, the vertex position file is in the format specified in the original text. Record the three-dimensional coordinates of each vertex; the patch vertex index file is formatted as follows. Record the counter-clockwise index of the vertices of each face; the face-to-river ID mapping file is formatted as follows. Establish a unique identifier linking each patch to its corresponding river channel; The river vertices set file is in the format... Store the sequence of vertex IDs contained in each river channel; RiverID represents the number of each river channel; PointID represents the number of each vertex in the river channel model; and PlaneID represents the number of each face in the river channel model.

[0008] Preferably, the step of dynamically constructing a river model corresponding to a river's geographic information data based on vertex coordinate files and triangle vertex index files using Unreal Engine specifically includes: Load the PointID coordinates from the vertex position file of a single river channel into the vertex set of the model, and generate a patch sequence based on the Point0, Point1, and Point2 vertex indices corresponding to the PlaneID in the patch vertex index file. Create a ColorArray for all vertices, with the initial color values ​​set to uniform default values; Load the PlaneID, RiverID from the facet mapping file and the vertex ID sequence from the river vertex mapping file into memory, and establish a chained index relationship between PlaneID, RiverID, and vertex ID sequence to obtain the corresponding river model.

[0009] Preferably, when dynamically constructing one or more river models corresponding to one or more river geographic information data, river models with more than a set threshold of vertices are divided into multiple sub-model blocks; each sub-model block independently loads vertex location files and face vertex index files, and maintains independent PlaneID, RiverID, and vertex ID sequence index relationships; when updating the color array in blocks, each sub-model block is updated asynchronously at a preset time interval.

[0010] Preferably, when dynamically constructing one or more river models corresponding to one or more river geographic information data, river models with more than a set threshold of vertices are divided into multiple sub-model blocks; each sub-model block independently loads vertex location files and face vertex index files, and maintains independent PlaneID, RiverID, and vertex ID sequence index relationships; when updating the color array in blocks, each sub-model block is updated asynchronously at a preset time interval.

[0011] This invention proposes a dynamic river model generation system based on Unreal Engine, comprising: The data parsing module is used to acquire one or more river geographic information data and parse the river geographic information data to generate an association file. The association file includes a vertex location file, a face vertex index file, a face-to-river ID mapping file, and a river vertex set file. The model building module is used to dynamically build one or more river models corresponding to one or more river geographic information data based on vertex coordinate files and triangle vertex index files using Unreal Engine. The model integration module is used to output a complete model of a single river channel or to merge multiple river channel models into a single model.

[0012] This invention presents a method and system for dynamically generating river models based on Unreal Engine. By parsing river geographic information data, it dynamically generates a single integrated model. It utilizes vertex color arrays to visualize attribute data and combines block processing and ray detection techniques to solve the technical challenges of low rendering performance, poor dynamic update efficiency, and high interaction latency in large-scale river models. This improves the rendering performance and dynamic update capability of displaying large amounts of river information in Unreal Engine. The block update mechanism supports real-time color updates for models with millions of vertices, enhancing the user experience. Attached Figure Description

[0013] Figure 1 This is a schematic diagram of the workflow structure of a method for dynamically generating river models based on Unreal Engine proposed in this invention. Figure 2 This is a schematic diagram of the river geographic information data query process structure for a method for dynamically generating river models based on Unreal Engine proposed in this invention. Figure 3 This is a schematic diagram illustrating the process of dynamically updating and displaying data of a river model based on the Unreal Engine-based dynamic river model generation method proposed in this invention. Figure 4 This is a schematic diagram of the river model generation process structure of the dynamic river model generation method based on Unreal Engine proposed in this invention. Figure 5This is a logic diagram of ray detection and patch ID query for a dynamic generation method of river model based on Unreal Engine proposed in this invention. Figure 6 This is a schematic diagram of a single river segment structure for a dynamic river model generation method based on Unreal Engine proposed in this invention. Figure 7 This is a schematic diagram of a single river model for a dynamic river model generation method based on Unreal Engine proposed in this invention. Figure 8 This is a schematic diagram of a river example based on the Unreal Engine-based dynamic generation method for river models proposed in this invention. Figure 9 This invention proposes a method for dynamically generating river models based on Unreal Engine. Figure 8 The corresponding schematic diagram of the river channel model structure; Figure 10 This is a heat map of a dynamic generation method for river models based on Unreal Engine proposed in this invention. Detailed Implementation

[0014] Reference Figure 1-10 This invention proposes a method for dynamically generating river models based on Unreal Engine, comprising the following steps: S1: Obtain one or more river geographic information data and parse the river geographic information data to generate associated files. The associated files include vertex location files, face vertex index files, face-to-river ID mapping files, and river vertex set files.

[0015] In this embodiment, the river geographic information data includes the geometric coordinates of the river and the river-related attribute information; the geometric coordinates of the river are specifically a set of lines or line segments composed of longitude and latitude; the river-related attribute information includes, but is not limited to, river ID, name, flow rate, and water level.

[0016] In this embodiment, the river geographic information data is parsed to generate associated files, specifically including: Expand the line segments in the geometric coordinates of the river channel into patches to generate vertex position files and patch vertex index files; Establish a mapping relationship between the river ID in the attribute information associated with the face and the river, and record the vertex ID sequence contained in each river to obtain the face-to-river ID mapping file and the river vertex set file.

[0017] In this embodiment, the vertex position file is formatted as follows: Record the 3D coordinates of each vertex; the patch vertex index file is formatted as follows. Record the vertex indices of each face in counter-clockwise order; the face-to-river ID mapping file is formatted as follows. Establish a unique identifier linking each patch to its corresponding river channel; River vertices collection file in format Store the sequence of vertex IDs contained in each river channel; RiverID represents the number of each river channel; PointID represents the number of each vertex in the river channel model; and PlaneID represents the number of each face in the river channel model.

[0018] Specifically, we will output all the point and surface information of each river channel to a txt file. The content to be saved is as follows: Vertex location file PointsLocation: The location of each point number, in the following format: PointID, X, Y, Z, that is, the point number, the point's X value, the point's Y value, and the point's Z value.

[0019] The PlaneID2Point file contains the vertices of each triangle face, sorted counterclockwise, in the following format: PlaneID, Point0, Point1, Point2, which represents the number of each face, the number of point 0 on the face, the number of point 1 on the face, and the number of point 2 on the face.

[0020] The PlaneID2RiverID mapping file contains the river ID corresponding to each triangle face, in the following format: PlaneID, RiverID, the number of each face, and the river ID to which it belongs.

[0021] River ID2Points is a file containing the set of river vertices. It contains the vertices corresponding to each river ID, formatted as follows: RiverID, Point0, Point1, Point2, Point3... In this embodiment, the river channel geographic information data is the river channel's GeoJSON data, and the content of the GeoJSON data for each river channel is as follows: River channel 1, Point 1 [longitude, latitude], Point 2 [longitude, latitude], Point 3 [longitude, latitude].... S2: Using Unreal Engine, dynamically construct one or more river models corresponding to one or more river geographic information data based on vertex coordinate files and triangle vertex index files.

[0022] In this embodiment, Unreal Engine is used to dynamically construct a river model corresponding to a river's geographic information data based on vertex coordinate files and triangle vertex index files. Specifically, this includes: Using Unreal Engine UE, the PointID coordinates from the vertex position file of a single river are loaded into the vertex set of the model, and a face sequence is generated based on the Point0, Point1, and Point2 vertex indices corresponding to the PlaneID in the face vertex index file. Create a ColorArray for all vertices, with the initial color values ​​set to uniform default values; Load the PlaneID, RiverID from the facet mapping file and the vertex ID sequence from the river vertex mapping file into memory, and establish a chained index relationship between PlaneID, RiverID, and vertex ID sequence to obtain the corresponding river model.

[0023] Specifically, such as Figure 6 and Figure 7 As shown, each river channel has N points. Connecting these N points forms a line, representing the river channel. Extending the spline to both sides using the angle bisector method yields the river channel model. After extension, the line has 8 points and 6 triangular faces. Figure 7 The construction information for each triangle can be seen as follows: Triangle 0: 1, 0, 3; Triangle face #1: 3, 2, 5 And so on.

[0024] Each face consists of 3 vertices, and the face information is a counterclockwise sequence of the 3 vertices on the face.

[0025] In this embodiment, when dynamically constructing one or more river models corresponding to one or more river geographic information data, river models with more than a set threshold of vertices are divided into multiple sub-model blocks. Each sub-model block independently loads vertex location files and face vertex index files, and maintains independent PlaneID, RiverID, and vertex ID sequence index relationships. When updating the color array in blocks, each sub-model block is updated asynchronously at a preset time interval.

[0026] like Figure 8 and Figure 9 As shown, the model contains 10,484 rivers, and after extrusion, it has 20,967 points. If there are more points, the model can be divided into blocks. For example, if there are 500,000 points, it can be divided into 5 blocks, each with 100,000 points.

[0027] In this embodiment, the river model is dynamically created using the ProceduralMesh component of Unreal Engine.

[0028] S3: Output the overall model of a single river channel or merge multiple river channel models into a single overall model.

[0029] In this embodiment, it also includes: S4: Normalize the values ​​of flow and water level in the river channel associated attribute information to the range of 0-1, convert them to RGB values ​​through the heat map color mapping algorithm, and update the vertex color array of the corresponding river channel.

[0030] In this embodiment, the data storage content of the river channel is: river channel ID and corresponding value. The data for river channel 0 is set to 0.5, and the data for river channel 1 is set to 1. The data is as follows: RiverID,Value: 0,0.5, 1,1; If the data is not from 0 to 1, then we will normalize it according to the set range.

[0031] For example, river channel 0 has a data value of 100, and river channel 1 has a data value of 150. Based on the range of 100 to 200, mapping to 0 to 1, we substitute this value into the formula: Alpha = (Value-Min) / (Max-Min); the data for channel 0 is 0; the data for channel 1 is 0.5.

[0032] like Figure 10 As shown in the heatmap, different values ​​correspond to different color distributions. Similarly, color can be determined based on the magnitude of the data. From left to right, the distribution ranges from 0 to 1, with colors transitioning from blue to green to yellow to red. The transition values ​​are determined by the R value in the vertex color RGBA. When R is 0, the color is blue; when R is 1, the color is red; and so on. Therefore, we set the values ​​from 0 to 7 in the ColorArray data to 0.5, corresponding to yellow; and set the values ​​from 8 to 13 to 1, corresponding to red.

[0033] S5: Obtain the PlaneID of the face hit at the user's click location through ray detection, locate the target river vertex based on the PlaneID, RiverID, and vertex ID sequence index, modify the color value of the target river vertex and render and update it in real time.

[0034] Specifically, such as Figure 5 As shown, raycasting creates a ray from the starting point to the ending point and then returns the first model data triggered. A ray AB is created from the mouse position and direction, moving from A to B. When ray AB touches the blue model, it triggers the return of relevant data for the blue model and point C, including but not limited to: model name, face number of the hit point C, coordinates of the hit point C, and the normal to the hit point C.

[0035] In this embodiment, the model construction consumes minimal performance. The model generated by this invention only consumes performance during the model construction phase. After construction, rendering it into the scene consumes only GPU rendering capabilities, not CPU computation. Testing shows it can support rendering models with at least 200 million faces in a single scene while maintaining a frame rate of over 20 FPS. Similarly, GeometryScript solutions, which also update model data, can only update 10,000 vertex models at a time. This invention can support updating the color and recreating 100,000 vertex models simultaneously. If the model reaches 1 million vertices, it can be divided into ten models of 100,000 vertices each, and this invention can still be used for model display and data updates. Each update can be spaced 0.1 seconds apart, without affecting the interactive experience. This means it can simultaneously support updates of millions of vertex models. It supports dynamic updates of each river model's data; by querying the unique ID of each river, the corresponding vertices can be calculated. As long as the initial data is intact, data queries will not result in errors. Furthermore, the display style is controlled by the data of each vertex, so the color style can be updated by modifying the corresponding vertex color. The number of models is small. This invention constructs only one model from start to finish. If a model scheme is generated for each river channel, there will be multiple models in the scheme of one model per river channel. If there is 100,000 river channel data, there will be 100,000 models, resulting in high rendering performance overhead.

[0036] From mouse interaction to face recognition, then to querying river IDs, then to querying the vertices of that river, and finally to setting vertex colors, the entire process is complete, clear, and has a well-defined objective. This mouse-click face recognition solution supports models with up to 100,000 vertices, regardless of their size, making it an excellent solution for interactive recognition.

[0037] Reference Figure 1-10 This invention proposes a dynamic river model generation system based on Unreal Engine, comprising: The data parsing module is used to acquire one or more river geographic information data and parse the river geographic information data to generate associated files. The associated files include vertex location files, face vertex index files, face-to-river ID mapping files, and river vertex set files. The model building module is used to dynamically build one or more river models corresponding to one or more river geographic information data based on vertex coordinate files and triangle vertex index files using Unreal Engine. The model integration module is used to output a complete model of a single river channel or to merge multiple river channel models into a single model.

[0038] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for dynamically generating river models based on Unreal Engine, characterized in that, include: Obtain one or more river geographic information data, and parse the river geographic information data to generate an association file, which includes a vertex location file, a face vertex index file, a face-to-river ID mapping file, and a river vertex set file; Using Unreal Engine, one river model can be dynamically constructed based on vertex coordinate files and triangle vertex index files, or multiple river models can be constructed based on one river geographic information data. Output a complete model of a single river channel or merge multiple river channel models into a single model; Specifically, the dynamic construction of a river channel geographic information data corresponding to a river channel model includes: Load the PointID coordinates from the vertex position file of a single river channel into the vertex set of the model, and generate a patch sequence based on the Point0, Point1, and Point2 vertex indices corresponding to the PlaneID in the patch vertex index file. Create a ColorArray for all vertices, with the initial color values ​​set to uniform default values; Load the PlaneID, RiverID from the facet mapping file and the vertex ID sequence from the river vertex mapping file into memory, and establish a chain index relationship between PlaneID, RiverID and vertex ID sequence to obtain the corresponding river model; When dynamically constructing a river model corresponding to one river geographic information data or multiple river models corresponding to multiple river geographic information data, river models with more than a set threshold of vertices are divided into multiple sub-model blocks. Each sub-model block independently loads the vertex position file and the face vertex index file, and maintains an independent PlaneID, RiverID, and vertex ID sequence index relationship. When updating the color array in blocks, each sub-model block is updated asynchronously at a preset time interval. The values ​​of flow rate and water level in the river channel associated attribute information are normalized to the range of 0-1, converted into RGB values ​​through the heat map color mapping algorithm, and the vertex color array of the corresponding river channel is updated. The PlaneID of the face hit at the user's click location is obtained by ray detection. The target river vertex is located based on the PlaneID, RiverID, and vertex ID sequence index. The color value of the target river vertex is modified and rendered and updated in real time. The process involves dynamically creating a river model using the ProceduralMesh component of Unreal Engine; extending the spline to both sides using the angle bisector method to obtain the river model; and dividing the model into multiple models of 100,000 vertices each when it reaches 1 million vertices, with each update given an interval of 0.1 seconds.

2. The method for dynamically generating river models based on Unreal Engine according to claim 1, characterized in that, The river geographic information data includes the geometric coordinates of the river and the associated attribute information of the river; the geometric coordinates of the river are specifically a set of lines or line segments composed of longitude and latitude; the associated attribute information of the river includes river ID, name, flow rate, and water level.

3. The method for dynamically generating river models based on Unreal Engine according to claim 2, characterized in that, The process of parsing the river channel geographic information data to generate associated files specifically includes: Expand the line segments in the geometric coordinates of the river channel into patches to generate vertex position files and patch vertex index files; Establish a mapping relationship between the river ID in the attribute information associated with the face and the river, and record the vertex ID sequence contained in each river to obtain the face-to-river ID mapping file and the river vertex set file.

4. The method for dynamically generating river models based on Unreal Engine according to claim 2, characterized in that, The vertex position file records the three-dimensional coordinates of each vertex in a specified format; the face vertex index file records the counter-clockwise sorted index of the vertices of each face in a specified format; the face and river ID mapping file establishes a unique identifier association between the face and its corresponding river in a specified format. The river vertex set file stores the sequence of vertex IDs contained in each river channel in a specified format; RiverID represents the number of each river channel; PointID represents the number of each vertex in the river channel model; and PlaneID represents the number of each face in the river channel model.

5. A dynamic river model generation system based on Unreal Engine, characterized in that, include: The data parsing module is used to acquire one or more river geographic information data and parse the river geographic information data to generate an association file. The association file includes a vertex location file, a face vertex index file, a face-to-river ID mapping file, and a river vertex set file. The model building module is used by Unreal Engine to dynamically construct a river model corresponding to one river channel geographic information data or multiple river channel geographic information data corresponding to multiple river channel models, based on vertex coordinate files and triangle vertex index files. Specifically, dynamically constructing a river channel model corresponding to one river channel geographic information data includes: loading the PointID coordinates from the vertex position file of a single river channel into the vertex set of the model, and constructing the model based on the PlaneID corresponding to Point0, Point1, ..., Point2, ... from the triangle vertex index file. Point2 vertex indexing generates a sequence of facets; a ColorArray is created for all vertices, with initial color values ​​set to uniform default values; the PlaneID, RiverID, and vertex ID sequences from the river mapping file are loaded into memory, establishing a chained index relationship between PlaneID, RiverID, and vertex ID sequences to obtain the corresponding river model; when dynamically constructing a river model corresponding to one river geographic information data or multiple river models corresponding to multiple river geographic information data, river models with more than a set threshold of vertices are divided into multiple sub-model blocks; each sub-model block independently loads the vertex position file and the face vertex index file, and maintains an independent PlaneID, RiverID, and vertex ID sequence index. The system establishes relationships; when updating the color array in blocks, it asynchronously updates each sub-model block at preset time intervals; it normalizes the values ​​corresponding to flow and water level in the river channel associated attribute information to the range of 0-1, converts them to RGB values ​​through a heatmap color mapping algorithm, and updates the vertex color array of the corresponding river channel; it obtains the PlaneID of the face hit at the user's click position through ray detection, locates the target river channel vertex based on the PlaneID, RiverID, and vertex ID sequence index, modifies the color value of the target river channel vertex, and renders and updates it in real time; it dynamically creates the river channel model using the ProceduralMesh component of Unreal Engine; it extends the spline to both sides using the angle bisector method to obtain the river channel model; when the model reaches 1 million vertices, it is divided into multiple models with 100,000 vertices each, with each update given an interval of 0.1 seconds; The model integration module is used to output a complete model of a single river channel or to merge multiple river channel models into a single model.

Citation Information

Patent Citations

  • Three-dimensional oblique photography data processing method, device and equipment based on unreal engine

    CN113900797A

  • Method for quickly rendering massive grid point three-dimensional model thermodynamic diagram blocks

    CN117745910A