Three-dimensional scene program modeling method and device

Through the component-based node interactive PBR three-dimensional scene programmatic modeling method, the problem of art resource management and modeling efficiency in large-scale three-dimensional scenes is solved, and efficient, flexible and high-quality three-dimensional modeling and rendering effects are achieved.

CN118967948BActive Publication Date: 2025-02-18SUZHOU IND PARK SURVEYING MAPPING & GEOINFORMATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411436811.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-02-18
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

When building large-scale three-dimensional scenarios such as parks or cities, it is difficult for existing technologies to improve the efficiency and flexibility of urban modeling while ensuring the quality and reality of models, and achieve orderly management of massive art resources.

Method used

Using a component-based node interactive PBR three-dimensional scene programmatic modeling method, by obtaining basic geographic data, node-based editors, including simple change generators and complex change generators, to generate programmatic roads and building models. And the programmatic generation of the model is realized through parameter nodes and operator nodes.

Benefits of technology

It realizes efficient memory management, optimizes production processes, maintains high-quality rendering effects, unifies visual style, and improves the efficiency and quality of art creation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967948B_ABST
    Figure CN118967948B_ABST
Patent Text Reader

Abstract

The present application relates to a method and device for programmatic modeling of a three-dimensional scene, and belongs to the technical field of programmatic modeling. The method comprises: obtaining basic geographic data corresponding to a three-dimensional art scene to be modeled; making a node-based editor in three-dimensional software, the editor comprising: a simple change generator and a complex change generator; pre-building parameter nodes in the three-dimensional software; pre-building operator parameter nodes in the three-dimensional software; making component models of roads and component models of buildings in the three-dimensional software, the component models being established according to preset modeling rules; using a simple change generator, generating the required programmatic road model based on the component model of the road and storing it in a library; using a complex change generator, generating the required programmatic building model based on the component model of the building and storing it in a library; it has significant advantages in improving production efficiency, reducing memory usage, ensuring rendering quality, and maintaining visual consistency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a method and device for programmatic modeling of three-dimensional scenes, and belongs to the technical field of programmatic modeling. Background Art

[0002] When constructing a 3D space involving large-scale scenes, such as a park or a city, it is crucial to form an efficient, process-based, and modular 3D scene automated modeling method. This process must not only ensure the integrity of scene elements, but also comprehensively consider key factors such as resource optimization, rendering efficiency, and the physical complexity of the scene. In this context, developing an automated modeling method process that can take into account these practical needs is of great significance to improving the overall efficiency and quality of scene modeling.

[0003] Traditional procedural urban modeling methods have some limitations and challenges. Although purely hand-made models can achieve high-quality results, they are very time-consuming and labor-intensive; and although procedural generation methods are more efficient, the generated models are often not very interactive, lack a reasonable structure, and do not have physically accurate physically based rendering (PBR) material properties. In addition, since the urban environment contains a large number of art resources, how to effectively classify, manage and plan these resources is also an urgent problem to be solved. Therefore, how to improve the efficiency and flexibility of urban modeling while ensuring the quality and realism of the model, and how to achieve orderly management of massive art resources are important challenges facing the field of procedural urban modeling. Summary of the invention

[0004] This application provides a three-dimensional scene programmatic modeling method, device and storage medium, which can solve the challenges faced by art resource production and management in large-scale three-dimensional environments (such as parks or cities), that is, it can solve the technical problem of how to improve the efficiency and flexibility of urban modeling while ensuring the quality and realism of the model, and realize the orderly management of massive art resources. This application provides the following technical solutions:

[0005] In a first aspect, a three-dimensional scene programmatic modeling method is provided, the method comprising:

[0006] Obtain basic geographic data corresponding to the 3D art scene to be modeled;

[0007] A node-based editor is made in the three-dimensional software. The editor is generated based on a data module. The data module is used to make a combination change of the model and material of the component according to a preset rule; the editor includes: a simple change generator and a complex change generator; the road change generator panel in the simple change generator includes: a spline node, a component model node, a terrain adaptation node, a default component node, a corner component node, a start component node, and an end component node; the spline node has the function of reading the attributes of the spline in the basic geographic data, and the spline node includes the name, identifier, control point, degree, Weight, node type and closure attributes; the component model node has the function of reading the geometry, material, transformation, and animation attributes of the component model in the basic geographic data and deforming and adapting the read attributes; the terrain adaptation node has the function of reading the three-dimensional data on any model in the scene, combining with the component model node, so that the component model is adaptively placed on the terrain model, and providing placement parameters; the default component node, corner component node, start component node and end component node are used to access the component model data, adjust the model parameters of the component model, and interact with the variation generator theme function;

[0008] In the three-dimensional software, parameter nodes are pre-constructed; the parameter nodes are respectively constant value parameter nodes, digital value parameter nodes, random value parameter nodes, value list nodes, and derived parameter nodes, and the parameter nodes are used to complete the programmatic generation of the three-dimensional model in conjunction with the editor;

[0009] In the three-dimensional software, operator parameter nodes are pre-constructed; the operator parameter nodes include: arithmetic parameter nodes, conditional parameter nodes, mirror parameter nodes, three-dimensional attribute transformation parameter nodes, random parameter nodes, sorting parameter nodes, and material ball parameter nodes. The operator parameter nodes can convert or modify the editor, component model nodes, and parameter nodes;

[0010] In the three-dimensional software, a component model of a road and a component model of a building are produced, wherein the component models are established according to a preset modeling rule;

[0011] Using a simple variation generator, a required procedural road model is generated based on the component model of the road and stored in a library;

[0012] Using a complex variation generator, the required procedural building model is generated based on the component models of the building and stored in the library.

[0013] Optionally, the obtaining of basic geographic data corresponding to the three-dimensional art scene to be modeled includes:

[0014] According to the scene condition of the three-dimensional art scene, obtaining original geographic data corresponding to the three-dimensional art scene;

[0015] Processing the abnormal data in the original geographic data, and classifying and storing the processed data according to the categories corresponding to the processed data;

[0016] The processed data is converted into splines, and the splines are classified and stored according to the types corresponding to the splines to obtain the basic geographic data.

[0017] Optionally, the process of making the simple change generator includes:

[0018] Make a road variation generator panel;

[0019] Construct the main functions of the road change generator; the main functions of the road change generator include an attribute function panel and a rule function panel; the attribute function panel is used to control the basic changes in the component model generated by the road change generator; the functions of the attribute function panel include: setting the size of the component model based on the positive and negative directions of the spline, setting the offset value of the component model based on the three axes of the world coordinate system xyz, setting the component model mirror, setting the flip model based on the three axes of xyz, and setting the offset value of the model UV based on the three axes of xyz; the rule function panel is used to control the changes of the default component nodes and the corner component nodes by the road change generator, and the functions of the rule function panel include: the generation method of the default component, the generation method includes tiling, stretching, adaptive and generation by quantity; the generation method of the corner component, the generation method includes only ordinary intersection generation, only Bezier corner generation and full generation; the chamfer generation method of the component generation turning point, including the chamfer angle value, whether the chamfer component is subdivided by the folding edge model and the chamfer offset value.

[0020] Optionally, the construction process of the component model node includes:

[0021] Constructing a component model deformation general attribute node, wherein the component model deformation general attribute node includes modifying the naming, spacing, size and alignment of the component model;

[0022] Constructing a component model deformation general attribute node deformation node, wherein the component model deformation general attribute node includes a function of modifying the form of the component model combination, wherein the form of modifying the component model combination includes automatic subdivision of bending deformation arrangement at the component joint, deformation arrangement perpendicular to the ground, and deformation arrangement perpendicular to the sky;

