UV island control method and device for 3D space model, equipment and medium

Through the technical architecture of 'collaborative cutting - dual spatial alignment - density-driven arrangement', the problems of UV island cutting rationality and rotation consistency are solved, achieving spatial rotation direction consistency of UV islands and UV defect reduction, supporting the industrial production of large-scale programmatic assets.

CN123160772APending Publication Date: 2026-11-24BEIJING CAMEL GAMES LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611347937.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In existing technologies, the issues of UV island cutting rationality, spatial rotation consistency, and density adaptive arrangement in procedurally generated 3D models have not been effectively resolved, resulting in a high UV defect rate and making it difficult to meet the needs of large-scale industrial production.

Method used

The system adopts a full-link technical architecture of 'collaborative cutting - dual spatial alignment - density-driven arrangement'. Through multiple cutting, dual spatial alignment and matrix interpolation, it achieves the unification of the rotation orientation of UV islands and the rescaling of UV coordinates, ensuring the consistency of the spatial rotation direction of UV islands.

Benefits of technology

Significantly reduces UV defect rate, achieves strong consistency in UV island spatial rotation direction, and supports industrial production of large-scale programmatic assets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160772A_ABST
    Figure CN123160772A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and medium for controlling UV islands in 3D spatial models, including: repeatedly cutting the surface of the 3D spatial model to decompose the model surface into multiple independent UV islands; for each UV island, constructing a dual-space alignment system between the 3D object space and the 2D UV space, calculating the local orthogonal basis and rotation matrix based on the extreme points in the two spaces, and performing matrix hybrid interpolation to unify the rotation orientation of all UV islands in the UV space; and rescaling and automatically arranging the UV coordinates of each rotated UV island according to its actual surface area in the 3D object space. This achieves top-to-bottom rotation correction of side surfaces and UV islands with height differences without requiring calculations of numerous parameters, resulting in strong consistency in the rotation direction of the UV islands and a significant reduction in the UV defect rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical fields of computer graphics and procedural content generation, and in particular to UV island control methods, apparatus, devices and media for 3D spatial models. Background Technology

[0002] In film, animation, and game development, UV mapping of 3D models is a crucial prerequisite for the correct projection of texture maps onto the model surface. Traditional manual UV unwrapping relies on artists interacting in Maya, 3ds Max, or ZBrush. While this ensures high quality, it suffers from high labor costs, low efficiency, and poor standardization when dealing with massive amounts of procedurally generated assets such as mountains and rocks in large open-world projects. Current mainstream procedural UV solutions have significant limitations: Houdini's built-in LabsAutoUV node's algorithm primarily optimizes the topology of quadrilateral faces, making it poorly adaptable to procedurally generated low-face-count triangular mesh models. When the model has complex hierarchical structures or local high curvature features, UV islands are prone to overlapping after unwrapping (i.e., "defective faces," where multiple faces coincide at the same coordinate in UV space), and there is a complete lack of control over the orientation of UV islands in 3D space—while in art practice, side surface UVs need to be uniformly arranged "from top to bottom" to ensure the visual consistency of continuous textures. Therefore, there is an urgent need for a technical solution that can simultaneously address the issues of UV island cutting rationality, spatial rotation consistency, and density adaptive arrangement, in order to support the industrial production of large-scale programmed assets. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a UV island control method, device, equipment and medium for 3D spatial models. Through the full-link technical architecture of "cooperative cutting - dual spatial alignment - density-driven arrangement", it realizes the rotation correction of the side surface and UV islands with height difference from top to bottom according to the requirements without the need for calculation of a large number of parameters, thereby achieving strong consistency of the spatial rotation direction of UV islands and significantly reducing the occurrence rate of UV defects.

[0004] This application provides a UV island control method for 3D spatial models, the UV island control method comprising: Obtain the 3D spatial model to be processed, and cut the surface of the 3D spatial model multiple times to decompose the model surface into multiple independent UV islands; For each of the UV islands, a dual-space alignment system is constructed between the three-dimensional object space and the two-dimensional UV space. The rotation orientation of all UV islands in the UV space is unified by calculating the local orthogonal basis and rotation matrix based on the extreme points in the two spaces and performing matrix hybrid interpolation. Based on the actual surface area of ​​each UV island in the three-dimensional object space, the UV coordinates of each rotated UV island are rescaled and automatically rearranged.

[0005] In one possible implementation, the step of repeatedly cutting the surface of the 3D spatial model to decompose the model surface into multiple independent UV islands includes: The 3D spatial model is initially segmented based on the topological cluster attributes of the model, dividing each independent topologically connected region into an initial UV island; Within each initial UV island, groups are formed based on the angle between the vertex normal direction and the preset reference direction, and a second cut is performed on each group; For each UV island after secondary cutting, a curvature-based edge weight segmentation algorithm is used to set cutting seams in high curvature regions to complete the third cutting. The boundaries of the UV islands after three-stage cutting are flattened to obtain the preliminary UV coordinates of multiple independent UV islands.

