A pixel migration method based on three-dimensional reconstruction and view algorithm

CN123015801APending Publication Date: 2026-10-30李鹏格
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611342498.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,这种基于物理采样的方法存在以下明显缺陷:首先,烘焙依赖逐像素光线追踪,其计算量随纹理分辨率和模型面数呈指数级增长,导致大批量高精度资产迁移效率低下,且易因内存或者显存溢出而中断流程;其次,烘焙过程作为一种“黑盒化”的批处理操作,无法向用户提供采样映射的中间状态信息,当生成结果出现黑斑、错位等问题时,用户只能依靠经验进行反复试错与参数调整,调试过程繁琐且不可控,调试成本高;最后,现有烘焙机制通常将各个UDIM分块视为独立任务进行处理,缺乏对纹理资产整体逻辑的感知,在面对跨分块重组、多对多迁移等复杂布局变更时,生产流程被迫碎片化,无法实现一体化、自动化的布局迁移

Benefits of technology

在本说明书提供的基于三维重建与视图算法的像素迁移方法中,构建网格物体在源和目标纹理之间的结构化映射关系,并基于网格拓扑结构的一致性,将纹理数据从源UV坐标系重映射至目标UV坐标系,然后在三维平面上重建以主UV为几何基准的画布网格并为其成对创建主映射层与分割映射层,分别写入源坐标与目标坐标,最终驱动摄像机视点在画布上遍历有效采样点,依据主UV坐标从源纹理读取像素并依据分割UV坐标写入目标纹理。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015801A_ABST
    Figure CN123015801A_ABST
Patent Text Reader

Abstract

The application discloses a pixel migration method based on three-dimensional reconstruction and view algorithm, and relates to the technical field of computer graphics and three-dimensional data processing. The method firstly carries out standardization and consistency check on source and target textures, and constructs a mapping cache based on the consistency of three-dimensional grid topology, and establishes the corresponding relationship of surfaces and source UV coordinates and target UV coordinates; the main / segmented UV role distribution, dynamic threshold canvas segmentation and adaptive brush track generation are constructed based on the geometric connected components of the union-find set, the mapping cache is converted into hierarchical canvas data, interaction data and brush data; the canvas grid is reconstructed in the three-dimensional space according to the canvas data, and the multiple pairs of UV data are filled; finally, the pixels of the source texture are migrated to the target texture based on the interaction data and the brush data through viewport relocation and texture projection drawing. The method realizes the order-of-magnitude improvement of the batch high-precision asset texture migration performance, greatly shortens the iteration cycle and reduces the hardware dependence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer graphics and 3D data processing technology, and in particular to a pixel migration method based on 3D reconstruction and view algorithms. Background Technology

[0002] 3D model texture processing is a crucial step in content production. In traditional workflows, textures and UV layouts are statically coupled. Once the UV layout changes due to optimizing pixel density or adjusting UDIM blocks, even if the model's geometry and topology remain unchanged, the original texture assets will become invalid and must be redrawn or remapped.

[0003] The current common solution is to use baking and reprojection technology, which projects texture data from the source UV channel to the target UV channel using a ray casting algorithm while maintaining the model topology, and then bakes it into a new texture map. However, this physically based sampling method has the following obvious drawbacks: First, baking relies on per-pixel ray tracing, and its computational load increases exponentially with texture resolution and model face count, resulting in low efficiency for large-scale high-precision asset migration and easy interruption due to memory or video memory overflow; Second, as a "black box" batch processing operation, the baking process cannot provide users with intermediate state information of the sampling mapping. When problems such as black spots or misalignments occur in the generated results, users can only rely on experience to repeatedly try and adjust parameters, which is cumbersome, uncontrollable, and costly; Finally, existing baking mechanisms usually treat each UDIM block as an independent task, lacking awareness of the overall logic of the texture assets. When facing complex layout changes such as cross-block reorganization and many-to-many migration, the production process is forced to be fragmented, making it impossible to achieve integrated and automated layout migration.

[0004] In summary, from the perspective of underlying algorithms, traditional solutions fail to fully utilize the data remapping potential brought about by model topology consistency. Instead, they mechanically apply high-overhead physical sampling logic. Even when the geometric surfaces are completely consistent and only the UV layout changes, redundant physical simulation processes are still executed, resulting in performance bottlenecks and uncontrollable processes. Summary of the Invention

[0005] Therefore, it is necessary to provide a pixel migration method based on 3D reconstruction and view algorithm to address the above-mentioned technical problems.

[0006] The following technical solution is adopted in this specification: This specification provides a pixel migration method based on 3D reconstruction and view algorithms, including: Obtain the source and target textures, as well as the source and target UV maps associated with the 3D mesh; Based on the source UV mapping and target UV mapping, a structured mapping relationship is constructed using the face index as the primary key according to the surface topology of the 3D mesh. Based on the target UV mapping, construct the geometric connectivity components of the adjacency relationship; Calculate the number of effective UDIM blocks for the source UV mapping and the target UV mapping respectively, and determine the main UV mapping and the segmented UV mapping based on the number of UDIM blocks, wherein the one with fewer blocks is designated as the main UV mapping; Based on the structured mapping relationship, each face in the set of geometrically connected components is traversed to generate a composite dataset containing face attributes and UV mapping information. Canvas segmentation and topology re-identification are performed according to a preset segmentation threshold to generate a hierarchical dataset. The hierarchical dataset is traversed, and the grid segmentation step size is determined by combining a block fusion mechanism to generate an interactive dataset containing a list of valid trajectory points and brush scaling parameters. The interactive dataset is then integrated into the hierarchical dataset. Based on the hierarchical dataset, a canvas mesh is constructed on a three-dimensional spatial plane; Based on the hierarchical dataset and the list of valid trajectory points, each sampling point is traversed on the canvas grid, and the viewport is repositioned to the 3D position corresponding to the sampling point on the canvas grid. Under the repositioned viewport, pixel information is read from the source texture according to the main UV coordinates corresponding to the sampling point on the canvas grid, and the read pixel information is written to the target texture according to the segmented UV coordinates corresponding to the same sampling point on the canvas grid, thus completing pixel migration.

