Texture model generation method, system, device, medium and product

By determining the edges and internal update points of polygonal units in 3D printing, the meshed model is updated to generate a three-dimensional solid structure, solving the problem of geometric distortion in three-dimensional texture structures and realizing the generation of texture models without self-intersection.

CN120726207BActive Publication Date: 2025-11-11SHANGHAI VOXELDANCE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511134203.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-11-11
Estimated Expiration
2045-08-14

AI Technical Summary

Technical Problem

In the 3D printing process, directly using two-dimensional images to generate three-dimensional texture structures on a 3D model can easily lead to geometric distortion problems, resulting in discontinuous three-dimensional texture structures.

Method used

By acquiring texture images and a meshed model represented by polygonal units, the vertex mapping coordinates of each polygonal unit are determined, and edge update points and interior update points are determined at the edges and interiors. The meshed model is then updated to generate a three-dimensional structure, avoiding geometric distortion.

Benefits of technology

The generated texture model no longer exhibits geometric distortion in its three-dimensional structure, and by using actual offsets and simplified thresholding, the data volume of the texture model is reduced, ensuring structural continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120726207B_ABST
    Figure CN120726207B_ABST
Patent Text Reader

Abstract

This application discloses a texture model generation method, system, device, medium, and product. The texture model generation method includes the following steps: acquiring a texture image and a meshed model represented by polygonal units; using the mapped coordinates of the vertices of each polygonal unit in the update region of the meshed model, determining edge update points on the edges of each polygonal unit that can be mapped to the pixel edges in the texture image, and determining internal update points inside each polygonal unit that can be mapped to the pixel vertices in the texture image; updating the meshed model according to the vertices of each polygonal unit in the update region, the determined edge update points and internal update points of each polygonal unit, and generating a three-dimensional solid structure on the updated meshed model using the texture image to obtain the texture model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D printing technology, specifically to a texture model generation method, system, device, medium, and product. Background Technology

[0002] In the field of 3D printing technology, to improve the anti-slip performance of printed parts (e.g., improving the anti-slip performance of shoe soles), enhance the appearance of printed parts (e.g., improving the aesthetics or realism of handicrafts), and configure markings on printed parts (e.g., printing serial numbers or company names on the surface of printed parts), it is usually necessary to generate corresponding three-dimensional texture structures on 3D models using two-dimensional images. However, if three-dimensional texture structures are generated directly from 3D models and two-dimensional images, it often leads to geometric distortion problems such as structural abrupt changes and loss of structure in the generated three-dimensional texture structure. For example, if a two-dimensional image contains a wavy texture, the generated three-dimensional texture structure will be a discontinuous raised structure.

[0003] Therefore, in the data preprocessing stage of 3D printing, how to avoid geometric distortion of the 3D texture structure when generating a 3D texture structure from a 2D image on a 3D model is an urgent technical problem to be solved. Summary of the Invention

[0004] In view of the shortcomings of the above-mentioned related technologies, the purpose of this application is to provide a texture model generation method, system, device, medium and product to overcome the technical problem of how to avoid geometric distortion of the three-dimensional texture structure when generating a three-dimensional texture structure on a 3D model using a two-dimensional image.

[0005] To achieve the above and other related objectives, the first aspect of this application discloses a texture model generation method, comprising the following steps: acquiring a texture image and a meshed model represented by polygonal units; using the mapped coordinates of the vertices of each polygonal unit in the update region of the meshed model, determining edge update points on the edges of each polygonal unit that can be mapped to the pixel edges in the texture image, and determining internal update points inside each polygonal unit that can be mapped to the pixel vertices in the texture image; updating the meshed model according to the vertices of each polygonal unit in the update region, the determined edge update points and internal update points of each polygonal unit, and generating a three-dimensional solid structure on the updated meshed model using the texture image to obtain the texture model.

[0006] A second aspect of this application discloses a texture model generation system, comprising: an acquisition module for acquiring a texture image and a meshed model represented by polygonal units; an update point determination module for determining, using the mapped coordinates of the vertices of each polygonal unit in the update region of the meshed model, an edge update point that can be mapped to the pixel edge in the texture image on the edge of each polygonal unit and an internal update point that can be mapped to the pixel vertex in the texture image inside each polygonal unit; and a texture model generation module for updating the meshed model according to the vertices of each polygonal unit in the update region, the determined edge update points and internal update points of each polygonal unit, and generating a three-dimensional solid structure on the updated meshed model using the texture image to obtain the texture model.

[0007] A third aspect of this application discloses a computer device, comprising: a storage device for storing at least one program; and a processing device connected to the storage device for calling and executing the at least one program from the storage device to implement the texture model generation method as described in the first aspect of this application.

[0008] The fourth aspect of this application discloses a computer-readable storage medium storing at least one program, which, when called and executed by a computer's processor, implements the texture model generation method as described in the first aspect of this application.

[0009] The fifth aspect of this application discloses a computer program product that, when run on a computer, causes the computer to perform the texture model generation method as described in the first aspect of this application.

[0010] In summary, the texture model generation method, system, device, medium, and product disclosed in this application generate a texture model by determining edge update points that can be mapped to pixel edges in the texture image on the edges of each polygonal unit in the update region of the meshed model, and determining internal update points that can be mapped to pixel vertices in the texture image within each polygonal unit in the update region. The meshed model is then updated based on the determined edge update points and internal update points, and a three-dimensional structure is generated on the updated meshed model using the texture image to obtain the texture model. This ensures that the three-dimensional structure in the texture model does not suffer from geometric distortion. Furthermore, this application uses actual offsets to offset vertices, allowing the sides of the generated three-dimensional structure connected to the boundary of the specified region to be tilted sides. Even further, this application can generate a texture model without self-intersections by extracting the external contour of the texture model, thus achieving a texture model without self-intersections without detection. Furthermore, this application simplifies the texture model by simplifying the threshold, reducing the data volume of the texture model while ensuring that the three-dimensional structure does not suffer from geometric distortion. Attached Figure Description

[0011] The specific features of the invention involved in this application are shown in the appended claims. The features and advantages of the invention can be better understood by referring to the exemplary embodiments and drawings described in detail below. A brief description of the drawings is as follows:

[0012] Figure 1 The diagram shown is a flowchart illustrating a texture model generation method according to one embodiment of this application.

[0013] Figure 2 The diagram shown is a flowchart of step S120 in one embodiment of this application.

[0014] Figure 3 The diagram shown is a schematic representation of a polygonal unit corresponding to a mapped line segment in the texture image in one embodiment of this application.

[0015] Figure 4 The diagram shows a flowchart illustrating the steps of generating a three-dimensional structure on an updated meshed model using a texture image to obtain a texture model in one embodiment of this application.

[0016] Figure 5 The diagram shows an interface schematic of the parameter configuration window in one embodiment of this application.

[0017] Figure 6 The diagram shows a flowchart illustrating the steps of generating a three-dimensional structure in a designated area according to one embodiment of this application.

[0018] Figure 7 The diagram shown is a schematic representation of an updated meshed model in one embodiment of this application.

[0019] Figure 8 This application is displayed. Figure 7 A schematic diagram illustrating the connection relationship between vertices before and after offset on some boundaries in the embodiment.

[0020] Figure 9 The image shown is a partial schematic diagram of a three-dimensional structure generated on a sheet model in one embodiment of this application.