[0023] A component model UV deformation node is constructed, wherein the component model UV deformation node includes UV tile size modification and UV mapping functions based on the world coordinate system.

[0024] Optionally, the process of making the complex change generator includes:

[0025] Creating a complex change generator panel, wherein the complex change generator panel includes a spline import node, a terrain model import node, and a building model import node;

[0026] Construct the main functions of the complex change generator, which include: a special attribute function panel and a complex change generator rule function panel. The special attribute function panel is used to control the basic changes generated by the complex change generator for the component model. The functions of the special attribute function panel include setting the size of the component model based on the positive and negative directions of the spline, setting the component model to determine whether the Y axis or Z axis in the world coordinate system is the upward direction, setting the component model based on the offset value of the three axes of xyz, setting the component model mirror, setting the model flip based on the three axes of xyz, and setting the model UV offset value based on the three axes of xyz; the complex change generator rule function panel is used to control the generation of buildings. The functions of the complex change generator rule function panel include: controlling the floor height of the building; the generation method of the default components of each floor, the generation method of the default components of each floor calculates the adaptation of the Y-axis direction; the generation method of the corner component model of each floor; whether the component model style of each floor is random and the random seed value.

[0027] Optionally, the pre-built parameter node includes:

[0028] Construct a constant parameter node, wherein the constant parameter node is used to set an integer, a floating point number, a percentage or a string, the value set by the constant parameter node is a fixed value, and the constant parameter node can be communicatively connected to the arithmetic parameter node and / or communicatively connected to a certain qualified value of a simple change generator or a complex change generator;

[0029] Constructing a digital value parameter node, wherein the digital value node is used to set an integer, a floating point number, a percentage or a string, the value set by the digital value parameter node is a digital value within a certain range, and the digital value node can be communicatively connected to the arithmetic parameter node and / or communicatively connected to a certain qualified value of a simple change generator or a complex change generator;

[0030] Constructing a random value parameter node, wherein the random value parameter node is used to set an integer, a floating point number or a percentage, wherein the value set by the random value parameter node is a random value taken within a value range, and the random value parameter node can be communicatively connected to the arithmetic parameter node, and / or communicatively connected to a certain qualified value of a simple change generator or a complex change generator;

[0031] Construct a value list node, wherein the value list node is used to store a set of integers, floating point numbers, percentages or strings, and perform operations through a conditional export parameter node;

[0032] Construct an export parameter node, which is used to connect the input node to the simple change generator, the complex change generator, the component model node in the road change generator panel of the simple change generator, or the numerical value of the operator parameter node, and use the parameter node type to establish a complex program relationship; the input node includes the constant value parameter node, the digital value parameter node, the random value parameter node, and the value list node.

[0033] Optionally, in the three-dimensional software, the pre-constructed operator parameter node comprises:

[0034] Constructing the arithmetic parameter node, wherein the arithmetic parameter node is used to perform mathematical operations on at least two parameter nodes;

[0035] Constructing the conditional parameter node, the conditional parameter node includes the following functions: taking whether the overall length of the spline or the length of the spline between two corner points is greater than or less than a preset value as a condition, and outputting this condition as the final result; dividing a spline into two sections according to the input percentage value, wherein one area outputs 1 and the other area outputs 2; outputting the attributes of the currently retrieved spline;

[0036] Constructing the mirror parameter node, the mirror parameter node can be connected to the component model node in the road change generator panel of the simple change generator or connected to the condition parameter node, and outputting the component model output by the component model node in any axial direction of the xyz axis in the world coordinate system;

[0037] Constructing the three-dimensional attribute transformation parameter node, wherein the three-dimensional attribute transformation parameter node can adjust the size, alignment, deformation, or transformation parameter of the component model node or the condition parameter node connected thereto;

[0038] Constructing the random parameter node, the random parameter node is used to randomly return a parameter from the component model parameters input to the random parameter node, and the random probability will be determined according to the filled probability;

[0039] Constructing the sorting parameter node, the sorting parameter node arranges the component model nodes or condition parameter nodes input to the random parameter node one by one according to a preset sorting method, and the arrangement method interacts with the component model arrangement in the simple change generator or complex change generator function, so that the component model arrangement will be adaptively scaled to meet the sorting condition;

[0040] The material ball parameter node is constructed, and the material ball parameter node can reallocate the material ball mounted by the model identifier of the input component model as a unique material ball, or as a randomly selected one of multiple material balls.

[0041] Optionally, the component model of the road includes a curb component model, a road marking component model, and a street lamp component model; the using a simple variation generator to generate a required programmed road model based on the component model of the road and store it in a library includes:

[0042] Converting the model data of the component model of the road to be modeled into spline data and converting the spline type in the three-dimensional software, and mounting the converted spline into the spline node;

[0043] In the curb generator, the curb component model is mounted on the default component node and the corner component node, and the curb component model is adaptively subdivided and connected at the corner point using an adaptive mode;

[0044] In the three-dimensional software, a new 1*1m patch is created, and the material file of the road surface is mounted on the patch; in the road surface generator, the patch is used as the default component node and the corner component node of the road surface generator, and the adaptive mode is used; a digital value parameter node is created, and the actual width value of the road surface is filled into the digital value parameter node, and the digital value parameter node and the default component node are combined with the corner component node, so that the width of the road surface can be changed in real time; then the UV size value of the UV module of the road surface generator is exported as a parameter, combined with the digital value parameter, so that the UV of the road surface is always scaled according to the normal ratio;

[0045] In the streetlight generator, the streetlight component model is mounted on the default component node, and the model generation method of the streetlight generator is modified to specify that a streetlight model is generated after a preset distance;

[0046] In the three-dimensional software, a new 1*1m surface is created, and the material file of the road sign is mounted on the surface; in the road sign generator, the surface is used as the default component node and corner component node of the road surface generator, and the adaptive mode is used; a value list is created, and the value sets are established for the type material identifiers of the corresponding road sign, and the road sign type is selected; then the UV size value of the UV module of the road sign generator is exported as a parameter, and combined with the digital value parameter, so that the UV of the road sign is always scaled according to the normal ratio;

[0047] The completed road generator is packaged, and all parameters that need to be modified are released through the export parameter node. When using, parameter adjustment or content replacement can be performed directly in the external panel.

[0048] Optionally, the component model of the building includes a component model of a residential building, and the component model of the residential building includes component models of an overhead floor on the first floor, an intermediate floor, a top floor, a roof ground, and roof equipment of the residential building; accordingly, the use of a complex variation generator to generate the required procedural building model based on the component model of the building and store it in a library includes:

[0049] The model data of the residential building component model to be modeled is converted into spline data in the three-dimensional software, the splines of the same type are set as a group, and the spline type is converted, and the converted spline is mounted to the spline node;

[0050] In the complex generator, for the component models of the first floor overhead, the middle floor, and the top floor of the residential building in the component model of the residential building, when making the front of the residential building, the attribute alignment of the component model is changed to the vertex alignment, and the sorting parameter node is used to sort the component model according to the actual style, and the required operator parameter node is connected and selected; when making the side of the residential building, it is sorted according to the actual style, and the component model is connected to the required operator parameter node, and the required operator parameter node is set to use the front residential building component when the distance between the two end points of the spline is the first end point distance, and the side residential building component is used when it is the second end point distance, and it is mounted on the default component node of the component model; the column model is mounted on the corner component model of the component model, and the column model attribute is set to be adaptive;