[0007] Furthermore, the construction of the structured mapping relationship using the face index as the primary key specifically includes: Access the data blocks of the target mesh object via the graphics API; Based on the data block, a face set containing the target mesh object is constructed, wherein each face in the face set contains an ordered set of cyclic vertices; By forcibly locking the reading order of vertices, all vertices are traversed; Access the source UV map and target UV map associated with the target mesh object respectively; obtain the coordinates of each cyclic vertex in the source texture and the coordinates in the target texture for each face; Based on the coordinates in the source texture and the coordinates in the target texture, a structured mapping relationship is constructed with the face index as the primary key.

[0008] Furthermore, the structured mapping relationship is verified through data integrity and UDIM consistency checks to confirm the correspondence between UV tiles and texture files, including: Based on the source UDIM block number and the target UDIM block number, after deduplication, construct the source valid block number set and the target valid block number set; For each target texture channel, the set of source UDIM numbers and the set of target UDIM numbers corresponding to the identified texture files under that target texture channel are counted respectively. The UDIM consistency check is successful when the source valid block number set is included in the source UDIM number set and the target valid block number set is included in the target UDIM number set. When the verification fails, an exception will be thrown and the missing channel name and corresponding UDIM number will be output.

[0009] Furthermore, based on the target UV mapping, the geometric connectivity components of the adjacency relationship are constructed, including: If the surfaces share a common edge in the UV space and their UV coordinates are continuous, the surfaces that meet the conditions are clustered into the same UV island to construct geometrically connected components.

[0010] Furthermore, the generation of the composite dataset containing surface attributes and UV mapping information specifically includes: Based on the topology data of the target UV mapping, a disjoint-set data structure is initialized; the disjoint-set is configured with path compression and rank-based merging optimization mechanisms; Traverse each face of the target mesh and check whether adjacent faces share a common edge in UV space: if two faces share a common edge and their UV coordinates are continuous, then perform a merge operation in the disjoint-set data structure. After traversal, all face indices are categorized by root node through a search operation to obtain a set of geometrically connected components grouped by islands; the set of geometrically connected components consists of each island and a list of face indices corresponding to each island. Based on the UDIM calculation formula, the number of UDIM blocks for the source UV mapping and the target UV mapping is obtained; and based on the number of UDIM blocks for the source UV mapping and the number of UDIM blocks for the target UV mapping, the main UV mapping and the segmented UV mapping are determined. Traverse each face within the geometrically connected components of the geometrically connected component set, and construct a composite dataset based on the geometric attributes and attribution relationships of each face.

[0011] Furthermore, the step of performing canvas segmentation and topological re-identification based on a preset segmentation threshold to generate a hierarchical dataset specifically includes: The segmentation threshold is determined based on the preset maximum allowed number of UV mapping stacks; Traverse the main UV mapping in the composite dataset and extract the main UDIM block number and its associated face index set for each main UDIM. For each main UDIM block, check the number of its associated segmented UDIM blocks. If the number of segmented UDIM blocks exceeds the segmentation threshold, then divide the segmented UDIM block into multiple subgroups. For each segmented UDIM block in the subgroup, independent local geometric islands are identified based on the face adjacency relationship in the main UV mapping space. The bounding box and total area of ​​each island are calculated, generating a hierarchical dataset containing the bounding box of the island, the area of ​​the island, and simplified polygon boundary information.

[0012] Furthermore, the generation of the interactive dataset containing the list of valid trajectory points and brush scaling parameters includes: Traverse each local geometric island in the hierarchical dataset and dynamically adjust the brush scaling parameters according to the ratio of the bounding box area of ​​the island to the island area. The grid segmentation step size is determined based on the adjusted brush scaling parameters, and a list of discrete sampling center points of the brush is generated. Geometric inclusion detection is performed on the sampling center points to remove invalid points located outside the islands, thus obtaining a list of valid trajectory points; The brush scaling parameters and the list of valid trajectory points are encapsulated into an interactive dataset and integrated into a hierarchical dataset.

[0013] Furthermore, the construction of the canvas mesh on the three-dimensional spatial plane specifically includes: Traverse the main UV mapping block number and its subordinate segment block groups in the hierarchical dataset, and create a corresponding canvas mesh object for each segment block group; For each segmented UDIM block contained in the segmented block group, a main mapping layer and a segmentation mapping layer are created in pairs in the canvas grid object; Extract the current main UV coordinate list, and map each coordinate point in the main UV coordinate list to vertex coordinates in three-dimensional space according to the preset canvas plane. Connect the vertices of the face in order to generate a physical mesh surface. Based on the physical mesh surface, the current main UV coordinate list is written into the main mapping layer, and the current segment UV coordinate list is written into the segment mapping layer, thus completing the construction of the canvas mesh.

[0014] Further, the step of repositioning the viewport to the corresponding three-dimensional position of the sampling point on the canvas grid includes: Update the observation target point of the viewport camera to the three-dimensional coordinates of the sampling point, and synchronously update the camera position so that the camera's line of sight is perpendicular to the plane of the canvas grid.

[0015] Further, reading pixel information from the source texture and writing the pixel information into the target texture includes: Based on the role assignment of source UV mapping and target UV mapping, the source texture is determined as the sampling object and the target texture as the drawing object; Load the corresponding source texture file and target texture file, and switch the corresponding UV mapping layer according to the main UDIM block number and the segmented UDIM block number; Read the baseline side length of the current island's mesh segmentation and calculate the physical screen size of the brush based on the resolution of the target texture; Extract the list of valid trajectory points for the current isolated island, iterate through each trajectory point, and reposition the camera viewpoint to the corresponding 3D spatial position of that trajectory point; The coordinate space transformation is performed through the graphics API to map the trajectory points to viewport pixel coordinates, and texture projection is performed on the target texture with the coordinates as the center and the determined brush size. After traversing the data at all levels, the drawn target texture data is exported, completing the pixel migration.

[0016] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects: In the pixel migration method based on 3D reconstruction and view algorithm provided in this specification, a structured mapping relationship between the mesh object and the source and target textures is constructed. Based on the consistency of the mesh topology, the texture data is remapped from the source UV coordinate system to the target UV coordinate system. Then, a canvas mesh with the main UV as the geometric reference is reconstructed on the 3D plane, and a main mapping layer and a segmentation mapping layer are created for it in pairs. The source coordinates and target coordinates are written respectively. Finally, the camera viewpoint is driven to traverse the effective sampling points on the canvas, read pixels from the source texture according to the main UV coordinates, and write them to the target texture according to the segmentation UV coordinates.

[0017] By treating texture information as a data attribute layer attached to the three-dimensional topological surface of the model, the expression of this attribute layer in the new two-dimensional UV coordinate system is directly reconstructed without changing the topological relationship. This achieves logical decoupling between texture and UV layout, resulting in an order-of-magnitude improvement in the performance of high-precision asset migration and a significant reduction in the risk of memory overflow.

[0018] Furthermore, this invention transforms the traditional process into a transparent and controllable system. The scalable and flexible view inspection method facilitates real-time previewing and precise defect location for users, achieving a significant improvement in the performance of high-precision asset texture transfer, greatly shortening the iteration cycle and reducing hardware dependence. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0020] Figure 1 This document presents a schematic diagram of a pixel migration method based on 3D reconstruction and view algorithms. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.

[0022] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0023] Figure 1 This is a flowchart illustrating a pixel migration method based on 3D reconstruction and view algorithms in this specification, specifically including the following steps: S101: Data layer initialization and parameter verification: Standardized renaming of source and target textures.

[0024] This step aims to establish a standardized data input environment to ensure the logical traceability and integrity of source and target data.

[0025] First, the system receives the user's input of the original texture path and configuration parameters. To resolve the file index conflict between multi-channel and multi-UDIM blocks, a standardized renaming process is performed on the input original texture path based on the configuration parameters.

[0026] Specifically, the input texture set is defined as For each texture file in the collection Get the channel type corresponding to its directory. With UDIM number It also generates standardized, unique identifier filenames, following the rules below: ; in, For user-defined prefixes, Identifier for source or target UV mapping. For file extensions.

[0027] This step maps the physical storage path to a unified resource handle that can be directly invoked by the logical layer.

[0028] S102: Build a performance-oriented topology-UV mapping cache.

[0029] This invention utilizes the property that the geometric topology of a 3D model remains unchanged during texture migration, and constructs an efficient search data structure through a one-time traversal.

[0030] 1) Traversal and extraction of grid topology data The system accesses the data blocks of the target mesh object through a graphics API. A mesh model is defined, which contains a set of faces. ,in This represents the total number of faces in the model; for each face... It contains a set of ordered loops, denoted as . ,in This represents the number of vertices on the face; for example, if the face is a triangle, then... If the face is a quadrilateral, then To ensure the correctness of texture mapping, the system forcibly locks the vertex reading order.

[0031] 2) Synchronous indexing of bidirectional UV coordinates During the traversal, the system accesses the source UV mappings associated with the mesh objects respectively. and target UV mapping ; and for the surface Each cycle point in Perform the following steps: Extract source UV coordinates: Execute , indicating face The The coordinates of each vertex in the source UV space .

[0032] Extract target UV coordinates: Execute , indicating face The Coordinates of each vertex in the target UV space .

[0033] Calculate the UV coordinate block number: based on the UDIM number calculation formula is as follows: and Calculate its corresponding block number. The formula for calculating the UDIM number is as follows: ; in, Based on the offset (e.g., 1001), The grid step size (e.g., 10). and These represent the integer indices of the UV coordinates in the horizontal and vertical directions, respectively.

[0034] 3) Generate structured mapping relationship data structure Based on the extracted and calculated data described above, a structured mapping cache is constructed in memory. and , Indexed by face It is the primary key. Its specific data structure definition is as follows:

[0035] ; in, A globally unique index for the mesh face. List of source UV coordinates List of target UV coordinates and The order strictly corresponds to the geometric vertex order.

[0036] by Based on this, its specific data structure is defined as follows: ; in, For A mapping cache is constructed using the primary key and the source and target vertex UV coordinate block numbers as values. This is the set of deduplicated source UV mapping block numbers. This is the set of block numbers for the target UV mapping after deduplication.

[0037] 4) Data integrity and UDIM consistency verification After establishing the mapping relationship, the input data needs to be topologically consistent to ensure that the texture assets cover all UV areas of the model.

[0038] First, the system obtains In and The set is then processed for each texture channel selected by the user. ( ), respectively count the set of UDIM numbers corresponding to the identified texture files under this channel. The validation logic must satisfy the following set inclusion condition:

[0039] That is, for each channel, its texture file set must contain all valid UDIM blocks of the model. If the verification fails, the system will throw an exception and output the names of the missing channels and their corresponding UDIM numbers, i.e., the difference set of the output sets. The content.

[0040] S103: Run the data preprocessing engine to generate canvas and interactive data.

[0041] This step, serving as the core computational hub, aims to transform abstract geometric topological information into three executable core objects: canvas data, interaction data, and pen data. This process achieves logical decoupling between source and target data through Disjoint-Set Union (DSU), geometric computation, and adaptive segmentation strategies.

