CN116843862B - Three-dimensional thin-wall model grid surface texture synthesis method - Google Patents

Three-dimensional thin-wall model grid surface texture synthesis method Download PDF

Info

Publication number
CN116843862B
CN116843862B CN202311094254.XA CN202311094254A CN116843862B CN 116843862 B CN116843862 B CN 116843862B CN 202311094254 A CN202311094254 A CN 202311094254A CN 116843862 B CN116843862 B CN 116843862B
Authority
CN
China
Prior art keywords
texture
wall model
thin
neighborhood
vertex
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311094254.XA
Other languages
Chinese (zh)
Other versions
CN116843862A (en
Inventor
李锋
刘朋
黄加涛
童亚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Biying Biotechnology Co ltd
Original Assignee
Wuhan Biying Biotechnology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Biying Biotechnology Co ltd filed Critical Wuhan Biying Biotechnology Co ltd
Priority to CN202311094254.XA priority Critical patent/CN116843862B/en
Publication of CN116843862A publication Critical patent/CN116843862A/en
Application granted granted Critical
Publication of CN116843862B publication Critical patent/CN116843862B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/10Additive manufacturing, e.g. 3D printing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data

Abstract

The invention relates to a three-dimensional thin-wall model grid surface texture synthesis method, which carries out classification research on a built texture element plane grid, researches a voxel-based grid vertex downsampling texture synthesis algorithm aiming at a built single texture element plane grid, and realizes the synthesis of a single texture element on the thin-wall model surface; aiming at the created multi-element texture element plane grid, a multi-element texture element synthesis algorithm based on discrete element textures is researched, and the synthesis of multi-element texture elements on the surface of the thin-wall model is realized. And mapping the texture element unit to the surface of the thin-wall model according to the initial position of the thin-wall model and the attribute information thereof, so as to prepare for subsequent light-weight research. The effectiveness and accuracy of the algorithm are verified by using the elbow, write and root brace examples, and the result shows that the algorithm is stable, and the synthetic effect of the surface texture elements of the brace model meets the expectations.

Description

Three-dimensional thin-wall model grid surface texture synthesis method
Technical Field
The invention relates to the field of three-dimensional model construction, in particular to a three-dimensional thin-wall model grid surface texture synthesis method.
Background
Along with the continuous development of three-dimensional printing manufacturing technology, people have increasingly high requirements on energy conservation, consumption reduction and rapid manufacturing, and light-weight structures aiming at weight reduction and high performance are receiving more attention. Because the three-dimensional model has large data and long transmission time, the three-dimensional model is displayed in a visual interface in a clamping way, so that the three-dimensional model needs to be subjected to light weight treatment.
The current generation method of the lightweight structure based on the three-dimensional printing technology mainly comprises the following two types: the first is the design of a lightweight structure using geometric solid modeling of the model prior to slicing, such as designing a complex hole or truss structure inside the model. The second type is scan path planning of the model after slicing, and printing of the lightweight structure is achieved by filling regular mesh paths (such as honeycomb scan paths, diamond scan paths and fractal scan paths) inside the slicing layer. The first type of method is complex to implement and is only suitable for part of three-dimensional printing processes. For the second type of method, when the unit step length of the fractal curve is large, wires on adjacent paths are not overlapped with each other, and the strength of the printed model is low.
Disclosure of Invention
Aiming at the technical problems in the prior art, the invention provides a three-dimensional thin-wall model grid surface texture synthesis method, which is used for constructing a three-dimensional thin-wall model with a porous structure to carry out light-weight treatment, removing redundant materials of the model and effectively reducing the use of 3D printing consumables. Comprising the following steps:
step 1, obtaining a three-dimensional thin-wall model to be processed and a texture element plane grid created by a user;
step 2, when the texture element is a single texture element, adopting a voxel grid vertex downsampling method to downsample the vertex of the three-dimensional thin-wall model, and taking a sampling point as an initialization position of the texture element on the three-dimensional thin-wall model; when the texture elements are multi-element texture elements, the multi-element texture elements are subjected to point aggregation, connected domains of point sets are established, a sample texture synthesis algorithm based on discrete element textures is adopted, and the initialization positions of the point sets on the three-dimensional thin-wall model are determined according to neighborhood information of the point sets, so that the initial synthesis positions of the multi-element texture elements are obtained;
step 3, respectively creating a single texture element distribution function and a multi-element texture element distribution function for measuring the distribution quality of the texture elements;
Step 4, transforming the texture elements to tangential planes of the initialization positions corresponding to the three-dimensional thin-wall model through matrix space posture transformation; along a normal vector to the tangent plane, a set of vertices of a texture element is projected onto the three-dimensional thin-wall model surface.
The invention provides a three-dimensional thin-wall model grid surface texture synthesis method, which is used for creating a textured element plane grid with attractive appearance and preprocessing. Classifying and researching the created texture element plane grid, researching a voxel-based grid vertex downsampling texture synthesis algorithm aiming at the created single texture element plane grid, and realizing the synthesis of the single texture element on the surface of the thin-wall model; aiming at the created multi-element texture element plane grid, a multi-element texture element synthesis algorithm based on discrete element textures is researched, and the synthesis of multi-element texture elements on the surface of the thin-wall model is realized. And mapping the texture element unit to the surface of the thin-wall model according to the initial position of the thin-wall model and the attribute information thereof, so as to prepare for subsequent light-weight research. The effectiveness and accuracy of the algorithm are verified by using the elbow, write and root brace examples, and the result shows that the algorithm is stable, and the synthetic effect of the surface texture elements of the brace model meets the expectations.
Drawings
FIG. 1 is a flowchart of a texture synthesis method based on voxel grid vertex downsampling according to an embodiment of the present invention;
fig. 2 (a) is a schematic diagram of a downsampling result of a three-dimensional thin-wall model when the sum of parameters 2R and S provided by the embodiment of the invention is 10 mm;
fig. 2 (b) is a schematic diagram of a downsampling result of a three-dimensional thin-wall model when the sum of parameters 2R and S provided by the embodiment of the invention is 16 mm;
fig. 3 (a) is a schematic diagram illustrating collision between texture elements according to an embodiment of the present invention;
fig. 3 (b) is a schematic diagram of an embodiment of the present invention for providing a texture element beyond a boundary;
FIG. 4 is a schematic diagram of adjacent voxels of a texel unit according to an embodiment of the present invention;
FIG. 5 is a flow chart of a method for synthesizing a multi-texture based on discrete element textures according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a Delaunay triangulation set-point connected domain provided by an embodiment of the present invention;
FIG. 7 is a flowchart of a multi-texture initial composition algorithm according to an embodiment of the present invention;
FIG. 8 (a) shows a center texel on a three-dimensional thin-wall model according to an embodiment of the present inventionAnd its neighborhoodSchematic of (2);
FIG. 8 (b) shows a center texel on a multi-texel planar grid according to an embodiment of the present inventionAnd its neighborhood->Schematic of (2);
fig. 8 (c) is a schematic diagram of n rounds of neighborhood matching results according to an embodiment of the present invention;
fig. 9 (a) is a schematic diagram of a multi-texture element planar grid according to an embodiment of the present invention;
fig. 9 (b) is a schematic diagram of a multi-element texture element synthesis result according to an embodiment of the present invention;
FIG. 10 is a flowchart of a texel unit spatial pose transformation algorithm according to an embodiment of the present invention;
FIG. 11 (a) is a schematic diagram of a triangular patch according to an embodiment of the present invention with a center point of a texture element on the patch;
FIG. 11 (b) is a schematic diagram of the center point position of the texture element on the triangular patch on the common side according to the embodiment of the present invention;
FIG. 11 (c) is a schematic diagram of a triangular patch according to an embodiment of the present invention with center points of texels positioned on a common vertex;
FIG. 12 is a schematic view of a vertex projection of a texel unit according to an embodiment of the present invention;
FIG. 13 (a) is a schematic diagram of an embodiment of the present invention before the adjacent triangular patches are not bonded;
Fig. 13 (b) is a schematic diagram of an embodiment of the present invention after the adjacent triangular patches are not bonded;
fig. 14 (a) is a schematic view of a circular planar grid according to an embodiment of the present invention;
fig. 14 (b) is a schematic diagram of an elbow model according to an embodiment of the present invention;
fig. 14 (c) is a schematic diagram of the surface synthesis result of a circular single textured element when r=3mm and s=4mm according to the embodiment of the present invention;
fig. 14 (d) is a schematic diagram of the surface synthesis result of a circular single textured element when r=3mm and s=10mm according to the embodiment of the present invention;
fig. 15 (a) is a schematic diagram of a square planar grid according to an embodiment of the present invention;
FIG. 15 (b) is a schematic diagram of a write model according to an embodiment of the present invention;
fig. 15 (c) is a schematic diagram showing the surface synthesis result of a square single textured element when r=3mm and s=4mm according to the embodiment of the present invention;
fig. 15 (d) is a schematic diagram of the surface synthesis result of a square single textured element when r=3mm and s=10mm according to the embodiment of the present invention;
fig. 16 (a) is a schematic diagram of a boot model provided by an embodiment of the present invention;
fig. 16 (b) is a schematic diagram of a surface synthesis result of a circular texture element of a boot model according to an embodiment of the present invention;
Fig. 16 (c) is a schematic diagram of a surface synthesis result of a square texture element of the boot model according to an embodiment of the present invention.
Detailed Description
The principles and features of the present invention are described below with reference to the drawings, the examples are illustrated for the purpose of illustrating the invention and are not to be construed as limiting the scope of the invention.
In order to realize the light weight of the three-dimensional thin-wall model and simultaneously have the attractive appearance of the three-dimensional thin-wall model, the thin-wall model with the porous structure of the pattern of the texture element is constructed by synthesizing the texture element on the surface of the thin-wall model, so that the attractive appearance of the thin-wall model is light. The invention carries out classification research on the plane grid of the texture element, and researches a texture synthesis algorithm based on voxel grid vertex downsampling aiming at a single texture element created by a user; aiming at the created multi-element texture elements, researching a multi-element texture synthesis algorithm based on discrete element textures; and (3) distributing the texture element units on the surface of the three-dimensional thin-wall model through a texture element mapping algorithm. And establishing a texture element unit distribution function for the structural target optimization work. Specifically, the method for synthesizing the surface texture of the three-dimensional thin-wall model grid provided by the invention comprises the following steps:
Step 1, obtaining a three-dimensional thin-wall model to be processed and a single texture element plane grid created by a user;
step 2, when the texture element is a single texture element, adopting a voxel grid vertex downsampling method to downsample the vertex of the three-dimensional thin-wall model, and taking a sampling point as an initialization position of the texture element on the three-dimensional thin-wall model; when the texture elements are multi-element texture elements, the multi-element texture elements are subjected to point aggregation, connected domains of point sets are established, a sample texture synthesis algorithm based on discrete element textures is adopted, and the initialization positions of the point sets on the three-dimensional thin-wall model are determined according to neighborhood information of the point sets, so that the initial synthesis positions of the multi-element texture elements are obtained;
step 3, respectively creating a single texture element distribution function and a multi-element texture element distribution function for measuring the distribution quality of the texture elements;
step 4, transforming the texture elements to tangential planes of the initialization positions corresponding to the three-dimensional thin-wall model through matrix space posture transformation; along a normal vector to the tangent plane, a set of vertices of a texture element is projected onto the three-dimensional thin-wall model surface.
Example 1
Aiming at the problem of light weight design by selecting a single texture element plane grid for a three-dimensional thin-wall model, the embodiment 1 of the invention provides an embodiment of a texture synthesis algorithm based on voxel grid vertex downsampling, wherein single texture elements are distributed on the surface of the thin-wall model grid, as shown in fig. 1, a flow chart of the texture synthesis method based on voxel grid vertex downsampling provided by the embodiment of the invention is shown in fig. 1, and the embodiment of the texture synthesis method based on voxel grid vertex downsampling comprises the following steps:
step 11, reading a single texture element plane grid created by a user, and acquiring information such as vertex sets and sizes of texture element units;
step 12, by voxel grid vertex downsampling, the distance between adjacent texture elements is maximized, uniform texture element unit distribution is created, and the initial position of the texture element unit distribution on the thin-wall model is determined.
Because the single texture element created by the user only comprises one point and does not have neighborhood information, the embodiment of the invention creates the initialization distribution of the single texture element by adopting a voxel grid vertex downsampling mode aiming at the initialization distribution problem of the single texture element.
In one possible embodiment, the voxel grid vertex downsampling is suitable for data compression of a large number of vertices prior to algorithmic processing, although less efficient than random downsampling, but does not destroy the original vertex geometry information while achieving vertex downsampling. Since the downsampling method is used for the thin-wall model, the original vertex geometric information is not easy to destroy, and therefore, the voxel grid vertex downsampling method is selected.
And reading the single texture element plane grid, obtaining a vertex set of the texture element unit, calculating the mass center of the vertex set, marking the mass center as a center point, and storing attribute information of marking the vertex set of the texture element as the center point. Calculating the radius R of the established circumscribed circle of the texture element, combining the spacing S of the circumscribed circle of the single texture element set by a user, adopting a voxel grid vertex downsampling method to downsample the vertexes of the three-dimensional thin-wall model, taking the sampling points as the initialized positions of the texture elements on the model, and establishing the initialized distribution of the single texture element units.
Step 201, creating an Axis alignment bounding box (Axis-aligned Bounding Box, AABB) Bound according to the length, width and height dimensions of the three-dimensional thin-wall model, wherein the bounding box Bound is represented by a minimum vertex pmin and a maximum vertex pmax of the three-dimensional thin-wall model, as shown in fig. 1:
(1)
Step 202, voxel division is performed on the long length, wide width and high of the bounding box Bound. As can be seen from the radius R of the circumscribed circle of the texel units and the set spacing S, the size of the small voxel grid is set to 2r+s in order to ensure uniform distribution of the single texel units. Taking the minimum values of the length, width and high size of the bounding box Bound, according to formula 2:
(2)
the bounding box Bound is divided into a long direction, a wide direction and a high direction respectively、/>、/>Voxels. The final bounding box Bound is divided into +.>Small voxels bijk, wherein +.>The indices of the small voxels bijk in the bounding box Bound length, width, height directions are shown, respectively. After division of the bounding box Bound, the method is performed according to formulas 3 and 4:
(3)
(4)
obtaining each small voxelMinimum vertex +.>And maximum vertex->X, y, and z represent three directions of length, width, and height, respectively.
Step 203, calculate each voxelThe vertices of the thin-walled model contained therein will be per voxel + ->In which the vertex closest to its centroid is stored as the sampling point. And traversing all voxels to obtain the sampled point set. As shown in (a) and (b) of FIG. 2, the three-dimensional thin-wall model has a length, width and height of 134X 85X 199mm, and 2R+S is respectively 10mm and 16mm were taken and subjected to voxel grid vertex downsampling test, and the points in (a) and (b) in fig. 2 represent sampled positions.
And step 13, detecting whether collision can occur between the texel units at the initialization position through the circumcircle of the texel units, and setting a threshold value to limit the minimum distance between adjacent texels.
Wherein, for the texture elements which collide, establishing an objective function which penalizes collision; to promote uniform distribution of texel units, a growing objective function is established, the size of the texels is adjusted, the texels are enlarged in the sparse distribution areas, and the texels are reduced in the dense distribution areas.
In the implementation, because local non-uniformity exists in the vertexes of the three-dimensional thin-wall model, in the process of downsampling the vertexes of the voxel grid, too few vertexes falling in small voxels may exist, and the screened sampling points are still far away from the centroid of the small voxels, so that two conditions are caused: (1) The adjacent sampling points are closer, and after the subsequent texture element pattern mapping, the texture element unit overlapping phenomenon occurs, as shown in (a) in fig. 3; (2) For a bordered three-dimensional thin-wall model, the sampling points are too close to the border, and the texel elements are beyond the border of the thin-wall model, as shown in fig. 3 (b), which will cause a breach of the model border during subsequent texel curve clipping. Therefore, the repulsive force model is used in the chapter, a punishment overlapping function is established, and detection is carried out through the radius of the circumscribed circle of the texture element unit, so that the problems are solved.
Step 211, for the overlap problem between texel units, if the texel unitAnd->Overlap occurs between them, then a 5 penalty function is built:
(5)
for the problem of texel elements exceeding the boundaries of the three-dimensional thin-wall model, then a penalty function of equation 6 is established:
(6)
wherein,and->Representing texel units +.>And->Is a radius of the circumscribed circle; />And->Representing texel units +.>And->Coordinate position on the thin-wall model; />Is the distance +.>The nearest boundary point coordinates;euclidean distance between texel element unit centers; />Is the euclidean distance between the center of the texel element unit and the nearest point on the boundary; />Is a safety factor limiting the lower distance limit.
The collision detection between texture element units adopts the following method: after the three-dimensional thin-wall model is subjected to voxel division, at most 26 small voxels are arranged around each small voxel and are directly adjacent to the small voxels, as shown in fig. 4. Because of the limitations of the small voxels in length, width and height, if a texel element in a small voxel collides with a texel element in another small voxel, the collision will only occur in 26 small voxels directly adjacent to the texel element. Therefore, for collision detection between texture element units, it is only necessary to detect whether a sampling point in each small voxel collides with a sampling point in a small voxel immediately adjacent to the sampling point.
Step 212, creating a growing objective function to adjust the size of the texture element, comprising: the texels are enlarged in the sparse distribution area and the texels are reduced in the dense distribution area.
And 14, creating a texture element initialization distribution function, measuring the distribution quality of a single texture element unit, ensuring the distribution quality of the texture element, and preparing for subsequent target optimization.
By the voxel grid vertex downsampling method, the initialization distribution of a single texture element is synthesized on the surface of the thin-wall model. To detect the composite quality of a single texture element, a distribution function of the single texture element is created and the distribution of the texture elements is adjusted in subsequent work.
The distribution function creates a more uniform distribution of texels by maximizing the distance between adjacent texel units.
In one possible embodiment, the process of creating a single texel initialization distribution function includes:
step 301, for center-to-center distances between texelsLess than a given neighborhood size->Is +.>And->Establishing a texel element rejection target:
(7)
wherein,is the center distance between texture elements +.>Weight factor of- >Set to 25% of the diagonal length of the thin-walled model bounding box.
Step 302, because of uneven distribution of vertices of the thin-wall model, there is no grid vertices in local small voxels, resulting in sparse distribution of texture elements in the region, creating a growth target for creating a more uniform distribution, and scaling the size of texture element units in the region
(8)
Wherein,representing texel element +.>Is used for the scaling parameters of (a).
Step 303, therefore, defining a texture synthesis algorithm texture element distribution function based on voxel grid vertex downsampling as
(9)
Example 2
Aiming at the problem of light-weight design by selecting a multi-element texture element plane grid for a three-dimensional thin-wall model, the embodiment 2 provided by the invention is an embodiment of a multi-element texture synthesis method based on discrete element textures, wherein multi-element texture elements are distributed on the surface of the thin-wall model grid, as shown in fig. 5, a flow chart of the multi-element texture synthesis method based on discrete element textures provided by the embodiment of the invention is shown, and in combination with fig. 5, the embodiment of the multi-element texture synthesis method based on discrete element textures comprises the following steps:
step 11', create a multi-element textured element planar grid.
And step 12', reading the multi-element texture element plane grid, obtaining a multi-element texture element unit top point set, and preprocessing. Calculating the mass center of the vertex set as the center point of the multi-element texture element unit, and storing the attribute information of the vertex set as the center point; each texture element unit is regarded as a point, the points are integrated into a multi-element texture element, and a connected domain of the point set is established;
In one possible embodiment, the creating of the connected domain of the multi-textured element includes:
step 201', reading boundary edges of the plane grid according to the multi-element texture element plane grid created by the user, and obtaining a closed curve set polyLine defining multi-element texture element units.
In step 202', the vertex sets of each texel unit can be obtained separately by closing the topological relations between the curves independently of each other.
Step 203', calculate the centroid of each set of texel vertices, denoted as the center point of the texel element unit. And defining index according to the storage sequence of the vertex set of the texture element unit, and recording the index and the vertex set as attribute information of the center point.
Step 204', triangulating the center point set according to the center point set of the multi-element textured element unit by adopting a Delaunay triangle splitting method, connecting adjacent center points, and creating connected domain information, as shown in fig. 6. All points directly connected with a certain central point form a ring neighborhood of the central point.
Step 13', adopting a sample texture synthesis algorithm based on discrete element textures, and determining the initial position of the point set on the thin-wall model according to the neighborhood information of the point set;
The multi-texture synthesis algorithm uses a growth initialization scheme to randomly select a point in the multi-texture element plane grid connected domain, copies the point and the neighborhood points around the point to any position of the thin-wall model except the boundary, and calculates the optimal neighborhood matching between the thin-wall model and the multi-texture element plane grid connected domain. Because the neighborhood information of the boundary points on the multi-element texture element plane grid and the thin-wall model is incomplete, the points on the boundary are not matched in the neighborhood matching process. And iteratively applying neighborhood matching, and finally, distributing the multi-element texture elements on the whole thin-wall model surface. As shown in fig. 7, in conjunction with fig. 7, it can be seen that in one possible embodiment, the process of obtaining the multi-texture element initialization synthesis position includes:
in the texture synthesis process, the center texture element on the multi-element texture element plane grid is recorded asIts neighborhood is marked->The method comprises the steps of carrying out a first treatment on the surface of the The center texel that has been copied to the thin-walled model is denoted +.>Its neighborhood is marked->. The multielement texture initialization synthesis algorithm specifically comprises the following steps:
step 211', reading connected domain information of a multi-element texture element plane grid;
Step 212' randomly selecting a point in the multi-textured element planar grid connected domainHereinafter referred to as the center point; copying the center point to a random position on the surface of the thin-wall model grid +.>Hereinafter referred to as the center position. And will center pointNeighborhood point of->Projecting to the surface of the thin-wall model grid;
step 213', select distance from center positionThe nearest neighbor point which is not matched is taken as the center position of the next neighbor matching +.>New center position +.>And the surrounding neighborhood thereof is optimally matched with the multi-element textured element connected domain, selecting the neighborhood with highest neighborhood information similarity in the multi-element texture elements to make up for the central position +.>Points of missing surrounding neighborhood;
step 214', performing collision detection on the newly added neighborhood points and the neighborhood points projected to the surface of the thin-wall model grid, and performing boundary collision detection on the newly added points and the boundary of the thin-wall model;
step 215', jumping back to step 213', until the surface of the thin-wall model is fully covered with the multi-element texture element, thereby completing the initialization synthesis of the multi-element texture element.
Wherein, in step 213', a neighborhood comparison method is used to measure the neighborhoodAnd->The matching degree between the two neighbors, namely comparing the differences in index numbers, distances and angles of all texel units in the two neighbors. Defining an error function based on the differences between the neighborhoods
(10)
A ring neighborhood is formedThe other texture elements are projected onto the surface of the thin-wall grid model, and the following conditions are required to be followed: (1) Textured element->The distance between the texture element and the texture element on the neighborhood is kept unchanged, and the texture element is calculated according to the geodesic distance; (2) At this location the degree of the angle between the texel in the neighborhood and the center texel remains constant. Comprising the following steps:
step 21301' in the best neighborhood matching procedure, to facilitate neighborhoodAnd->Metric between, center position +.>Is a ring neighborhood of->Projection to the position of +.>On a tangential plane determined by the coordinates and normal vector, i.e. in the neighborhood +.>Transformed into two dimensions.
Step 21302' selecting a center point from the multi-element texel plane gridAnd its neighborhood->Neighborhood is provided with->There are n texels, neighborhood +.>M texels and satisfies the condition +.>. Will beEach of the texels in the sequence +.>Matching the texture elements in the neighborhood +.>Andeach round of matching is as
(11)
Wherein the texels in the match f are in one-to-one correspondence.Texture element->Will be subjected to n rounds of matching to generate a matching set F comprising +.>The matching f is shown in the schematic diagrams of (a), (b) and (c) in FIG. 8, wherein (a) in FIG. 8 is a central texture element and a neighborhood on a three-dimensional thin-wall model, (b) in FIG. 8 is a central texture element and a neighborhood on a multi-element texture element plane grid, and (c) in FIG. 8 is a neighborhood- >And->Is a schematic of n rounds of matching results.
Step 21303' after obtaining a set of matches, each ofIs defined as the error function of
(12)
Wherein,is->And->A distance therebetween; />Representation->And->Whether or not to index number of (2)Same, if the index numbers are different, +.>Taking 1, otherwise taking 0; />Representation->And (3) withThe difference in the degrees of the included angle between them, ">The included angle degree is->Vector and vector formed with its center position +.>Angle between->The included angle degree is->Vector and vector formed with its center point +.>Angle between them>,/>Andis a weighted value.
In step 21304', the round of matching f with the smallest error is recorded as the best neighborhood matching, and the best neighborhood matching is used as a matching result.
Fig. 9 (a) and (b) are the results of multi-element texture synthesis on the thin-wall model by creating a multi-element texture element plane grid, fig. 9 (a) is the multi-element texture element plane grid, and fig. 9 (b) is the result of multi-element texture element synthesis, with points on the thin-wall model representing initial positions.
Step 14', creating a multi-element texel distribution function for measuring the distribution quality of the texels, in preparation for subsequent target optimization.
The multi-texture synthesis method based on the discrete element textures can meet more texture element plane grid patterns. To optimize texture synthesis, a multi-element texture element distribution function is established for measuring a given multi-element texture element synthesis quality. The distribution function of the multi-element texture element is as follows
(13)
Wherein,representing texel element +.>Neighborhood of texel element->Is a neighborhood unit thereof; />Is a texel element +.>Is to texture element->Projection positions on a tangential plane of (2); />And->Is a textured element->And->A location in the planar grid; />Is a textured element->A transformation matrix from the planar mesh to the tangent plane location; />And->Is a textured element->And its matching texel size in the plane; />And->Is a textured element->And its matching texel index in the planar grid; />Representation->And->Whether the indexes are the same or not, the same takes 1, and the different takes 0.
Example 3
An embodiment 3 provided by the present invention is an embodiment of a three-dimensional thin-wall model mesh surface texture synthesis method provided by the embodiment of the present invention, where the embodiment includes:
step 1, obtaining a three-dimensional thin-wall model to be processed and a texture element plane grid created by a user;
step 2, when the texture element is a single texture element, adopting a voxel grid vertex downsampling method to downsample the vertex of the three-dimensional thin-wall model, and taking a sampling point as an initialization position of the texture element on the three-dimensional thin-wall model; when the texture elements are multi-element texture elements, the multi-element texture elements are subjected to point aggregation, connected domains of point sets are established, a sample texture synthesis algorithm based on discrete element textures is adopted, and the initialization positions of the point sets on the three-dimensional thin-wall model are determined according to neighborhood information of the point sets, so that the initial synthesis positions of the multi-element texture elements are obtained;
Step 3, respectively creating a single texture element distribution function and a multi-element texture element distribution function for measuring the distribution quality of the texture elements;
step 4, transforming the texture elements to tangential planes of the initialization positions corresponding to the three-dimensional thin-wall model through matrix space posture transformation; along a normal vector to the tangent plane, a set of vertices of a texture element is projected onto the three-dimensional thin-wall model surface.
In one possible embodiment, to obtain the porous shape of the texture element on the thin-wall model surface, the texture element after the initialization synthesis is projected onto the thin-wall model surface. Because the texture element unit is represented by a closed curve, the mapping of the texture element is the mapping of the vertex of the closed curve, and the topological relation of the new vertex after mapping is kept unchanged, so that the mapping of the texture element on the thin-wall model can be obtained. Calculating initialization distribution positionAnd texel element center point->Displacement matrix between->Moving the texel unit to a corresponding position; calculating initialization distribution positionNormal vector of->Normal vector to texel->Included angle->Establishing a rotation matrix->. And carrying out space rotation transformation on the texture element unit after the displacement transformation.
The center point and the normal vector of the texture element unit are respectively overlapped with the position point and the normal vector of the thin-wall model through space transformation. Texture vertex set by projectionMapping the texture to the thin-wall grid model surface, and completely fitting the projected texture to the thin-wall model surface, so that the subsequent texture element curve cutting work is facilitated.
After the initial synthesis of the texel unit, its position coordinates on the three-dimensional thin-wall model have been determined. And mapping the vertex set of the texture element unit to the thin-wall model surface, so as to construct the texture element pattern on the thin-wall model surface.
Because the established texture element plane grid is two-dimensional, and the mapped target is a three-dimensional thin-wall model, the texture element mapping transforms texture element units to tangential planes of an initialization position corresponding to the thin-wall model through matrix space posture transformation; along the normal vector of the thin-wall model surface at the position, the vertex set of the texture element unit is projected to the thin-wall model surface.
In one possible embodimentThe pose of the texel unit in the three-dimensional space is its center point position coordinates and normal direction, etc., and the spatial pose transformation of the texel unit is to transform the texel unit from the initial position to a tangential plane of a position of the three-dimensional thin wall, the tangential plane being defined by the spatial coordinates and normal direction of the position. The texel unit is defined by a vertex set, so the space pose transformation of the texel unit is that of the vertex set of the texel unit Is a spatial transformation of (c). The texel element spatial pose transformation algorithm flow is shown in fig. 10.
The texture element unit space posture transformation algorithm comprises the following specific steps:
step 401, inputting a thin-wall model with texture synthesis information, and obtaining initial synthesis positions of texture element units on the surface of a thin-wall model gridNormal vector of dough sheet->A corresponding texel element index;
step 402, selecting the set of texel element vertices from the texel plane meshReading the center point coordinates of the texel element unit>
Step 403, according to the texel unit center point coordinatesAnd initial synthesis positionThe method is represented by formula 14:
(14)
establishing a coordinate translation matrix
(15)
Step 404, according to equation 16, each vertex of the texel unit is determinedMultiplying by a displacement matrix>The texel unit vertex coordinates are updated. Obtaining the vertex coordinates of the texture element grid after position transformationThereby completing the displacement transformation of the texel unit vertex set.
(16)
Step 405, according to the normal vector of the corresponding patchCalculate the initialization distribution position +.>Normal vector of->And calculates the algorithm vector->Initial normal to texel->Included angle of (2)Calculate to correspond to +.>Rotation angle of shaft- >According to equation 17, a rotation matrix is established>. The texel unit vertex after displacement transformation +.>Multiplying by rotation matrix>And carrying out rotation transformation on the texture element model, and adjusting the normal vector of the texture element unit to coincide with the normal vector of the thin-wall model surface piece.
(17)
Step 406, processing the texture element unit according to the above steps to obtain the texture element unit after spatial transformation, wherein the texture element unit is added to the initialization distribution position of the thin-wall modelIs arranged on the tangential plane of the die.
The normal vector of the triangular patch at the initialization position of the thin-wall model has the following three cases, as shown in (a), (b) and (c) in fig. 11:
(1) The center point of the texture element is located on the patch, and the normal vector of the point is the normal vector of the patch where the texture element is located, as shown in (a) of fig. 11;
(2) The texel center point is on the common edge of the adjacent triangular patches, and the normal vector of that point is the average of the normal vectors of the adjacent patches, as shown in (b) of fig. 11;
(3) The texel center point is located on the vertex of the adjacent triangular patch, and the normal vector of this point is the average of the normal vectors of all the adjacent triangular patches, as shown in (c) of fig. 11.
In one possible embodiment, the created texel elements are spatially transformed by a matrix to coincide with the tangent plane of the corresponding position of the thin-wall model. In order to ensure that the two-dimensional texture element units can be tightly attached to the surface of the three-dimensional thin-wall model grid, projection processing is required to be carried out on the two-dimensional texture element units. And determining the specific position of the top point set of the texture element unit on the thin-wall die surface sheet through projection.
The texture element unit projection method comprises the following specific contents: step 407, performing a ray from the vertex position of the texel unit along the normal direction of the texel center point, the ray passing through the triangular patch of the thin-wall model, to generateA plurality of intersection points; if it isAnd sequentially calculating the distance between the intersection point and the vertex, and screening the intersection point closest to the vertex as a projection point. The schematic diagram of screening projection points is shown in FIG. 12, which shows the texel unit vertices +.>When projected onto the triangular surface patch of the thin-wall grid along the normal direction, the projection lines and the triangular surface patch intersect at points P1 and P2. Due to the intersection point P1 and the vertex->Since the Euclidean distance of (2) is the smallest, the intersection point P2 is eliminated, and the coordinate of the intersection point P1 is the vertex of the texture element +.>Coordinates on a triangular facet of the thin-walled model.
In the process of eliminating redundant intersection points, the Euclidean distance between the projection points and the vertexes of the texture elements is calculated, and the space coordinate information of the projection points is required to be determined, so that the texture element projection algorithm is essentially intersection calculation of space straight lines and triangular patches, and the specific steps of calculating the intersection points are as follows:
Step1: and reading vertexes of the texture element units, calculating bounding boxes of the triangular patches, and performing collision detection with the bounding boxes of the line segments. At the position ofIn the direction, if the minimum value of the coordinates of the bounding box of the triangular patch is larger than the maximum value of the coordinates of the bounding box of the line segment, or the maximum value of the coordinates of the bounding box of the triangular patch is smaller than the minimum value of the coordinates of the bounding box of the line segment, the triangular patch and the projection line have no intersection point; otherwise, there is an intersection point.
Step2: and establishing a triangular patch plane equation by using a point method, establishing a linear equation according to the vertexes and normal vectors of the texture elements, and calculating the intersection point of the two equations. If a plurality of intersection points exist, calculating Euclidean distance between each intersection point and the vertex in the projection direction, wherein the intersection point with the nearest Euclidean distance is the required projection point;
step3: returning to Step1, projecting all vertexes of the texture element to the surface of the thin-wall model, and connecting corresponding projection points obtained by each vertex according to the original topological relation to obtain projection of the texture element on the thin-wall model.
Since the adjacent triangular panels of the thin-wall model are not coplanar and have a certain angle, the partial edges of each vertex are reconnected and are not attached to the triangular panels of the thin-wall model, as shown in fig. 13 (a). Traversing projected vertexes, and not projecting two adjacent vertexes on a triangular surface patch of a thin-wall model, namely, possibly generating edges which are not attached to the surface of the model.
And (3) establishing a plane equation according to the average value of normal vectors of the non-bonded edge and the adjacent triangular patches, calculating a linear equation of a common edge of the triangular patches, performing intersection calculation to obtain an intersection point, interpolating the intersection point into a projection point, and reconnecting the topological relation, wherein the schematic diagram is shown in (b) in fig. 13. After the unfinished edges are treated, the texture element units are completely attached to the surface of the thin-wall model.
In a possible embodiment, step 4 further comprises, after:
and 5, judging whether the vertex of the thin-wall model is inside or outside the closed curve of the texture element by adopting a directional distance field mode, recombining triangular patches by taking the closed curve as a boundary, reserving the outside, discarding the inside, and finishing cutting of the closed curve of the texture element.
The key of the closed curve cutting of the texture elements is to distinguish the vertex of the thin-wall model from the outside and the inside of the closed curve, and to recombine triangular patches by taking the closed curve as a boundary, and to reserve the outside and discard the inside. The inner and outer parts of the closed curve are judged by adopting a directional distance field mode: (1) nearest distance calculation: the closed curve is discretized into a line segment set, the vertex of the thin-wall model is projected to the plane where each line segment is located, and the plane is determined by the straight line vector of the line segment and the normal direction of the surface patch where the straight line is located. Calculating the distance from the projection point to the line segment, and taking the minimum value of the distance as the distance from the vertex of the thin-wall model to the closed curve; (2) direction determination: the vertex is determined to be outside or inside the closed curve by calculating whether the vertex is to the left or right of the line segment. The vertex set of the closed curve is ordered clockwise, the AB represents a line segment vector, the AC represents a line segment starting point and a vertex vector, the NORMAL represents a NORMAL vector of the surface patch where the straight line is located, CROSS of the AB and the AC is calculated, if the CROSS is consistent with the NORMAL, the vertex is described to be on the left side of the line segment, and then the vertex can be judged to be outside the closed curve, otherwise, the vertex can be judged to be inside the closed curve. Wherein positive and negative represent directions, positive for directions representing that the vertex is inside the curve, and negative for directions representing that the vertex is outside the curve; (3) mesh dough sheet reorganization: and calculating a triangular patch ring where the closed curve and the thin-wall grid model are intersected, dividing triangular patches along the closed curve, re-dividing triangular grids for the divided patches by adopting a Delaunay triangulation method, and removing peaks and patches with positive distances according to the directed distances of the peaks of the thin-wall, so that the thin-wall model after cutting the closed curve can be obtained.
Example 4
The embodiment 4 provided by the invention is an application example of the three-dimensional thin-wall model grid surface texture synthesis method provided by the invention. In this embodiment, three-dimensional thin-wall models of elbow, boot and write support are taken as examples, surface texture synthesis algorithm analysis is performed, input data are STL files, the same thin-wall model is tested and compared, and surface texture synthesis effects are achieved under different parameters.
(1) Application of texture synthesis algorithm based on voxel grid vertex downsampling
A circular single textured element planar grid was created with a circular texture circumscribing circle radius R of 3mm as shown in fig. 14 (a), and an elbow master model as shown in fig. 14 (b). When the downsampled spacing S is set to 4mm, the elbow model surface texture synthesis effect is as shown in (c) of fig. 14; when the pitch S is set to 10mm, the effect of surface texture synthesis of the elbow model is shown in fig. 14 (d). It can be seen that when the sampling interval S is set to 10mm, a single texture element synthesizing effect is obtained more uniformly.
A square single textured element plane grid was created with a square circumcircle radius R of 3mm as shown in fig. 15 (a), and a writet prototype as shown in fig. 15 (b). Setting the voxelized down-sampling interval S to 4mm, the effect of surface texture synthesis of the elbow model is as shown in (c) of fig. 15; when the pitch S is set to 10mm, the effect of surface texture synthesis of the elbow model is shown in fig. 15 (d). It can be seen that when the sampling interval S is set to 4mm, the single texture element synthesizing effect is obtained more uniformly.
Table 1 is a data record of a test of the elbow model and the write model by creating a single texel planar mesh using a texture synthesis algorithm based on voxel grid vertex down-sampling. The number of top points of the elbow model is 20174, the number of patches is 39782, experiments are carried out by using a circular single texture element plane grid, the radius of a circular texture circumcircle is 3mm, and when the texture interval is respectively set to be 4mm and 10mm, the number of surface texture synthesis of the elbow model is 524 and 360 respectively; the number of top points of the writet model is 25555, the number of patches is 50549, experiments are carried out by utilizing square single texture element plane grids, the radius of a circumcircle of square textures is 3mm, and the number of surface texture synthesis of the writet model is 257 and 175 when the texture spacing is set to be 4mm and 10mm respectively.
Table 1 elbow model and write model single texel synthesis test examples
(2) Multi-texture synthesis algorithm application based on discrete element textures
On a 100×100mm planar grid, a multi-element textured element planar grid model was created using circles and squares, respectively, where the circular texture circumscribed circle radius R was 7mm and the square circumscribed circle radius R was 7mm. And testing the root model by using the planar grid to perform a multi-texture synthesis algorithm. Fig. 16 (a) is a root original model, fig. 16 (b) is a result of texture synthesis of a created circular multi-element texture element on a root model surface, and fig. 16 (c) is a result of texture synthesis of a created square multi-element texture element on a root model surface.
Table 2 is a data record of a test of a multi-element texture synthesis algorithm based on discrete element textures of a foot model through a multi-element texture element plane grid, wherein the number of top points of the foot model is 72855, the number of patches is 144717, circular multi-element texture elements and square multi-element texture elements are respectively selected, the radius of a circle circumscribed by each texture element is 7mm, and the number of synthesized texture elements on the surface of the foot model is 194 and 181.
Table 2 test case for synthesis of multiple texels for a boot model
The embodiment of the invention provides a three-dimensional thin-wall model grid surface texture synthesis method, which is used for creating a textured element plane grid with attractive appearance and preprocessing. Classifying and researching the created texture element plane grid, researching a voxel-based grid vertex downsampling texture synthesis algorithm aiming at the created single texture element plane grid, and realizing the synthesis of the single texture element on the surface of the thin-wall model; aiming at the created multi-element texture element plane grid, a multi-element texture element synthesis algorithm based on discrete element textures is researched, and the synthesis of multi-element texture elements on the surface of the thin-wall model is realized. And mapping the texture element unit to the surface of the thin-wall model according to the initial position of the thin-wall model and the attribute information thereof, so as to prepare for subsequent light-weight research. The effectiveness and accuracy of the algorithm are verified by using the elbow, write and root brace examples, and the result shows that the algorithm is stable, and the synthetic effect of the surface texture elements of the brace model meets the expectations.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. The texture synthesis method for the three-dimensional thin-wall model grid surface is characterized by comprising the following steps of:
step 1, obtaining a three-dimensional thin-wall model to be processed and a texture element plane grid created by a user;
step 2, when the texture element is a single texture element, adopting a voxel grid vertex downsampling method to downsample the vertex of the three-dimensional thin-wall model, and taking a sampling point as an initialization position of the texture element on the three-dimensional thin-wall model; when the texture elements are multi-element texture elements, the multi-element texture elements are subjected to point aggregation, connected domains of point sets are established, a sample texture synthesis algorithm based on discrete element textures is adopted, and the initialization positions of the point sets on the three-dimensional thin-wall model are determined according to neighborhood information of the point sets, so that the initial synthesis positions of the multi-element texture elements are obtained;
Step 3, respectively creating a single texture element distribution function and a multi-element texture element distribution function for measuring the distribution quality of the texture elements;
step 4, transforming the texture elements to tangential planes of the initialization positions corresponding to the three-dimensional thin-wall model through matrix space posture transformation; projecting a set of vertices of a texture element along a normal vector to the tangent plane to the three-dimensional thin-wall model surface;
when the texture element in the step 2 is a single texture element, the method further comprises the following steps of:
step 211, detecting whether collision will occur between the texels at the initialization position through the circumscribed circles of the texels, and establishing a penalty function for punishing the collision, including:
for overlapped texture elementsAnd->Establishing a penalty function: />
Creating a penalty function for texels that exceed the boundaries of the three-dimensional thin-wall model:
wherein,and->Respectively representing texture elements +.>And->Is the radius of the circumcircle, < >>And->Representing texel units +.>And (3) withCoordinate position on the thin-wall model; />Is the distance +.>The nearest boundary point coordinates; />Euclidean distance between texel centers, < >>Is the Euclidean distance between the center of the texel and the nearest point on the boundary, +. >Is a safety factor limiting the lower distance limit;
step 212, creating a growing objective function to adjust the size of the texture element, comprising: the texels are enlarged in the sparse distribution area and the texels are reduced in the dense distribution area.
2. The texture synthesis method according to claim 1, wherein the step 2 of downsampling vertices of the three-dimensional thin-wall model when the texture elements are single texture elements comprises:
step 201, creating an axis alignment bounding box Bound of the three-dimensional thin-wall model according to the size of the three-dimensional thin-wall model;
step 202, dividing the bounding box Bound into a plurality of small voxels according to the radius R of the circumscribed circle of the texture element, the set distance S of the circumscribed circle of the texture element and the size of the bounding box Bound;
and 203, calculating the vertexes of the three-dimensional thin-wall model contained in each small voxel, and taking the vertex closest to the centroid of each small voxel as a sampling point.
3. The texture synthesis method according to claim 1, wherein the creating of the single texture element distribution function in step 3 comprises:
step 301, for center-to-center distances between texels Less than a given neighborhood size->Is +.>And->Establishing a texel rejection target: />
Wherein,is the center distance between texture elements +.>Weight factor of->Set to 25% of the diagonal length of the bounding box of the thin-wall model, center distance between texture elements +.>
Step 302, establishing a growth target for a region without the vertex in the small voxel, and scaling the size of the texture element of the region:
wherein,representing texture element +.>Is a scaling parameter of (a);
step 303, constructing the distribution function as follows:
4. the texture synthesis method according to claim 1, wherein the creating of the connected domain of the multi-element texture element in the step 2 includes:
step 201', reading boundary edges of a plane grid according to a multi-element texture element plane grid created by a user, and obtaining a closed curve set for defining multi-element texture elements;
202', obtaining a top point set of each texture element through mutually independent topological relations among closed curves;
step 203', calculating the mass center of each texture element top point set, and marking the mass center as the center point of the texture element; defining index according to the storage sequence of the texture element vertex set, and recording the index and the vertex set as attribute information of the center point;
204', triangulating the center point set by adopting a Delaunay triangular splitting method according to the center point set of the multi-element texture elements, connecting adjacent center points, and creating connected domain information; all points directly connected with a certain central point form a ring neighborhood of the central point.
5. The texture synthesis method according to claim 1, wherein the step 2 of obtaining the initial synthesis position of the multi-element texture element comprises:
step 211', reading connected domain information of a multi-element texture element plane grid;
step 212' randomly selecting a point in the multi-textured element planar grid connected domainAs a center point; the center point +.>Copying to a random position on the surface of the three-dimensional thin-wall model grid +.>As a central location; and the center point +.>Neighborhood point of->Projecting to the surface of the three-dimensional thin-wall model grid;
step 213', selecting a distance from said central locationThe nearest neighbor point which is not matched is taken as the center position of the next neighbor matching +.>New center position +.>And the surrounding neighborhood thereof is optimally matched with the multi-element textured element connected domain, selecting the neighborhood with highest neighborhood information similarity in the multi-element texture elements to make up for the central position +. >Points of missing surrounding neighborhood;
step 214', carrying out collision detection on the newly added neighborhood points and the neighborhood points projected to the grid surface of the three-dimensional thin-wall model, and carrying out boundary collision detection on the newly added neighborhood points and the boundary of the three-dimensional thin-wall model;
step 215', jumping back to step 213', and completing the initialization synthesis of the multi-element texture elements until the multi-element texture elements are distributed on the surface of the three-dimensional thin-wall model.
6. The texture synthesis method according to claim 5, wherein the step 213' uses a neighborhood comparison metric neighborhoodAnd->The matching degree between the two comprises the following steps:
step 21301', center position is determinedIs a ring neighborhood of->Projection to the position of +.>On a tangential plane determined by the coordinates and normal vector of (a) a neighborhood +.>Transforming into two dimensions;
step 21302' selecting a center point from the multi-element texel plane gridAnd its neighborhood->Neighborhood is provided withThere are n texels, neighborhood +.>M texels and satisfies the condition +.>The method comprises the steps of carrying out a first treatment on the surface of the Will->Each of the texels in the sequence +.>Matching the texture elements in the neighborhood +.>And->Each round of matching is as follows:
wherein the texels in the match f are in one-to-one correspondence;texture element- >Will be subjected to n rounds of matching to generate a matching set F comprising +.>F, matching each;
step 21303' after obtaining a set of matches, each ofIs defined as the error function of
Wherein,is->And->A distance therebetween; />Representation->And->Whether the index numbers of (2) are identical, if the index numbers are different, +.>Taking 1, otherwise taking 0; />Representation->And->The difference in the degrees of the included angle between them, ">The included angle degree is->Vector and vector formed with its center position +.>Angle between->The included angle degree is->Vector and vector formed with its center point +.>Angle between them>Is a weighted value;
in step 21304', the round of matching f with the smallest error is recorded as the best neighborhood matching, and the best neighborhood matching is used as a matching result.
7. The texture synthesis method according to claim 1, wherein the multi-element texture element distribution function in step 3 is:
wherein,representing texture element +.>Neighborhood of texel->Is a neighborhood thereof; />Is a textured element->Is to texture element->Projection positions on a tangential plane of (2); />And->Is a textured element->And->A location in the planar grid; />Is a textured element->A transformation matrix from the planar mesh to the tangent plane location; />Is a textured element- >Matching texel sizes in the plane; />And->Is a textured element->And its matching texel index in the planar grid; />Representation->And->Whether the indexes are the same.
8. The texture synthesis method according to claim 1, wherein the texture element spatial pose transformation algorithm procedure in step 4 comprises:
step 401, obtaining initial combination position of texture element on the three-dimensional thin-wall model grid surfaceNormal vector of dough sheet->A corresponding texel index;
step 402, selecting the set of texel vertices from the texel plane meshReading the center point coordinates of the texels>
Step 403, according to the texel center point coordinatesAnd initial synthesis position->Establishing a coordinate translation matrix->
Wherein,
step 404, each vertex of the texel is processedMultiplying by a displacement matrix>Updating the vertex coordinates of the texture elements to obtain the vertex coordinates ++f the texture element grid after the position transformation>Thereby completing the displacement transformation of the texture element top point set; wherein,
step 405, according to the normal vector of the corresponding patchCalculate the initial synthesis position +.>Normal vector of->And calculates the algorithm vector->And texel initial normal vector- >Included angle->Calculate to correspond to +.>Rotation angle of shaft->The method comprises the steps of carrying out a first treatment on the surface of the Establishing a rotation matrix->Transforming the displacement of the texel verticesMultiplying the rotation matrix +.>Performing rotary transformation on the texture element model, and adjusting the normal vector of the texture element to be coincident with the normal vector of the thin-wall model surface; wherein the rotation matrix->The method comprises the following steps:
step 406, adding the spatially transformed texels to the texture dataInitial synthesis position of three-dimensional thin-wall modelIs arranged on the tangential plane of the (c);
the process of projecting the vertex set of the texture elements onto the three-dimensional thin-wall model surface in the step 4 comprises the following steps:
step 407, performing a ray from the vertex position of the texture element along the normal direction of the center point of the texture element, wherein the ray passes through the triangular surface patch of the three-dimensional thin-wall model to generateA plurality of intersection points; if->Sequentially calculating the distance between the intersection point and the vertex, and screening the intersection point closest to the vertex to be used as a projection point;
the process for screening the projection points comprises the following steps: vertex of texel unitWhen projected onto the triangular surface patch of the thin-wall grid along the normal direction, projection lines and the triangular surface patch intersect at points P1 and P2; intersection P1 and vertex->If the Euclidean distance of (2) is the minimum, eliminating the intersection point P2, and taking the coordinate of the intersection point P1 as the vertex ++of the texture element >Coordinates on a triangular patch of the three-dimensional thin-wall model.
9. The texture synthesis method according to claim 1, wherein the step 4 further comprises:
and 5, judging whether the vertex of the thin-wall model is inside or outside the closed curve of the texture element by adopting a directional distance field mode, recombining triangular patches by taking the closed curve as a boundary, reserving the outside, discarding the inside, and finishing cutting of the closed curve of the texture element.
CN202311094254.XA 2023-08-29 2023-08-29 Three-dimensional thin-wall model grid surface texture synthesis method Active CN116843862B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311094254.XA CN116843862B (en) 2023-08-29 2023-08-29 Three-dimensional thin-wall model grid surface texture synthesis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311094254.XA CN116843862B (en) 2023-08-29 2023-08-29 Three-dimensional thin-wall model grid surface texture synthesis method

Publications (2)

Publication Number Publication Date
CN116843862A CN116843862A (en) 2023-10-03
CN116843862B true CN116843862B (en) 2023-11-24

Family

ID=88167429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311094254.XA Active CN116843862B (en) 2023-08-29 2023-08-29 Three-dimensional thin-wall model grid surface texture synthesis method

Country Status (1)

Country Link
CN (1) CN116843862B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102637304A (en) * 2012-03-15 2012-08-15 中国科学院软件研究所 Method for synthesizing isotropic/anisotropic texture on geometric surface based on GPU (Graphics Processing Unit)
CN108527871A (en) * 2017-12-26 2018-09-14 模德模具(东莞)有限公司 The quick printing shaping method for making sample of 3 D stereo texture
CN112132970A (en) * 2020-08-26 2020-12-25 山东大学 3D printing-oriented natural texture synthesis system and method
CN112734930A (en) * 2020-12-30 2021-04-30 长沙眸瑞网络科技有限公司 Three-dimensional model weight reduction method, system, storage medium, and image processing apparatus
CN112991458A (en) * 2021-03-09 2021-06-18 武汉大学 Rapid three-dimensional modeling method and system based on voxels
CN113012205A (en) * 2020-11-17 2021-06-22 浙江华云电力工程设计咨询有限公司 Three-dimensional reconstruction method based on multi-source data fusion
CN113674388A (en) * 2021-07-19 2021-11-19 中国地质调查局发展研究中心 Three-dimensional geologic body texture mapping method based on machine learning
CN114694081A (en) * 2022-04-21 2022-07-01 南京大学 Video sample generation method based on multivariate attribute synthesis
CN115143958A (en) * 2022-04-28 2022-10-04 西南科技大学 Multi-sensor fusion SLAM method based on GPU acceleration
CN115187749A (en) * 2022-07-28 2022-10-14 重庆大学 Point cloud surface reconstruction method and system based on cube network model
CN115393548A (en) * 2022-08-24 2022-11-25 中国测绘科学研究院 Grid texture simplifying algorithm suitable for three-dimensional reconstruction
CN115409932A (en) * 2022-08-29 2022-11-29 星鲨信息技术(上海)有限公司 Texture mapping and completion method of three-dimensional human head and face model
CN116402934A (en) * 2023-04-12 2023-07-07 小视科技(江苏)股份有限公司 Automatic texture mapping method, terminal and storage medium for three-dimensional reconstruction

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102007030781A1 (en) * 2006-10-11 2008-04-17 Gta Geoinformatik Gmbh Method for texturing virtual three-dimensional objects
US10186082B2 (en) * 2016-04-13 2019-01-22 Magic Leap, Inc. Robust merge of 3D textured meshes

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102637304A (en) * 2012-03-15 2012-08-15 中国科学院软件研究所 Method for synthesizing isotropic/anisotropic texture on geometric surface based on GPU (Graphics Processing Unit)
CN108527871A (en) * 2017-12-26 2018-09-14 模德模具(东莞)有限公司 The quick printing shaping method for making sample of 3 D stereo texture
CN112132970A (en) * 2020-08-26 2020-12-25 山东大学 3D printing-oriented natural texture synthesis system and method
CN113012205A (en) * 2020-11-17 2021-06-22 浙江华云电力工程设计咨询有限公司 Three-dimensional reconstruction method based on multi-source data fusion
CN112734930A (en) * 2020-12-30 2021-04-30 长沙眸瑞网络科技有限公司 Three-dimensional model weight reduction method, system, storage medium, and image processing apparatus
CN112991458A (en) * 2021-03-09 2021-06-18 武汉大学 Rapid three-dimensional modeling method and system based on voxels
CN113674388A (en) * 2021-07-19 2021-11-19 中国地质调查局发展研究中心 Three-dimensional geologic body texture mapping method based on machine learning
CN114694081A (en) * 2022-04-21 2022-07-01 南京大学 Video sample generation method based on multivariate attribute synthesis
CN115143958A (en) * 2022-04-28 2022-10-04 西南科技大学 Multi-sensor fusion SLAM method based on GPU acceleration
CN115187749A (en) * 2022-07-28 2022-10-14 重庆大学 Point cloud surface reconstruction method and system based on cube network model
CN115393548A (en) * 2022-08-24 2022-11-25 中国测绘科学研究院 Grid texture simplifying algorithm suitable for three-dimensional reconstruction
CN115409932A (en) * 2022-08-29 2022-11-29 星鲨信息技术(上海)有限公司 Texture mapping and completion method of three-dimensional human head and face model
CN116402934A (en) * 2023-04-12 2023-07-07 小视科技(江苏)股份有限公司 Automatic texture mapping method, terminal and storage medium for three-dimensional reconstruction

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
元素分布构建的三维模型表面纹理合成方法;桂彦 等;《计算机科学与探索》;1484-1495 *
基于三维表面分布构建的纹理合成方法研究;刘杨;《中国硕士学位论文全文数据库 信息科技辑》;I138-4336 *
基于三角网格模型的纹理映射研究;万燕;王慧洁;鲁俊;;计算机应用与软件(04);160-164 *
基于多分辨率裁剪纹理的体裁剪技术;罗月童;薛晔;龙鹏程;伍国永;;工程图学学报(03);1-5 *
基于多源数据融合的室内场景三维重建技术研究;杨哲;《中国优秀硕士学位论文全文数据库 信息科技辑》;I138-1267 *
朱德海主编;郭浩,苏伟副主编.《点云库PCL学习教程》.北京航空航天大学出版社,2012,187. *

Also Published As

Publication number Publication date
CN116843862A (en) 2023-10-03

Similar Documents

Publication Publication Date Title
Mencl et al. Interpolation and approximation of surfaces from three-dimensional scattered data points
CN104361632B (en) A kind of triangle gridding filling-up hole method based on Hermite RBFs
Chui et al. Direct 5-axis tool-path generation from point cloud input using 3D biarc fitting
US10867435B2 (en) System and method for generating planar section 3D shape representations
JP2013507679A (en) Method and system capable of 3D printing of 3D object model
Sikder et al. Effect of adaptive slicing on surface integrity in additive manufacturing
US20190088014A1 (en) Surface modelling
Azariadis Parameterization of clouds of unorganized points using dynamic base surfaces
CN110176073B (en) Automatic modeling and self-adaptive layering method for three-dimensional defect model
Dassi et al. Curvature-adapted remeshing of CAD surfaces
Athanasiadis et al. Feature-based 3D morphing based on geometrically constrained spherical parameterization
CN108230452B (en) Model hole filling method based on texture synthesis
Binninger et al. Developable approximation via gauss image thinning
CN106649992B (en) Fusion and optimization method of ship and trail grid model
Yingjie et al. Adaptive tool-path generation on point-sampled surfaces
CN116843862B (en) Three-dimensional thin-wall model grid surface texture synthesis method
Nieser et al. Patch layout from feature graphs
Zhu et al. A review of 3D point clouds parameterization methods
Huang et al. Automatic CAD model reconstruction from multiple point clouds for reverse engineering
Santos et al. Integration of CAD Models into Game Engines.
US20120206456A1 (en) Methods and Systems for Generating Continuous Surfaces from Polygonal Data
CN114494641B (en) Three-dimensional model light weight method and device
CN107248163B (en) Automatic generation method of texture development diagram for rotationally symmetric porcelain
Tanaka et al. Accuracy-based sampling and reconstruction with adaptive grid for parallel hierarchical tetrahedrization
Chen et al. Volumetric adaptive slicing of manifold mesh for rapid prototyping based on relative volume error

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant