Virtual scene generation method and device, storage medium and electronic equipment

By generating virtual rain column scenes using trunk and raindrop models and particle-based rendering, the method enhances realism and efficiency in virtual rain column effects.

CN119228972APending Publication Date: 2024-12-31NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411433525.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing methods for generating virtual rain column falling scenes in games lack realism due to insufficient three-dimensional sense and dynamic movement, resulting in low accuracy and inefficiency.

Method used

A method involving creating an original virtual rain column model, generating trunk and raindrop models using virtual particles, merging these models to obtain vertex and rotation information maps, and rendering the scene with these maps to achieve a dynamic change effect.

Benefits of technology

Improves the realism and efficiency of virtual rain column falling scenes by enhancing three-dimensional sense and dynamic movement, addressing the limitations of previous methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228972A_ABST
    Figure CN119228972A_ABST
Patent Text Reader

Abstract

The invention relates to a virtual scene generation method and device, a storage medium and electronic equipment, and relates to the technical field of computer graphic processing, and the method comprises the steps: creating an original virtual rain column model; generating a trunk model of a virtual rain column according to the original virtual rain column model and a first virtual particle, and generating a raindrop model of the virtual rain column according to the first virtual particle; fusing the trunk model of the virtual rain column and the raindrop model of the virtual rain column to obtain a model vertex map and a rotation information map of the original virtual rain column model; and rendering the original virtual rain column model according to the model vertex map and the rotation information map to obtain a virtual rain column landing scene. According to the invention, the accuracy of the obtained virtual rain column landing scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In some related technical solutions, 3D modeling, rendering and production software (such as 3ds MAX) can be used to produce patches of falling raindrops, and then the patches of falling raindrops are superimposed on the texture of the water material to achieve the effect of falling raindrops; however, this method has the disadvantages of insufficient three-dimensional sense, unrealistic model shape and lack of dynamic sense of water, which makes the accuracy of the obtained virtual raindrop falling scene low.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0004] The purpose of the present disclosure is to provide a method for generating a virtual scene, a device for generating a virtual scene, a computer-readable storage medium and an electronic device, thereby overcoming, at least to a certain extent, the problem of low accuracy of virtual rain column falling scenes caused by limitations and defects of related technologies.

[0005] According to one aspect of the present disclosure, a method for generating a virtual scene is provided, comprising:

[0006] Creating an original virtual rain column model;

[0007] Generate a trunk model of the virtual rain column according to the original virtual rain column model and the first virtual particle, and generate a raindrop model of the virtual rain column according to the first virtual particle;

[0008] The trunk model of the virtual rain column and the raindrop model of the virtual rain column are merged to obtain a model vertex map and a rotation information map of the original virtual rain column model;

[0009] The original virtual rain column model is rendered according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene.

[0010] According to one aspect of the present disclosure, there is provided a device for generating a virtual scene, comprising:

[0011] A model creation module, used to create an original virtual rain column model;

[0012] A trunk model generating module, used to generate a trunk model of a virtual rain column according to the original virtual rain column model and the first virtual particle, and to generate a raindrop model of the virtual rain column according to the first virtual particle;

[0013] A model fusion module, used to fuse the trunk model of the virtual rain column and the raindrop model of the virtual rain column to obtain a model vertex map and a rotation information map of the original virtual rain column model;

[0014] The virtual rain column falling scene rendering module is used to render the original virtual rain column model according to the model vertex map and the rotation information map to obtain the virtual rain column falling scene.

[0015] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for generating a virtual scene described in any one of the above is implemented.

[0016] According to one aspect of the present disclosure, there is provided an electronic device, including:

[0017] Processor; and

[0018] A memory, configured to store executable instructions of the processor;

[0019] Wherein, the processor is configured to execute any one of the above-mentioned methods for generating a virtual scene by executing the executable instructions.

[0020] A method for generating a virtual scene provided by an embodiment of the present disclosure, on the one hand, creates an original virtual rain column model; then generates a trunk model of the virtual rain column based on the original virtual rain column model and a first virtual particle, and generates a raindrop model of the virtual rain column based on the first virtual particle; then fuses the trunk model of the virtual rain column and the raindrop model of the virtual rain column to obtain a model vertex map and a rotation information map of the original virtual rain column model; finally, renders the original virtual rain column model according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene. Based on this method, a virtual rain column falling scene with a dynamic change effect can be obtained, thereby solving the problem of low accuracy of the virtual rain column falling scene obtained in the prior art due to the shortcomings of insufficient three-dimensional sense, unrealistic model morphology and lack of dynamic sense of water, thereby improving the accuracy of the virtual rain column falling scene; on the other hand, it also improves the generation efficiency of the virtual rain column falling scene.

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

[0022] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0023] Figure 1 A schematic diagram shows an example scene diagram obtained based on 3ds MAX in a related technical solution.

[0024] Figure 2 A flowchart of a method for generating a virtual scene according to an exemplary embodiment of the present disclosure is schematically shown.

[0025] Figure 3 An example diagram of an original virtual rain column model according to an example embodiment of the present disclosure is schematically shown.

[0026] Figure 4 A flowchart of a method for generating a trunk model of a virtual rain column based on an original virtual rain column model and first virtual particles according to an exemplary embodiment of the present disclosure is schematically shown.

[0027] Figure 5 A scene example diagram schematically shows a rain column model obtained after noise processing according to an example embodiment of the present disclosure.

[0028] Figure 6 A scene example diagram schematically illustrates a logic operation process of a first particle model according to an example embodiment of the present disclosure.

[0029] Figure 7 An example diagram schematically shows an example of an emitted second virtual particle according to an example embodiment of the present disclosure.

[0030] Figure 8 An example diagram schematically shows an obtained model reshaping result according to an example embodiment of the present disclosure.

[0031] Fig. 9 A scene example diagram schematically shows a trunk model of a virtual rain column obtained according to an example embodiment of the present disclosure.

[0032] Fig.10 A scene example diagram schematically shows a raindrop model of a virtual rain column obtained according to an example embodiment of the present disclosure.

[0033] Fig.11 An example diagram schematically shows an obtained virtual rain column animation according to an example embodiment of the present disclosure.

[0034] Fig.12An example diagram schematically shows an obtained vertex animation map according to an example embodiment of the present disclosure.

[0035] Fig.13 A scene example diagram schematically illustrates an effect presentation of a virtual rain column falling scene in a game obtained according to an example embodiment of the present disclosure.

[0036] Fig.14 A block diagram schematically illustrates a device for generating a virtual scene according to an exemplary embodiment of the present disclosure.

[0037] Fig.15 An electronic device for implementing a method for generating a virtual scene according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0038] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0039] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0040] As an important part of the game, special effects animation plays a role in promoting the game scene. In the actual game scene, if some innovative special effects are added, it may become an opportunity for secondary creation or exposure. In some special effects game scenes, such as the special effects scene of falling rain columns, it is a relatively common special effects scene. Therefore, how to make the special effects of falling rain columns in the game more realistic has become a technical problem that needs to be solved urgently.

[0041] In the actual application process, if you want to make the special effects of falling rain columns more realistic, you need to meet the following conditions: on the one hand, you need to make the water lines; on the other hand, you need to make the special effects appear dynamic when playing in slow motion. In order to meet this condition, in some related technical solutions, you can use 3D modeling, rendering and production software (such as 3ds MAX) to make a patch of falling rain columns, and then superimpose the patch of falling rain columns on the texture of the water material to achieve the effect of falling rain columns; however, this method has the disadvantages of insufficient three-dimensional sense, unrealistic model shape and lack of dynamic sense of water.

[0042] In the relevant technical solutions, the commonly used 3ds MAX production process can be achieved in the following way: first, use curve lofting and cross inserts to create a model, then add noise to make the model appear like a water flow; the model obtained by curve lofting and cross inserts can refer to Figure 1 As shown in 101, the model obtained after Noise can refer to Figure 1 As shown in 102; secondly, use the material in the engine to give the water material a map and mask to make the overall flow more like water; the rendering result can be referred to Figure 1 103 in the figure. However, the model produced by this method is relatively simple and limited in means, lacking a flexible sense of dynamics; and the effect achieved by the inherent production method is too flaky, not full and realistic, without irregular shapes connected by water lines, and lacks the change of movement in each frame when entering bullet time.

[0043] Based on this, the present invention proposes a new implementation scheme for the falling rain column special effect. Based on this scheme, the falling rain column special effect can be produced in Houdini. The falling rain column special effect obtained based on this method can solve the dynamic problem of water movement on the basis of solving the volume problem of the model.

[0044] In an exemplary embodiment, a method for generating a virtual scene is first provided in this exemplary embodiment. The method can be run on a terminal device, server, server cluster or cloud server where the game engine is located; of course, those skilled in the art can also run the method disclosed in this disclosure on other platforms as required, and this exemplary embodiment does not specifically limit this. Specifically, refer to Figure 2 As shown, the method for generating the virtual scene may include the following steps:

[0045] Step S210. Creating an original virtual rain column model;

[0046] Step S220. Generate a trunk model of the virtual rain column based on the original virtual rain column model and the first virtual particle, and generate a raindrop model of the virtual rain column based on the first virtual particle;

[0047] Step S230: Fusing the trunk model of the virtual rain column and the raindrop model of the virtual rain column to obtain a model vertex map and a rotation information map of the original virtual rain column model;

[0048] Step S240: Render the original virtual rain column model according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene.

[0049] In the above-mentioned method for generating a virtual scene, on the one hand, an original virtual rain column model is created; then, based on the original virtual rain column model and the first virtual particle, a trunk model of the virtual rain column is generated, and based on the first virtual particle, a raindrop model of the virtual rain column is generated; then, the trunk model of the virtual rain column and the raindrop model of the virtual rain column are fused to obtain a model vertex map and a rotation information map of the original virtual rain column model; finally, the original virtual rain column model is rendered according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene. Based on this method, a virtual rain column falling scene with a dynamic change effect can be obtained, thereby solving the problem of low accuracy of the virtual rain column falling scene obtained in the prior art due to the shortcomings of insufficient three-dimensional sense, unrealistic model morphology and lack of dynamic sense of water, thereby improving the accuracy of the virtual rain column falling scene; on the other hand, the generation efficiency of the virtual rain column falling scene is also improved.

[0050] Hereinafter, the method for generating a virtual scene according to an exemplary embodiment of the present disclosure will be explained and illustrated in detail with reference to the accompanying drawings.

[0051] First, the terms involved in the exemplary embodiments of the present disclosure are explained.

[0052] Polygons model: Polygons model is a polygon-based modeling method, which is a basic and intuitive technology in 3D modeling. Polygons modeling can also be called polygon modeling, which can shape the appearance of objects by controlling the points, lines and faces of objects in 3D space; the surface of objects created by Polygons is composed of straight lines, which is suitable for creating complex models composed of multiple planes, such as architectural models, environmental art design, etc.

[0053] In the Polygons modeling process, the model is composed of multiple polygonal faces, which can be edited and modified to achieve modeling. First, an object needs to be converted into an editable polygon object, and then the modeling process is achieved by editing and modifying various sub-objects of the polygon object (such as vertices, edges, faces, etc.). One advantage of this method is that in the process of creating an object, you can first create fewer faces and use optimization tools to create a smooth object surface. When editing, you can keep using Polygon objects with a low number of faces, so that you can use fewer faces to control the structure of complex objects while maintaining the details and smoothness of the model.

[0054] The Polygons modeling command set includes keep faces together, extrude faces, smoothing angle settings, extrude faces / offset, use selected curve for extrusion, etc. These commands provide fine control over model details and shapes. For example, the extrude face command allows you to extrude the selected face in one direction, and the division number can be set to control the number of segments that each extruded face or edge is subdivided into, thereby achieving model expansion and deformation.

[0055] POP (Particle Operations Processor) is a tool for simulating particle effects, which is widely used in the production of digital media and visual effects. POP allows users to create, operate and control a large number of particle systems, which can simulate a variety of natural phenomena and visual effects such as smoke, fire, dust, etc. POP provides a wealth of functions, including particle emission, movement, collision, interaction with surfaces, etc. Through these functions, artists and designers can create complex and realistic particle animations. The main functions and applications of POP include: Particle emission: particles can be created from geometry or space points, or new particles can be created from existing particles; Apply force: forces can be applied to guide particle movement, which can come from geometry (attractive or repulsive balls) or commonly used directional forces (such as gravity); Particle motion: particles can move around a leader, forming a vortex-like motion, or move along a specific path; Particle collision: collisions between particles and with static objects can simulate real physical interactions; Rendering and visualization: POP supports efficient rendering and visualization, allowing artists to preview and adjust particle effects in real time; Parameter adjustment: by adjusting various properties of particles, such as size, speed, life cycle, etc., you can control the performance and behavior of particles; In addition, POP also supports multi-threading and efficient memory usage, provides a wide range of artistic controls, and makes the creation and adjustment of particle systems more efficient and flexible.

[0056] Bullet time is a photography technique used in movies, TV commercials or computer games to simulate speed-changing effects, such as enhanced slow motion and time freeze.

[0057] Secondly, the technical implementation principle of the exemplary embodiment of the present disclosure is explained and illustrated. Specifically, the method for generating a virtual scene recorded in the exemplary embodiment of the present disclosure can solve the problem that the water dynamic change effect cannot be produced in the related technology; at the same time, the virtual rain column falling scene obtained based on the method for generating a virtual scene recorded in the exemplary embodiment of the present disclosure can not only restore the water into a line in form, thereby solving the thickness problem, so as to facilitate viewing from all angles in the game; when the rhythm is found to be inaccurate in the game, the rhythm can be quickly adjusted in the software to ensure that there is a good sense of dynamics even when entering the bullet time; further, the method for generating a virtual scene recorded in the exemplary embodiment of the present disclosure can make water fall into a line through the Houdini particle system, and improve the requirements for art quality through the analysis of real-world rain; at the same time, because the shape and dynamics of water have not been realized in previous games, the quality of the industry benchmark can be produced; further, the method for generating a virtual scene recorded in the exemplary embodiment of the present disclosure can also quickly realize the effect of water trajectory movement in the game, thereby improving production efficiency.

[0058] The following will Figure 2 The method for generating the virtual scene shown is further explained and illustrated.

[0059] In step S210, an original virtual rain column model is created.

[0060] Specifically, an original virtual rain column model can be created in a game engine; the game engine loaded here can be a Houdini engine, or can be other engines, and this example does not impose any special restrictions on this; the original virtual rain column model recorded here can be a cylindrical model; the specific example diagram obtained can refer to Figure 3 As shown; at the same time, the original virtual rain column model recorded here can be configured as the required particle emission source during the falling process of the virtual rain column.

[0061] In step S220, a trunk model of the virtual rain column is generated according to the original virtual rain column model and the first virtual particle, and a raindrop model of the virtual rain column is generated according to the first virtual particle.

[0062] In this exemplary embodiment, first, a trunk model of a virtual rain column is generated according to the original virtual rain column model and the first virtual particle; specifically, referring to Figure 4 As shown, the following steps may be included:

[0063] Step S410, performing noise processing on the original virtual rain column model to obtain a noise-processed rain column model.

[0064] Specifically, the specific implementation process of noise processing can be achieved in the following way: first, the original virtual rain column model is frame-processed to obtain multiple model image frames; secondly, each model image frame is subjected to noise change processing to obtain multiple model image frames with different shapes; then, the rain column model after noise processing is obtained according to each model image frame with different shapes. That is, in the actual application process, in order to make the emission position of the first virtual particle in each frame of each model image frame different, you can create an Attribute Noise node, and make noise changes to each frame of the model at the Offset position, so that the shape of each frame is different; at the same time, in the actual application process, you can use the $F symbol in Houdini to introduce the time element; where $F is a variable, representing the current frame number; for example, the original virtual rain column model includes a total of 30 frames, then the specific value of $F is [1-30], and the specific order can be arranged from bottom to top; the position below can be based on the horizontal ground as a reference, and the side close to the horizontal ground is the bottom; at the same time, it is necessary to give a multiple value to the frame number (for example, it can be 0.1 times, or 0.2 times, this example does not impose special restrictions on this); based on this method, the amplitude of the time change of each frame can be made smaller; of course, it should be added here that the model image frame can be deformed based on the Attribute Noise node, and filling in $F is to have an irregular model change in each frame. At the same time, the obtained rain column model after noise processing can refer to Figure 5 shown.

[0065] Step S420, adding first virtual particles to the rain column model after noise processing, and constructing a first particle model according to the first virtual particles.

[0066] Specifically, the specific construction process of the first particle model can be achieved in the following way: first, configure the downward emission range of particles and the number of particle emission frames for the rain column model after noise processing; second, add a first virtual particle to the rain column model after noise processing, and add particle stress and particle resistance to the first virtual particle; then, determine the particle movement trend of the first virtual particle according to the particle stress and particle resistance, and construct the first particle model according to the particle movement trend, the first virtual particle, the downward emission range of particles and the number of particle emission frames. Specifically, in the actual application process, first, the original virtual rain column model is used as the particle emission source (that is, the original virtual rain column model can be used as a particle emission source for each model image frame with different shapes included in the rain column model after noise processing), and the range of particle downward emission and the number of particle emission frames are configured for the rain column model after noise processing (for example, it can be K frames, and the value of K can be any value less than the total number of model image frames. It can be selected according to actual needs, and this example does not impose special restrictions on this); secondly, add POP particles (that is, the first virtual particles), and PopObject is given to the first input interface, inheriting the previous cylindrical model (that is, the range of particle downward emission and the number of particle emission frames can be introduced by means of PopObject); further, based on Popcurveforce, force stress (particle stress) and drag resistance (that is, particle resistance) are added to make the overall motion trend not uniform; finally, the first particle model can be obtained by performing logical operations on the particle motion trend, the first virtual particle, the range of particle downward emission and the number of particle emission frames; wherein, the specific logical operation process can be referred to Figure 6 shown.

[0067] In an example embodiment, Figure 6 In the logic operation example diagram shown, Popsolver is the solver of the current particle system, which updates particles for one time step; that is, nodes such as objects and forces can be placed here for operation logic; Popobject converts a regular particle system into a dynamic object, which can interact correctly with other objects in the current particle system; that is, the range of particle downward emission and the number of particle emission frames can be introduced by means of PopObject; Popcurveforce is the POP node of the force generated by the curve, guiding the particles to move along the curve; Popforce is the stress of the acting particles; Popdrag is the resistance of the acting particles; Pop source is a pop node, which generates particles from the previous model geometry (that is, the first virtual particle); Popfluid controls the local density by applying force between nearby particles; Merge merges nodes; Output outputs, that is, outputs the first particle model.