[0051] In the 3D software, create a new 1*1m patch and mount the roof and ground material file on the patch; in the roof and ground generator, use the patch as the default component node and corner component node of the roof and ground generator, and use the adaptive mode to cut its area according to the spline; export the UV size value of the UV module of the roof and ground generator as a parameter, and combine it with the digital value parameter to ensure that the road surface UV is always scaled according to the normal ratio;

[0052] Create a random parameter node, mount the rooftop device model on the random parameter node, and control the distribution ratio of the rooftop devices by controlling the value of the random parameter node;

[0053] Package the completed building generator, release all the parameters that need to be modified through the export parameter node, and adjust the parameters or replace the content directly in the external panel when using it.

[0054] In a second aspect, a three-dimensional scene programmatic modeling device is provided, the device comprising a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement the three-dimensional scene programmatic modeling method described in the first aspect.

[0055] In a third aspect, a computer-readable storage medium is provided, wherein a program is stored in the storage medium, and the program is loaded and executed by the processor to implement the three-dimensional scene programmatic modeling method described in the first aspect.

[0056] The beneficial effects of this application include:

[0057] (1) Efficient memory management: Memory management is crucial when rendering large-scale 3D environments. This method uses procedural modeling technology to allow multiple models and material maps to be instantiated, thereby significantly reducing memory usage and improving memory utilization efficiency.

[0058] (2) Optimizing the production process: This method provides a set of efficient resource management strategies, which can significantly shorten the production cycle and improve production efficiency through reasonable classification, reuse and procedural processing.

[0059] (3) Maintaining high-quality rendering: While optimizing memory usage and improving production efficiency, this method does not sacrifice rendering quality. By adopting PBR rendering technology, combined with high-quality material maps and models, the generated 3D scene is ensured to have realistic visual effects and detailed performance.

[0060] (4) Unified visual style: For large-scale 3D environments, maintaining the consistency of the overall visual style is a major challenge. This method introduces a node-based interactive design mechanism, which achieves seamless connection and style unification between different components through preset parameters and rules, providing a more coordinated and immersive user experience.

[0061] (5) Friendly to art staff: It provides artists with a powerful toolset and workflow to help them create large-scale 3D scenes more efficiently, flexibly and with higher quality. It also reduces the difficulty of resource management and optimization, and improves the overall efficiency and quality of art creation.

[0062] (6) Wide range of applications: This patented method is not only applicable to large-scale three-dimensional art environments such as park cities, but also to small-scale art environments such as rail transit, railways, and streets.

[0063] In summary, this method provides a comprehensive solution that uses procedural modeling, PBR rendering, node interaction and other technologies to effectively solve the problem of art resource management in large-scale 3D environments. This method has significant advantages in improving production efficiency, reducing memory usage, ensuring rendering quality and maintaining visual consistency, and provides important support for its wide application in various 3D art fields.

[0064] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 is a flow chart of a three-dimensional scene programmatic modeling method provided by an embodiment of the present application;

[0066] Figure 2 is a block diagram of a three-dimensional scene programmatic modeling device provided by an embodiment of the present application;

[0067] Figure 3 It is a block diagram of a three-dimensional scene programmatic modeling device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0068] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but are not intended to limit the scope of the present application.

[0069] In order to solve the limitations of traditional procedural city modeling methods, this application proposes a three-dimensional scene procedural modeling method, which is a component-based node interactive PBR three-dimensional scene procedural modeling method. This method combines component models through preset nodes to generate a procedural model with PBR material characteristics. This method allows multiple component models to be flexibly combined with preset parameter sets, which can not only effectively reduce memory usage and achieve efficient management of art resources, but also maintain high-quality rendering effects.

[0070] However, to achieve the above goals, a series of problems need to be solved, including how to create a procedural model generator, how to preset parameter sets, and how to formulate component model production standards. Creating a procedural model generator requires the design of reasonable algorithms and data structures to support efficient and flexible model generation; preset parameter sets need to take into account the needs of different scenes and styles and provide rich and customizable options; formulating component model production standards requires taking into account the reusability and scalability of art resources while ensuring model quality and performance.

[0071] Therefore, the component-based node interactive PBR 3D scene procedural modeling method proposed in this application is an important and challenging research task. This requires comprehensive consideration of multiple aspects such as algorithm design, parameter optimization, standard formulation, and continuous iteration and improvement in practice, in order to achieve the goal of efficient, high-quality, and scalable procedural urban modeling.

[0072] Figure 1This is a flow chart of a three-dimensional scene program modeling method provided by an embodiment of the present application. The method includes at least the following steps:

[0073] Step 101, obtaining basic geographic data corresponding to the 3D art scene to be modeled.

[0074] Obtaining basic geographic data corresponding to the 3D art scene to be modeled includes steps 1011-1013:

[0075] Step 1011, according to the scene condition of the 3D art scene, obtain the original geographic data corresponding to the 3D art scene.

[0076] Among them, the original geographic data includes relevant data such as roads, buildings, water systems, green spaces, etc. in the three-dimensional art scene. The relevant data can be image data, or a combination of image data and other data. This embodiment does not limit the implementation method of the original geographic data.

[0077] Step 1012, process the abnormal data in the original geographic data, and classify and store the processed data according to the types corresponding to the processed data.

[0078] Among them, abnormal data processing includes but is not limited to: deleting duplicate data, deleting data that does not match the actual scenario, etc. This embodiment does not limit the method of abnormal data processing.

[0079] The types of processed data include, but are not limited to: buildings, roads, ground, etc. This embodiment does not limit the classification method of the types.

[0080] Step 1013, converting the processed data into splines, and classifying and storing the splines according to the types corresponding to the splines, to obtain basic geographic data.

[0081] Convert the processed data into splines, including: converting road data into Bezier splines, converting forks into Bezier corner points; converting building data into closed splines, etc.

[0082] The types of splines can be: road splines can be divided into highways, expressways, viaducts, internal roads, etc.; building splines can be divided into residential buildings, office buildings, factories, schools, etc. This embodiment does not limit the classification method of the spline conditions.

[0083] Step 102, making a node-based editor in the three-dimensional software, the editor is generated based on the data module, the data module is used to make a combination change of the model and material of the component according to the preset rules; the editor includes: a simple change generator and a complex change generator; the road change generator panel in the simple change generator includes: a spline node, a component model node, a terrain adaptation node, a default component node, a corner component node, a start component node, and an end component node; the spline node has the function of reading the attributes of the spline in the basic geographic data, the spline node includes the name, identifier, control point, degree, weight, node type and closure attribute of the spline; the component model node has the function of reading the geometry, material, transformation, and animation attributes of the component model in the basic geographic data and performing deformation adaptation on the read attributes.

[0084] Making a node-based editor, including steps 1021-1022:

[0085] Step 1021, making a simple change generator, includes the following steps:

[0086] Step 10211, making a road change generator panel, specifically including steps 102111-102114:

[0087] Step 102111, constructing a spline node;

[0088] Step 102112, constructing a component model node, including steps 1021121 to 1021123:

[0089] Step 1021121, constructing a component model deformation general attribute node, wherein the component model deformation general attribute node includes modifying the naming, spacing, size, and alignment of the component model;

[0090] Step 1021122, constructing a component model deformation general attribute node deformation node, the component model deformation general attribute node includes a function of modifying the form of component model combination, the form of modifying the component model combination includes automatic subdivision of bending deformation arrangement at the component joint, deformation arrangement perpendicular to the ground, and deformation arrangement perpendicular to the sky;

