Weather rendering method, weather rendering device, electronic equipment and storage medium

By expressing weather element attribute information in the form of a configuration file in the sky layout and performing data-driven rendering through the rendering engine, the problem that the existing weather rendering system cannot modify the weather type is solved, and a highly restored three-dimensional weather rendering effect and personalized needs are achieved.

CN119904560APending Publication Date: 2025-04-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311403299.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing weather rendering system needs to create all weather types effects in advance before the software program is released, and the weather type cannot be modified after the release, which limits personalized needs and design and development efficiency.

Method used

By expressing the attribute information of each weather element in the sky layout in the form of a configuration file, and completing the data-driven rendering in the configuration file through the rendering engine, a highly restored three-dimensional weather rendering effect is achieved.

Benefits of technology

This data-driven method allows users to freely adjust the attribute information of weather elements in weather phenomena, modify the weather type, meet personalized needs, and greatly improve design and development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904560A_ABST
    Figure CN119904560A_ABST
Patent Text Reader

Abstract

The invention relates to a weather rendering method, a weather rendering device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a weather element set corresponding to each weather type in a plurality of weather types, and obtaining a configuration file of each weather element in the weather element set corresponding to each weather type, the configuration file comprises attribute information of each weather element, and then performing weather rendering on the sky layout according to a weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model. According to the method, the attribute information of each weather element is expressed in the form of a configuration file in the sky layout, and data-driven rendering in the configuration file is completed through a rendering engine, so that a highly-restored three-dimensional weather rendering effect is realized; according to the data driving mode, the user can freely adjust the attribute information of various elements forming the weather in the weather phenomenon, the weather type can be modified, and the personalized requirement is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a weather rendering method, a weather rendering device, an electronic device and a storage medium. Background Art

[0002] The weather rendering system provides important visualization tools for various industries by simulating and rendering the visual effects of different weather phenomena, helping people better understand and respond to weather-related phenomena and problems.

[0003] In the related art, weather effects corresponding to weather phenomena are pre-made into software programs by using a rendering engine, and different weather effects are displayed by identifying the weather conditions around the user. This requires that weather effects corresponding to all weather types be prepared in advance before the software program is released. Once the software program is released, the weather type cannot be modified. Summary of the invention

[0004] The present disclosure provides a weather rendering method, a weather rendering device, an electronic device and a storage medium. The present disclosure expresses the attribute information of each weather element in the sky layout in the form of a configuration file, and completes the data-driven rendering in the configuration file through a rendering engine to achieve a highly restored three-dimensional weather rendering effect. This data-driven method allows users to freely adjust the attribute information of various weather elements in weather phenomena, modify the weather type, meet personalized needs, and greatly improve design and development efficiency.

[0005] According to a first aspect of an embodiment of the present disclosure, a weather rendering method is provided, comprising:

[0006] Obtaining a weather element set corresponding to each of the multiple weather types; wherein the weather type is obtained by dividing real weather phenomena;

[0007] Obtaining a configuration file of each weather element in a weather element set corresponding to each weather type; wherein the configuration file includes attribute information of each weather element;

[0008] According to the weather element sets corresponding to the weather types and the attribute information of each weather element in the weather element sets, weather rendering is performed on the sky layout to obtain a three-dimensional weather model.

[0009] According to a second aspect of an embodiment of the present disclosure, a weather rendering device is provided, comprising:

[0010] A first acquisition module is used to acquire a set of weather elements corresponding to each of the multiple weather types; wherein the weather types are obtained by dividing real weather phenomena;

[0011] A second acquisition module is used to acquire a configuration file of each weather element in a weather element set corresponding to each weather type; wherein the configuration file includes attribute information of each weather element;

[0012] The rendering module is used to perform weather rendering on the sky layout according to the weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model.

[0013] According to a third aspect of an embodiment of the present disclosure, an electronic device is proposed, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the weather rendering method as described above.

[0014] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is proposed. When instructions in the storage medium are executed by a processor, the processor is enabled to execute the above-mentioned weather rendering method.

[0015] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is proposed, including a computer program, and when the computer program is executed by a processor, the above-mentioned weather rendering method is implemented.

