Virtual deformation simulation method and system based on natural convolution features of plant material surface, and storage medium

By constructing a three-dimensional model and mapping of UV coordinates of materials and noise textures, combined with the Bezier curve deformation algorithm, the problems of natural convolution and texture authenticity in surface simulation of plant materials are solved, and the cigar cigar cover and coat are realized Natural convolution and high-quality texture effects.

CN118941750APending Publication Date: 2024-11-12CHINA TOBACCO SICHUAN IND CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410950984.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The prior art lacks natural convolution in the surface simulation of plant materials, the deformation is not smooth and natural enough, and the authenticity and visualization of texture materials cannot be achieved.

Method used

By scanning the surface products of the plant material to build a three-dimensional model, UV coordinate mapping of material and noise texture, combined with the Bezier curve deformation algorithm, the deformation of natural convolution features is achieved, ensuring the authenticity and smoothness of the texture during the deformation process.

Benefits of technology

The natural convolution of cigar covers and coats is realized, which enhances the texture quality and visual effect after the model deformation, and avoids the strange situations and unnatural textures during vertex deformation in traditional technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941750A_ABST
    Figure CN118941750A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual deformation simulation method and system based on natural convolution features of a plant material surface and a storage medium, and the method comprises the steps: scanning an entity of a plant material surface product, constructing a three-dimensional model of each part of the product, determining the number of vertexes, edges and surfaces of the three-dimensional model, constructing a cigar white mold with a triangular surface, and carrying out the simulation of the natural convolution features of the plant material surface. Resetting the coordinates of the cigar white mold in the three-dimensional space; performing UV coordinate mapping on vertexes of the cigar white mold, and creating materials and distributing noise textures according to the actual appearance of a product; and after the material and noise texture mapping of the cigar white mold in the three-dimensional space is realized, carrying out natural convolution feature deformation on the product. According to the method, natural convolution of plant products such as cigar jackets and cigar coats is realized by combining a free deformation technology and noise textures, and meanwhile, the texture quality and the visual effect after model deformation are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cigarette simulation, and in particular to a virtual deformation simulation method, system and storage medium based on natural convolution characteristics of plant material surface. Background Art

[0002] Products with plant-based surface materials, such as cigars, are products of specific materials, and their surface material and morphological characteristics are crucial for quality control, manufacturing process, and simulation presentation. However, traditional cigar production and process research is mainly based on the measurement and observation of physical objects. This method has problems such as time-consuming and labor-intensive, inaccurate data, and differences in manual production.

[0003] With the continuous development of virtual simulation technology, the field of product design has begun to transform towards digitalization. Virtual simulation technology allows cigars to transform physical objects into accurate digital models through 3D modeling software. These digital models are highly editable and visual, allowing cigars to adjust their shape, size, structure and material at any time. Most of the current cigar simulation technologies remain on digital models, partially realizing the simple movement and rotation of virtual cigars, but need to be combined with computer graphics to realize the natural convolution process of virtual cigars. In computer graphics, the existing virtual deformation simulation technology generally uses mesh deformation or free deformation methods, among which: mesh deformation simulates the deformation process of objects by displacing mesh vertices, but it is necessary to process the topological relationship and vertex weight of the mesh, and has high requirements for the model. Free deformation transforms the shape of the model by adjusting the position of the control point, but these two involve the rotation, scaling or nonlinear transformation of the model, etc. These transformations may affect the projection effect of the texture on the surface of the model, resulting in texture distortion or inaccuracy. At the same time, the existing technology in the field of deformation simulation usually uses a geometric model, subdivides the white mold, establishes a local coordinate system for the model to be deformed, manually sets control points and some other parameters, and finally moves the control points to achieve the deformation effect. This technology is not smooth and natural enough when applied to cigar deformation, and cannot achieve the authenticity of the cigar texture material during the deformation process. Summary of the invention

[0004] The purpose of the present invention is to provide a virtual deformation simulation method, system and storage medium based on the natural convolution characteristics of the plant material surface, which is used to solve the problems in the prior art of plant material surface simulation methods such as lack of natural convolution, insufficient smoothness and naturalness during deformation, inability to achieve the authenticity of the texture material during the deformation process, and poor visualization effect.

[0005] The present invention solves the above problems through the following technical solutions:

[0006] A virtual deformation simulation method based on natural convolution characteristics of plant material surface, comprising:

[0007] Scan the entity of the product on the surface of the plant material, build a three-dimensional model of each part of the product, determine the number of vertices, edges, and faces of the three-dimensional model, build a cigar white mold with triangular faces (i.e., a three-dimensional geometric model without material texture), and reset the coordinates of the cigar white mold in three-dimensional space;

[0008] In order to achieve a realistic and delicate visual effect of the cigar, it is necessary to map the created surface material (Material) and noise texture (Texture) to the UV coordinates of the cigar white mold in three-dimensional space, so as to generate a complete model with material, that is, the cigar geometric model. Creating materials includes defining material properties. Attributes are parameters used to define the surface appearance and optical characteristics of the three-dimensional model, such as color, reflectivity, roughness, refractive index, metallicity, etc. Noise texture is an image applied to the surface of a three-dimensional model to achieve complex details and surface features, such as bump texture, normal texture, diffuse texture, etc. In order to apply the correct material and texture to the cigar white mold, UV coordinate mapping (UV Mapping) is required to convert the vertex coordinates of the cigar white mold into texture coordinates to ensure that the material and texture can accurately cover the surface of the cigar model;

[0009] After realizing the UV coordinate mapping of the cigar geometry model, material, and noise texture, the natural convolution feature deformation is performed.

[0010] Furthermore, the method of performing noise texture mapping in UV coordinate mapping of material and noise texture on the coordinates of the cigar geometric model in three-dimensional space is:

[0011] A. Randomly distribute feature points in the texture space according to the deformation situation, and calculate the distance from each deformation point to the feature point according to the Euclidean distance formula;

[0012] B. Find the nearest feature point to each deformation point, calculate the noise value using linear interpolation, scale the noise value to the target range using linear scaling, and map the scaled noise value to its texture attribute.

[0013] Furthermore, the step A is specifically as follows:

[0014] For each point P in the texture space, calculate the distance from P to each feature point F i The distance D(P,F i ):

[0015]

[0016] Among them, P x ,P y , P zare the x-axis, y-axis and z-axis coordinates of point P respectively; F i,x , F i,y , F i,z They are the feature points F i The x-axis, y-axis, and z-axis coordinates.

[0017] Furthermore, the step B is specifically as follows:

[0018] Find the nearest feature point for each point P, use linear interpolation to calculate the noise value, and use it to normalize the distance value:

[0019]

[0020] Among them, d max is the maximum distance between point P and all feature points, d min is the minimum distance between point P and all feature points, d i From point P to the i-th feature point F i The distance value, f(d i ) is the distance from point P to the i-th feature point F i The normalized distance value of i )The normalized distance value can be used to determine the normalized texture coordinates of point P on the normalized noise texture map.

[0021] According to the above normalized texture coordinates, the original noise value noise of point P on the original noise texture map can be calculated.

[0022] Because the value range of the original noise value is relatively random, linear scaling is used to scale the original noise value noise to the target value range [a′, b′] required by this algorithm:

[0023]

[0024] Among them, maxNoise is the maximum value of the original noise, minNoise is the minimum value of the original noise, and scaleNoise is the scaled noise value that scales the original noise to the [a′, b′] interval.

[0025] The scaled noise value is mapped to the color, brightness, normal and roughness in its texture attributes and color corrected.

[0026] Furthermore, the method of deforming the natural convolution feature is:

[0027] Create a Bezier curve with multiple control points. Create a Bezier curve with multiple control points. The Bezier curve is a normalized two-dimensional curve, and its x-axis and y-axis value ranges are both between (0, 1); the coordinate origin represents the starting point of the deformation area, the value of the x-axis represents the distance from the starting point, and the distance range after normalization is between (0, 1); the value of the y-axis represents the deformation amplitude range, and the deformation amplitude range after normalization is between (0, 1). The shape of the Bezier curve is manually adjusted and customized by the user, and the curve shape can be uniquely determined: the position of the x distance from the starting point, and the deformation amplitude is the size of the y value;

[0028] First, an enumeration type Axis is declared outside the method. This enumeration type represents the three axes (x, y, z) of the three-dimensional space, indicating the axis direction in which the deformation occurs in the three-dimensional space. Then, a public variable named axis is defined inside the method and initialized to the x constant of the enumeration type Axis, indicating that the default axis is the x axis.

[0029] Define a local integer variable ax, which is the integer value of the above axis. The purpose is to determine the axis affected by the deformation and to be used for the subsequent calculation of the alpha parameter;

[0030] Multiply the vertices to be transformed by a transformation matrix and transform the coordinate system; as follows:

[0031] result.x=m00*point.x+m01*point.y+m02*point.z+m03;

[0032] result.y=m10*point.x+m11*point.y+m12*point.z+m13;

[0033] result.z=m20*point.x+m21*point.y+m22*point.z+m23;

[0034] x, y, z represent the three axes of the three-dimensional space respectively, result.x, result.y, result.z are used to store the results of the transformation, point.x, point.y, point.z represent the values ​​of the point in the x, y, z directions, and the following custom variables: m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23 represent a 3×4 transformation matrix, as follows:

[0035]

[0036] For each vertex that needs to be deformed, do:

[0037] Define the three-dimensional coordinate variables origin and size, where origin represents the origin of the deformation area, which is used to define the starting position of the deformation area in the three-dimensional space. All deformations are calculated based on this origin. Secondly, size represents the range of the three axes affected by the deformation. The deformation area refers to the three-dimensional space range with origin as the origin and size as the length, width and height. Normalize the three-dimensional vertex coordinates in the above size area, and map the vertex position to the standardized (or normalized) range of the above curve area;

[0038] Calculate the normalized x-axis coordinates of the three-dimensional vertices on the above two-dimensional curve;

[0039] Calculate the normalized position parameter alpha of point p on the x-axis relative to the bounding box box:

[0040]

[0041] Box is a three-dimensional bounding box of the deformation area with origin as the starting point and size as the length, width and height. Since the length, width and height represented by size may contain negative values, after being converted to the box bounding box, box.min represents the minimum coordinate value of the bounding box, and box.max represents the maximum coordinate value of the bounding box. Therefore, box actually represents a rectangular deformation area range with positively increasing coordinate values.

[0042] ax can take values ​​of 0, 1, or 2, so p[ax] corresponds to the x, y, and z coordinates of vertex p, respectively. Assume that the default value of ax is 0, that is, when the deformation occurs in the x-axis direction, p[ax] represents the coordinate of point p on the x-axis, box.min[ax] represents the minimum value of the bounding box box on the x-axis, and size[ax] represents the size of the bounding box box on the x-axis;

[0043] Finally, the standardized position parameter value alpha is obtained; the standardized position parameter value alpha can be interpolated on the curve to obtain the deformation amplitude value;

[0044] The parameters are interpolated through the above curve and multiplied by the weight value to get the final deformation amplitude a:

[0045] a=curve.Evaluate(α)×weight

[0046] Among them, variable a is the deformation amplitude, which is used for subsequent calculation of vertex position adjustment; curve.Evaluate(α): interpolation calculation curve deformation amplitude value at normalized position α. ​​weight: weight of the curve, used to adjust the deformation amplitude ratio; for example, if weight is equal to 2, the overall deformation amplitude is magnified by 2 times.

[0047] Finally, select the corresponding processing method according to the different deformation influence types. The deformation influence types are divided into seven cases (x, y, z, xy, xz, yz, xyz) according to the axial direction and processed separately. The specific methods are as follows:

[0048] According to different vertices p, scale them along the corresponding axis:

[0049] pm×=1.0f+(a×crv.sclamount.m)

[0050] According to different point tops p, the corresponding axial offset is performed:

[0051] pm=p.m+a×crv.offamount.m

[0052] An enumeration type Affect is declared outside the method, which represents the axes (x, y, z, xy, xz, yz, xyz) that may be involved in vertex deformation. These values ​​indicate that the x, y, z axes may be affected, or the xy, xz, yz, xyz axes may be affected at the same time;

[0053] For vertex p, select the corresponding m∈[x,y,z,xy,xz,yz,xyz] according to its deformation type, where pm is the coordinate of p on the m-axis, sclamount.m is the scaling amount of the curve crv on the m-axis, and offamount.m is the offset of the curve crv on the m-axis;

[0054] After scaling and offsetting each vertex p on the curve, all p are finally transposed and the deformed coordinate results are returned:

[0055] return invtm.MultiplyPoint3x4(p)

[0056] Where invtm is an inverse transpose matrix. The result is to apply the transformation represented by the inverse transpose matrix to the vertex p to obtain a new point, that is, the deformed point.

[0057] All points that need to be deformed are traversed frame by frame to obtain the cigar deformation process and results.

[0058] Furthermore, the three-dimensional model includes geometry, vertex attributes and texture coordinates, wherein the geometry defines the shape and structure of the product, including vertices, edges and faces; the vertex attributes include vertex positions, which are the coordinates (x, y, z) of the vertex in three-dimensional space; and the texture coordinates are used to map the two-dimensional texture to the surface of the three-dimensional model.

[0059] The virtual deformation simulation system based on the natural convolution characteristics of plant material surface includes:

[0060] A three-dimensional model building module is used to build a three-dimensional model of each part of the product according to the scanned entity of the plant material surface product, determine the number of vertices, edges and faces of the three-dimensional model, build a cigar white mold with triangular faces, and reset the coordinates of the model in the three-dimensional space;

[0061] The noise texture assignment module is used to perform UV mapping on the coordinates of the cigar white mold in three-dimensional space, create materials based on the product entity, and assign noise textures;

[0062] The deformation calculation module is used to realize the material and noise texture UV mapping of the complete model in three-dimensional space, and to deform the product with natural convolution features.

[0063] Furthermore, the noise texture allocation module specifically includes:

[0064] A distance calculation unit, used for randomly distributing feature points in the texture space according to the deformation conditions, and calculating the distance from each deformation point to the feature point according to the Euclidean distance formula;

[0065] The noise scaling and texture mapping unit is used to find the nearest feature point of each deformation point, calculate the noise value using linear interpolation, scale the noise value to the target range using linear scaling, and map the scaled noise value to its texture attribute.

[0066] Furthermore, the deformation calculation module specifically includes:

[0067] A vertex coordinate conversion unit is used to create a Bezier curve containing multiple control points, determine the deformation range, multiply the vertices that need to be transformed within the deformation range by a transformation matrix, and convert the coordinate system;

[0068] The deformation processing unit is used to traverse all deformation vertices for normalization, map all points into the normalized area, and execute:

[0069] For the points in the restricted area, adjust the vertex position and normalize the normalized parameter of the vertex position on the curve to the range of 0 to 1;

[0070] Then perform curve interpolation and multiply by the weight to get the deformed point.

[0071] A computer storage medium stores a computer program, which, when executed by a processor, implements the virtual deformation simulation method based on the natural convolution characteristics of the plant material surface.

[0072] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0073] (1) The present invention combines free deformation technology and noise texture to achieve natural convolution of cigar binder and wrapper, while also enhancing the texture quality and visual effect of the model after deformation.

[0074] (2) The present invention optimizes the separately moving control point method of the traditional free deformation technology. The wave-like deformation method based on free deformation ensures the authenticity of natural convolution and avoids the strange situations that may be caused when the algorithm deforms vertices at the boundary values. It also solves the problem of unnatural texture caused by improper frequency and amplitude of noise texture during the deformation process.

[0075] (3) The present invention can be applied to virtual reality, computer-aided design, simulation and other fields to provide users with a simulation experience that conforms to the natural convolution of the surface of plant materials. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 Flowchart of the natural convolution algorithm for cigars;

[0077] Figure 2 This is a cigar wrapper effect diagram based on virtual deformation simulation of the natural convolution characteristics of the cigar;

[0078] Figure 3 This is a diagram of the effect of the virtual deformation simulation of the cigar's natural convolution characteristics;

[0079] Figure 4 This is the wrapper effect without noise texture processing;

[0080] Figure 5 This is the effect of the binder without noise texture processing;

[0081] Figure 6 A Bezier curve that controls the deformation range and amplitude. DETAILED DESCRIPTION

[0082] The present invention is further described in detail below in conjunction with examples, but the embodiments of the present invention are not limited thereto.

[0083] Embodiment 1:

[0084] Combined with Figure 1 As shown, a virtual deformation simulation method based on natural convolution characteristics of plant material surface includes:

[0085] Scan the entity of the plant material surface product (taking cigars as an example), build a cigar 3D model, determine the number of vertices, edges, and faces of the cigar 3D model, build a cigar white mold with triangular faces, and reset the coordinates of the model in 3D space; the cigar 3D model includes: geometry; vertex attributes; the geometry includes vertices (Vertices), edges (Edges) and faces (Faces), which define the basic shape and structure of the cigar. Vertex attributes include vertex position (Position): the coordinates of the vertex in 3D space (x, y, z), which provide the basic shape for the subsequent virtual deformation simulation. In addition, it also includes texture coordinates (Texture Coordinates): also known as UV coordinates, which are used to map 2D textures to the surface of the 3D model, and provide basic coordinates for the subsequent noise texture allocation. Noise texture includes: simulated cigar surface texture and details, including cigar wrapper, binder, cigar core, and tobacco leaves.

[0086] The coordinates of the cigar white mold in three-dimensional space are mapped, and materials are created and noise textures are assigned based on the product entity; after the mapping is completed, the realism of the simulation results is increased.

[0087] After realizing the material and noise texture of the complete cigar model in three-dimensional space, the product is deformed by the natural convolution features according to the predefined natural convolution algorithm.

[0088] Furthermore, the method of mapping the coordinates of the cigar white mold in the three-dimensional space, creating a material according to the entity of the product and assigning a noise texture is as follows:

[0089] A. Randomly distribute feature points in the texture space according to the deformation situation, and calculate the distance from each deformation point to the feature point according to the Euclidean distance formula;

[0090] B. Find the nearest feature point to each deformation point, calculate the noise value using linear interpolation, scale the noise value to the target range using linear scaling, and map the scaled noise value to its texture attribute.

[0091] Furthermore, the step A is specifically as follows:

[0092] For each point P in the texture space, calculate the distance from P to each feature point F i The distance D(P,F i ):

[0093]

[0094] Furthermore, the step B is specifically as follows:

[0095] Find the nearest feature point for each point, use linear interpolation to calculate the noise value, and use it to normalize the distance value:

[0096]

[0097] Use linear scaling to scale the original noise value noise to the target range [a, b]:

[0098]

[0099] The scaled noise value is mapped to the color, brightness, normal and roughness in its texture attributes and color corrected.

[0100] Furthermore, after realizing the material and noise texture of the complete cigar model in three-dimensional space, the method of deforming the product with natural convolution features is as follows:

[0101] Create a Bezier curve with multiple control points. The Bezier curve is a normalized two-dimensional curve, and its x-axis and y-axis value ranges are both between (0, 1). The origin of the coordinate represents the starting point of the deformation area, and the value of the x-axis represents the distance from the starting point. The distance range after normalization is between (0, 1). The value of the y-axis represents the deformation amplitude range. The deformation amplitude range after normalization is between (0, 1). The shape of the Bezier curve is manually adjusted and customized by the user. The shape of the curve can be uniquely determined by: the position of the x distance from the starting point, and the deformation amplitude is the size of the y value.