[0042] 1) Construction of geometrically connected components based on disjoint-set data structure To perform data aggregation and cleaning on a UV island basis, the system first constructs geometrically connected components. Specifically, the system first initializes a disjoint-set data structure configured with path compression and rank-based merging optimization mechanisms. Subsequently, the system traverses... face index ,against corresponding Construct the edges mapping UV coordinates of the target, and check whether faces share common edges in UV space. If two faces share common edges and their UV coordinates are continuous, perform a merge operation in the disjoint-set data structure. After traversal, perform a search operation to find all faces. Group by root node, output the set of geometrically connected components grouped by island. This collection contains clusters aggregated on an island-by-island basis. List.

[0043] 2) Canvas data generation and data mapping The generation of canvas data involves the role assignment of master / segment UV mapping, coordinate mapping, and canvas segmentation.

[0044] (1) UV role allocation strategy To minimize the number of canvases created, the system... Extract and The system collects a set of UV maps and obtains the set size. It then determines the primary UV map and the split UV map based on the number of UDIM tiles in the source and target UV maps. If the number of source UV tiles is less than or equal to the number of target UV tiles, the source UV map is set as the primary UV map, and the target UV map is set as the split UV map; otherwise, they are swapped. This strategy ensures that subsequent canvas creation is based on the side with fewer tiles, significantly reducing canvas mesh creation and rendering overhead.

[0045] (2) Data mapping and structured reorganization This step performs deep data parsing and structured reorganization. System traversal. Face index of each isolated island Calculate the geometric properties and attribution relationships of the corresponding surfaces, and construct a composite dataset. The structure of this dataset is defined as follows:

[0046] in, For face index The primary key contains a list of normalized principal UV coordinates. Normalized segmentation UV coordinate list And the mapping cache of UV surface area S; To map the UDIM number to the main UV Primary key, storage plane index A list; To segment UV mapping UDIM number Primary key, storage plane index A list.

[0047] To populate the above structure, the system indexes each face. Perform the following sub-steps: Block attribution calculation and index table construction: The system first obtains the face index. exist In and Find the UV coordinates of the first vertex and construct the primary key. ,from In Obtain the chunk number and determine the chunk number based on the assigned UV role. and Subsequently, In the middle, the face index Added to In the list of primary key mapping caches; In the middle, the face index Added to The list of primary key mapping caches. Through this step, and Data clustering based on UDIM block numbers was completed.

[0048] Coordinate normalization and geometric property calculation: for face indexing corresponding and For each vertex's UV coordinates, calculate its relative coordinates within the block space, i.e., the normalized coordinates: The system will normalize the list of master UV coordinates. List of segmented UV coordinates deposit middle.

[0049] Next, the UV surface area is calculated. To control brush precision, the system uses the Shoelace Formula to calculate the area of ​​this surface in UV space. The formula is as follows:

[0050] in, For the normalized first vertex coordinates This represents the total number of vertices on the face. The calculated area is... Store together middle.

[0051] In summary, after the above sub-steps, the final generated... Fully includes face index Primary key mapping cache And a bidirectional mapping cache with UDIM block number as the primary key. and .

[0052] (3) Canvas segmentation and logical reconstruction based on dynamic threshold To address the layer limitations of the canvas grid and ensure the logical independence of multiple UDIM data, this step performs threshold-based depth segmentation and topology re-identification on the recombined data.

[0053] Segmentation threshold calculation: The system first reads the maximum allowed number of UV mapping stacks set in the global configuration parameters. This parameter determines the maximum number of texture layers a single canvas can hold. The system determines this based on... The parity of the segmentation threshold is calculated using the following formula. This serves as a critical criterion for subsequent data grouping:

[0054] like For even numbers, the calculation formula is: like For odd numbers, the calculation formula is: in, The maximum number of split UDIM blocks that can coexist under a single primary UDIM block unit is defined.

[0055] Data classification based on main UV mapping: system traversal In Extract the block number of each main UV mapping. and its associated face index Set. For each ,from of Extract those belonging to the face index set. , And the UV surface area S, construct the intermediate data structure Meanwhile, based on the face index set, in of Retrieve the corresponding mapping relationship and construct the mapping cache of the current main UV mapping block surface index set in the segmented UV mapping. Subsequently, the following intermediate data structure is constructed:

[0056] in, For only the current main UV mapping block involved Information in the middle; This step caches the mapping of the current main UV map block index in the split UV map. It then segments the global data into independent data blocks, each based on a main UV map block.

[0057] Threshold segmentation and subgroup construction: targeting Each Below The system checks the number of the segments it contains. total .like The system follows The step size divides the segmented block number into multiple subgroups. For example, if the main UV mapping block 1001 is associated with 5 sub-blocks [1011, 1012, 1013, 1014, 1015], and If so, the system divides it into group A[1011,1012], group B[1013,1014], and group C

[1015] .

[0058] Secondary topology reconstruction within groups: This step performs secondary topology recognition based on grouping, generating a hierarchical dataset containing the bounding boxes of isolated islands, total area, and topological boundary information. The system assigns a block number to each main UV mapping. and each of its subgroups Iterate through each segment number within the group. .against The system re-initializes and searches the associated face index set, detects the adjacency relationships of these faces in the main UV mapping space, and identifies geometric islands. Subsequently, the system calculates the geometric bounding box of each island. The total area of ​​the island is obtained by summing the UV surface area. Simultaneously, the system extracts and simplifies topological boundaries, constructing a standardized set of polygon boundaries. The specific steps are as follows:

[0059] Boundary edge identification: The system iterates through all face indices in the identified isolated island objects. ,from In Each topological edge is identified and the frequency of its reference by adjacent faces is counted. If a topological edge is referenced by only one face, that is, the reference count is 1, then the topological edge is determined to be a boundary edge.