[0016] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0017] In the present disclosure, a weather element set corresponding to each weather type in a plurality of weather types is first obtained, wherein the weather type is obtained by dividing the real weather phenomenon, and a configuration file of each weather element in the weather element set corresponding to each weather type is obtained, wherein the configuration file includes the attribute information of each weather element, and then weather rendering is performed on the sky layout according to the weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model. Therefore, the present disclosure expresses the attribute information of each weather element in the sky layout in the form of a configuration file, and completes the data-driven rendering in the configuration file through a rendering engine to achieve a highly restored three-dimensional weather rendering effect. This data-driven method allows users to freely adjust the attribute information of various weather elements that make up the weather phenomenon, and can modify the weather type to meet personalized needs, thereby greatly improving design and development efficiency.

[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0020] Figure 1 is a flow chart of a weather rendering method according to an embodiment of the present disclosure;

[0021] Figure 2 is a flow chart of determining cyclic disturbance of clouds according to an embodiment of the present disclosure;

[0022] Figure 3 is a flow chart of determining edge dissipation of a cloud according to an embodiment of the present disclosure;

[0023] Figure 4 is a flow chart of determining the dissolution and dissipation of clouds according to an embodiment of the present disclosure;

[0024] Figure 5 is a block diagram of a weather rendering device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0027] The following describes a weather rendering method, a weather rendering device, an electronic device, and a storage medium according to embodiments of the present disclosure with reference to the accompanying drawings.

[0028] Weather rendering systems are widely used in entertainment media such as movies, TV series, and games. They can create realistic weather effects, such as sunny skies, falling snowflakes, and heavy rain, to enhance the visual effects and viewing experience of film and television works.

[0029] In the fields of architecture and real estate, weather rendering systems are used to show how buildings and residential areas will look under different weather conditions. It can simulate weather conditions in different seasons and time periods, helping developers and homebuyers better understand the environmental characteristics of the project.

[0030] In the field of urban planning and traffic management, the weather rendering system can provide visual assistance for urban planning and traffic management. By simulating factors such as road conditions and visibility under different weather conditions, the traffic flow, road safety and resilience of the traffic system can be evaluated, thereby optimizing traffic rules and scheduling strategies.

[0031] In the field of agriculture and rural development, weather rendering system plays an important role in agriculture and rural development. It can be used to predict and simulate factors such as crop growth and soil moisture under different weather conditions, helping farmers make decisions on crop planting, irrigation and harvesting, and improving agricultural production efficiency.

[0032] In the field of energy and environmental monitoring, weather rendering systems are widely used in the energy industry and environmental monitoring. It can simulate the changes in wind power, solar lights and other renewable energy resources under different weather conditions, and assist in energy planning and forecasting. In addition, it can also be used to simulate atmospheric pollution transmission, climate patterns and other environmental monitoring research.

[0033] In general, weather rendering systems provide important visualization tools for various industries by simulating and rendering the visual effects of different weather phenomena, helping people better understand and respond to weather-related phenomena and problems.

[0034] In the related art, weather effects corresponding to weather phenomena are pre-made into software programs by using a rendering engine, and different weather effects are displayed by identifying the weather conditions around the user. This requires that weather effects corresponding to all weather types be prepared in advance before the software program is released. Once the software program is released, the weather type cannot be modified.

[0035] To this end, the present invention proposes a weather rendering method, which uses a design tool to express the attribute information of each weather element in the form of a configuration file in three-dimensional space, and uses a rendering engine to complete the data-driven rendering in the configuration file to achieve a highly restored three-dimensional weather rendering effect, so that the weather type can be modified according to actual needs to meet personalized needs, greatly improving design and development efficiency.

[0036] Figure 1 is a flow chart of a weather rendering method according to an embodiment of the present disclosure.

[0037] It should be noted that the executor of the weather rendering method of the embodiment of the present disclosure is a weather rendering device, and the weather rendering device can be configured in an electronic device so that the electronic device can perform a weather rendering function.

[0038] like Figure 1 As shown, the weather rendering method of the embodiment of the present disclosure includes the following steps:

[0039] S101, obtaining a weather element set corresponding to each weather type among a plurality of weather types; wherein the weather type is obtained by dividing real weather phenomena.

[0040] Among them, weather types include but are not limited to sunny, cloudy, light rain, moderate rain, heavy rain, rainstorm, thunderstorm, light snow, moderate snow, heavy snow, haze, blowing sand, sandstorm, dust storm, etc.