[0102] First, an enumeration type Axis is declared outside the method, which represents the three axes (x, y, z) of the three-dimensional space. Then a public variable named axis is defined inside the method and initialized to the x constant of the enumeration type Axis, indicating that the default axis is the x axis;

[0103] Assign the above axis to ax for subsequent calculation of alpha parameters;

[0104] Multiply the vertices to be transformed by a transformation matrix and convert the coordinate system; a 3×4 matrix is ​​used here.

[0105] result.x=m00*point.x+m01*point.y+m02*point.z+m03;

[0106] result.y=m10*point.x+m11*point.y+m12*point.z+m13;

[0107] result.z=m20*point.x+m21*point.y+m22*point.z+m23;

[0108] x, y, z represent the three axes of the three-dimensional space respectively, result.x, result.y, result.z are used to store the results of the transformation, point.x, point.y, point.z represent the values ​​of the point in the x, y, z directions, and the following custom variables: m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23 represent a 3×4 transformation matrix, as follows:

[0109]

[0110] For each vertex that needs to be deformed, do:

[0111] Define the three-dimensional coordinate variables origin and size, where origin represents the origin of the deformation area, which is used to define the starting position of the deformation area in the three-dimensional space. All deformations are calculated based on this origin. Secondly, size represents the range of the three axes affected by the deformation. The deformation area refers to the three-dimensional space range with origin as the origin and size as the length, width and height. Normalize the three-dimensional vertex coordinates in the above size area, and map the vertex position to the standardized (or normalized) range of the above curve area;

[0112] Calculate the normalized x-axis coordinates of the three-dimensional vertices on the above two-dimensional curve;

[0113] Calculate the normalized position parameter alpha of point p on the x-axis relative to the bounding box box:

[0114]

[0115] Box is a three-dimensional bounding box of the deformation area with origin as the starting point and size as the length, width and height. Since the length, width and height represented by size may contain negative values, after being converted to the box bounding box, box.min represents the minimum coordinate value of the bounding box, and box.max represents the maximum coordinate value of the bounding box. Therefore, box actually represents a rectangular deformation area range with positively increasing coordinate values.

[0116] ax can take values ​​of 0, 1, or 2, so p[ax] corresponds to the x, y, and z coordinates of vertex p, respectively. Assume that the default value of ax is 0, that is, when the deformation occurs in the x-axis direction, p[ax] represents the coordinate of point p on the x-axis, box.min[ax] represents the minimum value of the bounding box box on the x-axis, and size[ax] represents the size of the bounding box box on the x-axis;

[0117] The parameters are interpolated through the above curve and multiplied by the weight value to get the final deformation amplitude a:

[0118] a=crv.curve.Evaluate(α)×crv.weight

[0119] Among them, variable a is the deformation amplitude, which is used for subsequent calculation of vertex position adjustment; curve.Evaluate(α): interpolation calculation curve deformation amplitude value at normalized position α. ​​weight: weight of the curve, used to adjust the deformation amplitude ratio; for example, if weight is equal to 2, the overall deformation amplitude is magnified by 2 times.

[0120] Finally, select the corresponding processing method according to the different deformation influence types. The deformation influence types are divided into seven cases (x, y, z, xy, xz, yz, xyz) according to the axial direction and processed separately. The specific methods are as follows:

[0121] According to different points p, the corresponding axial scaling is performed:

[0122] pm×=1.0f+(a×crv.sclamount.m)

[0123] According to different points p, the corresponding axial offset is performed:

[0124] pm=p.m+a×crv.offamount.m

[0125] An enumeration type Affect is declared outside the method, which represents the axes (x, y, z, xy, xz, yz, xyz) that may be involved in vertex deformation. These values ​​indicate that the x, y, z axes may be affected, or the xy, xz, yz, xyz axes may be affected at the same time;

[0126] For vertex p, select the corresponding m∈[x,y,z,xy,xz,yz,xyz] according to its deformation type, where pm is the coordinate of p on the m-axis, sclamount.m is the scaling amount of the curve crv on the m-axis, and offamount.m is the offset of the curve crv on the m-axis;

[0127] After scaling and offsetting each point p on the curve, all p are finally transposed and the deformed coordinate results are returned:

[0128] return invtm.MultiplyPoint3x4(p)

[0129] Where invtm is an inverse transpose matrix. The result is to apply the transformation represented by the inverse transpose matrix to point p to obtain a new point, that is, the deformed point.

[0130] All points that need to be deformed are traversed frame by frame to obtain the cigar deformation process and results.

[0131] The present invention is a method for virtual deformation of natural convolution features in the cigar making process. The cigar is placed in a three-dimensional scene, and the internal structure of the cigar is opened and closed by manual sliding or clicking to realize the natural convolution of the cigar. The method of moving the control point separately in the traditional free deformation technology is optimized. The wave deformation method based on free deformation ensures the authenticity of the natural convolution and avoids the singularity that may be caused by the algorithm when performing vertex deformation at the boundary value; the problem of unnatural texture caused by improper frequency and amplitude of noise texture in the deformation process is solved.

[0132] like Figure 2 As shown in the virtual deformation simulation of the cigar wrapper based on the natural convolution characteristics, it can be seen that the texture of the cigar wrapper is delicate and smooth during and after the deformation, and the deformation is smooth, which conforms to the natural convolution characteristics of the cigar.

[0133] like Figure 3 As shown in the effect diagram of the virtual deformation simulation based on natural convolution features, it can be seen that, similar to the cigar wrapper, the binder is darker in color and has a different texture, but the algorithm of the present invention can still achieve a smooth transition during the deformation process.

[0134] Figure 4 This is the effect of the wrapper without noise texture. Due to the deformation of the wrapper, the frequency of the noise value is offset, resulting in uneven changes and discontinuity of the image.

[0135] Figure 5 This is the effect picture of the binder without processed noise texture. Similar to the wrapper, the noise value range is not adjusted correctly and the local texture features are over-enhanced, resulting in blurred and distorted texture.

[0136] Figure 6 A Bezier curve that controls the deformation range and deformation amplitude. The curve can be adjusted and customized by the user. The x-axis represents the normalized deformation area range, and the y-axis represents the amplitude value of the deformation effect.

[0137] Depend on Figure 2 and Figure 4 contrast, Figure 3 and Figure 5 By comparison, it can be seen that the present invention combines free deformation technology and noise texture to achieve natural convolution of cigar binder and wrapper, while also enhancing the texture quality and visual effect of the model after deformation.

[0138] Embodiment 2:

[0139] The virtual deformation simulation system based on the natural convolution characteristics of plant material surface includes:

[0140] A three-dimensional model building module is used to build a three-dimensional model of each part of the product according to the scanned entity of the plant material surface product, determine the number of vertices, edges and faces of the three-dimensional model, build a cigar white mold with triangular faces, and reset the coordinates of the model in the three-dimensional space;

[0141] The noise texture assignment module is used to map the coordinates of the cigar white mold in three-dimensional space, create materials according to the entity of the product and assign noise textures;

[0142] The deformation calculation module is used to deform the product with natural convolution features after realizing the material and noise texture of the complete cigar model in three-dimensional space.

[0143] Furthermore, the noise texture allocation module specifically includes:

[0144] A distance calculation unit, used for randomly distributing feature points in the texture space according to the deformation conditions, and calculating the distance from each deformation point to the feature point according to the Euclidean distance formula;

[0145] The noise scaling and texture mapping unit is used to find the nearest feature point of each deformation point, calculate the noise value using linear interpolation, scale the noise value to the target range using linear scaling, and map the scaled noise value to its texture attribute.

[0146] Furthermore, the deformation calculation module specifically includes:

[0147] The vertex coordinate conversion unit is used to create an animation curve consisting of two key frames, determine the deformation range, multiply the vertices to be transformed within the deformation range by a transformation matrix, and convert the coordinate system;

[0148] The deformation processing unit is used to traverse all deformed vertices for normalization, convert all points into the standard area, and perform:

[0149] For the points in the restricted area, the vertex position is adjusted and the normalization parameter of the vertex position on the curve is standardized to the range of 0.5 to 1;

[0150] For points not in the restricted area, the normalized parameters of the vertex position on the curve are normalized to the range of 0 to 1;

[0151] The curve is then evaluated, multiplied by the weight, and the deformed point is obtained.

[0152] A computer storage medium stores a computer program, which, when executed by a processor, implements the virtual deformation simulation method based on the natural convolution characteristics of the plant material surface.

[0153] Although the present invention is described herein with reference to the illustrative embodiments of the present invention, the above embodiments are only preferred embodiments of the present invention, and the embodiments of the present invention are not limited to the above embodiments. It should be understood that those skilled in the art can design many other modifications and embodiments, which will fall within the scope and spirit of the principles disclosed in this application.

Claims

1. A virtual deformation simulation method based on the natural convolution characteristics of plant material surface, characterized in that: include: Scan the entity of the product on the surface of plant material, build a three-dimensional model of each part of the product, determine the number of vertices, edges and faces of the three-dimensional model, build a cigar white mold with triangular faces, and reset the coordinates of the cigar white mold in three-dimensional space; The created surface material and noise texture are mapped to the coordinates of the cigar white model in three-dimensional space, thereby generating a complete model with material, i.e., a cigar geometric model; the created surface material includes parameters defining material properties, which are used to define the surface appearance and optical characteristics of the three-dimensional model; the noise texture is an image applied to the surface of the three-dimensional model to achieve complex details and surface features; Map the UV coordinates of the material and noise texture to the coordinates of the cigar geometric model in three-dimensional space, and convert the vertex coordinates of the cigar geometric model into texture coordinates to ensure that the material and texture can accurately cover the surface of the cigar white mold; After realizing the UV coordinate mapping of the cigar geometry model, material, and noise texture, the natural convolution feature deformation is performed.

