Modeling method, device and equipment based on physical particles and storage medium

CN115375849BActive Publication Date: 2026-10-30NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211032492.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-26
Publication Date
2026-10-30
Estimated Expiration
2042-08-26

AI Technical Summary

Technical Problem

[0003]目前,程序化模型生成技术主要是通过算法生成模型的点、面、纹理映射等信息,即通过数据驱动模型的生成,实现大规模且快速地建模,但基于这种纯数学的建模方式得到的建模结果不太适用于具有自然有机形态的模型构建

Benefits of technology

[0016]在本发明实施例中,程序化建模软件通过物理粒子模拟的方式基于所获取的初始物理粒子获取水体曲线,构建虚拟瀑布模型的基本形态,然后再通过合适的重构方法基于所获取的水体曲面信息与所生成的中心曲线生成虚拟瀑布模型,通过所引入的物理解算的过程对物理粒子解算得到水体曲线,并以所得到的水体曲线为基础进行虚拟瀑布模型的建模,所生成的虚拟瀑布模型能够基于物理粒子的引入使得其内部具有更多动态,且所得到的建模结果能够满足具有自然有机形态的建模目的。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115375849B_ABST
    Figure CN115375849B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a modeling method, device and equipment based on physical particles and a storage medium, and the method comprises: acquiring initial physical particles for constructing a virtual waterfall model, acquiring a water body curve according to the initial physical particles; generating a center curve for the virtual waterfall model according to the water body curve, and acquiring water body surface information for the virtual waterfall model; and generating the virtual waterfall model according to the water body surface information and the center curve. The water body curve is calculated by the introduced physical particle calculation process, and the modeling of the virtual waterfall model is based on the obtained water body curve. The generated virtual waterfall model can have more dynamics inside based on the introduction of the physical particles, and the obtained modeling result can meet the modeling purpose of having a natural and organic form.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model generation technology, and in particular to a physical particle-based modeling method, a physical particle-based modeling device, a corresponding electronic device, and a corresponding computer storage medium. Background Technology

[0002] In model generation technologies, to avoid the extensive manual editing and modification work in traditional modeling, a procedural approach can usually be used to generate models. This procedural automatic model generation technology can be called procedural model generation technology.

[0003] Currently, procedural model generation technology mainly generates information such as point, surface, and texture mapping of models through algorithms, that is, it achieves large-scale and rapid modeling by driving model generation through data. However, the modeling results obtained based on this purely mathematical modeling method are not very suitable for building models with natural and organic forms. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide a physical particle-based modeling method, a physical particle-based modeling device, a corresponding electronic device, and a corresponding computer storage medium that overcome or at least partially solve the above problems.

[0005] This invention discloses a modeling method based on physical particles, the method comprising:

[0006] Obtain initial physical particles for constructing the virtual waterfall model, and obtain the water body curve based on the initial physical particles;

[0007] A center curve for the virtual waterfall model is generated based on the water body curve, and water body surface information for the virtual waterfall model is obtained; the center curve is used to construct the water body surface of the virtual waterfall model.

[0008] A virtual waterfall model is generated based on the water surface information and the center curve.

[0009] This invention also discloses a modeling device based on physical particles, the device comprising:

[0010] The water curve acquisition module is used to acquire the initial physical particles used to construct the virtual waterfall model, and to acquire the water curve based on the initial physical particles.

[0011] The center curve generation module is used to generate a center curve for the virtual waterfall model based on the water body curve, and to obtain water body surface information for the virtual waterfall model; the center curve is used to construct the water body surface of the virtual waterfall model.

[0012] The virtual waterfall model generation module is used to generate a virtual waterfall model based on the water surface information and the center curve.

[0013] This invention also discloses an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements any of the physical particle-based modeling methods described above.

[0014] This invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the physical particle-based modeling methods described above.

[0015] The embodiments of the present invention have the following advantages:

[0016] In this embodiment of the invention, the procedural modeling software obtains water body curves based on the acquired initial physical particles through physical particle simulation, constructs the basic shape of the virtual waterfall model, and then generates the virtual waterfall model based on the acquired water body surface information and the generated center curve through a suitable reconstruction method. The water body curve is obtained by solving the physical particles through the introduced physical decomposition process, and the virtual waterfall model is modeled based on the obtained water body curve. The generated virtual waterfall model can have more dynamics due to the introduction of physical particles, and the modeling result can meet the modeling purpose of having a natural and organic form. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the steps of an embodiment of a modeling method based on physical particles according to the present invention.

[0018] Figure 2 This is a flowchart illustrating the steps of another embodiment of the physical particle-based modeling method of the present invention;

[0019] Figure 3 This is a schematic diagram illustrating the effect of the initial velocity of the water flow on the curved surface of the water body, provided in an embodiment of the present invention.

[0020] Figure 4 This is a schematic diagram of the generation of a wrapping sheet provided in an embodiment of the present invention;

[0021] Figures 5A to 5P This is an application scenario diagram of the physical particle-based modeling method provided in the embodiments of the present invention;

[0022] Figure 6 This is a structural block diagram of an embodiment of a physical particle-based modeling device according to the present invention. Detailed Implementation

[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0024] To facilitate understanding of this application by those skilled in the art, the terms or nouns involved in the following embodiments of the present invention are explained below:

[0025] Houdini: A 3D computer graphics software, a node-based procedural modeling software.

[0026] Nodes: For technical personnel, nodes are a form of data representation, but for artists, each node can be displayed in real time, and every modification can be stored in the form of a node.

[0027] Procedural Modeling: Automated modeling refers to procedural model generation techniques.