[0041] Among them, the weather element set includes at least one of the following weather elements: sky color, light source, cloud layer, thin cloud, sun, raindrop special effects, snowflake special effects, haze special effects, sandstorm special effects, sandstorm special effects and dust storm special effects.

[0042] For example, the weather element set for a sunny day includes, but is not limited to, a meteorological ID (Identity Document, a meteorological ID is a code or code used to identify meteorological data), sky color, a number of light sources, a number of thin clouds, the sun, etc.;

[0043] The cloudy weather element set includes but is not limited to weather ID, sky color, several light sources, several cloud layers, etc.;

[0044] The weather element set for light rain includes but is not limited to weather ID, sky color, several light sources, several cloud layers, raindrop special effects that can represent light rain, etc.;

[0045] The weather element set of moderate rain includes but is not limited to weather ID, sky color, several light sources, several cloud layers, raindrop special effects that can express moderate rain, etc.;

[0046] The weather element set for heavy rain includes but is not limited to weather ID, sky color, several light sources, several cloud layers, raindrop special effects that can show heavy rain, etc.;

[0047] The weather element set of a rainstorm includes but is not limited to weather ID, sky color, several light sources, several cloud layers, raindrop special effects that can represent a rainstorm, etc.;

[0048] The weather element set of a thunderstorm includes, but is not limited to, a weather ID, sky color, a number of light sources, a number of cloud layers, raindrop special effects that can represent a thunderstorm, lightning special effects that can represent thunder, etc.;

[0049] The weather element set for light snow includes but is not limited to weather ID, sky color, several light sources, several cloud layers, snowflake special effects that can represent light snow, etc.

[0050] The set of weather elements for moderate snow includes, but is not limited to, weather ID, sky color, several light sources, several cloud layers, snowflake special effects that can represent moderate snow, etc.;

[0051] The weather element set for heavy snow includes but is not limited to weather ID, sky color, several light sources, several cloud layers, snowflake special effects that can represent heavy snow, etc.;

[0052] The weather element set of haze includes but is not limited to weather ID, sky color, several light sources, several cloud layers, special effects that can express haze, etc.;

[0053] The weather element set for blowing sand includes, but is not limited to, weather ID, sky color, several light sources, several cloud layers, special effects that can express blowing sand, etc.;

[0054] The weather element set of sandstorm includes but is not limited to weather ID, sky color, several light sources, several cloud layers, special effects that can express sandstorm, etc.;

[0055] The weather element set of the dust storm includes but is not limited to a weather ID, sky color, a number of light sources, a number of cloud layers, special effects that can represent the dust storm, and the like.

[0056] S102, obtaining a configuration file of each weather element in a weather element set corresponding to each weather type; wherein the configuration file includes attribute information of each weather element.

[0057] For example, the attribute information of the sky includes parameters required by the display device that are calculated in real time based on longitude and latitude, altitude, weather type and precise time; among them, longitude and latitude are the unique coordinates of every location on the earth, and the longitude and latitude of a specific location can be obtained through GPS (Global Positioning System) equipment, map API (Application Programming Interface) or GIS (Geographic Information System). For example, on many smart phones and tablets, the built-in GPS device can be used to obtain the current longitude and latitude. In addition, many online map services also provide API interfaces, through which the longitude and latitude of any location can be obtained; altitude is the height of a point on the ground relative to the sea level, and the altitude information of a specific location can be obtained through online map services or special altitude query websites, or special equipment can be used to measure the altitude;

[0058] The attribute information of the light source includes the color of the light source (such as red, green, blue, etc.), luminous intensity (the intensity of the light), three-dimensional spatial position (the location of the light source), attenuation function (the way the intensity of the light gradually decreases with increasing distance), etc.

[0059] The attribute information of thin clouds and cloud layers includes the cyclic disturbance of clouds, the edge dissipation of clouds and the dissolution and dissipation of clouds, including the front normal map, the back normal map, the depth map, the internal glow map, the three-dimensional position in space, the mask relationship (the occlusion effect of clouds), the drift parameter (the moving speed and direction of clouds), the disturbance parameter (the shape change of clouds), the overall opacity, the local opacity (the opacity of clouds), the local normal reduction parameter (the shape change of clouds), etc.

[0060] The sun's attribute information includes sunlight, light spots, halos, rays, etc., and their corresponding three-dimensional spatial positions;

