Virtual cloud generation method and device, electronic equipment and storage medium
Cartoon-style clouds are generated through 3D modeling and automated coloring technology, which solves the problem of high human and time resource consumption in existing technologies and realizes an efficient cloud production process.
Patent Information
- Application Number
- CN202510947606.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-17
AI Technical Summary
The production process of cartoon-style clouds requires a lot of manpower and time resources, resulting in low work efficiency.
Use the 3D matrix to model the cloud, color the cloud particle model using the preset shader, and use the preset particle parameters to fill the colored cloud particle model into the meta cloud to generate the target virtual cloud.
It reduces the consumption of human resources and time resources and improves the work efficiency of cartoon-style cloud production.
Smart Images

Figure CN120807746A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer graphics, and particularly relates to a virtual cloud generation method and device, electronic equipment and storage medium. BACKGROUND
[0002] In game development, the atmosphere of a natural scene is highly dependent on the performance effect of clouds. Traditional realistic style clouds usually use volume textures, procedural generation or real-time rendering technologies, which can quickly generate diversified solutions through parameter adjustment.
[0003] However, cartoon style (three-dimensional to two-dimensional) clouds often need to be highly stylized and restored manually, and the production process is similar to that of other art assets, which requires many human and time resources, resulting in low work efficiency of cartoon style cloud production. SUMMARY
[0004] The embodiments of the present application provide a virtual cloud generation method and device, electronic equipment and storage medium, which can reduce the consumption of human and time resources, and effectively improve the work efficiency of cartoon style cloud production.
[0005] In a first aspect, the embodiments of the present application provide a virtual cloud generation method, which comprises:
[0006] cloud modeling using a three-dimensional base to obtain a cloud particle model;
[0007] coloring the cloud particle model using a preset shader to obtain a colored cloud particle model;
[0008] generating a cloud according to a basic fusion ball to obtain a fusion ball cloud;
[0009] filling the colored cloud particle model into the fusion ball cloud using preset particle parameters to obtain a target virtual cloud.
[0010] In a second aspect, the embodiments of the present application provide a virtual cloud generation device, which comprises:
[0011] a cloud model acquisition module configured to perform cloud modeling using a three-dimensional base to obtain a cloud particle model;
[0012] a coloring module configured to color the cloud particle model using a preset shader to obtain a colored cloud particle model;
[0013] a fusion ball cloud acquisition module configured to generate a cloud according to a basic fusion ball to obtain a fusion ball cloud;
[0014] A virtual cloud obtaining module is configured to fill the colored cloud particle model into the fusion ball cloud by using preset particle parameters to obtain a target virtual cloud.
[0015] In a third aspect, an electronic device is provided, which includes a memory storing a plurality of instructions, and a processor loading the instructions from the memory to perform the steps of any of the methods for generating a virtual cloud.
[0016] In a fourth aspect, a computer readable storage medium is provided, which stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to perform the steps of any of the methods for generating a virtual cloud.
[0017] In a fifth aspect, a computer program product is provided, which includes a computer program or instructions, and the computer program or instructions are executed by a processor to implement the steps of any of the methods for generating a virtual cloud.
[0018] By using the scheme of the embodiments of the present application, a cloud particle model can be obtained by cloud modeling using a three-dimensional base, the cloud particle model is colored by using a preset shader to obtain a colored cloud particle model, a fusion ball cloud is obtained according to a basic fusion ball, and the colored cloud particle model is filled into the fusion ball cloud by using preset particle parameters to obtain a target virtual cloud. In the embodiments of the present application, the colored cloud particle model can be obtained by coloring a cloud particle model established in advance. The cloud particle model is created by using a three-dimensional base without manual production, but is automatically produced by a machine. Compared with manual production, the cloud particle model produced by the machine has higher working efficiency, and can effectively reduce the consumption of human resources and time resources. After the cloud particle model is established, the colored cloud particle model can be filled into the fusion ball cloud by using preset particle parameters to obtain the target virtual cloud. The entire process of producing the target virtual cloud is completed by a machine without manual production, and thus the consumption of human resources and time resources can be effectively reduced, and the working efficiency of producing a cartoon-style cloud is further improved. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0020] Figure 1is an embodiment flow diagram of a method for generating a virtual cloud provided in the embodiments of the present application;
[0021] Figure 2 is an embodiment diagram of reconstructing a sphere in a three-dimensional modeling software provided in the embodiments of the present application;
[0022] Figure 3 is an embodiment diagram of switching textures of the reconstructed sphere in a three-dimensional modeling software provided in the embodiments of the present application;
[0023] Figure 4 is an embodiment diagram of coloring a cloud particle model using a shader provided in the embodiments of the present application;
[0024] Figure 5 is an embodiment diagram of coloring a cloud particle model using a color gradient node and a mixing node provided in the embodiments of the present application;
[0025] Figure 6 is an embodiment flow diagram of coloring cloud particles provided in the embodiments of the present application;
[0026] Figure 7 is another embodiment flow diagram of coloring a cloud particle model using a shader provided in the embodiments of the present application;
[0027] Figure 8 is another embodiment diagram of coloring cloud particles provided in the embodiments of the present application;
[0028] Figure 9 is an embodiment flow diagram of obtaining an original cloud shape through a base fusion sphere provided in the embodiments of the present application;
[0029] Figure 10 is an embodiment diagram of meshing the original cloud shape provided in the embodiments of the present application;
[0030] Figure 11 is an embodiment diagram of filling a fusion sphere cloud using preset particle parameters provided in the embodiments of the present application;
[0031] Figure 12 is an embodiment diagram of adjusting a fusion sphere cloud using a rotation parameter and an instance rendering parameter provided in the embodiments of the present application;
[0032] Figure 13 is an embodiment diagram of adjusting a rendered virtual cloud using an emitter setting parameter and a gravity parameter provided in the embodiments of the present application;
[0033] Figure 14is a third embodiment schematic view of the colored cloud particle provided in the embodiments of the present application;
[0034] Figure 15 is a structural schematic view of the virtual cloud generation apparatus provided in the embodiments of the present application;
[0035] Figure 16 is a structural schematic view of the electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application. Meanwhile, in the description of the embodiments of the present application, the terms “first”, “second”, etc. are only used for differentiation and description, and cannot be understood as indicating or implying relative importance. Therefore, the features with “first” and “second” can explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of “multiple” is two or more than two, unless otherwise specifically limited.
[0037] The embodiments of the present application provide a virtual cloud generation method and device, an electronic device and a computer readable storage medium.
[0038] Specifically, the embodiments will be described from the perspective of the virtual cloud generation apparatus. The virtual cloud generation apparatus can be integrated in an electronic device, that is, the virtual cloud generation method of the embodiments of the present application can be executed by the electronic device. Optionally, the electronic device can include a terminal device. The terminal device can be a mobile phone, a tablet computer, a smart Bluetooth device, a notebook computer, a game console, or a personal computer (PC) and the like.
[0039] The virtual cloud generation method provided in the embodiments of the present application can be applied to a virtual cloud generation system. The virtual cloud generation system can include a player terminal device and a server. The terminal can be a device that includes receiving and transmitting hardware, that is, a device with receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. The player terminal device and the server can perform bidirectional communication through a network.
[0040] Optionally, the server can be a stand-alone server, or a server network or server cluster composed of servers, including but not limited to a computer, a network host, a single network server, a plurality of network server sets, or a cloud server composed of a plurality of servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0041] The following will be described in detail with reference to the accompanying drawings. In the embodiments, the execution subject is taken as an example of a terminal device. It should be noted that the sequence of the following embodiments is not limited as the preferred sequence of the embodiments. Although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a sequence different from that shown in the accompanying drawings.
[0042] The virtual cloud generation method of the embodiments of the present disclosure can utilize a three-dimensional base to model a cloud, obtain a cloud particle model; utilize a preset shader to color the cloud particle model, obtain a colored cloud particle model; generate a cloud according to a base fusion sphere, obtain a fusion sphere cloud; utilize a preset particle parameter to fill the colored cloud particle model into the fusion sphere cloud, obtain a target virtual cloud. In the embodiments of the present disclosure, the colored cloud particle model can be obtained by coloring a pre-established cloud particle model. The cloud particle model is created by utilizing a three-dimensional base, without manual production, but automatic production by a machine. Compared with manual production, the cloud particle model produced by the machine has higher working efficiency, and can effectively reduce the consumption of human resources and time resources. Moreover, after the cloud particle model is established, the colored cloud particle model can be filled into the fusion sphere cloud by utilizing a preset particle parameter, to obtain a target virtual cloud. The entire process of producing the target virtual cloud is completed by a machine, without manual production, thereby effectively reducing the consumption of human resources and time resources, and further improving the working efficiency of producing a cartoon-style cloud.
[0043] Please refer to Figure 1 The specific process of the virtual cloud generation method can include the following steps 101-104, wherein:
[0044] Step 101, utilizing a three-dimensional base to model a cloud, to obtain a cloud particle model;
[0045] In the embodiments of the present disclosure, the three-dimensional base can be created by a three-dimensional modeling software, and the three-dimensional base can be a sphere or an ellipsoid, and the three-dimensional modeling software can include any one of Autodesk Maya, Autodesk 3ds Max, Blender, Cinema4D, and Houdini. The following specifically takes Blender as an example.
[0046] In the implementation process, an original sphere such as a quad sphere or a hexagon sphere can be first created in a three-dimensional modeling software, and then cloud modeling is performed by using the original sphere to obtain a cloud particle model. At this time, the original sphere can be directly used as the cloud particle model, or the parameters of the original sphere are adjusted, and the original sphere after the adjustment is used as the cloud particle model.
[0047] In some embodiments, in order to make the cloud particle model have a higher matching degree with an actual cloud, the texture of the original sphere can be replaced with a cloud texture after the original sphere is created in the three-dimensional modeling software to obtain the cloud particle model. At this time, the original sphere after the texture replacement is used as the cloud particle model, so that the texture of the cloud particle model is the cloud texture, and the matching degree with the actual cloud is higher, thereby improving the realistic effect of the cloud particle model.
[0048] In the embodiments of the present disclosure, the cloud texture includes any one or more of cloud floccus texture, cloud layer texture, cloud honeycomb texture, and cloud fiber texture, and the embodiments of the present disclosure are not specifically limited.
[0049] In another embodiment, after the original sphere is created in the three-dimensional modeling system, the original sphere is also subjected to mesh reconstruction to obtain a reconstructed sphere, and then the texture of the reconstructed sphere is replaced with a cloud texture to obtain a cloud particle model. At this time, by performing mesh reconstruction on the original sphere, the topological structure of the original sphere can be optimized, thereby effectively improving the mesh quality and enhancing the stability of subsequent operations, so that the cloud particle model generated when the texture of the reconstructed sphere is replaced with the cloud texture has higher stability.
[0050] For example, referring to Figure 2 , a quad sphere can be added in Blender by using Shift+A, then a remesh modifier is selected in the modifier panel, a remesh modifier is created for it, the voxel size is modified to 0.25, a new displacement modifier is created, a new image texture is clicked, and the intensity is adjusted to 0.75 to obtain a reconstructed sphere 20; referring to Figure 3 , then the "texture" tab can be selected in the property editor, the default texture type is switched to "clouds", and the size is adjusted to 1.2, thereby creating a cloud particle shape 30 as a cloud particle model. At this time, the texture of the cloud particle shape 30 is the cloud floccus texture, and the matching degree with the actual cloud is higher, thereby improving the realistic effect of the cloud particle model.
[0051] Any one numerical value in the specification of the present application is a rough value, and any one numerical value can be set according to actual needs, and the value can be floated up and down, for example, the voxel size can be 0.35, 0.32, 0.23 and 0.19, etc.
[0052] Step 102, color the cloud particle model by using the preset shader to obtain a colored cloud particle model.
[0053] In the embodiments of the present application, the preset shader can be any one of Blender Shader, Unity Shader Graph and Unreal Material Editor. The following will be specifically described by taking Blender Shader as an example.
[0054] Specifically, after determining the preset shader, the coloring parameters can be obtained in advance, and then the cloud particle model is colored by using the coloring parameters in the preset shader to obtain the colored cloud particle model. The coloring parameters can include one or more of color conversion, cloud color parameters and cloud mixing parameters.
[0055] In some embodiments, when the coloring parameters can include first cloud color parameters and first cloud mixing parameters, the cloud particle model can be first colored by using the first cloud color parameters and the first cloud mixing parameters in the preset shader to obtain a first colored cloud particle model; and then the colored cloud particle model is obtained according to the first colored cloud particle model.
[0056] Specifically, the cloud particle model can be first color gradient processed by using the first cloud color parameters to obtain a first gradient cloud particle model; and then the color light and shade of the first gradient cloud particle model is processed by using the first cloud mixing parameters to obtain the first colored cloud particle model.
[0057] Specifically, the cloud particle model can be first color gradient processed by using the first cloud color parameters to obtain a first gradient cloud particle model; and then the color light and shade of the first gradient cloud particle model is processed by using the first cloud mixing parameters to obtain the first colored cloud particle model.
[0058] In the color gradient processing using the first cloud color parameter, the color range and effect of the cloud particle model can be adjusted by at least two colors. If the at least two colors include color 1 and color 2, the first cloud color parameter includes an adjustment parameter of color 1 and an adjustment parameter of color 2, and the color range and effect of the cloud particle model are adjusted by using the adjustment parameter of color 1 and the adjustment parameter of color 2. Similarly, the first cloud mixing parameter also needs to be adjusted by at least two colors to adjust the light and dark colors of the cloud particle model. If the at least two colors include color 3 and color 4, the first cloud mixing parameter includes an adjustment parameter of color 3 and an adjustment parameter of color 4, and the light and dark colors of the cloud particle model are adjusted by using the adjustment parameter of color 3 and the adjustment parameter of color 4, thereby obtaining the first colored cloud particle model.
[0059] In actual application, after the cloud particle model is colored by using the first cloud color parameter and the first cloud mixing parameter, the first colored cloud particle model obtained is very close to the cloud particle with the cartoon effect, and only lacks the color of the light and dark boundary line. Therefore, the first colored cloud particle model can be directly used as the colored cloud particle model.
[0060] In another embodiment, the coloring parameters further include a second cloud color parameter and a second cloud mixing parameter. After the cloud particle model is colored by using the first cloud color parameter and the first cloud mixing parameter in the preset shader to obtain the first colored cloud particle model, the cloud particle model can be further colored by using the second cloud color parameter and the second cloud mixing parameter in the preset shader to obtain a second colored cloud particle model. The colored cloud particle model is obtained according to the first colored cloud particle model and the second colored cloud particle model. In this way, the second colored cloud particle model obtained by coloring the cloud particle model by using the second cloud color parameter and the second cloud mixing parameter is combined with the first colored cloud particle model, so that the color and range of the light and dark boundary line of the first colored cloud particle model can be adjusted, and the colored cloud particle model obtained has a higher cartoon cloud effect.
[0061] Specifically, when the cloud particle model is colored by using the second cloud color parameter and the second cloud mixing parameter in the preset shader to obtain the second colored cloud particle model, the cloud particle model can be color gradient processed by using the second cloud color parameter to obtain a second gradient cloud particle model, and the color light and dark of the second gradient cloud particle model are processed by using the second cloud mixing parameter to obtain the second colored cloud particle model.
[0062] Specifically, the second cloud particle model can be subjected to a second shading process using the second cloud color parameter and the second cloud mixing parameter in sequence, to obtain a second shading processed cloud particle model, wherein the second gradient cloud particle model obtained using the second cloud color parameter can be used as an intermediate particle model without being generated.
[0063] Further, since the first shading processed cloud particle model and the second shading processed cloud particle model are also used as intermediate particle models, they can also be generated without being generated; at this time, the cloud particle model can be subjected to a first shading process using the first cloud color parameter and the first cloud mixing parameter in sequence, and subjected to a second shading process using the second cloud color parameter and the second cloud mixing parameter in sequence, and then the cloud particle model subjected to the first shading process and the second shading process can be combined as a shaded cloud particle model.
[0064] Wherein, when the color gradient process is performed using the first cloud color parameter, the color range and effect of the cloud particle model can be adjusted by at least two colors, if the at least two colors include color 5 and color 6, at this time, the second cloud color parameter includes the adjustment parameter of color 5 and the adjustment parameter of color 6, and the color range and effect of the cloud particle model are adjusted using the adjustment parameter of color 5 and the adjustment parameter of color 6. Similarly, the second cloud mixing parameter also needs to adjust the light and dark color of the cloud particle model by at least two colors, if the at least two colors include color 7 and color 8, at this time, the second cloud mixing parameter includes the adjustment parameter of color 7 and the adjustment parameter of color 8, and the light and dark color of the cloud particle model is adjusted using the adjustment parameter of color 7 and the adjustment parameter of color 8, to obtain the second shading processed cloud particle model.
[0065] In another embodiment, before the cloud particle model is subjected to a first shading process using the first cloud color parameter and the first cloud mixing parameter in the preset shader, the cloud particle model can also be processed using a diffuse node in the preset shader to obtain a principled cloud particle model; the principled cloud particle model is subjected to a color conversion process to obtain a color converted cloud particle model; and then for the color converted cloud particle model, the step of subjecting the cloud particle model to a first shading process using the first cloud color parameter and the first cloud mixing parameter in the preset shader is performed.
[0066] In actual application process, for example, Figure 4As shown, after the cloud particle model is obtained through step 101, a diffuse BSDF node 41 can be newly created in the shader editor Blender Shader for the cloud particle model using Shift+A, and the following key nodes are sequentially created: a Shader to RGB node 42, a color ramp node 43, a MixRGB node 44, and a material output node 45. The Shader to RGB node 42 is used to convert the shader information into editable color data. The color ramp node 43 is used to achieve the color layering effect of the cartoon rendering. The MixRGB node 44 is used for color superposition and special effect mixing. After the above five nodes are created, the diffuse BSDF node 41, the Shader to RGB node 42, the color ramp node 43, the MixRGB node 44, and the material output node 45 are sequentially connected together.
[0067] Secondly, referring to Figure 5 , the color 1 and the color 2 in the MixRGB node 44 are used to control the light and dark colors, the color 1 controls the bright color, and the color 2 controls the dark color. Similarly, the white slider 431 and the black slider 432 in the color ramp node 43 are two different color sliders, the white slider 431 is used to control the color range and effect of the color 1, and the black slider 432 is used to control the color range and effect of the color 2. By adjusting the parameters of the color 1, the color 2, the white slider 431, and the black slider 432, the cloud particle after the parameter adjustment is output through the material output node 45, and a cloud particle close to the cartoon effect is obtained, as shown in Figure 6 .
[0068] Further, Figure 6 , the cloud particle in the above-mentioned method still lacks the color of the light and dark boundary line. The three-dimensional-to-two-dimensional (cartoon) cloud is an effect obtained by simplifying the realistic basis. At this time, as shown in Figure 7 , a color ramp node 46 and a MixRGB node 47 are newly created, the color output of the Shader to RGB node 42 is connected to the input port of the color ramp node 46, the color ramp node 46 is connected to the coefficient input of the MixRGB node 47, and finally the color output of the color ramp node 47 is connected to the color 1 input of the MixRGB node 44.
[0069] Correspondingly, the color 1 and the color 2 in the MixRGB node 47 are also included, wherein the color 1 controls the bright color, and the color 2 controls the dark color. Similarly, the white slider and the black slider in the color ramp node 46 are two different color sliders. By adjusting the white slider, the black slider, the color 1, and the color 2 in the MixRGB node 47, the cloud particle after the adjustment is output through the material output node 45, and a more perfect cartoon cloud particle is obtained, as shown in Figure 8 .
[0070] Step 103, generating a cloud according to the basic fusion ball, and obtaining a fusion ball cloud;
[0071] In the embodiments of the present specification, the basic fusion ball is usually provided by the basic fusion ball function in the three-dimensional modeling software, and the basic fusion ball can fuse multiple spheres.
[0072] Specifically, the basic fusion ball function in the three-dimensional modeling software can be used to fuse multiple spheres to obtain an original cloud shape; and then the original cloud shape is gridded to obtain a fusion ball cloud. Of course, the original cloud shape can also be directly used as the fusion ball cloud, or the original cloud shape can be reconstructed, and then the reconstructed original cloud shape is gridded to obtain the fusion ball cloud, which is not limited in the present specification.
[0073] For example, taking Blender as an example, referring to Figure 9 After starting Blender, the basic fusion ball (Metaball) can be added by using Shift+A, at this time the initial type is usually selected as a sphere (Ball), which can make two spheres have a "sticky" effect, press Tab to enter the edit mode to adjust the control points, use the S key to scale the influence range of a single fusion ball, create a natural fusion effect by moving G, and adjust the shape to form an original cloud shape. For example, refer to Figure 10 After creating the original cloud shape, the grid can be obtained by right-clicking to convert to a grid, that is, a gridded original cloud shape, that is, a fusion ball cloud.
[0074] Step 104, filling the colored cloud particle model into the fusion ball cloud by using preset particle parameters to obtain a target virtual cloud.
[0075] In the specific implementation process, after obtaining the colored cloud particle model by step 102 and obtaining the fusion ball cloud by step 103, the preset particle parameters can be obtained first, the colored cloud particle model is filled into the fusion ball cloud to obtain a target virtual cloud.
[0076] In the embodiments of the present specification, the preset particle parameters can include one or more of the particle quantity, the start frame, the end frame, the life cycle, and the emission source type, which are not limited in the present specification.
[0077] Specifically, the particle quantity in the preset particle parameters can be used to adjust the density of the cloud particles, the start frame and the end frame can be used to adjust the stability of the cloud particles, and the emission source type can be used to adjust the distribution of the cloud particles.
[0078] Specifically, after the preset particle parameters are acquired, the colored cloud particle model is filled into the fusion sphere cloud by using the preset particle parameters to obtain an original virtual cloud. At this time, the original virtual cloud can be taken as the target virtual cloud.
[0079] For example, after the fusion sphere cloud is obtained, a particle system is created in Blender for the fusion sphere cloud by sequentially performing the following steps: selecting the fusion sphere object, entering the attribute window, and then clicking "+" in the particle attribute panel to newly create a particle system, so that the particle system is created for the fusion sphere cloud. After the particle system is created, the particle parameters are first adjusted. Referring to FIG. 6, the number of particles can be set to 1600, the start frame and the end frame can be both set to 1 to keep the particle state stable, the life cycle can be set to 250 frames to ensure sufficient operation time, and the emission source type can be selected as "Volume" to cancel the "Uniform Distribution" option and select the random order to achieve natural random distribution. Figure 11
[0080] In another embodiment, after the preset particle parameters are acquired, the colored cloud particle model can be filled into the fusion sphere cloud by using the preset particle parameters to obtain an original virtual cloud, the cloud particles in the original virtual cloud are controlled to rotate by using preset rotation parameters to obtain a rotated original virtual cloud, and the target virtual cloud is acquired according to the rotated original virtual cloud.
[0081] In the embodiments of the present specification, the rotation parameters include one or more of a random value for controlling the difference degree of the rotation direction and a phase value for controlling the starting angle of rotation. Hereinafter, the rotation parameters are taken as an example including the random value and the phase value.
[0082] Specifically, if the rotation parameters include the random value and the phase value, the cloud particles in the original virtual cloud are controlled to rotate by using the random value and the phase value to obtain the rotated original virtual cloud. After the rotated original virtual cloud is obtained, the rotated original virtual cloud can be directly taken as the target virtual cloud.
[0083] In another embodiment, after the rotated original virtual cloud is obtained, the rotated original virtual cloud can also be rendered by using preset instance rendering parameters to obtain a rendered virtual cloud, and the target virtual cloud is acquired according to the rendered virtual cloud.
[0084] In the embodiments of the present specification, the instance rendering parameters include one or more of a rendering object and a rendering size. Hereinafter, the instance rendering parameters are taken as an example including the rendering object and the rendering size.
[0085] For example, after the rotated original virtual cloud is obtained as shown in FIG. 7, the instance rendering parameters are set as shown in FIG. 8. Referring to FIG. 8, the rendering object can be set as "Cloud", the rendering size can be set as 0.5, and the number of instances can be set to 1000. Figure 11 The original virtual cloud shown, see Figure 12 The particle rotation function can be enabled in Blender by checking the "Rotation" option, and then adjusting the "Random" value, for example, to 0.299, to control the difference in rotation direction, and finally adjusting the "Phase" value, for example, to 0.061, to control the starting angle of rotation, to obtain the rotated original virtual cloud. Then adjust the rendering parameters, change the "Render as" option to "Object", and appropriately increase the "Scale" value, for example, from the default value of 0.560 to 0.585. Then select the previously created cloud particle model in the "Object -> Instance Object" option to fill the colored cloud particle model into the fusion sphere cloud, and obtain the target virtual cloud.
[0086] As can be seen from the above, the rotation function in the three-dimensional modeling software can be used to realize the different orientations of the cloud particles, and the random value can be used to increase the natural variation of the rotation direction, and the phase value can be used to adjust the overall rotation reference angle, and the object rendering can be used to realize the actual model instead of simple point rendering, and finally the scaling adjustment can be used to realize the display size of the modified instance object, so that the final target virtual cloud is closer to the cartoon cloud, and the cartoon effect of the target virtual cloud is improved.
[0087] In another embodiment, to further improve the cartoon effect of the target virtual cloud, after obtaining the rendered virtual cloud, the rendered virtual cloud can be adjusted using the emitter setting parameters and gravity parameters to obtain an adjusted virtual cloud, and the adjusted virtual cloud can be used as the target virtual cloud. At this time, after obtaining the rendered virtual cloud, the rendered virtual cloud is adjusted by the emitter setting parameters to make the adjusted virtual cloud more neat, and the rendered virtual cloud is adjusted by the gravity parameters to make the adjusted virtual cloud maintain a suspended state and have a higher matching degree with the actual cloud.
[0088] For example, after obtaining the rendered virtual cloud as shown in Figure 12 , as shown in Figure 13 , the "Show Emitter" option in the view display settings in Blender can be unchecked to hide the fusion sphere base object, and then the force field weight parameter group can be found to modify the gravity value to 0 to ensure that the cloud particles are not affected by gravity, and thus obtain the target virtual cloud. In this way, the emitter can be hidden to keep the scene neat, and only the final cloud effect is displayed, and the gravity is set to zero to prevent the cloud particles from falling and maintain a natural suspended state.
[0089] In actual application, after obtaining the rendered virtual cloud as shown in Figure 13The target virtual cloud shown can also be controlled in the timeline in Blender. First, open the Timeline editor, and then drag the time slider backward. The frame number of the time slider can be set to any one of 1-8 frames. The target virtual cloud can also be previewed. The particle system will automatically fill the spherical shape, and the complete three-dimensional volumetric cloud effect will be presented immediately. Details are shown in the following figure. Figure 14
[0090] Specifically, during the process of automatically filling the spherical shape in the particle system, the particles will gradually fill the entire spherical volume, so that the cartoon-style features of the cloud are clearly visible, and the directional change effect caused by the rotation parameter is also presented. Of course, the animation can also be played / paused by pressing the space bar, and the time slider can be moved frame by frame using the direction keys.
[0091] The generation method of the virtual cloud of the embodiments of the present specification can obtain a colored cloud particle model by coloring a pre-established cloud particle model. The cloud particle model is created using a three-dimensional base, and does not need to be manually created, but is automatically created by a machine. Compared with manual creation, the cloud particle model created by the machine has higher working efficiency, and can effectively reduce the consumption of human resources and time resources. Moreover, after the cloud particle model is established, the colored cloud particle model can be filled into a spherical cloud using preset particle parameters, so that the target virtual cloud is obtained. The entire process of creating the target virtual cloud is completed by a machine, without manual creation, thereby effectively reducing the consumption of human resources and time resources, and further improving the working efficiency of creating a cartoon-style cloud.
[0092] The embodiments also provide a virtual cloud generation device. The virtual cloud generation device can be integrated in a terminal device. For example, as shown in the following figure, the virtual cloud generation device can include: Figure 15
[0093] The cloud model acquisition module 110 is configured to model a cloud using a three-dimensional base to obtain a cloud particle model.
[0094] The coloring module 120 is configured to color the cloud particle model using a preset shader to obtain a colored cloud particle model.
[0095] The spherical cloud acquisition module 130 is configured to generate a cloud based on a basic spherical cloud to obtain a spherical cloud.
[0096] The virtual cloud acquisition module 140 is configured to fill the colored cloud particle model into the spherical cloud using preset particle parameters to obtain a target virtual cloud.
[0097] Optionally, the cloud model obtaining module 110 is further configured to create an original sphere in a three-dimensional model system; and replace a texture of the original sphere with a cloud texture to obtain a cloud particle model.
[0098] Optionally, the virtual cloud generating apparatus further comprises:
[0099] a reconstruction module configured to perform mesh reconstruction on the original sphere to obtain a reconstructed sphere after the original sphere is created in the three-dimensional model system;
[0100] The cloud model obtaining module 110 is further configured to replace a texture of the reconstructed sphere with a cloud texture to obtain a cloud particle model.
[0101] Optionally, the shading module 120 is further configured to perform first shading processing on the cloud particle model by using a first cloud color parameter and a first cloud mixing parameter in a preset shader to obtain a first shading-processed cloud particle model; and obtain a shaded cloud particle model according to the first shading-processed cloud particle model.
[0102] Optionally, the shading module 120 is further configured to perform color gradient processing on the cloud particle model by using the first cloud color parameter to obtain a first gradient cloud particle model; and perform color light and shade processing on the first gradient cloud particle model by using the first cloud mixing parameter to obtain the first shading-processed cloud particle model.
[0103] Optionally, the shading module 120 is further configured to perform second shading processing on the cloud particle model by using a second cloud color parameter and a second cloud mixing parameter in the preset shader after the first shading processing on the cloud particle model by using the first cloud color parameter and the first cloud mixing parameter in the preset shader to obtain a second shading-processed cloud particle model; and obtain the shaded cloud particle model according to the first shading-processed cloud particle model and the second shading-processed cloud particle model.
[0104] Optionally, the shading module 120 is further configured to perform color gradient processing on the cloud particle model by using the second cloud color parameter to obtain a second gradient cloud particle model; and perform color light and shade processing on the second gradient cloud particle model by using the second cloud mixing parameter to obtain the second shading-processed cloud particle model.
[0105] Optionally, the virtual cloud generating apparatus further comprises:
[0106] a diffusion processing module configured to perform processing on the cloud particle model by using a diffusion node in the preset shader to obtain a physicalized cloud particle model before the first shading processing on the cloud particle model by using the first cloud color parameter and the first cloud mixing parameter in the preset shader.
[0107] A color conversion module is used to perform color conversion on the principled cloud particle model to obtain a color-converted cloud particle model;
[0108] The coloring module 120 is further configured to perform a first coloring process on the cloud particle model after color conversion by using the first cloud color parameter and the first cloud mixing parameter in the preset shader.
[0109] Optionally, the virtual cloud acquisition module 140 is further used to use preset particle parameters to fill the colored cloud particle model into the meta cloud to obtain an original virtual cloud; use preset rotation parameters to control the cloud particles in the original virtual cloud to rotate to obtain a rotated original virtual cloud; and obtain a target virtual cloud based on the rotated original virtual cloud.
[0110] Optionally, the virtual cloud acquisition module 140 is further configured to render the rotated original virtual cloud using preset instance rendering parameters to obtain a rendered virtual cloud; and obtain a target virtual cloud based on the rendered virtual cloud.
[0111] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, such as a smartphone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), or the like. Alternatively, the electronic device may be a server.
[0112] like Figure 12 As shown, Figure 12 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 1100 includes a processor 1101 having one or more processing cores, a memory 1102 having one or more computer-readable storage media, and a computer program stored in the memory 1102 and executable on the processor. The processor 1101 is electrically connected to the memory 1102. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0113] The processor 1101 is the control center of the electronic device 1100, connects all parts of the electronic device 1100 through various interfaces and lines, executes various functions of the electronic device 1100 and processes data by running or loading software programs and / or units stored in the memory 1102 and calling data stored in the memory 1102, thereby overall monitoring the electronic device 1100. The processor 1101 can be a central processing unit CPU, a graphics processing unit GPU, a network processor NP, etc., and can implement or execute various methods, steps and logic block diagrams disclosed in the embodiments of the present application.
[0114] In the embodiments of the present application, the processor 1101 in the electronic device 1100 loads the instructions corresponding to the processes of one or more application programs into the memory 1102, and runs the application programs stored in the memory 1102 by the processor 1101, thereby realizing various functions, for example: cloud modeling by using a three-dimensional base to obtain a cloud particle model; coloring the cloud particle model by using a preset shader to obtain a colored cloud particle model; cloud generation according to a basic fusion sphere to obtain a fusion sphere cloud; filling the colored cloud particle model into the fusion sphere cloud by using preset particle parameters to obtain a target virtual cloud.
[0115] The generation method of the virtual cloud of the embodiments of the present specification can obtain a colored cloud particle model by coloring a pre-established cloud particle model; and the cloud particle model is created by using a three-dimensional base, without manual production, but automatic production by a machine. Compared with manual production, the cloud particle model produced by the machine has higher working efficiency, which can effectively reduce the consumption of human resources and time resources; and after establishing the cloud particle model, the colored cloud particle model can be filled into the fusion sphere cloud by using preset particle parameters, so that the target virtual cloud is obtained, so that the entire process of producing the target virtual cloud is completed by a machine, without manual production, thereby effectively reducing the consumption of human resources and time resources, and further improving the working efficiency of producing the cartoon-style cloud.
[0116] The specific implementation of each operation can be referred to the previous embodiments, which will not be described here.
[0117] Optionally, as shown in Figure 16 The electronic device 1100 further includes a touch display screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106 and a power supply 1107. The processor 1101 is electrically connected with the touch display screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106 and the power supply 1107, respectively. Those skilled in the art can understand that the electronic device 1100 can further include other components necessary for the electronic device 1100 to operate, which will not be described here.Figure 16 The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0118] The touch display screen 1103 can be used to display a graphical user interface and receive user actions on the operation instructions generated by the graphical user interface. The touch display screen 1103 may include a display panel and a touch panel. Among them, the display panel can be used to display the information input by the user or the information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, a liquid crystal display (LCD), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like can be used to configure the display panel. The touch panel can be used to collect the user's touch operations on or near it (such as the user uses any suitable object or accessory such as a finger, a stylus on the touch panel or near the touch panel) and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 1101, and can receive the command sent by the processor 1101 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 1101 to determine the type of touch event. Then the processor 1101 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 1103 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 1103 can also be used as part of the input unit 1106 to realize the input function.
[0119] The radio frequency circuit 1104 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals with the network device or other electronic devices.
[0120] The audio circuit 1105 can be used to provide an audio interface between a user and the electronic device through a speaker and a microphone. The audio circuit 1105 can convert received audio data into an electrical signal and transmit the electrical signal to the speaker for conversion into an audible signal by the speaker. On the other hand, the microphone can collect a sound signal and convert the sound signal into an electrical signal, which is received by the audio circuit 1105 and converted into audio data. The audio data can be output to the processor 1101 for processing, transmitted to another electronic device via the radio frequency circuit 1104, or output to the memory 1102 for further processing. The audio circuit 1105 can also include a jack for a headset to provide communication between the headset and the electronic device.
[0121] The input unit 1106 can be used to receive inputted digital, character information or user feature information (e.g., fingerprint, iris, face information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0122] The power supply 1107 is used to supply power to various components of the electronic device 1100. Optionally, the power supply 1107 can be logically connected to the processor 1101 through a power management system, so that the power management system can be used to manage charging, discharging, power consumption management, etc. The power supply 1107 can also include one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, etc.
[0123] Although Figure 16 The electronic device 1100 can also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which are not shown in the above embodiments and will not be described here.
[0124] In the above embodiments, the description of each embodiment focuses on different aspects, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0125] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by using instructions or by using instructions to control relevant hardware. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0126] To this end, an embodiment of the present application provides a computer readable storage medium, wherein a plurality of computer programs are stored, the computer programs being capable of being loaded by a processor to execute any of the virtual cloud generation methods provided by the embodiments of the present application. The computer programs can execute the steps of the virtual cloud generation method as follows: cloud modeling is performed by using a three-dimensional base body to obtain a cloud particle model; the cloud particle model is colored by using a preset shader to obtain a colored cloud particle model; cloud generation is performed according to a base fusion sphere to obtain a fusion sphere cloud; and the colored cloud particle model is filled into the fusion sphere cloud by using preset particle parameters to obtain a target virtual cloud.
[0127] The specific implementation of each operation can refer to the foregoing embodiments, and will not be described here again.
[0128] The computer readable storage medium can include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0129] Since the computer programs stored in the computer readable storage medium can execute any of the virtual cloud generation methods provided by the embodiments of the present application, the beneficial effects that can be achieved by any of the virtual cloud generation methods provided by the embodiments of the present application can be achieved, which will be described in detail in the foregoing embodiments and will not be described here again.
[0130] According to an aspect of the present application, a computer program product or computer program is also provided, which includes computer instructions stored in a computer readable storage medium. A processor of an electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the electronic device to perform the methods provided in various optional implementation manners in the foregoing embodiments.
[0131] In the above virtual cloud generation apparatus, computer readable storage medium, electronic device, and computer program product embodiments, the descriptions of various embodiments are each focused on, and the parts not described in detail in an embodiment can refer to the related descriptions of other embodiments. Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the virtual cloud generation apparatus, computer readable storage medium, computer program product, electronic device, and corresponding units thereof described above and the beneficial effects that can be brought about can refer to the descriptions of the virtual cloud generation method in the foregoing embodiments, and will not be described here again.
[0132] The above describes in detail the virtual cloud generation method, device, electronic device, computer readable storage medium and computer program product provided by the embodiments of the present application. The principles and implementation manners of the present application are described by applying specific examples. The above embodiment description is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range can be changed. In conclusion, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A method for generating a virtual cloud, characterized in that: The method comprises: Use the three-dimensional matrix to model the cloud and obtain the cloud particle model; Coloring the cloud particle model using a preset shader to obtain a colored cloud particle model; Generate clouds based on the basic meta ball to obtain meta ball clouds; Using preset particle parameters, the colored cloud particle model is filled into the meta cloud to obtain the target virtual cloud.
2. The method according to claim 1, wherein The cloud modeling using the three-dimensional matrix to obtain the cloud particle model includes: Creating an original sphere in the three-dimensional model system, wherein the three-dimensional base includes the original sphere; The texture of the original sphere is replaced with the cloud texture to obtain the cloud particle model.
3. The method according to claim 2, wherein After creating the original sphere in the three-dimensional model system, the method further includes: Reconstructing the original sphere into a grid to obtain a reconstructed sphere; The step of replacing the texture of the original sphere with a cloud texture to obtain the cloud particle model includes: The texture of the reconstructed sphere is replaced with a cloud texture to obtain the cloud particle model.
4. The method according to claim 1, wherein The step of coloring the cloud particle model using a preset shader to obtain a colored cloud particle model includes: Performing a first coloring process on the cloud particle model using the first cloud color parameter and the first cloud mixing parameter in the preset shader to obtain a cloud particle model after the first coloring process; The colored cloud particle model is obtained according to the cloud particle model after the first coloring process.
5. The method according to claim 4, wherein The step of performing a first shading process on the cloud particle model using the first cloud color parameter and the first cloud mixing parameter in the preset shader to obtain the cloud particle model after the first shading process includes: performing color gradient processing on the cloud particle model using the first cloud color parameter to obtain a first gradient cloud particle model; The first cloud mixing parameter is used to perform color shading on the first gradient cloud particle model to obtain the cloud particle model after the first coloring process.
6. The method according to claim 5, wherein After performing a first shading process on the cloud particle model using the first cloud color parameter and the first cloud mixing parameter in the preset shader to obtain a cloud particle model after the first shading process, the method further includes: performing a second coloring process on the cloud particle model using the second cloud color parameter and the second cloud mixing parameter in the preset shader to obtain a cloud particle model after the second coloring process; The colored cloud particle model is obtained according to the cloud particle model after the first coloring process and the cloud particle model after the second coloring process.
7. The method according to claim 6, wherein The step of performing a second shading process on the cloud particle model by using the second cloud color parameter and the second cloud mixing parameter in the preset shader to obtain the cloud particle model after the second shading process comprises: performing color gradient processing on the cloud particle model using the second cloud color parameter to obtain a second gradient cloud particle model; The second cloud mixing parameter is used to perform color shading on the second gradient cloud particle model to obtain the cloud particle model after the second coloring process.
8. The method according to any one of claims 4 to 7, wherein: Before performing a first shading process on the cloud particle model using the first cloud color parameter and the first cloud blending parameter in the preset shader, the method further includes: Processing the cloud particle model using the diffuse node in the preset shader to obtain a principled cloud particle model; Performing color conversion processing on the principled cloud particle model to obtain a color-converted cloud particle model; For the cloud particle model after the color conversion, the following steps are performed: using the first cloud color parameter and the first cloud mixing parameter in the preset shader to perform a first coloring process on the cloud particle model.
9. The method according to any one of claims 1 to 7, wherein: The method of filling the colored cloud particle model into the meta cloud using preset particle parameters to obtain a target virtual cloud includes: Using the preset particle parameters, filling the colored cloud particle model into the meta cloud to obtain an original virtual cloud; Using preset rotation parameters, controlling cloud particles in the original virtual cloud to rotate, to obtain a rotated original virtual cloud; The target virtual cloud is obtained according to the rotated original virtual cloud.
10. The method according to claim 9, wherein The step of obtaining the target virtual cloud according to the rotated original virtual cloud includes: Rendering the rotated original virtual cloud using preset instance rendering parameters to obtain a rendered virtual cloud; The target virtual cloud is obtained according to the rendered virtual cloud.
11. A device for generating virtual clouds, characterized in that: The device comprises: A cloud model acquisition module is used to model clouds using a three-dimensional matrix to obtain a cloud particle model; a coloring module, configured to color the cloud particle model using a preset shader to obtain a colored cloud particle model; The meta-ball cloud acquisition module is used to generate clouds based on the basic meta-ball and obtain meta-ball clouds; The virtual cloud acquisition module is used to fill the colored cloud particle model into the meta cloud using preset particle parameters to obtain a target virtual cloud.
12. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the method for generating a virtual cloud according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the method for generating a virtual cloud according to any one of claims 1 to 10.