Method for processing three-dimensional model texture, device, and storage medium

By constructing and dividing axis alignment polygons, the texture of the three -dimensional model texture of the three -dimensional model solves the problem of excessive redundant texture information in the cutting process, and improves the display efficiency and the consistency of the texture.

WO2025016224A1PCT designated stage expired Publication Date: 2025-01-23HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD

Patent Information

Application Number
PCT/CN2024/103933
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-14
Filing Date
2024-07-05
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

The prior art often uses the axis-aligned enclosure box method when cropping three-dimensional model texture images, resulting in the cropped texture images containing a large amount of redundant texture information, occupying more storage, calculation and display resources, and reducing model display efficiency.

Method used

By constructing an axis-aligned polygon that surrounds the target parameterized grid and dividing it into multiple rectangular position areas, the corresponding rectangular texture image area is determined from the original texture image, these areas are reorganized, and the reorganized texture image is generated to Reduce redundant texture information.

Benefits of technology

Effectively reduce the amount of redundant texture information in the texture image after the reorganization, improve the display efficiency of the three -dimensional model, and ensure the consistency of the sticker effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024103933_23012025_PF_FP_ABST
    Figure CN2024103933_23012025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a method for processing three-dimensional (3D) model texture, a device, and a storage medium. The method comprises: in response to a selection operation on a target 3D geometric model to be displayed in an original 3D geometric model, determining a target parametric mesh corresponding to the target 3D geometric model, the target parametric mesh comprising the surface elements in the target 3D geometric model and original texture coordinates corresponding to vertices of the surface elements; determining an axis-aligned polygon surrounding the target parametric mesh, and segment the axis-aligned polygon to obtain a plurality of rectangular positional regions; determining, from within an original texture image, a plurality of rectangular texture image regions corresponding to the plurality of rectangular positional regions; recombining the plurality of rectangular texture image regions and obtaining a recombined texture image; and displaying the target 3D geometric model on the basis of the recombined texture image to output a target 3D model. By constructing an axis-aligned polygon to approximate a texture region which must be referenced, the introduction of redundant texture information is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Three-dimensional model texture processing method, device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on July 14, 2023, with application number 202310871161.7 and application name “Three-dimensional model texture processing method, device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present invention relates to the field of image processing technology, and in particular to a three-dimensional model texture processing method, device and storage medium. Background Art

[0003] With the development and popularization of hardware devices such as sensors and the widespread application of technologies like digital twins, the models acquired by three-dimensional (3D) model acquisition equipment are becoming increasingly accurate and larger in size, placing increasing pressure on storage, transmission, and computing. However, the performance of hardware such as graphics cards and CPUs on ordinary computers is limited. To efficiently load and display large-scale 3D models, only a small 3D model is often loaded and displayed at a time, reducing the load on the CPU, graphics card, and other hardware.

[0004] The three-dimensional model finally presented on the screen is actually composed of two parts of data: a three-dimensional geometric model and a two-dimensional texture image. That is to say, the hardware device needs to load a small three-dimensional geometric model and the corresponding texture image, and then use the texture image to display the three-dimensional geometric model to obtain the final displayed three-dimensional model.

[0005] Based on this, when a small 3D geometric model needs to be loaded, the original texture image corresponding to the large 3D geometric model needs to be cropped to obtain a texture image corresponding to the small 3D geometric model, and the texture image is loaded to display the small 3D geometric model based on the texture image. However, the current method for cropping original texture images is to crop the original texture image based on an axis-aligned bounding box. This results in the cropped texture image containing a large amount of redundant texture information, i.e., texture information that does not correspond to the small 3D geometric model. The redundant texture information consumes more storage, computing, display and other resources, reducing the efficiency of model display.

[0006] Summary of the Invention

[0007] The embodiments of the present invention provide a three-dimensional model texture processing method, device and storage medium for reducing redundant texture information.

[0008] In a first aspect, an embodiment of the present invention provides a method for processing textures of a three-dimensional model, the method comprising:

[0009] In response to a selection operation of a target three-dimensional geometric model to be displayed in the original three-dimensional geometric model, determining a target parameterized mesh corresponding to the target three-dimensional geometric model, the target parameterized mesh including original texture coordinates corresponding to each facet and vertices of each facet in the target three-dimensional geometric model, the original texture coordinates being texture coordinates corresponding to an original texture image corresponding to the original three-dimensional geometric model;

[0010] determining an axis-aligned polygon that encloses the target parameterized mesh, wherein each side of the axis-aligned polygon is parallel to a texture coordinate axis;

[0011] splitting the axis-aligned polygon to obtain a plurality of rectangular location regions;

[0012] Determine, from the original texture image, a plurality of rectangular texture image regions corresponding to the plurality of rectangular position regions;

[0013] Recombining the plurality of rectangular texture image regions to obtain a recombined texture image;

[0014] The target three-dimensional geometric model is displayed according to the reconstructed texture image to obtain the target three-dimensional model.

[0015] In a second aspect, an embodiment of the present invention provides a three-dimensional model texture processing device, the device comprising:

[0016] a parameterized mesh determination module, configured to, in response to a selection operation of a target three-dimensional geometric model to be displayed in the original three-dimensional geometric model, determine a target parameterized mesh corresponding to the target three-dimensional geometric model, wherein the target parameterized mesh includes original texture coordinates corresponding to each facet and vertices of each facet in the target three-dimensional geometric model, wherein the original texture coordinates are texture coordinates corresponding to an original texture image corresponding to the original three-dimensional geometric model;

[0017] a texture image cropping module, configured to determine an axis-aligned polygon surrounding the target parameterized mesh, segment the axis-aligned polygon to obtain a plurality of rectangular location regions, and determine a plurality of rectangular texture image regions corresponding to the plurality of rectangular location regions from the original texture image, wherein each side of the axis-aligned polygon is parallel to a texture coordinate axis;

[0018] A texture image recombining module, configured to recombine the plurality of rectangular texture image regions to obtain a recombined texture image;

[0019] The three-dimensional model display module is used to display the target three-dimensional geometric model according to the reconstructed texture image to obtain the target three-dimensional model.

[0020] In a third aspect, an embodiment of the present invention provides an electronic device comprising: a memory, a processor, and a communication interface; wherein, the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the three-dimensional model texture processing method described in the first aspect.

[0021] In a fourth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the three-dimensional model texture processing method described in the first aspect.

[0022] In a fifth aspect, an embodiment of the present invention provides a three-dimensional model texture processing method, the method comprising:

[0023] Receiving a request triggered by a user device by invoking a 3D model clipping service in the cloud, the request including a target 3D geometric model to be displayed selected from an original 3D geometric model and an original texture image corresponding to the original 3D geometric model;

[0024] The following steps are performed using the processing resources corresponding to the 3D model clipping service:

[0025] Determining a target parameterized mesh corresponding to the target three-dimensional geometric model, wherein the target parameterized mesh includes original texture coordinates corresponding to each facet and vertices of each facet in the target three-dimensional geometric model, wherein the original texture coordinates are texture coordinates corresponding to the original texture image;

[0026] determining an axis-aligned polygon that encloses the target parameterized mesh, wherein each side of the axis-aligned polygon is parallel to a texture coordinate axis;

[0027] splitting the axis-aligned polygon to obtain a plurality of rectangular location regions;

[0028] Determine, from the original texture image, a plurality of rectangular texture image regions corresponding to the plurality of rectangular position regions;