[0068] In an exemplary embodiment, the first particle model is constructed according to the particle movement trend, the first virtual particle, the range of particle downward emission, and the number of particle emission frames, which can be implemented as follows: first, a particle emission source is configured for each model image frame with different shapes included in the rain column model after noise processing, and the image frame drop time of each model image frame with different shapes falling to a preset scene position is determined; secondly, a second virtual particle is emitted based on the particle emission source and the image frame drop time, and a target particle life cycle is configured for the second virtual particle; then, the first particle model is constructed based on the second virtual particle, the target particle life cycle, the particle movement trend, the first virtual particle, the range of particle downward emission, and the number of particle emission frames. Wherein, configuring the target particle life cycle for the second virtual particle can be implemented as follows: first, the original particle life cycle is configured for the second virtual particle, and a random number corresponding to each second virtual particle is generated based on a preset random number generation function; secondly, the target particle life cycle is determined based on each of the random numbers and the original particle life cycle. That is, in the actual application process, in order to further improve the realism of the obtained scene, it is also necessary to control the emission source of the particles to emit 6000 second virtual particles before falling to the ground, and become 0 after falling to the ground; the original particle life cycle life exists for 0.25 seconds, and the life span is random within 0.05 seconds; that is, it is necessary to generate a random number between [-0.05 and 0.05] based on the preset random number generation function, and the target particle life cycle can be obtained by adding or subtracting the random number from 0.25; in the actual application process, the emission of the specific second virtual particles can be realized in the following way: for example, 6000 second virtual particles are emitted in the first 7 frames, and the second virtual particles are no longer emitted when they fall to the ground in the 8th frame; wherein, the emitted second virtual particles can refer to Figure 7 As shown in 701, 702 and 703.

[0069] Step S430, remodeling the rain column model after the noise processing according to the first particle model to obtain a model remodeling result.

[0070] Specifically, the specific implementation process of model reshaping can be achieved in the following way: first, filter the first virtual particles in the first particle model to obtain a first filtering result, and create a model volume data block based on the first virtual particles in the first filtering result; second, reshape the rain column model after noise processing based on the model volume data block to obtain a model reshaping result. Specifically, in the actual application process, before reshaping the model, first use the particle ID to randomly delete the points corresponding to the redundant first virtual particles; specifically, in the specific filtering process, the points corresponding to the first virtual particles whose ID is less than a certain value can be randomly selected; wherein, the value here can be 0.5 or other values, and this example does not impose special restrictions on this; secondly, create a volume data block VDB through the first virtual particle; wherein, the obtained volume data block VDB can refer to Figure 8 As shown in 801 in FIG. 8 ; then, the rain column model after noise processing is reshaped based on the model volume data block to obtain a model reshaping result; wherein the obtained model reshaping result can be referred to Figure 8 As shown in 802.

[0071] Step S440, smoothing the model reshaping result and redistributing the number of faces to obtain the trunk model of the virtual rain column.

[0072] Specifically, the specific implementation process of the lake leveling process and the face number redistribution process can be achieved in the following manner: first, the model reshaping result is smoothed based on a preset smoothing function to obtain a smoothing result, and the smoothing result is model shrunk to obtain a model shrunk result; secondly, the model shrunk result is converted to obtain a polygonal rain column model conversion result, and the polygonal rain column model conversion result is faceted redistributed to obtain the trunk model of the virtual rain column. That is, in the actual application process, after obtaining the model reshaping result, the model reshaping result also needs to be smoothed; wherein the specific smoothing process can be implemented based on the smooth smoothing function; wherein the obtained smoothing result can refer to Fig. 9 As shown in 901 in FIG. 1 ; further, after obtaining the smoothing result, the model erosion process is required; wherein the erosion process result obtained can refer to Fig. 9 As shown in 902 in FIG. 1 ; further, the model needs to be shrunk to obtain the model shrunk result; finally, it is necessary to add convert to polygonal rain column model conversion result Polygons, and remesh the polygonal rain column model conversion result to reduce the number of faces of the model, thereby obtaining the trunk model of the virtual rain column; the trunk model of the virtual rain column obtained can be referred to Fig. 9 As shown in 903.

[0073] Secondly, based on the first virtual particle, a raindrop model of a virtual rain column is generated. Specifically, the specific generation process of the raindrop model of the virtual rain column can be implemented in the following manner: first, the first virtual particle is filtered to obtain a second filtering result, and a particle volume is configured for the first virtual particle included in the second filtering result; secondly, a particle life cycle is configured for the first virtual particle included in the second filtering result, and an original raindrop model is generated based on the particle volume and the particle life cycle; finally, the original raindrop model is subjected to model reduction processing to obtain the raindrop model of the virtual rain column. Specifically, in the actual application process, after the main trunk model of the virtual rain column is generated, some detail materials need to be added; wherein, in the process of adding detail materials, first, the ID of the first virtual particle can be used to delete 95% of the points corresponding to the first particle to obtain the second filtering result; then, the particle volume fit is configured for the first virtual particle included in the second filtering result (that is, the remaining first virtual particle), so that its size is controlled between 0.1-0.3 (that is, the particle volume can be controlled between 0.1-0.3, and the specific value can be determined based on the random number generation function), in preparation for the next step of vop controlling the particle to scale with life; further, vop is added, age is divided by life, and then multiplied by the size of the pscale point, and ramp is used to control the particle to disappear with life scaling outside (that is, the particle life cycle is configured for the first virtual particle included in the second filtering result); finally, the particle volume and the particle life cycle are merged to obtain the original raindrop model, and Particle Fluid is added to the original raindrop model Surface, convert the particles into Polygons, and then perform model reduction (also known as remesh) to obtain the raindrop model of the virtual rain column; the obtained raindrop model of the virtual rain column can be referred to Fig.10 shown.