[0028] Vellum Particle Solver: This is a kraft paper particle simulation method in Houdini software. It mainly uses kraft paper particles to simulate physical particles.

[0029] Waterfall Simulation: Waterfall simulation refers to simulating a waterfall scene, which usually involves the construction and generation of a waterfall model.

[0030] Mesh Reconstruction: Model reconstruction.

[0031] UV Generate: UV generation, where UV is short for u,v texture map coordinates. The generated texture map can be a group of pixels used to project onto the surface of an object during rendering.

[0032] UV texture mapping is a technique for adding texture details to the surface of an object.

[0033] Shader: A surface shader, a technique used to render graphics.

[0034] Resample: Resampling.

[0035] VDB: Voxel Data Base, a volumetric data structure.

[0036] The Sop module, or Geometry Surface Operation module, refers to the geometry surface editing module. It consists of geometric nodes located inside an object and can generate geometry.

[0037] Artificial Viscosity increases the numerical stability of simulations. It is mainly due to the different flow velocities in different fluid layers and the relative motion between adjacent layers, resulting in the interaction and shear force generated at the contact surface. This can be called the internal friction of the fluid, or viscous force.

[0038] Procedural model generation technology primarily uses algorithms to generate information such as point, surface, and texture mappings for models. This data-driven model generation method, based on procedural modeling algorithms designed according to rules, effectively achieves the modeling results desired by designers. It can generate sufficient variations under certain patterns to achieve large-scale, rapid modeling results, improving modeling efficiency. Compared to traditional procedural modeling methods, its results are more controllable, ensuring that multiple runs of the program yield the same modeling results. However, this purely mathematical modeling approach lacks the introduction of dynamic solutions and is not suitable for more detailed dynamic generation of the model's internal structure. Therefore, the resulting modeling results are not well-suited for constructing models with natural, organic forms.

[0039] One of the core ideas of this invention is to introduce a physical calculation process. Instead of directly using a mathematical model to fit curves and generate surfaces for the internal construction of the virtual waterfall model, the basic shape of the model is constructed through physical particle simulation. Then, a suitable reconstruction method is used to create the model entity. Based on the introduced physical calculation process, the water curve is obtained by solving the physical particles. The virtual waterfall model is then modeled based on the obtained water curve. The resulting virtual waterfall model can have more dynamics and sufficient physical accuracy due to the introduction of physical particles. Moreover, the modeling result can meet the modeling purpose of having a natural and organic form.

[0040] Reference Figure 1 The diagram illustrates a flowchart of an embodiment of a modeling method based on physical particles according to the present invention, which is applied to procedural modeling software and may specifically include the following steps:

[0041] Step 101: Obtain the initial physical particles used to build the virtual waterfall model, and obtain the water curve based on the initial physical particles;

[0042] In this embodiment of the invention, in order to make the model internally more dynamic and to meet the modeling objective of having a natural and organic form, a physical decomposition process can be introduced into the modeling process. This introduces dynamic factors into the current purely digital modeling method, thereby giving the modeling results physical accuracy. The introduction of physical decomposition can be mainly achieved by constructing the basic form of the model through physical particle simulation, and then reconstructing the model entity using a suitable reconstruction method.

[0043] It should be noted that targeted simulation algorithms can be designed for different modeling requirements and different construction goals. Targeted simulation algorithms help to achieve better realism in the modeling results and improve the efficiency of modeling specific categories. For different modeling needs, for example, modeling man-made facilities (including buildings, roads, etc.) usually needs to conform to human-made generation standards, while for natural models (including trees, water, grass, etc.), it is necessary to summarize the required forms of these models and then generate them based on the corresponding form principles, while trying to restore and simulate natural models as much as possible.

[0044] For example, the virtual waterfall model targeted in this embodiment of the invention is a model of nature and is related to water bodies in nature. In nature, the formation of water bodies may be limited by factors such as surrounding terrain, collision bodies and water flow speed. In the modeling method that introduces physical calculation, when constructing the virtual waterfall model, the aforementioned factors affecting water bodies can be physically simulated in a particle-by-particle manner.

[0045] In practical implementation, the basic form simulated and constructed based on physical particles can refer to the water curve of the constructed virtual waterfall model, so that the virtual waterfall model can be modeled based on the calculated water curve.

[0046] The water curves used to construct a virtual waterfall model are obtained by solving the initial physical particles. These initial water curves are primarily generated based on the parameters of the physical particles; they are unfiltered curves, meaning that some of the initial water curves may contain curves unfavorable for constructing a virtual waterfall surface. The number of initial water curves is typically determined by the number of physical particles. The initial physical particles have corresponding parameter settings. During the physics simulation, these parameters can be adjusted to set different initial water flow velocities, particle friction, curve grouping distance thresholds, and other customizable controls to the final shape of the virtual waterfall model.

[0047] Specifically, when solving for physical particles, the main focus is on solving for the parameters set for the physical particles. The result obtained from solving for the parameters is essentially the trajectory of the particle's motion from the initial point to a certain ending point. The solved particle motion trajectory can then be used to represent the water body curve. Subsequently, the motion trajectory can be analyzed and calculated to summarize the water body curve used to construct the virtual waterfall model.

[0048] Step 102: Generate the center curve for the virtual waterfall model based on the water body curve, and obtain the water body surface information for the virtual waterfall model;

[0049] After constructing the basic form of the model through physical particle simulation, that is, determining the water curve of the virtual waterfall model based on the solution of physical particles, the model entity can be constructed through appropriate reconstruction methods, mainly based on the water curve to construct the virtual waterfall model.