[0061] The attribute information of raindrop special effects includes special effect ID (an identifier for identifying raindrops), density (how dense the raindrops are), falling speed (how fast the raindrops fall), number of superposition layers (the number of raindrops), depth of field position (the position of the raindrops in the depth of field), three-dimensional space position (the position of the raindrops in the scene), etc.

[0062] The attribute information of the snowflake special effect includes parameters such as special effect ID, density, falling speed, lateral drifting speed (lateral speed of snowflakes drifting in the air), number of superposition layers, depth of field position, and three-dimensional space position;

[0063] The attribute information of the haze effect includes the effect ID and other possible parameters, such as the density and color of the haze.

[0064] The attribute information of the sand-raising effect includes the effect ID and other possible parameters, such as the particle size and color of the sand.

[0065] The attribute information of the dust effect includes the effect ID and other possible parameters, such as the particle size and color of the dust.

[0066] The attribute information of the dust storm special effect includes the special effect ID and other possible parameters, such as the intensity and color of the dust storm.

[0067] In this step, the configuration file can be updated in a variety of ways, such as being distributed through a network or storage medium, so that weather types can be added, rendering effects can be modified, etc. without changing the rendering framework, thereby greatly improving scalability and maintainability while reducing design costs.

[0068] S103, performing weather rendering on the sky layout according to the weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model.

[0069] Create a sky layout, put each weather type into the sky layout, separate them with three-dimensional positions, call the configuration files of each weather element set corresponding to each weather type, use the Open GL (Open Graphics Library) library for rendering, and convert the data in the configuration file into an actual three-dimensional weather model to achieve highly realistic rendering effects.

[0070] In actual applications, the weather conditions around the user can be identified, the corresponding three-dimensional weather model can be selected, and the previous weather effects can be switched.

[0071] Therefore, the present invention expresses the attribute information of each weather element in the form of a configuration file in three-dimensional space through a design tool, and completes the data-driven rendering in the configuration file through a rendering engine to achieve a highly restored three-dimensional weather rendering effect. This data-driven approach allows users to freely adjust the attribute information of various weather elements in weather phenomena to meet personalized needs, greatly improving design and development efficiency.

[0072] In order to further improve the effect of restoring three-dimensional weather rendering, the following attributes can be added to each weather type in the sky layout: coordinate information of the sky layout and lens parameters corresponding to each weather type. The implementation process of the above step S103 is as follows: obtain the coordinate information of the sky layout and the lens parameters corresponding to each weather type, and then perform weather rendering on the sky layout based on the coordinate information and lens parameters corresponding to each weather type, the weather element set and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model.

[0073] In this embodiment, the coordinate information of the sky layout: can define the position coordinates (x, y, z) of the sky layout in three-dimensional space. By setting the position coordinates of the sky layout, it can be placed in different positions, thereby changing the display effect of different weather types in the scene.

[0074] Lens parameters corresponding to weather types: You can define the lens parameters used for each weather type, including lens coordinates and FOV (Field of View). The lens coordinates determine the observation position and direction of the weather type, and you can adjust the coordinates to achieve the observation effect of different weather types. FOV refers to the field of view, which determines the size of the range that can be seen when observing the weather type. By adjusting the FOV, you can control the display effect of the scene, such as enlarging or reducing the display range of a specific weather type.

[0075] These properties can be used to control the display effects of different weather types in the scene and achieve more realistic sky rendering. In the implementation process, you can use a 3D graphics library or engine to process these properties and use the API interfaces they provide to set and render the sky layout and various weather types.

[0076] The following is an introduction to the cloud layer's attribute information.

[0077] The cloud attributes include: cloud cyclic disturbance, cloud edge dissipation, and cloud dissolution. Different weather effects can be displayed by identifying the weather conditions around the user.

[0078] in, Figure 2 The present invention is a flowchart of determining the cyclic disturbance of clouds according to an embodiment of the present invention.

[0079] like Figure 2 As shown, the process of determining the cyclic disturbance of clouds disclosed in the present invention includes:

[0080] S201, based on a first set slowing-down coefficient k1, adjusting the current time stamp uTime to obtain a first slowing-down time time1.

[0081] Among them, the first slowing down time time1=uTime*k1: this is the method to set the current time in the simulation, where k1 is a slowing down coefficient that can control the speed of time.

[0082] S202: Based on the second set slowing-down coefficient k2, the current time stamp uTime is adjusted to obtain a second slowing-down time time2.

[0083] The second slowing down time time2=uTime*k2; k2 is also a slowing down coefficient, which can be adjusted according to the demand to control the speed of time.

[0084] S203, obtaining a target coordinate vector nuv of the current pixel of the cloud; wherein the target coordinate vector nuv is obtained by adjusting the original coordinate vector uv of the current pixel of the cloud based on the set scaling vector k3.

[0085] Among them, nuv=uv*k3; this is used to scale the original coordinate vector of the current pixel of the cloud. By adjusting the scaling vector k3, the size of the cloud can be changed.

[0086] S204 , generating disturbance noise n based on the first slowing down time time1 , the second slowing down time time2 and the target coordinate vector nuv.

[0087] A three-dimensional FBM (fractional Brownian motion) algorithm is used to calculate the disturbance noise n with the first slowing down time time1, the second slowing down time time2 and the target coordinate vector nuv as parameters; this is a common operation in geographic information systems (GIS) or similar fields, where the FBM algorithm is often used to generate random, continuous noise data to simulate natural phenomena.

[0088] S205, based on the disturbance noise n, the original coordinate vector uv is disturbed to obtain the cyclic disturbance of the cloud.

[0089] Use the Open GL Shader Language standard function smoothstep to remap n to the range of 0 to 1 to make the noise curve steeper, denoted as m, where the standard function smoothstep is used to achieve a smooth transition effect.

[0090] In the shader program, when using the standard function texture to obtain the front normal, back normal, internal light transmittance and opacity of the cloud, replace the commonly used function texture(uv) with the function texture(uv+m), where uv is the original coordinate vector. This is used to obtain the material data after the current pixel coordinates are offset by a certain distance in the two-dimensional plane according to the noise when obtaining the map pixel. This step is used to offset the pixel coordinates of the map according to the disturbance caused by the noise, thereby changing the location where the material data is obtained.

[0091] The acquired material data is synthesized so that all rendered cloud image data can be combined into a final image or scene.

[0092] Figure 3 The present invention is a flowchart of determining the edge dissipation of a cloud according to an embodiment of the present invention.

[0093] like Figure 3 As shown, the process of determining the edge dissipation of a cloud in the present disclosure includes:

[0094] S301, adjusting the current timestamp based on a first set slowing-down coefficient to obtain a first slowing-down time time1.

[0095] S302: Based on a second set slowing-down coefficient, adjust the current timestamp to obtain a second slowing-down time time2.

[0096] S303, obtaining a target coordinate vector nuv of the current pixel of the cloud; wherein the target coordinate vector nuv is obtained by adjusting the original coordinate vector uv of the current pixel of the cloud based on the set scaling vector.

[0097] S304: Generate disturbance noise n based on the first slowing down time time1, the second slowing down time time2 and the target coordinate vector nuv.

[0098] It should be noted that the implementation process of steps S301-S304 is detailed in the above-mentioned contents of steps S201-S204, and will not be described in detail here.

[0099] S305, obtaining depth information d and opacity alpha corresponding to the current pixel of the cloud.

[0100] For example, the standard function texture can be used in the shader program to obtain the depth information of the cloud at the current pixel, recorded as d, that is, to obtain the depth information of the current pixel in the three-dimensional space.

[0101] In the shader program, use the standard texture function to get the alpha value of the cloud at the current pixel.

[0102] S306: Determine the boundary edge of the cloud according to the start edge boundary value startEdge and the end edge boundary value endEdge of the cloud and the depth information d.

[0103] Use the standard function shader and the appropriate start edge limit value startEdge and end edge limit value endEdge, call smoothstep(endEdge, startEdge, d), and the result is used as the boundary edge of the cloud. The boundary edge of the cloud is used as a parameter to determine whether the current pixel belongs to the edge pixel of the cloud.

[0104] S307 , adjusting the opacity alpha of the current pixel of the cloud according to the cloud boundary edge and the disturbance noise n.

[0105] The opacity alpha of the current pixel is calculated according to the formula alpha'=alpha-edge*edge-edge*n*0.8 to obtain the adjusted opacity alpha', so that the edge disappears naturally.

[0106] S308, determining whether the edge of the cloud disappears according to the adjusted opacity alpha' corresponding to each pixel in the cloud.

[0107] Use alpha' as the opacity of the current pixel in subsequent rendering calculations to determine the edge dissipation of the cloud.

[0108] The cloud edge dissipation disclosed in the present invention simulates the cloud edge dissipation effect by operating at the pixel level and utilizing depth information and noise. This method can produce a very natural and realistic effect.

[0109] Figure 4 The present invention is a flowchart of determining the dissolution and dissipation of clouds according to an embodiment of the present invention.

[0110] It should be noted that the dissolution and dissipation of clouds is based on the dissipation of the edges of the clouds.

[0111] like Figure 4 As shown, the process of determining the dissolution and dissipation of clouds disclosed herein comprises:

[0112] S401, adjusting the starting edge limit value startEdge of the cloud.

[0113] S402, determining the edge boundary value interval (startEdge, 1) according to the adjusted start edge boundary value startEdge'.

[0114] S403, mapping the end edge boundary value endEdge of the cloud to the edge boundary value interval according to the animation driving coefficient p, to obtain an updated end edge boundary value endEdge'.

[0115] S404: Determine the dissolution of the cloud according to the adjusted start edge boundary value startEdge' and the updated end edge boundary value endEdge'.

[0116] In this embodiment, startEdge is adjusted, and endEdge is mapped to the interval of (startEdge, 1) according to the animation driving parameter p. By adjusting the values ​​of startEdge and endEdge, the dissolution effect of the cloud can be controlled. The animation driving parameter p can be dynamically adjusted according to time or other animation control parameters. Mapping endEdge to the interval of (startEdge, 1) can ensure that the cloud gradually disappears from sight during the dissipation process.

[0117] The present invention realizes the dissolution and dissipation of clouds by adjusting edge judgment parameters and animation driving parameters to simulate the formation and dissipation process of clouds. This method combines pixel-level operations and depth information, and uses noise to enhance the natural effect. In this way, by adjusting the driving parameters, the dissipation and dissolution effect of clouds can be rendered. This effect is used for the process of cloud appearance and disappearance, and can very well simulate the natural effect of water vapor gathering in the atmosphere to form clouds and being blown away and disappearing by the wind.

[0118] In summary, according to the weather rendering method of the embodiment of the present disclosure, a weather element set corresponding to each weather type in a plurality of weather types is first obtained, wherein the weather type is obtained by dividing the real weather phenomenon, and a configuration file of each weather element in the weather element set corresponding to each weather type is obtained, wherein the configuration file includes the attribute information of each weather element, and then weather rendering is performed on the sky layout according to the weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model. Therefore, the present disclosure expresses the attribute information of each weather element in the sky layout in the form of a configuration file, and completes the data-driven rendering in the configuration file through a rendering engine to achieve a highly restored three-dimensional weather rendering effect. This data-driven method allows users to freely adjust the attribute information of various weather elements that make up the weather phenomenon, and can modify the weather type to meet personalized needs, thereby greatly improving design and development efficiency.

[0119] Figure 5 is a block diagram of a weather rendering device according to an embodiment of the present disclosure.

[0120] like Figure 5 As shown, the weather rendering device 500 of the embodiment of the present disclosure includes:

[0121] The first acquisition module 510 is used to acquire a weather element set corresponding to each weather type among multiple weather types; wherein the weather type is obtained by dividing the real weather phenomenon;

[0122] The second acquisition module 520 is used to acquire the configuration file of each weather element in the weather element set corresponding to each weather type; wherein the configuration file includes the attribute information of each weather element;

[0123] The rendering module 530 is used to perform weather rendering on the sky layout according to the weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model.

[0124] In one embodiment of the present disclosure, the rendering module 530 is used to perform weather rendering on the sky layout according to the weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model, including:

[0125] Get the coordinate information of the sky layout;

[0126] Get the lens parameters corresponding to each weather type;

[0127] Based on the coordinate information, as well as the lens parameters corresponding to each weather type, the weather element set and the attribute information of each weather element in the weather element set, weather rendering is performed on the sky layout to obtain a three-dimensional weather model.

[0128] In one embodiment of the present disclosure, the weather element set includes at least one of the following weather elements:

[0129] Sky color, light source, clouds, thin clouds, sun, raindrop effects, snowflake effects, haze effects, sandstorm effects, sandstorm effects and dust storm effects.

[0130] In one embodiment of the present disclosure, the attribute information of the cloud layer includes: cyclic disturbance of the cloud, edge dissipation of the cloud, and dissolution and dissipation of the cloud.

[0131] In one embodiment of the present disclosure, the apparatus further includes: a first determination module, wherein the first determination module is used to determine the cyclic disturbance of the cloud, including:

[0132] Based on the first set slowing-down coefficient, the current timestamp is adjusted to obtain a first slowing-down time;

[0133] Based on the second set slowing-down coefficient, the current timestamp is adjusted to obtain a second slowing-down time;

[0134] Obtaining a target coordinate vector of a current pixel of the cloud; wherein the target coordinate vector is obtained by adjusting an original coordinate vector of the current pixel of the cloud based on a set scaling vector;

[0135] generating disturbance noise based on the first slowing down time, the second slowing down time and the target coordinate vector;

[0136] Based on the disturbance noise, the original coordinate vector is disturbed to obtain the cyclic disturbance of the cloud.

[0137] In one embodiment of the present disclosure, the device further includes: a second determination module, which is used to determine that the edge of the cloud dissipates, including:

[0138] Get the depth information and opacity corresponding to the current pixel of the cloud;

[0139] Determine the boundary of the cloud according to the starting edge limit value and the ending edge limit value of the cloud and the depth information;

[0140] According to the cloud boundary and disturbance noise, the opacity of the current pixel of the cloud is adjusted;

[0141] Determine the edge dissipation of the cloud based on the adjusted opacity of each pixel in the cloud.

[0142] In one embodiment of the present disclosure, the device further includes: a second determination module, which is used for the dissolution and dissipation of clouds and includes:

[0143] Adjust the edge limit value of the cloud start time;

[0144] Determine the margin limit value interval according to the adjusted starting margin limit value;

[0145] According to the animation driving coefficient, the end edge limit value of the cloud is mapped to the edge limit value interval to obtain the updated end edge limit value;

[0146] The dissolution of the cloud is determined based on the adjusted start edge limit value and the updated end edge limit value.

[0147] It should be noted that for details not disclosed in the weather rendering device of the embodiment of the present disclosure, please refer to the details disclosed in the weather rendering method of the embodiment of the present disclosure, and the details will not be repeated here.

[0148] According to the weather rendering device of the embodiment of the present disclosure, a weather element set corresponding to each weather type in a plurality of weather types is obtained through a first acquisition module, and the weather type is obtained by dividing the real weather phenomenon. A configuration file of each weather element in the weather element set corresponding to each weather type is obtained through a second acquisition module, and the configuration file includes the attribute information of each weather element. The sky layout is subjected to weather rendering by a rendering module according to the weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set, so as to obtain a three-dimensional weather model. Thus, the device expresses the attribute information of each weather element in the sky layout in the form of a configuration file, and completes the data-driven rendering in the configuration file through a rendering engine, so as to achieve a highly restored three-dimensional weather rendering effect. This data-driven method allows users to freely adjust the attribute information of various weather elements in the weather phenomenon, and can modify the weather type to meet personalized needs, greatly improving the design and development efficiency.

[0149] In order to implement the above embodiments, the present disclosure also provides an electronic device.

[0150] The electronic device of an embodiment of the present disclosure includes: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the above-mentioned weather rendering method.

[0151] The electronic device of the disclosed embodiment adopts the above-mentioned weather rendering method, expresses the attribute information of each weather element in the sky layout in the form of a configuration file, and completes the data-driven rendering in the configuration file through the rendering engine to achieve a highly restored three-dimensional weather rendering effect. This data-driven method allows users to freely adjust the attribute information of various weather elements in weather phenomena, modify the weather type, meet personalized needs, and greatly improve design and development efficiency.

[0152] In order to implement the above embodiments, the present disclosure also proposes a computer-readable storage medium.

[0153] Among them, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the above weather rendering method.

[0154] The computer-readable storage medium of the disclosed embodiment adopts the above-mentioned weather rendering method, expresses the attribute information of each weather element in the sky layout in the form of a configuration file, and completes the data-driven rendering in the configuration file through the rendering engine to achieve a highly restored three-dimensional weather rendering effect. This data-driven method allows users to freely adjust the attribute information of various weather elements in weather phenomena, modify the weather type, meet personalized needs, and greatly improve design and development efficiency.

[0155] In order to implement the above embodiments, the present disclosure also provides a computer program product.

[0156] When the computer program product is executed by a processor of an electronic device, the electronic device is enabled to perform the above weather rendering method.

[0157] The computer-aided product of the disclosed embodiment adopts the above-mentioned weather rendering method, expresses the attribute information of each weather element in the sky layout in the form of a configuration file, and completes the data-driven rendering in the configuration file through the rendering engine to achieve a highly restored three-dimensional weather rendering effect. This data-driven method allows users to freely adjust the attribute information of various weather elements in weather phenomena, modify the weather type, meet personalized needs, and greatly improve design and development efficiency.

[0158] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0159] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0160] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.

[0161] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0162] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0163] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0164] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0165] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.

Claims

1. A weather rendering method, characterized in that: include: Obtaining a weather element set corresponding to each of the multiple weather types; wherein the weather type is obtained by dividing real weather phenomena; Obtaining a configuration file of each weather element in a weather element set corresponding to each weather type; wherein the configuration file includes attribute information of each weather element; According to the weather element sets corresponding to the weather types and the attribute information of each weather element in the weather element sets, weather rendering is performed on the sky layout to obtain a three-dimensional weather model.

2. The method according to claim 1, characterized in that The step of performing weather rendering on the sky layout according to the weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model includes: Obtaining coordinate information of the sky layout; Obtain lens parameters corresponding to each weather type; Based on the coordinate information, as well as the lens parameters corresponding to each weather type, the weather element set and the attribute information of each weather element in the weather element set, weather rendering is performed on the sky layout to obtain the three-dimensional weather model.

3. The method according to claim 1, characterized in that The weather element set includes at least one of the following weather elements: Sky color, light source, clouds, thin clouds, sun, raindrop effects, snowflake effects, haze effects, sandstorm effects, sandstorm effects and dust storm effects.

4. The method according to claim 3, characterized in that The attribute information of the cloud layer includes: cyclic disturbance of the cloud, edge dissipation of the cloud and dissolution and dissipation of the cloud.

5. The method according to claim 4, characterized in that: The cyclic disturbance of the cloud is determined by the following steps: Based on the first set slowing-down coefficient, the current timestamp is adjusted to obtain a first slowing-down time; Based on a second set slowing-down coefficient, adjusting the current timestamp to obtain a second slowing-down time; Obtaining a target coordinate vector of a current pixel of the cloud; wherein the target coordinate vector is obtained by adjusting an original coordinate vector of the current pixel of the cloud based on a set scaling vector; generating disturbance noise based on the first slowing down time, the second slowing down time and the target coordinate vector; Based on the disturbance noise, the original coordinate vector is disturbed to obtain the cyclic disturbance of the cloud.

6. The method according to claim 5, characterized in that The edge dissipation of the cloud is determined by the following steps: Obtaining depth information and opacity corresponding to a current pixel of the cloud; Determine the boundary of the cloud according to the starting edge limit value and the ending edge limit value of the cloud and the depth information; Adjusting the opacity of a current pixel of the cloud according to the boundary of the cloud and the disturbance noise; The edge dissipation of the cloud is determined according to the adjusted opacity of each pixel in the cloud.

7. The method according to claim 6, characterized in that The dissolution and dissipation of the cloud is determined by the following steps: Adjusting the starting edge limit value of the cloud; Determine the margin limit value interval according to the adjusted starting margin limit value; According to the animation driving coefficient, the end edge limit value of the cloud is mapped to the edge limit value interval to obtain an updated end edge limit value; The dissolution of the cloud is determined according to the adjusted starting edge limit value and the updated ending edge limit value.

8. A weather rendering device, characterized in that: include: A first acquisition module is used to acquire a set of weather elements corresponding to each of the multiple weather types; wherein the weather types are obtained by dividing real weather phenomena; A second acquisition module is used to acquire a configuration file of each weather element in a weather element set corresponding to each weather type; wherein the configuration file includes attribute information of each weather element; The rendering module is used to perform weather rendering on the sky layout according to the weather element set corresponding to each weather type and the attribute information of each weather element in the weather element set to obtain a three-dimensional weather model.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the weather rendering method as described in any one of claims 1-7.

10. A computer-readable storage medium, when instructions in the storage medium are executed by a processor, enables the processor to execute the weather rendering method according to any one of claims 1 to 7.