[0074] In step S230, the trunk model of the virtual rain column and the raindrop model of the virtual rain column are fused to obtain a model vertex map and a rotation information map of the original virtual rain column model.

[0075] Specifically, in the actual application process, the trunk model of the virtual rain column and the raindrop model of the virtual rain column can be merged together, and the overall falling time of the original virtual rain column model can be controlled to appear and disappear in 23 frames, so that the model vertex map and rotation information map of the original virtual rain column model can be obtained; wherein, the model vertex map and rotation information map of the original virtual rain column model are presented in an animated manner, and the obtained animation can be referred to Fig.11As shown in 1101 and 1102; based on this method, the problems of insufficient three-dimensional sense, unrealistic model shape and lack of dynamic sense of water in the prior art can be solved.

[0076] In step S240, the original virtual rain column model is rendered according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene.

[0077] Specifically, the specific rendering process of the virtual rain column falling scene can be achieved in the following way: first, the original rain column material data corresponding to the original virtual rain column model is obtained; second, the target rain column material data is generated according to the model vertex map, rotation information map and original rain column material data; then, the original virtual rain column model is rendered based on the target rain column material data to obtain the virtual rain column falling scene. That is, in the actual application process, first, the model vertex map and rotation information map can be imported from the Houdini engine into the Messiah engine in the form of VAT (Vertex AniamtionTexture), i.e., vertex animation map; wherein the vertex animation map recorded here can refer to Fig.12 1201 and 1202 in the figure; then, the displacement data of each vertex in the model vertex map is recorded in the map, and the position offset and rotation information of the model vertex are controlled by the two maps recording the information, so as to restore the rain column falling animation; finally, the water material in the engine (that is, the original rain column material data) is combined for rendering, and finally the effect presentation of the virtual rain column falling scene in the game is obtained; wherein, the obtained virtual rain column falling scene can be referred to Fig.13 As shown in 1301 and 1302.

[0078] At this point, the virtual scene generation method recorded in the exemplary embodiment of the present disclosure has been fully realized. Based on the above-mentioned contents, it can be known that the virtual scene generation method recorded in the exemplary embodiment of the present disclosure, on the one hand, analyzes the shape and dynamics of the rain lines, thereby making the obtained virtual rain column falling scene more realistic and credible; on the other hand, it can also greatly improve the generation efficiency of the virtual rain column falling scene, shorten the time cost of production and debugging, and have a high degree of control over the final effect.

[0079] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.

[0080] The exemplary embodiment of the present disclosure also provides a device for generating a virtual scene. Specifically, refer to Fig.14As shown, the virtual scene generation device may include a model creation module 1410, a main model generation module 1420, a model fusion module 1430 and a virtual rain column landing scene rendering module 1440. Among them:

[0081] The model creation module 1410 can be used to create an original virtual rain column model;

[0082] The trunk model generating module 1420 may be used to generate a trunk model of a virtual rain column according to the original virtual rain column model and the first virtual particle, and to generate a raindrop model of the virtual rain column according to the first virtual particle;

[0083] The model fusion module 1430 may be used to fuse the trunk model of the virtual rain column and the raindrop model of the virtual rain column to obtain a model vertex map and a rotation information map of the original virtual rain column model;

[0084] The virtual rain column falling scene rendering module 1440 can be used to render the original virtual rain column model according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene.

[0085] In an exemplary embodiment of the present disclosure, a trunk model of a virtual rain column is generated based on the original virtual rain column model and the first virtual particle, including: performing noise processing on the original virtual rain column model to obtain a noise-processed rain column model; adding a first virtual particle to the noise-processed rain column model, and constructing a first particle model based on the first virtual particle; reshaping the noise-processed rain column model based on the first particle model to obtain a model reshaping result; and performing smoothing processing and face redistribution processing on the model reshaping result to obtain the trunk model of the virtual rain column.

[0086] In an exemplary embodiment of the present disclosure, the original virtual rain column model is subjected to noise processing to obtain the noise-processed rain column model, including: performing frame processing on the original virtual rain column model to obtain a plurality of model image frames; performing noise change processing on each of the model image frames to obtain a plurality of model image frames with different shapes; and obtaining the noise-processed rain column model according to each of the model image frames with different shapes.

[0087] In an exemplary embodiment of the present disclosure, a first virtual particle is added to a rain column model after noise processing, and a first particle model is constructed based on the first virtual particle, including: configuring a downward emission range of particles and a number of particle emission frames for the rain column model after noise processing; adding a first virtual particle to the rain column model after noise processing, and adding particle stress and particle resistance to the first virtual particle; determining a particle movement trend of the first virtual particle based on the particle stress and particle resistance, and constructing the first particle model based on the particle movement trend, the first virtual particle, the downward emission range of particles, and the number of particle emission frames.