[0006] In one possible implementation, the execution order of the three cutting steps is configurable and can be freely combined or selectively skipped based on model characteristics.

[0007] In one possible implementation, for each of the UV islands, a dual-space alignment system is constructed between the three-dimensional object space and the two-dimensional UV space. This is achieved by calculating the local orthogonal basis and rotation matrix based on the extrema points in both spaces, and performing matrix hybrid interpolation to unify the rotational orientation of all UV islands in the UV space, including: For each UV island, its first coordinate data in the three-dimensional object space and its second coordinate data in the two-dimensional UV space are calculated simultaneously. The first coordinate data and the second coordinate data are transformed into a local coordinate system with the island center as the origin and the normalized average normal as the Z-axis, and forced planeization is performed to obtain the first plane point set and the second plane point set. Calculate the bounding boxes of the first and second planar point sets in the plane respectively, and obtain the maximum point, minimum point, maximum point and minimum point in the U direction, and minimum point in the V direction as four extreme points; Based on the four extreme points, local orthogonal basis matrices in the U and V directions are constructed respectively. After alignment by the inverse matrix, the alignment matrices in the U and V directions are smoothly interpolated to generate a smooth rotation matrix, which is then applied to the UV space coordinates to achieve uniformity of the rotation orientation of the UV islands.

[0008] In one possible implementation, the step of constructing local orthogonal basis matrices in the U and V directions based on four extreme points, aligning them using inverse matrices, and then smoothly interpolating the U and V alignment matrices to generate a smooth rotation matrix, which is then applied to the UV space coordinates to achieve uniform rotation orientation of the UV islands, includes: Based on the four extreme points, local orthogonal bases of the first plane point set and the second plane point set in the U and V directions are constructed respectively, and corresponding first U-direction rotation matrix, first V-direction rotation matrix, second U-direction rotation matrix, and second V-direction rotation matrix are generated. Calculate the inverse alignment matrix of the second U-direction rotation matrix relative to the first U-direction rotation matrix, and the inverse alignment matrix of the second V-direction rotation matrix relative to the first V-direction rotation matrix, respectively, to obtain the U-direction alignment matrix and the V-direction alignment matrix; Perform smooth interpolation on the U-axis alignment matrix and the V-axis alignment matrix to generate a final smooth rotation matrix; The final smooth rotation matrix is ​​applied to the second coordinate data to achieve a unified rotation orientation of the UV islands in UV space.

[0009] In one possible implementation, the local orthogonal basis is determined in the following manner: A local orthogonal basis is constructed by using the normalized average normal as the Z-axis, the derived vector between the standard upward vector and the Z-axis as the X-axis, and the cross product direction of the Z-axis and the X-axis as the Y-axis.

[0010] In one possible implementation, the step of rescaling and automatically arranging the UV coordinates of each rotated UV island based on its actual surface area in the three-dimensional object space includes: Translate all UV coordinates of each UV island to the origin and overlap them, then calculate the actual surface area of ​​each UV island in three-dimensional space. The UV coordinates of the UV island are uniformly scaled based on the actual surface area and scaling factor. Based on the scaled UV island outlines and areas, perform non-overlapping automatic arrangement and output the final UV map coordinates.

[0011] This application embodiment also provides a UV island control device for a 3D spatial model, the UV island control device comprising: The cutting module is used to acquire the 3D spatial model to be processed, and to cut the surface of the 3D spatial model multiple times to decompose the model surface into multiple independent UV islands. The spatial alignment module is used to construct a dual-space alignment system for each UV island in the three-dimensional object space and the two-dimensional UV space. It calculates the local orthogonal basis and rotation matrix based on the extreme points in the two spaces and performs matrix hybrid interpolation to unify the rotation orientation of all UV islands in the UV space. The layout module is used to rescale and automatically arrange the UV coordinates of each rotated UV island based on the actual surface area of ​​each UV island in the 3D object space.

[0012] This application also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the UV island control method for 3D spatial models as described above.

[0013] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the UV island control method for a 3D spatial model as described above.

[0014] This application provides a UV island control method, apparatus, device, and medium for 3D spatial models. The UV island control method includes: acquiring a 3D spatial model to be processed; repeatedly cutting the surface of the 3D spatial model to decompose the model surface into multiple independent UV islands; for each UV island, constructing a dual-space alignment system between the three-dimensional object space and the two-dimensional UV space; calculating the local orthogonal basis and rotation matrix based on the extreme points in the two spaces, and performing matrix hybrid interpolation to unify the rotation orientation of all UV islands in the UV space; and rescaling and automatically arranging the UV coordinates of each rotated UV island according to its actual surface area in the three-dimensional object space. Through a full-link technical architecture of "collaborative cutting—dual-space alignment—density-driven arrangement," it achieves the ability to rotate and correct the side surfaces and UV islands with height differences from top to bottom according to requirements without calculating a large number of parameters, thereby achieving strong consistency in the rotation direction of the UV island space and significantly reducing the occurrence rate of UV defects.