[0029] Recombining the plurality of rectangular texture image regions to obtain a recombined texture image;

[0030] The recombined texture image is fed back to the user equipment, so that the user equipment performs display processing on the target three-dimensional geometric model according to the recombined texture image to obtain the target three-dimensional model.

[0031] In an embodiment of the present invention, for a large-scale stored original 3D geometric model and its corresponding original texture image, a portion of the 3D model can be displayed at a time to enable users to view the display screen more quickly and reduce the hardware loading and display load. To this end, when a selection operation is received for a target 3D geometric model currently to be displayed within the original 3D geometric model, a target parameterized mesh corresponding to the target 3D geometric model is first determined. The target parameterized mesh includes each facet in the target 3D geometric model and the original texture coordinates corresponding to each facet's vertices. Then, an axis-aligned polygon is determined that encloses the target parameterized mesh. Simply put, the axis-aligned polygon is a circumscribed polygon that encloses the target parameterized mesh, and the edges of the polygon are all parallel to the texture coordinate axes. This provides a prerequisite for subsequently segmenting the axis-aligned polygon into multiple rectangular location regions. Subsequently, multiple rectangular texture image regions corresponding to the multiple rectangular location regions are determined from the original texture image. The multiple rectangular texture image regions are reassembled to obtain a reassembled texture image. The target 3D geometric model is then displayed based on the reassembled texture image to output the target 3D model. The above-mentioned axis-aligned polygon is used to include all the texture coordinates required for displaying the target three-dimensional geometric model, and irrelevant texture coordinates are excluded from the axis-aligned polygon as much as possible, thereby greatly reducing the redundant texture information contained in the reconstructed texture image, which is beneficial to ensuring the efficiency of map display. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0033] FIG1 is a flow chart of a three-dimensional model texture processing method provided by an embodiment of the present invention;

[0034] FIG2 is a schematic diagram of a texture image;

[0035] FIG3 is a schematic diagram of a texture image segmentation method that generates a large amount of redundant texture information;

[0036] FIG4 is a schematic diagram of an axis-aligned polygon provided by an embodiment of the present invention;

[0037] FIG5 is a schematic diagram of performing rectangular segmentation on an axis-aligned polygon according to an embodiment of the present invention;

[0038] FIG6 is a flowchart of constructing an axis-aligned polygon according to an embodiment of the present invention;

[0039] 7a-7b are schematic diagrams of a construction process of an axis-aligned polygon in the embodiment shown in FIG6 ;

[0040] FIG8 is a flowchart of a texture reconstruction method provided by an embodiment of the present invention;

[0041] FIG9 is a flowchart of a display processing method based on a reconstructed texture image according to an embodiment of the present invention;

[0042] FIG10 is a flowchart of a three-dimensional model texture processing method provided by an embodiment of the present invention;

[0043] FIG11 is a schematic diagram of a facet clipping process provided by an embodiment of the present invention;

[0044] FIG12 is a schematic diagram of an application of a three-dimensional model texture processing method provided by an embodiment of the present invention;

[0045] FIG13 is a schematic diagram of an application of a three-dimensional model texture processing method provided by an embodiment of the present invention;

[0046] FIG14 is a schematic structural diagram of a three-dimensional model texture processing device provided by an embodiment of the present invention;

[0047] FIG15 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0049] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0050] The following describes some embodiments of the present invention in detail with reference to the accompanying drawings. The following embodiments and features thereof may be combined with one another unless they conflict with each other. Furthermore, the sequence of steps in the following method embodiments is provided for illustrative purposes only and is not intended to be a strict limitation.

[0051] First, the terms or concepts involved in the embodiments of the present invention are explained:

[0052] Axis-Aligned Bounding Box (AABB): The smallest rectangle that can enclose a given model and has sides parallel to the coordinate axes.

[0053] Quad-tree: A tree-like data structure where each non-leaf node has four child nodes.

[0054] Axis-aligned polygon: A polygon whose sides are all parallel to the coordinate axes.

[0055] Texture coordinates, usually expressed as UV coordinates, define the position information of each point on the texture image. These points are interconnected with the geometric model to determine the position of the texture map on the surface of the geometric model.

[0056] The three-dimensional model texture processing method provided by the embodiment of the present invention can be executed by an electronic device. In actual applications, the electronic device can be a server or a user terminal such as a PC. The server can be a cloud server or a user-side server.

[0057] The solution provided by the embodiment of the present invention can be applied to the application scenario of cropping and displaying a large-scale three-dimensional model, that is, only a local model of the large three-dimensional model is loaded and displayed each time.

[0058] FIG1 is a flow chart of a 3D model texture processing method provided by an embodiment of the present invention. As shown in FIG1 , the method includes the following steps:

[0059] 101. In response to a selection operation of a target three-dimensional geometric model to be displayed in the original three-dimensional geometric model, a target parametric mesh corresponding to the target three-dimensional geometric model is determined. The target parametric mesh includes original texture coordinates corresponding to each face element in the target three-dimensional geometric model and the vertices of each face element. The original texture coordinates are texture coordinates corresponding to the original texture image corresponding to the original three-dimensional geometric model.

[0060] 102. Determine an axis-aligned polygon that encloses the target parameterized mesh, where each side of the axis-aligned polygon is parallel to the texture coordinate axis.

[0061] 103. Split the axis-aligned polygon to obtain a plurality of rectangular position regions, and determine a plurality of rectangular texture image regions corresponding to the plurality of rectangular position regions from the original texture image.

[0062] 104. Recombining multiple rectangular texture image regions to obtain a recombined texture image.

[0063] 105. Display processing is performed on the target three-dimensional geometric model according to the reconstructed texture image to obtain the target three-dimensional model.

[0064] In practical applications, a 3D model acquisition device can be used to pre-collect and model a spatial scene (such as a residential complex) or a three-dimensional object (such as a vehicle) to obtain a raw 3D model. This raw 3D model consists of two parts: a geometric model representing the geometric structure, called the raw 3D geometric model, and a texture image, called the raw texture image. In other words, after obtaining these two parts of data through the raw acquisition and modeling process, they are stored and subsequently displayed based on these two parts when the raw 3D model needs to be displayed.

[0065] The original texture image is shown in Figure 2, where the two texture coordinate axes are denoted as u and v, and the texture coordinates can be represented as (ui,vi), with a value range of (0,0) to (1,1). The original texture image includes several pixels, each representing a texture value. Assume that the width and height of the original texture image are w0 and h0, respectively. In Figure 2, each pixel is represented by a square.

[0066] The original three-dimensional geometric model contains a number of facets, that is, the surface of the geometric model is composed of a number of facets of a set shape. Common facets include triangular facets. The storage of the original three-dimensional geometric model can specifically store the three-dimensional spatial coordinates (xyz coordinates) and the two-dimensional texture coordinates (uv coordinates) of the vertices of each facet. Therefore, for ease of description, it can be considered that the original three-dimensional geometric model records the spatial coordinates and texture coordinates of the vertices of each facet.

[0067] In reality, there's a correspondence between the original 3D geometric model and the original texture image, achieved through texture coordinates. Because the original texture image records the texture value (or color value) corresponding to each texture coordinate, the original texture image can be queried to determine the color of each facet based on the texture coordinates of each vertex in the original 3D geometric model.

