CN115578506A - Rendering method and device of digital twin city model and electronic equipment - Google Patents
Rendering method and device of digital twin city model and electronic equipment Download PDFInfo
- Publication number
- CN115578506A CN115578506A CN202211562025.1A CN202211562025A CN115578506A CN 115578506 A CN115578506 A CN 115578506A CN 202211562025 A CN202211562025 A CN 202211562025A CN 115578506 A CN115578506 A CN 115578506A
- Authority
- CN
- China
- Prior art keywords
- rendering
- digital twin
- rendering mode
- city model
- twin city
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/10—Geometric effects
- G06T15/20—Perspective computation
- G06T15/205—Image-based rendering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/10—Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2111/00—Details relating to CAD techniques
- G06F2111/10—Numerical modelling
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- General Physics & Mathematics (AREA)
- Computer Graphics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Image Generation (AREA)
Abstract
The invention provides a rendering method and a rendering device of a digital twin city model and electronic equipment, and relates to the technical field of digital twin, wherein the method comprises the following steps: acquiring a pre-constructed digital twin city model and a current rendering mode sent by a user side; calling a model rendering example corresponding to the digital twin city model based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering example; each component element in the digital twin city model is rendered based on the target rendering data to obtain the rendered digital twin city model, and the technical problem of how to better render the digital twin city model in the prior art is solved, so that the rendering and debugging difficulty and the rendering and debugging threshold of the digital twin city model are reduced, and the rendering and debugging efficiency of the digital twin city model is improved.
Description
Technical Field
The invention relates to the technical field of digital twins, in particular to a rendering method and device of a digital twins city model and electronic equipment.
Background
The digital twin is to create a digital version of a 'virtual model' on the basis of a 'physical entity' of a device or system so as to dynamically simulate a physical object. At present, a digital twin technology is applied to the field of city planning and construction to construct a digital twin city model, and the constructed digital twin city model is rendered, so that the rendered digital twin city model can more vividly and accurately represent each detail characteristic in the process of city planning and construction, and the purposes of assisting city planning and construction and innovating city management are achieved.
In the prior art, because the rendering debugging process of the digital twin city model is complex and the implementation difficulty is high, a special technician is required to independently render and debug various data in the digital twin city model, and the rendering method has the defects of high rendering and debugging difficulty, high rendering and debugging threshold and low rendering and debugging efficiency.
Therefore, how to better render the digital twin city model is a technical problem to be solved urgently by technical personnel in the related field.
Disclosure of Invention
The invention provides a rendering method and device of a digital twin city model and electronic equipment, which are used for solving the technical problem of better rendering the digital twin city model in the prior art, so that the rendering debugging difficulty and the rendering debugging threshold of the digital twin city model are reduced, and the rendering debugging efficiency of the digital twin city model is improved.
The invention provides a rendering method of a digital twin city model, which comprises the following steps:
acquiring a pre-constructed digital twin city model and a current rendering mode sent by a user side;
calling a model rendering example corresponding to the digital twin city model based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering example;
and rendering each component element in the digital twin city model based on the target rendering data to obtain a rendered digital twin city model.
According to the rendering method of the digital twin city model provided by the invention, the step of obtaining the model rendering example corresponding to the digital twin city model specifically comprises the following steps:
acquiring a plurality of rendering modes corresponding to the digital twin city model, wherein the rendering modes are determined based on at least one rendering mode parameter, and the rendering mode parameter is a parameter corresponding to a rendering influence factor of the digital twin city model;
performing element decomposition on the digital twin city model to obtain a plurality of component elements of the digital twin city model;
obtaining the type and value of a rendering adjusting parameter corresponding to each component element in the digital twin city model in each rendering mode;
and generating the model rendering example based on the type and the value of the rendering adjusting parameter corresponding to each component element in the digital twin city model in each rendering mode.
According to the rendering method of the digital twin city model provided by the invention, the rendering modes comprise a single rendering mode and a combined rendering mode, and the combined rendering mode comprises at least two single rendering modes;
the obtaining of the type and value of the rendering adjustment parameter corresponding to each component element in the digital twin city model in each rendering mode includes:
for a single rendering mode in each rendering mode, determining the type and value of a rendering adjustment parameter corresponding to each component element in the digital twin city model based on a rendering mode parameter corresponding to the single rendering mode;
and aiming at a combined rendering mode in each rendering mode, determining the type and value of a rendering regulation parameter corresponding to each component element in the digital twin city model based on a rendering mode parameter corresponding to each single rendering mode forming the combined rendering mode.
According to the rendering method of the digital twin city model provided by the invention, the determination of the type and value of the rendering adjusting parameter corresponding to each component element in the digital twin city model based on the rendering mode parameter corresponding to the single rendering mode comprises the following steps:
determining the type of a rendering adjustment parameter corresponding to each component element in the digital twin city model based on a rendering mode parameter corresponding to the single rendering mode;
determining a first priority order corresponding to a plurality of rendering mode parameters under the condition that the number of the rendering mode parameters corresponding to the single rendering mode is determined to be multiple;
determining a current rendering mode parameter based on the first priority order, and determining a first value range of rendering adjustment parameters corresponding to each component element based on the current rendering mode parameter;
determining a next rendering mode parameter based on the first priority order, and determining a second value range of the rendering adjustment parameter corresponding to each component element in the first value range based on the next rendering mode parameter;
and analogizing until the value of the rendering adjustment parameter corresponding to each component element is determined in the third value range corresponding to the previous rendering mode parameter based on the last rendering mode parameter.
According to the rendering method of the digital twin city model provided by the present invention, the determining the first value range of the rendering adjustment parameter corresponding to each component element based on the current rendering mode parameter includes:
splitting each component element respectively to obtain sub-component elements corresponding to each component element;
and for each component, determining a first value range of the rendering adjustment parameter corresponding to each sub-component in the components based on the current rendering mode parameter.
According to the rendering method of the digital twin city model provided by the present invention, the determining the type and value of the rendering adjustment parameter corresponding to each of the components in the digital twin city model based on the rendering mode parameter corresponding to each of the single rendering modes constituting the combined rendering mode includes:
determining the type of rendering adjustment parameter corresponding to each component element in the digital twin city model based on the rendering mode parameter corresponding to each single rendering mode constituting the combined rendering mode;
determining a second priority order corresponding to the multiple single rendering modes, and determining the current single rendering mode based on the second priority order;
determining a fourth value range of the rendering adjustment parameter corresponding to each component element based on the rendering mode parameter corresponding to the current single rendering mode;
determining a next single rendering mode based on the second priority order, and determining a fifth value range of the rendering adjustment parameter corresponding to each component element in the fourth value range based on the rendering mode parameter corresponding to the next single rendering mode;
and analogizing until the value of the rendering adjustment parameter corresponding to each component element is determined in the sixth value range corresponding to the previous single rendering mode based on the last single rendering mode.
According to the rendering method of the digital twin city model provided by the invention, the method further comprises the following steps:
packaging a model rendering example corresponding to the digital twin city model into an application program interface;
the calling a model rendering instance corresponding to the digital twin city model based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering instance comprises:
calling the application program interface based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering instance.
The invention also provides a rendering device of the digital twin city model, which comprises the following components:
the data acquisition module is used for acquiring a pre-constructed digital twin city model and a current rendering mode sent by a user side;
an example calling module, configured to call a model rendering example corresponding to the digital twin city model based on the current rendering mode, so as to obtain, from the model rendering example, target rendering data of each component in the digital twin city model in the current rendering mode;
and the model rendering module is used for rendering each component element in the digital twin city model based on the target rendering data to obtain a rendered digital twin city model.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the rendering method of the digital twin city model.
The invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of rendering a digital twin city model as any one of the above.
According to the rendering method, device and electronic equipment of the digital twin city model, the model rendering example corresponding to the digital twin city model is generated in advance, so that the model rendering example can be directly and quickly called based on the current rendering mode sent by the user side when in use, the target rendering data corresponding to all the components in the current rendering mode can be quickly and conveniently found in the model rendering example at one time, and then the rendering and debugging of all the components in the digital twin city model are realized at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is one of flow diagrams of a rendering method of a digital twin city model according to an embodiment of the present invention;
fig. 2 is a second schematic flowchart of a rendering method of a digital twin city model according to an embodiment of the present invention;
fig. 3 is a third flowchart of a rendering method of a digital twin city model according to an embodiment of the present invention;
FIG. 4 is a fourth flowchart of a rendering method of a digital twin city model according to an embodiment of the present invention;
fig. 5 is a fifth schematic flowchart of a rendering method of a digital twin city model according to an embodiment of the present invention;
fig. 6 is a sixth schematic flowchart of a rendering method of a digital twin city model according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a rendering apparatus for a digital twin city model according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following describes a rendering method of the digital twin city model provided by the present invention with reference to fig. 1 to 6. As shown in fig. 1, the present invention provides a rendering method of a digital twin city model, the method comprising:
The digital twin city model is obtained by constructing on the basis of element data corresponding to a plurality of constituent elements, and is a three-dimensional digital city model. The constituent elements represent various physical objects in a city scene, e.g., houses, streets, etc. The element data corresponding to a component includes basic data such as coordinates, floor number, size, shape, and structure of the physical object represented by the component, such as height, floor number, and shape of a house, and center line coordinates of a road and a road grade.
Further, the rendering mode refers to a mode determined by integrating a plurality of rendering mode parameters, and when the user specifies that the plurality of rendering mode parameters are specific values, the mode determined by the plurality of rendering mode parameters as the specific values is used as the current rendering mode. The rendering mode parameter is a parameter corresponding to a rendering influence factor of the digital twin city model, and the specific value may be a numerical value or a value in another form, which is not limited in the present invention. For example, the rendering mode parameter may be a time parameter, and the user may specify that the time parameter is noon, and the current rendering mode is a mode corresponding to the case where the time parameter is noon.
And 102, calling a model rendering example corresponding to the digital twin city model based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering example.
Wherein the target rendering data includes target rendering adjustment parameters for the component in the current rendering mode. The model rendering example is generated based on rendering data corresponding to each component element in the digital twin city model in various rendering modes. The storage format of the model rendering instance may be: a mapping or correspondence of rendering modes, components, and rendering data corresponding to the components. For example, rendering data corresponding to each component in a certain rendering mode may be stored as a bar mapping relationship.
Specifically, by quickly calling a prestored model rendering example based on the current rendering mode, the target rendering data corresponding to each component element in the current rendering mode can be quickly and conveniently found out from the model rendering example at one time.
And 103, rendering each component element in the digital twin city model based on the target rendering data to obtain the rendered digital twin city model.
In the foregoing steps 101 to 103, by generating the model rendering instance corresponding to the digital twin city model in advance, the model rendering instance may be directly and quickly invoked based on the current rendering mode sent by the user end when in use, so as to quickly and conveniently find the target rendering data corresponding to all the components in the current rendering mode from the model rendering instance at one time, and further implement the rendering and debugging of all the components in the digital twin city model at the same time, and the whole rendering and debugging process is implemented by the automatic operation of a computer, without requiring a special technician to separately render and debug various data in the digital twin city model, thereby reducing the rendering and debugging difficulty and the rendering and debugging threshold of the digital twin city model, improving the rendering and debugging efficiency of the digital twin city model, and solving the technical problem of how to better render the digital twin city model in the prior art.
In an embodiment, as shown in fig. 2, the step of obtaining a model rendering instance corresponding to the digital twin city model specifically includes steps 201 to 204, where:
step 201, obtaining multiple rendering modes corresponding to the digital twin city model, wherein the rendering modes are determined based on at least one rendering mode parameter, and the rendering mode parameter is a parameter corresponding to a rendering influence factor of the digital twin city model. Wherein, the rendering influence factor of the digital twin city model comprises weather, time, season and the like. The rendering mode parameter may also be referred to as a rendering condition parameter.
Further, the composition elements include a basic environment, a remote sensing image base map, a house, a road, a water surface, a green space, a fine building and a Point of Interest (POI), wherein the basic environment includes a sky, a cloud in the sky, a star, and the like. The remote sensing image base map is a city ground map shot by a satellite and comprises top views of all solid objects in a city. POI information points contain more tiny physical objects in the city, such as mailboxes, street lights, etc.
It should be noted that the number and types of the components in the digital twin city model may be increased or decreased based on the specific application scenario, and the invention is not limited to this.
And step 203, obtaining the type and value of the rendering adjusting parameter corresponding to each component element in the digital twin city model in each rendering mode. The rendering adjustment parameter may also be referred to as a rendering effect adjustment parameter of the component, and is used to perform rendering debugging on the component to achieve different rendering effects.
It should be noted that, because different components represent different entity objects, and the influence degrees of the different entity objects by the same rendering mode are also different, the types and values of the rendering adjustment parameters corresponding to the components in the same rendering mode are also different. Similarly, the types and values of the rendering adjustment parameters corresponding to the same component in different types of rendering modes are also different.
And 204, generating a model rendering example based on the type and the value of the rendering adjusting parameter corresponding to each component element in the digital twin city model in each rendering mode.
The model rendering example comprises the type and the value of a rendering adjusting parameter corresponding to each component element in the digital twin city model in different rendering modes.
In the above steps 201 to 204, by performing the standardized element disassembly on the digital twin city model, and extracting the rendering data corresponding to each component element in the digital twin city model in various rendering modes, to generate a model rendering example constituted by the rendering modes, the component elements, and the mapping relationships corresponding to the rendering data, the complicated rendering debugging process that is difficult to implement is converted into the mapping relationship in the common cognitive dimension of most of implementing personnel, so that the implementation difficulty and the rendering debugging threshold of the rendering debugging process of the digital twin city model are greatly reduced, and the implementation cost of the rendering debugging process of the digital twin city model can also be reduced.
In one embodiment, the rendering modes include a single rendering mode and a combined rendering mode, the combined rendering mode being composed of at least two single rendering modes; as shown in fig. 3, the step 203 includes steps 301 to 302, wherein:
In one embodiment, the single rendering mode includes a natural rendering mode or a special effect rendering mode, where rendering mode parameters corresponding to the natural rendering mode are parameters corresponding to natural influence factors, including season, time, weather, and the like. The natural rendering mode represents a rendering mode determined based on a parameter corresponding to the natural influence factor.
In one embodiment, the rendering mode parameter corresponding to the special effect rendering mode is a parameter corresponding to the special effect influence factor or the filter influence factor. The special effect rendering mode represents a rendering mode determined based on parameters corresponding to the special effect influence factors or the filter influence factors, and the rendering mode comprises personality, blue tone, elegance, hierarchy, antique and the like.
In one embodiment, a first priority order of each rendering mode parameter corresponding to a single rendering mode is determined, and the type and value of a rendering adjustment parameter corresponding to each component element in the digital twin city model are determined based on each rendering mode parameter corresponding to the single rendering mode and the first priority order of each rendering mode parameter.
In one embodiment, the combined rendering mode includes a first combined rendering mode consisting of a natural rendering mode and a special effect rendering mode. In one embodiment, a second priority order of each single rendering mode constituting the combined rendering mode is determined, and the type and value of the rendering adjustment parameter corresponding to each component element in the digital twin city model are determined based on the second priority order of each single rendering mode and the rendering mode parameter corresponding to each single rendering mode.
In the above steps 301 to 302, by obtaining the types and values of the rendering adjustment parameters corresponding to the respective constituent elements in the digital twin city model by using different methods for different rendering modes, the accuracy and reliability of the generated model rendering instance can be improved, and in addition, the embodiment can enable the generated model rendering instance to simultaneously include the mapping relationship corresponding to the single rendering mode and the mapping relationship corresponding to the combined rendering mode, so that the automatic single rendering and combined rendering functions of the digital twin city model based on the generated model rendering instance can be achieved, and the rendering method of the digital twin city model provided by the present invention can be adapted to the application requirements of various application scenes, and is convenient for application and popularization in a large range.
In one embodiment, as shown in fig. 4, the step 301 includes steps 401 to 405, wherein:
For example, if the single rendering mode is a natural rendering mode, the rendering mode parameters corresponding to the natural rendering mode include time and weather, and one of the components is a house, the type of the rendering adjustment parameters corresponding to the house is determined to include house material, brightness, saturation, contrast, and the like based on the rendering mode parameters (time and weather) corresponding to the natural rendering mode.
Step 402, determining a first priority order corresponding to a plurality of rendering mode parameters when the number of rendering mode parameters corresponding to a single rendering mode is determined to be multiple.
For example, if the single rendering mode is a natural rendering mode, the rendering mode parameters corresponding to the natural rendering mode include time and weather, and the first priority order corresponding to the rendering mode parameters is: weather, time. The weather includes sunny days, cloudy days, rainy days and the like, and the time can be divided according to 24 hours in a day, and can also be divided into morning, noon, evening and late night approximately.
And 405, repeating the steps until the value of the rendering adjustment parameter corresponding to each component element is determined in the third value range corresponding to the previous rendering mode parameter based on the last rendering mode parameter.
In an embodiment, the single rendering mode is used as a natural rendering mode, and rendering mode parameters corresponding to the natural rendering mode include season, time, and weather, for example, to further explain the steps 403 to 405:
first, a first priority order is determined as: season, weather and time, and determining that the first rendering mode parameter is the season, and determining a first value range of the rendering adjustment parameter corresponding to each component element based on the season, namely the rendering mode parameter.
Secondly, determining that the second rendering mode parameter is weather, and determining a second value range of the rendering adjustment parameter corresponding to each component element in the first value range based on the rendering mode parameter of weather, wherein the second value range is smaller than the first value range.
And then, determining a third rendering mode parameter as time, and determining the rendering adjustment parameter value corresponding to each component element in a second value range based on the rendering mode parameter of time, wherein the finally determined rendering adjustment parameter value is one value in the second value range.
In the above steps 401 to 405, by determining the first priority order corresponding to the plurality of rendering mode parameters, the value range of the rendering adjustment parameter corresponding to each component element in the digital twin city model can be gradually narrowed based on the first priority order, and finally a value meeting the parameter requirements of various rendering modes is obtained, so that the reliability of the generated model rendering example can be improved, and the rendering effect on the digital twin city model can be improved.
In one embodiment, as shown in fig. 5, the step 403 includes steps 501 to 502, where:
Specifically, each component element is subjected to detail splitting based on a preset splitting rule determined by a current application scene to obtain sub-component elements corresponding to each component element, so that the component elements in the digital twin city model can be rendered in detail better, wherein the preset splitting rule comprises a light element splitting rule, a leaf element splitting rule and the like.
For example, it is necessary to separate sub-components that emit light at night, such as windows in a house, so as to realize detailed rendering of sub-components that emit light, such as windows in a house, over time. For another example, it is necessary to split sub-components such as leaves in a forest to realize detailed rendering of the sub-components such as leaves in the forest according to the change of seasons.
In the above steps 501 to 502, each component element is subjected to detail splitting by using a preset splitting rule determined based on the current application scene to obtain a sub-component element corresponding to each component element, so that each component element in the digital twin city model is better subjected to detail rendering, and the rendering effect of the digital twin city model can be further improved.
In one embodiment, as shown in fig. 6, the step 302 includes steps 601 to 605, wherein:
Specifically, for each component element in the digital twin city model, the type of the rendering adjustment parameter corresponding to the component element is determined based on the rendering mode parameter corresponding to each single rendering mode of the combined rendering mode, and the types of the rendering adjustment parameters determined based on each single rendering mode are integrated to obtain the type of the rendering adjustment parameter determined by the combined rendering mode. For details, please refer to the specific embodiment corresponding to step 401, which is not described in detail herein.
In one embodiment, the combined rendering mode includes a first combined rendering mode composed of a natural rendering mode and a special effect rendering mode, in which the priority of the natural rendering mode is higher than that of the special effect rendering mode.
And 605, repeating the steps until the values of the rendering adjustment parameters corresponding to the components are determined in the sixth value range corresponding to the previous single rendering mode based on the last single rendering mode.
In an embodiment, taking the combined rendering mode as the first combined rendering mode composed of the natural rendering mode and the special effect rendering mode as an example, the above steps 602 to 605 are further explained:
first, the second priority order is determined as: and determining the current single rendering mode as a natural rendering mode, and determining a fourth value range of the rendering adjustment parameter corresponding to each component element based on the rendering mode parameter corresponding to the natural rendering mode.
And secondly, determining that the next single rendering mode is a special effect rendering mode, and determining the value of the rendering adjustment parameter corresponding to each component element in a fourth value range based on the rendering mode parameter corresponding to the special effect rendering mode.
In the above steps 601 to 605, by determining the second priority order corresponding to the multiple single rendering modes in the combined rendering mode, the value range of the rendering adjustment parameter corresponding to each component element in the digital twin city model may be gradually narrowed based on the second priority order, and finally a value meeting the rendering requirements of the multiple single rendering modes in the combined rendering mode is obtained, so that the rendering effect on the digital twin city model may be further improved.
In one embodiment, the rendering method of the digital twin city model provided by the present invention further comprises: and encapsulating the model rendering instance corresponding to the digital twin city model as an application program interface. This step 102 further comprises: and calling an application program interface based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering example.
According to the embodiment, the model rendering examples corresponding to the digital twin city model are packaged into the application program interface, so that the target rendering data of each component element in the digital twin city model in the current rendering mode can be quickly and conveniently obtained from the model rendering examples in a mode of calling the application program interface by one key, the whole process is automatically executed by a computer without manual intervention, the standardized implementation of the rendering process of the digital twin city model is realized, the rendering debugging threshold and the application practice of the rendering process of the digital twin city model are reduced, the implementation cost of the digital twin city model is reduced, the digital twin city models in different rendering styles can be quickly generated and automatically switched among the digital twin city models in different rendering styles, and the richness and the flexibility of the rendering function of the digital twin city model are improved.
The following provides a specific embodiment to further explain the rendering method of the digital twin city model provided by the present invention, which specifically includes the following steps:
s101, dividing city data of a digital twin city model to be constructed into element data corresponding to a plurality of component elements, and defining a standardized data format of the element data corresponding to each component element, wherein the component elements comprise a basic environment, a remote sensing image base map, a house, a road, a water surface, a green space, a fine building and POI information points. The element data corresponding to the house includes coordinates of a house area, a height of the house, a number of house floors, and the like. The element data corresponding to the road comprises a road center line coordinate and a road grade, and the element data corresponding to the water surface and the green space respectively comprises a water surface area coordinate and a green space area coordinate.
S102, performing automatic modeling based on a preset modeling algorithm and element data corresponding to each component element to obtain a constructed digital twin city model, specifically, performing automatic modeling of a three-dimensional house according to element data such as regional coordinates, height and floor number of the house, performing automatic modeling of a three-dimensional road according to element data such as central line coordinates of the road and road grades, and performing automatic modeling of rivers, lakes and greenbelts based on element data such as regional coordinates of water surfaces and greenbelts.
S103, obtaining a plurality of rendering modes corresponding to the digital twin city model, wherein the rendering modes comprise a natural rendering mode and a special effect rendering mode, and rendering mode parameters corresponding to the natural rendering mode comprise season, weather and time. Rendering mode parameters corresponding to the special effect rendering mode comprise tone, exposure and the like. The types of special effect rendering modes include personality, bluetone, elegance, hierarchy, vintage, and the like.
S104, obtaining a plurality of components in the digital twin city model, and obtaining the type of rendering adjustment parameters corresponding to each component in the digital twin city model in each rendering mode.
Specifically, considering the influence of seasons, time and weather, and aiming at the base map of the remote sensing image, rendering adjustment parameters of types such as hue, brightness, saturation, contrast and the like can be extracted; aiming at the house, rendering and adjusting parameters of house materials, window light brightness and the like can be extracted; and aiming at the road, rendering and adjusting parameters of the types of the road such as material, color and the like can be extracted.
And S105, constructing a mapping relation between rendering mode parameters corresponding to various rendering modes and rendering adjustment parameters corresponding to various components, so as to obtain values of the rendering adjustment parameters corresponding to the components in the digital twin city model in various natural rendering modes.
Specifically, a mapping relation between rendering mode parameters such as 'season, time and weather' and rendering adjustment parameters corresponding to the components is constructed, so that values of the rendering adjustment parameters corresponding to the components in the digital twin city model in a 'natural rendering mode corresponding to the season, time and weather' are obtained. For example, for a house, the house material in the daytime is brighter, a window has no light, the whole brightness of the house is influenced by the illumination intensity more greatly, the house material in the dusk is darker, the window light is weaker, the whole brightness of the house is influenced by the illumination intensity less greatly, the house material at night is especially darker, the window light is stronger, and the brightness contrast effect of the house material and the window light is stronger.
And S106, generating a model rendering example based on the type and the value of the rendering adjusting parameter corresponding to each component element in the digital twin city model in each rendering mode, and packaging the model rendering example corresponding to the digital twin city model into an application program interface.
S107, the current rendering mode sent by the user side calls the application program interface based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering example.
The following describes the rendering apparatus of the digital twin city model provided in the present invention, and the rendering apparatus of the digital twin city model described below and the rendering method of the digital twin city model described above may be referred to each other.
As shown in fig. 7, the present invention provides a rendering apparatus of a digital twin city model, the rendering apparatus 100 of the digital twin city model comprising:
and the data acquisition module 101 is configured to acquire the pre-constructed digital twin city model and the current rendering mode sent by the user side.
And the instance calling module 102 is configured to call a model rendering instance corresponding to the digital twin city model based on the current rendering mode, so as to obtain, from the model rendering instance, target rendering data of each component in the digital twin city model in the current rendering mode.
And the model rendering module 103 is configured to render each component element in the digital twin city model based on the target rendering data, so as to obtain a rendered digital twin city model.
In one embodiment, the rendering apparatus 100 of the digital twin city model further includes an instance generation module, the instance generation module including:
the mode obtaining unit is used for obtaining a plurality of rendering modes corresponding to the digital twin city model, the rendering modes are determined based on at least one rendering mode parameter, and the rendering mode parameter is a parameter corresponding to a rendering influence factor of the digital twin city model.
And the element decomposition unit is used for carrying out element decomposition on the digital twin city model so as to obtain a plurality of component elements of the digital twin city model.
And the parameter determining unit is used for acquiring the type and the value of the rendering adjustment parameter corresponding to each component element in the digital twin city model in each rendering mode.
And the example generating unit is used for generating a model rendering example based on the type and the value of the rendering adjusting parameter corresponding to each component element in the digital twin city model in each rendering mode.
In one embodiment, the rendering modes include a single rendering mode and a combined rendering mode, the combined rendering mode being composed of at least two single rendering modes; the parameter determination unit includes a first parameter determination subunit and a second parameter determination unit, wherein:
and the first parameter determining subunit is used for determining the type and the value of the rendering adjusting parameter corresponding to each component element in the digital twin city model based on the rendering mode parameter corresponding to the single rendering mode aiming at the single rendering mode in each rendering mode.
And the second parameter determination and determination unit is used for determining the types and values of rendering adjustment parameters corresponding to all the components in the digital twin city model according to the combined rendering mode in all the rendering modes and based on the rendering mode parameters corresponding to all the single rendering modes forming the combined rendering mode.
In one embodiment, the first parameter determining subunit is further configured to determine, based on rendering mode parameters corresponding to a single rendering mode, types of rendering adjustment parameters corresponding to respective components in the digital twin city model; determining a first priority order corresponding to a plurality of rendering mode parameters under the condition that the number of the rendering mode parameters corresponding to a single rendering mode is determined to be multiple; determining a current rendering mode parameter based on the first priority order, and determining a first value range of a rendering adjustment parameter corresponding to each component element based on the current rendering mode parameter; determining a next rendering mode parameter based on the first priority order, and determining a second value range of the rendering adjustment parameter corresponding to each component element in the first value range based on the next rendering mode parameter; and analogizing until the value of the rendering adjustment parameter corresponding to each component element is determined in the third value range corresponding to the previous rendering mode parameter based on the last rendering mode parameter.
In an embodiment, the first parameter determining subunit is further configured to split each component element to obtain a sub-component element corresponding to each component element; and for each component element, determining a first value range of the rendering adjustment parameter corresponding to each sub-component element in the component elements based on the current rendering mode parameter.
In one embodiment, the second parameter determining subunit is further configured to determine, based on rendering mode parameters corresponding to individual single rendering modes constituting the combined rendering mode, types of rendering adjustment parameters corresponding to individual components in the digital twin city model; determining a second priority order corresponding to the plurality of single rendering modes, and determining the current single rendering mode based on the second priority order; determining a fourth value range of the rendering adjustment parameter corresponding to each component element based on the rendering mode parameter corresponding to the current single rendering mode; determining a next single rendering mode based on the second priority order, and determining a fifth value range of the rendering adjustment parameters corresponding to each component element in a fourth value range based on the rendering mode parameters corresponding to the next single rendering mode; and analogizing until the value of the rendering adjustment parameter corresponding to each component element is determined in the sixth value range corresponding to the previous single rendering mode based on the last single rendering mode.
In one embodiment, the rendering apparatus 100 of the digital twin city model further comprises an instance encapsulation module for encapsulating a model rendering instance corresponding to the digital twin city model as an application program interface. The instance calling module 102 is further configured to call an application program interface based on the current rendering mode to obtain target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering instance.
Fig. 8 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 8: a processor (processor) 810, a communication Interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication Interface 820 and the memory 830 communicate with each other via the communication bus 840. Processor 810 may invoke logic instructions in memory 830 to perform a method of rendering a digital twin city model provided by the methods described above, the method comprising: acquiring a pre-constructed digital twin city model and a current rendering mode sent by a user side; calling a model rendering example corresponding to the digital twin city model based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering example; and rendering each component element in the digital twin city model based on the target rendering data to obtain the rendered digital twin city model.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing a method for rendering a digital twin city model provided by the above methods, the method including: acquiring a pre-constructed digital twin city model and a current rendering mode sent by a user side; calling a model rendering example corresponding to the digital twin city model based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering example; and rendering each component element in the digital twin city model based on the target rendering data to obtain the rendered digital twin city model.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for rendering a digital twin city model, comprising:
acquiring a pre-constructed digital twin city model and a current rendering mode sent by a user side;
calling a model rendering example corresponding to the digital twin city model based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering example;
and rendering each component element in the digital twin city model based on the target rendering data to obtain a rendered digital twin city model.
2. The method for rendering the digital twin city model according to claim 1, wherein the step of obtaining the model rendering instance corresponding to the digital twin city model specifically comprises:
acquiring a plurality of rendering modes corresponding to the digital twin city model, wherein the rendering modes are determined based on at least one rendering mode parameter, and the rendering mode parameter is a parameter corresponding to a rendering influence factor of the digital twin city model;
performing element decomposition on the digital twin city model to obtain a plurality of component elements of the digital twin city model;
obtaining the type and value of a rendering adjustment parameter corresponding to each component element in the digital twin city model in each rendering mode;
and generating the model rendering example based on the type and the value of the rendering adjusting parameter corresponding to each component element in the digital twin city model in each rendering mode.
3. The rendering method of a digital twin city model according to claim 2, wherein the rendering modes include a single rendering mode and a combined rendering mode, the combined rendering mode being composed of at least two single rendering modes;
the obtaining of the type and value of the rendering adjustment parameter corresponding to each component element in the digital twin city model in each rendering mode includes:
for a single rendering mode in each rendering mode, determining the type and value of a rendering adjustment parameter corresponding to each component element in the digital twin city model based on a rendering mode parameter corresponding to the single rendering mode;
and aiming at a combined rendering mode in each rendering mode, determining the type and value of a rendering regulation parameter corresponding to each component element in the digital twin city model based on a rendering mode parameter corresponding to each single rendering mode forming the combined rendering mode.
4. The rendering method of the digital twin city model according to claim 3, wherein the determining the type and value of the rendering adjustment parameter corresponding to each of the components in the digital twin city model based on the rendering mode parameter corresponding to the single rendering mode comprises:
determining the type of a rendering adjustment parameter corresponding to each component element in the digital twin city model based on a rendering mode parameter corresponding to the single rendering mode;
determining a first priority order corresponding to a plurality of rendering mode parameters under the condition that the number of the rendering mode parameters corresponding to the single rendering mode is determined to be a plurality;
determining a current rendering mode parameter based on the first priority order, and determining a first value range of a rendering adjustment parameter corresponding to each component element based on the current rendering mode parameter;
determining a next rendering mode parameter based on the first priority order, and determining a second value range of the rendering adjustment parameter corresponding to each component element in the first value range based on the next rendering mode parameter;
and analogizing until the value of the rendering adjustment parameter corresponding to each component element is determined in the third value range corresponding to the previous rendering mode parameter based on the last rendering mode parameter.
5. The method for rendering a digital twin city model according to claim 4, wherein the determining a first value range of a rendering adjustment parameter corresponding to each of the components based on the current rendering mode parameter includes:
splitting each component element respectively to obtain a sub-component element corresponding to each component element;
and for each component, determining a first value range of the rendering adjustment parameter corresponding to each sub-component in the components based on the current rendering mode parameter.
6. The method as claimed in claim 3, wherein the determining the type and value of the rendering adjustment parameter corresponding to each of the components in the digital twin city model based on the rendering mode parameters corresponding to each of the single rendering modes constituting the combined rendering mode comprises:
determining the type of the rendering adjustment parameter corresponding to each component element in the digital twin city model based on the rendering mode parameter corresponding to each single rendering mode forming the combined rendering mode;
determining a second priority order corresponding to a plurality of single rendering modes, and determining a current single rendering mode based on the second priority order;
determining a fourth value range of the rendering adjustment parameter corresponding to each component element based on the rendering mode parameter corresponding to the current single rendering mode;
determining a next single rendering mode based on the second priority order, and determining a fifth value range of the rendering adjustment parameter corresponding to each component element in the fourth value range based on the rendering mode parameter corresponding to the next single rendering mode;
and analogizing until the value of the rendering adjustment parameter corresponding to each component element is determined in the sixth value range corresponding to the previous single rendering mode based on the last single rendering mode.
7. A rendering method of a digital twin city model according to any of claims 1-6, characterized in that the method further comprises:
packaging a model rendering example corresponding to the digital twin city model into an application program interface;
the calling a model rendering instance corresponding to the digital twin city model based on the current rendering mode to obtain target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering instance comprises:
calling the application program interface based on the current rendering mode to acquire target rendering data of each component element in the digital twin city model in the current rendering mode from the model rendering instance.
8. A rendering apparatus of a digital twin city model, comprising:
the data acquisition module is used for acquiring a pre-constructed digital twin city model and a current rendering mode sent by a user side;
an example calling module, configured to call a model rendering example corresponding to the digital twin city model based on the current rendering mode, so as to obtain, from the model rendering example, target rendering data of each component in the digital twin city model in the current rendering mode;
and the model rendering module is used for rendering each component element in the digital twin city model based on the target rendering data to obtain a rendered digital twin city model.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, implements a method of rendering a digital twin city model according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements a rendering method of a digital twin city model according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211562025.1A CN115578506B (en) | 2022-12-07 | 2022-12-07 | Rendering method and device of digital twin city model and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211562025.1A CN115578506B (en) | 2022-12-07 | 2022-12-07 | Rendering method and device of digital twin city model and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115578506A true CN115578506A (en) | 2023-01-06 |
CN115578506B CN115578506B (en) | 2023-04-11 |
Family
ID=84590721
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211562025.1A Active CN115578506B (en) | 2022-12-07 | 2022-12-07 | Rendering method and device of digital twin city model and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115578506B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180340411A1 (en) * | 2017-05-29 | 2018-11-29 | Ge Inspection Technologies, Lp | Oil and gas industrial machine monitoring |
WO2021164233A1 (en) * | 2020-02-20 | 2021-08-26 | 平安科技(深圳)有限公司 | Model rendering method, apparatus, and device, and computer readable storage medium |
CN113963100A (en) * | 2021-10-25 | 2022-01-21 | 广东工业大学 | Three-dimensional model rendering method and system for digital twin simulation scene |
CN114581573A (en) * | 2021-12-13 | 2022-06-03 | 北京市建筑设计研究院有限公司 | Local rendering method and device of three-dimensional scene, electronic equipment and storage medium |
CN115100353A (en) * | 2022-06-17 | 2022-09-23 | 重庆长安汽车股份有限公司 | Method, system, electronic device and storage medium for generating digital twin instances |
CN115268667A (en) * | 2022-07-18 | 2022-11-01 | 北京数字冰雹信息技术有限公司 | Method and system for controlling webpage end digital twin three-dimensional scene |
-
2022
- 2022-12-07 CN CN202211562025.1A patent/CN115578506B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180340411A1 (en) * | 2017-05-29 | 2018-11-29 | Ge Inspection Technologies, Lp | Oil and gas industrial machine monitoring |
WO2021164233A1 (en) * | 2020-02-20 | 2021-08-26 | 平安科技(深圳)有限公司 | Model rendering method, apparatus, and device, and computer readable storage medium |
CN113963100A (en) * | 2021-10-25 | 2022-01-21 | 广东工业大学 | Three-dimensional model rendering method and system for digital twin simulation scene |
CN114581573A (en) * | 2021-12-13 | 2022-06-03 | 北京市建筑设计研究院有限公司 | Local rendering method and device of three-dimensional scene, electronic equipment and storage medium |
CN115100353A (en) * | 2022-06-17 | 2022-09-23 | 重庆长安汽车股份有限公司 | Method, system, electronic device and storage medium for generating digital twin instances |
CN115268667A (en) * | 2022-07-18 | 2022-11-01 | 北京数字冰雹信息技术有限公司 | Method and system for controlling webpage end digital twin three-dimensional scene |
Also Published As
Publication number | Publication date |
---|---|
CN115578506B (en) | 2023-04-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2020187727A (en) | Line drawing generation | |
KR20200029034A (en) | Rendering method for simulating lighting, and terminal | |
US20200035038A1 (en) | An Interactive Implementation Method for Mobile Terminal Display of 3D Model | |
CN114140588B (en) | Creation method and device of digital sand table, electronic equipment and storage medium | |
JPH04358291A (en) | Color image changing method | |
CN111489431A (en) | Smart city planning simulation dynamic simulation system and operation method thereof | |
CN106815881A (en) | The color control method and device of a kind of actor model | |
CN116342783B (en) | Live-action three-dimensional model data rendering optimization method and system | |
CN110426021A (en) | Utilize the map surveying method and system of photogrammetric threedimensional model | |
CN106373199B (en) | A kind of oblique photograph building model rapid extracting method | |
CN110737744B (en) | Method for manufacturing texture symbols of land utilization classified thematic map | |
CN109754463B (en) | Three-dimensional modeling fusion method and device | |
CN112347547A (en) | Sunshine duration simulation method and device and electronic equipment | |
CN112053440A (en) | Method for determining individualized model and communication device | |
CN116894922A (en) | Night vision image generation method based on real-time graphic engine | |
CN114820292A (en) | Image synthesis method, device, equipment and storage medium | |
CN115578506B (en) | Rendering method and device of digital twin city model and electronic equipment | |
CN117197296A (en) | Traffic road scene simulation method, electronic equipment and storage medium | |
CN109767484A (en) | With the light and color homogenization method and system of color consistency in a kind of portion three-dimensional picture pasting | |
CN115487495A (en) | Data rendering method and device | |
CN113987902A (en) | Weather scene simulation method and device, electronic equipment and storage medium | |
CN114299202A (en) | Processing method and device for virtual scene creation, storage medium and terminal | |
CN109712237B (en) | Mixed color setting method based on elevation data and meteorological data | |
CN112700538A (en) | LOD generation method and system | |
JP2000306118A (en) | Tree texture generating device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |