Cloud layer rendering method and device, computer readable storage medium and electronic device
By using light stepping and shadow color configuration methods, the applicability of cloud rendering in cartoon animation was solved, achieving cloud rendering with 3D effects and a hand-drawn style.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-02-28
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, cloud rendering methods are difficult to adapt to the stylized rendering scenarios of cartoon animation, lacking hand-drawn texture and dynamic expressiveness.
By copying pre-made 2D cloud materials using light stepping, adjusting shadow color information, and offsetting and overlaying multiple cloud shadow materials along the preset lighting direction, a 3D cloud rendering effect is achieved.
The created clouds have a sense of volume and hand-drawn brushstrokes, making them suitable for cartoon animation and enhancing dynamic expressiveness and controllability of artistic effects.
Smart Images

Figure CN116152421B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of animation production technology, and in particular to a cloud rendering method, cloud rendering device, computer-readable storage medium, and electronic device. Background Technology
[0002] In games, clouds are often added to the sky to enrich the visual content of the sky scene, so as to avoid the sky scene being too monotonous and thus improve the user's visual experience.
[0003] In related technologies, the beammarching algorithm is commonly used to create 3D volumetric clouds. However, clouds created using this method are primarily realistic in their rendering, aiming for a lifelike effect, but they are difficult to achieve a hand-drawn look and are not well-suited for stylized rendering scenes with cartoon or animation characteristics.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] This disclosure provides a cloud rendering method, cloud rendering apparatus, computer-readable storage medium, and electronic device, thereby overcoming, to at least a certain extent, the problem that clouds created in related technologies are difficult to adapt to stylized rendering scenes with cartoon animation.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] According to a first aspect of this disclosure, a cloud rendering method is provided, the method comprising: copying a pre-made two-dimensional cloud material by means of light stepping to obtain multiple cloud copy materials; adjusting the color information of the multiple cloud copy materials based on shadow color configuration information to obtain multiple cloud shadow materials corresponding to the pre-made two-dimensional cloud material; offsetting and superimposing the multiple cloud shadow materials on the pre-made two-dimensional cloud material along a preset lighting direction of the pre-made two-dimensional cloud material to render a cloud layer with a three-dimensional effect on the pre-made two-dimensional cloud material.
[0008] According to a second aspect of this disclosure, a cloud rendering apparatus is provided, the apparatus comprising: a material copying module for copying a pre-made two-dimensional cloud material by means of light stepping to obtain multiple cloud copy materials; a shadow creation module for adjusting the color information of the multiple cloud copy materials based on shadow color configuration information to obtain multiple cloud shadow materials corresponding to the pre-made two-dimensional cloud material; and a material overlay module for offsetting and overlaying the multiple cloud shadow materials on the pre-made two-dimensional cloud material along a preset lighting direction to render a cloud layer with a three-dimensional effect on the pre-made two-dimensional cloud material.
[0009] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described cloud rendering method.
[0010] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the cloud rendering method described above by executing the executable instructions.
[0011] The technical solution disclosed herein has the following beneficial effects:
[0012] In the cloud rendering process described above, pre-made 2D cloud materials are copied using a step-by-step lighting technique to obtain multiple cloud copy materials. Based on the shadow color configuration information, the color information of these multiple cloud copy materials is adjusted to obtain multiple cloud shadow materials corresponding to the pre-made 2D cloud materials. Along the preset lighting direction of the pre-made 2D cloud materials, these multiple cloud shadow materials are offset and superimposed on the pre-made 2D cloud materials to render a cloud layer with a 3D effect. On one hand, the step-by-step offset processing of the pre-made 2D cloud materials allows the created clouds to have a sense of volume while also achieving a hand-drawn brushstroke effect, resulting in strong control over the artistic effect and making it well-suited for stylized rendering scenes in cartoon animation. On the other hand, superimposing cloud shadow materials along the preset lighting direction of the pre-made 2D cloud materials enables interaction between the clouds and light, which can enhance the dynamic expressiveness of the clouds to a certain extent, making the cloud presentation effect more in line with natural laws.
[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0015] Figure 1 A flowchart illustrating a cloud rendering method in this exemplary embodiment is shown;
[0016] Figure 2 An example diagram of a prefabricated two-dimensional cloud material is shown in this exemplary embodiment;
[0017] Figure 3A This illustration shows an example of a cloud layer created without edge diffusion blurring in this exemplary embodiment.
[0018] Figure 3B This illustration shows an example of a cloud layer created using edge diffusion blurring in this exemplary embodiment.
[0019] Figure 4A This illustration shows an example of a cloud formation created without adding noise to the edges of the material in this exemplary embodiment.
[0020] Figure 4B This illustration shows an example of a cloud layer created by adding noise to the edges of the material in this exemplary embodiment.
[0021] Figure 5A This diagram illustrates an example of a cloud layer without volume assumptions in this exemplary embodiment.
[0022] Figure 5B This diagram illustrates an example of a cloud layer after volume assumption in this exemplary embodiment.
[0023] Figure 6A This diagram illustrates an example of a cloud without Fresnel reflections in this exemplary embodiment.
[0024] Figure 6B This illustration shows an example of a cloud layer with Fresnel reflection parameters added in this exemplary embodiment.
[0025] Figure 7A This illustration shows an example of a cloud layer without noise sampling in this exemplary embodiment.
[0026] Figure 7B This illustration shows an example of a cloud layer sampled by noise in this exemplary embodiment.
[0027] Figure 8AThis diagram illustrates an example of a cloud layer without a superimposed pre-fabricated flow map in this exemplary embodiment.
[0028] Figure 8B This illustration shows an example of a cloud layer overlaid with a prefabricated flow map in this exemplary embodiment.
[0029] Figure 9A This illustration shows an example of a cloud layer without shadow boundary color configuration in this exemplary embodiment;
[0030] Figure 9B This illustration shows an example of a cloud layer with a shadow boundary color configuration in this exemplary embodiment;
[0031] Figure 10 This illustrates a flowchart of a cloud layer creation process using a step-overlay method in this exemplary embodiment.
[0032] Figure 11A This illustration shows an example of applying the created cloud layer to a game scene in this exemplary embodiment.
[0033] Figure 11B This illustration shows another example of applying the created cloud layer to a game scene in this exemplary embodiment;
[0034] Figure 11C This illustration shows another example of applying the created cloud layer to a game scene in this exemplary embodiment.
[0035] Figure 12 This diagram illustrates a structural block diagram of a cloud rendering apparatus according to an exemplary embodiment of the present invention.
[0036] Figure 13 An electronic device for implementing the above-described cloud rendering method is shown in this exemplary embodiment. Detailed Implementation
[0037] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0038] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0039] In this article, "first," "second," etc., are labels for specific objects, rather than limiting the number or order of objects.
[0040] In related technologies, the commonly used cloud creation methods are mainly based on realistic rendering, pursuing a lifelike effect of clouds, but lacking the texture of hand-drawn art, and are not suitable for stylized rendering scenes with cartoon animation.
[0041] In view of one or more of the above-mentioned problems, exemplary embodiments of this disclosure provide a cloud rendering method, apparatus, computer-readable storage medium, and electronic device.
[0042] Figure 1 A flowchart illustrating a cloud rendering method is provided, which may specifically include the following steps S110 to S130:
[0043] Step S110: The pre-made two-dimensional cloud material is copied by light stepping to obtain multiple cloud copy materials;
[0044] Step S120: Based on the shadow color configuration information, adjust the color information of multiple cloud copy materials to obtain multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material;
[0045] Step S130: Along the preset lighting direction of the pre-made 2D cloud material, multiple cloud shadow materials are offset and superimposed on the pre-made 2D cloud material to render a cloud layer with a 3D effect on the pre-made 2D cloud material.
[0046] In the rendering process of the aforementioned clouds, by using step-off processing on the pre-made 2D cloud materials, the created clouds achieve both a sense of volume and a hand-drawn brushstroke effect. This provides strong control over the artistic effect and makes it well-suited for stylized rendering scenes in cartoon animation. Furthermore, by overlaying cloud shadow materials along the preset lighting direction parameters of the pre-made 2D cloud materials, interaction between the clouds and light is achieved, which enhances the dynamic expressiveness of the clouds to a certain extent, making the cloud presentation more in line with natural laws.
[0047] The following are Figure 1The specific implementation methods of each step in the illustrated embodiment are described in detail below:
[0048] Step S110: The pre-made two-dimensional cloud material is copied by light stepping to obtain multiple cloud copy materials.
[0049] Pre-made 2D cloud assets can be pre-created 2D image assets containing clouds imported from external systems. The clouds in these 2D images can be hand-drawn in style. Since clouds are usually predominantly white, pre-made 2D cloud assets can be cloud assets with a predominantly white tone.
[0050] It should be noted that the brightness and darkness of different parts in the pre-made 2D cloud material may vary. For example, such as... Figure 2 The provided pre-made 2D cloud material is shown. Furthermore, using different configuration parameters during the cloud generation process with the same pre-made 2D cloud material can generate cloud layers of different shapes, which can improve the efficiency of cloud layer production to some extent.
[0051] Each copy of a pre-made 2D cloud material yields one cloud copy material. Therefore, by copying the pre-made 2D cloud material based on a preset number of copies, a cloud copy material matching the preset number of copies can be obtained. The preset number of copies can be set by the developers according to actual needs; no specific limit is imposed here. For example, the preset number of copies can be set to 32.
[0052] In one alternative implementation, before replicating the prefabricated two-dimensional cloud material using ray stepping to obtain multiple cloud replicas, the following step can be performed: blurring the edges of the prefabricated two-dimensional cloud material.
[0053] In the above steps, by blurring the edges of the pre-made two-dimensional cloud material, not only can the edges of the pre-made two-dimensional cloud material become more like fog, but the edges of the cloud replication material can also become blurred, thus making the produced cloud layer have a hazy feeling, closer to the real cloud, and also saving a certain amount of production cost and improving production efficiency.
[0054] In one alternative implementation, the blurring of the edges of a prefabricated two-dimensional cloud material can be achieved through the following steps: based on a preset blurring step size, the edges of the prefabricated two-dimensional cloud material are subjected to diffusion blurring to blur the edges of the prefabricated two-dimensional cloud material.
[0055] For example, a pre-made 2D cloud material can be expanded outwards in multiple steps with a preset blur step size to create a visual blurring effect at the edges of the pre-made 2D cloud material. The specific preset blur step size parameter can be set by the developers according to actual needs, and is not specifically limited here.
[0056] In the above steps, the degree of edge blurring can be changed by adjusting the preset blur step size. This method does not rely on tedious image sampling and can improve the efficiency of blurring processing to a certain extent. Furthermore, by applying diffusion blurring to the edges of the pre-made 2D cloud material, the visual impact of edge features can be weakened, thus producing a blurred edge visual effect. This can further blur the cloud replica material copied based on the pre-made 2D cloud material. For example, Figure 3A An example image of clouds created without edge diffusion blurring is provided. Figure 3B An example image of a cloud layer is provided, which has been created by edge diffusion blurring.
[0057] In one optional implementation, when blurring the edges of the prefabricated two-dimensional cloud material, the following steps may also be performed: obtaining a first preset noise map and sampling the first preset noise map; adding noise to the edge portion of the prefabricated two-dimensional cloud material based on the noise sampling results of the first preset noise map.
[0058] The first noise map can be a random perturbation map created based on the interaction of two colors or materials. For example, noise can be added to the UV space corresponding to the pre-made 2D cloud material based on the noise sampling results of the first preset noise map, causing distortion in the UV map of the pre-made 2D cloud material. Then, excluding the central part of the material in the UV map of the pre-made 2D cloud material can blur the edges of the pre-made 2D cloud material. Furthermore, by adjusting the sampling parameters for the first preset noise map, the edge blurring state of the pre-made 2D cloud material can be controlled, causing distortion at the cloud edges, thereby improving the controllability of the cloud edge state and enhancing the stylistic characteristics of the clouds. For example, Figure 4A An example image of clouds created without adding noise to the edges of the source material is provided; Figure 4B An example image of clouds created by adding noise to the edges of source material is provided.
[0059] After obtaining the cloud-copied materials, you can continue with step S120.
[0060] Step S120: Based on the shadow color configuration information, adjust the color information of multiple cloud copy materials to obtain multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material;
[0061] Since clouds typically create shadows under illumination, the shadow color configuration information here can be used to control the color of the cloud shadow material. The specific configuration can be set by the developers according to their actual needs, and no specific limitations are made here.
[0062] For example, the shadow color configuration information can be a set of colors from light to dark, and these cloud-replicated materials can be assigned colors sequentially based on this shadow color configuration information.
[0063] For example, the shadow color configuration information can also be a color. For instance, the shadow color configuration information can be set to dark gray, and the cloud-replicated materials can be assigned colors sequentially based on this shadow color configuration information.
[0064] In one optional implementation, after obtaining multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material, the following steps can be performed to adjust the display status information of the cloud shadow material: the brightness information of the prefabricated two-dimensional cloud material is height-converted to generate a height map corresponding to the prefabricated two-dimensional cloud material; based on the height map corresponding to the prefabricated two-dimensional cloud material, the height maps corresponding to the multiple cloud shadow materials are determined; based on the height maps corresponding to the multiple cloud shadow materials, the brightness information of the cloud shadow material is adjusted.
[0065] The colors of prefabricated 2D cloud materials may vary in brightness. Therefore, the brightness information of the prefabricated 2D cloud materials can be highly variable to generate a height map corresponding to the prefabricated 2D cloud materials. Specifically, the whiter parts of the prefabricated 2D cloud materials can be used as the high points of the height map, and the darker parts can be used as the low points of the height map.
[0066] The heightmap corresponding to the cloud shadow material refers to the heightmap generated from the height information inherited from the pre-made 2D cloud material. For example, the heightmap corresponding to the cloud shadow material can be the same as the heightmap corresponding to the pre-made 2D cloud material. Figure 1 By associating the brightness information of prefabricated 2D cloud materials with the height values of a height map, the brightness information of the prefabricated 2D cloud materials can be transferred to cloud shadow materials, giving the generated cloud shadows a sense of light and dark variation.
[0067] In one alternative implementation, after determining the heightmaps corresponding to multiple cloud shadow materials, noise can be added to each of the heightmaps to create differences between them.
[0068] By adding noise to the height maps corresponding to multiple cloud shadow materials, the height values of the height maps corresponding to the cloud shadow materials can be changed. Based on the height maps with added noise, the brightness information of the corresponding cloud shadow materials can be adjusted, so that the brightness distribution of different cloud shadow materials is slightly different, which can avoid the colors of the cloud shadow parts being too monotonous and rigid.
[0069] In one alternative implementation, before adjusting the brightness information of the cloud shadow materials based on the height maps corresponding to multiple cloud shadow materials, the following steps may be performed: determining the photon attenuation parameters and light scattering parameters corresponding to multiple cloud shadow materials; adjusting the height values of the height maps corresponding to multiple cloud shadow materials based on the photon attenuation parameters and light scattering parameters, so that the created cloud layer can be affected by the lighting model, realizing the interaction between lighting and cloud layer, thereby improving the cloud layer rendering effect.
[0070] The photon attenuation parameter refers to a simulated parameter for the energy attenuation of light, which can be used to characterize the intensity of light attenuation. Since light attenuates when passing through clouds in real-world environments, adjusting the height value of the height map corresponding to the cloud shadow material based on the photon attenuation parameter can simulate the light attenuation phenomenon in real-world environments, thereby improving the rendering of clouds.
[0071] Among them, the light scattering parameter refers to the simulation parameters of light scattering, which can be used to characterize the intensity of light scattering. Since light scatters when passing through clouds in a real environment, causing some light to deviate from its original direction of propagation, adjusting the height value of the height map corresponding to the cloud shadow material based on the light scattering parameter can simulate the light scattering phenomenon in a real environment, thereby improving the rendering effect of the cloud layer.
[0072] It should be noted that, in order to better control the final rendering effect of the clouds and prevent the created clouds from being overexposed, the height value of the height map corresponding to the cloud shadow material can be controlled within a certain range through threshold calculation. For example, the height value of the height map can be controlled within the range of -1 to 1.
[0073] In one optional implementation, the determination of the photon attenuation parameters and illumination scattering parameters corresponding to the multiple cloud shadow materials can be achieved through the following steps: determining the assumed thickness of the multiple cloud shadow materials based on the height map corresponding to the multiple cloud shadow materials; and determining the photon attenuation parameters and illumination scattering parameters corresponding to the multiple cloud shadow materials based on the assumed thickness of the multiple cloud shadow materials.
[0074] In three-dimensional space, the Beer–Lambert law is usually used to determine the photon attenuation parameter, and the Henyey–Greenstein phase function is used to determine the illumination dispersion parameter.
[0075] The Bill-Lambert Law is shown in the following formula (1):
[0076]
[0077] Where A refers to absorbance; Io This refers to the intensity of the incident light; I t This refers to the intensity of transmitted light; T is the transmittance, K is a dielectric constant, l refers to the thickness of the absorbing medium, and c refers to the concentration of the light-absorbing substance. In this disclosure, the medium is cloud.
[0078] The Henney-Greenstein phase function is shown in the following formula (2):
[0079]
[0080] Where g refers to the atmospheric factor, which is a constant between -1 and 1; θ refers to the incident light angle; and P refers to the phase model.
[0081] When the cloud shadow materials are all two-dimensional images, the Bill-Lambert law and the Henney-Greenstein phase function cannot be directly applied. In this case, in this disclosure, the height value of the height map corresponding to the cloud shadow material can be used as the assumed thickness of the cloud shadow material. The cloud shadow material is regarded as a pseudo-three-dimensional model with a certain volume. Then, the Bill-Lambert law and the Henney-Greenstein phase function are used to determine the photon attenuation parameters and illumination scattering parameters corresponding to the cloud shadow material, respectively, thus transforming the three-dimensional attenuation and scattering algorithm into two dimensions.
[0082] By applying the aforementioned volume assumptions, a scattering effect that more closely matches the shape of the cloud is obtained, further enhancing the three-dimensionality of the cloud layer. For example, Figure 5A An example image of clouds without volume assumptions is provided, which has a strong sense of flatness. Figure 5B An example image of a cloud layer with volume assumptions is provided, which has a strong sense of three-dimensionality.
[0083] In one alternative implementation, before adjusting the brightness information of the cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials, the following steps may be performed: determining the Fresnel reflection parameters corresponding to the multiple cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials and the camera viewpoint; adjusting the height maps corresponding to the multiple cloud shadow materials based on the Fresnel reflection parameters corresponding to the multiple cloud shadow materials.
[0084] Fresnel reflection parameters refer to the simulation parameters of light reflection derived from the Fresnel formula, which can be used to characterize the intensity and angle of light reflection. The Fresnel formula is an important formula in optics that describes the behavior of light in media with different refractive indices. Since light reflects off clouds in real-world environments, adjusting the height map corresponding to the cloud shadow material based on the Fresnel reflection parameters can simulate the light emission phenomenon in real-world environments, thereby improving the representation of clouds.
[0085] Specifically, the Fresnel reflection parameters corresponding to the cloud shadow material can be determined based on the projection length of the height value of the height map corresponding to the cloud shadow material in the camera's field of view.
[0086] Based on the Fresnel reflection parameters corresponding to multiple cloud shadow images, the height maps corresponding to these images are adjusted to enhance the scattered edge light within the cloud shadow images, while simultaneously preventing the edge light from rotating with the camera's viewpoint. For example, Figure 6A An example image of clouds without Fresnel reflection is provided. Figure 6B An example image of a cloud layer with Fresnel reflection parameters added is provided.
[0087] In one optional implementation, after obtaining multiple cloud shadow materials corresponding to the pre-made two-dimensional cloud material, the following steps can be performed: obtaining a second preset noise map and performing various types of sampling on the second preset noise map to obtain multiple noise sampling results; based on the multiple noise sampling results, adding multiple types of noise to the UV space corresponding to the multiple cloud shadow materials respectively.
[0088] The second preset noise map can be a random perturbation map created based on the interaction of two colors or materials. It should be noted that the second preset noise map can use the same noise map as the first preset noise map to save production costs.
[0089] For example, the second preset noise map can be sampled along two different directions / angles to obtain two different noise sampling results. By adding multiple types of noise to the UV space corresponding to each cloud shadow material, the visual repetition of the cloud shadow material's shape can be avoided.
[0090] Furthermore, when adding various noises to the UV space corresponding to the multiple cloud shadow materials, the height map corresponding to the cloud shadow materials can be changed based on the sampling results of the various noises to adaptively adjust the brightness information corresponding to the cloud shadow materials.
[0091] For example, Figure 7A An example image of a cloud layer without noise sampling is provided. Figure 7B An example image of a cloud layer after noise sampling is provided.
[0092] It should be noted that when adding noise to cloud shadow footage, both batch control and individual control functions can be configured for user selection. For example, the batch control function can add noise to multiple cloud shadow footage corresponding to multiple cloud layers simultaneously; the individual control function can add noise to multiple cloud shadow footage corresponding to a single cloud layer individually. For example, the batch control function can also add noise to multiple cloud shadow footage corresponding to a single cloud layer simultaneously; the individual control function can also add noise to a single cloud shadow footage corresponding to a single cloud layer.
[0093] In one alternative implementation, after obtaining multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material, the following steps may be performed: obtaining a prefabricated flow map; superimposing the prefabricated flow map in the UV space corresponding to the prefabricated two-dimensional cloud material to distort the prefabricated two-dimensional cloud material; and / or superimposing the prefabricated flow map in the UV space corresponding to the multiple cloud shadow materials to distort the multiple cloud shadow materials.
[0094] A pre-made flow map is a texture that records two-dimensional vector information, with its color indicating the direction of the vector field. Overlaying a pre-made flow map onto the UV space of a pre-made two-dimensional cloud / cloud shadow texture can cause differences in the offset of different parts of the UV map, resulting in a distortion effect.
[0095] Furthermore, the UV offset of the prefabricated flow map can be varied over time to alter the cloud distortion state at different times, simulating the visual effect of clouds drifting in the wind and further enhancing the dynamic effect of the clouds. For example, Figure 8A An example image of a cloud layer without overlaying a prefabricated flow map is provided. Figure 8B An example image of a cloud layer overlaid with a prefabricated flow map is provided.
[0096] After obtaining the cloud shadow material corresponding to the prefabricated two-dimensional cloud material, step S130 can be continued.
[0097] Step S130: Along the preset lighting direction of the pre-made two-dimensional cloud material, multiple cloud shadow materials are offset and superimposed on the pre-made two-dimensional cloud material to render the cloud layer.
[0098] These cloud shadow materials can be offset and superimposed sequentially along the preset lighting direction to create cloud shadows and increase the three-dimensionality of the clouds.
[0099] If the shadow color configuration information is a set of colors from light to dark, the cloud shadow material can be overlaid in order of light to dark along the preset lighting direction.
[0100] If the shadow color configuration information is a single color, in one optional implementation, after offsetting and superimposing multiple cloud shadow materials on a prefabricated two-dimensional cloud material, one or more shadow boundary materials can be selected from the multiple cloud shadow materials based on the superposition order of the multiple cloud shadow materials; and the color information of the shadow boundary materials can be adjusted based on the shadow boundary color configuration information.
[0101] The shadow boundary color configuration information can be the transition color between the color of the pre-made 2D cloud material and the shadow color configuration information. The shadow boundary material can be several adjacent cloud shadow materials during the overlay process. For example, the cloud shadow materials of the first 5 overlays can be used as the shadow boundary material.
[0102] It should be noted that if the selected shadow boundary material does not include the cloud shadow material overlaid in the first layer, in order to ensure the reasonableness of the cloud shadow color transition, the selected shadow boundary material can be used as the dividing line. Based on the color information of the pre-made 2D cloud material, the color information of the cloud shadow material on the side closer to the pre-made 2D cloud material can be configured; based on the shadow color configuration information, the color information of the cloud shadow material on the side farther from the pre-made 2D cloud material can be configured.
[0103] For example, Figure 9A A cloud instance image without shadow boundary color configuration is provided. Figure 9B An example image of clouds with shade boundary color configuration is provided.
[0104] In the above steps, by determining the shadow boundary material and reconfiguring its color, a transitional state can be created in the color changes of the clouds, thereby enriching the sense of layering of the clouds.
[0105] To avoid overly sharp edges in the final generated cloud layer, in one alternative implementation, after offsetting and overlaying multiple cloud shadow materials on a pre-made 2D cloud material to render a cloud layer with a 3D effect on the pre-made 2D cloud material, a noise array based on screen pixels can also be overlaid on the cloud layer.
[0106] also, Figure 10 A method for creating cloud layers through step overlay processing is also provided, which may specifically include the following steps S1001 to S1011:
[0107] S1001, blur the edges of the pre-made two-dimensional cloud material;
[0108] S1002, by using light stepping, prefabricated two-dimensional cloud materials are copied to obtain multiple cloud copy materials;
[0109] S1003, Based on the shadow color configuration information, adjust the color information of multiple cloud copy materials to obtain multiple cloud shadow materials corresponding to the pre-made two-dimensional cloud material;
[0110] S1004, The brightness information of the prefabricated two-dimensional cloud material is converted into height to generate a height map corresponding to the prefabricated two-dimensional cloud material;
[0111] S1005, Based on the height map corresponding to the pre-made two-dimensional cloud material, determine the height map corresponding to multiple cloud shadow materials;
[0112] S1006, add noise to the height maps corresponding to multiple cloud shadow materials respectively, in order to adjust the height values of the height maps corresponding to multiple cloud shadow materials;
[0113] S1007, Based on the height maps corresponding to multiple cloud shadow materials, adjust the brightness information of the cloud shadow materials;
[0114] S1008, determine the photon attenuation parameters, light scattering parameters, and Fresnel reflection parameters corresponding to multiple cloud shadow materials, and adjust the brightness information of the cloud shadow materials based on the photon attenuation parameters, light scattering parameters, and Fresnel reflection parameters corresponding to multiple cloud shadow materials;
[0115] S1009 adds noise to the UV space corresponding to multiple cloud shadow materials and overlays a prefabricated flow map to distort the multiple cloud shadow materials;
[0116] S1010: Along the preset lighting direction of the pre-made 2D cloud material, multiple cloud shadow materials are offset and superimposed on the pre-made 2D cloud material to render a cloud layer with a 3D effect on the pre-made 2D cloud material.
[0117] S1011, overlays a noise array based on screen pixels onto the rendered clouds to further blur the rendered clouds.
[0118] To facilitate user operation, the cloud rendering method described above can be encapsulated. When cloud rendering is needed, it can be achieved simply by importing pre-made 2D cloud materials and reading relevant configuration parameters (such as preset copy count, shadow color configuration information, preset lighting direction, etc.). For example,... Figures 11A to 11C As shown, each of the above-mentioned cloud rendering methods provides an example of cloud rendering in a game scene, which combines volumetric and stylized effects.
[0119] Figure 12 A cloud rendering apparatus 1200 according to an exemplary embodiment of the present disclosure is shown, such as Figure 12 As shown, the cloud rendering device 1200 may specifically include:
[0120] The material copying module 1210 is used to copy pre-made two-dimensional cloud materials through light stepping to obtain multiple cloud copy materials;
[0121] The shadow creation module 1220 is used to adjust the color information of multiple cloud copy materials based on the shadow color configuration information to obtain multiple cloud shadow materials corresponding to the pre-made two-dimensional cloud material;
[0122] The material overlay module 1230 is used to offset and overlay multiple cloud shadow materials on the pre-made two-dimensional cloud material along the preset lighting direction of the pre-made two-dimensional cloud material, so as to render a cloud layer with a three-dimensional effect on the pre-made two-dimensional cloud material.
[0123] In an alternative implementation, before replicating the prefabricated two-dimensional cloud material by ray stepping to obtain multiple cloud replicas, the rendering device 1200 of the cloud layer may further include: an edge blurring module for blurring the edges of the prefabricated two-dimensional cloud material.
[0124] In one alternative implementation, the edge blurring module can also be configured to perform diffusion blurring on the edges of the pre-made two-dimensional cloud material based on a preset blurring step size.
[0125] In one optional implementation, the edge blurring processing module may further include an edge noise adding module, which may be configured to: acquire a first preset noise map and sample the first preset noise map; and add noise to the edge portion of the pre-made two-dimensional cloud material based on the noise sampling result of the first preset noise map.
[0126] In one optional implementation, the cloud rendering apparatus 1200 may further include: a boundary material determination module, which selects one or more shadow boundary materials from multiple cloud shadow materials based on the superposition order of multiple cloud shadow materials; and a shadow boundary material color information determination module, which adjusts the color information of the shadow boundary materials based on shadow boundary color configuration information.
[0127] In one optional implementation, after obtaining multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material, the cloud rendering device 1200 may further include: a brightness adjustment module, which may be configured to: perform height conversion on the brightness information of the prefabricated two-dimensional cloud material to generate a height map corresponding to the prefabricated two-dimensional cloud material; determine the height map corresponding to the multiple cloud shadow materials based on the height map corresponding to the prefabricated two-dimensional cloud material; and adjust the brightness information of the cloud shadow materials based on the height map corresponding to the multiple cloud shadow materials.
[0128] In one optional implementation, after determining the height maps corresponding to multiple cloud shadow materials, the brightness adjustment module may further include a height map noise addition module, used to add noise to the height maps corresponding to the multiple cloud shadow materials respectively, so that there are differences between the height maps corresponding to the multiple cloud shadow materials.
[0129] In one optional implementation, before adjusting the brightness information of the cloud shadow materials based on the height map corresponding to the multiple cloud shadow materials, the brightness adjustment module may further include: a first illumination parameter determination module, used to determine the photon attenuation parameters and illumination scattering parameters corresponding to the multiple cloud shadow materials; and a first height value adjustment module, used to adjust the height value of the height map corresponding to the multiple cloud shadow materials based on the photon attenuation parameters and illumination scattering parameters corresponding to the multiple cloud shadow materials.
[0130] In one alternative implementation, the first illumination parameter determination module can be configured to: determine the assumed thickness of the multiple cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials; and determine the photon attenuation parameter and illumination scattering parameter of the multiple cloud shadow materials based on the assumed thickness of the multiple cloud shadow materials.
[0131] In one optional implementation, before adjusting the brightness information of the cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials, the brightness adjustment module may further include: a second illumination parameter determination module, used to determine the Fresnel reflection parameters corresponding to the multiple cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials and the camera viewpoint; and a second height value adjustment module, used to adjust the height maps corresponding to the multiple cloud shadow materials based on the Fresnel reflection parameters corresponding to the multiple cloud shadow materials.
[0132] In one optional implementation, after obtaining multiple cloud shadow materials corresponding to the pre-made two-dimensional cloud materials, the rendering device 1200 of the cloud layer may further include: a UV space noise addition module, used to acquire a second preset noise map and perform multiple types of sampling on the second preset noise map to obtain multiple noise sampling results; based on the multiple noise sampling results, add multiple noises to the UV space corresponding to the multiple cloud shadow materials respectively.
[0133] In one optional implementation, after obtaining multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material, the rendering device 1200 of the cloud layer may further include: a material distortion module, which may be configured to: acquire a prefabricated flow map; superimpose the prefabricated flow map in the UV space corresponding to the prefabricated two-dimensional cloud material to distort the prefabricated two-dimensional cloud material; and / or superimpose the prefabricated flow map in the UV space corresponding to the multiple cloud shadow materials to distort the multiple cloud shadow materials.
[0134] In one alternative implementation, the UV offset of the prefabricated flow map in the material distortion module varies over time.
[0135] In one alternative implementation, after offsetting and overlaying multiple cloud shadow materials on a pre-made two-dimensional cloud material to render a cloud layer with a three-dimensional effect on the pre-made two-dimensional cloud material, the rendering device 1200 of the cloud layer may further include: a noise array adding module for overlaying a noise array based on screen pixels on the cloud layer.
[0136] The specific details of each module in the cloud rendering device 1200 described above have been described in detail in the method section of the implementation. For any undisclosed details, please refer to the implementation content of the method section, and therefore will not be repeated here.
[0137] Exemplary embodiments of this disclosure also provide a computer-readable storage medium storing a program product capable of implementing the cloud rendering method described above. In some possible embodiments, various aspects of this disclosure may also be implemented as a program product including program code that, when run on an electronic device, causes the electronic device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0138] The program product may be a portable compact disc read-only memory (CD-ROM) and include program code, and may run on an electronic device, such as a personal computer. However, the program product disclosed herein is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0139] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0140] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0141] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF (Radio Frequency), etc., or any suitable combination thereof.
[0142] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0143] Exemplary embodiments of this disclosure also provide an electronic device capable of implementing the above-described cloud rendering method. Referring below... Figure 13 To describe an electronic device 1300 according to such an exemplary embodiment of the present disclosure. Figure 13 The electronic device 1300 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0144] like Figure 13 As shown, the electronic device 1300 can be represented as a general-purpose computing device. The components of the electronic device 1300 may include, but are not limited to: at least one processing unit 1310, at least one storage unit 1320, a bus 1330 connecting different system components (including storage unit 1320 and processing unit 1310), and a display unit 1340.
[0145] The storage unit 1320 stores program code that can be executed by the processing unit 1310, causing the processing unit 1310 to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.
[0146] Specifically, a program product stored on a computer-readable storage medium enables an electronic device to perform the following steps:
[0147] Multiple cloud replicas are obtained by replicating pre-made two-dimensional cloud materials using light stepping.
[0148] Based on the shadow color configuration information, the color information of multiple cloud copy materials is adjusted to obtain multiple cloud shadow materials corresponding to the pre-made two-dimensional cloud material;
[0149] Multiple cloud shadow materials are offset and superimposed on the pre-made 2D cloud material along the preset lighting direction to render a cloud layer with a 3D effect on the pre-made 2D cloud material.
[0150] In one alternative implementation, before replicating the prefabricated two-dimensional cloud material using ray stepping to obtain multiple cloud replicas, the following step can be performed: blurring the edges of the prefabricated two-dimensional cloud material.
[0151] In one alternative implementation, the above-mentioned blurring of the edges of the prefabricated two-dimensional cloud material can be achieved through the following steps: based on a preset blurring step size, the edges of the prefabricated two-dimensional cloud material are subjected to diffusion blurring.
[0152] In one alternative implementation, the following steps may also be performed: obtaining a first preset noise map and sampling the first preset noise map; adding noise to the edge portion of the prefabricated two-dimensional cloud material based on the noise sampling results of the first preset noise map.
[0153] In an alternative implementation, the following steps may also be performed: selecting one or more shadow boundary materials from the multiple cloud shadow materials based on the overlay order of the multiple cloud shadow materials; and adjusting the color information of the shadow boundary materials based on the shadow boundary color configuration information.
[0154] In one optional implementation, after obtaining multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material, the following steps can be performed: the brightness information of the prefabricated two-dimensional cloud material is height-converted to generate a height map corresponding to the prefabricated two-dimensional cloud material; based on the height map corresponding to the prefabricated two-dimensional cloud material, the height maps corresponding to the multiple cloud shadow materials are determined; based on the height maps corresponding to the multiple cloud shadow materials, the brightness information of the cloud shadow materials is adjusted.
[0155] In one alternative implementation, after determining the heightmaps corresponding to multiple cloud shadow materials, the following step can also be performed: adding noise to the heightmaps corresponding to the multiple cloud shadow materials respectively, so that there are differences between the heightmaps corresponding to the multiple cloud shadow materials.
[0156] In one alternative implementation, before adjusting the brightness information of the cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials, the following steps may be performed: determining the photon attenuation parameters and light scattering parameters corresponding to the multiple cloud shadow materials; and adjusting the height values of the height maps corresponding to the multiple cloud shadow materials based on the photon attenuation parameters and light scattering parameters corresponding to the multiple cloud shadow materials.
[0157] In one optional implementation, the determination of the photon attenuation parameters and illumination scattering parameters corresponding to the multiple cloud shadow materials can be achieved through the following steps: determining the assumed thickness of the multiple cloud shadow materials based on the height map corresponding to the multiple cloud shadow materials; and determining the photon attenuation parameters and illumination scattering parameters corresponding to the multiple cloud shadow materials based on the assumed thickness of the multiple cloud shadow materials.
[0158] In one alternative implementation, before adjusting the brightness information of the cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials, the following steps may be performed: determining the Fresnel reflection parameters corresponding to the multiple cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials and the camera viewpoint; adjusting the height maps corresponding to the multiple cloud shadow materials based on the Fresnel reflection parameters corresponding to the multiple cloud shadow materials.
[0159] In one optional implementation, after obtaining multiple cloud shadow materials corresponding to the pre-made two-dimensional cloud material, the following steps can be performed: obtaining a second preset noise map and performing various types of sampling on the second preset noise map to obtain multiple noise sampling results; based on the multiple noise sampling results, adding multiple types of noise to the UV space corresponding to the multiple cloud shadow materials respectively.
[0160] In one optional implementation, after obtaining multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material, the following steps may be performed: obtaining a prefabricated flow map; superimposing the prefabricated flow map in the UV space corresponding to the prefabricated two-dimensional cloud material to distort the prefabricated two-dimensional cloud material; and / or, superimposing the prefabricated flow map in the UV space corresponding to the multiple cloud shadow materials to distort the multiple cloud shadow materials.
[0161] In one alternative implementation, the UV offset of the prefabricated flow map varies over time.
[0162] In one alternative implementation, after offsetting and overlaying multiple cloud shadow materials on a prefabricated two-dimensional cloud material to render a cloud layer with a three-dimensional effect on the prefabricated two-dimensional cloud material, the following step can also be performed: overlaying a noise array based on screen pixels on the cloud layer.
[0163] In the rendering process of the aforementioned clouds, the step-off processing of pre-made 2D cloud materials allows the created clouds to possess a sense of volume while also achieving a hand-drawn brushstroke effect. This provides strong control over the artistic effect and makes it well-suited for stylized rendering scenes in cartoon animation. Furthermore, overlaying cloud shadow materials along the preset lighting direction of the pre-made 2D cloud materials enables interaction between the clouds and light, enhancing the dynamic expressiveness of the clouds to a certain extent and making the cloud presentation more in line with natural laws.
[0164] Storage unit 1320 may include readable media in the form of volatile storage units, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.
[0165] Storage unit 1320 may also include a program / utility 1324 having a set (at least one) program module 1325, such program module 1325 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0166] Bus 1330 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0167] Electronic device 1300 can also communicate with one or more external devices 1400 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 1300, and / or with any device that enables electronic device 1300 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1350. Furthermore, electronic device 1300 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1360. Figure 13 As shown, network adapter 1360 communicates with other modules of electronic device 1300 via bus 1330. It should be understood that, although... Figure 13As not shown, other hardware and / or software modules can be used in conjunction with the electronic device 1300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems.
[0168] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the exemplary embodiments of this disclosure.
[0169] Furthermore, the above figures are merely illustrative representations of the processes included in the methods according to exemplary embodiments of this disclosure, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0170] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0171] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0172] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for rendering clouds, characterized in that, The method includes: Multiple cloud replicas are obtained by replicating pre-made two-dimensional cloud materials using light stepping; the pre-made two-dimensional cloud materials include hand-drawn style clouds; Based on the shadow color configuration information, the color information of the multiple cloud copy materials is adjusted to obtain multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material; Along the preset lighting direction of the pre-made two-dimensional cloud material, the multiple cloud shadow materials are offset and superimposed on the pre-made two-dimensional cloud material to render a cloud layer with a three-dimensional effect on the pre-made two-dimensional cloud material.
2. The method according to claim 1, characterized in that, Before replicating the pre-made two-dimensional cloud material using ray stepping to obtain multiple cloud replicas, the method further includes: The edges of the prefabricated two-dimensional cloud material are blurred.
3. The method according to claim 2, characterized in that, The blurring of the edges of the prefabricated two-dimensional cloud material includes: Based on a preset fuzzy step size, the edges of the prefabricated two-dimensional cloud material are subjected to diffusion blurring processing.
4. The method according to claim 3, characterized in that, The method further includes: Obtain a first preset noise map and sample the first preset noise map; Based on the noise sampling results of the first preset noise map, noise is added to the edge portion of the prefabricated two-dimensional cloud material.
5. The method according to claim 1, characterized in that, The method further includes: Based on the overlay order of the multiple cloud shadow materials, one or more shadow boundary materials are selected from the multiple cloud shadow materials; Based on the shadow boundary color configuration information, adjust the color information of the shadow boundary material.
6. The method according to claim 1, characterized in that, After obtaining multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material, the method further includes: The brightness information of the prefabricated two-dimensional cloud material is converted to height to generate a height map corresponding to the prefabricated two-dimensional cloud material; Based on the height map corresponding to the pre-made two-dimensional cloud material, determine the height map corresponding to the multiple cloud shadow materials; Based on the height map corresponding to the multiple cloud shadow materials, adjust the brightness information of the cloud shadow materials.
7. The method according to claim 6, characterized in that, After determining the height maps corresponding to the multiple cloud shadow materials, the method further includes: Noise is added to the heightmaps corresponding to the multiple cloud shadow materials to create differences between the heightmaps.
8. The method according to claim 6, characterized in that, Before adjusting the brightness information of the cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials, the method further includes: Determine the photon attenuation parameters and light scattering parameters corresponding to the multiple cloud shadow materials; Based on the photon attenuation parameters and light scattering parameters corresponding to the multiple cloud shadow materials, the height values of the height maps corresponding to the multiple cloud shadow materials are adjusted.
9. The method according to claim 8, characterized in that, Determining the photon attenuation parameters and illumination scattering parameters corresponding to the multiple cloud shadow materials includes: Based on the height maps corresponding to the multiple cloud shadow materials, determine the assumed thickness corresponding to the multiple cloud shadow materials; Based on the assumed thickness of the multiple cloud shadow materials, the photon attenuation parameters and light scattering parameters corresponding to the multiple cloud shadow materials are determined.
10. The method according to claim 6, characterized in that, Before adjusting the brightness information of the cloud shadow materials based on the height maps corresponding to the multiple cloud shadow materials, the method further includes: Based on the height maps corresponding to the multiple cloud shadow materials and the camera viewpoint, determine the Fresnel reflection parameters corresponding to the multiple cloud shadow materials; Based on the Fresnel reflection parameters corresponding to the multiple cloud shadow materials, adjust the height map corresponding to the multiple cloud shadow materials.
11. The method according to claim 1, characterized in that, After obtaining multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material, the method further includes: A second preset noise map is obtained, and the second preset noise map is sampled in various ways to obtain various noise sampling results; Based on the various noise sampling results, various noises are added to the UV space corresponding to the multiple cloud shadow materials.
12. The method according to claim 1, characterized in that, After obtaining multiple cloud shadow materials corresponding to the prefabricated two-dimensional cloud material, the method further includes: Obtain the pre-fabricated flow map; The prefabricated flow map is superimposed in the UV space corresponding to the prefabricated two-dimensional cloud material to distort the prefabricated two-dimensional cloud material; and / or The prefabricated flow map is superimposed in the UV space corresponding to the multiple cloud shadow materials to distort the multiple cloud shadow materials.
13. The method according to claim 12, characterized in that, The UV offset of the pre-fabricated flow map changes over time.
14. The method according to claim 1, characterized in that, After offsetting and overlaying the multiple cloud shadow materials onto the prefabricated two-dimensional cloud material to render a cloud layer with a three-dimensional effect on the prefabricated two-dimensional cloud material, the method further includes: A noise array based on screen pixels is superimposed on the cloud layer.
15. A cloud rendering device, characterized in that, The device includes: The material copying module is used to copy pre-made two-dimensional cloud materials through light stepping to obtain multiple cloud copy materials; the pre-made two-dimensional cloud materials include hand-drawn style clouds; The shadow creation module is used to adjust the color information of the multiple cloud copy materials based on the shadow color configuration information to obtain multiple cloud shadow materials corresponding to the pre-made two-dimensional cloud materials; The material overlay module is used to offset and overlay multiple cloud shadow materials on the pre-made two-dimensional cloud material along the preset lighting direction of the pre-made two-dimensional cloud material, so as to render a cloud layer with a three-dimensional effect on the pre-made two-dimensional cloud material.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 14.
17. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 14 by executing the executable instructions.