[0060] Boundary Connection and Simplification: The system connects all obtained boundary edges into an ordered closed loop, and performs collinearity simplification on the vertices of the closed loop. For three consecutive points A, B, and C, the vector fork is calculated. .like ( If the error value is extremely small (e.g., 1e-6), then the three points are determined to be collinear, and the intermediate point is removed. .

[0061] in, For containing subgroups The list of partitioned blocks, each block being a group. Primary key, refactored isolated objects List-based value mapping cache The structure is defined as follows: in, This is the set of face indices corresponding to the isolated islands. This structure ensures that subsequent processing can accurately obtain the physical boundaries of each isolated island.

[0062] 3) Generate interactive data and adaptive brush trajectory This step aims to be based on topology reconstruction data. The algorithm calculates the dynamic trajectory and sampling scale of the brush, introduces a geometric filtering mechanism to remove invalid calculation nodes, and finally encapsulates the results into a preprocessed structure. .

[0063] (1) Adaptive pen scaling factor calculation System traversal For each Below Grouping in Visit the isolated objects one by one. Utilizing its bounding box information With total area information Calculate the brush scaling parameters. First, calculate the bounding box area of ​​the islands. Then, the area percentage of the isolated islands was calculated. Secondly, the system presets an area ratio threshold. (e.g., 0.1) and the safety lower limit threshold (e.g., 1e-6). The system is based on... The maximum segmentation block side length is dynamically adjusted. ,in M The input value is denoted as (e.g., 64), if The new block side length is calculated using the logarithmic decay formula. :

[0064] This formula ensures that the brush size is reduced by powers of 2 by calculating the logarithm of the proportional difference, thereby maintaining computational performance while ensuring sampling density.

[0065] Furthermore, if If the island is determined to be an extremely long and narrow or discrete region, a preset fixed reduction ratio is directly applied. (e.g., 8), that is This is to avoid performance loss caused by excessive partitioning. Furthermore, if... Then the default side length will be retained. .

[0066] (2) Mesh segmentation based on block fusion mechanism based on The system calculates the initial number of segmentations for the island in the U / V directions. Taking the U direction as an example, the initial number of segmentations is calculated. ,in The resolution is set to the U-axis of the target texture. To prevent tiny fragments from forming at the boundaries, the system performs block blending verification. First, the UV coordinates are converted to pixel coordinates. = ( - )× Set the block fusion threshold. (e.g., 0.01), determine the length of the last piece's edge. = - ( - 1) × × Compared with the initial number of splits :

[0067] when and At that time, perform the fusion operation, and make The last piece is merged into the previous piece.

[0068] when and Sometimes When = 1, no fusion operation is performed, let .

[0069] The final determined segmentation step size is The same applies to the V direction.

[0070] (3) Construct the initial data block of the brush trajectory Based on the corrected segmentation step size and The system generates a list of discrete sampling center points for the brush. This is based on the total number of segmentations. and Grid partitioning index The center coordinates are calculated as follows:

[0071] The system will generate all center points Temporarily stored in the candidate list Currently, it awaits further validity filtering.

[0072] (4) Filtering of invalid sampling points based on ray tracing To improve the computational efficiency of pixel migration, the system is based on existing... middle Extracted For the candidate list For each sampling center point, a geometric inclusion test is performed to remove invalid center points located outside the island topology.

[0073] Specifically, the system targets each candidate center point A virtual ray is emitted in a fixed direction (such as the positive X-axis), and the relationship between the ray and the x-axis is calculated. Total number of intersections of the boundary Judgment is based on parity rules:

[0074] like Judgment point Located inside an isolated island, then The center point is retained in the middle; like Judgment point Located outside the isolated island, from Remove the center point from the list. After iterative filtering, the final list of valid points is denoted as... .

[0075] (5) Data fusion and final output The system encapsulates the trajectory data, which has undergone scaling calculations and geometric filtering, into sub-data structures. : in, The reference side length for mesh division determined in step 3.3.1 is... .

[0076] Subsequently, for each isolated object , will the corresponding Injected into it, forming the final isolated data object: This constitutes the complete dataset. , its in Each isolated object in Injected This dataset is organized by "Main UV Mapping Block Number". Segmentation and grouping Segmentation and block numbering isolated island The five-layer logical structure of "effective pen trajectory" fully describes all the necessary information from geometric topology to automated migration execution.

[0077] S104: Data reconstruction and canvas generation based on the logical layer.

[0078] The data preprocessing engine outputs the final interactive data. Then, the logic layer takes over control, responsible for transforming the abstract topological data into visualized 3D entity objects, i.e., the canvas. This process strictly follows the data hierarchy structure, reconstructing mesh objects with the master UV mapping as the geometric reference on any plane in 3D space, and simultaneously filling multi-channel, paired texture mapping data.

[0079] 1) Hierarchical traversal and canvas mesh construction The system is based on data structure Perform the traversal. First, traverse... The main UV mapping block number in the data, for each main UV mapping block number Further traverse its subordinate partitioned blocks and groups When processing each group, the system identifies all the segment numbers contained within the group. It initializes an empty grid object. To ensure uniqueness in storage and retrieval, the system generates a unique identifier name for the grid object according to a preset naming standard. The naming rules are as follows:

[0080] in, Prefixes defined by the user; The index number corresponding to the grouping in the list is used for segmentation. Grid objects are named and created based on this standard.

[0081] Secondly, for each identified segment block number The system pre-creates two sets of UV data layers on the existing mesh objects: one main mapping layer and one segmentation mapping layer. If the current group contains... If there are 1000 segments, then the grid object contains a total of 1000 segments. Each UV data layer is named to achieve logical data isolation and accurate indexing. Follow the following unified standards:

[0082] in, Prefixes defined by the user; This is used to label roles and distinguish attributes within the data layer. Specifically, when this layer is used to store master mapping data, It is marked as "_Master"; when this layer is used to store partitioned mapping data, It is marked as "_Split".

[0083] Subsequently, the system iterates through each geometric island contained in each segment within the group. and its subordinate face index set For each face index in the set The system performs the following geometry instantiation and data filling operations:

[0084] Geometric instantiation based on master UV coordinates: In order to transform a 2D texture topology into a 3D solid, the system uses a mapping cache. Extract the face index from the middle. Corresponding main UV mapping coordinate list The system creates geometric vertices based on the preset plane of the canvas (e.g., the XY plane), for each coordinate point. Construct the corresponding 3D vertex world coordinates The calculation formula is: in, The reference point of the plane where the canvas is located in three-dimensional space. and These are two orthogonal basis vectors in the U and V directions of the canvas; Subsequently, the system generates vertices according to the vertex order of the face. The physical mesh is constructed by connecting the elements. This step ensures that the canvas geometry strictly replicates the topological layout of the master UV mapping in three-dimensional space.

[0085] Oriented filling of multiple UV data layers: After the geometry is created, the system performs directional injection of texture data. First, the system identifies the current face index. The corresponding segment number And determine based on the assigned UV role. Then, the current master UV mapping block number. Follow together The naming convention locks onto the already created pair of dedicated UV data layers. Subsequently, the system... Extract face index Corresponding list of segmented UV mapping coordinates And perform a write operation to extract the data. Write it into the main mapping layer with the name suffix "_Master". Extract the... The data is written to a split mapping layer with the suffix "_Split". Through this mechanism, the system ensures that data belonging to different split blocks within the same canvas grid are isolated in different UV channel pairs, thereby achieving logical decoupling and precise correspondence of multiple UDIM data.

[0086] 2) View layer initialization and projection matrix setting To ensure the coordinate accuracy of pixel migration, the system needs to be configured with a specific view environment to eliminate perspective distortion. This step establishes a standardized viewing coordinate system by constructing an orthogonal projection matrix and a viewpoint transformation matrix.

[0087] Construction of the orthographic projection matrix and view initialization: The system first calls the graphics API to lock the view scaling ratio to V:S (e.g., 1:1), meaning V viewport pixels correspond to S screen physical pixels. Under this configuration, the system calls the graphics API to switch the projection to orthographic projection. At this point, the projection matrix of the 3D software is... .

[0088] Construction of the viewpoint transformation matrix: Implemented by calling the graphics API. Function to construct view transformation matrix To define the pose of the viewport camera in the world coordinate system: For the key vector parameters in the matrix, firstly, calculate the geometric center point of the canvas plane. Secondly, set the observation target point. for This forces the viewport camera's line of sight to be perpendicular to the geometric center of the canvas plane. (Setting the camera position) The distance along the direction of the normal vector N of the canvas plane is... for point, that is = + N × Define the upward vector. V-axis basis vectors with the canvas plane Consistency is ensured by strictly aligning the canvas's V-axis with the vertical axis of the screen space to prevent any rotational distortion. Finally, the 3D software will... and Multiply to get That is, the viewport position for the final rendering.

[0089] S105: Automated pixel migration and drawing execution.

[0090] This step, acting as the system's execution terminal, simulates high-frequency "relocation-drawing" operations through the driver view layer interface, precisely mapping the pixel information of the source texture to the target texture. This process is strictly based on... The dataset drives the automatic migration through viewport alignment and projection transformation.

[0091] 1) Global view environment and baseline parameter calculation Before entering the drawing process, the system needs to establish the pixel mapping reference of the canvas grid in the current view environment. First, the system locks the current viewport settings and defines its corresponding view scaling value (e.g., 1.0) as the base scaling factor. Secondly, the system calculates the pixel bounding box size of the canvas grid in screen space. Specifically, the system obtains the world coordinates of the four corner points of the generated area of ​​the standard canvas grid, that is, substituting (0,0), (1,0), (1,1), and (0,1) into (…). , ) by formula The four coordinates are calculated. Then, the graphics API is called to convert the world space coordinates to screen space coordinates, projecting the four vertices onto the current 2D screen space. The bounding box of the projected point set is calculated, and the maximum pixel side length of the bounding box in the horizontal or vertical direction is extracted. .

[0092] 2) Hierarchical traversal and resource binding based on UV roles The system starts the core drawing loop, strictly following... The five-layer logic structure and the set of input channels Perform the traversal. First, traverse the main UV mapping block numbers. For the segmentation and grouping under the main UV mapping block .in accordance with and The corresponding partitioning and grouping index i follows... The naming convention is switched to the corresponding canvas grid. Next, the channel collection is traversed. and the segmentation block number under segmentation block grouping Determined based on the assigned UV role In the naming rules and ,Right now and and The pairing relationship, combined with the channel ,follow The naming convention switches between the canvas source and target textures. Simultaneously, it determines the UV roles based on the assigned UVs. In the naming rules The pairing relationship between source and target UV mappings, and combined with and ,follow Naming rules, switching between canvas source and target UV mapping.

[0093] 3) Dynamic calculation of brush based on island features After the texture resources are bound, the system further traverses each geometric island object under the segmented blocks within the group. Read the storage located on this isolated island. Grid segmentation reference edge To address the sampling consistency issue across textures of different resolutions (e.g., 1K, 4K), the system dynamically calculates the physical screen size of the brush within the current loop. Specifically, the system reads the resolution of the target texture. Calculate the projection scaling ratio from screen space to texture space. :

[0094] If a square pen is used, its side length is... The calculation is as follows: If a circular brush is used, its radius should be [not specified] to cover the rectangular area. The calculation is as follows: in, The seam extension value is input by the user or preset by the system to generate a small amount of pixel overflow at the seam.

