Rendering method and system for restoring complex weather
By correlating meteorological data with city information model and using the rendering engine to simulate weather effects, the format difference and time synchronization problems of the rendering engine when acquiring weather data are solved, and the accuracy and real-time nature of weather restoration are improved.
Patent Information
- Application Number
- CN202411088875.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-09
AI Technical Summary
Existing rendering engines have format differences and time synchronization problems when acquiring weather data and geospatial data, resulting in reduced accuracy and real-time performance of weather restore.
By obtaining weather data and mapping it to the city information model according to geographical coordinates, the rendering engine is used to simulate and render weather effects, and the weather scene screen is generated to ensure the accuracy and real-timeness of the data.
It realizes accurate mapping and instant update of weather data, improves the authenticity and real-time nature of weather restoration, and simplifies the scene model construction process.
Smart Images

Figure CN118644597B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image data processing, and in particular to a rendering method and system for restoring complex weather. Background Art
[0002] The use of rendering engines to restore real-world weather conditions in real time in game interfaces, architectural design, virtual reality and other scenarios has been widely used. The acquisition and integration of real-time weather data is a key link in weather restoration.
[0003] Rendering engines usually obtain weather data and geospatial data from multiple independent data sources. Therefore, they need to deal with issues such as format differences and time synchronization between different data sources. This not only increases the technical difficulty, but may also affect the accuracy and real-time nature of the data, thereby reducing the authenticity and real-time nature of weather restoration. Summary of the invention
[0004] The main purpose of this application is to provide a rendering method and system for restoring complex weather, aiming to solve the technical problem of how to obtain real-time and accurate meteorological data, thereby improving the authenticity and real-time performance of weather restoration.
[0005] To achieve the above purpose, the present application proposes a rendering method for restoring complex weather, the method comprising:
[0006] Acquire meteorological data, and map the meteorological data to a preset city information model according to the geographic coordinates of the meteorological data;
[0007] Simulating and rendering weather effects according to the mapped city information model to generate a weather scene picture;
[0008] The weather scene picture is sent to the request sender based on the call request.
[0009] In one embodiment, the step of simulating and rendering weather effects according to the mapped city information model to generate a weather scene picture includes:
[0010] Importing the mapped city information model into a rendering engine, so that the rendering engine simulates and renders weather effects based on the city information model;
[0011] Obtain a weather scene image generated by the rendering engine.
[0012] In one embodiment, the step of importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders weather effects based on the city information model includes:
[0013] The city information model is input into the lighting model in the rendering engine, the lighting model is used to generate lighting and shadow effects obtained by the interaction of light and the surface of objects in the city information model, and the rendering engine generates a weather scene picture based on the lighting and shadow effects.
[0014] In one embodiment, the step of importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders weather effects based on the city information model further includes:
[0015] The city information model is input into the atmospheric scattering model in the rendering engine, and the atmospheric scattering model is used to generate a scattering effect obtained when light interacts with particles in the atmosphere when propagating in the atmosphere. The rendering engine generates a weather scene picture based on the scattering effect.
[0016] In one embodiment, the step of importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders weather effects based on the city information model further includes:
[0017] The city information model is input into a shader program in the rendering engine, the shader program is used to generate a texture effect obtained by rendering the material and texture of the objects in the city information model, and the rendering engine generates a weather scene picture according to the texture effect.
[0018] In one embodiment, the step of importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders weather effects based on the city information model further includes:
[0019] The city information model is input into a particle system in the rendering engine, the particle system is used to generate a particle effect obtained by controlling the generation, movement, collision and disappearance of particles, and the rendering engine generates a weather scene image according to the particle effect.
[0020] In one embodiment, after the step of simulating and rendering the weather effect according to the mapped city information model to generate a weather scene picture, the step further includes:
[0021] Performing picture effect enhancement processing on the weather scene picture, wherein the picture effect enhancement processing at least includes:
[0022] Perform tone mapping based on a preset tone mapping algorithm;
[0023] Or enhance the dynamic blur effect based on the blur filter tool or motion blur tool;
[0024] Or simulate depth of field effect based on blur filter tool.
[0025] In addition, to achieve the above purpose, the present application also proposes a rendering system for restoring complex weather, the rendering system for restoring complex weather comprising:
[0026] A data acquisition module, used to acquire meteorological data and map the meteorological data to a preset city information model according to the geographic coordinates of the meteorological data;
[0027] A rendering module, used to simulate and render weather effects according to the mapped city information model to generate a weather scene picture;
[0028] The result output module is used to send the weather scene picture to the request sender based on the call request.
[0029] In addition, to achieve the above-mentioned purpose, the present application also proposes a rendering device for restoring complex weather, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the rendering method for restoring complex weather as described above.
[0030] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the rendering method for restoring complex weather as described above are implemented.
[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the rendering method for restoring complex weather as described above.
[0032] By associating real-time weather data with geographic coordinates, this application can ensure that weather data is accurately mapped to the corresponding location in the city information model, avoiding the spatial dislocation of weather data. Real-time weather data can instantly reflect current weather conditions. After mapping real-time weather data to the city information model, weather rendering can be updated instantly, which helps to present weather effects that are closer to reality. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0035] Figure 1 A flowchart diagram of Embodiment 1 of the rendering method for restoring complex weather provided by the present application;
[0036] Figure 2 A detailed flow chart of the first embodiment of the rendering method for restoring complex weather provided by the present application;
[0037] Figure 3 A schematic diagram of the module structure of a rendering system for restoring complex weather in an embodiment of the present application;
[0038] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the rendering method for restoring complex weather in an embodiment of the present application.
[0039] Label:
[0040] Description of Figure Numbers:
[0041] 10. Data acquisition module; 20. Rendering module; 30. Result output module; 1001. Processing device; 1002. Read-only memory; 1003. Storage device; 1004. Memory; 1005. Bus; 1006. I / O interface; 1007. Input device; 1008. Output device; 1009. Communication device.
[0042] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0044] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0045] The main solution of the embodiment of the present application is: obtaining meteorological data, and mapping the meteorological data to a preset city information model according to the geographic coordinates of the meteorological data, so as to match the accuracy of the meteorological data with the spatial data of the CIM platform and avoid errors caused by inconsistent data accuracy; importing the city information model into the rendering engine, and simulating and rendering the weather effects of the scene of the city information model to generate a weather scene picture, thereby simplifying the process of building the scene model and generating realistic weather effects using the rendering engine; sending the weather scene picture to the request sender based on a call request, and providing a scene call interface for real-time and rapid restoration of complex weather rendering, so as to enable practical applications.
[0046] In the prior art, rendering engines usually obtain weather data and geospatial data from multiple independent data sources. Therefore, they need to deal with issues such as format differences and time synchronization between different data sources. This not only increases the technical difficulty, but may also affect the accuracy and real-time nature of the data, thereby reducing the authenticity and real-time nature of weather restoration.
[0047] By associating real-time weather data with geographic coordinates, this application can ensure that weather data is accurately mapped to the corresponding location in the city information model, avoiding the spatial dislocation of weather data. Real-time weather data can instantly reflect current weather conditions. After mapping real-time weather data to the city information model, weather rendering can be updated instantly, which helps to present weather effects that are closer to reality.
[0048] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a rendering device for restoring complex weather, etc. The following takes the rendering device for restoring complex weather as an example to illustrate this embodiment and the following embodiments.
[0049] Based on this, the present application embodiment provides a rendering method for restoring complex weather. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the rendering method for restoring complex weather in this application.
[0050] In this embodiment, the rendering method for restoring complex weather includes steps S10 to S30:
[0051] Step S10, acquiring meteorological data, and mapping the meteorological data to a preset city information model according to the geographic coordinates of the meteorological data;
[0052] It should be noted that meteorological data includes: historical meteorological records, real-time meteorological observation data, and meteorological images obtained through meteorological stations, meteorological satellites and radars. The collected meteorological data can be updated in real time and has a timestamp and geographic coordinates (latitude and longitude).
[0053] In addition, it should be noted that CIM (City Information Modeling) is an important infrastructure for smart cities and digital twin cities. It is based on technologies such as BIM (Building Information Modeling), GIS (Geographic Information System), and IoT (Internet of Things), integrating multi-dimensional and multi-scale information model data and urban perception data such as aboveground and underground, indoor and outdoor, historical, current and future, and building information complexes in three-dimensional digital space. The CIM model contains geographic location information, physical space information, and building attribute information. The geographic location information is mainly obtained and presented through GIS technology. The geographic location information provides an accurate description of the urban spatial structure, including the spatial distribution and mutual relationship of geographical elements such as roads, water systems, and topography; physical space information covers the physical characteristics of all physical objects in the city (such as buildings, structures, and transportation facilities) such as spatial size, shape, and layout; and building attribute information provides information such as building materials, construction years, and ownership relationships. These data have clear geographic coordinate information, which can match the accuracy of meteorological data with the spatial data of the CIM model, avoiding errors caused by inconsistent data accuracy.
[0054] In this embodiment, after collecting and acquiring meteorological data, the meteorological data is cleaned to remove abnormal values, duplicate values and other cleaning processes to ensure the accuracy and reliability of the data. If the format of the meteorological data is incompatible with the CIM model, it is necessary to convert the data format, such as converting CSV (Comma-Separated Values), Excel and other formats into data formats supported by the CIM model. After the meteorological data is cleaned and converted, specific parameters are extracted from the meteorological data, such as temperature, humidity, wind speed, wind direction, air pressure, precipitation, etc. A data interface is developed on the CIM model to receive and process meteorological data. According to the geographic coordinates of the meteorological data, the corresponding spatial position is found in the CIM model, for example, spatial data is matched and superimposed through GIS tools. The meteorological data is integrated into the city information model and combined with the spatial data to form a city information model containing meteorological information.
[0055] For example, the real-time meteorological data source is connected to the CIM platform by developing or using an existing API data interface (Application Programming Interface). According to the API or data format provided by the data source, the corresponding data interface is developed or adapted to ensure that the CIM platform can receive and parse the data, and the corresponding data structure or layer is set in the CIM platform to match and map the received real-time meteorological data with the geographic coordinates of the city information model.
[0056] Exemplarily, real-time meteorological data is stored in a database, and is synchronized from a source database to a database of a CIM platform through database synchronization tools (such as ETL tools (Extract-Transform-Load tools), database triggers, message queues, etc.). The CIM platform reads meteorological data from the database and matches it with the geographic coordinates of the model to achieve real-time rendering.
[0057] By associating real-time weather data with geographic coordinates, it is possible to ensure that weather data is accurately mapped to the corresponding location in the city information model, avoiding the spatial dislocation of weather data. Real-time weather data can instantly reflect current weather conditions. After mapping real-time weather data to the city information model, weather rendering can be updated instantly, which helps to present weather effects that are closer to reality.
[0058] Step S20, simulating and rendering weather effects according to the mapped city information model to generate a weather scene picture;
[0059] It should be noted that a rendering engine is a software program that is mainly used to calculate and generate the final appearance of computer graphics, including color, light and shadow, texture, transparency, and animation effects. Especially in the field of three-dimensional computer graphics, the role of a rendering engine is crucial. It is responsible for converting three-dimensional models, scenes, materials and other data into two-dimensional images that can be displayed on the screen.
[0060] In a feasible implementation, step S20 may include the following steps:
[0061] Importing the mapped city information model into a rendering engine, so that the rendering engine simulates and renders weather effects based on the city information model;
[0062] Obtain a weather scene image generated by the rendering engine.
[0063] In this embodiment, an engine that supports real-time rendering is selected, such as Unity, Unreal Engine, CryEngine or a self-developed engine to process large-scale CIM data and complex weather effects. After the city information model is imported into the rendering engine, the CIM data of the city or region is obtained from the city information model, including: three-dimensional models and attribute information of buildings, roads, vegetation, terrain, etc. Using CIM data, existing three-dimensional models can be directly imported without having to build from scratch, saving a lot of time and resources. According to rendering requirements, the CIM data is adapted and optimized, including simplifying the model, optimizing the texture, adjusting the LOD (Level of Detail) of the model, etc. The city information model is imported into the rendering engine, and the weather scene is rendered based on real-time meteorological data. Compared with the traditional construction of the scene model from scratch, the use of CIM data can simplify the process. In addition, real-time meteorological data has higher resolution and richer details, providing more accurate weather information and achieving more detailed simulation of weather phenomena; real-time data can reflect weather changes in real time and supports dynamic rendering, which can simulate the continuous changes of weather over time, rather than providing a snapshot of the weather at a specific point in time, providing a more immersive and realistic user experience.
[0064] In one possible implementation, please refer to Figure 2 The step of importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders weather effects based on the city information model also includes steps S21 to S24:
[0065] Step S21, input the city information model into the lighting model in the rendering engine, the lighting model is used to generate lighting and shadow effects obtained by the interaction of light and the surface of objects in the city information model, and the rendering engine generates a weather scene picture based on the lighting and shadow effects.
[0066] It should be noted that the lighting model is used to simulate the lighting and shadow effects caused by meteorological conditions, including: physically based rendering (PBR), ray tracing, etc. The lighting model is a set of algorithms used to calculate how light interacts with the surfaces of objects in the scene, thereby determining the lighting effects of objects in the scene. The city information model provides the precise location and height of the building, and the rendering engine can use this data to perform sunlight analysis and simulate the position of the sun and the shadow effects of the building at different times. The city information model provides information on the material and surface characteristics of the building, and the rendering engine can simulate the reflection and refraction effects of light on the surfaces of different materials.
[0067] In this embodiment, the parameters in the illumination model are dynamically adjusted through real-time meteorological data to simulate the impact of weather changes on scene illumination. Exemplarily, the cloud cover, atmospheric conditions and other information in the meteorological data are used to adjust the sky illumination model to simulate the brightness and color of the sky under different weather conditions; the shadow length and direction of the object are calculated by the sun position (azimuth and altitude) in the meteorological data; the meteorological data is used to enhance or reduce the ambient light shielding effect to simulate the reduction of illumination under cloudy or foggy conditions. According to meteorological conditions, such as humidity or atmospheric particles, the reflection and refraction effects of the surface of the object are adjusted; when simulating volume effects such as fog and smoke, the meteorological data can be used to adjust the scattering characteristics of the volume light.
[0068] Step S22, inputting the city information model into the atmospheric scattering model in the rendering engine, wherein the atmospheric scattering model is used to generate a scattering effect obtained when light interacts with particles in the atmosphere when propagating in the atmosphere, and the rendering engine generates a weather scene picture according to the scattering effect.
[0069] It should be noted that the atmospheric scattering model is used to simulate the phenomenon of light interacting with atmospheric molecules and suspended particles when propagating in the atmosphere. These phenomena include: scattering, where light interacts with atmospheric molecules and suspended particles, causing the direction of light to change; absorption, where part of the light energy is absorbed by atmospheric molecules and particles, causing the light intensity to weaken; refraction, where the propagation path of light bends when passing through atmospheric layers of different densities;
[0070] For example, in a rendering engine, the atmospheric scattering model can simulate the color of the sky, render a sky color gradient from dark blue to bright yellow according to the position of the sun and atmospheric conditions; simulate atmospheric perspective; calculate the scattering effect of sunlight or moonlight in the atmosphere through the atmospheric scattering model, simulate the sky at dusk, dawn or different weather conditions, and simulate clouds including the shape, density, and movement of clouds; simulate atmospheric phenomena such as fog, haze, and sandstorms by simulating the scattering of light in fog or haze. Use a dynamic skybox to simulate the color of the sky and changes in clouds according to time, season, and weather conditions.
[0071] For example, in clear weather, the atmospheric scattering model simulates the propagation and scattering of sunlight in the atmosphere, thereby producing a natural lighting effect. In foggy weather, the atmospheric scattering model simulates the scattering effect of light passing through water droplets or ice crystals in foggy weather, thereby presenting a blurred and hazy visual effect. In hazy weather, the atmospheric scattering model simulates the scattering effect of light passing through particulate matter in hazy weather. In snowy weather, the atmospheric scattering model can be combined with the illumination model to simulate the unique lighting and shadow effects in snowy weather.
[0072] Step S23, inputting the city information model into the shader program in the rendering engine, the shader program is used to generate a texture effect obtained by rendering the material and texture of the objects in the city information model, and the rendering engine generates a weather scene picture according to the texture effect.
[0073] It should be noted that the preset shader program in the rendering engine is a key component in the rendering pipeline, responsible for performing calculations on the graphics processing unit (GPU) to generate the final visual effect of the image or video. Shader programs usually include vertex shaders and fragment shaders (also known as pixel shaders), which play different roles in the rendering process. The main task of the vertex shader is to process the vertex data of the model. It receives information such as the position, normal, texture coordinates of the input vertex, and performs transformations and calculations based on this information. These transformations may include model transformations, view transformations, and projection transformations to convert vertices from model space to screen space. The fragment shader is used to process each pixel of the primitive (such as a triangle). It receives information such as the position, normal, texture coordinates of the input pixel, and performs calculations based on this information and the data passed by the vertex shader to determine the final color output. The fragment shader can implement lighting effects, texture mapping, shadow calculations, etc.
[0074] For example, according to real-time or preset meteorological data, the parameters in the shader, such as light intensity, color temperature, atmospheric scattering coefficient, etc., are dynamically adjusted. Texture patterns are applied to the surface of objects in the CIM model, and UV mapping or other mapping techniques are used to ensure the correct display of textures. Texture mapping techniques are used to apply cloud textures, raindrop textures and other maps to the corresponding object surfaces, and realistic material properties such as reflectivity, transparency, refractive index, etc. are created for weather elements such as clouds, raindrops, and snowflakes. By adjusting the parameters of materials and textures to match different weather conditions and lighting environments, the visual continuity and consistency of weather phenomena are ensured.
[0075] Step S24, inputting the city information model into the particle system in the rendering engine, the particle system is used to generate particle effects obtained by controlling the generation, movement, collision and disappearance of particles, and the rendering engine generates a weather scene image according to the particle effects.
[0076] It should be noted that the particle system is used to simulate various natural phenomena and special effects, such as flames, explosions, water flow, smoke, rain and snow. The particle system consists of multiple components, including emitters, particles, and simulators. The emitter is responsible for controlling the emission position and speed of particles. Particles are the smallest units and have their own life cycle, size, color and other properties, while the simulator is responsible for updating and controlling the movement of particles. Dynamic weather effects include: dripping rain, falling snowflakes, spreading fog, and rendering of extreme weather such as lightning.
[0077] Exemplarily, rendering of dynamic weather effects based on meteorological data and a particle system preset in a rendering engine may be performed according to the following specific steps:
[0078] Select a particle system in the rendering engine and configure its basic properties, such as the location of the particle emitter, the emission rate, and the particle life cycle. Define the behavior of particles based on meteorological data (such as wind speed, wind direction, temperature, humidity, precipitation type and intensity). For example, the type of precipitation determines the shape of the particles (raindrops, snowflakes, hail). Use wind speed and direction data to control the initial direction and speed of particles to simulate the movement of particles in natural wind. Apply physical simulations, such as Newtonian mechanics, to simulate the real movement trajectory of particles in the wind. Implement collision detection algorithms to produce corresponding effects, such as raindrops splashing, when particles come into contact with the ground or other objects based on the object material and shape information provided by the CIM model. Set the life cycle of particles so that they disappear after a certain period of time, or trigger the disappearance effect under certain conditions (such as hitting the ground). Adjust the adhesion or dissipation speed of particles based on environmental conditions (such as humidity) to simulate particle behavior in different environments.
[0079] Exemplarily, weather phenomena such as rain, snow, and fog are simulated by computational fluid dynamics (CFD), particle systems, and volume rendering. It should be noted that computational fluid dynamics (CFD) is a numerical simulation technology used to simulate the physical phenomena of fluid motion, including parameters such as flow rate, temperature, and pressure. In meteorological simulation, CFD technology can simulate the movement of airflow in the atmosphere and predict changes in meteorological variables such as temperature, humidity, wind speed, and air pressure, thereby realizing the prediction and simulation of weather phenomena. By setting the emission position, speed, size, shape, and other parameters of the particles, as well as the interaction and collision effects between the particles, it is possible to use the particle system to simulate water droplets or ice crystal particles in the cloud layer, and by adjusting the density, distribution, and motion state of the particles, simulate the morphology and changes of the cloud layer. Volume rendering is a technology used to render continuously distributed substances (such as smoke, clouds, water bodies, etc.) in three-dimensional space. It can simulate the scattering and absorption process of light inside the substance to generate a realistic volume effect.
[0080] Volume rendering technology is used to simulate fog effects in the atmosphere, such as morning fog and haze. By setting parameters such as fog concentration, color, and attenuation, the propagation and scattering effects of light in fog can be simulated. The physics engine uses a particle system to simulate tiny particles in weather phenomena such as rain, snow, fog, and dust. These particles move according to physical laws (such as gravity, wind, etc.) to form realistic weather effects. In rainy scenes, the physics engine can control the size, speed, density, and falling direction of raindrops, as well as the interaction effects of raindrops with objects such as the ground and buildings (such as splashing water). In foggy scenes, the physics engine can simulate the diffusion, concentration changes, and light scattering effects of fog. When simulating water bodies such as oceans and rivers, the physics engine can calculate the movement laws of water flow, the generation and propagation of waves, and the interaction between water flow and objects such as ships and bridges. In cloud simulation, the physics engine can simulate the formation, movement, and dissipation of clouds, as well as the scattering and absorption effects of clouds on light. In lightning simulation, firstly, particle effects such as lightning channels and sound waves generated by thunder are generated by using particle systems. Dynamic changes of lightning are simulated by adjusting the properties of particles (such as size, shape, color, transparency, etc.) and animation effects (such as motion trajectory, speed change, etc.). Secondly, based on the physical calculation results and particle effects, the rendering engine calculates the lighting effects of lightning, including direct light, scattered light, and reflected light. At the same time, corresponding shadow effects are generated to enhance the three-dimensional and layered sense of the scene.
[0081] Step S30: sending the weather scene image to the request sender based on the call request.
[0082] It should be noted that the weather scene screen can be a picture or a video. Displaying the weather scene screen on display terminals such as smartphones and smart TVs can enhance the user's interactive experience with the device, allowing users to experience more fun and convenience while obtaining weather information. The weather scene screen can intuitively show the user the current weather conditions, helping users to quickly understand the weather conditions and make corresponding decisions. Under extreme weather conditions, such as heavy rain, typhoons, sandstorms, etc., the weather scene screen can be highlighted through special marks or animation effects to remind users to take precautions and protect the safety of life and property.
[0083] In this embodiment, a related application interface program (API) is developed to provide a scene call interface for real-time and fast restoration of complex weather rendering, empowering practical applications. For example, an application interface program with an environmental monitoring system is developed, and real-time weather change information can be provided through the application interface program to help with environmental monitoring and disaster warning. By providing fast rendering services through the API, users can quickly obtain the required weather scene images, improve work efficiency and response speed, and at the same time, the API supports multiple devices and platforms, so that users of different devices can access and use weather rendering services, expanding the coverage of the service.
[0084] The present embodiment provides a rendering method for restoring complex weather. The main solution of the embodiment of the present application is: obtaining meteorological data, and mapping the meteorological data to a preset city information model according to the geographic coordinates of the meteorological data, so as to achieve the matching of the accuracy of the meteorological data with the spatial data of the CIM platform and avoid errors caused by inconsistent data accuracy; simulating and rendering weather effects according to the mapped city information model to generate weather scene pictures, simplifying the process of building scene models, and using a rendering engine and real-time meteorological data to generate realistic weather effects; sending the weather scene pictures to the request sender based on a call request, and providing a scene call interface for real-time and fast restoration of complex weather rendering, so as to enable practical applications.
[0085] By associating real-time weather data with geographic coordinates, this application can ensure that weather data is accurately mapped to the corresponding location in the city information model, avoiding the spatial dislocation of weather data. Real-time weather data can instantly reflect current weather conditions. After mapping real-time weather data to the city information model, weather rendering can be updated instantly, which helps to present weather effects that are closer to reality.
[0086] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. On this basis, after step S20, the rendering method for restoring complex weather further includes the following steps:
[0087] Performing picture effect enhancement processing on the weather scene picture, wherein the picture effect enhancement processing at least includes:
[0088] Perform tone mapping based on a preset tone mapping algorithm;
[0089] Or enhance the dynamic blur effect based on the blur filter tool or motion blur tool;
[0090] Or simulate depth of field effect based on blur filter tool.
[0091] It should be noted that tone mapping is a technique that converts a high dynamic range (HDR) image into a low dynamic range (LDR) image while retaining as much image detail and visual quality as possible. Its main purpose is to enable images to display rich colors and brightness levels without overexposure or underexposure when presented on standard display devices. Depth of field is an important concept in photography, which determines which parts of the image are clear and which parts are blurred. By controlling the depth of field, the subject can be highlighted and the sense of layering and space in the picture can be enhanced. Motion blur is a technique that adds a sense of movement and peace to the image.
[0092] When tone mapping is performed based on a preset tone mapping algorithm, first, select a suitable tone mapping algorithm according to the image characteristics and requirements: such as the Reinhard algorithm, the Drago algorithm, the Filmic Tone Mapping algorithm, etc.; second, adjust the mapping parameters, according to the algorithm requirements, adjust the parameters of the mapping function, such as the brightness compression ratio, the contrast enhancement factor, etc., to achieve the desired visual effect; then, apply the mapping function: apply the adjusted mapping function to each pixel of the HDR image to generate an LDR image;
[0093] Finally, further optimization and adjustment can be made to the LDR image as needed, such as color balance and saturation adjustment. When simulating the depth of field effect based on the blur filter tool, you can use tools such as blur filters to simulate the depth of field effect and further enhance the layering of the picture. When enhancing the dynamic blur effect based on the blur filter or motion blur tool, you can use tools such as blur filters and motion blur to simulate or enhance the dynamic blur effect.
[0094] For example, the computing power of multi-core processors can be used to distribute rendering tasks to multiple threads for parallel processing to reduce rendering delays. Resource loading and memory usage can be properly managed to avoid memory leaks and resource waste, ensuring application stability. Rendering quality can be dynamically adjusted based on the user's hardware configuration and performance requirements to balance visual effects and performance.
[0095] In this embodiment, the visual effect of the picture can be further enhanced through post-processing technologies such as tone mapping, depth of field, and motion blur, making the image more vivid and rich in layers.
[0096] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be repeated hereafter. On this basis, the rendering method for restoring complex weather further includes the following steps:
[0097] Obtain and call a rendering engine to update the weather scene screen based on the user's operation instruction.
[0098] For example, an intuitive and easy-to-use user interaction interface is designed, including elements such as toolbars and control panels. The toolbar should contain buttons or sliders for viewing angle adjustment (translation, rotation, zoom), weather condition selection, etc. When the user adjusts the viewing angle by dragging the mouse, the rendering engine should update the rendering image in real time to reflect the new viewing angle; when the user selects a specific weather condition, the rendering engine should adjust the corresponding rendering parameters to present the city scene under the weather condition, realizing the linkage logic between user interaction and the city information model and the rendering engine.
[0099] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the rendering method of restoring complex weather in the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0100] This application also provides a rendering system for restoring complex weather, please refer to Figure 3 , the rendering system for restoring complex weather includes:
[0101] The data acquisition module 10 is used to acquire meteorological data and map the meteorological data to a preset city information model according to the geographical coordinates of the meteorological data;
[0102] A rendering module 20, used to simulate and render weather effects according to the mapped city information model to generate a weather scene picture;
[0103] The result output module 30 is used to send the weather scene picture to the request sender based on the call request.
[0104] The rendering system for restoring complex weather provided by the present application adopts the rendering method for restoring complex weather in the above-mentioned embodiment, which can solve the technical problem of how to obtain real-time and accurate meteorological data, thereby improving the authenticity and real-time performance of weather restoration. Compared with the prior art, the beneficial effects of the rendering system for restoring complex weather provided by the present application are the same as the beneficial effects of the rendering method for restoring complex weather provided by the above-mentioned embodiment, and other technical features of the rendering system for restoring complex weather are the same as the features disclosed in the above-mentioned embodiment method, which will not be described in detail here.
[0105] The present application provides a rendering device for restoring complex weather, and the rendering device for restoring complex weather includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the rendering method for restoring complex weather in the above-mentioned embodiment one.
[0106] Reference below Figure 4, which shows a schematic diagram of the structure of a rendering device for restoring complex weather suitable for implementing an embodiment of the present application. The rendering device for restoring complex weather in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The rendering device for restoring complex weather is shown as merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0107] like Figure 4 As shown, the rendering device for restoring complex weather may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the xxx device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the rendering device for restoring complex weather to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a rendering device for restoring complex weather with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0108] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0109] The rendering device for restoring complex weather provided by the present application adopts the rendering method for restoring complex weather in the above-mentioned embodiment, which can solve the technical problem of how to obtain real-time and accurate meteorological data, thereby improving the authenticity and real-time performance of weather restoration. Compared with the prior art, the beneficial effects of the rendering device for restoring complex weather provided by the present application are the same as the beneficial effects of the rendering method for restoring complex weather provided by the above-mentioned embodiment, and the other technical features of the rendering device for restoring complex weather are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0110] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0111] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0112] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the rendering method for restoring complex weather in the above-mentioned embodiment.
[0113] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0114] The computer-readable storage medium may be included in a rendering device for restoring complex weather; or may exist independently without being assembled into a rendering device for restoring complex weather.
[0115] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a rendering device for restoring complex weather, the rendering device for restoring complex weather: obtains meteorological data, and maps the meteorological data to a preset city information model according to the geographic coordinates of the meteorological data; imports the city information model into a rendering engine, and simulates and renders the weather effect of the scene of the city information model to generate a weather scene picture; and outputs the weather scene picture to a display terminal.
[0116] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0117] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0118] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0119] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned rendering method for restoring complex weather, and can solve the technical problem of how to obtain real-time and accurate meteorological data, thereby improving the authenticity and real-time performance of weather restoration. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the rendering method for restoring complex weather provided in the above-mentioned embodiment, and will not be elaborated here.
[0120] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the rendering method for restoring complex weather as described above.
[0121] The computer program product provided by this application can solve the technical problem of how to obtain real-time and accurate meteorological data, thereby improving the authenticity and real-time performance of weather restoration. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the rendering method for restoring complex weather provided by the above-mentioned embodiment, and will not be elaborated here.
[0122] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A rendering method for restoring complex weather, It is characterized in that The method includes: Acquire meteorological data, and map the meteorological data to a preset city information model according to the geographic coordinates of the meteorological data, including: acquire the meteorological data according to a database synchronization tool, and clean and convert the meteorological data into a data format; integrate the processed meteorological data into the city information model through a GIS tool and the geographic coordinates; the meteorological data includes: historical meteorological records, real-time meteorological observation data, and meteorological images acquired through meteorological stations, meteorological satellites, and radars; The weather effect is simulated and rendered according to the mapped city information model to generate a weather scene picture, which includes: importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders the weather effect based on the city information model; obtaining the weather scene picture generated by the rendering engine; the step of importing the mapped city information model into the rendering engine so that the rendering engine simulates and renders the weather effect based on the city information model includes: inputting the city information model into a lighting model in the rendering engine, the lighting model is used to generate lighting and shadow effects obtained by the interaction of light with the surface of an object in the city information model, and the rendering engine generates a weather scene picture according to the lighting and shadow effects; the step of inputting the city information model into the lighting model in the rendering engine, the lighting model is used to generate lighting and shadow effects obtained by the interaction of light with the surface of an object in the city information model, and includes: using cloud cover and atmospheric condition information in meteorological data, adjusting the sky lighting model to simulate the brightness and color of the sky under different weather conditions; adjusting the reflection and refraction effects of the surface of the object according to the humidity and atmospheric particulate matter information in the meteorological data; Sending the weather scene picture to the request sender based on the call request, including displaying extreme weather conditions in the weather scene picture; Environmental monitoring and disaster warning are carried out through preset application interface programs.
2. The method according to claim 1, It is characterized in that The step of importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders weather effects based on the city information model also includes: The city information model is input into the atmospheric scattering model in the rendering engine, and the atmospheric scattering model is used to generate a scattering effect obtained when light interacts with particles in the atmosphere when propagating in the atmosphere. The rendering engine generates a weather scene picture based on the scattering effect.
3. The method according to claim 1, It is characterized in that The step of importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders weather effects based on the city information model also includes: The city information model is input into a shader program in the rendering engine, the shader program is used to generate a texture effect obtained by rendering the material and texture of the objects in the city information model, and the rendering engine generates a weather scene picture according to the texture effect.
4. The method according to claim 1, It is characterized in that The step of importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders weather effects based on the city information model also includes: The city information model is input into a particle system in the rendering engine, the particle system is used to generate a particle effect obtained by controlling the generation, movement, collision and disappearance of particles, and the rendering engine generates a weather scene image according to the particle effect.
5. The method according to claim 1, It is characterized in that After the step of simulating and rendering the weather effect according to the mapped city information model to generate the weather scene picture, the method further includes: Performing picture effect enhancement processing on the weather scene picture, wherein the picture effect enhancement processing at least includes: Perform tone mapping based on a preset tone mapping algorithm; Or enhance the dynamic blur effect based on the blur filter tool or motion blur tool; Or simulate depth of field effect based on blur filter tool.
6. A rendering system that restores complex weather, It is characterized in that The system comprises: The data acquisition module is used to acquire meteorological data and map the meteorological data to a preset city information model according to the geographic coordinates of the meteorological data, including: acquiring the meteorological data according to the database synchronization tool, and cleaning and converting the meteorological data into data format; integrating the processed meteorological data into the city information model through GIS tools and the geographic coordinates; the meteorological data includes: historical meteorological records, real-time meteorological observation data, and meteorological images acquired through meteorological stations, meteorological satellites, and radars; A rendering module, used for simulating and rendering weather effects according to the mapped city information model to generate a weather scene picture, which includes: importing the mapped city information model into a rendering engine so that the rendering engine simulates and renders weather effects based on the city information model; obtaining a weather scene picture generated by the rendering engine; the step of importing the mapped city information model into the rendering engine so that the rendering engine simulates and renders weather effects based on the city information model includes: inputting the city information model into a lighting model in the rendering engine, the lighting model is used to generate lighting and shadow effects obtained by the interaction of light with the surface of an object in the city information model, and the rendering engine generates a weather scene picture according to the lighting and shadow effects; the step of inputting the city information model into the lighting model in the rendering engine, the lighting model is used to generate lighting and shadow effects obtained by the interaction of light with the surface of an object in the city information model, and includes: using cloud cover and atmospheric condition information in meteorological data, adjusting a sky lighting model to simulate sky brightness and color under different weather conditions; adjusting the reflection and refraction effects of the surface of an object according to humidity and atmospheric particulate matter information in meteorological data; A result output module, used for sending the weather scene picture to the request sender based on the call request, including displaying extreme weather conditions in the weather scene picture; Environmental monitoring and disaster warning are carried out through preset application interface programs.
Citation Information
Patent Citations
A shader-based virtual simulation system and method for representing meteorological changes in real time
CN109377541A
Dynamic loading system and dynamic loading method for real-time weather under unreal engine platform
CN116560746A
CIM-based city data integrated management method, system and device, and medium
CN117689808A
Multi-meteorological virtual scene construction platform and construction method
CN117934718A
