Ice generation method and device, electronic equipment and storage medium
By automatically identifying ice growth areas based on surface feature information from a 3D model, and generating ice models using particle simulation and automated processes, the problems of monotonous ice distribution and resource consumption are solved, while improving the interactive experience and visual expressiveness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies exhibit rigid and uniform ice distribution patterns, requiring extensive manual parameter adjustments. This makes it difficult to meet the diverse needs of different scenarios for natural effects and consumes significant amounts of device storage space and server resources.
Based on the surface feature information of the target 3D model, the ice growth area is automatically identified, ice particle data is generated through particle simulation, and an automated process of particle dynamics simulation and volume mesh conversion is adopted, combined with attribute visualization and parameter adjustment mechanism, to adaptively generate the ice model.
It enables intelligent determination of ice growth areas, reduces manual intervention, enhances interactive experience and visual performance, reduces device storage space occupation and server resource consumption, and improves computing resource utilization efficiency.
Smart Images

Figure CN122089997A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of rendering technology, and in particular to a method, apparatus, electronic device, and storage medium for generating ice crystals. Background Technology
[0002] With the rapid development of 3D vision technology, the demand for realistic simulation of natural phenomena in virtual scenes is increasing. Icicles, as an important element in enhancing scene realism, have always presented a technical challenge in terms of their complex shapes and natural distribution. Common techniques for achieving icicle effects include manually sculpting icicle models in 3D modeling software and placing them at the bottom of objects, or using particle emitters to generate particles at the bottom of objects and then creating icicles. However, these methods suffer from limitations such as rigid and monotonous icicle distribution patterns, the need for extensive manual parameter adjustments, and a lack of variety in icicle shapes. This necessitates repeated parameter adjustments to achieve the desired effect, making the process cumbersome. Furthermore, the uniformity in icicle shapes and distribution makes it difficult to meet the diverse needs of different scenes for natural effects, limiting visual expressiveness. In addition, the manual creation and repeated parameter adjustments generate a large number of intermediate files and cached data, consuming device storage space and straining server resources during batch rendering. Summary of the Invention
[0003] The purpose of this disclosure is to provide an ice formation generation method, apparatus, electronic device, and storage medium to achieve intelligent identification and adaptive generation of ice formation growth regions based on composite features of a model surface.
[0004] In a first aspect, this disclosure provides a method for generating ice crystals, comprising: acquiring surface feature information of a target three-dimensional model; determining an ice crystal growth region on the surface of the target three-dimensional model based on the surface feature information; generating multiple scattering points within the ice crystal growth region; performing particle simulation based on the multiple scattering points to generate ice crystal particle data; and generating an ice crystal model based on the ice crystal particle data.
[0005] Secondly, this disclosure provides an ice crystal generation device, comprising: an acquisition module for acquiring surface feature information of a target three-dimensional model; a determination module for determining an ice crystal growth area on the surface of the target three-dimensional model based on the surface feature information; a first generation module for generating multiple scattering points within the ice crystal growth area; a simulation module for performing particle simulation based on the multiple scattering points to generate ice crystal particle data; and a second generation module for generating an ice crystal model based on the ice crystal particle data.
[0006] Thirdly, this disclosure provides an electronic device including a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to perform the steps in the above-described ice-generating method.
[0007] Fourthly, this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the steps in the above-described ice formation method.
[0008] This disclosure provides a method, apparatus, electronic device, and storage medium for generating ice crystals. The method acquires surface feature information of a target 3D model; determines ice crystal growth areas on the surface of the target 3D model based on the surface feature information; generates multiple scattering points within the ice crystal growth areas; performs particle simulation based on the multiple scattering points to generate ice crystal particle data; and generates an ice crystal model based on the ice crystal particle data. The method provided in this embodiment automatically identifies suitable ice crystal growth areas using surface feature information, avoiding the rigid distribution problem caused by relying solely on single normal information. It achieves intelligent determination of ice crystal growth areas, reduces manual division workload, and improves the interactive experience. Through a comprehensive scoring mechanism, it adaptively determines the scattering point density and location, and automatically groups them to support multi-level differentiated ice crystal growth, making the ice crystal morphology richer and more natural, closely resembling the accumulation and evolution process in a real physical environment, enhancing the visual expressiveness of the scene and increasing the richness of the game. The automated process of particle dynamics simulation and volume mesh conversion, combined with attribute visualization and parameter adjustment mechanisms, significantly reduces manual parameter tuning and intermediate file caching, lowers device storage space occupation and server resource consumption, improves computing resource utilization efficiency, and solves resource management problems in the computer field. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0010] Figure 1 This is a cloud interaction system architecture diagram according to an exemplary embodiment of the present disclosure;
[0011] Figure 2 This is a schematic flowchart of an ice crystal generation method provided in an embodiment of the present disclosure; Figure 3 A curvature visualization diagram of a target three-dimensional model provided in an embodiment of this disclosure; Figure 4 An AO visualization of a target 3D model provided in this embodiment of the disclosure; Figure 5A visualization of the ice growth region determined on the target three-dimensional model provided in this embodiment of the disclosure; Figure 6 A visualization of the location of sprinkled points generated in the ice crystal growth area, provided in an embodiment of this disclosure; Figure 7 A visualization of the location of the scattered points obtained after applying noise perturbation to the location of the scattered points, as provided in an embodiment of this disclosure. Figure 8 A visualization of the generation of initial particles based on the "large ice crystal zone" and "small ice crystal zone" provided in this embodiment of the disclosure; Figure 9 A visualization diagram obtained by merging particle data from "large ice flake regions" and "small ice flake regions" as provided in this embodiment of the disclosure; Figure 10 This is an example of the effect of converting all ice particle data into a high-precision VDB volume, provided in an embodiment of this disclosure. Figure 11 This is a diagram showing the effect obtained after shrinking the volume according to an embodiment of the present disclosure. Figure 12 The image shows the effect obtained after smoothing the volume according to an embodiment of this disclosure. Figure 13 This is an example of converting the processed volume into a polygonal mesh, provided by an embodiment of this disclosure. Figure 14 This is a schematic diagram of the structure of an ice-generating device provided in an embodiment of the present disclosure; Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0012] The technical solutions of this disclosure will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of this disclosure, not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0013] It should be noted that the information (including but not limited to user input information, such as information entered by the user into input boxes), data (including but not limited to data used for analysis, stored data, and displayed data, such as context code, all code of the current project, the service pressure corresponding to operations performed on all code of the current project, and the code development status of the current project), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards. For example, the context code, operations performed on all code of the current project, the corresponding service pressure, and the code development status involved in this application were all obtained with full authorization.
[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of the invention described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0015] It should also be noted that the various trigger events disclosed in this manual can be preset, and different trigger events can trigger the execution of different functions.
[0016] An ice crystal generation method in one embodiment of this disclosure can run on a terminal device or a server. The terminal device can be a local terminal device. When the ice crystal generation method runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and client devices. Figure 1 The figure shows a cloud interaction system architecture diagram provided in this disclosure. As shown, the cloud interaction system may include: a client device 10 and a server 20, wherein the client device 10 can be connected to the server 20 via a network 30.
[0017] The ice crystal generation method in one embodiment of this disclosure can run on a terminal device or a server. The terminal device can be a local terminal device, such as a touch device or a non-touch device. When the ice crystal generation method runs on a server, the method can be implemented and executed based on a cloud interaction system, which includes a server and client devices.
[0018] In an optional implementation, cloud gaming can run under a cloud interaction system. Cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operation mode, the game program and the game screen presentation are separated. The storage and execution of the ice generation method are completed on the cloud gaming server. The client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, or PDA; however, the terminal device for information processing is the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game interface and other data, returns it to the client device through the network, and finally, the client device decodes and outputs the game interface.
[0019] In an optional implementation, the terminal device can be a local terminal device that stores the game program and is used to present the game interface. The local terminal device is used to interact with the player through the game interface; that is, it typically downloads, installs, and runs the game program via an electronic device. The local terminal device can provide the game interface to the player in various ways, such as rendering it on a terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen and a processor. The display screen is used to present the game interface, which includes game scene visuals, and the processor is used to run the game, generate the game interface, and control the display of the game interface on the display screen.
[0020] This embodiment provides a method for generating ice crystals. Figure 2 This is a flowchart of an ice crystal generation method according to an embodiment of the present disclosure, such as... Figure 2 As shown, the process includes the following steps: Step S210: Obtain surface feature information of the target 3D model; Step S220: Based on surface feature information, determine the ice growth area on the surface of the target 3D model; Step S230: Generate multiple scattering points within the ice crystal growth area; Step S240: Perform particle simulation based on multiple scattering points to generate ice crystal particle data; Step S250: Generate an ice crystal model based on ice crystal particle data.
[0021] The method provided in this embodiment enables intelligent and automated determination of icicle distribution areas based on model surface features, greatly improving the naturalness, diversity, and automation level of icicle simulation while reducing the cost of manual intervention. This method intelligently determines the preferential growth areas of icicles by comprehensively analyzing the multidimensional features of the model surface, achieving adaptive icicle distribution control. The generated effect closely resembles the real physical accumulation and evolution process, and is suitable for generating high-quality icicles on arbitrarily complex model surfaces, significantly improving visual expressiveness and production efficiency.
[0022] The steps described above are explained in detail below.
[0023] In step S210, the surface feature information of the target 3D model is obtained. When applied, for the 3D model object that needs to generate icicle effect, the system automatically extracts the multidimensional geometric and lighting feature parameters of the model surface.
[0024] Specifically, obtaining the surface feature information of the target 3D model refers to automatically analyzing and extracting the multi-dimensional attribute parameters of the model surface through the feature calculation nodes in 3D modeling software.
[0025] Surface feature information can be a set of parameters describing the local properties of the surface, calculated from the geometric data of the target 3D model. Surface feature information includes at least one of the following surface feature parameters: ambient occlusion (AO), curvature, and normal direction.
[0026] In an alternative implementation, surface feature information can be automatically calculated using the Measure node or similar geometric analysis tools. For example, using the Measure node in Houdini software, the system automatically traverses each facet or vertex of the model, calculates its corresponding ambient occlusion value, curvature value, and normal vector, and stores this data as attributes in the model's geometric data structure. Generally, surfaces with high AO and large curvature (especially depressions and edges) are more conducive to the natural formation of icicles because these areas have low AO, strong occlusion, and are prone to moisture accumulation. Figure 3 and Figure 4 As shown, Figure 3 A curvature visualization of a target 3D model. Figure 4 An AO visualization of the target 3D model.
[0027] In an optional implementation, the surface feature information may further include extended feature parameters such as surface roughness, temperature distribution simulation parameters, and moisture accumulation tendency. For example, in advanced application scenarios, in addition to calculating basic AO and curvature parameters, the system can also simulate and calculate the temperature distribution and moisture accumulation tendency values at various surface locations based on the model's material properties and environmental settings, thereby more accurately predicting the likelihood and intensity of ice formation growth.
[0028] In step S220, the ice growth region on the surface of the target three-dimensional model is determined based on surface feature information.
[0029] Specifically, determining the ice growth area based on surface feature information means that the system automatically identifies and divides the area on the model surface that is most suitable for ice growth by using the acquired multi-dimensional surface feature parameters, through comprehensive scoring calculation and threshold determination.
[0030] Among them, the ice growth region can be a set of surface regions on the surface of the target three-dimensional model that are determined to have high suitability for ice growth based on the comprehensive score of surface features.
[0031] Specifically, based on surface feature information, the ice growth region on the surface of the target 3D model is determined, including: Multiple surface feature parameters are normalized separately to obtain normalized feature parameters; The comprehensive score is calculated based on normalized feature parameters; Surface areas with a comprehensive score greater than the first threshold are defined as ice growth areas.
[0032] In an optional implementation, the ice growth region can be determined by calculating a comprehensive score after normalizing multiple surface feature parameters, and then using a set score threshold for region selection. For example, the system first normalizes the ambient light occlusion parameter, curvature parameter, and normal direction parameter, mapping each parameter value uniformly to the range of 0 to 1. Then, it calculates the comprehensive score Score = α·AO_norm + β·Curvature_norm + γ·dot(N,dir) according to a preset weighting factor, where α, β, and γ are weighting coefficients, AO_norm is the normalized ambient light occlusion parameter, Curvature_norm is the normalized curvature parameter, N is the surface normal vector, and dir is the gravity direction vector (0, -1, 0). Finally, the system marks surface regions with a comprehensive score greater than the set threshold as ice growth regions. Figure 5 As shown, Figure 5 The ice growth region is determined on the target 3D model according to the method of this embodiment (highlighted part in the figure).
[0033] In a specific application, for a 3D model of a bridge, after acquiring surface feature information, the system normalizes the AO (Aspect Ratio), curvature, and normal direction parameters of locations such as the bottom of the piers, the connection between the bridge deck and the guardrail, and the inner side of the bridge arch. Then, it calculates the comprehensive score for each location according to a weighted formula. The system found that the bottom of the piers, due to being in shadow for a long time, has an AO value as high as 0.85, a curvature value of 0.75, a small angle between the normal direction and the gravity direction, a dot product value of 0.9, and a comprehensive score of 0.8, far exceeding the set threshold of 0.65. Therefore, the system automatically marks the area at the bottom of the piers as an icicle growth area and assigns it the group label "icicle_zone". The top of the bridge deck, due to its low AO value, small curvature, and upward-facing normal, has a comprehensive score of only 0.3, which does not reach the threshold, and therefore is not included in the icicle growth area, ensuring the physical rationality and visual naturalness of icicle formation.
[0034] In step S230, multiple sprinkling points are generated within the ice crystal growth area.
[0035] Specifically, generating multiple scattering points within the ice growth area means that the system automatically generates several discrete spatial point positions within the determined ice growth area using a scattering algorithm. These point positions will serve as the starting positions for subsequent particle emission, simulating the starting point of ice growth.
[0036] The location of the sprinkle point can be a set of discrete three-dimensional coordinate points generated by a spatial distribution algorithm within the ice growth area.
[0037] In an optional implementation, the sprinkling locations can be randomly generated within the icicle growth area using Scatter nodes based on a set sprinkling density parameter. For example, the system utilizes Scatter nodes in 3D modeling software to calculate the actual sprinkling density at each location within a surface area labeled "icicle_zone," based on a preset maximum sprinkling density value and local surface feature scores. Then, sprinkling locations are randomly generated within the area according to this density parameter, ensuring that the sprinkling distribution has both a degree of randomness and conforms to the physical laws of natural icicle growth. The sprinkling locations generated by the Scatter nodes are as follows: Figure 6 As shown.
[0038] In step S240, particle simulation is performed based on multiple scattering points to generate ice crystal particle data.
[0039] Specifically, particle simulation based on multiple scattering points refers to the system using the generated scattering points as particle emission sources, and performing physical simulation calculations of particle growth for each emission source through a particle dynamics system to generate a particle data set containing information such as particle trajectory, life cycle, and size changes.
[0040] Among them, ice crystal particle data can be a dataset of particle attributes describing the ice crystal growth process, obtained through particle dynamics simulation calculations, including key parameters such as particle position, velocity, life cycle, and size.
[0041] In an optional implementation, ice crystal particle data can be generated through dynamic simulation by inputting the scattering points into the POPSource node of the particle system, setting the initial velocity and lifespan parameters of the particles. For example, the system inputs each scattering point as a particle emission point into the DOP (Dynamics Operator) particle network, sets the initial downward velocity of the particle along the gravitational direction (e.g., vel.y=-1) in the POPSource node, sets the particle lifespan threshold (e.g., 100 frames or 200 frames), and then starts the dynamic solver to perform frame-by-frame simulation calculations, recording the position, velocity, age, and other attributes of each particle in each frame, ultimately generating complete ice crystal particle data.
[0042] In an optional implementation, the generation of icicle particle data may further include dynamic adjustment of particle size and application of velocity perturbations. For example, during particle simulation, the system dynamically adjusts the particle size parameter (pscale) based on the particle's age attribute (age), causing the particle size to gradually decrease with age, simulating the natural morphology of icicles tapering at the tip. Simultaneously, the system may also apply random perturbations based on a noise function to the particle velocity, causing minute lateral shifts and velocity fluctuations as the particles grow downwards, enhancing the naturalness and diversity of icicle morphology.
[0043] In step S250, an ice crystal model is generated based on the ice crystal particle data.
[0044] Specifically, generating ice crystal models based on ice crystal particle data refers to the system converting discrete particle data obtained from particle simulation into a continuous three-dimensional polygonal mesh model through volumetric and meshing algorithms, forming a final three-dimensional ice crystal model that can be used for rendering and display.
[0045] Among them, the ice crystal model can be a three-dimensional polygonal mesh object with a continuous surface generated from ice crystal particle data through volume transformation, smoothing and meshing operations.
[0046] In one embodiment of this application, a method for generating icicles includes generating multiple sprinkling points within the icicle growth area, comprising: The sprinkling density is determined based on the surface characteristics of each location within the ice crystal growth area; Multiple sprinkling locations are generated within the ice crystal growth area based on the sprinkling density.
[0047] Specifically, by acquiring surface feature information corresponding to each location within the ice growth area, including composite feature data such as ambient light shading parameters, curvature parameters, and normal direction parameters, a comprehensive score value for each location is calculated, and then the sprinkle density value for each location is determined based on the comprehensive score value of each location.
[0048] Among them, the dot density can be a numerical parameter that is the number of dots per unit area calculated based on the surface feature score.
[0049] Specifically, the generation frequency and distribution pattern of the scattering algorithm are controlled by the scattering density parameter. Spatial sampling and location determination are performed in the ice growth area according to the density requirements, and finally, a set of scattering location coordinates that meet the density distribution requirements are output.
[0050] In one optional implementation, the scattering points are generated using a layered generation strategy. First, a main scattering point grid is generated within the ice growth area. Then, secondary scattering points are generated around the main scattering points according to local density requirements, forming a multi-layered scattering point distribution pattern. For example, in the eaves area of a temple hall, the main scattering points are generated with a grid spacing of 2 meters × 2 meters. Then, within a 1-meter radius around each main scattering point, 5-15 secondary scattering points are generated according to local density requirements, creating a clustered scattering point distribution effect.
[0051] In an embodiment of this application, a method for generating icicles is provided. Determining the sprinkling density based on surface feature information at various locations within the icicle growth area includes: Obtain the comprehensive score corresponding to each location within the ice crystal growth area; The density of the sprinkled spots at the corresponding locations is determined by multiplying the comprehensive score by the preset maximum density value.
[0052] Specifically, the process of obtaining the comprehensive score involves a quantitative assessment of each surface location within the ice growth area. By weighting and combining the multidimensional surface characteristic parameters obtained in the previous calculation, a numerical score reflecting the suitability of ice growth is assigned to each location. These scores will directly affect the subsequent allocation strategy of the sprinkle density.
[0053] The comprehensive score can be a quantitative value obtained by weighting multi-dimensional surface feature parameters such as ambient light shading, curvature, and normal direction, and is used to measure the suitability of ice growth at each location.
[0054] Specifically, the process of determining the scattering density involves multiplying the comprehensive score of each location by the maximum density value preset by the system to achieve a linear correlation between the scattering density and surface characteristics. This allows locations with higher suitability for ice growth to obtain higher scattering densities, thus forming an ice distribution density gradient that conforms to physical laws.
[0055] In an optional implementation, the dot density is determined through linear mapping calculation. The system multiplies the normalized comprehensive score (range 0-1) by a preset maximum density value to achieve a direct mapping from score to density, ensuring that high-scoring areas receive a dot distribution close to the maximum density. For example, in a temple model, if the maximum density is set to 100 points / square meter, and the comprehensive score at a location under a certain eave is 0.85, then the dot density at that location is 0.85 × 100 = 85 points / square meter. However, the comprehensive score at the roof plane location is 0.2, corresponding to a dot density of only 20 points / square meter.
[0056] In an optional implementation, the icicle density is determined through graded density control. The system sets multiple density levels based on the comprehensive score range, with different density coefficients corresponding to different score intervals, achieving more refined density grading control and visual hierarchy representation. For example, in processing a pavilion model, the system sets a score of 0.8 or above as a high-density area (coefficient 1.0), a score of 0.5-0.8 as a medium-density area (coefficient 0.6), and a score below 0.5 as a low-density area (coefficient 0.3). Through this grading strategy, high-scoring locations such as the pavilion's pillars and eaves form a dense distribution of icicles, while low-scoring locations such as the side walls are only dotted with a few icicles.
[0057] In one embodiment of this application, a method for generating icicles includes, after generating multiple sprinkling points within the icicle growth area, the method further includes: Spatial noise perturbation is applied to multiple scattering points to adjust the spatial distribution of the scattering points.
[0058] The method provided in this embodiment adjusts the randomness and naturalness of the scattering distribution by applying spatial noise perturbation, avoiding the problem of overly regular and artificial scattering distribution, thereby improving the visual realism and natural expressiveness of icicle generation, while enriching the diversity and random changes of icicle morphology, thus solving the technical problem of the lack of naturalness in icicle distribution in computer 3D modeling.
[0059] Specifically, this step alters the spatial coordinates of the scattered points by superimposing disturbance values generated by a spatial noise function onto the original scattered point locations, thereby breaking the original regular distribution pattern and achieving a more natural and random scattered point distribution effect. Figure 6 Based on the original scattered point positions shown, spatial noise perturbation is superimposed to obtain... Figure 7 The noise visualization shown further breaks down the spatial distribution of the scattered points, enhancing the naturalness and randomness of the distribution.
[0060] Among them, spatial noise perturbation can be a pseudo-random numerical function calculated based on a three-dimensional spatial coordinate system. By inputting the coordinates of each point in space into the noise algorithm, the corresponding perturbation vector value is output. Secondly, spatial noise perturbation usually has the function of increasing the random offset of local positions while maintaining the rationality of the overall distribution of the scattered points, so that the distribution of scattered points is more in line with the physical characteristics of random aggregation and dispersion of ice crystals in nature.
[0061] In an optional implementation, spatial noise perturbation employs a Berlin noise or fractal noise algorithm. The intensity and characteristics of the perturbation are controlled by setting the noise frequency, amplitude, and seed parameters. Different frequencies of noise can produce spatial variation effects at different scales. For example, in a specific application, the system obtains the three-dimensional coordinates (x, y, z) of the scattered points as input to the noise function. The perturbation vector (dx, dy, dz) is calculated using TurbNoise(x, y, z, frequency=2.0, amplitude=0.5), and then the original scattered point coordinates are updated to (x+dx, y+dy, z+dz), thereby achieving randomized adjustment of the scattered point positions.
[0062] In one embodiment of this application, a method for generating icicles includes, after generating multiple sprinkling points within the icicle growth area, the method further includes: Based on the sprinkle point attributes, multiple sprinkle point locations are divided into at least two sprinkle point groups.
[0063] The method provided in this embodiment enables differentiated growth control of multi-level icicles by intelligently grouping the scattered points, greatly enhancing the interactive experience, as users can obtain more natural and richer visual effects of icicles; at the same time, it significantly improves the richness of the game, enhancing the sense of layering and visual expressiveness of the scene through diverse icicle shapes; and it effectively solves the technical problem of the uniformity of icicle shapes in computer graphics, realizing fine control and batch generation of icicles in complex 3D scenes through an automated grouping mechanism.
[0064] Specifically, after obtaining multiple scattering points within the ice crystal growth area, the system analyzes the specific attribute parameters corresponding to each scattering point and uses a preset grouping algorithm to intelligently classify these scattering points according to their attribute characteristics, thereby forming scattering point groups with different growth characteristics and visual performances, laying the foundation for achieving differentiated ice crystal generation effects in the future.
[0065] Among them, the sprinkle point attribute can be a set of multi-dimensional parameters used to describe the characteristics of the sprinkle point location. These attribute parameters can reflect the geometric features, lighting conditions, and physical environment characteristics of the sprinkle point location on the surface of the three-dimensional model, providing a scientific basis for the natural growth of icicles.
[0066] Specifically, the scattering attribute can include at least one of the following: the overall score of the scattering location, the noise value of the scattering location, and the surface area of the scattering location.
[0067] The comprehensive score for the scattering point location is a numerical index calculated based on the surface feature information of the target 3D model, used to quantitatively assess the suitability of the location for icicle growth. The noise value at the scattering point location is a random value obtained by sampling at that location using a spatial noise function, used to increase the naturalness and random variation of the scattering point distribution. The surface area of the scattering point location refers to the size of the local surface region surrounding the scattering point, used to assess the spatial range available for icicle attachment and growth at that location; the surface area of the scattering point location can be the area of the surface geometric region within a set radius centered on the scattering point, calculated through the summation of triangular facets or surface integration methods.
[0068] In an embodiment of this application, an ice crystal generation method is provided, comprising at least two scattering point groups including a first scattering point group and a second scattering point group; particle simulation is performed based on multiple scattering point positions to generate ice crystal particle data, including: For the first scattering point group, particle simulation is performed using the first particle parameters to generate the first ice crystal particle data; for the second scattering point group, particle simulation is performed using the second particle parameters to generate the second ice crystal particle data; the first particle parameters and the second particle parameters are different.
[0069] The method provided in this embodiment uses differentiated particle parameters to perform independent particle simulation for different sprinkle point groups. It can generate icicle effects with different shapes according to the differences in surface features, thereby significantly improving the interactive experience and enriching the visual layers of the game scene. At the same time, the differentiated particle parameter settings make the icicle shapes present natural and diverse changes, greatly enhancing the richness of the game.
[0070] Regarding the first group of sprinkle points, the first group of sprinkle points can be a set of sprinkle points with higher comprehensive scores, larger noise values, or larger surface areas based on the sprinkle point attributes. It usually corresponds to the region where the surface features of the model are more prominent.
[0071] Secondly, the first group of sprinkle points usually has the function of supporting the generation of large icicles or the main icicle structure, providing the main visual support and structural framework for the overall shape of the icicle.
[0072] In an optional implementation, the first sprinkling point group can also be a set of large surface area sprinkling points selected based on surface area size. The surface areas corresponding to these sprinkling points have stronger water accumulation capacity and icicle growth potential. For example, at the corner of the wall of a castle model, because the area has a large surface area and good icicle growth conditions, the corresponding sprinkling point will be automatically identified and classified into the first sprinkling point group, forming a thick main icicle.
[0073] Regarding the second point group, the second point group can be a set of points with relatively low comprehensive scores, small noise values, or small surface areas based on the point attributes. They are usually distributed in areas where the surface features of the model are relatively flat.
[0074] Secondly, the second sprinkle group usually has the function of generating small icicles or auxiliary icicle structures, providing rich detail and natural transition effects for the overall icicle effect.
[0075] In an alternative implementation, the second icicle group can also be a supplementary set of icicles determined based on the local density distribution, used to fill the gaps between the first icicle groups, ensuring the continuity and naturalness of the icicle distribution. For example, between the main icicle structures of the castle model, the smaller icicles generated by the second icicle group can create a natural transition effect, making the overall icicle distribution more harmonious and unified.
[0076] Regarding the first particle parameters, the first particle parameters can be a set of particle simulation configurations specifically designed for the first sprinkle point group, which includes key parameter settings for controlling the generation of large ice crystals.
[0077] In an embodiment of this application, an ice crystal generation method is provided, wherein the first particle parameter and the second particle parameter respectively include at least one of the following: initial particle velocity, velocity perturbation parameter, particle lifetime threshold, and particle size change law.
[0078] In an alternative implementation, the first particle parameters may specifically include a large initial particle velocity (e.g., vel.y = -1.0), a long particle lifespan threshold (e.g., a lifespan of 10-15 frames), and a slow particle size deceleration rate. These parameter configurations are conducive to generating long and thick main icicles. For example, in the first sprinkle point group under the eaves, when the first particle parameters are used in the simulation, the particles will grow downwards at a faster rate and maintain a longer lifespan, eventually forming a main icicle structure that is tens of centimeters long.
[0079] In an alternative implementation, the first particle parameter may further include a large velocity perturbation range and a specific particle size variation pattern. By maintaining a large particle size in the early stages of growth and gradually tapering it in the later stages, the natural morphological changes of real icicles are simulated. For example, in the process of icicle formation at the corner of a castle, the first particle parameter controls the particles to gradually taper from an initial coarse state (pscale=1.0) to a pointed state at the end (pscale=0.1), forming a natural conical icicle.
[0080] Regarding the second particle parameters, the second particle parameters can be a set of particle simulation configurations specifically designed for the second sprinkle point group, which includes key parameter settings for controlling the generation of fine ice crystals.
[0081] In an alternative implementation, the second particle parameters may specifically include a smaller initial particle velocity (e.g., vel.y = -0.3), a shorter particle lifespan threshold (e.g., a lifespan of 5-8 frames), and a faster particle size deceleration rate. These parameter configurations are beneficial for generating short and thin decorative icicles. For example, in a second group of sprinkled points in the middle area of a wall, when the second particle parameters are used for simulation, the particles will grow at a slower speed over short distances, forming small decorative icicles, adding rich detail to the overall effect.
[0082] In an alternative implementation, the second particle parameter may also include a small velocity perturbation range and a rapid size decay law, generating fine and natural small icicle structures by rapidly completing the change from coarse to fine within a short lifespan. For example, in the detailed decorative parts of a building, the second particle parameter controls the particles to rapidly shrink from a medium size (pscale=0.5) to disappear (pscale=0.05) in a short time, forming a densely distributed cluster of small icicles.
[0083] In one embodiment of this application, an ice crystal generation method is provided, which generates ice crystal particle data by performing particle simulation based on multiple scattering points. Initial particles are generated based on multiple scattering points; Dynamic simulations were performed on the initial particles to obtain their trajectories. Ice particle data is generated based on particle motion trajectories.
[0084] Specifically, the system converts each scattering point into a particle object with initial properties, providing a basic data structure for subsequent dynamic simulations.
[0085] The initial particle can be a particle object with basic physical properties created based on the coordinate information of the scattering point. The basic physical properties of the initial particle include at least one of the following: initial velocity, lifetime, and size. Specifically, the initial particle undergoes dynamic simulation to obtain its trajectory, including: Set the initial velocity of the particle along a preset direction; The lifespan of particles is controlled based on particle life cycle parameters; The particle size is dynamically adjusted based on the variation pattern of particle size.
[0086] In an optional implementation, the initial particle generation process includes assigning a unique particle identifier to each scattering location and setting the initial attribute parameters of the particle based on the surface feature information of the scattering location. For example, for a scattering location located at the edge of a building's eaves, the system creates an initial particle with a downward initial velocity vector (0, -1, 0), an initial size of 0.1 units, and a lifespan set to 100 frames.
[0087] In an optional implementation, the system assigns differentiated attribute parameter configurations to different types of initial particles based on the sprinkle point grouping information, thereby achieving multi-layered icicle effect generation. For example, for sprinkle points marked as "large icicle areas," the generated initial particles have a larger initial size (0.2 units) and a longer lifespan (250 frames), while the initial particles for "small icicle areas" have a smaller initial size (0.05 units) and a shorter lifespan (80 frames). Figure 8 As shown, Figure 8 A visual diagram for generating initial particles based on the "large ice zone" and "small ice zone".
[0088] Furthermore, the particle data from the "large ice crystal region" and the "small ice crystal region" can be merged into a whole using the Merge node. The visualization of the merged particle data is as follows: Figure 9 As shown.
[0089] Specifically, the system imposes physical constraints on each initial particle and calculates the particle's position changes and property evolution process within its lifetime through time stepping.
[0090] Among them, dynamic simulation can be the particle motion calculation process based on the physics engine, which solves the motion equation of the particle under the action of the force field through numerical integration method.
[0091] In an optional implementation, the system incorporates various physical factors such as environmental resistance, gravitational acceleration, and random perturbations during the dynamic simulation to enhance the realism of particle motion. For example, during the motion, the particle experiences acceleration due to gravity (-9.8 m / s²), while its velocity gradually decreases due to air resistance, and is further amplified by small random perturbations (±0.1 units), ultimately forming a naturally undulating ice slab trajectory.
[0092] Among them, the particle trajectory can be a data sequence that records the position, velocity, size and other state information of the particle at each time step in its life cycle.
[0093] In an optional implementation, the particle trajectory data structure includes multi-dimensional attribute information such as timestamps, three-dimensional coordinates, velocity vectors, size parameters, and life points, forming a complete description of the particle state. For example, the trajectory point of a particle at frame 30 is recorded as {time: 30, position: (1.8, 3.2, 0.9), velocity: (0.02, -0.45, 0.01), scale: 0.08, life: 0.7}.
[0094] In an optional implementation, the system interpolates the particle trajectory to generate smooth intermediate states between keyframes, improving the temporal resolution and spatial continuity of the trajectory. For example, five intermediate frames are inserted between frame 20 and frame 21, and the positions and properties of the interpolation points are calculated using a cubic spline interpolation algorithm, making the growth process of the icicles smoother and more natural.
[0095] Specifically, the system integrates and processes particle trajectory information to generate a particle data set containing a complete description of the icicle's morphology.
[0096] Among them, ice particle data can be a structured dataset that integrates attribute information such as particle position, size, and life cycle, which can be used for subsequent volumetric and meshing processing.
[0097] In an optional implementation, the process of generating ice crystal particle data includes performing time series analysis on the particle trajectory, extracting key feature points, and constructing a particle attribute index table. For example, the system analyzes a particle trajectory containing 220 time steps, extracts 15 key feature points (start point, turning point, end point, etc.), and records detailed attribute information for each feature point to form a compressed representation of ice crystal particle data.
[0098] In an optional implementation, the system performs spatial clustering and neighborhood analysis on the particle data to identify interconnected particle groups, preparing for subsequent volume fusion processing. For example, the K-means clustering algorithm is used to divide 1000 particles into 8 clusters, where particles in each cluster are spatially adjacent (less than 0.5 units apart), forming continuous ice crystal structure segments.
[0099] In one embodiment of this application, an ice crystal generation method includes dynamically adjusting the particle size according to the particle size variation law, which includes: As particle lifespan increases, particle size decreases; When the particle size is smaller than the second threshold, the corresponding particle is deleted.
[0100] Specifically, by establishing a dynamic mapping relationship between particle size and duration, precise control over the morphology of icicles can be achieved, resulting in a natural transition effect from coarse to fine icicles.
[0101] Among these parameters, particle lifetime can be the cumulative time value from particle generation to the current moment, recorded based on the age attribute in the particle system or a custom time counter. Furthermore, particle lifetime typically serves as a core parameter for particle lifecycle management, controlling the dynamic behavior and state changes of particles.
[0102] The decreasing particle size can be a calculation process that gradually reduces the spatial scale of particles over time according to a preset size decay function or decay rate. Secondly, the decreasing particle size usually has the effect of simulating the morphological changes of icicles from thick roots to thin tips during natural growth, thus enhancing visual realism.
[0103] Specifically, by setting a minimum effective value for particle size, excessively small particle objects are automatically cleaned up, thus maintaining the natural sharpness of the icicle tip while optimizing system computing performance.
[0104] The second threshold can be a preset lower limit for particle size, used as a critical criterion to determine whether a particle should be removed from the simulation system. Furthermore, the second threshold typically serves as a criterion for determining the termination of a particle's lifecycle, ensuring that there are no visually invisible or meaningless microparticles in the simulation system.
[0105] In an alternative implementation, the second threshold is set as a percentage value relative to the initial particle size, such as 1% or 2% of the initial size, to ensure that the threshold setting is adaptively matched to the particle size.
[0106] In one alternative implementation, the second threshold is dynamically adjusted based on rendering accuracy and performance requirements. A smaller threshold is set in high-precision rendering mode to retain more details, while a larger threshold is set in real-time rendering mode to improve performance.
[0107] Deleting a particle can be the process of removing a particle object that meets the deletion conditions from the active list of the particle system, thereby releasing the computing and memory resources it occupies.
[0108] In one embodiment of this application, an ice crystal generation method is provided, which generates an ice crystal model based on ice crystal particle data, including: Convert ice particle data into volume data; The volume data is converted into a grid model to obtain the ice crystal model.
[0109] Specifically, this step uses a volumetric algorithm to convert discretely distributed ice particle data into continuous three-dimensional volume field data, thereby achieving a continuous representation of particle spatial information.
[0110] Volumetric data can be three-dimensional spatial density distribution information stored using a voxel mesh structure, which can accurately describe the continuous morphology of ice crystals in space. Secondly, volumetric data typically serves to provide continuous spatial information for subsequent meshing processes and support high-precision surface reconstruction.
[0111] In an optional implementation, the volume data is stored and processed using the VDB (Volume Database) format, which features sparse storage and adaptive resolution. For example, during ice crystal generation, VDB volume data allocates voxels only in the spatial regions where ice crystals exist; blank areas do not occupy storage space. It also supports voxel partitioning of different precision levels, allowing high-resolution voxels to be used in areas with rich ice crystal details, while low-resolution voxels are used in simpler areas. The effect of converting all ice crystal particle data into a high-precision VDB volume is shown below. Figure 10 As shown.
[0112] In one optional implementation, the volume data includes attribute information such as density value, gradient vector, and distance field value for each voxel, providing rich spatial feature data for subsequent meshing and rendering processes. For example, in the volume data of an ice crystal, the density value describes the intensity of the ice crystal material at that location, the gradient vector points to the direction of the greatest density change, and the distance field value represents the shortest distance from that point to the surface of the ice crystal. These attributes together constitute a complete three-dimensional morphological description.
[0113] The volume data is converted into a mesh model using the Convert VDB node, which transforms the volume into a polygonal mesh. Specifically, an isosurface extraction algorithm is employed to convert continuous volume data into a triangular mesh model composed of vertices, edges, and faces, thus realizing the conversion of volume information into a renderable geometric model.
[0114] The mesh model can be a three-dimensional geometric model composed of triangular patches, containing basic geometric information such as vertex coordinates, patch indices, and normal vectors.
[0115] In an optional implementation, the mesh model employs a standard triangular mesh structure, where each triangular facet is defined by three vertices and includes attributes such as position coordinates, texture coordinates, and normal vectors. For example, during the meshing process of the ice crystal model, the system extracts isosurfaces from the volume data using the Marching Cubes algorithm to generate a dense triangular mesh. Each triangle has accurate spatial position and orientation information, forming a smooth and continuous ice crystal surface.
[0116] In one alternative implementation, the mesh model has an adaptive subdivision capability, which can automatically adjust the density distribution of facets based on curvature variations and visual importance. For example, in the curved and pointed areas of an icicle, the system automatically increases the density of triangular facets to maintain surface smoothness, while reducing the number of facets in flat areas to improve performance. The resulting mesh model has a reasonable distribution of facet numbers while ensuring visual quality.
[0117] Among them, the icicle model can be a three-dimensional icicle object with complete geometric structure and material properties, including visual features such as shape, texture, and transparency.
[0118] In an embodiment of this application, an ice crystal generation method is provided, which, before converting volume data into a mesh model, further includes at least one of the following: Shrink the volume data; Smooth the volume data.
[0119] Regarding the shrinking of volume data; Specifically, volume data shrinkage processing involves performing spatial deformation operations on the VDB volume field to reduce the boundary range of the volume, thereby adjusting the overall morphological characteristics of the icicle and achieving a more natural icicle end-closing effect.
[0120] The volumetric data shrinkage processing can be achieved through a spatial distance field reshaping operation performed using the VDB Reshape SDF node. This involves adjusting the signed distance function value of the volume field to achieve inward shrinkage of the volume boundary. Using the VDB ReshapeSDF node to moderately shrink the volume enhances the natural closing effect at the icicle tip, such as... Figure 11 As shown, Figure 11 This is a visualization obtained after shrinking the volume data using the VDBReshape SDF node.
[0121] In an alternative implementation, volumetric data shrinkage is achieved by setting a negative erode parameter, which controls the intensity and range of the shrinkage. Smaller negative values produce slight shrinkage, while larger negative values produce significant shrinkage. For example, when the erode parameter is set to -0.02, the volume boundary shrinks inward by 0.02 units, making the icicle surface more compact and the ends exhibiting a natural, sharp shape.
[0122] In an optional implementation, the volume data shrinkage processing employs an adaptive shrinkage algorithm based on the distance field gradient, dynamically adjusting the shrinkage intensity according to the curvature characteristics of different regions of the volume. For example, a smaller shrinkage coefficient of 0.5 is applied to the root region of the icicle, while a larger shrinkage coefficient of 1.2 is applied to the tip region of the icicle, thereby achieving a shape effect where the root remains full and the tip naturally tapers.
[0123] Regarding smoothing volume data; Specifically, volume data smoothing is achieved by applying a spatial filtering algorithm to the VDB volume field to eliminate jagged protrusions and irregular bumps on the volume surface, thereby obtaining smoother and more continuous volume surface features.
[0124] Among these, volume data smoothing can be achieved through a Gaussian filtering operation performed on the VDB Smooth node, which smooths the surface by calculating a neighborhood-weighted average of each voxel value in the volume field. For example... Figure 12 As shown, Figure 12 This is the result of smoothing the volume using the VDB Smooth node, eliminating unnatural sharp corners between volumes.
[0125] In an alternative implementation, the volumetric data smoothing process employs a feature-preserving adaptive smoothing algorithm that smooths the surface while protecting important geometric feature boundaries. For example, a weaker smoothing intensity of 0.3 is applied to the connection region between the icicle and the original model, while a stronger smoothing intensity of 0.8 is applied to the middle section of the icicle, ensuring that details at the connection are preserved and the middle section surface achieves good smoothness.
[0126] In one embodiment of this application, an ice crystal generation method is provided, which includes converting volume data into a mesh model and then: Perform normal correction on the mesh model.
[0127] Normal correction is a mathematical vector processing operation applied to the geometric surface of a 3D mesh model. It ensures the correctness and consistency of the surface normal direction by recalculating the normal vector for each facet or vertex. Based on the mesh's geometric topology, the normal correction operation uses the geometric information of adjacent faces to calculate a standardized normal vector, which indicates the perpendicular direction at each point on the mesh surface.
[0128] Secondly, normal mapping typically improves the visual appearance of mesh models during lighting rendering, eliminating abnormal lighting and shadows caused by inconsistent normals, and ensuring that the model surface responds correctly to light sources and produces natural light and shadow variations. Normal mapping also enhances the accuracy of texture mapping, providing a reliable geometric basis for subsequent material rendering and visual effects processing, ensuring that the ice crystal model presents a realistic and natural surface texture under various lighting conditions. For example... Figure 13 As shown, Figure 13 This image shows the result of converting the processed volume into a polygonal mesh using the Convert VDB node and correcting the normal direction using the Normal node.
[0129] Based on the above method embodiments, this disclosure also provides an ice crystal generating device, see [link to relevant documentation]. Figure 14 The device includes the following modules: The acquisition module 301 is used to acquire surface feature information of the target 3D model; The determination module 302 is used to determine the ice growth area on the surface of the target three-dimensional model based on surface feature information; The first generation module 303 is used to generate multiple sprinkling points within the ice crystal growth area; Simulation module 304 is used to perform particle simulation based on multiple scattering points to generate ice crystal particle data; The second generation module 305 is used to generate an ice crystal model based on ice crystal particle data.
[0130] The aforementioned device acquires surface feature information of a target 3D model; based on this surface feature information, it determines the ice growth region on the surface of the target 3D model; it generates multiple scattering points within the ice growth region; it performs particle simulation based on these multiple scattering points to generate ice particle data; and it generates an ice model based on the ice particle data. This device automatically identifies suitable ice growth regions using surface feature information, avoiding the rigid distribution problem caused by relying solely on single normal information. It achieves intelligent determination of ice growth regions, reduces manual division workload, and improves the interactive experience.
[0131] The ice-generating apparatus provided in this disclosure has the same implementation principle and technical effect as the aforementioned method embodiments. For the sake of brevity, any parts of the ice-generating apparatus not mentioned in the embodiments can be referred to the corresponding content in the aforementioned ice-generating method embodiments.
[0132] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0133] This disclosure also provides an electronic device, such as... Figure 15 The diagram shows the structure of the electronic device, which includes a processor 111 and a memory 210. The memory 210 stores computer-executable instructions that can be executed by the processor 111. The processor 111 executes the computer-executable instructions to implement the following steps of the icicle generation method: Obtain surface feature information of the target 3D model; Based on surface feature information, the ice growth region on the surface of the target 3D model is determined; Multiple sprinkling points are generated within the ice crystal growth area; Particle simulation was performed based on multiple scattering points to generate ice crystal particle data; An ice crystal model is generated based on ice crystal particle data.
[0134] Optionally, the surface feature information includes at least one of the following surface feature parameters: ambient light occlusion parameter, curvature parameter, and normal direction parameter.
[0135] Optionally, based on surface feature information, the ice growth region on the surface of the target 3D model is determined, including: Multiple surface feature parameters are normalized separately to obtain normalized feature parameters; The comprehensive score is calculated based on normalized feature parameters; Surface areas with a comprehensive score greater than the first threshold are defined as ice growth areas.
[0136] Optionally, multiple sprinkling locations are generated within the ice crystal growth area, including: The sprinkling density is determined based on the surface characteristics of each location within the ice crystal growth area; Multiple sprinkling locations are generated within the ice crystal growth area based on the sprinkling density.
[0137] Optionally, the sprinkling density is determined based on surface feature information at various locations within the ice crystal growth area, including: Obtain the comprehensive score corresponding to each location within the ice crystal growth area; The density of the sprinkled spots at the corresponding locations is determined by multiplying the comprehensive score by the preset maximum density value.
[0138] Optionally, after generating multiple sprinkling locations within the ice crystal growth area, the method further includes: Spatial noise perturbation is applied to multiple scattering points to adjust the spatial distribution of the scattering points.
[0139] Optionally, after generating multiple sprinkling locations within the ice crystal growth area, the method further includes: Based on the sprinkle point attributes, multiple sprinkle point locations are divided into at least two sprinkle point groups.
[0140] Optionally, the scattering attribute includes at least one of the following: the overall score of the scattering location, the noise value of the scattering location, and the surface area of the scattering location.
[0141] Optionally, at least two spray point groups include a first spray point group and a second spray point group; Particle simulations were performed at multiple scattering points to generate ice crystal particle data, including: For the first group of sprinkle points, particle simulation is performed using the first particle parameters to generate the first ice crystal particle data; For the second scattering point group, particle simulation is performed using the second particle parameters to generate the second ice crystal particle data; The parameters of the first particle are different from those of the second particle.
[0142] Optionally, the first particle parameter and the second particle parameter each include at least one of the following: initial particle velocity, velocity perturbation parameter, particle lifetime threshold, and particle size variation law.
[0143] Optionally, particle simulation is performed based on multiple scattering points to generate ice crystal particle data, including: Initial particles are generated based on multiple scattering points; Dynamic simulations were performed on the initial particles to obtain their trajectories. Ice particle data is generated based on particle motion trajectories.
[0144] Optionally, a dynamic simulation is performed on the initial particle to obtain the particle's trajectory, including: Set the initial velocity of the particle along a preset direction; The lifespan of particles is controlled based on particle life cycle parameters; The particle size is dynamically adjusted based on the variation pattern of particle size.
[0145] Optionally, the particle size can be dynamically adjusted according to the particle size variation pattern, including: As particle lifespan increases, particle size decreases; When the particle size is smaller than the second threshold, the corresponding particle is deleted.
[0146] Optionally, an ice crystal model is generated based on ice crystal particle data, including: Convert ice particle data into volume data; The volume data is converted into a grid model to obtain the ice crystal model.
[0147] Optionally, before converting the volumetric data into a mesh model, the method further includes at least one of the following: Shrink the volume data; Smooth the volume data.
[0148] Optionally, after converting the volumetric data into a mesh model, the following steps are also included: Perform normal correction on the mesh model.
[0149] exist Figure 15 In the illustrated embodiment, the electronic device further includes a bus 112 and a communication interface 113, wherein the processor 111, the communication interface 113, and the memory 210 are connected via the bus 112.
[0150] The memory 210 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 113 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 112 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 112 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 15 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0151] The processor 111 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 111 or by instructions in software form. The processor 111 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this disclosure can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory. The processor 111 reads the information in the memory and, in conjunction with its hardware, completes the steps of the ice formation method described in the aforementioned embodiment.
[0152] This disclosure also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are invoked and executed by a processor, they cause the processor to implement an ice crystal generation method, which specifically includes: Obtain surface feature information of the target 3D model; Based on surface feature information, the ice growth region on the surface of the target 3D model is determined; Multiple sprinkling points are generated within the ice crystal growth area; Particle simulation was performed based on multiple scattering points to generate ice crystal particle data; An ice crystal model is generated based on ice crystal particle data.
[0153] Optionally, the surface feature information includes at least one of the following surface feature parameters: ambient light occlusion parameter, curvature parameter, and normal direction parameter.
[0154] Optionally, based on surface feature information, the ice growth region on the surface of the target 3D model is determined, including: Multiple surface feature parameters are normalized separately to obtain normalized feature parameters; The comprehensive score is calculated based on normalized feature parameters; Surface areas with a comprehensive score greater than the first threshold are defined as ice growth areas.
[0155] Optionally, multiple sprinkling locations are generated within the ice crystal growth area, including: The sprinkling density is determined based on the surface characteristics of each location within the ice crystal growth area; Multiple sprinkling locations are generated within the ice crystal growth area based on the sprinkling density.
[0156] Optionally, the sprinkling density is determined based on surface feature information at various locations within the ice crystal growth area, including: Obtain the comprehensive score corresponding to each location within the ice crystal growth area; The density of the sprinkled spots at the corresponding locations is determined by multiplying the comprehensive score by the preset maximum density value.
[0157] Optionally, after generating multiple sprinkling locations within the ice crystal growth area, the method further includes: Spatial noise perturbation is applied to multiple scattering points to adjust the spatial distribution of the scattering points.
[0158] Optionally, after generating multiple sprinkling locations within the ice crystal growth area, the method further includes: Based on the sprinkle point attributes, multiple sprinkle point locations are divided into at least two sprinkle point groups.
[0159] Optionally, the scattering attribute includes at least one of the following: the overall score of the scattering location, the noise value of the scattering location, and the surface area of the scattering location.
[0160] Optionally, at least two spray point groups include a first spray point group and a second spray point group; Particle simulations were performed at multiple scattering points to generate ice crystal particle data, including: For the first group of sprinkle points, particle simulation is performed using the first particle parameters to generate the first ice crystal particle data; For the second scattering point group, particle simulation is performed using the second particle parameters to generate the second ice crystal particle data; The parameters of the first particle are different from those of the second particle.
[0161] Optionally, the first particle parameter and the second particle parameter each include at least one of the following: initial particle velocity, velocity perturbation parameter, particle lifetime threshold, and particle size variation law.
[0162] Optionally, particle simulation is performed based on multiple scattering points to generate ice crystal particle data, including: Initial particles are generated based on multiple scattering points; Dynamic simulations were performed on the initial particles to obtain their trajectories. Ice particle data is generated based on particle motion trajectories.
[0163] Optionally, a dynamic simulation is performed on the initial particle to obtain the particle's trajectory, including: Set the initial velocity of the particle along a preset direction; The lifespan of particles is controlled based on particle life cycle parameters; The particle size is dynamically adjusted based on the variation pattern of particle size.
[0164] Optionally, the particle size can be dynamically adjusted according to the particle size variation pattern, including: As particle lifespan increases, particle size decreases; When the particle size is smaller than the second threshold, the corresponding particle is deleted.
[0165] Optionally, an ice crystal model is generated based on ice crystal particle data, including: Convert ice particle data into volume data; The volume data is converted into a grid model to obtain the ice crystal model.
[0166] Optionally, before converting the volumetric data into a mesh model, the method further includes at least one of the following: Shrink the volume data; Smooth the volume data.
[0167] Optionally, after converting the volumetric data into a mesh model, the following steps are also included: Perform normal correction on the mesh model.
[0168] The computer program products of the ice-generating method, apparatus and electronic device provided in this disclosure include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0169] Unless otherwise specifically stated, the relative steps, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure.
[0170] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0171] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0172] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A method for generating icicles, characterized in that, include: Obtain surface feature information of the target 3D model; Based on the surface feature information, the ice growth region on the surface of the target three-dimensional model is determined; Multiple sprinkling points are generated within the ice crystal growth area; Particle simulation is performed based on the multiple scattering points to generate ice crystal particle data; An ice crystal model is generated based on the ice crystal particle data.
2. The method according to claim 1, characterized in that, The surface feature information includes at least one of the following surface feature parameters: ambient light occlusion parameter, curvature parameter, and normal direction parameter.
3. The method according to claim 2, characterized in that, The step of determining the ice growth region on the surface of the target 3D model based on the surface feature information includes: The surface feature parameters are normalized respectively to obtain normalized feature parameters; A comprehensive score is calculated based on the normalized feature parameters; The surface area with a comprehensive score greater than the first threshold is defined as the ice growth area.
4. The method according to claim 1, characterized in that, The process involves generating multiple sprinkling points within the ice crystal growth area, including: The sprinkling density is determined based on the surface feature information of each location within the ice crystal growth area; The plurality of sprinkling points are generated within the ice growth area based on the sprinkling density.
5. The method according to claim 4, characterized in that, The step of determining the sprinkling density based on the surface feature information of each location within the ice growth area includes: Obtain the comprehensive score corresponding to each location within the ice crystal growth area; The density of the sprinkled spots at the corresponding locations is determined based on the product of the comprehensive score and the preset maximum density value.
6. The method according to claim 1, characterized in that, After generating multiple sprinkling points within the ice crystal growth area, the process further includes: Spatial noise perturbation is applied to the multiple scattering points to adjust the spatial distribution of the scattering points.
7. The method according to claim 1, characterized in that, After generating multiple sprinkling points within the ice crystal growth area, the process further includes: Based on the point-scattering attributes, the multiple point-scattering locations are divided into at least two point-scattering groups.
8. The method according to claim 7, characterized in that, The scattering attributes include at least one of the following: the overall score of the scattering location, the noise value of the scattering location, and the surface area of the scattering location.
9. The method according to claim 7, characterized in that, The at least two spray point groups include a first spray point group and a second spray point group; The process of generating ice crystal particle data based on the multiple scattering points includes: For the first scattering point group, particle simulation is performed using the first particle parameters to generate the first ice crystal particle data; For the second scattering point group, particle simulation is performed using the second particle parameters to generate the second ice crystal particle data; The first particle parameter is different from the second particle parameter.
10. The method according to claim 11, characterized in that, The first particle parameter and the second particle parameter each include at least one of the following: initial particle velocity, velocity perturbation parameter, particle lifetime threshold, and particle size change law.
11. The method according to claim 1, characterized in that, The process of generating ice crystal particle data based on the multiple scattering points includes: Initial particles are generated based on the multiple scattering points; The initial particle was subjected to dynamic simulation to obtain its trajectory. The ice crystal particle data is generated based on the particle motion trajectory.
12. The method according to claim 11, characterized in that, The process of performing dynamic simulation on the initial particle to obtain the particle trajectory includes: Set the initial velocity of the particle along a preset direction; The lifespan of particles is controlled based on particle life cycle parameters; The particle size is dynamically adjusted based on the variation pattern of particle size.
13. The method according to claim 12, characterized in that, The method of dynamically adjusting particle size according to the particle size change law includes: As particle lifespan increases, particle size decreases; When the particle size is smaller than the second threshold, the corresponding particle is deleted.
14. The method according to claim 1, characterized in that, The generation of the ice crystal model based on the ice crystal particle data includes: Convert the ice particle data into volume data; The volume data is converted into a mesh model to obtain the ice crystal model.
15. The method according to claim 14, characterized in that, Before converting the volume data into a mesh model, the method further includes at least one of the following: The volume data is then shrunk. The volume data is then smoothed.
16. The method according to claim 14, characterized in that, After converting the volume data into a mesh model, the process further includes: Normal correction is performed on the mesh model.
17. An ice-generating device, characterized in that, include: The acquisition module is used to acquire surface feature information of the target 3D model; The determination module is used to determine the ice growth region on the surface of the target three-dimensional model based on the surface feature information; The first generation module is used to generate multiple sprinkling points within the ice crystal growth area; The simulation module is used to perform particle simulation based on the multiple scattering points to generate ice crystal particle data; The second generation module is used to generate an ice crystal model based on the ice crystal particle data.
18. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 16.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method of any one of claims 1 to 16.