[0095] 4) Viewport repositioning and texture projection rendering After determining the brush size, the system extracts a list of valid trajectory points for the current isolated island. Iterate through the center point of each block. For each center point, the system first performs a viewport alignment operation. This involves calling the viewpoint transformation matrix. The parameter interface will observe the target point. Updated to 3D coordinates, update camera position Maintain the upward vector V-direction basis vectors of the canvas plane Consistency is ensured by this operation, guaranteeing that the camera is precisely and perpendicularly aligned with the geometric center of the current segment. Subsequently, the system calls the graphics API to perform a coordinate space transformation, converting... World coordinates mapped to viewport pixel coordinates .get Then, the system calls the graphics API to perform 3D spatial texture mapping. Using these coordinates as the center, it determines... or The system performs projected rendering on the target texture, denoted by a canvas, to the specified size. This process is repeated until all elements have been traversed. The data from all levels is processed, and the target texture data in memory is finally exported to the storage medium to complete the automated migration process.

[0096] The advantages of this invention are as follows: it avoids the inherent defects of existing self-baking-based solutions; firstly, it treats texture information as a data attribute layer attached to the 3D topological surface of the model, and directly reconstructs the expression of this attribute layer in the new 2D UV coordinate system while keeping the topological relationship unchanged, thus achieving logical decoupling between texture and UV layout; furthermore, thanks to the flexibility of this technical architecture, in specific scenarios involving heterogeneous topological meshes of the same model, this invention can construct an intermediate layer on the source texture mesh that approximates the topology to be transferred, and effectively solve the adaptation problem of large-span topological transformations through a secondary transfer path of "source texture → intermediate layer UV texture → new topological texture". This invention also transforms the traditional "black box" process into a transparent and controllable "white box" system, which can expand and be flexible in view inspection methods, such as single-step, batch, or specified number of step drawing inspections, making it easy for users to preview in real time and accurately locate defects; at the same time, this method has extremely high portability, and any 3D software that supports a specific set of graphics APIs or can achieve similar effects through API combination can be easily integrated; in addition, this invention bypasses per-pixel ray tracing calculations, achieving a significant improvement in the performance of high-precision asset texture transfer, greatly shortening the iteration cycle and reducing hardware dependence.

[0097] To verify the effectiveness of the technology, comparative tests were conducted under typical hardware conditions. The test environment configuration was as follows: Windows 11 operating system, Intel i5-12600KF processor, 64GB system memory, and NVIDIA RTX 3060 12GB graphics card; the test software was Blender 4.1.1; the test textures were 4K resolution ambient occlusion, roughness, and normal maps; the test scenarios included batch UDIM migration of 4 source blocks → 6 target blocks and 4 source blocks → 8 target blocks. The test results are shown in Table 1. This method exhibits significant advantages in resource consumption: system memory usage decreased from 12.1 and 15.1 GB in the traditional reprojection baking method to 2.9 GB, a reduction of approximately 76% and 81%; video memory usage decreased from 2.1 GB to 1.1 GB, a reduction of approximately 48%; and CPU utilization decreased from 100% to approximately 82% and 87%. In terms of time performance, this method maintains acceptable and excellent time performance in small-batch UDIM migration scenarios. However, in large-batch UDIM migration scenarios, the time increment ratio converges from approximately 184% to approximately 136%, demonstrating a trend where the performance advantage gradually becomes more prominent as the task scale increases. In summary, this method, with extremely low memory usage, low VRAM consumption for visualization rendering, and lower CPU load compared to reprojection baking, achieves relatively better time performance than reprojection baking in large-batch UDIM scenarios while maintaining excellent time performance in small-batch UDIM migration.

[0098] Table 1 Performance Test of Pixel Transfer Method Based on 3D Reconstruction and View Algorithm The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A pixel migration method based on 3D reconstruction and view algorithm, characterized in that, include: Obtain the source and target textures, as well as the source and target UV maps associated with the 3D mesh; Based on the source UV mapping and target UV mapping, a structured mapping relationship is constructed using the face index as the primary key according to the surface topology of the 3D mesh. Based on the target UV mapping, construct the geometric connectivity components of the adjacency relationship; Calculate the number of effective UDIM blocks for the source UV mapping and the target UV mapping respectively, and determine the main UV mapping and the segmented UV mapping based on the number of UDIM blocks, wherein the one with fewer blocks is designated as the main UV mapping; Based on the structured mapping relationship, each face in the set of geometrically connected components is traversed to generate a composite dataset containing face attributes and UV mapping information. Canvas segmentation and topology re-identification are performed according to a preset segmentation threshold to generate a hierarchical dataset. The hierarchical dataset is traversed, and the grid segmentation step size is determined by combining a block fusion mechanism to generate an interactive dataset containing a list of valid trajectory points and brush scaling parameters. The interactive dataset is then integrated into the hierarchical dataset. Based on the hierarchical dataset, a canvas mesh is constructed on a three-dimensional spatial plane; Based on the hierarchical dataset and the list of valid trajectory points, each sampling point is traversed on the canvas grid, and the viewport is repositioned to the 3D position corresponding to the sampling point on the canvas grid. In the repositioned viewport, pixel information is read from the source texture based on the main UV coordinates corresponding to the sampling point on the canvas grid, and the read pixel information is written to the target texture based on the segmented UV coordinates corresponding to the same sampling point on the canvas grid, thus completing pixel migration.

2. The pixel migration method based on 3D reconstruction and view algorithm as described in claim 1, characterized in that, The construction of the structured mapping relationship using the facet index as the primary key specifically includes: Access the data blocks of the target mesh object via the graphics API; Based on the data block, a face set containing the target mesh object is constructed, wherein each face in the face set contains an ordered set of cyclic vertices; By forcibly locking the reading order of vertices, all vertices are traversed; Access the source UV map and target UV map associated with the target mesh object respectively; obtain the coordinates of each cyclic vertex in the source texture and the coordinates in the target texture for each face; Based on the coordinates in the source texture and the coordinates in the target texture, a structured mapping relationship is constructed with the face index as the primary key.