[0015] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1A flowchart illustrating a UV island control method for a 3D spatial model provided in an embodiment of this application; Figure 2 A schematic diagram of a UV island control method for a 3D spatial model provided in an embodiment of this application; Figure 3 A schematic diagram of the structure of a UV island control device for a 3D spatial model provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.

[0019] First, the applicable scenarios for this application will be introduced. This application can be applied to the technical fields of computer graphics and procedural content generation.

[0020] Research has revealed significant limitations in current mainstream procedural UV mapping solutions. Houdini's built-in LabsAutoUV node's algorithm primarily optimizes quadrilateral topology, making it poorly adaptable to procedurally generated low-face-count triangular mesh models. When the model has complex hierarchical structures or local high curvature features, UV islands are prone to overlapping after unfolding (i.e., "defective surfaces," where multiple faces coincide at the same coordinate in UV space), and there is a complete lack of control over the orientation of UV islands in 3D space—while in art practice, side surface UVs need to be uniformly arranged "from top to bottom" to ensure visual consistency of continuous textures. Therefore, a technical solution is urgently needed that can simultaneously address the issues of UV island cutting rationality, spatial rotation consistency, and adaptive density arrangement to support the industrial production of large-scale procedural assets.

[0021] Based on this, the embodiments of this application provide a UV island control method for 3D spatial models. Through the full-link technical architecture of "cooperative cutting - dual spatial alignment - density-driven arrangement", it realizes that without the need for calculation of a large number of parameters, the side surface and UV islands with height differences are rotated and corrected from top to bottom according to the requirements, thereby achieving strong consistency of the spatial rotation direction of UV islands and significantly reducing the occurrence rate of UV defects.

[0022] Please see Figure 1 , Figure 1 A flowchart illustrating a UV island control method for a 3D spatial model provided in an embodiment of this application. Figure 1 As shown in the figure, the UV island control method provided in this application embodiment includes: S101: Obtain the 3D spatial model to be processed, and cut the surface of the 3D spatial model multiple times to decompose the model surface into multiple independent UV islands.

[0023] In this step, the surface of the 3D spatial model is cut multiple times, decomposing the model surface into multiple independent UV islands.

[0024] It should be noted that the 3D spatial model refers to other models such as mountain or rock models generated programmatically.

[0025] Here, the cutting includes one or more combinations of cutting based on topological clusters, cutting based on point normal orientation, and cutting based on curvature.

[0026] In one possible implementation, the step of repeatedly cutting the surface of the 3D spatial model to decompose the model surface into multiple independent UV islands includes: A: Based on the topological cluster attributes of the model, the 3D spatial model is initially segmented, dividing each independent topologically connected region into an initial UV island.

[0027] Here, the cutting of UV islands in the imported 3D spatial model is based on their topological clusters (classes). The model is initially divided into blocks using geometric clustering (cluster class) attributes. Currently, each cluster is an independent UV island, which avoids problems such as inconsistent UV sizes and stretching and distortion during the subsequent UV unification process.

[0028] Specifically, the random color is assigned to the color attribute through the class to visualize and verify whether the island partitioning is correct.

[0029] B: Within each initial UV island, groups are formed according to the angle between the vertex normal direction and the preset reference direction, and a second cut is performed on each group.

[0030] Here, the calculated model is grouped according to the orientation of its object space normals for secondary segmentation. Within each class, the model is further grouped based on the point normal direction N:

[0031] in, For several preset reference directions, calculations are performed on {0,1,0} and {0,-1,0} respectively.

[0032] C: For each UV island after secondary cutting, the curvature-based edge weight segmentation algorithm sets cutting seams in the high curvature region to complete the third cutting.

[0033] Here, for each UV island after secondary cutting, a curvature-based edge weight segmentation algorithm is applied. Cutting seams are preferentially set in high curvature regions (such as creases and edges), while continuity is maintained in low curvature regions (such as smooth surfaces). The cutting likelihood is positively correlated with the curvature value.

[0034] D: Flatten the boundaries of the UV islands after three-level cutting to obtain the preliminary UV coordinates of multiple independent UV islands. Here, the UV flatten method is used to flatten the UV island topology plane to UV space based on the boundary of the UV island cutting, so that the UV island is flattened to obtain the initial UV coordinates of multiple independent UV islands.

[0035] In this application, a "three-level progressive island cutting strategy" (topological cluster → normal orientation → curvature-driven stitching) is adopted to perform structure-aware pre-segmentation of high curvature edges and complex hierarchical boundaries before UV unwrapping, so that the UV island boundaries are highly aligned with the geometric semantic boundaries, significantly reducing the UV defect rate and improving UV topological robustness.