[0068] Based on the above introduction, let's first briefly explain the display processing process of the original three-dimensional model under normal circumstances: load the original three-dimensional geometric model through the CPU or graphics card to obtain the texture coordinates of the vertices of each face element, and then use a certain interpolation algorithm to determine the texture coordinates of each point in a face element based on the texture coordinates of each vertex of the face element, and then query the original texture image to determine the texture value corresponding to each point. In this way, based on the texture value corresponding to each spatial coordinate point in the original three-dimensional geometric model, rendering processing can be performed to display the corresponding three-dimensional model (including texture).

[0069] In this embodiment, it is assumed that the original 3D model is a large model, that is, its corresponding data volume is greater than a set threshold. Based on this assumption, when the original 3D model needs to be displayed on the screen, the corresponding original 3D geometric model and original texture image are not loaded all at once for display processing. Instead, the original 3D model can be displayed step by step, that is, only a local sub-model of the original 3D geometric model and the local texture image corresponding to the local sub-model are loaded from the original texture image each time. In this embodiment, the local sub-model currently to be loaded and displayed is referred to as the target 3D geometric model.

[0070] In practical applications, the target 3D geometric model can be manually selected by the user or automatically determined based on a set cutting method. For example, the user can be provided with the value ranges corresponding to the spatial coordinates of the complete original 3D geometric model in the three coordinate axis directions, and the user can determine the target 3D geometric model by entering the coordinate range to be cut in each coordinate axis direction. Alternatively, the original 3D geometric model can be displayed on the screen first, and the user can select the target 3D geometric model to be displayed by selecting it.

[0071] In this embodiment, the texture image finally obtained corresponding to the target three-dimensional geometric model is called a reconstructed texture image. It can be understood that, first, the texture values ​​in the reconstructed texture image all come from the original texture image; second, the closer the reconstructed texture image is to the texture image area corresponding to the target three-dimensional geometric model in the original texture image, the better, because this can ensure a consistent mapping effect.

[0072] Regarding the second point, it can be understood as follows: first, the reconstructed texture image should contain as little redundant texture information as possible, that is, it should contain as few texture values ​​corresponding to spatial points that are irrelevant to the target three-dimensional geometric model as possible; secondly, assuming that the original three-dimensional geometric model is displayed based on the original texture image, the mapping effect corresponding to the target three-dimensional geometric model is S1, and the mapping effect obtained after displaying the target three-dimensional geometric model based on the reconstructed texture image is S2, S1=S2 can obtain a consistent mapping effect.

[0073] Therefore, for the target 3D geometric model, it is crucial to obtain a high-quality reconstructed texture image with less redundant texture information.

[0074] For ease of understanding, a method for obtaining a reconstructed texture image containing more redundant texture information is illustrated below in conjunction with Figure 3. This method can be called a texture image acquisition method based on an axis-aligned bounding box. Assuming that the outer rectangular box in Figure 3 represents the border of the original texture image, for a triangular face element in the target three-dimensional geometric model, assuming that the uv coordinates corresponding to its three vertices are (u1, v1), (u2, v2), and (u3, v3) as shown in the figure, determine a circumscribed rectangular texture area K (an axis-aligned bounding box) containing these three uv coordinates. Based on this, for the several triangular face elements contained in the target three-dimensional geometric model, several corresponding rectangular texture areas can be determined in the original texture image. These rectangular texture areas are reconstructed (which can be simply understood as splicing them into a large rectangular image that can accommodate these rectangular texture areas) to finally obtain a reconstructed texture image, the size of which is smaller than the original texture image. In the above example, since each texture rectangular area contains a large amount of redundant texture information, that is, it contains a large number of texture values ​​that are not located in the triangular area defined by the three UV coordinates, the reconstructed texture image contains a large amount of redundant texture information. When the target three-dimensional geometric model is displayed based on the reconstructed texture image, it is impossible to obtain a mapping effect consistent with that obtained when the display is based on the original texture image. It is understandable that the reason why the triangular texture area defined by the three UV coordinates cannot be directly cut out is that, on the one hand, the image (the texture area is also a small image) is actually rectangular, and there is actually no triangular image. On the other hand, when the reconstructed texture image is obtained by reorganizing the triangular texture area to obtain a rectangular reconstructed texture image, the quality of the reconstructed texture image may be worse, for example, there may be many empty areas.

[0075] Another example is another texture clipping method based on axis-aligned bounding box: based on the texture coordinates corresponding to the boundary vertices in the target three-dimensional geometric model, the rectangular box enclosing the texture coordinates corresponding to the boundary vertices is directly cut out from the original texture image, and the texture image in the rectangular box is cut out. At this time, the texture image obtained also contains more redundant texture information.

[0076] In this embodiment, multiple rectangular texture image areas corresponding to the target three-dimensional geometric model are segmented from the original texture image through the above steps 101-103, and then these multiple rectangular texture image areas are reorganized to obtain a reorganized texture image. At this time, the reorganized texture image obtained contains less redundant texture information.

[0077] First, extract the parametric mesh. This involves determining the target parametric mesh (also called the target UV mesh) corresponding to the target 3D geometric model. Each vertex in the target 3D geometric model stores both spatial and texture coordinates. By retaining only the texture coordinates for each vertex, the target parametric mesh in the 2D plane can be obtained. Simply put, this involves performing UV unwrapping on the target 3D geometric model to obtain the corresponding UV mesh.

[0078] Since the target parameterized mesh contains both the geometric structure features and texture coordinate information of the target three-dimensional geometric model, it can be used as an intermediate tool to determine multiple rectangular texture image areas corresponding to the target three-dimensional geometric model, wherein the geometric structure features of the target three-dimensional geometric model refer to the various face elements and the vertices of each face element in the target three-dimensional geometric model, and the texture coordinate information contained in the target parameterized mesh is the original texture coordinates corresponding to the vertices of each face element in the target three-dimensional geometric model, and the original texture coordinates refer to the texture coordinates corresponding to the vertices in the original texture image.

[0079] Next, an axis-aligned polygon is constructed to enclose the target parameterized mesh. Here, each side of the axis-aligned polygon is parallel to the texture coordinate axes, that is, each side of the axis-aligned polygon is parallel to the u-axis or the v-axis. For example, the polygon shown in Figure 4 is an axis-aligned polygon. The method for constructing an axis-aligned polygon will be described in the examples below and will not be elaborated on here.

[0080] In this embodiment, an axis-aligned polygon is constructed to approximate the texture area required to be referenced by the target three-dimensional geometric model, and the texture area is contained in the axis-aligned polygon. Compared with directly using an axis-aligned bounding box (i.e., a rectangle) to delineate the texture area required to be referenced by the target three-dimensional geometric model, less redundant texture information can be introduced.

[0081] Afterwards, the axis-aligned polygon is partitioned into rectangles to obtain a plurality of rectangular position regions. Optionally, a motorcycle graph algorithm can be used to perform rectangular partitioning on the axis-aligned polygon. Simply put, the vertices of the corner points of the axis-aligned polygon (with an internal angle of 3π / 2) can be determined, and a ray can be simultaneously emitted from each corner point. The ray is emitted toward the interior of the axis-aligned polygon in a direction perpendicular to the texture coordinate axis, and stops when it encounters other rays or the boundary of the axis-aligned polygon. When all rays have stopped, the trajectories of these rays have partitioned the axis-aligned polygon into a plurality of rectangular position regions.