[0091] Step 1021123, constructing a component model UV deformation node, the component model UV deformation node includes UV tile size modification and UV mapping function based on the world coordinate system;

[0092] Step 102113, construct a terrain adaptation node, which has the function of reading the three-dimensional data on any model in the scene, combining with the component model node, so that the component node model is adaptively placed on the terrain model, and providing placement parameters.

[0093] The placement parameters include but are not limited to offset values, etc. This embodiment does not limit the content of the placement parameters.

[0094] Step 102114, construct the default component node, corner component node, start component node and end component node to access the component model data, adjust the model parameters of the component model, and interact with the variation generator theme function.

[0095] The model parameters include, but are not limited to, model naming, size, alignment, deformation, transformation and other parameters. This embodiment does not limit the content of the model parameters.

[0096] Step 1022, construct the main function of the road change generator; the main function of the road change generator includes an attribute function panel and a rule function panel, including steps 10221-10222.

[0097] Step 10221, construct an attribute function panel, which is used to control the basic changes generated by the road change generator for the component model. The functions of the attribute function panel include: setting the size of the component model based on the positive and negative directions of the spline, setting the offset value of the component model based on the three axes of the world coordinate system xyz, setting the component model mirror, setting the flip model based on the three axes of xyz, and setting the offset value of the model UV based on the three axes of xyz.

[0098] Step 10222: construct a rule function panel, which is used to control the changes of the road change generator to the default component nodes and corner component nodes. The functions of the rule function panel include:

[0099] 1. The default component generation method, including tiling (repeatedly placing model components according to the length of the spline), stretching (enlarging and stretching model components in the x direction according to the length of the spline), adaptive (a combination of tiling and stretching, repeatedly placing and stretching model components within a threshold condition, ensuring that the component model occupies the spline during the generation process and will not be over-stretched) and generating by quantity (a combination of tiling and stretching by quantity, repeatedly placing and stretching model components according to the set quantity);

[0100] 2. The generation method of corner point components, including only ordinary intersection point generation, only Bezier corner point generation and all generation;

[0101] 3. The chamfer generation method at the turning point of the component generation, including the chamfer angle value, whether the chamfered component is subdivided into models according to the folded edges, and the chamfer offset value.

[0102] Step 1022, making a complex change generator, including steps 10221-10222:

[0103] Step 10221, making a complex change generator panel, the complex change generator panel includes a spline import node, a terrain model import node and a building model import node. Taking the building model import node as a residential building import node as an example, it specifically includes steps 102211-step 102217:

[0104] Step 102211, construct a spline import node to receive spline data, so as to generate a building model according to the spline data. The spline import node can update and load the spline data in real time, and name and annotate the spline data;

[0105] Step 102212: Build a terrain model import node to adapt the building height to the terrain

[0106] Step 102213, build the import node of the first floor overhead layer of the building. The import of the first floor overhead layer of the building consists of two sub-nodes, namely the overhead layer default component node, the overhead layer vertex node, and the composition. These nodes can access the component model data and adjust the naming, size, alignment, deformation, transformation and other parameters of the component model.

[0107] Step 102214, build the building middle floor import node, the building middle floor import node is composed of two sub-nodes, the two sub-nodes are the middle floor default component node, the middle floor vertex node, and the composition. These nodes can access the component model data and adjust the naming, size, alignment, deformation, transformation and other parameters of the component model.

[0108] Step 102215, build the building top floor import node, which is composed of two sub-nodes, namely the top floor default component node, the top floor vertex node, and the composition. These nodes can access the component model data and adjust the naming, size, alignment, deformation, transformation and other parameters of the component model.

[0109] Step 102216, build a building roof import node. The building roof import node consists of two sub-nodes, which are the top-level default component node, the top-level vertex node, and the composition. These nodes can access component model data and adjust the naming, size, alignment, deformation, transformation and other parameters of the component model.

[0110] Step 102217, build a building roof equipment import node, which can access component model data and adjust the naming, size, alignment, deformation, transformation and other parameters of the component model.

[0111] Step 10222, construct the main function of the complex change generator, which includes: a special attribute function panel and a complex change generator rule function panel, specifically including steps 102221-102222:

[0112] Step 102221, based on the main functions of simple change generators such as roads, a special attribute function panel is provided for the complex building change generator, and the special attribute function panel is used to control the basic changes generated by the complex change generator for the component model. The functions of the special attribute function panel include: setting the size of the component model based on the positive and negative directions of the spline, setting the component model to determine whether the Y axis or Z axis in the world coordinate system is the upward direction, setting the offset value of the component model based on the three axes of xyz, setting the component model mirror, setting the model flip based on the three axes of xyz, and setting the offset value of the model UV based on the three axes of xyz;

[0113] Step 102222: construct a complex variation generator rule function panel, which is used to control building generation. The functions of the complex variation generator rule function panel include:

[0114] 1. Control the building's floor height [by unit value (1m per unit, with decimal points to two digits) or by the number of floors (top floor + middle floor + first floor overhead floor)];

[0115] 2. The generation method of the default components of each floor. The generation method of the default components of each floor calculates the adaptation in the Y-axis (upward axis) direction;

[0116] 3. The generation method of the corner point component model of each floor; based on the simple change generator, the generation method optimizes the additional connection of other component models in the three axes of xyz, making the connection of floor structure points more reasonable;

[0117] 4. Whether the model style of each floor component is random and the random seed value (randomized for the entire floor).

[0118] Step 103, pre-construct parameter nodes in the three-dimensional software; the parameter nodes are constant value parameter nodes, digital value parameter nodes, random value parameter nodes, value list nodes, and export parameter nodes. The parameter nodes are used in conjunction with the editor to complete the programmatic generation of the three-dimensional model.

[0119] Pre-constructing parameter nodes, including steps 1031 to 1035:

[0120] Step 1031, construct a constant parameter node, the constant parameter node is used to set an integer, floating point number, percentage or string, the value set by the constant parameter node is a fixed value, and the constant parameter node can be communicatively connected to an arithmetic parameter node, and / or communicatively connected to a certain qualified value of a simple change generator or a complex change generator;

[0121] Step 1032, construct a digital value parameter node, the digital value node is used to set an integer, floating point number, percentage or string, the value set by the digital value parameter node is a digital value within a certain range, the digital value node can be communicatively connected to the arithmetic parameter node, and / or communicatively connected to a certain qualified value of the simple change generator or the complex change generator;

[0122] Step 1033, constructing a random value parameter node, the random value parameter node is used to set an integer, a floating point number or a percentage, the value set by the random value parameter node is a random value within a value range (such as 0 to 100), the random value parameter node can be communicatively connected to the arithmetic parameter node, and / or communicatively connected to a certain qualified value of the simple change generator or the complex change generator;

[0123] Step 1034, construct a value list node, the value list node is used to store a set of integers, floating point numbers, percentages or strings, and perform calculations through conditional export parameter nodes;

[0124] Step 1035, construct an export parameter node, which is used to connect the input node to the simple change generator, the complex change generator, the component model node in the road change generator panel of the simple change generator, or the value of the operator parameter node, and use the parameter node type to establish complex program relationships.

[0125] The input nodes include constant value parameter nodes, digital value parameter nodes, random value parameter nodes, and value list nodes.

[0126] Step 104, pre-constructing operator parameter nodes in the three-dimensional software; the operator parameter nodes include: arithmetic parameter nodes, conditional parameter nodes, mirror parameter nodes, three-dimensional attribute transformation parameter nodes, random parameter nodes, sorting parameter nodes, material ball parameter nodes, and the operator parameter nodes can convert or modify the editor, component model nodes and parameter nodes.