[0036] In one possible implementation, the execution order of the three cutting steps is configurable and can be freely combined or selectively skipped based on model characteristics.

[0037] S102: For each of the UV islands, construct a dual-space alignment system between the three-dimensional object space and the two-dimensional UV space. Calculate the local orthogonal basis and rotation matrix based on the extreme points in the two spaces, and perform matrix hybrid interpolation to unify the rotation orientation of all UV islands in the UV space.

[0038] In this step, for each UV island, a dual-space alignment system is constructed between the three-dimensional object space and the two-dimensional UV space. By calculating the local orthogonal basis and rotation matrix based on the extreme points in the two spaces, and performing matrix hybrid interpolation, the rotation orientation of all UV islands in the UV space is unified. It should be noted that the dual-space alignment system refers to the local coordinate system construction aligned with the two-dimensional UV space, as well as the coordinate system transformation from the two-dimensional UV space to the three-dimensional object space.

[0039] In one possible implementation, for each of the UV islands, a dual-space alignment system is constructed between the three-dimensional object space and the two-dimensional UV space. This is achieved by calculating the local orthogonal basis and rotation matrix based on the extrema points in both spaces, and performing matrix hybrid interpolation to unify the rotational orientation of all UV islands in the UV space, including: a: For each UV island, simultaneously calculate its first coordinate data in the three-dimensional object space and its second coordinate data in the two-dimensional UV space.

[0040] Here, for each UV island, its first coordinate data in the three-dimensional object space and its second coordinate data in the two-dimensional UV space are calculated simultaneously.

[0041] b: Transform the first coordinate data and the second coordinate data into a local coordinate system with the island center as the origin and the normalized average normal as the Z-axis, and perform forced planarization to obtain the first planar point set and the second planar point set.

[0042] Here, the first coordinate data and the second coordinate data are transformed into a local coordinate system with the island center as the origin and the normalized average normal as the Z-axis, and forced planeization is performed to obtain the first plane point set and the second plane point set.

[0043] The first set of planar points is determined as follows: The summation of the 3D normal vectors in the UV island and the division by the number of points yields the normalized normals (average normals), which are then scalarized. The island's position in world space is calculated: The summation of the 3D positions of each point in the UV island and the division by the number of points yields the center position of the UV island. The construction of the local orthogonal basis and the generation of the mapping matrix are performed: The local orthogonal basis of the island is calculated using the normalized normals, expressed as: , .in, The global reference upward direction is defined as {0,1,0}, which is the positive Y-axis direction in the world coordinate system. z is the normal direction, x is the x-axis direction, and y is the y-axis direction. The orthogonal basis mapping matrix is: Island spatial alignment transformation: Inverse 4x4 matrix transformation, which writes the island center position into a 4x4 matrix, expressed as:

[0044] Multiply the positions of all points on the island by the inverse of the 4x4 matrix: The local coordinate system transformation is as follows: By forcing the 3D model to be planarized to facilitate subsequent alignment with the UV space axes, a first set of planar points is obtained. The new point position after the transformation. Let i be the i-th original point on the island.

[0045] It should be noted that the process of obtaining the second plane point set is similar to that of obtaining the first plane point set, and will not be described in detail here.

[0046] c: Calculate the bounding boxes of the first and second planar point sets in the plane respectively, and obtain the maximum point in the U direction, the minimum point in the U direction, the maximum point in the V direction, and the minimum point in the V direction as four extreme points.

[0047] Here, the bounding boxes of the first and second planar point sets in the plane are calculated respectively, and the maximum point in the U direction, the minimum point in the U direction, the maximum point in the V direction, and the minimum point in the V direction are obtained as four extreme points.

[0048] The algorithm obtains the boundary extrema of the box-3 vectors of the UV island using the `getbbox_min` and `getbbox_max` functions. Specifically, it calculates the extrema of the UV island in 3D space by using the bounding box methods `getbbox_min` and `getbbox_max` to calculate the minimum and maximum values ​​(extrema) of the x, y, and z vectors in the local coordinate system within the 3D coordinate system. Orthogonal basis calculation involves iterating through all points of the UV island to find the points matching the boundary extrema. Once a point satisfying the condition is found, the loop exits and the point is saved, recording the maximum value of the four extrema points in the U direction. Minimum point in the U direction Maximum point in the V direction Minimum point in the V direction By calculating the extreme value vectors of the first plane point set and the second plane point set respectively through the extreme value points, a total of four extreme value vectors are obtained: , and , Specific algorithm operations: Calculate the extreme points (max, min) of the UV islands in 3D space, and traverse the point set. Search:

[0049]

[0050]

[0051]