3. The pixel migration method based on 3D reconstruction and view algorithm as described in claim 1, characterized in that, The structured mapping relationship is verified through data integrity and UDIM consistency checks to confirm the correspondence between UV tiles and texture files, including: Based on the source UDIM block number and the target UDIM block number, after deduplication, construct the source valid block number set and the target valid block number set; For each target texture channel, the set of source UDIM numbers and the set of target UDIM numbers corresponding to the identified texture files under that target texture channel are counted respectively. The UDIM consistency check is successful when the source valid block number set is included in the source UDIM number set and the target valid block number set is included in the target UDIM number set. When the verification fails, an exception will be thrown and the missing channel name and corresponding UDIM number will be output.

4. The pixel migration method based on 3D reconstruction and view algorithm as described in claim 1, characterized in that, Based on the target UV mapping, the geometric connectivity components of the adjacency relationship are constructed, including: If the surfaces share a common edge in the UV space and their UV coordinates are continuous, the surfaces that meet the conditions are clustered into the same UV island to construct geometrically connected components.

5. The pixel migration method based on 3D reconstruction and view algorithm as described in claim 1, characterized in that, The generation of the composite dataset containing surface attributes and UV mapping information specifically includes: Based on the topology data of the target UV mapping, a disjoint-set data structure is initialized; the disjoint-set is configured with path compression and rank-based merging optimization mechanisms; Traverse each face of the target mesh and check whether adjacent faces share a common edge in UV space: if two faces share a common edge and their UV coordinates are continuous, then perform a merge operation in the disjoint-set data structure. After traversal, all face indices are categorized by root node through a search operation to obtain a set of geometrically connected components grouped by islands; the set of geometrically connected components consists of each island and a list of face indices corresponding to each island. Based on the UDIM calculation formula, the number of UDIM blocks for the source UV mapping and the target UV mapping is obtained; and based on the number of UDIM blocks for the source UV mapping and the number of UDIM blocks for the target UV mapping, the main UV mapping and the segmented UV mapping are determined. Traverse each face within the geometrically connected components of the geometrically connected component set, and construct a composite dataset based on the geometric attributes and attribution relationships of each face.

6. The pixel migration method based on 3D reconstruction and view algorithm as described in claim 1, characterized in that, The step of performing canvas segmentation and topology re-identification based on a preset segmentation threshold to generate a hierarchical dataset specifically includes: The segmentation threshold is determined based on the preset maximum allowed number of UV mapping stacks; Traverse the main UV mapping in the composite dataset and extract the main UDIM block number and its associated face index set for each main UDIM. For each main UDIM block, check the number of its associated segmented UDIM blocks. If the number of segmented UDIM blocks exceeds the segmentation threshold, then divide the segmented UDIM block into multiple subgroups. For each segmented UDIM block in the subgroup, independent local geometric islands are identified based on the face adjacency relationship in the main UV mapping space. The bounding box and total area of ​​each island are calculated, generating a hierarchical dataset containing the bounding box of the island, the area of ​​the island, and simplified polygon boundary information.

7. The pixel migration method based on 3D reconstruction and view algorithm as described in claim 1, characterized in that, The generation of the interactive dataset containing the list of valid trajectory points and brush scaling parameters includes: Traverse each local geometric island in the hierarchical dataset and dynamically adjust the brush scaling parameters according to the ratio of the bounding box area of ​​the island to the island area. The grid segmentation step size is determined based on the adjusted brush scaling parameters, and a list of discrete sampling center points of the brush is generated. Geometric inclusion detection is performed on the sampling center points to remove invalid points located outside the islands, thus obtaining a list of valid trajectory points; The brush scaling parameters and the list of valid trajectory points are encapsulated into an interactive dataset.

8. The pixel migration method based on 3D reconstruction and view algorithm as described in claim 1, characterized in that, The construction of a canvas mesh on a three-dimensional spatial plane includes: Traverse the main UV mapping block number and its subordinate segment block groups in the hierarchical dataset, and create a corresponding canvas mesh object for each segment block group; For each segmented UDIM block contained in the segmented block group, a main mapping layer and a segmentation mapping layer are created in pairs in the canvas grid object; Extract the current main UV coordinate list, and map each coordinate point in the main UV coordinate list to vertex coordinates in three-dimensional space according to the preset canvas plane. Connect the vertices of the face in order to generate a physical mesh surface. Based on the physical mesh surface, the current main UV coordinate list is written into the main mapping layer, and the current segment UV coordinate list is written into the segment mapping layer, thus completing the construction of the canvas mesh.

9. The pixel migration method based on 3D reconstruction and view algorithm as described in claim 1, characterized in that, The step of repositioning the viewport to the corresponding 3D position of the sampling point on the canvas grid includes: Update the observation target point of the viewport camera to the three-dimensional coordinates of the sampling point, and synchronously update the camera position so that the camera's line of sight is perpendicular to the plane of the canvas grid.

10. The pixel migration method based on 3D reconstruction and view algorithm as described in claim 1, characterized in that, Reading pixel information from the source texture and writing the pixel information to the target texture includes: Based on the role assignment of source UV mapping and target UV mapping, the source texture is determined as the sampling object and the target texture as the drawing object; Load the corresponding source texture file and target texture file, and switch the corresponding UV mapping layer according to the main UDIM block number and the segmented UDIM block number; Read the baseline side length of the current island's mesh segmentation and calculate the physical screen size of the brush based on the resolution of the target texture; Extract the list of valid trajectory points for the current isolated island, iterate through each trajectory point, and reposition the camera viewpoint to the corresponding 3D spatial position of that trajectory point; The coordinate space transformation is performed through the graphics API to map the trajectory points to viewport pixel coordinates, and texture projection is performed on the target texture with the coordinates as the center and the determined brush size. After traversing the data at all levels, the drawn target texture data is exported, completing the pixel migration.