[0088] In an exemplary embodiment of the present disclosure, the first particle model is constructed according to the particle movement trend, the first virtual particle, the range of particle downward emission and the number of particle emission frames, including: configuring a particle emission source for each model image frame with different shapes included in the rain column model after noise processing, and determining the image frame falling time of each model image frame with different shapes falling to a preset scene position; emitting a second virtual particle based on the particle emission source and the image frame falling time, and configuring a target particle life cycle for the second virtual particle; constructing the first particle model based on the second virtual particle, the target particle life cycle, the particle movement trend, the first virtual particle, the range of particle downward emission and the number of particle emission frames.

[0089] In an exemplary embodiment of the present disclosure, configuring a target particle life cycle for the second virtual particle includes: configuring an original particle life cycle for the second virtual particle, and generating a random number corresponding to each second virtual particle based on a preset random number generation function; and determining the target particle life cycle based on each of the random numbers and the original particle life cycle.

[0090] In an exemplary embodiment of the present disclosure, the rain column model after noise processing is reshaped according to the first particle model to obtain a model reshaping result, including: filtering the first virtual particles in the first particle model to obtain a first filtering result, and creating a model volume data block according to the first virtual particles in the first filtering result; and reshaping the rain column model after noise processing based on the model volume data block to obtain a model reshaping result.

[0091] In an exemplary embodiment of the present disclosure, the model reshaping result is smoothed and the number of faces is redistributed to obtain a trunk model of the virtual rain column, including: smoothing the model reshaping result based on a preset smoothing function to obtain a smoothing result, and performing model shrinkage on the smoothing result to obtain a model shrinkage result; converting the model shrinkage result to obtain a polygonal rain column model conversion result, and performing face redistribution on the polygonal rain column model conversion result to obtain the trunk model of the virtual rain column.

[0092] In an exemplary embodiment of the present disclosure, a raindrop model of a virtual rain column is generated based on the first virtual particle, including: filtering the first virtual particle to obtain a second filtering result, and configuring a particle volume for the first virtual particle included in the second filtering result; configuring a particle life cycle for the first virtual particle included in the second filtering result, and generating an original raindrop model based on the particle volume and the particle life cycle; performing model reduction processing on the original raindrop model to obtain the raindrop model of the virtual rain column.

[0093] In an exemplary embodiment of the present disclosure, the original virtual rain column model is rendered according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene, including: acquiring original rain column material data corresponding to the original virtual rain column model; generating target rain column material data according to the model vertex map, the rotation information map and the original rain column material data; and rendering the original virtual rain column model based on the target rain column material data to obtain a virtual rain column falling scene.

[0094] The specific details of each module in the above-mentioned virtual scene generation device have been described in detail in the corresponding virtual scene generation method, so they will not be repeated here.

[0095] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0096] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0097] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0098] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0099] Refer to the following Fig.15 15 to describe the electronic device 1500 according to this embodiment of the present disclosure. Fig.15 The electronic device 1500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0100] like Fig.15 As shown, the electronic device 1500 is in the form of a general computing device. The components of the electronic device 1500 may include, but are not limited to: the at least one processing unit 1510, the at least one storage unit 1520, a bus 1530 connecting different system components (including the storage unit 1520 and the processing unit 1510), and a display unit 1540.

[0101] The storage unit stores program codes, which can be executed by the processing unit 1510, so that the processing unit 1510 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1510 can perform the following steps: Figure 2 The step S210 shown in the figure is as follows: creating an original virtual rain column model, and configuring a first virtual particle for the original virtual rain column model; step S220: generating a trunk model of the virtual rain column according to the original virtual rain column model and the first virtual particle, and generating a raindrop model of the virtual rain column according to the first virtual particle; step S230: fusing the trunk model of the virtual rain column and the raindrop model of the virtual rain column to obtain a model vertex map and a rotation information map of the original virtual rain column model; step S240: rendering the original virtual rain column model according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene.

[0102] The storage unit 1520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 15201 and / or a cache storage unit 15202 , and may further include a read-only storage unit (ROM) 15203 .

[0103] The storage unit 1520 may also include a program / utility 15204 having a set (at least one) of program modules 15205, such program modules 15205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0104] Bus 1530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0105] The electronic device 1500 may also communicate with one or more external devices 1600 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1500, and / or communicate with any device that enables the electronic device 1500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1550. In addition, the electronic device 1500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1560. As shown, the network adapter 1560 communicates with other modules of the electronic device 1500 via a bus 1530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0106] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0107] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0108] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0109] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0110] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0111] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0112] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0113] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0114] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the inventions invented herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not invented by the present disclosure. The specification and examples are to be considered merely exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A method for generating a virtual scene, characterized in that: include: Creating an original virtual rain column model; Generate a trunk model of the virtual rain column according to the original virtual rain column model and the first virtual particle, and generate a raindrop model of the virtual rain column according to the first virtual particle; The trunk model of the virtual rain column and the raindrop model of the virtual rain column are merged to obtain a model vertex map and a rotation information map of the original virtual rain column model; The original virtual rain column model is rendered according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene.

2. The method for generating a virtual scene according to claim 1, characterized in that: Generating a trunk model of a virtual rain column according to the original virtual rain column model and the first virtual particle includes: Performing noise processing on the original virtual rain column model to obtain a noise-processed rain column model; adding a first virtual particle to the rain column model after noise processing, and constructing a first particle model according to the first virtual particle; Remodeling the rain column model after the noise processing according to the first particle model to obtain a model remodeling result; The model reshaping result is smoothed and the number of faces is redistributed to obtain the trunk model of the virtual rain column.

3. The method for generating a virtual scene according to claim 2, characterized in that: The original virtual rain column model is subjected to noise processing to obtain a noise-processed rain column model, including: Performing frame processing on the original virtual rain column model to obtain multiple model image frames; Performing noise change processing on each of the model image frames to obtain a plurality of model image frames with different shapes; A rain column model after noise processing is obtained according to the model image frames with different shapes.

4. The method for generating a virtual scene according to claim 2, characterized in that: Adding a first virtual particle to the rain column model after noise processing, and constructing a first particle model according to the first virtual particle, including: Configure the downward emission range and particle emission frame number of the rain column model after noise processing; Adding a first virtual particle to the rain column model after noise processing, and adding particle stress and particle resistance to the first virtual particle; The particle movement trend of the first virtual particle is determined according to the particle stress and the particle resistance, and the first particle model is constructed according to the particle movement trend, the first virtual particle, the range of particle downward emission, and the number of particle emission frames.

5. The method for generating a virtual scene according to claim 4, characterized in that: The first particle model is constructed according to the particle movement trend, the first virtual particle, the range of particle downward emission, and the number of particle emission frames, including: configuring a particle emission source for each model image frame with different shapes included in the noise-processed rain column model, and determining an image frame drop time for each model image frame with different shapes to drop to a preset scene position; emitting a second virtual particle based on the particle emission source and the image frame falling time, and configuring a target particle life cycle for the second virtual particle; The first particle model is constructed based on the second virtual particle, the target particle life cycle, the particle movement trend, the first virtual particle, the range of particle downward emission, and the number of particle emission frames.

6. The method for generating a virtual scene according to claim 5, characterized in that: Configuring the target particle life cycle for the second virtual particle includes: Configuring an original particle life cycle for the second virtual particle, and generating a random number corresponding to each second virtual particle based on a preset random number generation function; The target particle life cycle is determined based on each of the random numbers and the original particle life cycle.

7. The method for generating a virtual scene according to claim 2, characterized in that: Reshaping the rain column model after the noise processing according to the first particle model to obtain a model reshaping result includes: filtering the first virtual particles in the first particle model to obtain a first filtering result, and creating a model volume data block according to the first virtual particles in the first filtering result; The rain column model after noise processing is reshaped based on the model volume data block to obtain a model reshaping result.

8. The method for generating a virtual scene according to claim 2, characterized in that: The model reshaping result is smoothed and the number of faces is redistributed to obtain the trunk model of the virtual rain column, including: Smoothing the model reshaping result based on a preset smoothing function to obtain a smoothing result, and performing model shrinkage on the smoothing result to obtain a model shrinkage result; The model contraction result is converted to obtain a polygonal rain column model conversion result, and the polygonal rain column model conversion result is subjected to face number redistribution processing to obtain a trunk model of the virtual rain column.

9. The method for generating a virtual scene according to claim 1, characterized in that: Generating a raindrop model of a virtual rain column according to the first virtual particle includes: filtering the first virtual particles to obtain a second filtering result, and configuring a particle volume for the first virtual particles included in the second filtering result; configuring a particle life cycle for the first virtual particle included in the second filtering result, and generating an original raindrop model according to the particle volume and the particle life cycle; The original raindrop model is subjected to model reduction processing to obtain the raindrop model of the virtual rain column.

10. The method for generating a virtual scene according to claim 1, characterized in that: Rendering the original virtual rain column model according to the model vertex map and the rotation information map to obtain a virtual rain column falling scene includes: Acquire original rain column material data corresponding to the original virtual rain column model; Generate target rain column material data according to the model vertex map, the rotation information map and the original rain column material data; The original virtual rain column model is rendered based on the target rain column material data to obtain a virtual rain column falling scene.

11. A device for generating a virtual scene, characterized in that: include: A model creation module, used to create an original virtual rain column model; A trunk model generating module, used to generate a trunk model of a virtual rain column according to the original virtual rain column model and the first virtual particle, and to generate a raindrop model of the virtual rain column according to the first virtual particle; A model fusion module, used to fuse the trunk model of the virtual rain column and the raindrop model of the virtual rain column to obtain a model vertex map and a rotation information map of the original virtual rain column model; The virtual rain column falling scene rendering module is used to render the original virtual rain column model according to the model vertex map and the rotation information map to obtain the virtual rain column falling scene.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a virtual scene according to any one of claims 1 to 10 is implemented.

13. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method for generating a virtual scene according to any one of claims 1 to 10 by executing the executable instructions.