3D Model Design Method, System, Medium and Device Based on Fluid Simulation
By converting the 3D model parameters into fluid simulation simulation parameters, the fluid simulation simulation system is used to simulate and fill the state information of fluid particles, which solves the problem that users need to have modeling skills in the existing technology, and realizes the effect of quickly generating a printable fluid model without modeling experience.
Patent Information
- Application Number
- CN202211335030.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-10-28
AI Technical Summary
Existing auxiliary modeling software requires users to have skilled modeling skills in fluid simulation and 3D model design, which is difficult to meet the needs of people without modeling experience, and the design process is complex and does not necessarily meet the final requirements, resulting in cumbersome modification process.
By converting the 3D model parameters into fluid simulation simulation parameters, the fluid particle state information is obtained by using the fluid simulation simulation system to simulate, hole completion and surface reconstruction are carried out in turn, and the preset fluid model is screened for 3D printing.
The user does not need to master the modeling ability, and just adjust the parameters to obtain the fluid model, realize automated modeling, quickly generate printable models, improve construction efficiency, and ensure the effectiveness and integrity of the model through hole completion method.
Smart Images

Figure CN115619939B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of 3D modeling, and particularly relates to a 3D model design method, system, medium and device based on fluid simulation. Background Technique
[0002] The statements in this part only provide background technical information related to the present invention, and do not necessarily constitute prior art.
[0003] Due to the uncertainty and complexity of fluids, this type of sculpture creation is extremely difficult and cannot be designed and created by the general public. With the progress and development of 3D printing technology, it has inspired more users to carry out creative 3D model design, and has also shifted the public's vision from fluid sculptures to using 3D printing to make fluid models. The emergence of 3D printing technology has facilitated the production and manufacturing process of items, but before production and manufacturing, users still need to manually build a fluid model to generate a printable file.
[0004] The inventors found that although existing auxiliary modeling software provides the function of fluid simulation, the entire process from designing the simulation scene to reconstructing the fluid surface still requires users to have proficient modeling skills, which is also not applicable to those without modeling experience. Moreover, the process of designing a 3D model is complex. Even if a 3D model is designed through modeling software, it may not necessarily meet the final requirements. In order to finally meet the requirements, it is necessary to modify each modeling link again, making the modification process rather cumbersome. Summary of the Invention
[0005] In order to solve the technical problems existing in the above background technique, the present invention provides a 3D model design method, system, medium and device based on fluid simulation, which does not require users to master modeling capabilities, and only by modifying parameters, the corresponding fluid model can be obtained.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] The first aspect of the present invention provides a 3D model design method based on fluid simulation.
[0008] A 3D model design method based on fluid simulation, which includes:
[0009] Converting 3D model parameters into fluid simulation parameters, and then based on the initial parameters of the fluid simulation system, simulating to obtain the corresponding fluid particle state information;
[0010] Based on the fluid particle state information, hole filling and surface reconstruction are sequentially performed to obtain the corresponding fluid model;
[0011] Selecting the fluid model meeting preset requirements to obtain the corresponding 3D model for 3D printing.
[0012] As an implementation manner, the initial parameters of the fluid simulation system include the selection of the base boundary model, the viscosity of fluid flow, the shape and size of the fluid, the total duration of the simulation, and the time interval of continuous output of the model.
[0013] As an implementation manner, the construction process of the fluid simulation system is as follows:
[0014] Use the fluid simulation algorithm from the Lagrangian perspective based on particles, select the implicit incompressible SPH method as the solution algorithm for fluid pressure, and select the conjugate gradient descent method for iterative solution as the calculation method for the viscous force between fluids.
[0015] As an implementation manner, the process of hole filling based on the state information of fluid particles is as follows:
[0016] Traverse the fluid particles, analyze the positions where holes may appear during model reconstruction, and mark the particles at the holes;
[0017] Traverse the hole particles, perform weighted principal component analysis according to the distribution of the surrounding neighbor particles of the particles at the holes, construct a filling kernel that fits the shape of the holes, add complementary particles to fill the filling kernel, and then perform smoothing processing on the added particles to make them fit the fluid surface.
[0018] As an implementation manner, the process of surface reconstruction is as follows:
[0019] Use the particle-based anisotropic kernel surface reconstruction algorithm to construct a surface mesh, and use marching cubes to extract the fluid surface.
[0020] The second aspect of the present invention provides a 3D model design system based on fluid simulation.
[0021] A 3D model design system based on fluid simulation includes:
[0022] A fluid simulation module, which is used to convert 3D model parameters into fluid simulation parameters, and then simulate to obtain the corresponding fluid particle state information based on the initial parameters of the fluid simulation system;
[0023] A fluid model acquisition module, which is used to sequentially perform hole filling and surface reconstruction based on the fluid particle state information to obtain the corresponding fluid model;
[0024] A 3D model printing module, which is used to screen out the fluid models that meet the preset requirements to obtain the corresponding 3D models for 3D printing.
[0025] As an implementation manner, the initial parameters of the fluid simulation system include the selection of the base boundary model, the viscosity of the fluid flow, the shape and size of the fluid, the total duration of the simulation, and the time interval for continuous output of the model.
[0026] As an implementation manner, the construction process of the fluid simulation system is as follows:
[0027] Use the fluid simulation algorithm based on the Lagrangian perspective of particles, select the implicit incompressible SPH method as the solution algorithm for fluid pressure, and select the conjugate gradient descent method for iterative solution as the calculation method for the viscous force between fluids.
[0028] As an implementation manner, the process of hole filling based on the state information of fluid particles is as follows:
[0029] Traverse the fluid particles, analyze the positions where holes may appear during model reconstruction, and mark the particles at the holes;
[0030] Traverse the hole particles, perform weighted principal component analysis according to the distribution of the surrounding neighbor particles of the particles at the holes, construct a filling kernel that fits the shape of the holes, add complementary particles to fill the filling kernel, and then perform smoothing processing on the added particles to make them fit the fluid surface.
[0031] As an implementation manner, the process of surface reconstruction is as follows:
[0032] Use the particle-based anisotropic kernel surface reconstruction algorithm to construct a surface mesh, and use marching cubes to extract the fluid surface.
[0033] The third aspect of the present invention provides a computer-readable storage medium.
[0034] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps in the above-mentioned 3D model design method based on fluid simulation.
[0035] The fourth aspect of the present invention provides an electronic device.
[0036] An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in the above-mentioned 3D model design method based on fluid simulation.
[0037] Compared with the prior art, the beneficial effects of the present invention are:
[0038] (1) Based on the initial parameters of the fluid simulation system, the present invention simulates to obtain the corresponding fluid particle state information, and sequentially performs hole filling and surface reconstruction based on the fluid particle state information to obtain the corresponding fluid model. Finally, the fluid model meeting the preset requirements is screened out to obtain the corresponding 3D model for 3D printing. In this way, for ordinary users without modeling experience, by only adjusting the required parameters on the system panel, they can obtain the corresponding printable fluid model. Moreover, through physical simulation for automated modeling, the generation of the model is completed quickly, improving the construction efficiency of the printable model.
[0039] (2) The present invention proposes a hole filling method based on the existing surface extraction algorithm. This method can fill the holes of the fluid model by adding fluid particles before surface reconstruction, ensuring the effectiveness, integrity, and functionality of the printable model, and reducing subsequent filling processing operations.
[0040] The advantages of the additional aspects of the present invention will be partly given in the following description, partly will become obvious from the following description, or will be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The specification drawings forming a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention.
[0042] Figure 1 It is a flowchart of the 3D model design method based on fluid simulation provided in the first embodiment of the present invention;
[0043] Figure 2 It is a schematic diagram of the parameter panel given by the system for users in the first embodiment of the present invention;
[0044] FIG. 3(a) is the first model diagram output during the fluid simulation process provided in the first embodiment of the present invention;
[0045] FIG. 3(b) is the second model diagram output during the fluid simulation process provided in the first embodiment of the present invention;
[0046] FIG. 3(c) is the third model diagram output during the fluid simulation process provided in the first embodiment of the present invention;
[0047] FIG. 3(d) is the fourth model diagram output during the fluid simulation process provided in the first embodiment of the present invention;
[0048] FIG. 4(a) is the surface reconstruction output result of the 1st frame in the output model provided in the first embodiment of the present invention;
[0049] Figure 4(b) shows the surface reconstruction output result of the 3rd frame in the output model provided by the first embodiment of the present invention;
[0050] Figure 4(c) shows the surface reconstruction output result of the 13th frame in the output model provided by the first embodiment of the present invention;
[0051] Figure 4(d) shows the surface reconstruction output result of the 27th frame in the output model provided by the first embodiment of the present invention;
[0052] Figure 5(a) is a schematic diagram of the hole filling effect 1 provided by the first embodiment of the present invention;
[0053] Figure 5(b) is a schematic diagram of the hole filling effect 2 provided by the first embodiment of the present invention. Detailed implementation manners
[0054] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0055] It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0056] It should be noted that the terms used herein are only for describing specific implementation manners and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0057] Embodiment 1
[0058] Refer to Figure 1 , a 3D model design method based on fluid simulation in this embodiment includes:
[0059] Step 1: Convert the 3D model parameters into fluid simulation parameters, and then simulate the corresponding fluid particle state information based on the initial parameters of the fluid simulation system.
[0060] Among them, as Figure 2 shown, the user selects necessary parameters according to the panel prompts, that is, the initial parameters of the fluid simulation system include the selection of the base boundary model, the viscosity of the fluid flow, the shape and size of the fluid, the total duration of the simulation, and the time interval of continuous model output.
[0061] The process of converting the 3D model parameters into fluid simulation parameters is:
[0062] According to the corresponding relationship set in the system, the content set by the user is transformed into parameters that can be used by the simulation system. For example, solid particles in fluid simulation are used to replace the base model selected by the user as the boundary, the viscosity of fluid flow is transformed into the viscosity coefficient μ required for calculating viscous force in fluid simulation, and the shape and size of the fluid are transformed into the number of fluid particles and the position of each particle is calculated.
[0063] The construction process of the fluid simulation system is as follows:
[0064] Use the fluid simulation algorithm based on the Lagrangian perspective of particles, select the implicit incompressible SPH method as the algorithm for solving fluid pressure, and select the conjugate gradient descent method for iterative solution as the calculation method for viscous force between fluids.
[0065] Specifically, the system initializes particle information and applies for storage space for the initial particles according to the adjusted parameters;
[0066] Use the IISPH (Implicit Incompressible SPH) algorithm to solve the fluid pressure Poisson equation, use the CG (conjugate gradient) iterative method to solve the Poisson equation of fluid viscous force, thereby constructing the solver for fluid simulation in this method, and perform simulation on the initialized fluid particles. In order to make the solution system run stably and not too slowly, the time step selected in this method is 0.001. The simulation process is shown in Figures 3(a) - 3(d). In this embodiment, the viscosity of the fluid is selected as 1.5, the boundary shape is selected as "cup", the initial particle shape is a cuboid, the length * width * height is taken as 0.8 * 0.8 * 0.1, and the number of fluid particles is 6k.
[0067] Step 2: Based on the state information of fluid particles, perform hole filling and surface reconstruction in sequence to obtain the corresponding fluid model.
[0068] Among them, the process of hole filling based on the state information of fluid particles is as follows:
[0069] Traverse the fluid particles, analyze the positions where holes may appear during model reconstruction, and mark the particles at the holes;
[0070] Traverse the hole particles, perform weighted principal component analysis according to the distribution of the surrounding neighbor particles of the particles at the holes, construct a filling kernel that fits the hole shape, add complementary particles to fill the filling kernel, and then perform smoothing processing on the added particles to make them fit the fluid surface.
[0071] The process of surface reconstruction is as follows:
[0072] Construct a surface mesh using a particle-based anisotropic kernel surface reconstruction algorithm and extract the fluid surface using marching cubes.
[0073] Specifically, obtain the simulation state at a certain moment and input the physical information of its fluid particles into the surface reconstruction system.
[0074] In fluid simulation, each particle stores the number of its surrounding neighboring particles. At positions where model holes are likely to appear, the number of neighboring particles of the particles is lower than the average. Therefore, this method traverses all fluid particles, checks the number of their neighboring particles, and when it is determined that the number of neighboring particles is less than the average, marks the particles at this position as hole particles and adds them to the hole particle set. ;
[0075] To make the filling particles fit the hole shape, this method analyzes the shape of the holes and traverses the hole particle set. and constructs a matrix using the method of weighted principal component analysis (WPCA) according to the distribution of its surrounding neighboring particles. ;
[0076] where is the coordinate position of the hole particle, is the coordinate position of its neighboring particles, is the coordinate position of its neighboring particles, is the kernel radius (as described in the fluid simulation algorithm, usually set to 4 times the particle radius), and the matrix characterizes the distribution of the surrounding neighboring particles of the hole particle. To enable the filling kernel to perform rotational deformation according to the eigenvalues and eigenvectors of the matrix , it is necessary to calculate its inverse matrix ;
[0077] Construct a filling kernel W for each hole particle with the current particle as the center and twice the filling radius of the kernel radius . Add particles evenly at intervals of the particle diameter within the kernel and calculate its distance vector from the hole particle , where is the coordinate of the hole particle, is the coordinate of the added particle. Determine whether the length value of the distance vector of the added particle after being deformed by the matrix is less than the kernel radius . When the condition is satisfied, this added particle can be added as a filling particle to the filling set F. ;
[0078] Since the filling positions are not formed by simulation, their positions do not exactly fit the plane. To make the added particles fit the surface better and avoid forming "bulges", the method smooths the filling particles in the filling set F. This step uses the Laplace smoothing method, that is , where is the smoothing coefficient, generally taking values from 0.9 to 1.0. In this method, it takes 0.98. is the coordinate of the filling particle, is the filling particle coordinates of the neighboring particles.
[0079] Use the method of anisotropic kernel surface reconstruction for SPH to construct a surface mesh from fluid particles and filling particles;
[0080] Use marching cubes to extract the fluid surface from the surface mesh. In this method, the value of the isosurface is not fixed. Calculate the average value avg of the scalar values of all surface mesh points, and let the value of the isosurface iso_value = avg * 0.666 to extract the fluid model, as shown in Figures 4(a) - 4(d). Select the output results of the 1st, 3rd, 13th, and 27th frames among the output models of this Example 1 for display. The effect of filling holes is shown in Figures 5(a) and 5(b). The left side shows the fluid surface reconstruction result without hole filling, and the right side shows the surface reconstruction result after hole filling. The same frame result is taken for comparison in both figures.
[0081] Step 3: Screen out the fluid models that meet the preset requirements to obtain the corresponding 3D models for 3D printing.
[0082] Display all the generated fluid models and screen out the fluid models that meet the preset requirements. If the models displayed this time do not meet the user's expectations, this method can be repeated to obtain the required model.
[0083] Finally, output the model according to the user's selection and perform 3D printing.
[0084] Example 2
[0085] This example provides a 3D model design system based on fluid simulation, which includes:
[0086] (1) A fluid simulation module, which is used to convert the 3D model parameters into fluid simulation parameters, and then simulate the corresponding fluid particle state information based on the initial parameters of the fluid simulation system;
[0087] Among them, the initial parameters of the fluid simulation system include the selection of the base boundary model, the viscosity of fluid flow, the shape and size of the fluid, the total duration of the simulation, and the time interval for continuous output of the model.
[0088] Specifically, the construction process of the fluid simulation system is as follows:
[0089] Use the fluid simulation algorithm from the Lagrangian perspective based on particles, select the implicit incompressible SPH method as the algorithm for solving fluid pressure, and select the conjugate gradient descent method for iterative solution as the calculation method for the viscous force between fluids.
[0090] (2) Fluid model acquisition module, which is used to sequentially perform hole filling and surface reconstruction based on the fluid particle state information to obtain the corresponding fluid model;
[0091] Among them, the process of hole filling based on the fluid particle state information is as follows:
[0092] Traverse the fluid particles, analyze the positions where holes may appear during model reconstruction, and mark the particles at the holes;
[0093] Traverse the hole particles, perform weighted principal component analysis according to the distribution of the surrounding neighboring particles of the particles at the holes, construct a filling kernel that fits the shape of the holes, add complementary particles to fill the filling kernel, and then perform smoothing processing on the added particles to make them fit the fluid surface.
[0094] The process of surface reconstruction is as follows:
[0095] Use the particle-based anisotropic kernel surface reconstruction algorithm to construct a surface mesh, and use marching cubes to extract the fluid surface.
[0096] (3) 3D model printing module, which is used to screen out the fluid models that meet the preset requirements to obtain the corresponding 3D models for 3D printing.
[0097] It should be noted here that each module in this embodiment corresponds one by one to each step in Embodiment 1, and the specific implementation process is the same, so it will not be repeated here.
[0098] Embodiment 3
[0099] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps in the above-mentioned 3D model design method based on fluid simulation.
[0100] Embodiment 4
[0101] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps in the above-mentioned 3D model design method based on fluid simulation are implemented.
[0102] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0103] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A 3D model design method based on fluid simulation, characterized in that, It includes: Convert the 3D model parameters into fluid simulation parameters, and then, based on the initial parameters of the fluid simulation system, simulate to obtain the corresponding fluid particle state information; Successively perform hole filling and surface reconstruction based on the fluid particle state information to obtain the corresponding fluid model; Screen out the fluid models that meet the preset requirements to obtain the corresponding 3D models for 3D printing; The construction process of the fluid simulation system is as follows: Use the fluid simulation algorithm from the Lagrangian perspective based on particles, select the implicit incompressible SPH method as the algorithm for solving fluid pressure, and select the conjugate gradient descent method for iterative solution as the calculation method for the viscous force between fluids; The process of hole filling based on the fluid particle state information is as follows: Traverse the fluid particles, analyze the positions where holes may appear during model reconstruction, and mark the particles at the holes; Traverse the hole particles, perform weighted principal component analysis according to the distribution of the surrounding neighboring particles of the particles at the holes, construct a filling kernel that fits the hole shape, add complementary particles to fill the filling kernel, and then smooth the added particles to make them fit the fluid surface.
2. The 3D model design method based on fluid simulation according to claim 1, wherein The initial parameters of the fluid simulation system include the selection of the base boundary model, the viscosity of fluid flow, the shape and size of the fluid, the total duration of the simulation, and the time interval for continuous model output.
3. The 3D model design method based on fluid simulation according to claim 1, characterized in that, The process of surface reconstruction is as follows: Use the particle-based anisotropic kernel surface reconstruction algorithm to construct a surface mesh, and use marching cubes to extract the fluid surface.
4. A 3D model design system based on fluid simulation, characterized in that, It includes: A fluid simulation module, which is used to convert the 3D model parameters into fluid simulation parameters, and then, based on the initial parameters of the fluid simulation system, simulate to obtain the corresponding fluid particle state information; A fluid model acquisition module, which is used to successively perform hole filling and surface reconstruction based on the fluid particle state information to obtain the corresponding fluid model; A 3D model printing module, which is used to screen out the fluid models that meet the preset requirements to obtain the corresponding 3D models for 3D printing; The construction process of the fluid simulation system is as follows: Use the fluid simulation algorithm from the Lagrangian perspective based on particles, select the implicit incompressible SPH method as the algorithm for solving fluid pressure, and select the conjugate gradient descent method for iterative solution as the calculation method for the viscous force between fluids; The process of hole filling based on the fluid particle state information is as follows: Traverse the fluid particles, analyze the positions where holes may appear during model reconstruction, and mark the particles at the holes; Traverse the hole particles, perform weighted principal component analysis according to the distribution of the surrounding neighboring particles of the particles at the holes, construct a filling kernel that fits the hole shape, add complementary particles to fill the filling kernel, and then smooth the added particles to make them fit the fluid surface.
5. The 3D model design system based on fluid simulation according to claim 4, wherein The initial parameters of the fluid simulation system include the selection of the base boundary model, the viscosity of fluid flow, the shape and size of the fluid, the total duration of the simulation, and the time interval for continuous model output.
6. The 3D model design system based on fluid simulation according to claim 4, wherein, The process of surface reconstruction is as follows: Use the particle-based anisotropic kernel surface reconstruction algorithm to construct a surface mesh, and use marching cubes to extract the fluid surface.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps in the fluid simulation-based 3D model design method according to any one of claims 1-3.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the fluid simulation-based 3D model design method according to any one of claims 1-3.
Citation Information
Patent Citations
SPH (smoothed particle hydrodynamics) algorithm-based simulation method and simulation system of process of breaking dam by flood
CN102708227A
Method and system for simulating 3D fluid
CN102831275A