[0050] In practical applications, the initial physical particles set can include several initial physical particles, and the motion trajectories calculated based on these initial physical particles also include several motion trajectories. Consequently, there are also several water body curves represented by these several motion trajectories. To facilitate the construction of the virtual waterfall model using these water body curves, a large number of water body curves can usually be processed uniformly. At this point, a center curve for the virtual waterfall model can be generated based on the calculated water body curves. Specifically, this involves fitting the water body curves to the generated center curve for model generation. The fitted center curve is mainly based on the curve reconstruction of several initial water body curves, which involves selecting and fitting from several initial water body curves to construct the water body surface of the virtual waterfall model.

[0051] Step 103: Generate a virtual waterfall model based on the water surface information and the center curve.

[0052] During the generation of the virtual waterfall model, the fitted curve, i.e. the center curve, can generate the water surface, which can be used to construct the virtual waterfall model.

[0053] The generation of the water surface requires obtaining water surface information for the virtual waterfall model, so that the water surface information can be used to generate the water surface based on the fitted center curve. The obtained water surface information for the virtual waterfall model is essentially the water surface information for the generated water surface, and typically includes information such as the width, height, and direction of the water surface. This embodiment of the invention does not limit this information.

[0054] It should be noted that the modeling process in steps 101 to 103 is generated offline, mainly by the user-defined water curves of the virtual waterfall model. The simulation algorithm for the virtual waterfall model can be calculated locally, and it does not involve the logic of the game runtime; there is no communication process between the client and the server. Furthermore, the procedural modeling software used for modeling can be any node-based procedural modeling software, such as Houdini software; this embodiment of the invention does not impose any limitations on this.

[0055] In this embodiment of the invention, the procedural modeling software obtains water body curves based on the acquired initial physical particles through physical particle simulation, constructs the basic shape of the virtual waterfall model, and then generates the virtual waterfall model based on the acquired water body surface information and the generated center curve through a suitable reconstruction method. The water body curve is obtained by solving the physical particles through the introduced physical decomposition process, and the virtual waterfall model is modeled based on the obtained water body curve. The generated virtual waterfall model can have more dynamics due to the introduction of physical particles, and the modeling result can meet the modeling purpose of having a natural and organic form.

[0056] Reference Figure 2 The diagram illustrates a flowchart of another embodiment of the physical particle-based modeling method of the present invention, which is applied to procedural modeling software and may specifically include the following steps:

[0057] Step 201: Set up several initial physical particles, perform physical calculations on the initial physical particles, and obtain the motion trajectory of the initial physical particles;

[0058] In this embodiment of the invention, in order to make the model internally more dynamic and to meet the modeling objective of having a natural and organic form, a physical decomposition process can be introduced into the modeling process. This introduces dynamic factors into the current purely digital modeling method, thereby giving the modeling results physical accuracy. The introduction of physical decomposition can be mainly achieved by constructing the basic form of the model through physical particle simulation, and then reconstructing the model entity using a suitable reconstruction method.

[0059] In one embodiment of the present invention, initial physical particles for constructing a virtual waterfall model can be obtained, and then water curves for the virtual waterfall model can be determined based on the initial physical particles. In a specific implementation, the basic form simulated and constructed based on the physical particles can refer to the water curves for the constructed virtual waterfall model. The water curves used to construct the virtual waterfall model can be specifically obtained by solving the set initial physical particles. The resulting water curves are mainly initial water curves generated based on the parameters of the physical particles. These are unfiltered curves, meaning that some of the initial water curves contained within them are unfavorable for constructing the water surface of the virtual waterfall. The number of initial water curves is usually determined based on the number of physical particles.

[0060] The initial physical particles set can include several initial physical particles. The initial physical particles set have corresponding parameter settings. During the physical simulation, the parameters of the initial physical particles can be adjusted to set different parameters such as initial water flow velocity, particle friction, gravity, curve grouping distance threshold, and viscosity, so as to customize the water curve of the virtual waterfall model and customize the final generated shape of the virtual waterfall.

[0061] The initial velocity of the water flow primarily affects the curvature of the water surface in the virtual waterfall model. Assuming the virtual waterfall model is a waterfall model, and its water surface is a waterfall surface, then... Figure 3 As shown, the greater the initial velocity of the waterfall, the greater the curvature of the waterfall surface, and the farther the horizontal distance of the waterfall. Particle friction is mainly used to control the speed at which physical particles slow down when sliding on the collider, or even to control the physical particles to stop sliding on the collider. It can usually be controlled by increasing particle friction to make the curvature of the waterfall segments smaller. Viscosity is mainly due to the different flow velocities of different fluid layers and the relative motion between adjacent fluid layers, resulting in the internal friction force generated at the contact surface. For example, when constructing a model of a viscous liquid, the viscosity can usually be increased to increase the numerical stability of the simulation. The curve grouping distance threshold is mainly used to group the water curves determined by physical particles. The larger the curve distance threshold, the more distant curves may be grouped into the same group. Water curves in the same group can be used to generate water surfaces. When the constructed virtual waterfall model is a waterfall model, the larger the curve grouping distance threshold, the more likely it is to generate wider and fewer waterfall surfaces, and vice versa.

[0062] It should be noted that the parameter settings for the physical particles are usually related to the characteristics of the modeling object. For example, for any water body model, the parameters of initial velocity and viscosity have a significant impact. However, for other completely different modeling objects, the parameters of their physical particles, such as initial velocity and position, need to be reconsidered based on their characteristics. This embodiment of the invention does not impose any restrictions on this. Furthermore, when calculating the trajectory of the physical particles, it is only necessary to perform the calculation based on the adjusted initial parameters of the physical particles. The dynamics of the physical particles during their motion are usually determined by the colliding bodies, meaning that the physical particles are only affected by standard gravity parameters during their motion. In some extreme cases, there may also be a need to change the gravitational acceleration.