[0052] Extreme value vector calculation based on extreme values: The four extreme value points of UV are calculated, and the positions of the same point number in the first plane point set and the second plane point set are sampled respectively to calculate the corresponding extreme value vector: -

[0053] -

[0054] -

[0055] -

[0056] in, Let be the extremum vector of the first point set in the U direction (X-axis direction). Let V be the extreme value vector of the first point set in the V direction (Y-axis direction). It is the extreme point with the maximum X coordinate in the U direction (X-axis direction) in the first point set (subscript 1).

[0057] d: Construct local orthogonal basis matrices in the U and V directions based on the four extreme points respectively. After alignment by the inverse matrix, perform smooth interpolation on the alignment matrices in the U and V directions to generate a smooth rotation matrix and apply it to the UV space coordinates to achieve uniform rotation orientation of the UV islands.

[0058] Here, local orthogonal basis matrices in the U and V directions are constructed based on the four extreme points. After alignment by the inverse matrix, the alignment matrices in the U and V directions are smoothly interpolated to generate a smooth rotation matrix, which is then applied to the UV space coordinates to achieve uniformity of the rotation orientation of the UV islands.

[0059] In one possible implementation, the step of constructing local orthogonal basis matrices in the U and V directions based on four extreme points, aligning them using inverse matrices, and then smoothly interpolating the U and V alignment matrices to generate a smooth rotation matrix, which is then applied to the UV space coordinates to achieve uniform rotation orientation of the UV islands, includes: (1): Based on the four extreme points, construct local orthogonal bases of the first plane point set and the second plane point set in the U and V directions respectively, and generate the corresponding first U-direction rotation matrix, first V-direction rotation matrix, second U-direction rotation matrix, and second V-direction rotation matrix.

[0060] Here, through 4 extreme value vectors , and , By performing cross products on the corresponding Z vectors, we obtain the corresponding third vectors, and thus the first U-axis rotation matrix. First V-axis rotation matrix Second U-axis rotation matrix Second V-axis rotation matrix .

[0061] (2): Calculate the inverse alignment matrix of the second U-direction rotation matrix relative to the first U-direction rotation matrix and the inverse alignment matrix of the second V-direction rotation matrix relative to the first V-direction rotation matrix to obtain the U-direction alignment matrix and the V-direction alignment matrix.

[0062] here, The extreme value vectors U and V are used to obtain two orthogonal bases U and V through their respective normalized normals up. Performing inverse matrix multiplication yields two inverse matrices. and Extreme value matrix rotation and alignment: = , .

[0063] (3): Perform smooth interpolation on the U-axis alignment matrix and the V-axis alignment matrix to generate a final smooth rotation matrix. Apply the final smooth rotation matrix to the second coordinate data to achieve uniform rotation orientation of the UV islands in UV space.

[0064] Here, the U-axis alignment matrix and V-axis alignment matrix are smoothly interpolated to generate a final smooth rotation matrix. This final smooth rotation matrix is ​​then applied to the second coordinate data to unify the rotation orientation of the UV islands in UV space.

[0065] Specifically, slerp is used to smooth the sampling of rotations: = slerp( , ,0.5), will Perform matrix multiplication on the final rotation matrix `final_mtx` for all point positions to obtain a smooth rotation. Expression:

[0066] in, This is the result of the second point set after smooth rotation. For the i-th point in the second point set, It is a smooth rotation matrix.

[0067] In one possible implementation, the local orthogonal basis is determined in the following manner: A local orthogonal basis is constructed by using the normalized average normal as the Z-axis, the derived vector between the standard upward vector and the Z-axis as the X-axis, and the cross product direction of the Z-axis and the X-axis as the Y-axis.

[0068] In this application, a dual-space alignment system (3D local coordinate system) is constructed. The UV plane coordinate system uses a triple mechanism of normalized normals to construct orthogonal bases, bidirectional extreme point mapping, and Slerp matrix interpolation to automatically align the U / V axes of all UV islands to the "gravity direction (Y-axis)" and "horizontal principal direction (X-axis)" in 3D space, achieving strong consistency between the rotation direction of UV islands and the semantics of 3D space, and ensuring the logic of procedural texture art expression.

[0069] In a specific embodiment, two arbitrary sets of reference points are obtained in the UV space. Using the two sets of reference extreme point indices, two extreme vectors are calculated for the plane of the UV island in the object space with the normalized normal as the axis and the point position in the UV space. Then, two separate extreme vector rotation matrices are calculated by cross product of axis vectors. The rotation matrices of the two UV spaces are inversely multiplied with the corresponding rotation matrix of the 3d plane to obtain rotation alignment. By interpolating the two rotation matrices U and V, a smooth UV space rotation matrix with U as X and V as Y is obtained. Matrix multiplication of the UV island positions yields UVs aligned with 3d space XY.

[0070] S103: Based on the actual surface area of ​​each UV island in the three-dimensional object space, rescale and automatically arrange the UV coordinates of each rotated UV island.

[0071] In this step, based on the actual surface area of ​​each UV island in the three-dimensional object space, the UV coordinates of each rotated UV island are rescaled and automatically arranged.

[0072] In one possible implementation, the step of rescaling and automatically arranging the UV coordinates of each rotated UV island based on its actual surface area in the three-dimensional object space includes: Translate all UV coordinates of each UV island to overlap at the origin, and calculate the actual surface area of ​​each UV island in 3D space; uniformly scale the UV coordinates of the UV islands based on the actual surface area and scaling factor; perform non-overlapping automatic arrangement based on the scaled UV island outline and area, and output the final UV map coordinates.

[0073] For further details, please refer to Figure 2 , Figure 2 This is a schematic diagram of a UV island control method for a 3D spatial model provided in an embodiment of this application. Figure 2 As shown, Step 1: Import the 3D spatial model to be expanded; Step 2: Perform UV cutting and differentiation on the 3D spatial model; Step 3: Perform dual spatial alignment and rotation consistency processing on the UV islands; Step 4: Resample and layout each rotated UV island.

[0074] In a specific embodiment, the UV island is simultaneously constructed with a local coordinate system, aligned with the UV island space, and transformed from UV space to 3D space. Then, the extreme values ​​of the bounding box are calculated using the UV-to-3D space coordinate transformation to obtain two extreme points U and two extreme points V. Four extreme value vectors are obtained by simultaneously constructing a local coordinate system, aligning the UV island space, and transforming the UV space to 3D space using these four extreme points. Two positive basis matrices for each of the U and V extreme value vectors obtained from the UV-to-3D space coordinate transformation are then calculated. The inverses of the two positive basis matrices of the transformation are multiplied with the corresponding positive basis matrices aligned with the UV island space to construct a local coordinate system. The resulting U and V matrix multiplication is then subjected to mix(slerp) interpolation for rotation, alignment, and smoothing. The smoothing matrix of mix(slerp) is then rotated on the coordinate system transformation from UV space to 3D space to correct the smoothing rotation direction and make the orientation of all UV islands relatively uniform. Finally, all the original UV islands (default model) of the model are uniformly sampled to obtain the rotated UV data. Based on the area of ​​all UV islands in 3D space, the UVs in UV space are re-topologically resized and automatically arranged.

[0075] This application provides a UV island control method for 3D spatial models. The UV island control method includes: acquiring a 3D spatial model to be processed; cutting the surface of the 3D spatial model multiple times to decompose the model surface into multiple independent UV islands; for each UV island, constructing a dual-space alignment system between the three-dimensional object space and the two-dimensional UV space; calculating the local orthogonal basis and rotation matrix based on the extreme points in the two spaces, and performing matrix hybrid interpolation to unify the rotation orientation of all UV islands in the UV space; and rescaling and automatically arranging the UV coordinates of each rotated UV island according to the actual surface area of ​​each UV island in the three-dimensional object space. Through the full-link technical architecture of "collaborative cutting - dual-space alignment - density-driven arrangement", it is possible to achieve strong consistency of the UV island spatial rotation direction and significantly reduce the UV defect rate without calculating a large number of parameters.

[0076] Please see Figure 3 , Figure 3 This is a schematic diagram of a UV island control device for a 3D spatial model provided in an embodiment of this application. Figure 3 As shown, the UV island control device 300 for 3D spatial models includes: The cutting module 310 is used to acquire the 3D spatial model to be processed, and to cut the surface of the 3D spatial model multiple times to decompose the model surface into multiple independent UV islands. The spatial alignment module 320 is used to construct a dual spatial alignment system between the three-dimensional object space and the two-dimensional UV space for each UV island. It calculates the local orthogonal basis and rotation matrix based on the extreme points in the two spaces and performs matrix hybrid interpolation to unify the rotation orientation of all UV islands in the UV space. The layout module 330 is used to rescale and automatically arrange the UV coordinates of each rotated UV island based on the actual surface area of ​​each UV island in the three-dimensional object space.

[0077] Furthermore, the cutting module 310 is used to cut the surface of the 3D spatial model multiple times, decomposing the model surface into multiple independent UV islands: The 3D spatial model is initially segmented based on the topological cluster attributes of the model, dividing each independent topologically connected region into an initial UV island; Within each initial UV island, groups are formed based on the angle between the vertex normal direction and the preset reference direction, and a second cut is performed on each group; For each UV island after secondary cutting, a curvature-based edge weight segmentation algorithm is used to set cutting seams in high curvature regions to complete the third cutting. The boundaries of the UV islands after three-stage cutting are flattened to obtain the preliminary UV coordinates of multiple independent UV islands.