2. The virtual deformation simulation method based on the natural convolution characteristics of plant material surface according to claim 1 is characterized in that: The method for performing UV coordinate mapping of material and noise texture on the coordinates of the cigar geometric model in three-dimensional space is as follows: A. Randomly distribute feature points in the texture space according to the deformation situation, and calculate the distance from each deformation point to the feature point according to the Euclidean distance formula; B. Find the nearest feature point to each deformation point, calculate the noise value using linear interpolation, scale the noise value to the target range using linear scaling, and map the scaled noise value to its texture attribute.

3. The virtual deformation simulation method based on the natural convolution characteristics of plant material surface according to claim 2 is characterized in that: The step A is specifically as follows: For each point P in the texture space, calculate the distance from P to each feature point F i The distance D(P,F i ): Among them, P x ,P y , P z are the x-axis, y-axis and z-axis coordinates of point P respectively; F i,x , F i,y , F i,z They are the feature points F i The x-axis, y-axis, and z-axis coordinates.

4. The virtual deformation simulation method based on the natural convolution characteristics of plant material surface according to claim 3 is characterized in that: The step B is specifically as follows: Find the nearest feature point for each point P, use linear interpolation to calculate the noise value, and use it to normalize the distance value: Among them, d max is the maximum distance between point P and all feature points, d min is the minimum distance between point P and all feature points, d i From point P to the i-th feature point F i The distance value, f(d i ) is the distance from point P to the i-th feature point F i Normalized distance value; According to f(d i ) normalized distance value, which can determine the normalized texture coordinates of point P on the normalized noise texture map; According to the above normalized texture coordinates, the original noise value noise of point P on the original noise texture map is calculated; Because the value range of the original noise value is relatively random, linear scaling is used to scale the original noise value noise to the target value range [a′, b′] required by this algorithm: Among them, maxNoise is the maximum value of the original noise, minNoise is the minimum value of the original noise, and scaleNoise is the scaled noise value that scales the original noise to the interval [a′, b′]. The scaled noise value is mapped to the color, brightness, normal and roughness in its texture attributes and color corrected.

5. The virtual deformation simulation method based on the natural convolution characteristics of plant material surface according to any one of claims 1 to 4, characterized in that: The method of deformation of the natural convolution feature is: Create a Bezier curve containing multiple control points. The Bezier curve is a normalized two-dimensional curve whose x-axis and y-axis value ranges are both between (0, 1); The origin of the coordinate represents the starting point of the deformation area, the value of the x-axis represents the distance from the starting point, and the distance range after normalization is between (0, 1); the value of the y-axis represents the deformation amplitude range, and the deformation amplitude range after normalization is between (0, 1). The shape of the Bezier curve is manually adjusted and customized by the user. The shape of the Bezier curve can be uniquely determined: the position of the x distance from the starting point, and the deformation amplitude is the size of the y value; Declare an enumeration type Axis outside the method, which represents the three axes (x, y, z) of the three-dimensional space; then define a public variable named axis inside the method and initialize it to the x constant of the enumeration type Axis, indicating that the default deformation axis is the x axis; Define a local integer variable ax, which is the integer value of the above axis. The purpose is to determine the axis affected by the deformation and to be used for the subsequent calculation of the alpha parameter; Next, multiply the three-dimensional vertices that need to be transformed by a transformation matrix and transform the coordinate system; For the vertices of the 3D model that need to be deformed, execute: Define the three-dimensional coordinate variables origin and size, where origin represents the origin of the deformation area, which is used to define the starting position of the deformation area in the three-dimensional space. All deformations are calculated based on this origin. Secondly, size represents the range of the three axes affected by the deformation. The deformation area refers to the three-dimensional space range with origin as the origin and size as the length, width and height. Normalize the three-dimensional vertex coordinates in the above size area, and map the vertex position to the standardized or normalized range of the above Bezier curve area. Calculate the normalized x-axis coordinates of the three-dimensional vertices on the above Bezier curve; Calculate the normalized position parameter alpha of vertex p relative to the bounding box box on the x-axis of the curve: Box is a three-dimensional bounding box of the deformation area with origin as the starting point and size as the length, width and height. Since the length, width and height represented by size may contain negative values, after being converted to a box bounding box, box.min represents the minimum coordinate value of the bounding box, and box.max represents the maximum coordinate value of the bounding box. Therefore, box actually represents a rectangular deformation area range with positively increasing coordinate values; ax takes values ​​of 0, 1, and 2, and p[ax] corresponds to the x, y, and z coordinate values ​​of vertex p, respectively. It is assumed that the default value of ax is 0, that is, when the deformation occurs in the x-axis direction, p[ax] represents the coordinate of vertex p on the x-axis, box.min[ax] represents the minimum value of the bounding box box on the x-axis, and size[ax] represents the size of the bounding box box on the x-axis. Finally, the standardized position parameter value alpha is obtained; The position parameter value alpha is interpolated on the curve and multiplied by the weight to obtain the final deformation amplitude a: a=curve.Evaluate(α)×weight Among them, a is used for the subsequent calculation of vertex position adjustment; curve.Evaluate(α) is the deformation amplitude value of the interpolation curve at the normalized position α; weight is the weight of the curve, which is used to adjust the deformation amplitude ratio; According to the deformation influence type, the corresponding axial vertex shrinkage and offset are performed. The transformation is represented by the inverse transposition matrix. The result is the coordinates of the deformed vertex, which specifically includes: Select the corresponding processing method according to the different deformation influence types. The deformation influence types are divided into seven cases (x, y, z, xy, xz, yz, xyz) according to the axial direction, and are processed separately. The specific methods are as follows: According to different vertices p, scale them along the corresponding axis: pm×=1.0f+(a×crv.sclamount.m) According to different vertices p, the corresponding axial offset is performed: pm=p.m+a×crv.offamount.m An enumeration type Affect is declared outside the method. This enumeration type represents the axes (x, y, z, xy, xz, yz, xyz) that may be involved in vertex deformation. These values ​​​​respectively affect the x, y, and z axes, or affect the xy, xz, yz, and xyz axes at the same time; For vertex p, select the corresponding m∈[x,y,z,xy,xz,yz,xyz] according to its deformation type, where pm is the coordinate of vertex p on the m-axis, sclamount.m is the scaling amount of curve crv on the m-axis, and offamount.m is the offset of curve crv on the m-axis; After scaling and offsetting each vertex p, all vertices p are finally transposed and the transformed coordinates are returned: return invtm.MultiplyPoint3x4(p) Where invtm is an inverse transpose matrix. The result is to apply the transformation represented by the inverse transpose matrix to the vertex p to obtain a new vertex, that is, the deformed point. All points that need to be deformed are traversed frame by frame to obtain the cigar deformation process and results.

6. The virtual deformation simulation method based on the natural convolution characteristics of plant material surface according to claim 1 is characterized in that: The three-dimensional model includes geometry, vertex attributes and texture coordinates. The geometry defines the shape and structure of the product, including vertices, edges and faces; the vertex attributes include vertex positions, which are the coordinates (x, y, z) of the vertex in three-dimensional space; and the texture coordinates are used to map two-dimensional textures to the surface of the three-dimensional model.

7. A virtual deformation simulation system based on the natural convolution characteristics of plant material surface, characterized in that: include: A three-dimensional model building module is used to build a three-dimensional model of each part of the product according to the scanned entity of the plant material surface product, determine the number of vertices, edges, and faces of the three-dimensional model, build a cigar white mold with triangular faces, and reset the coordinates of the cigar white mold in three-dimensional space; The noise texture assignment module is used to perform UV mapping on the coordinates of the cigar white mold in three-dimensional space, create materials based on the product entity, and assign noise textures; The deformation calculation module is used to deform the product with natural convolution features after realizing the material and noise texture UV mapping of the cigar model in three-dimensional space.

8. The virtual deformation simulation system based on the natural convolution characteristics of plant material surface according to claim 7 is characterized in that: The noise texture allocation module specifically includes: A distance calculation unit, used for randomly distributing feature points in the texture space according to the deformation conditions, and calculating the distance from each deformation point to the feature point according to the Euclidean distance formula; The noise scaling and texture mapping unit is used to find the nearest feature point of each deformation point, calculate the noise value using linear interpolation, scale the noise value to the target range using linear scaling, and map the scaled noise value to its texture attribute.

9. The virtual deformation simulation system based on the natural convolution characteristics of plant material surface according to claim 7, characterized in that: The deformation calculation module specifically includes: A vertex coordinate conversion unit is used to create a Bezier curve containing multiple control points, determine the deformation range, multiply the vertices to be transformed within the deformation range by a transformation matrix, and convert the coordinate system; The deformation processing unit is used to traverse all deformed vertices for normalization, map all points into the normalized area, and perform: For the points in the restricted area, adjust the vertex position and normalize the normalized parameter of the vertex position on the curve to the range of 0 to 1; The curve is then evaluated, multiplied by the weight, and the deformed point is obtained.

10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the virtual deformation simulation method based on the natural convolution characteristics of the plant material surface as described in any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Three-dimensional model deformation simulation method and device and storage medium

    CN120372894A

  • Method for reconstructing tree-root plant fiber root three-dimensional vector configuration based on fractal rule

    CN120526087A

  • A method for reconstructing the three-dimensional vector configuration of dendritic plant fiber roots based on fractal rules

    CN120526087B