[0063] Specifically, when solving for physical particles, the main task is to solve for the parameters set for the physical particles. The result of solving for the parameters is essentially the trajectory of the particle from the initial point to a certain end point. The solved particle trajectory can be used to represent the water curve so that the trajectory can be analyzed and calculated in the future. Based on the solved trajectory, the water curve for the virtual waterfall model is determined.

[0064] In practical applications, the procedural modeling software used for modeling can be any node-based procedural modeling software, such as Houdini. The calculation of physical particles can be implemented using Houdini's parchment simulation method. This is primarily because the physical calculations introduced during the modeling process can be placed in the SOP module, thus avoiding data transmission problems caused by communication between different modules in Houdini. Furthermore, the method of simulating physical particles using parchment particles is highly efficient and provides good simulation results for physical particles with viscous force requirements.

[0065] Step 202: Analyze the motion trajectory of the initial physical particles to obtain the water curve for the virtual waterfall model;

[0066] The water curve for the virtual waterfall model is determined based on the calculated motion trajectory. This can be mainly manifested by analyzing and calculating the motion trajectory of the initial physical particles, summarizing the water curve for the virtual waterfall model, and constructing the virtual waterfall model based on this water curve. The generated virtual waterfall model can have more dynamics and sufficient physical accuracy due to the introduction of physical particles.

[0067] In practical applications, the initial physical particles set can include several initial physical particles, and the motion trajectories calculated based on these initial physical particles also contain several motion trajectories. Consequently, there are also several water curves represented by these motion trajectories. To facilitate the construction of the virtual waterfall model using these water curves, a large number of water curves can usually be processed uniformly. In this case, the calculated motion trajectories can be filtered and grouped so that the corresponding water curves for motion trajectories within the same group can be uniformly processed when constructing the virtual waterfall model.

[0068] The calculated motion trajectories are filtered and grouped, specifically through a set curve grouping distance threshold. First, a curve grouping distance threshold for the virtual waterfall model can be obtained. This threshold can be used to group / filter several motion trajectories. Then, the curve grouping distance threshold can be used to filter these trajectories. The motion trajectories that meet the filtered curve grouping distance threshold are taken as the water curves of the virtual waterfall model. In essence, the determined water curves are actually groups of water curves that meet the curve grouping distance threshold; that is, each group of water curves can contain at least one water curve that meets the curve grouping distance threshold.

[0069] Furthermore, to facilitate the construction of the virtual waterfall model based on the water body curve, a center curve for the virtual waterfall model can be generated based on the calculated water body curve. Specifically, this involves fitting the water body curve to the generated center curve for model generation processing.

[0070] In practical implementation, the water curves obtained after preliminary processing can include a group of water curves that meet the curve grouping distance threshold. That is, each group of water curves can contain at least one water curve that meets the curve grouping distance threshold. Then, the group of water curves that meet the curve grouping distance threshold can be fitted to obtain a center curve for the water curves. This center curve is then used to generate the water surface for constructing the virtual waterfall model. In other words, the fitted center curve is mainly based on the curve reconstruction of several initial water curves, which means that the curves are selected and fitted from several initial water curves to construct the water surface for the virtual waterfall model.

[0071] It should be noted that when constructing the same virtual waterfall model, there can be multiple water curve groups. For example, when the set curve group distance threshold is larger, there may be fewer water curve groups, that is, it tends to generate water surfaces that are wider and fewer in number; when the set curve group distance threshold is smaller, there may be more water curve groups, that is, it tends to generate water surfaces that are narrower and more numerous in number.

[0072] Step 203: Configure the width information of the water surface of the virtual waterfall model on the point information of the center curve, and construct the water surface segmentally based on the surface direction and width information.

[0073] After constructing the basic form of the model through physical particle simulation—that is, determining the water curves of the virtual waterfall model based on the solution of physical particles—the model entity can be constructed using appropriate reconstruction methods, primarily based on the water curves. To facilitate the construction of the virtual waterfall model using water curves, the water curves used as the foundation can actually be implemented using center curves. In practical applications, water surfaces generated from the center curves of various water curve groups are primarily used to construct the virtual waterfall model.

[0074] In this embodiment of the invention, when constructing the same virtual waterfall model, multiple water curve groups exist. The water curves contained in the same group can be used to generate the same water surface. At this time, each water curve group can be configured with width information and generate a water surface accordingly, which can realize the layered structure of the virtual waterfall model based on each group of water curves.

[0075] In practical applications, the center curve can contain point information, which can be used to configure node information on the center curve. In this case, the water surface information for the water body can be configured on the point information of the center curve, so that when generating the water surface based on the center curve, it can be generated according to the configured water surface information. The configured water surface information can include the width and direction of the water surface. Therefore, when generating the water surface, the water surface for the virtual waterfall model can be constructed according to the width information and the direction of the surface, so that the virtual waterfall model can be subsequently constructed using the generated water surface.

[0076] To determine the width of the water surface, the flow direction vector of the virtual waterfall model can be rotated 90 degrees around the y-axis. Then, the distance between the two curve points with the largest distance along this vector direction at the same height on the central curve can be calculated, and this distance can be used as the width of that height segment. That is, the width of the water surface may differ at different heights on the central curve.

[0077] In an alternative embodiment, the center curve can also be resampled based on height, that is, the points of the center curve are filtered to ensure that each segment on the subsequently generated water surface has the same span in height, and the width is not calculated at arbitrary height spans.