[0078] Furthermore, the spatial alignment module 320 is used to construct a dual-space alignment system for each UV island between the three-dimensional object space and the two-dimensional UV space. This is achieved by calculating the local orthogonal basis and rotation matrix based on extrema points in both spaces, and performing matrix hybrid interpolation to unify the rotational orientation of all UV islands in the UV space. For each UV island, its first coordinate data in the three-dimensional object space and its second coordinate data in the two-dimensional UV space are calculated simultaneously. The first coordinate data and the second coordinate data are transformed into a local coordinate system with the island center as the origin and the normalized average normal as the Z-axis, and forced planeization is performed to obtain the first plane point set and the second plane point set. Calculate the bounding boxes of the first and second planar point sets in the plane respectively, and obtain the maximum point, minimum point, maximum point and minimum point in the U direction, and minimum point in the V direction as four extreme points; Based on the four extreme points, local orthogonal basis matrices in the U and V directions are constructed respectively. After alignment by the inverse matrix, the alignment matrices in the U and V directions are smoothly interpolated to generate a smooth rotation matrix, which is then applied to the UV space coordinates to achieve uniformity of the rotation orientation of the UV islands.

[0079] Furthermore, the spatial alignment module 320 is used to construct local orthogonal basis matrices in the U and V directions based on the four extreme points, and after inverse matrix alignment, to perform smooth interpolation on the U and V alignment matrices to generate a smooth rotation matrix, which is then applied to the UV spatial coordinates to achieve uniformity of the UV island rotation orientation. Based on the four extreme points, local orthogonal bases of the first plane point set and the second plane point set in the U and V directions are constructed respectively, and corresponding first U-direction rotation matrix, first V-direction rotation matrix, second U-direction rotation matrix, and second V-direction rotation matrix are generated. Calculate the inverse alignment matrix of the second U-direction rotation matrix relative to the first U-direction rotation matrix, and the inverse alignment matrix of the second V-direction rotation matrix relative to the first V-direction rotation matrix, respectively, to obtain the U-direction alignment matrix and the V-direction alignment matrix; Perform smooth interpolation on the U-axis alignment matrix and the V-axis alignment matrix to generate a final smooth rotation matrix; The final smooth rotation matrix is ​​applied to the second coordinate data to achieve a unified rotation orientation of the UV islands in UV space.

[0080] Furthermore, the spatial alignment module 320 determines the local orthogonal basis in the following manner: A local orthogonal basis is constructed by using the normalized average normal as the Z-axis, the derived vector between the standard upward vector and the Z-axis as the X-axis, and the cross product direction of the Z-axis and the X-axis as the Y-axis.

[0081] Furthermore, the layout module 330 is used to rescale and automatically arrange the UV coordinates of each rotated UV island based on the actual surface area of ​​each UV island in the three-dimensional object space. Translate all UV coordinates of each UV island to the origin and overlap them, then calculate the actual surface area of ​​each UV island in three-dimensional space. The UV coordinates of the UV island are uniformly scaled based on the actual surface area and scaling factor. Based on the scaled UV island outlines and areas, perform non-overlapping automatic arrangement and output the final UV map coordinates.

[0082] This application provides a UV island control device for 3D spatial models. The UV island control device includes: a cutting module for acquiring the 3D spatial model to be processed and cutting the surface of the 3D spatial model multiple times to decompose the model surface into multiple independent UV islands; a spatial alignment module for constructing a dual-space alignment system between the three-dimensional object space and the two-dimensional UV space for each UV island, calculating the local orthogonal basis and rotation matrix based on the extreme points in the two spaces, and performing matrix hybrid interpolation to unify the rotation orientation of all UV islands in the UV space; and a layout module for rescaling and automatically arranging the UV coordinates of each rotated UV island according to the actual surface area of ​​each UV island in the three-dimensional object space. Through the full-link technical architecture of "collaborative cutting - dual-space alignment - density-driven arrangement", it is possible to achieve strong consistency of the spatial rotation direction of UV islands and significantly reduce the occurrence rate of UV defects without calculating a large number of parameters.

[0083] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.

[0084] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, they can perform the operations described above. Figure 1 as well as Figure 2 The steps of the UV island control method for 3D spatial models in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.

[0085] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 as well as Figure 2 The steps of the UV island control method for 3D spatial models in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.

[0086] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0088] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0089] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0090] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, 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 a portion 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 cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0091] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A UV island control method for 3D spatial models, characterized in that, The UV island control method includes: Obtain the 3D spatial model to be processed, and cut the surface of the 3D spatial model multiple times to decompose the model surface into multiple independent UV islands; For each of the UV islands, a dual-space alignment system is constructed between the three-dimensional object space and the two-dimensional UV space. The rotation orientation of all UV islands in the UV space is unified by calculating the local orthogonal basis and rotation matrix based on the extreme points in the two spaces and performing matrix hybrid interpolation. Based on the actual surface area of ​​each UV island in the three-dimensional object space, the UV coordinates of each rotated UV island are rescaled and automatically rearranged.