[0082] For ease of understanding, Figure 5 illustrates a segmentation result obtained by performing rectangular segmentation on the axis-aligned polygon in Figure 4. The axis-aligned polygon has three corner points, represented by dots, and three rays emitted from these corner points are shown in Figure 5. Based on these three rays, the axis-aligned polygon is segmented into the four rectangular locations shown in Figure 5.

[0083] It can be understood that since the axis-aligned polygon is surrounded by the target parametric grid, the multiple rectangular position areas obtained by rectangular segmentation of the axis-aligned polygon actually divides the target parametric grid into multiple rectangular position areas, and then the several face elements contained in the target parametric grid will also be divided into different rectangular position areas based on the segmentation result.

[0084] Then, by locating these multiple rectangular position areas in the original texture image, the texture image area falling within each rectangular position area can be obtained, thereby obtaining multiple rectangular texture image areas corresponding to the multiple rectangular position areas. It can be understood that after obtaining the above multiple rectangular position areas, the texture coordinates corresponding to the four vertices of each rectangular position area can be determined. By locating the texture coordinates of the four vertices of a rectangular position area in the original texture image, the rectangular texture image area corresponding to the rectangular position area can be obtained.

[0085] The multiple rectangular texture image regions are then reassembled to obtain a reassembled texture image. The purpose of this reassembly is to combine these multiple rectangular texture image regions into a single image. During the reassembly process, the filling position and angle of each rectangular texture image region within the image are determined with the goal of minimizing the resulting holes in the image. The specific reassembly process will be described in the following examples.

[0086] After obtaining the recombined texture image, the target three-dimensional geometric model can be displayed according to the recombined texture image to obtain the target three-dimensional model containing texture information for display.

[0087] In summary, by constructing the above-mentioned axis-aligned polygons to approximate the texture area required by the target three-dimensional geometric model, the irregularly shaped texture area is divided into several regular rectangular texture image areas, which can significantly reduce the introduction of redundant texture information and help improve the display efficiency of the target three-dimensional model.

[0088] FIG6 is a flowchart of constructing an axis-aligned polygon according to an embodiment of the present invention. As shown in FIG6 , the flowchart may include the following steps:

[0089] 601. Determine an axis-aligned bounding box that encloses the target parameterized mesh.

[0090] 602. Construct a quadtree with the axis-aligned bounding box as the root node, wherein when a leaf node in the quadtree does not intersect with the boundary of the target parameterized mesh, no child nodes of the leaf node are generated.

[0091] 603. Determine an axis-aligned polygon that encloses the target parameterized grid according to the quadtree.

[0092] The above-mentioned process of constructing the axis-aligned polygon is illustrated with reference to FIG. 7 a and FIG. 7 b , wherein the dotted lines in FIG. 7 a and FIG. 7 b represent the boundary lines of the target parameterized mesh.

[0093] First, an axis-aligned bounding box surrounding the target parameterized mesh is determined, that is, a circumscribed rectangle surrounding the boundary line of the target parameterized mesh, as shown by the outermost rectangular box in FIG. 7 a .

[0094] Afterwards, a quadtree is constructed. Specifically, the axis-aligned bounding box is used as the root node of the quadtree. Leaf nodes are then subdivided until the current leaf node does not intersect the boundary of the target parameterized mesh, at which point no more child nodes are generated under that leaf node. Alternatively, the quadtree reaches a set depth.

[0095] Specifically, in Figure 7a, each square represents a leaf node. Leaf nodes that do not intersect the target parametric grid, such as the blank squares outside the target parametric grid's boundary and the blank squares completely inside the target parametric grid, will not be further subdivided into child nodes. Leaf nodes that intersect the target parametric grid (i.e., intersect with its boundary) will be further subdivided into four child nodes. If a child node still intersects the target parametric grid's boundary, subdivision will continue until the set depth is reached or the node no longer intersects the target parametric grid.

[0096] Afterwards, the axis-aligned polygon surrounding the target parameterized grid is determined based on the constructed quadtree. Specifically, the leaf nodes in the quadtree that intersect with the boundary of the target parameterized grid or the leaf nodes located within the target parameterized grid can be subjected to union processing to determine the axis-aligned polygon surrounding the target parameterized grid. As shown in Figure 7b, the leaf nodes in the quadtree that intersect with the boundary of the target parameterized grid are actually the leaf nodes passed by the boundary line of the target parameterized grid. The union processing is to merge the polygons of the two leaf nodes into one polygon. In fact, as shown in Figure 7b, the outer boundary lines of the leaf nodes in the quadtree that intersect with the boundary of the target parameterized grid are determined, and these boundary lines are connected together in sequence to form the axis-aligned polygon. Since the boundary line of each leaf node is parallel to the u-axis or the v-axis, the resulting polygon is an axis-aligned polygon.

[0097] The following describes the process of recombining the aforementioned multiple rectangular texture image regions to obtain a recombined texture image with reference to FIG8 .

[0098] FIG8 is a flowchart of a texture reconstruction method provided by an embodiment of the present invention. As shown in FIG8 , the method may include the following steps:

[0099] 801. Sort multiple rectangular texture image regions in descending order according to a set image size index.

[0100] 802 . Fill the first rectangular area with the plurality of rectangular texture image areas according to the order to obtain a first reconstructed texture image.

[0101] 803. Use a binary search method to reduce the size of the first rectangular area to determine a second rectangular area that can accommodate multiple rectangular texture image areas, and fill the multiple rectangular texture image areas into the second rectangular area to obtain a second reconstructed texture image.

[0102] The size of the second rectangular area is smaller than or equal to the size of the first rectangular area.

[0103] The aforementioned image size metrics include, but are not limited to, area, perimeter, width, and height. When multiple image size metrics are used, they can also be sorted, such as in descending order of area, perimeter, width, and height, to prioritize filling larger rectangular texture image areas. For example, if two rectangular texture image areas have the same area, their ordering can be determined based on their perimeters.

[0104] Recombining multiple rectangular texture image regions is actually to generate a new texture image from these two rectangular texture image regions. Specifically, a blank rectangular region can be initialized as the initial rectangular region (i.e., a blank texture image). Then, according to the sorting results of the multiple rectangular texture image regions, the initial rectangular region is filled in turn. During the filling process, if it is found that the initial rectangular region is not large enough to accommodate the rectangular texture image regions that have not been filled, the size of the initial rectangular region is continuously expanded until all the rectangular texture image regions are filled. The rectangular region obtained at this time is called the first rectangular region.

[0105] When filling the rectangular texture image region into the above rectangular region, the rectangular texture image region may be subjected to transformation operations such as rotation (e.g., counterclockwise rotation) and translation. Translation means that, assuming that the texture coordinate corresponding to a rectangular texture image region in the original texture image is L1 and the texture coordinate corresponding to the first rectangular region is L2, then L2-L1 can be used as the translation vector corresponding to the rectangular texture image region.

[0106] The size of the initial rectangular area can be randomly set, or can be set to the sum of the areas of multiple rectangular texture image areas, etc., without specific limitation. Each time the rectangular area needs to be expanded, the width and height can be expanded each time, or the multiple can be expanded each time by a set factor, such as 0.5.

[0107] In an optional embodiment, when a first rectangular area sufficient to accommodate the plurality of rectangular texture image areas is determined, a texture image obtained by filling the plurality of rectangular texture image areas into the first rectangular area may be determined as the final reconstructed texture image.