[0078] Specifically, the center curve can be resampled using the acquired height distance threshold. This can be achieved by adding curve points at corresponding heights on the center curve in multiples of the height distance threshold. For example, if the acquired height distance threshold is used to define the height span (e.g., a 0.2m segment), curve points can be added to the center curve at positions where the height is a multiple of 0.2m, and curve points whose height is not a multiple of the height distance threshold (i.e., 0.2m) can be deleted. Then, in the center curves of different water body curve groups after height resampling, the curve points can be aligned in height. That is, when calculating the distance to point 'a' on one water body curve, a point 'b' at the same height as point 'a' can be found on another water body curve, reducing variables in distance calculation.

[0079] Therefore, when creating the water surface for the virtual waterfall model according to the width information and surface direction, the center curve has curve points resampled based on height. At this time, the width information and surface direction can be used to construct the water surface in segments. The process of constructing the water surface in segments can be represented as generating several patches that conform to the calculated width information in the same surface direction, with each curve point as the center, and then using the patches to construct the water surface of the virtual waterfall model.

[0080] The generated patch satisfies the water width requirement of the curve point. The generated patch can be generated for any curved surface direction, as long as the curved surface direction is the same. There is no restriction on the specific curved surface direction. The generated patch can be a connected square patch or a patch of other shapes that are connected to each other. The shape of the patch can be determined based on the modeling object. This embodiment of the invention does not impose any restrictions on this.

[0081] Step 204: Bend the surrounding water body into the collision body to model the virtual waterfall.

[0082] After generating the water surface segmented based on the surface direction and width information, that is, after constructing the water surface for the virtual waterfall model, the virtual waterfall model can also be constructed using the water surface. This can be mainly represented by bending the outer water surface to the collision body to model the virtual waterfall model.

[0083] The outer water surface is bent towards the collider. Specifically, the constructed virtual waterfall model may contain colliders in the preset virtual scene, such as riverbed bottoms and rocks, as well as edge and non-edge surfaces in the generated surface. The edge surface can then be bent towards the obtained collider until it wraps around the collider, so that the generated water surface can better wrap around the collider, generating a wrapping surface. At this point, the non-edge surface that does not need to be bent and the generated wrapping surface can be used to construct the virtual waterfall model.

[0084] In practical applications, after generating several facets that conform to the calculated width information in the same curved surface direction with each curve point as the center, wrapping facets can be generated at the edges of the facets at both ends, i.e., the edge facets are rotated by a preset angle in sequence. If the collision body is not completely wrapped after generating a preset number of wrapping facets, it can continue to generate in the current direction without rotation until the wrapping surface constructed by the generated wrapping facets completely wraps the collision body, thereby improving the realism of the generated virtual waterfall model.

[0085] For example, refer to Figure 4 This diagram illustrates the generation of wrapping patches according to an embodiment of the present invention. For the generated flat water surface, the two outermost surfaces of the water surface can be considered. Since the surface is generated based on patches, they are essentially the two outermost edge patches. In this case, calculations can be performed on each edge patch as follows: Figure 4The three directions shown are: normal 1, rotation centerline 2, and starting direction 3. Normal direction 1 can be obtained based on the Houdini Normal node. Rotation centerline 2 can be calculated based on the following formula: Direction = normalize(this_point_pos - low_adjencent_point_pos), where normalize() refers to the normalization function, which can normalize the value, usually to the interval [0,1]. Starting direction 3 can be calculated based on the following formula: Direction = normalize(this_prim_pos - center_prim_pos). At this point, the obtained edge patch can be rotated by a certain angle, such as 30°, in the direction of the rotation center. Then, a new wrapping patch is generated at a certain distance (at the same angle, assuming an interval of 0.4m) in a new direction. In specific implementation, in order to prevent the wrapping surface subsequently constructed based on the generated wrapping patch from being a closed loop, when the total angle of rotation for a single edge patch reaches 90°, the rotation will no longer be carried out according to the set angle. Instead, the wrapping patch will continue to be generated in the original direction to avoid the phenomenon that the generated water body and the collision body do not intersect, thereby improving the realism of the generated virtual waterfall model.

[0086] It should be noted that the bending direction and rotation angle can be determined based on the actual situation, and the embodiments of the present invention do not impose any restrictions on this.

[0087] In a preferred embodiment, the generated physical particles can be automated waterfall particle points that interact with the scene. Specifically, during the particle simulation process, existing colliders in the preset virtual scene will affect the state of the physical particles during their movement, which may result in changes such as direction and speed. At this time, the physical particles will collide with existing colliders in the preset virtual scene, generating interaction and thus creating a layered structure for the virtual waterfall model. This increases the richness of the virtual waterfall model, making the modeling more dynamic and fulfilling the modeling purpose of having a natural and organic form.

[0088] In this embodiment of the invention, the procedural modeling software determines the water curve for the virtual waterfall model based on the acquired initial physical particles through physical particle simulation, constructs the basic shape of the virtual waterfall model, and then generates the virtual waterfall model based on the acquired water surface information and the generated center curve through a suitable reconstruction method. The water curve is obtained by solving the physical particles through the introduced physical decomposition process, and the virtual waterfall model is modeled based on the obtained water curve. The generated virtual waterfall model can have more dynamics due to the introduction of physical particles, and the modeling result can meet the modeling purpose of having a natural and organic form.