2. The UV island control method according to claim 1, characterized in that, The process of repeatedly cutting the surface of the 3D spatial model to decompose the model surface into multiple independent UV islands includes: The 3D spatial model is initially segmented based on the topological cluster attributes of the model, dividing each independent topologically connected region into an initial UV island; Within each initial UV island, groups are formed based on the angle between the vertex normal direction and the preset reference direction, and a second cut is performed on each group; For each UV island after secondary cutting, a curvature-based edge weight segmentation algorithm is used to set cutting seams in high curvature regions to complete the third cutting. The boundaries of the UV islands after three-stage cutting are flattened to obtain the preliminary UV coordinates of multiple independent UV islands.

3. The UV island control method according to claim 2, characterized in that, The execution order of the three cutting steps is configurable, and they can be freely combined or selectively skipped based on model features.

4. The UV island control method according to claim 1, characterized in that, For each of the UV islands, a dual-space alignment system is constructed between the three-dimensional object space and the two-dimensional UV space. This is achieved by calculating the local orthogonal basis and rotation matrix based on the extremum points in both spaces, and performing matrix hybrid interpolation to unify the rotational orientation of all UV islands in the UV space. This includes: For each UV island, its first coordinate data in the three-dimensional object space and its second coordinate data in the two-dimensional UV space are calculated simultaneously. The first coordinate data and the second coordinate data are transformed into a local coordinate system with the island center as the origin and the normalized average normal as the Z-axis, and forced planeization is performed to obtain the first plane point set and the second plane point set. Calculate the bounding boxes of the first and second planar point sets in the plane respectively, and obtain the maximum point, minimum point, maximum point and minimum point in the U direction, and minimum point in the V direction as four extreme points; Based on the four extreme points, local orthogonal basis matrices in the U and V directions are constructed respectively. After alignment by the inverse matrix, the alignment matrices in the U and V directions are smoothly interpolated to generate a smooth rotation matrix, which is then applied to the UV space coordinates to achieve uniformity of the rotation orientation of the UV islands.

5. The UV island control method according to claim 4, characterized in that, The process involves constructing local orthogonal basis matrices in the U and V directions based on four extreme points, aligning them using inverse matrices, and then smoothly interpolating the U and V alignment matrices to generate a smooth rotation matrix. This matrix is ​​then applied to the UV space coordinates to achieve unified rotation orientation of the UV islands. This includes: Based on the four extreme points, local orthogonal bases of the first plane point set and the second plane point set in the U and V directions are constructed respectively, and corresponding first U-direction rotation matrix, first V-direction rotation matrix, second U-direction rotation matrix, and second V-direction rotation matrix are generated. Calculate the inverse alignment matrix of the second U-direction rotation matrix relative to the first U-direction rotation matrix, and the inverse alignment matrix of the second V-direction rotation matrix relative to the first V-direction rotation matrix, respectively, to obtain the U-direction alignment matrix and the V-direction alignment matrix; Perform smooth interpolation on the U-axis alignment matrix and the V-axis alignment matrix to generate a final smooth rotation matrix; The final smooth rotation matrix is ​​applied to the second coordinate data to achieve a unified rotation orientation of the UV islands in UV space.

6. The UV island control method according to claim 1, characterized in that, The local orthogonal basis is determined in the following way: A local orthogonal basis is constructed by using the normalized average normal as the Z-axis, the derived vector between the standard upward vector and the Z-axis as the X-axis, and the cross product direction of the Z-axis and the X-axis as the Y-axis.

7. The UV island control method according to claim 1, characterized in that, The step of rescaling and automatically arranging the UV coordinates of each rotated UV island based on its actual surface area in the three-dimensional object space includes: Translate all UV coordinates of each UV island to the origin and overlap them, then calculate the actual surface area of ​​each UV island in three-dimensional space. The UV coordinates of the UV island are uniformly scaled based on the actual surface area and scaling factor. Based on the scaled UV island outlines and areas, perform non-overlapping automatic arrangement and output the final UV map coordinates.

8. A UV island control device for 3D spatial models, characterized in that, The UV island control device includes: The cutting module is used to acquire the 3D spatial model to be processed, and to cut the surface of the 3D spatial model multiple times to decompose the model surface into multiple independent UV islands. The spatial alignment module is used to construct a dual-space alignment system for each UV island in the three-dimensional object space and the two-dimensional UV space. It calculates the local orthogonal basis and rotation matrix based on the extreme points in the two spaces and performs matrix hybrid interpolation to unify the rotation orientation of all UV islands in the UV space. The layout module is used to rescale and automatically arrange the UV coordinates of each rotated UV island based on the actual surface area of ​​each UV island in the 3D object space.

9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the UV island control method for a 3D spatial model as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the UV island control method for a 3D spatial model as described in any one of claims 1 to 7.