[0021] Figure 10 The diagram shows a flowchart illustrating the steps of generating a three-dimensional structure in a designated area according to another embodiment of this application.

[0022] Figure 11 The diagram shown is an interface schematic of the angle configuration window in one embodiment of this application.

[0023] Figure 12 The image shown is a partial schematic diagram of a three-dimensional structure generated on a sheet model in another embodiment of this application.

[0024] Figure 13 The image shown is a partial two-dimensional schematic diagram of a texture model in one embodiment of this application.

[0025] Figure 14 This is displayed as an option to retrieve this application. Figure 13 A partial two-dimensional schematic diagram of the texture model generated after the outer contour of the texture model corresponding to the embodiment shown.

[0026] Figure 15 The diagram shown is a block diagram of a texture model generation system according to one embodiment of this application.

[0027] Figure 16 The diagram shown is a structural schematic of a computer device according to one embodiment of this application. Detailed Implementation

[0028] The following explanations of some terms and nouns used in the various embodiments of this application are also part of the invention content. Those skilled in the art will understand that, unless otherwise defined, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0029] The 3D printing process described in this application refers to a manufacturing process that constructs 3D objects by scanning printing materials and printing layer by layer. This manufacturing process can be implemented using a 3D printer to produce printed parts in the real world (i.e., actual physical space) using various methods with the materials to be printed (e.g., photopolymerizable resin materials, or sinterable metal powders, or sinterable copolymers or polymer mixtures, or other materials such as fused deposition plastic filaments). The printed parts can be any objects such as aerospace parts, automotive parts, industrial equipment parts, handicrafts, medical devices, and household goods.

[0030] The texture model described in this application refers to a meshed model with a three-dimensional structure. The three-dimensional structure can also be called a three-dimensional texture structure. The three-dimensional structure refers to a three-dimensional geometric structure that is regularly or randomly distributed in space. Examples of the three-dimensional structure include undulating concave-convex structures, raised array structures, raised stripe structures, embossed text, embossed patterns, etc. In the embodiments of this application, the specific geometric structure of the three-dimensional structure is related to the texture image described in subsequent embodiments. The texture model can be used to print corresponding printed parts using 3D printing technology.

[0031] In view of the technical problem of avoiding geometric distortion in the three-dimensional texture structure when generating a three-dimensional texture structure on a 3D model using a two-dimensional image as described in the background art, this application discloses a texture model generation method, system, device, medium and product. The texture model generation method determines edge update points that can be mapped to pixel edges in the texture image on the edges of each polygonal unit in the update region of the meshed model, and determines internal update points that can be mapped to pixel vertices in the texture image inside each polygonal unit in the update region. The meshed model is updated based on the determined edge update points and internal update points, and a three-dimensional solid structure is generated on the updated meshed model using the texture image to obtain the texture model, so that the three-dimensional solid structure in the texture model will not have geometric distortion.

[0032] The present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. The technical solutions in the embodiments of the present application are clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, not all of them. Based on the embodiments in the present application, all other embodiments and technical effects obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application. The terms "an embodiment," "implementation," or similar wording used throughout this specification mean that a specific feature, structure, or characteristic described together with an implementation is included in at least one embodiment of the present application. Therefore, the appearance of the phrases "in an embodiment," "in an embodiment," and similar wording throughout this specification may (but does not necessarily) refer to the same implementation.

[0033] This application provides a texture model generation method in some embodiments. The texture model generation method can be executed by a computer device configured with a texture model generation system. The texture model generation system is a software tool or software module that can process data and executes the texture model generation method with the help of the hardware devices and / or the operating environment provided by the operating system in the computer device.

[0034] In one embodiment, the computer device may be configured as an electronic device, that is, the texture model generation method is executed by the electronic device. For example, the electronic device includes a desktop computer, a laptop computer, a tablet computer, a smart TV, a smartphone, a tablet, an industrial control computer, etc. The electronic device may also be an electronic device consisting of a host with multiple virtual machines and human-computer interaction devices (such as touch screen, keyboard and mouse) corresponding to each virtual machine.

[0035] In one embodiment, the computer device may be configured as a server, that is, the texture model generation method is executed by the server. The server may be deployed on one or more physical servers based on factors such as functionality and load. In some examples, the server may be a cloud-based server, referring to a cloud computing platform provided by a cloud computing provider, which can provide services such as IaaS (Infrastructure-as-a-Service), PaaS (Platform-as-a-Service), and SaaS (Software-as-a-Service). The cloud computing platform includes public cloud, private cloud, and hybrid cloud. In some examples, the server may consist of a distributed or centralized server cluster. For example, the server cluster consists of at least one physical server. Each physical server is configured with multiple virtual servers, each virtual server runs at least one functional module of the system, and the virtual servers communicate with each other via a network.

[0036] Please see Figure 1 The figure shows a flowchart of a texture model generation method according to one embodiment of this application. As shown, the texture model generation method includes steps S110, S120, and S130. The following description of each embodiment is based on the example of the texture model generation method being executed by a computer device.

[0037] In step S110, the computer device acquires a texture image and a meshed model represented by polygonal units.

[0038] In some embodiments, the texture image can be a color image or a grayscale image. Each pixel in the texture image corresponds to a pixel value, which can be a grayscale value or an RGB value depending on the texture image. The pixel values ​​of the texture image are stored in association with the pixel coordinates of the pixels, so that the pixel coordinates of the pixels can be used as an index to retrieve the pixel value of the corresponding pixel. In some examples, the pixel coordinates of the pixel vertex are used as the index. In embodiments where the origin of the pixel coordinates is located at the lower left corner of the texture image, the pixel coordinates of the lower left corner vertex of the pixel are used as the index. In embodiments where the origin of the pixel coordinates is located at the upper left corner of the texture image, the pixel coordinates of the upper left corner vertex of the pixel are used as the index.

[0039] In one embodiment, the pixel coordinates of the texture image in the width direction range from 0 to the width of the texture image, and the pixel coordinates of the texture image in the height direction range from 0 to the height of the texture image. Here, the width of the texture image refers to the number of pixels in the width direction, and the height of the texture image refers to the number of pixels in the height direction. For example, the pixel coordinates of the pixel vertex in both the width and height directions are integers; the pixel coordinates of points on the pixel edge in the width direction (excluding the pixel vertex) are integers only in the height direction; and the pixel coordinates of points on the pixel edge in the height direction (excluding the pixel vertex) are integers only in the width direction.

[0040] In another embodiment, the computer device may further process the acquired texture image to obtain normalized pixel coordinates, that is, the pixel coordinates of the processed texture image in both the width direction and the height direction are in the range of 0 to 1.

[0041] In one embodiment, the texture model generation method further includes a step of image editing the acquired texture image. Therefore, in subsequent embodiments, the computer device can execute steps S120 and S130 based on the edited texture image. Examples of image editing operations include mirroring, zooming in, or zooming out. Taking zooming in as an example, after the computer device zooms in on the acquired texture image, the number of pixels in the edited texture image increases proportionally.

[0042] In the following embodiments, for ease of explanation, the steps in the texture model generation method are described in detail using the example that the pixel coordinates of the texture image in the width direction range from 0 to the width of the texture image and the pixel coordinates of the texture image in the height direction range from 0 to the height of the texture image. In the embodiment where the pixel coordinates of the texture image range from 0 to 1, those skilled in the art can make adaptive adjustments based on the examples in the subsequent embodiments to obtain the texture model.

[0043] The meshed model expressed by polygonal units is a model formed by constructing or piecing together polygonal units. These polygonal units can be triangular units (also called triangular facets), quadrilateral units, or other polygonal units. For ease of explanation, in the following embodiments, the steps in the texture model generation method are described in detail using the meshed model as a 3D model and the polygonal units as triangular units as examples.

[0044] In one embodiment, the obtained mesh model includes at least the three-dimensional spatial coordinates of the vertices of each polygonal unit, the topological relationship of each vertex, and the mapped coordinates of the vertices of each polygonal unit.

[0045] In another embodiment, the obtained mesh model does not include the mapped coordinates of the vertices of each polygonal unit. In this embodiment, the texture model generation method further includes the step of obtaining the mapped coordinates of the vertices of each polygonal unit in the mesh model based on the mesh model and a preset unfolding algorithm. The preset unfolding algorithm is used to unfold the 3D mesh model to a two-dimensional plane. In other words, the preset unfolding algorithm can configure one- or two-dimensional mapped coordinates for each vertex in the 3D mesh model. In some examples, the preset unfolding algorithm is an Angle Based Flattening algorithm, a Least Squares Conformal Maps algorithm, a Stretch Minimization algorithm, or a Seamless Packing algorithm.

[0046] The mapped coordinates are used to locate points on pixels in the texture image; in other words, the mapped coordinates can be converted into pixel coordinates in the texture image. For example, the mapped coordinates of a vertex can correspond to a point on a pixel in the texture image. The mapped coordinates include width coordinates and height coordinates. In one example, the values ​​of the width coordinates and height coordinates range from 0 to 1. In another example, the values ​​of the width coordinates included in the mapped coordinates range from 0 to the width of the texture image, and the values ​​of the height coordinates included in the mapped coordinates range from 0 to the height of the texture image.

[0047] In one embodiment, the meshed model and the texture image are pre-stored. The texture model generation method further includes providing a model acquisition window to acquire the meshed model based on a user's trigger operation in the model acquisition window, and providing an image acquisition window to acquire the texture image based on a user's trigger operation in the image acquisition window. It should be noted that the model acquisition window and the image acquisition window can be two independent windows or two different regions within the same window.

[0048] In step S120, the computer device uses the mapped coordinates of the vertices of each polygonal unit in the update region of the meshed model to determine edge update points on the edges of each polygonal unit that can be mapped to the pixel edges in the texture image, and determines internal update points inside each polygonal unit that can be mapped to the pixel vertices in the texture image.

[0049] In some embodiments, the updated region can be a partial or complete area of ​​the meshed model. Therefore, the computer device can determine edge update points and internal update points only on each polygon cell of the partial region, or it can determine edge update points and internal update points on each polygon cell of the entire meshed model. In embodiments where the updated region is a partial region, the texture model generation method further includes detecting a user's selection operation on the meshed model to determine the polygon cell corresponding to the selection operation as the updated region. Examples of selection operations include box selection, planar selection, surface selection, or line drawing.

[0050] The edge update point that can be mapped to the pixel edge in the texture image refers to a point on the edge of a polygonal unit that corresponds to a point on the pixel edge in the texture image. The interior update point that can be mapped to the pixel vertex in the texture image refers to a point located inside a polygonal unit that corresponds to a pixel vertex in the texture image. In other words, the pixel coordinates corresponding to the mapped coordinates of the edge update point are the coordinates of a point on the pixel edge, and the pixel coordinates corresponding to the mapped coordinates of the interior update point are the coordinates of a pixel vertex. It should be noted that, for ease of explanation, in the following embodiments, the edge update point does not include the edge vertices, but this is not a limitation. In other embodiments, the edge update point may also include the edge vertices.

[0051] Please see Figure 2 The figure shows a flowchart of step S120 in one embodiment of this application. As shown, step S120 includes step S1200 and step S1201.

[0052] In step S1200, the computer device determines the pixel coordinates corresponding to each vertex based on the mapped coordinates of the vertices of each polygonal unit in the update region.

[0053] In an embodiment where the width and height coordinates of the mapped coordinates of each vertex in the updated region are both in the range of 0 to 1, and the pixel coordinates of the texture image in the width direction are in the range of 0 to the width of the texture image and the pixel coordinates of the texture image in the height direction are in the range of 0 to the height of the texture image, the computer device multiplies the width coordinate of the mapped coordinates of each vertex by the width of the texture image (i.e., the number of pixels in the width direction of the texture image), and multiplies the height coordinate of the mapped coordinates of each vertex by the height of the texture image (i.e., the number of pixels in the height direction of the texture image) to obtain the pixel coordinates corresponding to each vertex.

[0054] For example, the width of the texture image is 1600 and the height of the texture image is 900. A polygonal unit in the updated region includes three vertices: vertex A, vertex B, and vertex C. The mapped coordinates of vertex A are (5 / 16, 1 / 18), the mapped coordinates of vertex B are (1 / 16, 1 / 9), and the mapped coordinates of vertex C are (1 / 8, 2 / 9). Then, after multiplying the width coordinates of vertex A by 1600 and the height coordinates of vertex A by 900, the resulting pixel coordinates are (500, 50). Similarly, the pixel coordinates of vertex B are (100, 100), and the pixel coordinates of vertex C are (200, 200).

[0055] In an embodiment where the width coordinates of each vertex in the updated region range from 0 to the width of the texture image, the height coordinates included in the mapping coordinates range from 0 to the height of the texture image, and the pixel coordinates of the texture image in the width direction range from 0 to the width of the texture image and the pixel coordinates of the texture image in the height direction range from 0 to the height of the texture image, the computer device directly determines the mapping coordinates of each vertex as the pixel coordinates corresponding to each vertex.

[0056] In step S1201, edge update points are determined on the edge of each polygonal unit and internal update points are determined inside each polygonal unit using the pixel coordinates corresponding to each vertex.

[0057] In one embodiment, the pixel coordinates of the texture image in the width direction range from 0 to the width of the texture image, and the pixel coordinates of the texture image in the height direction range from 0 to the height of the texture image. The step of the computer device determining the edge update point on the edge of each polygonal unit using the pixel coordinates corresponding to each vertex includes determining points with integer pixel coordinates in the width direction and integer pixel coordinates in the height direction on the mapping line segment corresponding to each polygonal unit, so that the point on the edge of each polygonal unit corresponding to the determined point is used as the edge update point. The step of the computer device determining the internal update point inside each polygonal unit using the pixel coordinates corresponding to each vertex includes determining points with integer pixel coordinates in both the width and height directions within the area enclosed by the mapping line segment corresponding to each polygonal unit, so that the point inside each polygonal unit corresponding to the determined point is used as the internal update point.

[0058] The mapped line segment is a line segment whose endpoints are the pixel coordinates corresponding to the vertices of the edges of the polygonal unit. Taking a polygonal unit with pixel coordinates (500, 50) for vertex A, (100, 100) for vertex B, and (200, 200) for vertex C as an example, the three mapped line segments corresponding to the three edges of this polygonal unit are the line segment corresponding to edge AB with pixel coordinates (500, 50) and (100, 100) as endpoints, the line segment corresponding to edge AC with pixel coordinates (500, 50) and (200, 200) as endpoints, and the line segment corresponding to edge BC with pixel coordinates (100, 100) and (200, 200) as endpoints.

[0059] In one specific embodiment, the computer uses the endpoints of the mapped line segment corresponding to each polygonal unit and a linear interpolation algorithm to determine points with integer pixel coordinates in the width direction and points with integer pixel coordinates in the height direction on the mapped line segment, so as to use the points on the edge of each polygonal unit corresponding to the determined points as the edge update points.

[0060] Please see Figure 3 The figure shows a schematic diagram of the mapped line segment corresponding to a polygonal unit in the texture image in one embodiment of this application, as shown in the figure. Figure 3 The method includes three mapping segments (D1, D2, and D3) corresponding to a polygonal unit. The pixel coordinates in the width direction of points e, g, i, k, m, n, o, and p on the mapping segments D1, D2, and D3 are calculated as integers using a linear interpolation algorithm. The pixel coordinates in the height direction of points e, f, h, i, j, and l on the mapping segments D1, D2, and D3 are also calculated as integers using the same linear interpolation algorithm. Then, the points on the edge of the polygonal unit corresponding to points e, f, g, h, i, j, k, l, m, n, o, and p are used as the edge update points.

[0061] In one specific embodiment, the computer uses the endpoints of the mapped line segments corresponding to each polygonal unit and a linear interpolation algorithm to determine points with integer pixel coordinates in the width direction and integer pixel coordinates in the height direction within the area enclosed by the mapped line segments corresponding to each polygonal unit. The points on the edge of each polygonal unit corresponding to the determined points are then used as the internal update points. Please continue reading. Figure 3As shown in the figure, the mapping line segments D1, D2, and D3 corresponding to a polygonal unit enclose a region D4. Using a linear interpolation algorithm, the pixel coordinates in the width direction and the pixel coordinates in the height direction of points q, r, s, t, u, and v within region D4 are calculated to be integers. Then, the points inside the polygonal unit corresponding to points q, r, s, t, u, and v are used as the internal update points.

[0062] It should be noted that although the embodiments of this application use the endpoints of the mapped line segments and a linear interpolation algorithm as examples to illustrate how to obtain points with integer pixel coordinates in the width direction, height direction, width direction, and height direction, this is not a limitation. Those skilled in the art can determine these points using other methods based on the inspiration of the above embodiments. For example, Pick's theorem can be used.

[0063] In another embodiment, the pixel coordinates of the texture image in the width direction range from 0 to the width of the texture image, and the pixel coordinates of the texture image in the height direction range from 0 to the height of the texture image. The steps of the computer device determining the edge update point on the edge of each polygonal unit and determining the internal update point inside each polygonal unit using the mapped coordinates of the vertices of each polygonal unit in the update region of the meshed model include: determining the edge update point and the internal update point based on the mapped coordinates of the vertices of each polygonal unit in the update region and a linear interpolation algorithm.

[0064] In an embodiment where the width and height coordinates included in the mapped coordinates range from 0 to 1, the computer device uses the mapped coordinates of the vertices of each polygonal unit in the update region and a linear interpolation algorithm to determine, on the edge of each polygonal unit, points where the width coordinate multiplied by the width of the texture image is an integer and points where the height coordinate multiplied by the height of the texture image is an integer, and then uses the determined points as the edge update points; the computer device also uses the mapped coordinates of the vertices of each polygonal unit in the update region and a linear interpolation algorithm to determine, within each polygonal unit, points where the width coordinate multiplied by the width of the texture image is an integer and points where the height coordinate multiplied by the height of the texture image is an integer, and then uses the determined points as the internal update points.

[0065] In an embodiment where the width coordinates included in the mapped coordinates range from 0 to the width of the texture image, and the height coordinates included in the mapped coordinates range from 0 to the height of the texture image, the computer device uses the mapped coordinates of the vertices of each polygonal unit in the update region and a linear interpolation algorithm to determine points on each edge where the width coordinates are integers and points where the height coordinates are integers, and then uses the determined points as the edge update points; the computer device also uses the mapped coordinates of the vertices of each polygonal unit in the update region and a linear interpolation algorithm to determine points inside each polygonal unit where the width coordinates are integers and points where the height coordinates are integers, and then uses the determined points as the internal update points.

[0066] It should be noted that when the pixel coordinates of the texture image are normalized coordinates, those skilled in the art can make adaptive modifications to the method of determining the internal update points and edge update points based on the inspiration of the above embodiments.

[0067] In step S130, the computer device updates the meshed model based on the vertices of each polygonal unit in the update region, the determined edge update points of each polygonal unit, and the internal update points, and uses the texture image to generate a three-dimensional solid structure on the updated meshed model to obtain the texture model.

[0068] The three-dimensional structure (also known as the three-dimensional texture structure) is the same as or similar to that described above, and will not be repeated here.

[0069] In one embodiment, the step of updating the meshed model based on the vertices of each polygonal unit in the update region, the determined edge update points of each polygonal unit, and the internal update points of each polygonal unit includes: updating the meshed model using a vertex set containing the vertices of each polygonal unit in the update region, the determined edge update points of each polygonal unit, and the internal update points of each polygonal unit, and a preset polygonal unit model generation algorithm. Wherein, all points in the vertex set are vertices of polygonal units in the updated meshed model. Examples of the preset polygonal unit model generation algorithm include the Delaunay triangulation algorithm, the Bowyer-Watson algorithm, or the Divide and Conquer algorithm.

[0070] Please see Figure 4 The figure shows a flowchart illustrating the steps of generating a three-dimensional structure on an updated meshed model using a texture image to obtain a texture model in one embodiment of this application. As shown in the figure, the steps of obtaining the texture model include steps S1300, S1301, and S1302.

[0071] In step S1300, the computer device determines the pixel value corresponding to each vertex of each polygonal cell in the specified region based on the pixel coordinates and texture image of each polygonal cell in the specified region in the updated meshed model.

[0072] The designated region is contained within the updated region. The designated region may be the same region as the updated region, or it may be a part of the updated region. In one embodiment, the texture model generation method further includes detecting a user's selection operation on the updated meshed model to determine the polygonal unit corresponding to the selection operation as the designated region. The selection operation is the same as or similar to those described above and will not be repeated here. For example, the updated meshed model is a shoe sole model, and the updated region is the entire shoe sole model. The user performs a line-drawing operation on the entire bottom surface of the shoe sole model, and the computer device then uses the polygonal units of the entire bottom surface traversed by the line-drawing operation as the designated region.

[0073] In one embodiment, the computer device can directly determine the pixel coordinates corresponding to each vertex in the specified region based on the pixel coordinates of each vertex in the updated region obtained in the foregoing embodiments, as well as the pixel coordinates of the edge update points and the internal update points. In another embodiment, the computer device redetermines the mapping coordinates of each vertex based on the updated mesh model, and then converts the mapping coordinates of each vertex in the specified region into pixel coordinates to obtain the pixel coordinates corresponding to each vertex in the specified region. The coordinate conversion method is the same as or similar to that described in step S1200 above, and will not be repeated here.

[0074] After determining the pixel coordinates corresponding to each vertex within a specified area, the computer device then queries the pixel value corresponding to each pixel coordinate, and uses the obtained pixel value as the pixel value corresponding to the corresponding vertex. In one example, if both coordinate values ​​in the pixel coordinates corresponding to a vertex are integer values, then the pixel value represented by that pixel coordinate is directly used as the pixel value corresponding to that vertex.