[0108] However, in order to further optimize the recombined texture image, optionally, the texture image obtained by filling multiple rectangular texture image areas into the first rectangular area can be used as the first recombined texture image, and then the binary search method is used to reduce the size of the first rectangular area to determine a second rectangular area that can accommodate multiple rectangular texture image areas, and the multiple rectangular texture image areas are filled into the second rectangular area to obtain a second recombined texture image. The second recombined texture image is used as the final recombined texture image. The second recombined texture image is actually a minimum texture image that can fill all rectangular texture image areas. In the second recombined texture image, the multiple rectangular texture image areas are more compact, and the resulting hole area will be smaller.

[0109] The following is a simple example to illustrate the execution process of the binary search method.

[0110] Assuming the first rectangular area is 100*100, the midpoint of the first binary search is 50*50. This determines whether the multiple rectangular texture image areas can fit into the 50*50 rectangular area. If so, the midpoint of the next binary search is 25*25. If not, the midpoint of the next binary search is 75*75, and so on, until a second rectangular area that can accommodate multiple rectangular texture image areas is found.

[0111] With respect to step 105 in the aforementioned embodiment, a specific implementation is illustrated in conjunction with FIG9 .

[0112] FIG9 is a flow chart of a display processing method based on a reconstructed texture image according to an embodiment of the present invention. As shown in FIG9 , the method may include the following steps:

[0113] 901. For the target vertices of the face elements contained in the target rectangular position area, determine the pose transformation vector corresponding to the target rectangular texture image area corresponding to the target rectangular position area during reorganization, wherein the target rectangular position area is any one of a plurality of rectangular position areas, and the target vertex is any one of the vertices of a plurality of face elements in the target parameterized mesh located within the target rectangular position area.

[0114] 902. Determine updated texture coordinates corresponding to the target vertex in the reconstructed texture image based on the original texture coordinates corresponding to the target vertex, the posture transformation vector, the image size of the original texture image, and the image size of the reconstructed texture image.

[0115] 903. Display the target three-dimensional geometric model according to the updated texture coordinates and the reconstructed texture images corresponding to the vertices of each facet in the target three-dimensional geometric model.

[0116] In fact, the pose relationship of the aforementioned multiple rectangular texture image areas in the reorganized texture image is likely to be different from the pose relationship of these multiple rectangular texture image areas in the original texture image. For example, a certain rectangular texture image area is located in the upper left corner in the original texture image, but is located in the lower right corner in the reorganized texture image. For example, a certain rectangular texture image area is placed horizontally in the original texture image, but is placed vertically in the reorganized texture image (rotated 90 degrees counterclockwise). In other words, in the process of reorganizing multiple rectangular texture image areas, the pose relationship between the rectangular texture image areas is likely to be updated. It is necessary to update the texture coordinates corresponding to the vertices of each face element in the target three-dimensional geometric model based on the change in this pose relationship, otherwise it will lead to incorrect mapping results. For example, the texture coordinates corresponding to a vertex in the original texture image are (u1, v1), that is, the texture value corresponding to the texture coordinates needs to be rendered. However, if the rectangular texture image area corresponding to the texture coordinates is moved to other positions during the reconstruction process, then in the reconstructed texture image, if the texture coordinates corresponding to the vertex are still determined to be (u1, v1), since the texture value corresponding to the texture coordinates in the reconstructed texture image is different from the texture value corresponding to the texture coordinates in the original texture image, it is obviously wrong to assign the texture value corresponding to the texture coordinates in the reconstructed texture image to the vertex.

[0117] Therefore, after obtaining the reconstructed texture image, it is necessary to re-determine the texture coordinates corresponding to the vertices of each facet in the target three-dimensional geometric model in the reconstructed texture image, that is, to update the texture coordinates of each vertex.

[0118] In this embodiment, the texture coordinates of each vertex may be updated by using a plurality of rectangular position areas obtained by performing rectangular segmentation on the target parameterized mesh corresponding to the target three-dimensional geometric model.

[0119] Specifically, taking the target vertex of any facet contained in a target rectangular position region within a plurality of rectangular position regions as an example, first, a pose transformation vector corresponding to the target rectangular texture image region corresponding to the target rectangular position region during reconstructing is determined. This pose transformation vector is used to reflect the pose transformation of the target rectangular texture image region between the original texture image and the reconstructed texture image, primarily including the translation and rotation transformations exemplified above.

[0120] Afterwards, the updated texture coordinates corresponding to the target vertex in the reconstructed texture image are determined according to the original texture coordinates corresponding to the target vertex, the posture transformation vector, the image size of the original texture image, and the image size of the reconstructed texture image.

[0121] Assume that the original texture coordinates corresponding to the target vertex p are (u0, v0), and the translation transformation vector corresponding to the target rectangular texture image area is (t x ,t y ), the rotation transformation vector corresponding to the target rectangular texture image area is θ, the image size of the original texture image is w0*h0, and the image size of the reconstructed texture image is w*h, then the updated texture coordinates of the target vertex p (u new ,v new ) can be expressed as:

[0122] Afterwards, the target three-dimensional geometric model can be displayed based on the updated texture coordinates and reorganized texture images corresponding to the vertices of each face element in the target three-dimensional geometric model. The display processing process is described in the above text and will not be repeated here.

[0123] FIG10 is a flow chart of a 3D model texture processing method provided by an embodiment of the present invention. As shown in FIG10 , the method may include the following steps:

[0124] 1001. In response to a selection operation of a target three-dimensional geometric model to be displayed in the original three-dimensional geometric model, a target parametric mesh corresponding to the target three-dimensional geometric model is determined, wherein the target parametric mesh includes each face element in the target three-dimensional geometric model and the original texture coordinates corresponding to the vertices of each face element.

[0125] 1002. Determine an axis-aligned polygon that surrounds the target parameterized grid, split the axis-aligned polygon to obtain a plurality of rectangular position regions, determine a plurality of rectangular texture image regions corresponding to the plurality of rectangular position regions from the original texture image, and reassemble the plurality of rectangular texture image regions to obtain a reassembled texture image.

[0126] 1003. Determine the face elements to be cropped that intersect with different rectangular position areas in the target parameterized grid, crop the face elements to be cropped so that the cropped face elements do not span different rectangular position areas, and update the target three-dimensional geometric model based on the face element cropping results.

[0127] 1004. Perform display processing on the updated target three-dimensional geometric model according to the reconstructed texture image to output the target three-dimensional model.

[0128] Since the above-mentioned multiple rectangular position areas actually divide the target parameterized grid into multiple rectangular blocks, there may be a situation where the same face element in the target parameterized grid spans different rectangular position areas, that is, a face element intersects with the boundaries of multiple rectangular position areas.

[0129] In this embodiment, the face elements in this situation are referred to as face elements to be cropped. The target parameterized mesh and the target three-dimensional geometric model need to be cropped so that the face elements obtained after cropping do not span different rectangular position areas. In other words, each face element obtained after cropping is only located within one rectangular position area and will not intersect with different rectangular position areas. This is because the target three-dimensional geometric model is processed at the granularity of its geometric unit - face element when it is displayed. If the same face element spans, for example, two rectangular position areas, since each rectangular position area corresponds to a rectangular texture image area in the texture image, and these two rectangular texture image areas may be located at two distant positions in the recombined texture image after translation and rotation transformation during the recombination process, this means that one face element will be mapped to two texture areas that are separated by a large distance, and an incorrect mapping effect will be obtained. Therefore, the face elements to be cropped that span different rectangular position areas in the original target parameterized mesh are cropped into more small face elements, so that each face element after cropping is only located in one rectangular position area, to ensure that the target three-dimensional geometric model can ultimately obtain a consistent mapping effect before and after texture reconstruction.

[0130] Since each rectangular position area can be represented by a rectangular box, its boundary line is known. According to the intersection of the boundary lines of each face element in the target parameterized grid and the boundary lines of each rectangular position area, it can be known which face elements are to be clipped.

[0131] In an optional embodiment, the clipping process of the to-be-clipped surface element in step 1003 may be:

[0132] Determine the intersection point of the face element to be clipped and the intersecting rectangular position area as the vertex of the face element after clipping, determine the original texture coordinates corresponding to the vertex and the spatial coordinates corresponding to the vertex in the target three-dimensional geometric model; based on the intersection line of the face element to be clipped and the intersecting rectangular position area, determine the polygon to be clipped formed by the face element to be clipped in the rectangular position area, and the shape of the polygon to be clipped is different from the shape of the face element; based on the original texture coordinates of each vertex of the polygon to be clipped, determine the newly added edges in the polygon to be clipped, and the newly added edges divide the polygon to be clipped into multiple face elements; mark the spatial coordinates of the vertex of the face element after clipping, the newly added edges and the above-mentioned intersection lines in the target three-dimensional geometric model to update the target three-dimensional geometric model.

[0133] For ease of understanding, the above-mentioned cropping process is illustrated with reference to FIG11 .

[0134] In Figure 11, it is assumed that the target parameterized mesh includes the triangular face elements GAB, GAF, ABC, and ACF shown in the figure, and it is assumed that the rectangular box shown in the figure is a rectangular position area segmented from the axis-aligned polygon. It can be seen from the diagram in the figure that the triangular face elements GAF, ABC, and ACF intersect with the boundary of the rectangular position area, and the intersection points are K, J, L, and M respectively.

[0135] It is understandable that the multiple rectangular regions obtained after segmenting the axis-aligned polygons will cover the entire target parameterized mesh. For example, the triangle surface element shown in Figure 11 intersecting with a certain rectangular region will actually intersect with other rectangular regions, but this is not shown in Figure 11. Therefore, it can be preliminarily determined that the triangle surfaces GAF, ABC, and ACF are the surfaces to be clipped.

[0136] Afterwards, the above intersection points are used as newly added vertices (i.e., the newly added vertices of the clipped face), and the texture coordinates and spatial coordinates corresponding to each intersection point are calculated. In practice, based on the known texture coordinates and spatial coordinates of the vertices of the above triangular face elements GAF, ABC, and ACF, a barycentric coordinate interpolation method can be used to calculate the texture coordinates and spatial coordinates corresponding to each intersection point. The barycentric coordinate interpolation method can be implemented by referring to existing related technologies and will not be described in detail here.

[0137] In addition, when the above-mentioned triangular face elements GAF, ABC and ACF intersect the boundary of the rectangular position area, different polygons located within the rectangular position area are generated as shown in the figure.

[0138] For example, the intersection line KJ with the triangle face GAF will split the triangle face GAF into two parts, of which the part located in the rectangular position area is triangle KFJ. Since this triangle has the same shape as the face (triangle), it can be directly determined that a new clipped triangle face KFJ is generated. Similarly, the intersection line LM with the triangle face ABC will cause the triangle face ABC to split into a new clipped triangle face LMC located in the rectangular position area.

[0139] For another example, the intersection line JL with the triangular face ACF causes the triangular face ACF to segment into a quadrilateral FJLC located within the rectangular position area. Since the quadrilateral is inconsistent with the face element's shape (triangle), the quadrilateral is used as a polygon to be clipped, and the quadrilateral is further clipped into multiple triangular faces. Alternatively, the quadrilateral can be triangulated based on the Delaunay triangulation method to obtain multiple triangular faces, such as the quadrilateral clipped into triangular face FJL and triangular face FLC by determining a newly added edge LF as shown in FIG11.

[0140] Specifically, in this embodiment, a constrained Delaunay triangulation method can be used to clip the aforementioned polygon to be clipped, wherein the constraint condition is to preserve the original edges of the polygon to be clipped. Specifically, the original texture coordinates of each vertex of the polygon to be clipped (such as the four vertices F, J, L, and C in Figure 11) are input into the Delaunay triangulation algorithm to generate the additional edges shown in the figure under the constraint condition.

[0141] Through the above clipping process, a number of new clipped elements can be generated in the original target parameterized grid, and the edges of each clipped element may include edges intersecting with the rectangular position area and / or the above newly added edges.

[0142] Since the target parametric mesh is obtained by removing the spatial coordinates of the vertices of each face element in the target three-dimensional geometric model, the post-cropped elements contained in the new target parametric mesh obtained after the cropping process can be marked accordingly in the original target three-dimensional geometric model, that is, the spatial coordinates of the vertices of the post-cropped elements, as well as the above-mentioned intersection lines and newly added edges, thereby realizing the update of the target three-dimensional geometric model.

[0143] Afterwards, the updated target 3D geometric model is displayed based on the reconstructed texture image to output the target 3D model. The display process also requires updating the texture coordinates corresponding to the vertices of each facet in the target 3D model, as described in the embodiment shown in FIG9 .

[0144] The solution provided in the above embodiment uses a quadtree to construct axis-aligned polygons to approximate the texture region required for displaying a local 3D model, reducing the introduction of redundant texture information. The texture region corresponding to the axis-aligned polygons is then segmented into a number of rectangular texture image regions. These rectangular texture image regions are then reassembled to generate a new texture image. The geometric structure and vertex texture coordinates of the local 3D model are updated by cropping the facets that cross these rectangular regions, ensuring consistent mapping of the local 3D model before and after texture reassembly.

[0145] FIG13 is a schematic diagram illustrating an application of a 3D model texture processing method provided by an embodiment of the present invention. In FIG13 , the method can be executed by a user terminal (e.g., a PC) storing a complete original 3D model consisting of a pre-collected original 3D geometric model and an original texture image. During the process of segmenting and gradually displaying the original 3D model, assuming the user has selected a target 3D geometric model from the original 3D geometric model for display, the method first extracts a target parameterized mesh from the target 3D geometric model. A quadtree is then constructed to generate axis-aligned polygons encompassing the target parameterized mesh. The axis-aligned polygons are then rectangularly segmented. Based on the resulting rectangular segmentation, multiple rectangular texture image regions are obtained from the original texture image. These multiple rectangular texture image regions are then reassembled to obtain a reassembled texture image. The target 3D geometric model is then updated by cropping the facets spanning the rectangular regions within the target parameterized mesh and the target 3D geometric model. The texture coordinates of each vertex in the target 3D geometric model are then updated. Display processing is performed based on the updated texture coordinates of the reassembled texture image and the target 3D geometric model, resulting in the output of the mapped target 3D sub-model.

[0146] The three-dimensional model texture processing method provided by the present invention can be executed in the cloud, and a number of computing nodes can be deployed in the cloud, each of which has computing, storage and other processing resources. In the cloud, multiple computing nodes can be organized to provide a certain service. Of course, a computing node can also provide one or more services. The cloud can provide the service by providing a service interface to the outside world, and the user calls the service interface to use the corresponding service. The service interface includes a software development kit (SDK), an application programming interface (API), a database SQL function, and the like.

[0147] For the solution provided by the embodiments of the present invention, the cloud can provide a service interface for 3D model clipping services. Users can invoke this service interface through their user devices to trigger a service request to the cloud. This service request includes the target 3D geometric model to be displayed, selected from the original 3D geometric model, and the original texture image corresponding to the original 3D geometric model. The cloud determines a computing node that responds to the request and uses the processing resources of the computing node to perform the following steps:

[0148] Determining a target parameterized mesh corresponding to the target three-dimensional geometric model, wherein the target parameterized mesh includes original texture coordinates corresponding to each facet and vertices of each facet in the target three-dimensional geometric model, wherein the original texture coordinates are texture coordinates corresponding to the original texture image;

[0149] determining an axis-aligned polygon that encloses the target parameterized mesh, wherein each side of the axis-aligned polygon is parallel to a texture coordinate axis;

[0150] splitting the axis-aligned polygon to obtain a plurality of rectangular location regions;

[0151] Determine, from the original texture image, a plurality of rectangular texture image regions corresponding to the plurality of rectangular position regions;

[0152] Recombining the plurality of rectangular texture image regions to obtain a recombined texture image;

[0153] The recombined texture image is fed back to the user equipment, so that the user equipment performs display processing on the target three-dimensional geometric model according to the recombined texture image to output the target three-dimensional model.

[0154] The above execution process can refer to the relevant descriptions in the aforementioned other embodiments and will not be repeated here.

[0155] For ease of understanding, an exemplary explanation is provided in conjunction with Figure 13. A user can invoke the 3D model cropping service through the user device E1 shown in Figure 13 to upload a service request for a target 3D geometric model to be displayed, selected from the original 3D geometric model, and the original texture image corresponding to the original 3D geometric model. In the cloud, as shown in the figure, several computing nodes are deployed, from which computing node E2 can be selected based on a certain scheduling strategy. After receiving the service request, computing node E2 executes the aforementioned computational process to obtain a reconstructed texture image. Computing node E2 then sends the reconstructed texture image to user device E1, which then displays the target 3D geometric model based on the reconstructed texture image and outputs the resulting target 3D model.

[0156] The following describes in detail one or more embodiments of the three-dimensional model texture processing device of the present invention. Those skilled in the art will understand that these devices can be constructed by using commercially available hardware components and configuring them according to the steps taught in this solution.

[0157] Figure 14 is a structural schematic diagram of a three-dimensional model texture processing device provided by an embodiment of the present invention. As shown in Figure 14, the device includes: a parameterized grid determination module 11, a texture image cropping module 12, a texture image reconstruction module 13, and a three-dimensional model display module 14.

[0158] The parameterized mesh determination module 11 is used to determine the target parameterized mesh corresponding to the target three-dimensional geometric model in response to the selection operation of the target three-dimensional geometric model to be displayed in the original three-dimensional geometric model, wherein the target parameterized mesh includes the original texture coordinates corresponding to each face element and the vertices of each face element in the target three-dimensional geometric model, and the original texture coordinates are the texture coordinates corresponding to the original texture image corresponding to the original three-dimensional geometric model.

[0159] The texture image cropping module 12 is configured to determine an axis-aligned polygon surrounding the target parameterized mesh, segment the axis-aligned polygon to obtain a plurality of rectangular position regions, and determine a plurality of rectangular texture image regions corresponding to the plurality of rectangular position regions from the original texture image, wherein each side of the axis-aligned polygon is parallel to a texture coordinate axis.

[0160] The texture image recombining module 13 is configured to recombine the plurality of rectangular texture image regions to obtain a recombined texture image.

[0161] The three-dimensional model display module 14 is configured to display the target three-dimensional geometric model according to the reconstructed texture image to obtain the target three-dimensional model.

[0162] Optionally, the texture image cropping module 12 is specifically used to: determine an axis-aligned bounding box that encloses the target parameterized mesh; construct a quadtree with the axis-aligned bounding box as the root node, wherein when a leaf node in the quadtree does not intersect with the boundary of the target parameterized mesh, no child node of the leaf node is generated; and determine an axis-aligned polygon that encloses the target parameterized mesh based on the quadtree.

[0163] Among them, optionally, the texture image cropping module 12 is specifically used to: perform union processing on leaf nodes in the quadtree that intersect with the boundary of the target parameterized grid or leaf nodes located inside the target parameterized grid to determine the axis-aligned polygon surrounding the target parameterized grid.

[0164] Optionally, the texture image reorganization module 13 is specifically configured to: sort the multiple rectangular texture image regions in descending order according to a set image size index; and fill the multiple rectangular texture image regions into the first rectangular region according to the sorting to obtain a first reorganized texture image.

[0165] Optionally, the texture image reconstruction module 13 is further used to: use a binary search method to reduce the size of the first rectangular area to determine a second rectangular area that can accommodate the multiple rectangular texture image areas; and fill the multiple rectangular texture image areas into the second rectangular area to obtain a second reconstructed texture image.

[0166] Optionally, the three-dimensional model display module 14 is further used to: determine the surface elements to be cropped that intersect with different rectangular position areas in the target parameterized grid; and crop the surface elements to be cropped so that the cropped elements obtained do not span different rectangular position areas.

[0167] Among them, optionally, the three-dimensional model display module 14 is specifically used to: determine the intersection point of the face element to be clipped and the intersecting rectangular position area as the vertex of the face element after clipping; determine the original texture coordinates corresponding to the vertex and the spatial coordinates corresponding to the vertex in the target three-dimensional geometric model; based on the intersection line of the face element to be clipped and the intersecting rectangular position area, determine the polygon to be clipped formed by the face element to be clipped in the rectangular position area, and the shape of the polygon to be clipped is different from the shape of the face element; based on the original texture coordinates of each vertex of the polygon to be clipped, determine the newly added edges in the polygon to be clipped, and the newly added edges cause the polygon to be clipped to be divided into multiple face elements; mark the spatial coordinates of the vertex of the face element after clipping, the newly added edges and the intersection line in the target three-dimensional geometric model to update the target three-dimensional geometric model.

[0168] Optionally, the three-dimensional model display module 14 is specifically used to: determine, for the target vertex of the face element contained in the target rectangular position area, the pose transformation vector corresponding to the target rectangular texture image area corresponding to the target rectangular position area during reorganization, wherein the target rectangular position area is any one of the multiple rectangular position areas, the target vertex is any one of the vertices of the multiple face elements in the target parameterized mesh located within the target rectangular position area, and the pose transformation vector is used to reflect the pose transformation of the target rectangular texture image area in the original texture image and the reorganized texture image; determine the updated texture coordinates corresponding to the target vertex in the reorganized texture image according to the original texture coordinates corresponding to the target vertex, the pose transformation vector, the image size of the original texture image, and the image size of the reorganized texture image; and display the target three-dimensional geometric model according to the updated texture coordinates and the reorganized texture image corresponding to the vertices of each face element in the target three-dimensional geometric model.

[0169] The device shown in FIG14 can execute the steps provided in the aforementioned embodiments. For detailed execution process and technical effects, please refer to the description in the aforementioned embodiments and will not be repeated here.