[0127] Pre-build operator parameter node, including steps 1041-1047:

[0128] Step 1041, constructing an arithmetic parameter node, where the arithmetic parameter node is used to perform mathematical operations on at least two parameter nodes; for example, performing common mathematical operations such as addition, subtraction, multiplication and division;

[0129] Step 1042: construct a conditional parameter node, which includes the following functions:

[0130] 1. Whether the overall length of the spline or the length of the spline between two corner points is greater than or less than the preset value is used as a condition, and this condition is output as the final result;

[0131] 2. Divide a spline into two sections according to the input percentage value, one area outputs 1 and the other area outputs 2; for example, if the percentage value is 40%, then the 40% area of ​​the spline outputs 1 and the 60% area outputs 2;

[0132] 3. Output the properties of the currently retrieved spline; for example, if the spline is a Bezier curve, output 1; if not, output 2.

[0133] Step 1043, constructing a mirror parameter node, which can be connected to the component model node in the road change generator panel of the simple change generator or the condition parameter node, and outputs the component model output by the component model node in a mirror image along any axis of the xyz axis in the world coordinate system;

[0134] Step 1044, constructing a three-dimensional attribute transformation parameter node, which can adjust parameters such as size, alignment, deformation, or transformation of the connected component model node or condition parameter node;

[0135] Step 1045, construct a random parameter node, which is used to randomly return a parameter from the component model parameters input to the random parameter node, and the random probability will be determined according to the filled probability;

[0136] Step 1046, constructing a sorting parameter node, the sorting parameter node arranges the component model nodes or condition parameter nodes input to the random parameter node one by one according to a preset sorting method, the arrangement method interacts with the component model arrangement in the simple change generator or complex change generator function, so that the component model arrangement will be adaptively scaled to meet the sorting condition;

[0137] Step 1047, constructing a material ball parameter node, which can reallocate the material ball mounted by the model identifier (such as model ID) of the input component model as a unique material ball, or as a randomly selected one of multiple material balls.

[0138] Step 105, in the three-dimensional software, a component model of the road and a component model of the building are made, and the component models are established according to the preset modeling rules.

[0139] In this embodiment, the component model needs to be modeled according to strict modeling rules, which is convenient for process implementation and can also ensure the coordination and consistency of the artistic atmosphere of the entire scene environment to a greater extent.

[0140] In one example, making a component model of a road and a component model of a building includes steps 1051 and 1052:

[0141] Step 1051, making a road model, including steps 10511 to 10514:

[0142] Step 10511, make a high-poly model of the curb and topologically produce a low-poly model, bake the normal and ambient occlusion maps in the Marmoset software, import the low-poly model of the curb as well as the normal and ambient occlusion maps into the texture making software, make the curb material based on the real curb style, and finally output the color, normal, roughness, metalness and ambient occlusion maps, and mount them on the Lambert material ball of the curb model, export them to the Fbx format, and name them SM_Road_curbstone_01. The maps are named T_Road_ curbstone_01_Base (color map), T_Road_curbstone_01_Normal (normal map), T_Road_ curbstone_01_ Roughness (roughness map), T_Road_curbstone_01_ metal (metalness map), and T_Road_ curbstone_01_ AO (ambient occlusion map) according to their characteristics.

[0143] Step 10512, use the real road material obtained by photogrammetry or the material map manually created in the material map making software to generate color, normal, roughness, metalness and ambient occlusion maps, ensure that its resolution is a power of two, and the map is named according to T_Road_Surface_01_XXXX (map type)

[0144] Step 10513, create a street lamp model in 3D software, and create its material map in material map creation software, output color, normal, roughness, metalness and ambient occlusion maps, and mount them on the phong material ball of the street lamp model, export them to Fbx format, and name them SM_Road_Lighting_01. The map is named according to T_Road_Lighting_01_XXXX (map type)

[0145] Step 10514: In the 3D software, create Alpha maps of road markings, including but not limited to solid white lines, dashed white lines, solid yellow lines, dashed yellow lines, double solid white lines, double solid yellow lines, guide arrows, crosswalks, and stop lines. Export these maps as color maps, and name the maps in order from T_Line_01.

[0146] Step 1052, making a residential building model, including steps 10521-10522:

[0147] Step 10521, make a model of the overhead component of the first floor of the residential building. In the 3D software, with the z-axis as the upward direction, make one set of entrance door component models, two sets of balcony component models, two sets of wall component models, and one set of column model. The floor height is made according to 3m, and make textures in the material mapping software, output color, normal, roughness, metalness and ambient occlusion maps, and mount them on each phong material ball of the overhead model of the residential building, and export it to Fbx format. The overhead model of the residential building is named SM_BD_ZZ_Ground_XXX (component type)_01 (and so on), and the texture is named according to T_BD_ZZ_Ground_XXX (component type)_01 (and so on)_XXXX (texture type).

[0148] Step 10522, make a model of the middle layer component of the residential building. In the 3D software, with the z-axis as the upward direction, make three sets of balcony component models, two sets of wall component models, and one set of column model. The floor height is made according to 3m, and make textures in the material mapping software, output color, normal, roughness, metalness and ambient occlusion maps, and mount them on each phong material ball of the residential building overhead layer model, and export it to Fbx format. The residential building overhead layer model is named SM_BD_ZZ_Default_XXX (component type)_01 (and so on), and the texture is named according to T_BD_ZZ_Default_XXX(component type)_01 (and so on)_XXXX (texture type).

[0149] Step 10523, make the top floor component model of the residential building. In the 3D software, with the z-axis as the upward direction, make three sets of balcony component models, two sets of wall component models, and one set of column models. The above models should be extended upward on the basis of the main body to increase the modeling of the parapet. The floor height is made according to 3m, and the height of the parapet is made according to the actual situation. Make textures in the material mapping software, output color, normal, roughness, metalness and ambient occlusion maps, and mount them on each phong material ball of the residential building overhead layer model, and export them to Fbx format. The residential building overhead layer model is named SM_BD_ZZ_Top_XXX (component type)_01 (and so on), and the texture is named according to T_BD_ZZ_ Top _XXX (component type)_01 (and so on)_XXXX (texture type).

[0150] Step 10524, make the roof and ground component texture of the residential building. Make the roof and ground texture in the material texture making software. Note that the texture pixels should be powers of two. Output the color, normal, roughness, metalness and ambient occlusion texture. The texture is named according to T_BD_ZZ_ Roof _01 (and so on)_XXXX (texture type).

[0151] Step 10525, make a model of equipment on the roof of the building, such as a water tank, an elevator room, a solar water heater, an air-conditioning outdoor unit, greening, an equipment room, etc. In the 3D software, with the z-axis as the upward direction, make the required equipment model, and make a map in the material map making software, output the color, normal, roughness, metalness and ambient occlusion map, and mount it on each phong material ball of the residential building overhead layer model, and export it to the Fbx format, where the residential building overhead layer model is named SM_BD_ZZ_Roof_XXX (component type)_01 (and so on), and the map is named according to T_BD_ZZ_ Roof _XXX (component type)_01 (and so on)_XXXX (map type).

[0152] Step 106: Use a simple variation generator to generate the required procedural road model based on the component model of the road and store it in the library.

[0153] In one example, the component model of the road includes a curb component model, a road marking component model, and a street lamp component model; accordingly, a simple variation generator is used to generate the required procedural road model based on the component model of the road and store it in a library, including steps 1061 to 1063:

[0154] Step 1061, converting the model data of the component model of the road to be modeled into spline data and converting the spline type in the 3D software, and mounting the converted spline to the spline node;

[0155] Step 1062, creating three simple change generators, namely, curb generator, street light generator and road sign generator, specifically including steps 10621-10624:

[0156] Step 10621, in the curb generator, mount the curb component model on the default component node and the corner component node, use the adaptive mode, and the curb component model is adaptively subdivided and connected at the corner point;

[0157] Step 10622, in the 3D software, create a new 1*1m patch, and mount the material file of the road surface on the patch; in the road surface generator, use the patch as the default component node and corner component node of the road surface generator, and use the adaptive mode; create a digital value parameter node, fill the actual width value of the road surface (in meters) into the digital value parameter node, and combine the digital value parameter node and the default component node with the corner component node so that the width of the road surface can be changed in real time; then export the UV size value of the UV module of the road surface generator as a parameter, and combine it with the digital value parameter so that the UV of the road surface is always scaled according to the normal ratio;

[0158] Step 10623, in the streetlight generator, mount the streetlight component model on the default component node, and modify the model generation method of the streetlight generator to specify that a streetlight model is generated after a preset distance (depending on the actual situation);

[0159] Step 10624, in the 3D software, create a new 1*1m patch, and mount the road sign material file on the patch; in the road sign generator, use the patch as the default component node and corner component node of the road surface generator, and use the adaptive mode; create a value list, establish value sets for the type material identifiers (such as type material ID) of the corresponding road sign, and select the road sign type; then export the UV size value of the UV module of the road sign generator as a parameter, and combine it with the digital value parameter to ensure that the UV of the road sign is always scaled according to the normal ratio;

[0160] Step 1063, package the completed road generator, release all parameters that need to be modified through the export parameter node, and adjust parameters or replace content directly in the external panel when using it.

[0161] Step 107, using a complex variation generator, generates the required procedural building model based on the building component model and stores it in the library.

[0162] In one example, the component model of the building includes a component model of a residential building, and the component model of the residential building includes component models of the first floor, the middle floor, the top floor, the roof ground, and the roof equipment of the residential building; accordingly, a complex variation generator is used to generate the required procedural building model based on the component model of the building and store it in the library, including steps 1071 to 1073:

[0163] Step 1071, converting the model data of the residential building component model to be modeled into spline data in the 3D software, setting the splines of the same type as a group, converting the spline type according to actual needs, and mounting the converted spline to the spline node;

[0164] Step 1072, in the complex generator, make the first floor overhead layer, middle floor, top floor, roof ground and roof equipment of the residential building, specifically including: Step 10721-Step 10723:

[0165] Step 10721. In the complex generator, for the component models of the first floor mezzanine, the middle floor, and the top floor of the residential building in the component model of the residential building, when making the front of the residential building, change the attribute alignment of the component model to the vertex alignment, and use the sorting parameter node. The component models are sorted according to the actual style, and the required operator parameter nodes are connected and selected; when making the side of the residential building, sort according to the actual style, and connect the component models to the required operator parameter nodes, set the required operator parameter nodes to use the front residential building component when the distance between the two endpoints of the spline is the first endpoint distance, and use the side residential building component when it is the second endpoint distance, and mount it on the default component node of the component model; mount the column model on the corner component model of the component model, and set the column model attributes to adaptive.

[0166] Optionally, in a complex generator, follow the above steps to first create a procedural model of the first floor mezzanine of a residential building, and then create procedural models of the middle and top floors of the residential building.

[0167] Step 10722, make a procedural model of the roof and ground of the residential building. In the 3D software, create a new 1*1m patch, and mount the material file of the roof and ground on the patch; in the roof and ground generator, use the patch as the default component node and corner component node of the roof and ground generator, and use the adaptive mode to cut its area according to the spline; export the UV size value of the UV module of the roof and ground generator as a parameter, and combine it with the digital value parameter to ensure that the UV of the road surface is always scaled according to the normal ratio;

[0168] Step 10723, making a procedural model of the rooftop equipment. Create a random parameter node, mount the rooftop equipment model on the random parameter node, and control the distribution ratio of the rooftop equipment by controlling the value of the random parameter node.

[0169] Step 1073, package the completed building generator, release all parameters that need to be modified through the export parameter node, and directly adjust parameters or replace content in the external panel when using it.

[0170] In summary, the three-dimensional scene programmatic modeling method provided in this embodiment has the following effects:

[0171] (1) Efficient memory management: Memory management is crucial when rendering large-scale 3D environments. This method uses procedural modeling technology to allow multiple models and material maps to be instantiated, thereby significantly reducing memory usage and improving memory utilization efficiency.

[0172] (2) Optimizing the production process: This method provides a set of efficient resource management strategies, which can significantly shorten the production cycle and improve production efficiency through reasonable classification, reuse and procedural processing.

[0173] (3) Maintaining high-quality rendering: While optimizing memory usage and improving production efficiency, this method does not sacrifice rendering quality. By adopting PBR rendering technology, combined with high-quality material maps and models, the generated 3D scene is ensured to have realistic visual effects and detailed performance.

[0174] (4) Unified visual style: For large-scale 3D environments, maintaining the consistency of the overall visual style is a major challenge. This method introduces a node-based interactive design mechanism, which achieves seamless connection and style unification between different components through preset parameters and rules, providing a more coordinated and immersive user experience.

[0175] (5) Friendly to art staff: It provides artists with a powerful toolset and workflow to help them create large-scale 3D scenes more efficiently, flexibly and with higher quality. It also reduces the difficulty of resource management and optimization, and improves the overall efficiency and quality of art creation.

[0176] (6) Wide range of applications: This patented method is not only applicable to large-scale three-dimensional art environments such as park cities, but also to small-scale art environments such as rail transit, railways, and streets.

[0177] In summary, this method provides a comprehensive solution that uses procedural modeling, PBR rendering, node interaction and other technologies to effectively solve the problem of art resource management in large-scale 3D environments. This method has significant advantages in improving production efficiency, reducing memory usage, ensuring rendering quality and maintaining visual consistency, and provides important support for its wide application in various 3D art fields.

[0178] Figure 2 1 is a block diagram of a three-dimensional scene program modeling device provided by an embodiment of the present application. The device includes at least the following modules: a geographic data acquisition module 210, an editor production module 220, a parameter node construction module 230, an operator node construction module 240, a model production module 250, a road model program module 260, and a modeling model program module 270.

[0179] The geographic data acquisition module 210 is used to acquire basic geographic data corresponding to the 3D art scene to be modeled;

[0180] The editor making module 220 is used to make a node-based editor in the three-dimensional software. The editor is generated based on the data module. The data module is used to make a combination change of the model and material of the component according to the preset rules; the editor includes: a simple change generator and a complex change generator; the road change generator panel in the simple change generator includes: a spline node, a component model node, a terrain adaptation node, a default component node, a corner component node, a start component node, and an end component node; the spline node has the function of reading the attributes of the spline in the basic geographic data, and the spline node includes the name, identifier, control The component model node has the function of reading the geometry, material, transformation, and animation attributes of the component model in the basic geographic data and performing deformation adaptation on the read attributes; the terrain adaptation node has the function of reading the three-dimensional data on any model in the scene, combining with the component model node, placing the component model on the terrain model adaptively, and providing placement parameters; the default component node, corner component node, start component node, and end component node are used to access the component model data, adjust the model parameters of the component model, and interact with the variation generator theme function;

[0181] The parameter node construction module 230 is used to pre-construct parameter nodes in the three-dimensional software; the parameter nodes are respectively constant value parameter nodes, digital value parameter nodes, random value parameter nodes, value list nodes, and derived parameter nodes, and the parameter nodes are used to complete the programmatic generation of the three-dimensional model in conjunction with the editor;

[0182] An operator node construction module 240 pre-constructs operator parameter nodes in the three-dimensional software; the operator parameter nodes include: arithmetic parameter nodes, conditional parameter nodes, mirror parameter nodes, three-dimensional attribute transformation parameter nodes, random parameter nodes, sorting parameter nodes, and material ball parameter nodes, and the operator parameter nodes can convert or modify the editor, component model nodes, and parameter nodes;

[0183] A model making module 250 is used to make a component model of a road and a component model of a building in a three-dimensional software, wherein the component models are established according to a preset modeling rule;

[0184] A road model programming module 260 is used to generate a required programmatic road model based on the component model of the road using a simple variation generator and store the generated model in a database;

[0185] The modeling model programming module 270 is used to use a complex variation generator to generate the required programmatic building model based on the component model of the building and store it in the library.

[0186] For relevant details, refer to the above method embodiment.

[0187] It should be noted that: the three-dimensional scene program modeling device provided in the above embodiment only uses the division of the above functional modules as an example when performing three-dimensional scene program modeling. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the three-dimensional scene program modeling device is divided into different functional modules to complete all or part of the functions described above. In addition, the three-dimensional scene program modeling device provided in the above embodiment and the three-dimensional scene program modeling method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0188] Figure 3 301 is a block diagram of a three-dimensional scene program modeling device provided in one embodiment of the present application. The device may be a smart phone, a tablet computer, a laptop computer, a desktop computer or a server. The three-dimensional scene program modeling device may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, a control terminal, etc., which is not limited in this embodiment. The device includes at least a processor 301 and a memory 302.

[0189] The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 301 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0190] The memory 302 may include one or more computer-readable storage media, which may be non-transitory. The memory 302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 302 is used to store at least one instruction, which is used to be executed by the processor 301 to implement the three-dimensional scene programmatic modeling method provided in the method embodiment of the present application.

[0191] In some embodiments, the three-dimensional scene program modeling device may also optionally include: a peripheral device interface and at least one peripheral device. The processor 301, the memory 302 and the peripheral device interface may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface via a bus, a signal line or a circuit board. Schematically, the peripheral devices include but are not limited to: a radio frequency circuit, a touch display screen, an audio circuit, and a power supply.

[0192] Of course, the three-dimensional scene programmatic modeling device may also include fewer or more components, which is not limited in this embodiment.

[0193] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the three-dimensional scene programmatic modeling method of the above method embodiment.

[0194] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, in which a program is stored, and the program is loaded and executed by a processor to implement the three-dimensional scene programmatic modeling method of the above method embodiment.

[0195] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0196] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A three-dimensional scene program modeling method, characterized in that: The method comprises: Obtain basic geographic data corresponding to the 3D art scene to be modeled; A node-based editor is made in the three-dimensional software. The editor is generated based on a data module. The data module is used to make a combination change of the model and material of the component according to a preset rule; the editor includes: a simple change generator and a complex change generator; the road change generator panel in the simple change generator includes: a spline node, a component model node, a terrain adaptation node, a default component node, a corner component node, a start component node, and an end component node; the spline node has the function of reading the attributes of the spline in the basic geographic data, and the spline node includes the name, identifier, control point, degree, Weight, node type and closure attributes; the component model node has the function of reading the geometry, material, transformation, and animation attributes of the component model in the basic geographic data and deforming and adapting the read attributes; the terrain adaptation node has the function of reading the three-dimensional data on any model in the scene, combining with the component model node, so that the component model is adaptively placed on the terrain model, and providing placement parameters; the default component node, corner component node, start component node and end component node are used to access the component model data, adjust the model parameters of the component model, and interact with the variation generator theme function; In the three-dimensional software, parameter nodes are pre-constructed; the parameter nodes are respectively constant value parameter nodes, digital value parameter nodes, random value parameter nodes, value list nodes, and derived parameter nodes, and the parameter nodes are used to complete the programmatic generation of the three-dimensional model in conjunction with the editor; In the three-dimensional software, operator parameter nodes are pre-constructed; the operator parameter nodes include: arithmetic parameter nodes, conditional parameter nodes, mirror parameter nodes, three-dimensional attribute transformation parameter nodes, random parameter nodes, sorting parameter nodes, and material ball parameter nodes. The operator parameter nodes can convert or modify the editor, component model nodes, and parameter nodes; In the three-dimensional software, a component model of a road and a component model of a building are produced, wherein the component models are established according to a preset modeling rule; Using a simple variation generator, a required procedural road model is generated based on the component model of the road and stored in a library; Using a complex variation generator, generating a required procedural building model based on the component model of the building and storing it in a library; The production process of the complex change generator includes: Creating a complex change generator panel, wherein the complex change generator panel includes a spline import node, a terrain model import node, and a building model import node; Construct the main functions of the complex change generator, which include: a special attribute function panel and a complex change generator rule function panel. The special attribute function panel is used to control the basic changes generated by the complex change generator for the component model. The functions of the special attribute function panel include setting the size of the component model based on the positive and negative directions of the spline, setting the component model to determine whether the Y axis or Z axis in the world coordinate system is the upward direction, setting the component model based on the offset value of the three axes of xyz, setting the component model mirror, setting the model flip based on the three axes of xyz, and setting the model UV offset value based on the three axes of xyz; the complex change generator rule function panel is used to control the generation of buildings. The functions of the complex change generator rule function panel include: controlling the floor height of the building; the generation method of the default components of each floor, the generation method of the default components of each floor calculates the adaptation of the Y-axis direction; the generation method of the corner component model of each floor; whether the component model style of each floor is random and the random seed value.

2. The method according to claim 1, characterized in that The step of obtaining basic geographic data corresponding to the three-dimensional art scene to be modeled includes: According to the scene condition of the three-dimensional art scene, obtaining original geographic data corresponding to the three-dimensional art scene; Processing the abnormal data in the original geographic data, and classifying and storing the processed data according to the categories corresponding to the processed data; The processed data is converted into splines, and the splines are classified and stored according to the types corresponding to the splines to obtain the basic geographic data.

3. The method according to claim 1, characterized in that The production process of the simple change generator includes: Make a road variation generator panel; Construct the main functions of the road change generator; the main functions of the road change generator include an attribute function panel and a rule function panel; the attribute function panel is used to control the basic changes in the component model generated by the road change generator; the functions of the attribute function panel include: setting the size of the component model based on the positive and negative directions of the spline, setting the offset value of the component model based on the three axes of the world coordinate system xyz, setting the component model mirror, setting the flip model based on the three axes of xyz, and setting the offset value of the model UV based on the three axes of xyz; the rule function panel is used to control the changes of the default component nodes and the corner component nodes by the road change generator, and the functions of the rule function panel include: the generation method of the default component, the generation method includes tiling, stretching, adaptive and generation by quantity; the generation method of the corner component, the generation method includes only ordinary intersection generation, only Bezier corner generation and full generation; the chamfer generation method of the component generation turning point, including the chamfer angle value, whether the chamfer component is subdivided by the folding edge model and the chamfer offset value.