[0089] Reference Figures 5A to 5P This diagram illustrates an application scenario of the physical particle-based modeling method provided in this embodiment of the invention. This application scenario can be the process of modeling a virtual waterfall model in nature. The generation process of the virtual waterfall model can be offline, primarily involving user-defined water curves. The simulation algorithm for the model can be calculated locally, without involving game runtime logic, and there is no communication process between the client and the server. The procedural modeling software used for modeling can be any node-based procedural modeling software, such as Houdini, and this embodiment of the invention does not impose any limitations on it.

[0090] In the generation process of the open world, the generation of waterfalls often fails to produce suitable waterfall dynamics due to the complexity of the upstream processes, ultimately adopting a rather rigid generation mode that only produces simple waterfall surfaces lacking expressiveness. This invention provides a novel method for generating layered waterfalls, which, while ensuring that the waterfall surfaces conform to the trajectory of a real waterfall, increases the internal dynamics of the waterfall. Furthermore, the generated virtual waterfall model can interact with other models in the scene, seamlessly integrating into the open world process. It can also be used as a standalone tool for subsequent use with appropriate configuration of the separately generated virtual waterfall model.

[0091] In this embodiment of the invention, taking the case of a river forming a waterfall due to passing through a steep cliff as an example, the model to be modeled can be a virtual waterfall model. The collider obtained by the virtual waterfall model in this river scene can be a rock model and / or a riverbed model. If there are other requirements, other colliders that conform to this scene can also be added to this river scene.

[0092] When constructing a virtual waterfall model, one can first start with models based on, for example... Figure 5A Among the river curves in the riverbed model shown, those with a larger slope and a larger vertical drop are selected, such as... Figure 5B The section shown is suitable for creating a waterfall, let's call it section A; then it can be done as follows: Figure 5C The method shown is implemented through model mapping. Specifically, each region in the terrain model is subjected to collision point detection in a vertically upward or vertically downward direction. If the terrain region formed by the collision point matches the section A suitable for generating a waterfall, then this terrain region can be determined as the initial section of the waterfall on the terrain. At this time, the simulation starting point of the waterfall can be determined by the initial curve of the water surface model at the waterfall end, and the initial waterfall point is generated according to a certain density.

[0093] The starting point for the simulation based on the initial curve at the waterfall end can be determined by finding, specifically, the starting point of the initial curve at the waterfall end. Figure 5D The line segment B shown is located at the highest plane of the waterfall section. The line segment is resampled, for example, using 0.02m as a segment to generate multiple particle starting points. It should be noted that the particle starting points can be subdivided based on performance, but it is recommended to set particle starting points in segments no larger than 0.1m.

[0094] Then, colliders in a river scene can be generated from the riverbed information. First, one can look for... Figure 5E The river surface shown can then be simplified, and the resulting riverbed model can be as follows: Figure 5F As shown, at this point, you can look for points that can be used to generate stones, and as... Figure 5G The diagram shows the addition of a simple block model, the conversion of an existing model using VDB, and the generation of a rock-like surface undulation structure through pre-designed noise (e.g., Figure 5H (as shown); then it can be done as follows Figure 5I The diagram shows the combination of terrain model and rocks as a complete collider. At this point, it is still necessary to... Figure 5J The portion above the river surface is deleted, thus completing the generation of the collider for the waterfall model in the river scene.

[0095] Therefore, the automated generation process of the waterfall model can be represented as follows: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] Figure 5D The initial point of the particles generated by the line segment (which can be used as the starting simulation point for the waterfall model), and as... Figure 5J The generated colliders are used as input to procedural modeling software to model the waterfall model. The colliders can be used to alter the motion states of the initial physical particles used to construct the waterfall model.

[0096] Specifically, it can be like Figure 5K The diagram shows the generation of a series of discrete waterfall points (for the initial physical particles used to construct the waterfall model), and can be used as follows: Figure 5L The process involves removing waterfall points that touch the bottom or have incorrect direction to ensure that the waterfall model constructed subsequently flows from high to low. The trajectory of these removed waterfall points can then be analyzed to obtain the water curve for the waterfall model. Figure 5KIt is known that the set waterfall points can include several waterfall points, and the motion trajectory calculated based on the set waterfall points also includes several motion trajectories. In order to facilitate the construction of the waterfall model based on the waterfall curve, the curve grouping distance threshold for the waterfall model can be obtained to group / filter several motion trajectories. The motion trajectory that meets the curve grouping distance threshold after filtering is used as the waterfall curve of the waterfall model.

[0097] The determined waterfall curves are essentially groups of waterfall curves that meet the curve grouping distance threshold, such as... Figure 5M As shown, a waterfall curve group can contain at least one waterfall curve that meets the curve grouping distance threshold. Then, a fitting calculation can be performed on the waterfall curve group that meets the curve grouping distance threshold to obtain the center curve for the waterfall curves. This center curve is then used to generate the waterfall surface for constructing the waterfall model.

[0098] In this embodiment of the invention, when constructing the same waterfall model, multiple waterfall curve groups exist. The waterfall curves contained in the same group can be used to generate the same waterfall surface. At this time, each waterfall curve group can be configured with width information and generate a waterfall surface accordingly, which can realize the layered structure of the waterfall model based on each group of waterfall curves.

[0099] Then the grouped data can be summarized to generate a waterfall model. For example... Figure 5N As shown, a waterfall surface for the waterfall model can be created according to the width information and the surface direction. Specifically, several facets conforming to the calculated width information are generated in the same surface direction, centered on each curve point. These facets are then used to construct the waterfall surface of the waterfall model. After generating several facets conforming to the calculated width information in the same surface direction, wrapping facets can be generated at the edges of the facets, i.e., the edge facets, by rotating them sequentially by a preset angle. If the collider is not completely wrapped after generating a preset number of wrapping facets, generation can continue in the current direction without rotation until the wrapping surface constructed by the generated wrapping facets completely wraps the collider, thus improving the realism of the generated waterfall model.

[0100] For example, the following three directions can be calculated for the edge patch: normal, rotation centerline axis, and starting direction. The obtained edge patch is rotated by a certain angle, such as 30°, around the rotation center direction. Then, a new wrapping patch is generated at a certain distance (the same angle, assuming an interval of 0.4m) using a new direction. In specific implementation, in order to prevent the wrapping surface subsequently constructed based on the generated wrapping patch from being a closed loop, when the total rotation angle for a single edge patch reaches 90°, the rotation will no longer be performed according to the set angle. Instead, the wrapping patch will continue to be generated in the original direction to avoid the phenomenon that the generated water body and the collision body do not intersect.

[0101] In embodiments of the present invention, such as Figure 5O and Figure 5P As shown, to complement the rendering scheme of the waterfall model, flat texture map UVs can also be generated, and the texture map can be projected onto the surface in the rendering according to pixel groups, such as... Figure 5N The surface of the wrapping surface is shown. Regarding the generation method of texture map UVs, this can be achieved by setting the center curves of the waterfall model as the x=0 axis of the texture map UVs, with their y-coordinates being the world coordinates y. Then, the x-coordinate of the UVs is calculated based on the difference in index between the surrounding facets and the center facets. Specifically, the x-values ​​of UVs to the left of the x=0 axis are negative differences, while the x-values ​​of UVs to the right of the x=0 axis are positive differences, and their y-values ​​can be the same as the world coordinates y-values.

[0102] Finally, all waterfall effect points can be eliminated and optimized to prevent them from becoming too dense, thus obtaining the final rendering effect of the constructed waterfall model.

[0103] In this embodiment of the invention, by introducing a physical calculation process, instead of directly establishing a mathematical model to fit a curve and generate a surface for the points inside the waterfall, a certain number of physical particles are set, and their trajectories over a certain period of time are calculated based on initial velocities, friction, gravity, etc. Then, through analysis and calculation of the motion trajectories, the waterfall curve is derived, and a model is built based on this. This method allows the waterfall model to have more dynamics, improves the expressiveness of the constructed waterfall model, and has sufficient physical accuracy. The resulting model meets the modeling objective of having a natural and organic form; moreover, the generated waterfall model is suitable for integration into automated processes and requires no manual operation.

[0104] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0105] Reference Figure 6 The diagram illustrates a structural block diagram of an embodiment of a physical particle-based modeling device according to the present invention, which is applied to procedural modeling software and may specifically include the following modules:

[0106] The water curve acquisition module 601 is used to acquire the initial physical particles used to construct the virtual waterfall model, and to acquire the water curve based on the initial physical particles;

[0107] The center curve generation module 602 is used to generate a center curve for the virtual waterfall model based on the water body curve, and to obtain water body surface information for the virtual waterfall model; the center curve is used to construct the water body surface of the virtual waterfall model.

[0108] The virtual waterfall model generation module 603 is used to generate a virtual waterfall model based on the water surface information and the center curve.

[0109] In one embodiment of the present invention, the water curve acquisition module 601 may include the following sub-modules:

[0110] The trajectory calculation submodule is used to perform physical calculations on the initial physical particle to obtain the trajectory of the initial physical particle;

[0111] The water curve determination submodule is used to analyze the motion trajectory of the initial physical particles to obtain the water curve for the virtual waterfall model.

[0112] In one embodiment of the present invention, the initial physical particles include a plurality of initial physical particles, and the motion trajectory of the initial physical particles includes a plurality of motion trajectories for the plurality of initial physical particles; the water body curve determination submodule may include the following units:

[0113] The curve grouping distance threshold acquisition unit is used to acquire the curve grouping distance threshold for the virtual waterfall model.

[0114] The curve filtering unit is used to filter several motion trajectories using a curve grouping distance threshold, and the motion trajectories that meet the curve grouping distance threshold after filtering are used as the water body curves of the virtual waterfall model.

[0115] In one embodiment of the present invention, the water body curve includes a group of water body curves that meet the curve grouping distance threshold; the center curve generation module 602 may include the following sub-modules:

[0116] The center curve generation submodule is used to perform fitting calculations on water body curve groups that meet the curve grouping distance threshold to obtain the center curve for the water body curves.

[0117] In one embodiment of the present invention, the center curve contains point information, and the water surface information includes the width information and surface direction of the water surface for the virtual waterfall model; the virtual waterfall model generation module 603 may include the following sub-modules:

[0118] The width information storage submodule is used to configure the width information of the water body surface on the point information of the center curve;

[0119] The water surface construction submodule is used to construct water surfaces for the virtual waterfall model according to the width information and the surface direction.

[0120] The Virtual Waterfall Model Generation Submodule is used to construct a virtual waterfall model using water surface curves.

[0121] In one embodiment of the present invention, the virtual waterfall model generation module 603 may further include the following sub-modules:

[0122] The resampling submodule is used to obtain the height and distance thresholds for the water surface of the virtual waterfall model, and to resample the center curve using the height and distance thresholds.

[0123] The resampling submodule may include the following units:

[0124] The resampling unit is used to add curve points at the corresponding heights of the center curve according to integer multiples of the height distance threshold.

[0125] In one embodiment of the present invention, the center curve has curve points; the water body surface construction submodule may include the following units:

[0126] The water body surface construction unit is used to construct water body surfaces in segments using width information and surface direction;

[0127] The water body surface construction element can include the following sub-elements:

[0128] The water surface construction sub-unit is used to generate several facets with width information in the same direction as the curve points, and to construct the water surface of the virtual waterfall model using the facets.

[0129] In one embodiment of the present invention, the virtual waterfall generation submodule may include the following units:

[0130] The collider acquisition unit is used to acquire colliders of a preset virtual scene, as well as edge and non-edge patches in the generated patches;

[0131] The wrapping patch generation unit is used to bend the edge patch toward the collider to wrap the collider, thereby generating a wrapping patch;

[0132] The virtual waterfall model generation unit is used to construct a virtual waterfall model using non-edge patches and wrapping patches.

[0133] In this embodiment of the invention, the procedural modeling software obtains water body curves based on the acquired initial physical particles through physical particle simulation, constructs the basic shape of the virtual waterfall model, and then generates the virtual waterfall model based on the acquired water body surface information and the generated center curve through a suitable reconstruction method. The water body curve is obtained by solving the physical particles through the introduced physical decomposition process, and the virtual waterfall model is modeled based on the obtained water body curve. The generated virtual waterfall model can have more dynamics due to the introduction of physical particles, and the modeling result can meet the modeling purpose of having a natural and organic form.

[0134] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0135] This invention also provides an electronic device, comprising:

[0136] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described embodiment of the physical particle-based modeling method and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0137] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described physical particle-based modeling method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0138] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0139] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0140] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0141] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0142] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0143] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0144] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0145] The foregoing has provided a detailed description of a physical particle-based modeling method, a physical particle-based modeling device, a corresponding electronic device, and a corresponding computer storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A modeling method based on physical particles, characterized in that, The method includes: Obtain initial physical particles for constructing a virtual waterfall model, and obtain water body curves based on the initial physical particles; A center curve for the virtual waterfall model is generated based on the water body curve, and water body surface information for the virtual waterfall model is obtained; the center curve is used to construct the water body surface of the virtual waterfall model. A virtual waterfall model is generated based on the water surface information and the center curve. The center curve contains point information, and the water surface information includes the width and direction of the water surface for the virtual waterfall model. The process of generating a virtual waterfall model based on the water surface information and the center curve includes: The width information of the water body surface is configured on the point information of the center curve; A water surface for the virtual waterfall model is constructed according to the width information and the surface direction. The virtual waterfall model is then constructed using the water surface. The modeling process of the virtual waterfall model is generated offline.

2. The method according to claim 1, characterized in that, The process of obtaining the water body curve based on the initial physical particles includes: Physical calculations are performed on the initial physical particle to obtain its trajectory. The motion trajectory of the initial physical particles is analyzed to obtain the water curve used to construct the virtual waterfall model.

3. The method according to claim 2, characterized in that, The initial physical particles include a plurality of initial physical particles, and the motion trajectory of the initial physical particles includes a plurality of motion trajectories for the plurality of initial physical particles. The analysis of the motion trajectory of the initial physical particles to obtain the water curve for the virtual waterfall model includes: Obtain the curve grouping distance threshold for the virtual waterfall model; The curve grouping distance threshold is used to filter the several motion trajectories, and the motion trajectories that meet the curve grouping distance threshold after filtering are used as the water body curves of the virtual waterfall model.

4. The method according to claim 1, characterized in that, The water body curves include a group of water body curves that meet a curve grouping distance threshold; the step of generating a center curve for the virtual waterfall model based on the water body curves includes: The center curve for the water body curves is obtained by fitting the water body curves that meet the curve grouping distance threshold.

5. The method according to claim 1, characterized in that, Also includes: Obtain the height distance threshold for the water surface of the virtual waterfall model, and resample the center curve using the height distance threshold; The step of resampling the center curve using the height distance threshold includes: Add curve points at the corresponding height positions of the center curve according to integer multiples of the height distance threshold, and resample the center curve using the added curve points.

6. The method according to claim 1 or 5, characterized in that, The central curve has curve points; the creation of the water surface for the virtual waterfall model according to the width information and the surface direction includes: The water body surface is segmented and constructed using the width information and the surface direction. The step of constructing segmented water surface using the width information and the surface direction includes: Centered on the curve point, generate several facets that conform to the width information in the same curved direction, and use the facets to construct the water surface of the virtual waterfall model.

7. The method according to claim 5, characterized in that, The virtual waterfall model constructed using the water surface includes: Obtain the collider of the preset virtual scene, and obtain the edge patches and non-edge patches in the generated patches; The edge patch is bent toward the collider to wrap around the collider, thus generating a wrapping patch; A virtual waterfall model is constructed using the non-edge patch and the wrapping patch.

8. A modeling device based on physical particles, characterized in that, The device includes: The water curve acquisition module is used to acquire the initial physical particles used to construct the virtual waterfall model, and to acquire the water curve based on the initial physical particles. The center curve generation module is used to generate a center curve for the virtual waterfall model based on the water body curve, and to obtain water body surface information for the virtual waterfall model; the center curve is used to construct the water body surface of the virtual waterfall model. The virtual waterfall model generation module is used to generate a virtual waterfall model based on the water surface information and the center curve. The center curve contains point information, and the water surface information includes the width and direction of the water surface for the virtual waterfall model. The virtual waterfall model generation module includes the following sub-modules: The width information storage submodule is used to configure the width information of the water body surface on the point information of the center curve; The water surface construction submodule is used to construct water surfaces for the virtual waterfall model according to the width information and the surface direction. The virtual waterfall model generation submodule is used to construct a virtual waterfall model using water body surfaces, wherein the modeling process of the virtual waterfall model is generated offline.

9. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the physical particle-based modeling method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the physical particle-based modeling method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Fountain simulation realization method based on particle system

    CN105303601A