[0170] In one possible design, the structure of the 3D model texture processing device shown in FIG14 can be implemented as an electronic device. As shown in FIG15 , the electronic device may include a processor 21, a memory 22, and a communication interface 23. Memory 22 stores executable code. When executed by processor 21, the executable code enables processor 21 to at least implement the 3D model texture processing method provided in the aforementioned embodiments.

[0171] In practical applications, the electronic device may be a virtual reality, extended reality or other electronic device. Thus, the three-dimensional model to be displayed may be obtained by collecting physical objects in the real world, or may be a generated virtual three-dimensional model.

[0172] In addition, an embodiment of the present invention provides a non-temporary machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the three-dimensional model texture processing method provided in the aforementioned embodiment.

[0173] The device embodiments described above are merely illustrative, wherein the network elements described as separate components may or may not be physically separate. Some or all of these modules may be selected based on actual needs to achieve the objectives of this embodiment. Persons of ordinary skill in the art can understand and implement these embodiments without inventive effort.

[0174] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by a combination of hardware and software. Based on this understanding, the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A three-dimensional model texture processing method, characterized in that: include: In response to a selection operation of a target three-dimensional geometric model to be displayed in the original three-dimensional geometric model, a target parameterized mesh corresponding to the target three-dimensional geometric model is determined, wherein the target parameterized mesh includes original texture coordinates corresponding to each face element and vertices of each face element in the target three-dimensional geometric model, and the original texture coordinates are texture coordinates corresponding to an original texture image corresponding to the original three-dimensional geometric model; Determining an axis-aligned polygon that encloses the target parameterized mesh, wherein each side of the axis-aligned polygon is parallel to a texture coordinate axis; splitting the axis-aligned polygon to obtain a plurality of rectangular location regions; Determine, from the original texture image, a plurality of rectangular texture image regions corresponding to the plurality of rectangular position regions; Recombining the plurality of rectangular texture image regions to obtain a recombined texture image; The target three-dimensional geometric model is displayed according to the reorganized texture image to obtain a target three-dimensional model.

2. The method according to claim 1, characterized in that The determining an axis-aligned polygon surrounding the target parameterized mesh comprises: determining an axis-aligned bounding box that encloses the target parameterized mesh; Taking the axis-aligned bounding box as a root node, constructing a quadtree, wherein when a leaf node in the quadtree does not intersect with the boundary of the target parameterized grid, no child node of the leaf node is generated; Based on the quadtree, an axis-aligned polygon that encloses the target parameterized mesh is determined.

3. The method according to claim 2, characterized in that The step of determining an axis-aligned polygon surrounding the target parameterized grid according to the quadtree comprises: A union process is performed on leaf nodes in the quadtree that intersect with a boundary of the target parameterized mesh or are located inside the target parameterized mesh to determine an axis-aligned polygon that surrounds the target parameterized mesh.

4. The method according to claim 1, characterized in that: The step of reorganizing the plurality of rectangular texture image regions to obtain a reorganized texture image includes: Sorting the plurality of rectangular texture image regions in descending order according to a set image size index; According to the arrangement, the plurality of rectangular texture image regions are filled into the first rectangular region to obtain a first reorganized texture image.

5. The method according to claim 4, characterized in that The method further comprises: Using a binary search method, the size of the first rectangular area is reduced to determine a second rectangular area that can accommodate the plurality of rectangular texture image areas; The plurality of rectangular texture image regions are filled into the second rectangular region to obtain a second reconstructed texture image.

6. The method according to claim 1, characterized in that Before displaying the target three-dimensional geometric model according to the reorganized texture image, the method further includes: Determine the face elements to be clipped that intersect with different rectangular position areas in the target parameterized grid; The to-be-cropped face elements are cropped so that each cropped face element does not span different rectangular position areas.

7. The method according to claim 6, characterized in that The step of clipping the to-be-cut face element comprises: Determine the intersection point between the face element to be clipped and the intersecting rectangular position area as the vertex of the face element after clipping; Determine the original texture coordinates corresponding to the vertex and the space coordinates corresponding to the vertex in the target three-dimensional geometric model; Based on the intersection line between the face element to be cut and the intersecting rectangular position area, determine the polygon to be cut formed by the face element to be cut in the rectangular position area, where the shape of the polygon to be cut is different from the shape of the face element; Based on the original texture coordinates of each vertex of the polygon to be clipped, determine a newly added edge in the polygon to be clipped, wherein the newly added edge causes the polygon to be clipped to be divided into a plurality of facets; The spatial coordinates of the vertices of the clipped elements, the newly added edges and the intersection lines are marked in the target three-dimensional geometric model to update the target three-dimensional geometric model.

8. The method according to any one of claims 1 to 7, characterized in that The display processing of the target three-dimensional geometric model according to the reorganized texture image includes: For the target vertex of the face element contained in the target rectangular position area, determine the pose transformation vector corresponding to the target rectangular texture image area corresponding to the target rectangular position area when reorganizing, wherein the target rectangular position area is any one of the multiple rectangular position areas, the target vertex is any one of the vertices of the multiple face elements in the target parameterized mesh located in the target rectangular position area, and the pose transformation vector is used to reflect the pose transformation of the target rectangular texture image area in the original texture image and the reorganized texture image; Determine the updated texture coordinates corresponding to the target vertex in the reorganized texture image according to the original texture coordinates corresponding to the target vertex, the posture transformation vector, the image size of the original texture image, and the image size of the reorganized texture image; The target three-dimensional geometric model is displayed according to the updated texture coordinates corresponding to the vertices of each face element in the target three-dimensional geometric model and the reorganized texture image.

9. A three-dimensional model texture processing method, characterized in that: include: Receiving a request triggered by a user device by calling a 3D model clipping service in the cloud, wherein the request includes a target 3D geometric model to be displayed selected from an original 3D geometric model and an original texture image corresponding to the original 3D geometric model; The following steps are performed using the processing resources corresponding to the 3D model clipping service: Determine a target parameterized mesh corresponding to the target three-dimensional geometric model, wherein the target parameterized mesh includes original texture coordinates corresponding to each face element and vertices of each face element in the target three-dimensional geometric model, and the original texture coordinates are texture coordinates corresponding to the original texture image; Determining an axis-aligned polygon that encloses the target parameterized mesh, wherein each side of the axis-aligned polygon is parallel to a texture coordinate axis; splitting the axis-aligned polygon to obtain a plurality of rectangular location regions; Determine, from the original texture image, a plurality of rectangular texture image regions corresponding to the plurality of rectangular position regions; Recombining the plurality of rectangular texture image regions to obtain a recombined texture image; The reorganized texture image is fed back to the user equipment, so that the user equipment performs display processing on the target three-dimensional geometric model according to the reorganized texture image to obtain the target three-dimensional model.

10. An electronic device, characterized in that: include: A memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the three-dimensional model texture processing method as described in any one of claims 1 to 8.

11. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor executes the three-dimensional model texture processing method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Model parameter generation method and device, electronic equipment and readable storage medium

    CN112784469A

  • Polygon processing method, device and equipment and computer readable storage medium

    CN115222806A

  • Texture image generation method and device, equipment, storage medium and product

    CN115830091A

  • Three-dimensional model texture processing method and device and storage medium

    CN116934938A

  • Data processing method for mesh geometry and computer readable storage medium of recording the same

    KR1020160068204A

Cited By

  • CTA image-based carotid artery lumen geometric model construction system

    CN120086916A

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

    CN120726207A