Atmospheric Mask File Generation Method, Device, Equipment and Storage Medium
By generating and combining mask files of the stratosphere, troposphere and surface atmosphere, the problem of atmospheric effects in the prior art does not conform to physical laws, and the atmospheric effect rendering of virtual planet models is achieved with a more realistic and approximate physical laws.
Patent Information
- Application Number
- CN202111314459.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-08
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2041-11-08
AI Technical Summary
The treatment of atmospheric effects of planets in the prior art does not conform to physical laws, especially the edge atmospheric parameters are fixed white, which cannot effectively simulate the atmospheric colors and levels of different planets.
By generating mask files for the stratosphere, troposphere and surface atmosphere, combined with atmospheric opaque masks, dynamically control the atmospheric effects, ensuring the layering and transition of color parameters, and then generating atmospheric mask files that are more in line with physical laws.
It realizes that the atmospheric effect rendering of the virtual planet model is more realistic and approaching the physical laws, improving the authenticity and controllability of the rendering effect.
Smart Images

Figure CN114037642B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular, to a method, apparatus, device, and storage medium for generating an atmospheric mask file. Background Art
[0002] In space-themed projects, the excellence of the planet effect plays a crucial role in the quality of such projects. Among the planet effects, how to represent the atmospheric effect is a particularly worthy area of research. In the real physical world, the formation of the atmosphere has a very complex process and numerous influencing factors. For example, altitude, molecular density at sea level, molecular size at different altitudes, molecular scattering rate, number of scattering times, light attenuation coefficient, and so on. These numerous factors together determine the entire process of atmospheric formation.
[0003] In the prior art for processing the planet's atmospheric effect, the atmospheric effect is generally abstracted and two parts of parameters are separated for control. One is the surface atmosphere, which is controlled by the atmospheric color parameter to simulate the atmospheric colors of different planets; the other is the parameter of the edge atmosphere, and in the current prior art, the parameter of this item is generally directly set to a fixed white.
[0004] However, in actual situations, each planet has its unique atmospheric color, and the edge atmosphere actually has a layered color due to different altitudes. Therefore, this processing method does not conform to physical laws at all.
[0005] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0006] The purpose of the present application is to provide a method, apparatus, device, and storage medium for generating an atmospheric mask file to solve the problem that the planet's atmospheric effect in the prior art does not conform to physical laws at all, in view of the deficiencies in the above prior art.
[0007] To achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
[0008] In a first aspect, an embodiment of the present application provides a method for generating an atmospheric mask file, the method including:
[0009] Generating an atmospheric opacity mask according to the mask of the stratosphere and the mask of the surface atmosphere; wherein, the mask of the stratosphere is configured with the color parameter of the stratosphere, and the mask of the surface atmosphere is configured with the color parameter of the surface atmosphere;
[0010] Generate an atmospheric mask file based on the masks of the stratosphere, the troposphere, the surface atmosphere, and the atmospheric opacity mask; the atmospheric mask file is used to render the atmospheric effect of the virtual planet model, wherein the mask of the troposphere is configured with the color parameters of the troposphere.
[0011] Optionally, before generating the atmospheric opacity mask based on the masks of the stratosphere and the surface atmosphere, the method further includes:
[0012] Configure color parameters for the black-and-white masks of the stratosphere and the troposphere respectively to obtain the masks of the stratosphere and the troposphere;
[0013] Calculate the color parameters of the surface atmosphere according to the mask of the stratosphere, the mask of the troposphere, and the preset surface scattering color parameters;
[0014] Configure the black-and-white mask of the surface atmosphere according to the color parameters of the surface atmosphere to generate the mask of the surface atmosphere.
[0015] Optionally, before configuring color parameters for the black-and-white masks of the stratosphere and the troposphere respectively to obtain the masks of the stratosphere and the troposphere, the method further includes;
[0016] Adjust the pre-acquired black-and-white atmospheric mask according to the preset first area range to obtain the black-and-white mask of the stratosphere;
[0017] Generate the black-and-white mask of the troposphere according to the preset second area range and the black-and-white mask of the stratosphere;
[0018] Generate the black-and-white mask of the surface atmosphere according to the atmospheric black-and-white mask, the black-and-white mask of the stratosphere, and the black-and-white mask of the troposphere.
[0019] Optionally, before generating the atmospheric opacity mask based on the masks of the stratosphere and the surface atmosphere, the method further includes:
[0020] Overlay the masks of the stratosphere and the troposphere according to the preset intensity value to obtain the color transition parameters between the stratosphere and the troposphere;
[0021] The step of generating an atmospheric mask file according to the masks of the stratosphere, the troposphere, the surface atmosphere, and the atmospheric opacity mask includes:
[0022] Generate the atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, the atmospheric opacity mask, and the color transition parameter.
[0023] Optionally, before generating the atmospheric opacity mask according to the mask of the stratosphere and the mask of the surface atmosphere, the method further includes:
[0024] Configure the thickness of the troposphere in the mask of the troposphere according to the preset thickness configuration parameter.
[0025] Optionally, before generating the atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, and the atmospheric opacity mask, the method further includes:
[0026] Generate the atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, the atmospheric opacity mask, and the preset tropospheric attenuation parameter, where the tropospheric attenuation parameter is used to control the color transition between the troposphere and the surface atmosphere.
[0027] Optionally, before generating the atmospheric opacity mask according to the mask of the stratosphere and the mask of the surface atmosphere, the method further includes:
[0028] Perform intensity control on the mask of the stratosphere to generate the opacity mask of the stratosphere;
[0029] Perform superposition processing on the opacity mask of the stratosphere and the mask of the surface atmosphere;
[0030] Generate the atmospheric opacity mask according to the preset light direction parameter, atmospheric attenuation parameter, and the superimposed mask.
[0031] Optionally, before performing the superposition processing on the opacity mask of the stratosphere and the mask of the surface atmosphere, the method further includes:
[0032] Remap the mask of the surface atmosphere;
[0033] The superposition processing on the opacity mask of the stratosphere and the mask of the surface atmosphere includes:
[0034] Superimpose the opacity mask of the stratosphere and the remapped mask of the surface atmosphere.
[0035] Optionally, the generating the atmospheric opacity mask according to the preset light direction parameter, atmospheric attenuation parameter, and the superimposed mask includes:
[0036] Calculate the backlight area mask and the light-receiving area mask of the atmosphere according to the light direction parameter and the preset vertex normal;
[0037] Generate the atmospheric opacity mask according to the backlight area mask, the light-receiving area mask, the preset atmospheric coverage range, the atmospheric attenuation parameter, and the superimposed mask.
[0038] Optionally, the method further includes:
[0039] Obtain a virtual planet model;
[0040] Render the atmospheric effect of the virtual planet model using the atmospheric mask file to generate a target virtual planet model.
[0041] Optionally, the method further includes:
[0042] Display the target virtual planet model in a preset virtual scene.
[0043] Optionally, the method further includes:
[0044] Adjust the atmospheric effect of the target virtual planet model according to the adjustment operation of the configuration parameters for the atmospheric mask file input.
[0045] In a second aspect, another embodiment of the present application provides an atmospheric mask file generation device, the device includes: a generation module, the generation module includes: a first generation module and a second generation module, where:
[0046] The first generation module is used to generate an atmospheric opacity mask according to the mask of the stratosphere and the mask of the surface atmosphere; wherein, the mask of the stratosphere is configured with the color parameter of the stratosphere, and the mask of the surface atmosphere is configured with the color parameter of the surface atmosphere;
[0047] The second generation module is used to generate an atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, and the atmospheric opacity mask; the atmospheric mask file is used to render the atmospheric effect of the virtual planet model, wherein, the mask of the troposphere is configured with the color parameter of the troposphere.
[0048] Optionally, the device further includes: a configuration module, a calculation module; the generation module further includes: a third generation module, where:
[0049] The configuration module is used to configure color parameters for the black and white mask of the stratosphere and the black and white mask of the troposphere respectively to obtain the mask of the stratosphere and the mask of the troposphere;
[0050] The calculation module is configured to calculate the color parameters of the surface atmosphere according to the mask of the stratosphere, the mask of the troposphere, and preset surface scattering color parameters;
[0051] The third generation module is configured to configure a black-and-white mask of the surface atmosphere according to the color parameters of the surface atmosphere, and generate a mask of the surface atmosphere.
[0052] Optionally, the apparatus further includes: an adjustment module, configured to adjust a pre-acquired black-and-white mask of the atmosphere according to a preset first region range to obtain a black-and-white mask of the stratosphere;
[0053] The generation module further includes: a fourth generation module, configured to generate a black-and-white mask of the troposphere according to a preset second region range and the black-and-white mask of the stratosphere; and generate a black-and-white mask of the surface atmosphere according to the black-and-white mask of the atmosphere, the black-and-white mask of the stratosphere, and the black-and-white mask of the troposphere.
[0054] Optionally, the apparatus further includes: a processing module, configured to perform an overlay process on the mask of the stratosphere and the mask of the troposphere according to a preset intensity value to obtain color transition parameters between the stratosphere and the troposphere;
[0055] The second generation module is specifically configured to generate the atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, the atmospheric opacity mask, and the color transition parameters.
[0056] Optionally, the configuration module is specifically configured to configure the thickness of the troposphere in the mask of the troposphere according to preset thickness configuration parameters.
[0057] Optionally, the second generation module is specifically configured to generate the atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, the atmospheric opacity mask, and preset troposphere attenuation parameters, where the troposphere attenuation parameters are used to control the color transition between the troposphere and the surface atmosphere.
[0058] Optionally, the generation module further includes: a fifth generation module, configured to perform intensity control on the mask of the stratosphere to generate an opacity mask of the stratosphere;
[0059] The processing module is specifically configured to perform an overlay process on the opacity mask of the stratosphere and the mask of the surface atmosphere;
[0060] The first generation module is specifically configured to generate the atmospheric opacity mask according to preset illumination direction parameters, atmospheric attenuation parameters, and the overlaid mask.
[0061] Optionally, the processing module is specifically configured to remap the mask of the surface atmosphere; superimpose the opaque mask of the stratosphere and the remapped mask of the surface atmosphere.
[0062] Optionally, the calculation module is specifically configured to calculate the backlit area mask and the lit area mask of the atmosphere according to the illumination direction parameter and the preset vertex normal;
[0063] The first generation module is specifically configured to generate the atmospheric opacity mask according to the backlit area mask, the lit area mask, the preset atmospheric coverage range, the atmospheric attenuation parameter, and the superimposed mask.
[0064] Optionally, the generation module further includes: a sixth generation module, configured to obtain a virtual planet model; perform atmospheric effect rendering on the virtual planet model by using the atmospheric mask file to generate a target virtual planet model.
[0065] Optionally, the device further includes: a display module, configured to display the target virtual planet model in a preset virtual scene.
[0066] Optionally, the device further includes: an adjustment module, configured to adjust the atmospheric effect of the target virtual planet model according to an adjustment operation of input configuration parameters for the atmospheric mask file.
[0067] In a third aspect, another embodiment of the present application provides an atmospheric mask file generation device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the atmospheric mask file generation device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method according to any one of the first aspects described above.
[0068] In a fourth aspect, another embodiment of the present application provides a storage medium, on which a computer program is stored. When the computer program is run by a processor, it performs the steps of the method according to any one of the first aspects described above.
[0069] The beneficial effects of the present application are as follows: By using the method for generating an atmospheric mask file provided by the present application, the physical laws of the atmosphere in real situations are considered during the generation process. Based on the masks of the stratosphere and the surface atmosphere, an atmospheric opacity mask is generated. Subsequently, based on the masks of the stratosphere, the troposphere, the surface atmosphere, and the atmospheric opacity mask, an atmospheric mask file is generated. The generated atmospheric mask can be used for subsequent atmospheric effect rendering of the virtual planet model. Moreover, the mask of the surface atmosphere is configured with color parameters of the surface atmosphere, and the mask of the troposphere is configured with color parameters of the troposphere. The color parameters of different atmospheres are different, thereby achieving the distinction of different atmospheres in terms of the performance effect. When performing atmospheric effect rendering on the virtual planet model according to such an atmospheric mask, the rendered atmospheric effect is more in line with the real physical laws, and the rendering effect is better. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative efforts.
[0071] Figure 1 It is a schematic flowchart of the method for generating an atmospheric mask file provided by an embodiment of the present application;
[0072] Figure 2 It is a schematic flowchart of the method for generating an atmospheric mask file provided by another embodiment of the present application;
[0073] Figure 3 It is a schematic flowchart of the method for generating an atmospheric mask file provided by another embodiment of the present application;
[0074] Figure 4 It is a schematic flowchart of the method for generating an atmospheric mask file provided by another embodiment of the present application;
[0075] Figure 5 It is a schematic flowchart of the method for generating an atmospheric mask file provided by another embodiment of the present application;
[0076] Figure 6 It is a comparative diagram of the atmospheric rendering effects of a spherical model provided by an embodiment of the present application;
[0077] Figure 7 It is a comparative diagram of the atmospheric rendering effects of a spherical model provided by another embodiment of the present application;
[0078] Figure 8 It is a schematic structural diagram of an atmospheric mask file generation device provided by an embodiment of the present application;
[0079] Figure 9 Schematic structural diagram of an atmospheric mask file generation device provided by another embodiment of the present application;
[0080] Figure 10 Schematic structural diagram of an atmospheric mask file generation device provided by an embodiment of the present application. Detailed implementation manners
[0081] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application.
[0082] Generally, the components of the embodiments of the present application described and illustrated in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts fall within the protection scope of the present application.
[0083] In addition, the flowcharts used in the present application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical context relationships may be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present application.
[0084] For the convenience of understanding the embodiments of the present application, some terms related to the present application are explained below:
[0085] Atmospheric color: It is to simply superimpose the color values corresponding to the set atmospheric parameters on the diffuse color value of the virtual planet model itself, and finally simulate the color value of the surface atmosphere.
[0086] Atmospheric range: The parameter controls the attenuation of the atmosphere from the middle to the edge of the planet by controlling the Fresnel reflection intensity. Due to different viewing perspectives, the semi-transparency of the surface atmosphere does follow a certain Fresnel reflection law.
[0087] Atmospheric intensity: The atmospheric intensity parameter is used to control the opacity of the surface atmosphere, and the overall result formed by the atmospheric color and the atmospheric range can be linearly weakened or enhanced through the atmospheric intensity parameter.
[0088] The following combines multiple specific application examples to explain a method for generating an atmospheric mask file provided by an embodiment of the present application. Figure 1 It is a schematic flowchart of a method for generating an atmospheric mask file provided by an embodiment of the present application. As Figure 1 shown, the method includes:
[0089] S101: Generate an atmospheric opacity mask based on the mask of the stratosphere and the mask of the surface atmosphere.
[0090] Among them, the mask of the stratosphere is configured with color parameters of the stratosphere, and the mask of the surface atmosphere is configured with color parameters of the surface atmosphere.
[0091] In the embodiments of the present application, the method for generating the atmospheric mask is implemented in the Neox engine. For example, by using virtual cameras, model vertices, SmoothStep functions, phase functions, etc. in the Neox engine, the real atmosphere is abstracted and peeled off, key feature values are extracted for modeling, and corresponding control parameters are added to different regions of the atmosphere. The ultimate goal is to simulate a more realistic atmospheric effect. For example, in the embodiments of the present application, after defining the mask of the stratosphere and the mask of the surface atmosphere, the camera vector of the virtual camera can be dot-multiplied with the model vertices to obtain an atmospheric opacity mask that transitions from the center to the edge. In some possible embodiments, for example, it can be an opaque black-and-white mask diagram.
[0092] S102: Generate an atmospheric mask file based on the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, and the atmospheric opacity mask.
[0093] The atmospheric mask file is used to render the atmospheric effect of the virtual planet model. Among them, the mask of the troposphere is configured with color parameters of the troposphere.
[0094] This method of generating an atmospheric mask file based on the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, and the atmospheric opacity mask can solve the problem of the single and uncontrollable edge atmosphere in the current Neox, thereby improving the atmospheric realism of the virtual planet when rendering the virtual planet through the generated atmospheric mask file.
[0095] By using the atmospheric mask file generation method provided in this application, the physical laws of the atmosphere in real situations are taken into account during the generation process. Based on the masks of the stratosphere and the surface atmosphere, an atmospheric opacity mask is generated. Subsequently, based on the masks of the stratosphere, the troposphere, the surface atmosphere, and the atmospheric opacity mask, an atmospheric mask file is generated. The generated atmospheric mask can be used for subsequent atmospheric effect rendering of the virtual planet model. Moreover, the mask of the surface atmosphere is configured with the color parameters of the surface atmosphere, and the mask of the troposphere is configured with the color parameters of the troposphere. The color parameters of different atmospheres are different, so as to distinguish different atmospheres in terms of the performance effect. When performing atmospheric effect rendering on the virtual planet model according to such an atmospheric mask, the rendered atmospheric effect is more in line with the real physical laws and the rendering effect is better.
[0096] Optionally, based on the above embodiments, the embodiments of this application can also provide an atmospheric mask file generation method. The implementation process of the above method is illustrated by the following with reference to the accompanying drawings. Figure 2 It is a schematic flowchart of an atmospheric mask file generation method provided by another embodiment of this application, as Figure 2 shown. Before S101, the method further includes:
[0097] S103: Configure color parameters for the black-and-white masks of the stratosphere and the troposphere respectively to obtain the masks of the stratosphere and the troposphere.
[0098] In the embodiments of this application, the acquisition methods of the black-and-white masks of the stratosphere, the troposphere, and the atmosphere can be, for example: adjust the pre-acquired black-and-white mask of the atmosphere according to a preset first region range to obtain the black-and-white mask of the stratosphere; generate the black-and-white mask of the troposphere according to a preset second region range and the black-and-white mask of the stratosphere; generate the black-and-white mask of the surface atmosphere according to the black-and-white masks of the atmosphere, the stratosphere, and the troposphere.
[0099] Among them, the first region range can use the SmoothStep built-in function, for example, set the first region range [0.71 - 1] according to min = 0.71 and max = 1, and adjust the black-and-white mask of the atmosphere according to the first region range to obtain the black-and-white mask diagram of the stratosphere. Such a setting method enables the stratosphere to be limited to fluctuate within the range of [0.71 - 1] of the black-and-white mask of the atmosphere.
[0100] Similarly, for the second region range, for example, the SmoothStep built-in function can be used to set the second region range [0.7 - 0.74] according to min = 0.7 and max = 0.74. Within this 0.04 interval, it represents the troposphere region. Then, adjust the black and white mask map of the stratosphere according to the second region range to obtain the black and white mask map of the troposphere.
[0101] Exemplarily, in some possible embodiments, in order to ensure that the thickness of the troposphere never exceeds the thickness of the overall atmospheric edge, the thickness of the troposphere in the mask of the troposphere can be configured according to the preset thickness configuration parameters. For example, the troposphere region mask can be used as the alpha value of the linear difference in thickness between the stratosphere and the troposphere, that is, the second region range is used to control the thickness change of the troposphere. Under the clamping of this alpha, the thickness of the troposphere will never exceed the thickness of the overall atmospheric edge, further ensuring the authenticity of the atmospheric effect when rendering the atmospheric effect of the virtual planet model according to the atmospheric mask file.
[0102] S104: Calculate the color parameters of the surface atmosphere according to the mask of the stratosphere, the mask of the troposphere, and the preset surface scattering color parameters.
[0103] In some possible embodiments, for example, the preset surface scattering color parameters can be linearly interpolated with the mask of the stratosphere and the mask of the troposphere using the lerp function to obtain the color parameters of the surface atmosphere.
[0104] In the embodiments of the present application, before calculating the color parameters of the surface atmosphere, for example, the color of the surface atmosphere can be set to the same color as the stratosphere, and then the color of the surface atmosphere can be adjusted according to the surface color scattering parameters to distinguish the color of the surface atmosphere from the color of the stratosphere, and the adjusted color is determined as the color parameters of the surface atmosphere; it should be understood that the above embodiments are only exemplary descriptions, and the specific setting of the initial color of the surface atmosphere can be flexibly adjusted according to user needs and is not limited to the above embodiments.
[0105] S105: Configure the black and white mask of the surface atmosphere according to the color parameters of the surface atmosphere to generate the mask of the surface atmosphere.
[0106] Optionally, based on the above embodiments, the embodiments of the present application can also provide a method for generating an atmospheric mask file. The implementation process of the above method is illustrated below with reference to the accompanying drawings. Figure 3 It is a schematic flowchart of a method for generating an atmospheric mask file provided by another embodiment of the present application. As Figure 3 shown, before S101, the method may further include:
[0107] S106: Superimpose the mask of the stratosphere and the mask of the troposphere according to a preset intensity value to obtain the color transition parameter between the stratosphere and the troposphere.
[0108] For example, the mask of the stratosphere and the mask of the troposphere can be multiplied by the preset intensity value respectively, and then the processed mask of the stratosphere and the mask of the troposphere are superimposed. The superimposed parameter is used as the color transition parameter between the stratosphere and the troposphere. According to this color transition parameter, the colors of the stratosphere and the troposphere can be controlled.
[0109] Correspondingly, S101 may include:
[0110] S107: Generate an atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, the atmospheric opacity mask and the color transition parameter.
[0111] Such a processing method enables a color transition between the stratosphere and the troposphere, so that there is no obvious color stratification boundary between the stratosphere and the troposphere. Instead, the stratosphere and the troposphere are distinguished by means of color transition, making the color transition smoother and less abrupt, thus further improving the authenticity of the atmospheric effect.
[0112] In some possible embodiments, an atmospheric mask file can also be generated according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, the atmospheric opacity mask and a preset tropospheric attenuation parameter, where the tropospheric attenuation parameter is used to control the color transition between the troposphere and the surface atmosphere.
[0113] The tropospheric attenuation parameter can be, for example, an inward attenuation parameter of the troposphere. Since the troposphere is the connection area between the stratosphere and the surface atmosphere, attenuation control needs to be performed on it. In the embodiments of the present application, an exponential function can be used as the attenuation parameter to obtain a good transition effect between the stratosphere and the surface atmosphere.
[0114] Optionally, on the basis of the above embodiments, the embodiments of the present application can also provide a method for generating an atmospheric mask file. The implementation process of the above method is illustrated below with reference to the accompanying drawings. Figure 4 It is a schematic flowchart of a method for generating an atmospheric mask file provided by another embodiment of the present application. As Figure 4 shown, before S101, the method may further include:
[0115] S108: Control the intensity of the mask of the stratosphere to generate an opacity mask of the stratosphere.
[0116] Among them, the opacity of the stratospheric atmosphere needs to be controlled separately. Opacity represents the thickness of this area. In some possible embodiments, for example, a power function can be used to control the intensity of the mask of the stratosphere.
[0117] S109: Superimpose the opaque mask of the stratosphere and the mask of the surface atmosphere.
[0118] In some possible embodiments, the way to obtain the mask of the surface atmosphere can be, for example, multiplying the mask of the stratosphere and the mask of the troposphere to obtain a mask of the surface atmosphere where the stratosphere-troposphere region is 0 and the surface atmosphere has a 0-1 transition. The role of the mask of the surface atmosphere is to distinguish the stratospheric-tropospheric atmosphere from the surface atmosphere, facilitating subsequent separate processing operations on the surface atmosphere.
[0119] The way to perform the superimposition process in S109 can be, for example, remapping the mask of the surface atmosphere; subsequently, superimposing the opaque mask of the stratosphere and the remapped mask of the surface atmosphere.
[0120] Among them, the way of remapping can be, for example, using the RemapValueRange function to remap the surface atmosphere mask to obtain a smooth transition effect, and then superimposing it with the opaque mask of the stratosphere, and using this result as the opaque control parameter for the overall surface atmosphere effect.
[0121] S110: Generate an atmospheric opaque mask according to the preset light direction parameter, atmospheric attenuation parameter, and the superimposed mask.
[0122] Exemplarily, in some possible embodiments, for example, the backlit area mask and the illuminated area mask of the atmosphere can be calculated according to the light direction parameter and the preset vertex normal; an atmospheric opaque mask is generated according to the backlit area mask, the illuminated area mask, the preset atmospheric coverage range, the atmospheric attenuation parameter, and the superimposed mask.
[0123] Due to the existence of the Fresnel effect, the opacity of the surface atmosphere should be low in the center part of the sphere and high at the edge. Finally, due to the direct sunlight in the real environment, the atmosphere needs to have the correct lighting effect. On the illuminated side of a real planet, the atmospheric effect can be seen, while on the backlit side, the atmospheric effect cannot be seen. For example, the atmospheric effect on the backlit side is 0, and the atmospheric effect on the direct sunlight side is 1, and there should be a transition between the two. Therefore, in order to ensure the rendering effect of the subsequent virtual planet, the light direction parameter needs to be added to the atmospheric mask file so that the illuminated side of the virtual planet can be illuminated during the rendering process, obtaining the correct atmospheric effect under the correct lighting that conforms to the real physical situation.
[0124] Therefore, it is necessary to calculate the backlight area mask and the light-receiving area mask of the atmosphere based on the illumination direction of the light and the preset vertex normal. These two parameters are global parameters: the preset atmospheric coverage range, the preset atmospheric coverage range and the atmospheric attenuation parameter are used to generate the atmospheric opacity mask. The above two parameters are parameters that can affect all atmospheric effects.
[0125] Among them, the range of illumination may vary. Therefore, it is necessary to use the illumination direction and the vertex normal together to complete the change of the atmospheric opacity of the light and dark surfaces. And because the atmospheric attenuation degrees of different virtual planets may be different, it is necessary to define the range that the light can illuminate the entire atmosphere, that is, the preset atmospheric coverage range. The atmospheric attenuation parameter is used to control the transition attenuation contrast between the bright part and the dark part of the virtual planet, and can be calculated using the inverse square parameter. Finally, multiply the mask obtained by superimposing the opacity mask of the stratosphere and the mask of the remapped surface atmosphere to obtain the atmospheric opacity mask.
[0126] Optionally, based on the above embodiments, the embodiments of the present application can also provide a method for generating an atmospheric mask file. The implementation process of the above method is illustrated below with reference to the accompanying drawings. Figure 5 It is a schematic flowchart of a method for generating an atmospheric mask file provided by another embodiment of the present application, as Figure 5 shown, the method may further include:
[0127] S111: Obtain a virtual planet model.
[0128] For example, the way to obtain the virtual planet mode can be in the Neox engine, directly by selecting the spherical shape, and determining that the model corresponding to the selection operation is the virtual planet model.
[0129] S112: Render the atmospheric effect of the virtual planet model using the atmospheric mask file to generate a target virtual planet model.
[0130] Among them, for example, the atmospheric mask file can be directly dragged to the effect file option of the model material sphere, so that the atmospheric effect of the virtual planet model is rendered using the atmospheric mask file.
[0131] Among them, after generating the target virtual planet model, the target virtual planet model can be displayed in a preset virtual scene so that the user can view the actual effects of the target virtual planet model rendered in different virtual scenes. The preset virtual scene can be, for example, a preset virtual game scene or a preset animation production scene, etc. The specific preset virtual game scene can be flexibly adjusted according to the user's needs and is not limited to those given in the above embodiments.
[0132] In some possible embodiments, the user can also adjust the atmospheric effect of the target virtual planet model according to the adjustment operation of the configuration parameters for the atmospheric mask file by inputting adjustment parameters.
[0133] For example, the atmospheric effect can be adjusted by appropriate scaling so that the adjusted atmospheric effect can wrap the virtual planet model, and various parameters of the atmospheric effect can be adjusted according to the actual effect. The specific adjustment method can be flexibly adjusted according to the user's needs and is not limited to those given in the above embodiments.
[0134] The steps of the method for generating an atmospheric mask file provided in this application will be described below by taking an embodiment as an example:
[0135] S1. Define the regions of the stratosphere, troposphere, and surface atmosphere on the atmospheric mask: Use the dot product of the virtual camera vector and the preset vertex normal to obtain a black-and-white mask of the atmosphere that transitions from the center to the edge.
[0136] S2. Use the built-in function of SmoothStep, set min = 0.71, max = 1, define the first region range, clamp the black-and-white mask of the atmosphere obtained in S1 to obtain the black-and-white mask region of the stratosphere. Then use if judgment, input 0 or 1, define the stratosphere as 0, and the non-stratosphere as 1.
[0137] S3. Similarly, use the SmoothSetp function, set min = 0.7, max = 0.74. In this 0.04 interval, it represents the troposphere region. Multiply this region by the result obtained in S1 to obtain the black-and-white mask of the troposphere.
[0138] S4. Multiply the stratosphere mask and the troposphere mask obtained in S2 and S3 by the preset intensity values for control respectively, and then superimpose them as the color transition parameter value between the troposphere and the stratosphere to control the color transition between the two regions. Here, the surface atmosphere color and the stratosphere color can be set to the same color first, and a mask will be generated in subsequent steps to distinguish the two. In this step, it is also necessary to add a preset thickness configuration parameter as the "troposphere thickness" parameter, and use the mask of the troposphere as the thickness configuration parameter value of the linear difference in thickness between the stratosphere and the troposphere to control the thickness change of the troposphere. Under the clamping of this thickness configuration parameter value, the thickness of the troposphere will never exceed the overall atmospheric edge thickness.
[0139] S5. Use the lerp function for linear interpolation calculation based on the mask of the stratosphere, the mask of the troposphere, and the preset surface scattering color parameters, and finally obtain the color values of the three regions of the troposphere and the surface atmosphere. Output this result to the EmissiveColor option. In this step, a preset tropospheric attenuation parameter, the "troposphere inward attenuation" parameter, is added. Since the troposphere is between the stratosphere and the surface atmosphere and is the connection area between the two parts, attenuation control needs to be performed on it. Using the exponential function as the attenuation parameter can obtain a good transition effect between the stratosphere and the surface atmosphere.
[0140] After the EmissiveColor calculation is completed, the opacity mask needs to be further calculated. The calculation of the opacity mask needs to be analyzed from three aspects. First, the opacity of the stratospheric atmosphere needs to be controlled separately, and its thickness is represented by the opacity here. Then, due to the existence of the Fresnel effect, the opacity of the surface atmosphere should be low in the center part of the sphere and high at the edge part. Finally, due to the direct sunlight, the atmosphere needs to have the correct lighting effect, with the atmosphere effect on the backlit side being 0 and the effect on the direct sunlight side being 1, and there should be a transition between the two. In the present invention, the lighting direction and the vertex normal are used together to complete the change in the opacity of the atmosphere between the bright and dark sides. The following continues to be described according to the steps.
[0141] S6. For the change in the opacity of the stratospheric atmosphere, use the result of S2, that is, the mask of the stratosphere, and use the power function to control its intensity.
[0142] S7. For the change in the opacity of the surface atmosphere, multiply the results of S2 and S3 to obtain a mask of the surface atmosphere layer with a value of 0 in the stratosphere-troposphere region and a 0-1 transition in the surface atmosphere. The function of this mask is to separate the stratospheric-tropospheric atmosphere from the surface atmosphere, facilitating the subsequent separate operation on the surface atmosphere.
[0143] S8. Use the RemapValueRange function to remap the result of S7 to obtain a smooth transition effect. Then add it to the result of S6 to obtain the sum of the stratosphere mask and the surface atmosphere mask, and this result is used as the opacity control parameter for the overall surface atmosphere effect.
[0144] S9. On the illuminated side of the planet, the atmospheric effect can be seen, while on the backlit side, it cannot. Therefore, the light direction parameter needs to be passed into the effect material of the atmospheric mask file to illuminate the illuminated surface and obtain the correct atmospheric effect under light. Thus, it is necessary to calculate the backlit and illuminated area mask based on the light direction and vertex normal, and add the overall atmospheric coverage range and the overall atmospheric coverage attenuation parameter. These two parameters are global parameters that can affect all effects. The atmospheric attenuation degrees of different planets are different, and the illumination ranges vary, so it is necessary to define the range within which the light can illuminate the entire atmosphere. The overall atmospheric coverage attenuation parameter is used to control the transition attenuation contrast between the bright and dark parts of the planet, and is calculated using an inverse square parameter. Finally, multiply it by the result of S8 to obtain the atmospheric opacity mask.
[0145] S10. Finally, output the result of S5 to the light material parameter EmissiveColor, and output the S9 opacity mask to the opacity material parameter Opacity.
[0146] S11. After calculating the effects according to the steps of S1 - S10 in Splendor, export them to the NeoX engine.
[0147] S12. In the NeoX engine, select the spherical model as the virtual planet model, and directly drag the atmospheric mask file to the effect file option of the virtual planet model. Then drag the target virtual planet model with the atmospheric effect into the virtual scene, and through appropriate scaling adjustment, make the atmospheric effect wrap the target virtual planet model, and adjust the various parameters of the atmosphere according to the actual effect.
[0148] Figure 6 This is a comparison diagram of the atmospheric rendering effect of the spherical model provided by an embodiment of the present application. Figure 7 This is a comparison diagram of the atmospheric rendering effect of the spherical model provided by another embodiment of the present application. Figures 6 - 7 On the left side of both are the renderings of the atmospheric effects of the virtual planet models obtained by rendering the spherical model according to the prior art; on the right side of both are the renderings of the atmospheric effects of the virtual planet models obtained by rendering the spherical model according to the atmospheric mask file generation method provided by the present application based on the generated atmospheric mask file. Among them, Figure 6 This is an overall comparison diagram of the atmospheric effects of the virtual planet models obtained by rendering the spherical model. Figure 7 This is a partial comparison diagram of the atmospheric effects of the virtual planet models obtained by rendering the spherical model.
[0149] As Figures 6 - 7As shown, it can be seen that the atmospheric effect of the virtual planet model rendered in the prior art is single. There is only a simple edge atmosphere on the edge of the virtual planet model, which is generally set to a fixed white color. However, for the atmospheric edge rendered by the method provided in this application, there are a stratosphere, a troposphere, and a surface atmosphere, so that there are three layers of edge atmosphere on the edge of the virtual planet model, and the colors of the three layers of edge atmosphere are stratified. Therefore, the rendered atmospheric edge is more in line with physical laws. On the basis of multi-layer stratification of the atmospheric edge, users can freely customize various parameters for each layer of edge atmosphere, so as to adjust the edge atmosphere of each virtual planet according to the unique atmospheric color of each virtual planet, making the atmospheric color of the virtual planet not only more in line with physical laws, but also allowing users to customize and adjust various parameters of each layer of edge atmosphere to complete the production of the atmosphere of different types of virtual planet models, so that a rich virtual space planet scene can be quickly produced within a short time.
[0150] By using the method for generating an atmospheric mask file provided in this application and utilizing the regional division of the stratosphere, troposphere, and surface atmosphere, the problem of single and uncontrollable edge atmosphere in NeoX can be solved. When rendering the atmospheric effect of a virtual planet according to the atmospheric mask file provided in this application, the authenticity of the rendered atmospheric effect can be greatly improved. By using highly customizable parameters, a general atmospheric solution is provided. Users can freely customize various parameters of the atmospheric effect to complete the production of the atmosphere of different types of planets, and it has a certain degree of generality, enabling users to quickly produce various types of virtual planet atmospheric effects within a short time.
[0151] The following explains the atmospheric mask file generation device provided in this application in conjunction with the accompanying drawings. This atmospheric mask file generation device can execute any of the above Figures 1 - 7 methods for generating an atmospheric mask file. Its specific implementation and beneficial effects are as described above and will not be elaborated further below.
[0152] Figure 8 is a schematic structural diagram of an atmospheric mask file generation device provided in an embodiment of this application. As shown in Figure 8 the figure, the device includes: a generation module 201, and the generation module includes: a first generation module 201a and a second generation module 201b, where:
[0153] The first generation module 201a: is used to generate an atmospheric opacity mask according to the mask of the stratosphere and the mask of the surface atmosphere layer; among them, the mask of the stratosphere is configured with the color parameters of the stratosphere, and the mask of the surface atmosphere layer is configured with the color parameters of the surface atmosphere layer;
[0154] The second generation module 201b; configured to generate an atmospheric mask file based on the masks of the stratosphere, the troposphere, the surface atmosphere, and the atmospheric opacity mask; the atmospheric mask file is used to render the atmospheric effect of the virtual planet model, wherein the mask of the troposphere is configured with color parameters of the troposphere.
[0155] Optionally, based on the above embodiments, an atmospheric mask file generation device may further be provided in the embodiments of the present application. The implementation process of the device given above will be exemplarily described below with reference to the accompanying drawings. Figure 8 The implementation process of the device given above will be exemplarily described below with reference to the accompanying drawings. Figure 9 FIG. is a schematic structural diagram of an atmospheric mask file generation device provided in another embodiment of the present application. As Figure 9 shown, the device further includes: a configuration module 202 and a calculation module 203. The generation module further includes: a third generation module 201c, wherein:
[0156] The configuration module 202 is configured to respectively configure color parameters for the black-and-white masks of the stratosphere and the troposphere to obtain the mask of the stratosphere and the mask of the troposphere.
[0157] The calculation module 203 is configured to calculate the color parameters of the surface atmosphere according to the mask of the stratosphere, the mask of the troposphere, and the preset surface scattering color parameters.
[0158] The third generation module 201c is configured to configure the black-and-white mask of the surface atmosphere according to the color parameters of the surface atmosphere to generate the mask of the surface atmosphere.
[0159] As Figure 9 shown, the device further includes: an adjustment module 204, configured to adjust the pre-acquired atmospheric black-and-white mask according to a preset first region range to obtain the black-and-white mask of the stratosphere.
[0160] The generation module 201 further includes: a fourth generation module 201d, configured to generate the black-and-white mask of the troposphere according to a preset second region range and the black-and-white mask of the stratosphere; generate the black-and-white mask of the surface atmosphere according to the atmospheric black-and-white mask, the black-and-white mask of the stratosphere, and the black-and-white mask of the troposphere.
[0161] As Figure 9 shown, the device further includes: a processing module 205, configured to perform an overlay process on the mask of the stratosphere and the mask of the troposphere according to a preset intensity value to obtain the color transition parameters between the stratosphere and the troposphere.
[0162] The second generation module 201b is specifically configured to generate an atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, the atmospheric opacity mask, and the color transition parameters.
[0163] Optionally, the configuration module 202 is specifically configured to configure the thickness of the troposphere in the mask of the troposphere according to the preset thickness configuration parameters.
[0164] Optionally, the second generation module 201b is specifically configured to generate an atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, the atmospheric opacity mask, and the preset troposphere attenuation parameter, where the troposphere attenuation parameter is used to control the color transition between the troposphere and the surface atmosphere.
[0165] Optionally, the generation module 201 further includes: a fifth generation module e, configured to perform intensity control on the mask of the stratosphere to generate an opacity mask of the stratosphere.
[0166] The processing module 205 is specifically configured to perform an overlay process on the opacity mask of the stratosphere and the mask of the surface atmosphere;
[0167] The first generation module 201a is specifically configured to generate an atmospheric opacity mask according to the preset light direction parameter, the atmospheric attenuation parameter, and the overlaid mask.
[0168] Optionally, the processing module 205 is specifically configured to remap the mask of the surface atmosphere; perform an overlay on the opacity mask of the stratosphere and the remapped mask of the surface atmosphere.
[0169] Optionally, the calculation module 203 is specifically configured to calculate the backlit area mask and the illuminated area mask of the atmosphere according to the light direction parameter and the preset vertex normal;
[0170] The first generation module 201a is specifically configured to generate an atmospheric opacity mask according to the backlit area mask, the illuminated area mask, the preset atmospheric coverage range, the atmospheric attenuation parameter, and the overlaid mask.
[0171] Optionally, the generation module 201 further includes: a sixth generation module f, configured to obtain a virtual planet model; perform atmospheric effect rendering on the virtual planet model using the atmospheric mask file to generate a target virtual planet model.
[0172] As Figure 9 shown, the device further includes: a display module 206, configured to display the target virtual planet model in a preset virtual scene.
[0173] As Figure 9 shown, the device further includes: an adjustment module 207, configured to adjust the atmospheric effect of the target virtual planet model according to an adjustment operation of the configuration parameters for the atmospheric mask file input.
[0174] The above device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effects are similar, and will not be elaborated herein.
[0175] The above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processors that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0176] Figure 10 FIG. is a schematic structural diagram of an atmospheric mask file generation device provided in an embodiment of the present application. The atmospheric mask file generation device may be integrated into a terminal device or a chip of the terminal device.
[0177] As Figure 10 shown, the atmospheric mask file generation device includes: a processor 501, a storage medium 502, and a bus 503.
[0178] The processor 501 is used to store programs. The processor 501 calls the programs stored in the storage medium 502 to execute the above Figures 1 - 7 corresponding method embodiments. The specific implementation manners and technical effects are similar and will not be described in detail here.
[0179] Optionally, the present application further provides a program product, such as a storage medium, on which a computer program is stored, including a program that, when run by a processor, executes the corresponding embodiments of the above methods.
[0180] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces. The indirect coupling or communication connection of the devices or units may be in an electrical, mechanical, or other form.
[0181] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0182] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a hardware plus software functional unit.
[0183] The above integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above software functional unit stored in a storage medium includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk, or an optical disc that can store program codes.
Claims
1. A method for generating an atmospheric mask file, characterized in that, the method includes: generating an atmospheric opacity mask according to the mask of the stratosphere and the mask of the surface atmosphere; wherein, the mask of the stratosphere is configured with color parameters of the stratosphere, and the mask of the surface atmosphere is configured with color parameters of the surface atmosphere; generating an atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, and the atmospheric opacity mask; the atmospheric mask file is used to render the atmospheric effect of the virtual planet model, wherein, the mask of the troposphere is configured with color parameters of the troposphere; before generating the atmospheric opacity mask according to the mask of the stratosphere and the mask of the surface atmosphere, the method further includes: configuring color parameters for the black-and-white mask of the stratosphere and the black-and-white mask of the troposphere respectively to obtain the mask of the stratosphere and the mask of the troposphere; calculating the color parameters of the surface atmosphere according to the mask of the stratosphere, the mask of the troposphere, and preset surface scattering color parameters; configuring the black-and-white mask of the surface atmosphere according to the color parameters of the surface atmosphere to generate the mask of the surface atmosphere.
2. The method according to claim 1, characterized in that, before configuring color parameters for the black-and-white mask of the stratosphere and the black-and-white mask of the troposphere respectively to obtain the mask of the stratosphere and the mask of the troposphere, the method further includes; adjusting the pre-acquired black-and-white mask of the atmosphere according to a preset first region range to obtain the black-and-white mask of the stratosphere; generating the black-and-white mask of the troposphere according to a preset second region range and the black-and-white mask of the stratosphere; generating the black-and-white mask of the surface atmosphere according to the black-and-white mask of the atmosphere, the black-and-white mask of the stratosphere, and the black-and-white mask of the troposphere.
3. The method according to claim 1, characterized in that, before generating the atmospheric opacity mask according to the mask of the stratosphere and the mask of the surface atmosphere, the method further includes: performing an overlay process on the mask of the stratosphere and the mask of the troposphere according to a preset intensity value to obtain the color transition parameters between the stratosphere and the troposphere; the step of generating an atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, and the atmospheric opacity mask includes: generating the atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere, the atmospheric opacity mask, and the color transition parameters.
4. The method according to claim 1, characterized in that, before generating the atmospheric opacity mask according to the mask of the stratosphere and the mask of the surface atmosphere, the method further includes: configuring the thickness of the troposphere in the mask of the troposphere according to preset thickness configuration parameters.
5. The method according to claim 1, characterized in that, Before generating the atmospheric mask file based on the masks of the stratosphere, the troposphere, the surface atmosphere, and the atmospheric opacity mask, the method further includes: Generating the atmospheric mask file according to the masks of the stratosphere, the masks of the troposphere, the masks of the surface atmosphere, the atmospheric opacity mask, and a preset tropospheric attenuation parameter, where the tropospheric attenuation parameter is used to control the color transition between the troposphere and the surface atmosphere.
6. The method according to claim 1, wherein, Before generating the atmospheric opacity mask based on the masks of the stratosphere and the surface atmosphere, the method further includes: Controlling the intensity of the mask of the stratosphere to generate the opacity mask of the stratosphere; Performing an overlay process on the opacity mask of the stratosphere and the mask of the surface atmosphere; Generating the atmospheric opacity mask according to a preset light direction parameter, an atmospheric attenuation parameter, and the overlaid mask.
7. The method according to claim 6, wherein, Before performing the overlay process on the opacity mask of the stratosphere and the mask of the surface atmosphere, the method further includes: Remapping the mask of the surface atmosphere; The performing an overlay process on the opacity mask of the stratosphere and the mask of the surface atmosphere includes: Overlaying the opacity mask of the stratosphere and the remapped mask of the surface atmosphere.
8. The method according to claim 6, wherein, The generating the atmospheric opacity mask according to a preset light direction parameter, an atmospheric attenuation parameter, and the overlaid mask includes: Calculating a backlit area mask and a lit area mask of the atmosphere according to the light direction parameter and a preset vertex normal; Generating the atmospheric opacity mask according to the backlit area mask, the lit area mask, a preset atmospheric coverage range, the atmospheric attenuation parameter, and the overlaid mask.
9. The method according to claim 1, wherein, The method further includes: Obtaining a virtual planet model; Rendering the atmospheric effect of the virtual planet model using the atmospheric mask file to generate a target virtual planet model.
10. The method according to claim 9, wherein, The method further includes: Displaying the target virtual planet model in a preset virtual scene.
11. The method according to claim 10, wherein, The method further includes: Adjusting the atmospheric effect of the target virtual planet model according to an adjustment operation of input configuration parameters for the atmospheric mask file.
12. An apparatus for generating an atmospheric mask file, wherein, The apparatus includes: a generating module, and the generating module includes: a first generating module and a second generating module, where: The first generating module is configured to generate an atmospheric opacity mask according to the masks of the stratosphere and the surface atmosphere; wherein, the mask of the stratosphere is configured with color parameters of the stratosphere, and the mask of the surface atmosphere is configured with color parameters of the surface atmosphere; The second generation module is used to generate an atmospheric mask file according to the mask of the stratosphere, the mask of the troposphere, the mask of the surface atmosphere layer, and the atmospheric opacity mask; the atmospheric mask file is used to perform atmospheric effect rendering on the virtual planet model, wherein the mask of the troposphere is configured with color parameters of the troposphere; The device further includes a configuration module, which is used to configure color parameters for the black-and-white mask of the stratosphere and the black-and-white mask of the troposphere respectively to obtain the mask of the stratosphere and the mask of the troposphere; The device further includes a calculation module, which is used to calculate the color parameters of the surface atmosphere layer according to the mask of the stratosphere, the mask of the troposphere, and preset surface scattering color parameters; The generation module further includes a third generation module, which is used to configure the black-and-white mask of the surface atmosphere layer according to the color parameters of the surface atmosphere layer to generate the mask of the surface atmosphere layer.
13. An atmospheric mask file generation device, characterized in that, the device includes: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the atmospheric mask file generation device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the method according to any one of claims 1-11 above.
14. A computer-readable storage medium, characterized in that, a computer program is stored on the storage medium, and when the computer program is run by a processor, it executes the method according to any one of claims 1-11 above.
Citation Information
Patent Citations
Method for correcting light bending caused by atmospheric refraction in satellite earth observation
CN111879316A
Simulated display system for suspended particulate pollutants in simulated atmosphere flowing environment
CN212799683U