[0075] For example, if a texture image has a width of 1600 and a height of 900, and the pixel coordinates of a vertex are (300, 300), and the pixel value of the pixel represented by that coordinate in the texture image is 255, then the pixel value corresponding to that vertex is 255. In another example, the pixel coordinates of a vertex may contain non-integer values ​​(e.g., the pixel coordinates are located inside or on the edge of a pixel). The computer device uses a preset sampling algorithm to determine the pixel value corresponding to that pixel coordinate. For example, the preset sampling algorithm may be a nearest neighbor sampling algorithm. Specifically, the computer device performs a rounding operation on the pixel coordinate values ​​(e.g., rounding up, rounding down, or rounding to the nearest integer) to obtain pixel coordinates where both coordinate values ​​are integers, and then determines the pixel value corresponding to the vertex based on the method described in the above embodiment. Alternatively, the preset sampling algorithm may be an interpolation sampling algorithm. For instance, if the pixel coordinates of a vertex are located on the common edge of two pixels, the computer device performs data processing operations such as averaging the pixel values ​​of the two pixels to obtain the pixel value corresponding to the vertex.

[0076] Although the above embodiments use interpolation sampling algorithm or neighbor sampling algorithm as examples to explain in detail how to query the pixel value corresponding to non-integer pixel coordinates, they are not limited thereto. Those skilled in the art can make adaptive adjustments to the preset sampling algorithm based on the inspiration from the above embodiments.

[0077] In step S1301, the offset of each vertex is determined by using the pixel value and grayscale offset parameter corresponding to each vertex of each polygonal unit.

[0078] The grayscale offset parameter includes the offset corresponding to the highest grayscale value and the offset corresponding to the lowest grayscale value. Specifically, the offset corresponding to the highest grayscale value is the offset corresponding to the grayscale value 255, and the offset corresponding to the lowest grayscale value is the offset corresponding to the grayscale value 0. The offset corresponding to a vertex is used to represent the offset distance and offset direction of the vertex. A positive offset corresponding to a vertex indicates that the offset direction of the vertex is the normal direction of the polygon cell containing the vertex, and a negative offset corresponding to a vertex indicates that the offset direction of the vertex is the opposite direction of the normal direction of the polygon cell containing the vertex.

[0079] In one embodiment, the texture model generation method further includes the step of providing a parameter configuration window for a user to input the grayscale offset parameter. See also... Figure 5The figure shows a schematic diagram of the parameter configuration window in one embodiment of this application. As shown, the box after the text "white offset" in the parameter configuration window is used for the user to input the offset corresponding to the highest grayscale value, and the box after the text "black offset" is used for the user to input the offset corresponding to the lowest grayscale value. It should be noted that this application does not limit the specific representation of the parameter configuration window, and those skilled in the art can also make adaptive adjustments to the content and interface layout of the parameter configuration window under the guidance of this application.

[0080] In one embodiment, the computer device uses a linear interpolation algorithm to determine the offset corresponding to each vertex. Specifically, the computer device uses a linear interpolation algorithm to linearly interpolate the grayscale offset parameter based on the pixel values ​​corresponding to each vertex of each polygonal unit, thereby determining the offset corresponding to each vertex. In one example, if the pixel value corresponding to a vertex is a grayscale value x, the offset corresponding to the highest grayscale value x1 is y1, and the offset corresponding to the lowest grayscale value x0 is y0, then the offset corresponding to this vertex is y0 + (x - x0) × (y1 - y0) / (x1 - x0). Based on the above formula, the offset corresponding to each vertex can be determined. In another example, if the pixel value corresponding to a vertex is an RGB value, then the RGB value needs to be converted to a grayscale value before using a linear interpolation algorithm to determine the offset corresponding to each vertex.

[0081] In step S1302, the computer device offsets each vertex based on the offset of each vertex, and connects the offset vertices according to the topological relationship of each vertex before offset to generate a three-dimensional solid structure on the specified area, thereby obtaining a texture model.

[0082] In one embodiment, please refer to Figure 6 The figure shows a flowchart illustrating the steps of generating a three-dimensional structure on a specified area in one embodiment of the present application. As shown, the steps of generating a three-dimensional structure on a specified area include steps S13020 and S13021.

[0083] In step S13020, the computer device offsets each vertex according to the offset corresponding to each vertex to obtain each offset vertex.

[0084] In one embodiment, the offset corresponding to each vertex indicates the offset distance and direction of each vertex. Each vertex is offset according to its corresponding offset distance and direction to obtain the offset vertices. See also... Figure 7 and Figure 8 , Figure 7 The diagram shown is a schematic representation of an updated meshed model in one embodiment of this application. Figure 8 This application is displayed. Figure 7A schematic diagram of the connection relationship between vertices before and after offset on some boundaries in the embodiment is shown in the figure. Figure 7 The updated mesh model Z shown has an edge Z1 consisting of vertices w1, w2, w3, and w4. Figure 7 The edge corresponding to the red line in the middle is part of the updated mesh model Z. After offsetting vertex w1 according to the offset distance and offset direction, we get the offset vertex w11. Similarly, we get the offset vertex w21, offset vertex w31, and offset vertex w41.

[0085] In step S13021, the computer device connects the vertices after offset according to the topological relationship of each vertex before offset, and connects the vertices that were on the boundary before offset with the corresponding vertices after offset, so as to generate a three-dimensional structure in the specified area.

[0086] The topological relationship of the vertices before the offset refers to the connection relationship between the vertices before the offset. The vertices on the boundary before the offset are vertices located on the edge of the specified region.

[0087] In one embodiment, please continue to refer to Figure 8 The computer connects the previously offset vertices w1, w2, w3, and w4 according to their connection relationships (i.e., connecting the previously offset vertices w1 and w2, w2 and w3, and w3 and w4), and then connects the offset vertices w11 and w21, w21 and w31, and w31 and w41. Since the previously offset vertices w1, w2, w3, and w4 are all points on the boundary, it is necessary to connect the previously offset vertices w1 and w11, w2 and w21, w3 and w31, and w4 and w41.

[0088] Furthermore, to ensure that the sides of the three-dimensional structure are composed of polygonal units (e.g., triangular units), step S13021 further includes connecting vertices that were on the boundary before offset to their adjacent offset vertices. The adjacent offset vertices are the offset vertices corresponding to the vertices directly connected to the vertices that were on the boundary before offset. For example, please refer to... Figure 8The vertex directly connected to the vertex w1 before the offset is w2, and the vertex after the offset of vertex w2 is w21. Connect vertex w1 to vertex w21. Similarly, connect vertex w2 to vertex w31, and connect vertex w3 to vertex w41.

[0089] The three-dimensional structure obtained based on steps S13020 and S13021 has a vertical side. This vertical side is connected to the boundary of the designated region and is perpendicular to the polygonal unit on the boundary connected to the vertical side. It should be noted that this perpendicularity can also be approximately perpendicular; for example, the angle between the vertical side and the polygonal unit on the boundary connected to the vertical side is between 89° and 91°. For example, please refer to... Figure 9 The figure shows a partial schematic diagram of a three-dimensional solid structure generated on a sheet model in one embodiment of this application. As shown in the figure, the side Z2 of the three-dimensional solid structure is a vertical side.