4. The method according to claim 1, characterized in that: The construction process of the component model node includes: Constructing a component model deformation general attribute node, wherein the component model deformation general attribute node includes modifying the naming, spacing, size and alignment of the component model; Constructing a component model deformation general attribute node deformation node, wherein the component model deformation general attribute node includes a function of modifying the form of the component model combination, wherein the form of modifying the component model combination includes automatic subdivision of bending deformation arrangement at the component joint, deformation arrangement perpendicular to the ground, and deformation arrangement perpendicular to the sky; A component model UV deformation node is constructed, wherein the component model UV deformation node includes UV tile size modification and UV mapping functions based on the world coordinate system.

5. The method according to claim 1, characterized in that The pre-built parameter node includes: Construct a constant parameter node, wherein the constant parameter node is used to set an integer, a floating point number, a percentage or a string, the value set by the constant parameter node is a fixed value, and the constant parameter node can be communicatively connected to the arithmetic parameter node and / or communicatively connected to a certain qualified value of a simple change generator or a complex change generator; Constructing a digital value parameter node, wherein the digital value node is used to set an integer, a floating point number, a percentage or a string, the value set by the digital value parameter node is a digital value within a certain range, and the digital value node can be communicatively connected to the arithmetic parameter node and / or communicatively connected to a certain qualified value of a simple change generator or a complex change generator; Constructing a random value parameter node, wherein the random value parameter node is used to set an integer, a floating point number or a percentage, wherein the value set by the random value parameter node is a random value taken within a value range, and the random value parameter node can be communicatively connected to the arithmetic parameter node, and / or communicatively connected to a certain qualified value of a simple change generator or a complex change generator; Construct a value list node, wherein the value list node is used to store a set of integers, floating point numbers, percentages or strings, and perform operations through a conditional export parameter node; Construct an export parameter node, which is used to connect the input node to the simple change generator, the complex change generator, the component model node in the road change generator panel of the simple change generator, or the numerical value of the operator parameter node, and use the parameter node type to establish a complex program relationship; the input node includes the constant value parameter node, the digital value parameter node, the random value parameter node, and the value list node.

6. The method according to claim 1, characterized in that In the three-dimensional software, the pre-built operator parameter node includes: Constructing the arithmetic parameter node, wherein the arithmetic parameter node is used to perform mathematical operations on at least two parameter nodes; Constructing the conditional parameter node, the conditional parameter node includes the following functions: taking whether the overall length of the spline or the length of the spline between two corner points is greater than or less than a preset value as a condition, and outputting this condition as the final result; dividing a spline into two sections according to the input percentage value, wherein one area outputs 1 and the other area outputs 2; outputting the attributes of the currently retrieved spline; Constructing the mirror parameter node, the mirror parameter node can be connected to the component model node in the road change generator panel of the simple change generator or connected to the condition parameter node, and outputting the component model output by the component model node in any axial direction of the xyz axis in the world coordinate system; Constructing the three-dimensional attribute transformation parameter node, wherein the three-dimensional attribute transformation parameter node can adjust the size, alignment, deformation, or transformation parameter of the component model node or the condition parameter node connected thereto; Constructing the random parameter node, the random parameter node is used to randomly return a parameter from the component model parameters input to the random parameter node, and the random probability will be determined according to the filled probability; Constructing the sorting parameter node, the sorting parameter node arranges the component model nodes or condition parameter nodes input to the random parameter node one by one according to a preset sorting method, and the arrangement method interacts with the component model arrangement in the simple change generator or complex change generator function, so that the component model arrangement will be adaptively scaled to meet the sorting condition; The material ball parameter node is constructed, and the material ball parameter node can reallocate the material ball mounted by the model identifier of the input component model as a unique material ball, or as a randomly selected one of multiple material balls.

7. The method according to claim 1, characterized in that The component model of the road includes a curb component model, a road marking component model, and a street lamp component model; the simple change generator is used to generate the required programmatic road model based on the component model of the road and store it in a library, including: Converting the model data of the component model of the road to be modeled into spline data and converting the spline type in the three-dimensional software, and mounting the converted spline into the spline node; In the curb generator, the curb component model is mounted on the default component node and the corner component node, and the curb component model is adaptively subdivided and connected at the corner point using an adaptive mode; In the three-dimensional software, a new 1*1m patch is created, and the material file of the road surface is mounted on the patch; in the road surface generator, the patch is used as the default component node and the corner component node of the road surface generator, and the adaptive mode is used; a digital value parameter node is created, and the actual width value of the road surface is filled into the digital value parameter node, and the digital value parameter node and the default component node are combined with the corner component node, so that the width of the road surface can be changed in real time; then the UV size value of the UV module of the road surface generator is exported as a parameter, combined with the digital value parameter, so that the UV of the road surface is always scaled according to the normal ratio; In the streetlight generator, the streetlight component model is mounted on the default component node, and the model generation method of the streetlight generator is modified to specify that a streetlight model is generated after a preset distance; In the three-dimensional software, a new 1*1m surface is created, and the material file of the road sign is mounted on the surface; in the road sign generator, the surface is used as the default component node and corner component node of the road surface generator, and the adaptive mode is used; a value list is created, and the value sets are established for the type material identifiers of the corresponding road sign, and the road sign type is selected; then the UV size value of the UV module of the road sign generator is exported as a parameter, and combined with the digital value parameter, so that the UV of the road sign is always scaled according to the normal ratio; The completed road generator is packaged, and all parameters that need to be modified are released through the export parameter node. When using, parameter adjustment or content replacement can be performed directly in the external panel.

8. The method according to claim 1, characterized in that The component model of the building includes a residential building component model, and the residential building component model includes component models of the first floor overhead layer, the middle floor, the top floor, the roof ground and the roof equipment of the residential building; accordingly, the complex variation generator is used to generate the required procedural building model based on the component model of the building and store it in the library, including: The model data of the residential building component model to be modeled is converted into spline data in the three-dimensional software, the splines of the same type are set as a group, and the spline type is converted, and the converted spline is mounted to the spline node; In the complex generator, for the component models of the first floor overhead, the middle floor, and the top floor of the residential building in the component model of the residential building, when making the front of the residential building, the attribute alignment of the component model is changed to the vertex alignment, and the sorting parameter node is used to sort the component model according to the actual style, and the required operator parameter node is connected and selected; when making the side of the residential building, it is sorted according to the actual style, and the component model is connected to the required operator parameter node, and the required operator parameter node is set to use the front residential building component when the distance between the two end points of the spline is the first end point distance, and the side residential building component is used when it is the second end point distance, and it is mounted on the default component node of the component model; the column model is mounted on the corner component model of the component model, and the column model attribute is set to be adaptive; In the 3D software, create a new 1*1m patch and mount the roof and ground material file on the patch; in the roof and ground generator, use the patch as the default component node and corner component node of the roof and ground generator, and use the adaptive mode to cut its area according to the spline; export the UV size value of the UV module of the roof and ground generator as a parameter, and combine it with the digital value parameter to ensure that the road surface UV is always scaled according to the normal ratio; Create a random parameter node, mount the rooftop device model on the random parameter node, and control the distribution ratio of the rooftop devices by controlling the value of the random parameter node; Package the completed building generator, release all the parameters that need to be modified through the export parameter node, and adjust the parameters or replace the content directly in the external panel when using it.

9. A three-dimensional scene program modeling device, characterized in that: The device includes a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement the three-dimensional scene programmatic modeling method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Random controllable city generation method

    CN113706715A

  • Three-dimensional scene texture template construction device and method and storage medium

    CN116977534A