[0090] In one embodiment, please refer to Figure 10 The figure shows a flowchart illustrating the steps of generating a three-dimensional structure on a specified area in another embodiment of this application. As shown, the steps of generating a three-dimensional structure on a specified area include steps S13022, S13023, and S13024.

[0091] In step S13022, the computer device determines the shortest distance from each vertex in the specified area to the boundary of the specified area, and multiplies the shortest distance of each vertex by the tangent of a preset tilt angle to obtain the alternative offset of each vertex.

[0092] In one embodiment, the texture model generation method further includes the step of providing an angle configuration window for a user to input the preset tilt angle. See also... Figure 11 The figure shows a schematic diagram of the angle configuration window in one embodiment of this application. As shown, the inverted triangle graphic in the box following the text "Side Type" in the angle configuration window is for user triggering. After the computer device detects the user's triggering operation on the inverted triangle graphic, it displays a selection interface, allowing the user to select whether the side of the generated three-dimensional structure is an inclined side or a vertical side. After selecting an inclined side, the user enters the preset inclination angle in the box following the text "Preset Inclination Angle". It should be noted that this application does not limit the specific representation of the angle configuration window, and those skilled in the art can also make adaptive adjustments to the content and interface layout of the angle configuration window under the guidance of this application.

[0093] In one embodiment, the computer device uses a preset distance calculation algorithm to determine the shortest distance from each vertex within a specified region to the boundary of the specified region. Examples of the preset distance calculation algorithm include a sign-distance function-based algorithm and a nearest-point projection-based algorithm. Taking the sign-distance function-based algorithm as an example, the sign-distance function based on the updated mesh model can determine the sign-distance value of each vertex within the specified region, and the absolute value of the sign-distance value of each vertex is determined as the shortest distance from each vertex to the boundary of the specified region.

[0094] After determining the shortest distance from each vertex to the boundary of the specified region, the computer multiplies this shortest distance by the tangent of a preset tilt angle and uses the resulting value as the candidate offset for each vertex. In one example, the preset tilt angle is 45°, so the shortest distance from each vertex to the boundary of the specified region is directly used as the candidate offset for each vertex.

[0095] In step S13023, the computer device takes the minimum value between the candidate offsets and the determined offsets of each vertex as the actual offset of each vertex, and offsets each vertex according to the actual offset of each vertex to obtain each offset vertex.

[0096] In one embodiment, if the candidate offset of a vertex is greater than the offset of the vertex determined in step S1301, then the offset of that vertex is taken as the actual offset of the vertex. If the candidate offset of a vertex is less than the offset of the vertex determined in step S1301, then the candidate offset of that vertex is taken as the actual offset of the vertex. Thus, the actual offset of each vertex can be obtained according to the above-described determination method. The computer device offsets each vertex according to its actual offset to obtain the offset vertices. It should be noted that the method of offsetting each vertex according to its actual offset is the same as or similar to the method of offsetting each vertex according to its offset in step S13020, and will not be repeated here.

[0097] In step S13024, the computer device connects the offset vertices according to the topological relationship of each vertex before offset, so as to generate the three-dimensional structure in the specified area.

[0098] In one embodiment, the computer device connects the vertices after the offset according to the topological relationship of each vertex before the offset in the same or similar way as described in step S13021, and will not be repeated here.

[0099] The three-dimensional structure obtained based on steps S13022, S13023, and S13024 has an inclined side. The inclined side is connected to the boundary of the designated region, and the angle between the inclined side and the polygonal unit on the boundary connected to the inclined side is approximately the preset inclination angle. For example, please refer to... Figure 12 The figure shows a partial schematic diagram of a three-dimensional structure generated on a sheet model in another embodiment of this application. As shown, the side Z3 of the three-dimensional structure is an inclined side. When the side of the three-dimensional structure is an inclined side, the printed part based on the texture model can have certain advantages. For example, when the texture model is a shoe sole model, the inclined side of the three-dimensional structure on the sole is beneficial for walking and gait transition.

[0100] It should be noted that the inclined side of the three-dimensional structure connected to the boundary of the specified region is an approximate plane. This application does not require the inclined side to be a strictly plane. For example, the surface of the inclined side may include local small undulations or microstructures.

[0101] The mesh model after generating a three-dimensional structure on a specified area of ​​the updated mesh model, according to the method described in any of the above embodiments, is used as the texture model.

[0102] In one embodiment, due to the different shapes and structures of the specified regions, the generated texture model may contain self-intersecting elements. A self-intersecting texture model refers to a model where parts that should not intersect actually cross each other in three-dimensional space; such a texture model violates geometric continuity. For example, please refer to... Figure 13 The figure shows a partial two-dimensional schematic diagram of the texture model in one embodiment of this application. As shown, the offset vertices (w51, w61, w71, w81, and w91) are connected according to the topological relationship of the vertices before offset (vertices w5, w6, w7, w8, and w9), resulting in... Figure 13 In the texture model, edge Z4 and edge Z5 intersect each other.

[0103] Therefore, the texture model generation method further includes the step of extracting the outer contour of the texture model to generate a self-intersecting texture model based on the extracted outer contour. See also... Figure 14 and combined Figure 13 , Figure 14 This is displayed as an option to retrieve this application. Figure 13 A partial two-dimensional schematic diagram of the texture model generated after extracting the outer contour of the texture model corresponding to the illustrated embodiment is shown in the figure. The computer device extracts... Figure 13 The corresponding texture model's outer contour can be used to generate Figure 14The corresponding texture model without self-intersections. In this embodiment, there is no need to detect self-intersections; a texture model without self-intersections can be generated simply by extracting the outer contour of the generated texture model.

[0104] To reduce the amount of data in the texture model, the texture model generation method further includes a step of simplifying the texture model based on a simplification threshold.

[0105] In some embodiments, the simplification threshold is a geometric error or a height variation threshold. The geometric error is used to constrain the degree of deviation in geometry between the simplified texture model and the original texture model. For example, if the geometric error is the maximum offset, then the offset of a vertex in the simplified texture model from the corresponding vertex in the original texture model is not greater than the maximum offset. The height variation threshold is used to constrain the height variation of polygonal units that can be merged, and the computer device can merge multiple polygonal units whose height variation meets the height variation threshold into one polygonal unit.

[0106] In one embodiment, the texture model generation method also provides a threshold input window for a user to input the simplified threshold.

[0107] It should be noted that in the step of simplifying the texture model based on the simplification threshold, the simplification can be based on only the three-dimensional structure of the texture model or the entire texture model can be simplified.

[0108] In some embodiments, this application also proposes a texture model generation system, which can be deployed, for example, in a computer device as a software tool or software module capable of processing data, performing data processing with the help of the hardware devices and / or the operating environment provided by the operating system in the computer device.

[0109] Please see Figure 15The figure shows a block diagram of a texture model generation system according to an embodiment of this application. As shown, the texture model generation system 1 includes an acquisition module 10, an update point determination module 11, and a texture model generation module 12. The acquisition module 10 is used to acquire a texture image and a meshed model represented by polygonal units. The update point determination module 11 is used to determine edge update points that can be mapped to pixel edges in the texture image on the edges of each polygonal unit and internal update points that can be mapped to pixel vertices in the texture image on the interior of each polygonal unit using the mapped coordinates of the vertices of each polygonal unit in the update region of the meshed model. The texture model generation module 12 is used to update the meshed model according to the vertices of each polygonal unit in the update region, the determined edge update points and internal update points of each polygonal unit, and generate a three-dimensional solid structure on the updated meshed model using the texture image to obtain the texture model.

[0110] In one embodiment, the texture model generation system 1 includes an acquisition module 10, an update point determination module 11, and a texture model generation module 12, which coordinately execute the texture model generation method disclosed in any of the foregoing embodiments of this application according to the functions described above. Please refer to the documentation for... Figures 1 to 14 Any embodiments thereof described herein will not be repeated here.

[0111] The acquisition module 10, update point determination module 11, and texture model generation module 12 can also be implemented in software running on different types of processors. For example, an executable code module may include one or more physical or logical blocks of computer instructions organized as objects, programs, or functions. However, the executable files of the modules do not necessarily have to be physically located together, but may include different commands stored in different locations, which, when logically connected together, encompass the module and implement the specified objectives of the module.

[0112] Of course, the executable code module can be one or more instructions, and can even be distributed across several different code segments, different programs, and multiple storage devices. Similarly, computational data can be identified and represented within the module, and can be embodied in any suitable form and organized in any suitable data structure. The computational data can be a single dataset, or can be distributed across different locations (including different storage devices), and can exist at least partially as electrical signals within a system or network. When the module or a portion thereof is implemented in software, the software portion is stored on one or more computer-readable media.

[0113] This application also provides a computer device, including a bus, a processor, a memory, and a communication interface. The processor, memory, and communication interface communicate with each other via the bus. The computer device may be a server, a laptop computer, a desktop computer, an edge device, etc., and the embodiments of this application do not specifically limit it, nor do they limit the number of processors and memories in the computer device.

[0114] A bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one line is used in the diagram, but this does not imply that there is only one bus or one type of bus. A bus can include pathways for transmitting information between various components of a computer device (e.g., memory, processor, communication interfaces).

[0115] In one embodiment, the computer device is used to implement the texture model generation method described in any of the above embodiments. In one embodiment, the computer device is a device capable of performing digital calculations, logical processing, and information processing on data, including but not limited to: personal computers, industrial control computers, tablets, smartphones, servers, server clusters, smart terminals, cloud-based server systems, etc.

[0116] Please see Figure 16 The image shows a schematic diagram of a computer device 2 according to one embodiment of this application. The computer device 2 includes a storage device 20 and a processing device 21 connected to the storage device 20. Furthermore, the computer device also includes a communication interface 22.

[0117] In some embodiments, the storage device 20 is used to store at least one program that can be executed by the processing device 21 to coordinate the storage device 20 in implementing the texture model generation method described in any of the above embodiments. Here, the storage device 20 includes, but is not limited to, read-only memory (ROM), random access memory (RAM), and nonvolatile RAM (NVRAM). For example, the storage device 20 includes flash memory or other nonvolatile solid-state storage devices. In some embodiments, the storage device 20 may also include memory located remotely from one or more processing devices 21, such as network-attached memory accessed via RF circuitry or external ports and communication networks, wherein the communication network may be the Internet, one or more intranets, local area networks, wide area networks, storage area networks, etc., or suitable combinations thereof. A memory controller can control access to the memory by other components of the device, such as the CPU and peripheral interfaces.

[0118] In some embodiments, the processing device 21 includes one or more processors. The processing device 21 is operatively capable of performing data read and write operations with the storage device 20. The processing device 21 includes one or more general-purpose microprocessors, one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), one or more field-programmable gate arrays (FPGAs), or any combination thereof.

[0119] In some embodiments, the communication interface 22 includes at least one interface unit, each interface unit being used to output a visual interface, receive human-computer interaction events generated according to the operation of a technician, etc. For example, the communication interface 22 includes, but is not limited to, serial interfaces such as HDMI interfaces or USB interfaces, or parallel interfaces, etc. In one embodiment, the communication interface 22 further includes a network communication unit, which is a device for data transmission using wired or wireless networks, examples of which include, but are not limited to, integrated circuits including network cards, local area network modules such as WiFi modules or Bluetooth modules, and wide area network modules such as mobile networks, etc.

[0120] This application also provides a computer-readable storage medium storing at least one program that, when invoked and executed by a computer's processor, implements the texture model generation method as described in any of the above embodiments.

[0121] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the texture model generation method in any of the above embodiments.

[0122] If the method is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device with the storage medium installed to execute all or part of the steps of the methods described in the various embodiments of this application.

[0123] In the embodiments provided in this application, the provided computer storage medium may include read-only memory, random access memory, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, flash memory, USB flash drive, portable hard drive, or any other medium capable of storing desired program code in the form of instructions or data structures and accessible by a computer. Additionally, any connection may be appropriately referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. However, it should be understood that computer storage medium and data storage medium do not include connections, carrier waves, signals, or other transient media, but are intended for non-transient, tangible storage media. The disks and optical discs used in the application include compact optical discs (CDs), laser optical discs, optical discs, digital multifunction optical discs (DVDs), floppy disks, and Blu-ray discs, where disks typically copy data magnetically, while optical discs use lasers to copy data optically.

[0124] In summary, the texture model generation method, system, device, medium, and product disclosed in this application generate a texture model by determining edge update points that can be mapped to pixel edges in the texture image on the edges of each polygonal unit in the update region of the meshed model, and determining internal update points that can be mapped to pixel vertices in the texture image within each polygonal unit in the update region. The meshed model is then updated based on the determined edge update points and internal update points, and a three-dimensional structure is generated on the updated meshed model using the texture image to obtain the texture model. This ensures that the three-dimensional structure in the texture model does not suffer from geometric distortion. Furthermore, this application uses actual offsets to offset vertices, allowing the sides of the generated three-dimensional structure connected to the boundary of the specified region to be tilted sides. Even further, this application can generate a texture model without self-intersections by extracting the external contour of the texture model, thus achieving a texture model without self-intersections without detection. Furthermore, this application simplifies the texture model by simplifying the threshold, reducing the data volume of the texture model while ensuring that the three-dimensional structure does not suffer from geometric distortion.

[0125] The above embodiments are merely illustrative of the inventive essence and beneficial effects of this application, and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the principles and scope of this application. Therefore, all equivalent modifications or alterations achieved by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A method for generating texture models, characterized in that, Includes the following steps: Obtain the texture image and the meshed model represented by polygonal units; Using the mapped coordinates of the vertices of each polygonal unit in the update region of the meshed model, edge update points that can be mapped to the pixel edges in the texture image are determined on the edges of each polygonal unit, and internal update points that can be mapped to the pixel vertices in the texture image are determined inside each polygonal unit; wherein, the pixel coordinates in the width direction of the points on the pixel edges in the texture image are integers or the pixel coordinates in the height direction are integers, and the pixel coordinates in the width direction of the pixel vertices in the texture image are integers and the pixel coordinates in the height direction are integers. The mesh model is updated based on the vertices of each polygonal unit in the updated region, the determined edge update points and internal update points of each polygonal unit, and a three-dimensional solid structure is generated on the updated mesh model using the texture image to obtain the texture model; wherein, updating the mesh model includes: updating the mesh model using a vertex set containing the vertices of each polygonal unit in the updated region, the determined edge update points and internal update points of each polygonal unit, and a preset polygonal unit model generation algorithm.

2. The texture model generation method according to claim 1, characterized in that, It also includes the step of obtaining the mapped coordinates of the vertices of each polygonal unit in the meshed model based on the meshed model and a preset unfolding algorithm.

3. The texture model generation method according to claim 1, characterized in that, The width and height coordinates included in the mapping coordinates range from 0 to 1; or the width coordinates included in the mapping coordinates range from 0 to the width of the texture image and the height coordinates included in the mapping coordinates range from 0 to the height of the texture image.

4. The texture model generation method according to claim 3, characterized in that, The pixel coordinates of the texture image in the width direction range from 0 to the width of the texture image, and the pixel coordinates of the texture image in the height direction range from 0 to the height of the texture image.

5. The texture model generation method according to claim 4, characterized in that, The steps of determining the edge update point on the edge of each polygonal unit and the interior update point inside each polygonal unit using the mapped coordinates of the vertices of each polygonal unit in the update region of the meshed model include: determining the edge update point and the interior update point based on the mapped coordinates of the vertices of each polygonal unit in the update region and a linear interpolation algorithm.

6. The texture model generation method according to claim 4, characterized in that, The steps of determining the edge update point on the edge of each polygonal cell and determining the internal update point inside each polygonal cell using the mapped coordinates of the vertices of each polygonal cell in the update region of the meshed model include: Based on the mapped coordinates of the vertices of each polygonal unit in the updated region, the pixel coordinates corresponding to each vertex are determined; Using the pixel coordinates corresponding to each vertex, the edge update point is determined on the edge of each polygonal unit and the interior update point is determined inside each polygonal unit.

7. The texture model generation method according to claim 6, characterized in that, The step of determining the edge update point on the edge of each polygonal unit using the pixel coordinates corresponding to each vertex includes: On the mapping line segment corresponding to each polygonal unit, points with integer pixel coordinates in the width direction and points with integer pixel coordinates in the height direction are determined, so that the points on the edge of each polygonal unit corresponding to the determined points are used as the edge update points; wherein, the mapping line segment is a line segment with the pixel coordinates corresponding to the vertices of the edge of the polygonal unit as its endpoints.

8. The texture model generation method according to claim 6, characterized in that, The step of determining the internal update point within each polygonal unit using the pixel coordinates corresponding to each vertex includes: Within the area enclosed by the mapping line segments corresponding to each polygonal unit, points with integer pixel coordinates in the width direction and integer pixel coordinates in the height direction are determined. The points inside each polygonal unit that correspond to the determined points are used as the internal update points. The mapping line segments are line segments whose endpoints are the pixel coordinates corresponding to the vertices of the edges of the polygonal units.

9. The texture model generation method according to claim 1, characterized in that, The steps of generating a three-dimensional structure on the updated meshed model using the texture image to obtain the texture model include: Based on the pixel coordinates of each vertex of each polygonal unit within a specified region in the updated meshed model and the texture image, the pixel values ​​corresponding to each vertex of each polygonal unit within the specified region are determined; wherein, the specified region is contained within the updated region; The offset of each vertex is determined by using the pixel value and grayscale offset parameter corresponding to each vertex of each polygonal unit. Each vertex is offset based on its offset amount, and the offset vertices are connected according to the topological relationship of each vertex before offset to generate the three-dimensional solid structure in the specified area, thereby obtaining the texture model.

10. The texture model generation method according to claim 9, characterized in that, The grayscale offset parameter includes the offset corresponding to the highest grayscale value and the offset corresponding to the lowest grayscale value.

11. The texture model generation method according to claim 9, characterized in that, It also includes the step of providing a parameter configuration window for the user to input the grayscale offset parameter.

12. The texture model generation method according to claim 9, characterized in that, A positive offset for a vertex indicates that the offset direction of the vertex is the normal direction of the polygon cell containing the vertex, while a negative offset for a vertex indicates that the offset direction of the vertex is the opposite direction of the normal direction of the polygon cell containing the vertex.

13. The texture model generation method according to claim 9, characterized in that, The steps of offsetting each vertex based on its offset amount and connecting the offset vertices according to the topological relationship of the vertices before offset to generate the three-dimensional structure in the specified region include: Offset each vertex according to its corresponding offset to obtain the offset vertex; Connect the vertices after offset according to the topological relationship of each vertex before offset, and connect the vertices that were on the boundary before offset to the corresponding vertices after offset, so as to generate the three-dimensional solid structure in the specified area; wherein, the three-dimensional solid structure has a vertical side.

14. The texture model generation method according to claim 9, characterized in that, The steps of offsetting each vertex based on its offset amount and connecting the offset vertices according to the topological relationship of the vertices before offset to generate the three-dimensional structure in the specified region include: Determine the shortest distance from each vertex within the specified region to the boundary of the specified region, and multiply the shortest distance of each vertex by the tangent of a preset tilt angle to obtain the alternative offset of each vertex; The minimum value between the candidate offsets and the determined offsets of each vertex is taken as the actual offset of each vertex, and each vertex is offset according to the actual offset of each vertex to obtain the offset vertex. Connect the vertices after offset according to the topological relationship of each vertex before offset, so as to generate the three-dimensional solid structure in the specified area; wherein, the three-dimensional solid structure has inclined sides.

15. The texture model generation method according to claim 14, characterized in that, It also includes the step of providing an angle configuration window for the user to input the preset tilt angle.

16. The texture model generation method according to claim 1, characterized in that, It also includes the step of extracting the outer contour of the texture model to generate a self-intersecting texture model based on the extracted outer contour.

17. The texture model generation method according to claim 1, characterized in that, It also includes a step of simplifying the texture model based on a simplification threshold.

18. A texture model generation system, characterized in that, include: The acquisition module is used to acquire texture images and meshed models represented by polygonal units; The update point determination module is used to determine edge update points on the edges of each polygonal unit that can be mapped to pixel edges in the texture image, and to determine internal update points inside each polygonal unit that can be mapped to pixel vertices in the texture image, using the mapped coordinates of the vertices of each polygonal unit in the update region of the meshed model; wherein, the pixel coordinates in the width direction of the points on the pixel edges in the texture image are integers or the pixel coordinates in the height direction are integers, and the pixel coordinates in the width direction of the pixel vertices in the texture image are integers and the pixel coordinates in the height direction are integers. The texture model generation module is used to update the meshed model based on the vertices of each polygonal unit in the update region, the determined edge update points and internal update points of each polygonal unit, and to generate a three-dimensional solid structure on the updated meshed model using the texture image to obtain the texture model; wherein, updating the meshed model includes: updating the meshed model using a vertex set containing the vertices of each polygonal unit in the update region, the determined edge update points and internal update points of each polygonal unit, and a preset polygonal unit model generation algorithm.

19. A computer device, characterized in that, include: Storage device for storing at least one program; A processing device, connected to the storage device, is configured to implement the texture model generation method as described in any one of claims 1 to 17 when it invokes and executes the at least one program from the storage device.

20. A computer-readable storage medium, characterized in that, The system stores at least one program that, when invoked and executed by a computer's processor, implements the texture model generation method as described in any one of claims 1 to 17.

21. A computer program product, characterized in that, When the computer program product is run on a computer, the computer causes the computer to perform the texture model generation method as described in any one of claims 1 to 17.

Citation Information

Patent Citations

  • Method for generating surface 3D texture through feature array

    CN115984442A

  • Automatic remeshing by mapping a 2d grid on 3D genus-g meshes based on topological analysis

    US20090128556A1