A two-step morphing method for color light three-dimensional model

By combining an adaptive octree spatial segmentation and a lattice-driven free deformation algorithm with a Laplacian mesh weight optimization algorithm based on normal vector gradient optimization, efficient and accurate deformation of the 3D model of lanterns is achieved. This solves the problems of deformation delay and insufficient detail preservation in existing technologies and is suitable for the deformation of 3D lantern models in mixed reality environments.

CN121213830BActive Publication Date: 2026-02-24SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511747481.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-02-24
Estimated Expiration
2045-11-26

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve millisecond-level real-time deformation on 3D models of colored lights with millions of vertices and millions of meshes, while maintaining surface details without distortion. This is especially true given the limited computing power of head-mounted devices, where it is difficult to balance large-scale mesh deformation, preservation of local details, and real-time response.

Method used

The model deformation is performed in two steps: coarse deformation and fine deformation. The coarse deformation is performed by using an adaptive octree space segmentation and control lattice-driven free deformation algorithm, and the fine deformation is performed by combining the normal vector gradient optimization algorithm with the Laplacian grid weight optimization algorithm.

Benefits of technology

It significantly reduces deformation delay and improves deformation accuracy, achieving efficient and precise deformation effects in mixed reality environments. It solves the problems of low efficiency and insufficient detail preservation in existing technologies when deforming large-scale mesh models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121213830B_ABST
    Figure CN121213830B_ABST
Patent Text Reader

Abstract

The application discloses a two-step deformation method suitable for a three-dimensional model of a colored lamp, and belongs to the technical field of digitalization of colored lamps. The method comprises the following steps: acquiring a three-dimensional model of a colored lamp to be processed; dividing a rough deformation region based on an octree space division algorithm, generating a control lattice fitted with the region boundary, and mapping the lattice node displacement into coordinate adjustment of all vertices in the region to obtain a rough deformation model; performing octree space division on the rough deformation model again to obtain a fine deformation region; acquiring normal vector gradients of adjacent facets in the fine deformation region, and optimizing Laplace weight values based on the gradient amplitudes; constructing a Laplace deformation energy equation and solving the equation to output a final deformation model, and realizing modeling adjustment of the colored lamp to be processed. The application realizes efficient and accurate deformation effect in a real-time interactive scene, and solves the problems of low efficiency and insufficient detail preservation of existing technologies in deformation of a large-scale grid model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital lantern technology, and in particular relates to a two-step deformation method suitable for three-dimensional lantern models. Background Technology

[0002] The demand for digital lantern displays and popular science education is increasing. While traditional micron-level modeling software can output high-precision 3D assets, its complex menus and technical terminology create a steep learning curve for non-professional users, making it difficult to quickly complete creative transformations on-site. With the rise of virtual reality (VR) and mixed reality (MR), immersive interaction based on natural gestures has become a new paradigm. Viewers wearing devices such as HoloLens can directly "drag and drop" lantern models in real-world venues to achieve instant shape adjustments. This scenario places two rigid requirements on model transformation technology: first, maintaining millisecond-level response on ultra-large meshes with millions of vertices and millions of meshes; and second, ensuring that the surface details remain undistorted after deformation, even when the computing power of head-mounted devices is far lower than that of comparable PCs, while simultaneously running SLAM positioning, sensor fusion, and real-time rendering.

[0003] Existing algorithms each address specific problems, but none can simultaneously satisfy the triple constraints of "large-scale mesh," "real-time interaction," and "preservation of detail": skeleton-driven methods do not consider joints, resulting in a loss of detail; moving least squares methods have memory consumption that increases sharply with mesh size, making them unsuitable for head-mounted devices; free deformation (FFD) is globally efficient but lacks control over local details; while Laplacian coordinates can preserve high-frequency features, they exhibit significant latency when solving large-scale linear systems; deep learning solutions have high training and inference costs and rely on sufficient samples. Recent partitioning-hybrid approaches combine coarse skeleton deformation with local Laplacian, but still require binding the model to a skeleton and manually partitioning regions. Since the lantern model is jointless and structurally complex, the time spent on partitioning actually exacerbates the overall latency.

[0004] Therefore, how to provide a deformation method for 3D lantern models with hundreds of thousands to millions of vertices and millions to tens of millions of meshes without skeletons or pre-training, while taking into account surface details, has become a pressing technical challenge. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention proposes a two-step deformation method suitable for three-dimensional models of decorative lanterns, comprising the following steps:

[0006] Obtain the 3D model of the colored lights to be processed;

[0007] The coarse deformation region of the 3D model of the lanterns was divided based on the octree space partitioning algorithm;

[0008] In the coarse deformation region, a control lattice that fits the region boundary is generated, and the displacement of the lattice nodes is mapped to the coordinate adjustment of all vertices in the region to obtain a coarse deformation model;

[0009] The coarse deformation model is further divided into octree spaces to obtain the fine deformation region;

[0010] Obtain the normal vector gradient of adjacent facets within the fine deformation region, and optimize the Laplacian weights based on the gradient magnitude;

[0011] Based on optimized Laplace weights, a Laplace deformation energy equation is constructed.

[0012] Solving the Laplace deformation energy equation yields the vertex displacement, which is then superimposed onto the coarse deformation model to output the final deformation model, thus achieving the shape adjustment of the colored light to be processed.

[0013] Optionally, the process of obtaining the 3D model of the colored lights to be processed includes:

[0014] The original lantern model is obtained and its format is converted to obtain a unified data representation. Based on the unified data representation, isolated vertices and non-manifold edges are detected and removed to obtain a topologically complete 3D lantern model.

[0015] Optionally, the process of dividing the 3D model of the lanterns into coarse deformation regions based on the octree space partitioning algorithm includes:

[0016] Based on the vertex coordinates of each triangular facet in the 3D model of the colored lantern, calculate the unit normal vector of the facet to obtain the normal vector field; based on the normal vector field, record the facet to which each edge belongs and simultaneously construct an adjacency list to obtain the facet adjacency relationship; based on the facet adjacency relationship, with the model bounding box as the root node, recursively detect the normal vector dispersion within the node to obtain the nodes that need to be further segmented; based on the nodes that need to be further segmented, divide the node into eight equal parts and assign faces to obtain the leaf node set; based on the leaf node where the target facet is located and its spatially neighboring nodes, calculate the cosine of the angle between the normal vector of the adjacent facet and the target facet to obtain the set of adjacent facets that satisfy the angle threshold; based on the set of adjacent facets, combine them into a coarse deformation region.

[0017] Optionally, in the coarsely deformed region, the process of generating a control lattice that conforms to the region boundary includes:

[0018] Based on the bounding box of the octagonal leaf nodes corresponding to the coarse deformation region, extract the eight corner points of the bounding box to obtain the initial control point set; establish a local orthogonal coordinate system based on the center of the bounding box and the direction of the longest side to obtain the parameterized reference; normalize the world coordinates of the vertices in the region to the parameter space based on the parameterized reference to obtain the relative coordinates of the vertices in the lattice; construct a non-uniform control lattice based on the relative coordinates.

[0019] Optionally, the process of mapping the lattice node displacements to coordinate adjustments of all vertices within the region to obtain a coarse deformation model includes:

[0020] Based on the displacement of the control points in the parameter space, the lattice deformation driving signal is obtained; based on the driving signal, the relative coordinates of the vertices are calculated by polynomial interpolation to obtain the new coordinates of the vertices; based on the new coordinates, the positions of all vertices in the coarse deformation region are updated to obtain the coarse deformation model.

[0021] Optionally, the process of further partitioning the coarse deformation model into an octree space to obtain the fine deformation region includes:

[0022] Using the coarse deformation model region as a new bounding box, a secondary segmentation space is obtained; based on the normal vector discrete threshold and the included angle threshold smaller than those of the coarse adjustment stage, the secondary segmentation space is re-performed with octree recursive segmentation to obtain a set of leaf nodes; based on the set of leaf nodes, the cosine of the included angle between the normal vectors of the facets is repeatedly calculated to obtain a set of adjacent facets that satisfy the new included angle threshold; based on the set of adjacent facets, a fine deformation region is formed.

[0023] Optionally, the process of obtaining the normal vector gradient of adjacent patches within the fine deformation region includes:

[0024] Based on adjacent faces sharing the same edge within the fine deformation region, obtain the unit normal vector; based on the difference of the unit normal vectors and the length of the common edge, calculate the rate of change of the normal vector per unit length, and obtain the normal vector gradient.

[0025] Optionally, the process of optimizing the Laplace weights based on the gradient magnitude includes:

[0026] The normal vector gradient is normalized based on the global maximum gradient value to obtain the normalized gradient; the normalized gradient is multiplied by the balance factor to obtain the weight increment; the traditional cotangent weight is added to the weight increment to obtain the enhanced weight matrix; based on the enhanced weight matrix, the upper limit of the balance factor is limited to obtain the optimized Laplace weights.

[0027] Optionally, the process of constructing the Laplace deformation energy equation based on the optimized Laplace weights includes:

[0028] Based on the optimized Laplacian weights, a quadratic energy term is constructed to express the difference between the current Laplacian coordinates of the vertex and the target Laplacian coordinates, thus obtaining the internal deformation energy. With preset constraint points and target positions, a position error term is added to obtain the Laplacian deformation energy equation.

[0029] Optionally, the process of solving the Laplace deformation energy equation to obtain the vertex displacement, and then superimposing the vertex displacement onto the coarse deformation model to output the final deformation model includes:

[0030] Based on the Laplace deformation energy equation, the vertex coordinates are iteratively updated using the gradient descent method to obtain the convergent displacement. The convergent displacement is then superimposed onto the corresponding vertices of the coarse deformation model to obtain the updated vertex coordinate set. Based on the updated vertex coordinate set and the original topological relationship, the final deformation model is output to achieve the shape adjustment of the colored light to be processed.

[0031] Compared with the prior art, the present invention has the following advantages and technical effects:

[0032] This invention presents a two-step deformation method based on adaptive octree spatial segmentation and a lattice-driven free deformation algorithm for coarse adjustment, and a Laplacian mesh weight optimization deformation algorithm based on normal vector gradient for fine adjustment. Adaptive octree spatial segmentation accurately locates the deformation region and reduces computational complexity, achieving efficient coarse adjustment of the model. Then, Laplacian weight optimization driven by normal vector gradient corrects potential local geometric distortions caused by coarse adjustment, preserving model details. In mixed reality environments, this method effectively reduces deformation latency and significantly improves deformation accuracy for highly complex 3D models of colored lights, achieving efficient and accurate deformation effects in real-time interactive scenarios. It solves the problems of low efficiency and insufficient detail preservation in existing technologies when deforming large-scale mesh models. Attached Figure Description

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

[0034] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention. Detailed Implementation

[0035] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0036] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0037] Example 1

[0038] Due to the unique decorative requirements of lanterns, 3D models of decorative lanterns are typically composed of a massive number of independent light source units and complex support structures, often exhibiting geometric complexity far exceeding that of conventional 3D models. 3D models of decorative lanterns have more detail and are more complex than general 3D models.

[0039] This complexity is directly reflected in the geometric representation of the model data: the number of vertices and meshes in a single model often reaches millions, far exceeding that of conventional 3D models. Vertices, as the basic geometric elements of a 3D model, define the spatial coordinates of feature points on the model surface; their density directly determines the refinement of the model's outline. Meshes are formed by the topological connections between vertices, creating triangular or quadrilateral faces that describe the geometric structure of the model's surface. Table 1 compares the number of meshes and vertices in a general 3D model and a colored light 3D model.

[0040] Table 1

[0041]

[0042] As shown in Table 1, the number of vertices in the 3D model of the lantern reaches hundreds of thousands, and the average number of meshes reaches millions, far exceeding the tens of thousands of vertices and hundreds of thousands of meshes of general 3D models, fully demonstrating the unique geometric representation of the 3D model of the lantern. Therefore, the core challenge in the deformation of the 3D model of the lantern lies in balancing ultra-large-scale mesh deformation, preservation of local details, and real-time response capability.

[0043] Existing methods often excel in one dimension but suffer from global imbalance. In traditional 3D model deformation, skeleton-driven deformation algorithms are used for jointed 3D models but fail to preserve model details well. Since the design of the lantern 3D model does not consider joint issues, skeleton-driven deformation algorithms are not used. Moving least squares deformation performs well on small or medium-sized datasets, but its local fitting mechanism and computationally intensive nature pose significant challenges when handling large-scale data. It also consumes a lot of memory, making it inefficient for lantern 3D model deformation and unsuitable for head-mounted devices. Free deformation algorithms are efficient in global deformation, but their deformation control is not intuitive or flexible, and precise deformation is difficult, making them more suitable for applications requiring global deformation effects. Green coordinate-based deformation algorithms, a type of free deformation algorithm, also require the use of an outer cage bounding box. However, Green coordinate deformation algorithms rely on the Green function, requiring the calculation of the Green function value for each deformation point. When the model size is large, the computational load increases significantly, making it more complex than free deformation algorithms and unsuitable for lantern 3D models. Laplacian deformation algorithms preserve details well but have low deformation efficiency. Given that the above algorithms all have limitations to varying degrees in the deformation of 3D lantern models, it is necessary to construct a hybrid framework that integrates the advantages of multiple algorithms for the deformation of 3D lantern models.

[0044] Ye Qianwei et al. proposed a partition-based Laplacian deformation algorithm, which combines skeleton-based MLS deformation of coarse meshes with Laplacian mesh deformation of sub-mesh modules, and is suitable for jointed 3D models. This algorithm requires binding the 3D model to a skeleton and partitioning the entire model. However, since the deformation of the 3D model of a lantern does not require binding to a skeleton, and the model's mesh structure is complex, the partitioning effect is not ideal, and the algorithm requires a long time.

[0045] To address the problems in existing technologies, this embodiment proposes a two-step deformation method suitable for 3D models of decorative lanterns. This method deforms the 3D model of the lantern, employing a free deformation algorithm that is efficient and has intuitive control points. It is suitable for local deformation without affecting other areas, making it appropriate for partial deformation of the surface components in the design of 3D decorative lantern models. Although the free deformation algorithm requires significant computational resources, it has minimal impact on coarse deformations. Fine-tuning using the Laplace deformation algorithm afterwards can reduce the computational load.

[0046] The method specifically includes the following steps:

[0047] Obtain the 3D model of the colored lights to be processed;

[0048] The coarse deformation region of the 3D model of the lanterns was divided based on the octree space partitioning algorithm;

[0049] In the coarse deformation region, a control lattice that fits the region boundary is generated, and the displacement of the lattice nodes is mapped to the coordinate adjustment of all vertices in the region to obtain a coarse deformation model;

[0050] The coarse deformation model is further divided into octree spaces to obtain the fine deformation region;

[0051] Obtain the normal vector gradient of adjacent facets within the fine deformation region, and optimize the Laplacian weights based on the gradient magnitude;

[0052] Based on optimized Laplace weights, a Laplace deformation energy equation is constructed.

[0053] Solving the Laplace deformation energy equation yields the vertex displacement, which is then superimposed onto the coarse deformation model to output the final deformation model, thus achieving the shape adjustment of the colored light to be processed.

[0054] The core issue in feasible 3D mesh model deformation lies in how to map all vertices on the model surface from their initial spatial coordinates to the target location. Since 3D meshes typically contain a high density of vertices, manually adjusting the spatial coordinates of each vertex is not feasible.

[0055] To address the high latency and low accuracy issues in deforming 3D lantern models in a mixed reality environment, this embodiment proposes a two-step optimization framework of "coarse adjustment-fine refinement," combining free deformation and Laplacian mesh deformation algorithms to deform the complex 3D lantern models with a large number of meshes. The free deformation algorithm is intuitive and easy to operate, enabling local deformation of the model through simple control point operations; the Laplacian mesh deformation algorithm, on the other hand, preserves the overall shape characteristics of the model, resulting in a more natural deformed model. The specific process is as follows... Figure 1 As shown, the diagram adopts a layered layout, divided into an input layer, an algorithm processing layer, and an output layer, illustrating the key steps from inputting the original model and operations to model deformation.

[0056] An feasible process for obtaining a 3D model of the colored lights to be processed includes:

[0057] The original lantern model is obtained and its format is converted to obtain a unified data representation. Based on the unified data representation, isolated vertices and non-manifold edges are detected and removed to obtain a topologically complete 3D lantern model.

[0058] The feasible process of dividing the coarse deformation region of the 3D model of the lanterns based on the octree space partitioning algorithm includes:

[0059] Based on the vertex coordinates of each triangular facet in the 3D model of the colored lantern, calculate the unit normal vector of the facet to obtain the normal vector field; based on the normal vector field, record the facet to which each edge belongs and simultaneously construct an adjacency list to obtain the facet adjacency relationship; based on the facet adjacency relationship, with the model bounding box as the root node, recursively detect the normal vector dispersion within the node to obtain the nodes that need to be further segmented; based on the nodes that need to be further segmented, divide the node into eight equal parts and assign faces to obtain the leaf node set; based on the leaf node where the target facet is located and its spatially neighboring nodes, calculate the cosine of the angle between the normal vector of the adjacent facet and the target facet to obtain the set of adjacent facets that satisfy the angle threshold; based on the set of adjacent facets, combine them into a coarse deformation region.

[0060] The feasible process of generating a control lattice that conforms to the region boundary in the coarsely deformed region includes:

[0061] Based on the bounding box of the octagonal leaf nodes corresponding to the coarse deformation region, extract the eight corner points of the bounding box to obtain the initial control point set; establish a local orthogonal coordinate system based on the center of the bounding box and the direction of the longest side to obtain the parameterized reference; normalize the world coordinates of the vertices in the region to the parameter space based on the parameterized reference to obtain the relative coordinates of the vertices in the lattice; construct a non-uniform control lattice based on the relative coordinates.

[0062] The feasible process of mapping lattice node displacements to coordinate adjustments of all vertices within the region to obtain a coarse deformation model includes:

[0063] Based on the displacement of the control points in the parameter space, the lattice deformation driving signal is obtained; based on the driving signal, the relative coordinates of the vertices are calculated by polynomial interpolation to obtain the new coordinates of the vertices; based on the new coordinates, the positions of all vertices in the coarse deformation region are updated to obtain the coarse deformation model.

[0064] As a feasible implementation method, the process of free deformation rough deformation includes:

[0065] To address the issues of large vertex size and low overall deformation efficiency in the 3D model of decorative lanterns, the free coarse deformation stage employs an adaptive octree segmentation and control lattice-driven strategy. Through hierarchical spatial partitioning and global deformation coupling, it achieves efficient coarse adjustment of millions of meshes under the limited computing power of mixed reality devices. This stage, centered on the free deformation algorithm, dynamically constructs a deformation space adapted to the model's geometric features, converting user gesture input into control point displacements, rapidly completing large-scale model deformation, and providing a foundational framework for subsequent detail optimization.

[0066] (1) Input the colored light model:

[0067] The input of the lantern model is the starting point for the deformation algorithm. First, a highly detailed 3D lantern model needs to be loaded. Common 3D model formats are FBX, GLB, and OBJ. FBX format has strong compatibility and supports animation and complex materials, GLB format lightweight models are suitable for real-time rendering with low performance overhead, and OBJ format is a static model without animation. To maintain the lantern's detail, the model is uniformly converted to an FBX model. To prevent the model from being too large to load on the mixed reality platform, the 3D model can be lightweighted.

[0068] After loading the 3D model of the colored lights, the model is cleaned and standardized, the mesh integrity is verified, isolated vertices and non-manifold edges are checked, the scene unit is unified to meters, and scaling normalization is applied to eliminate deformation errors caused by non-uniform scaling.

[0069] (2) Octree adaptive partitioning:

[0070] Preprocessing the model data before deforming a 3D model is a crucial step in ensuring effective local deformation. Since real-world applications often only require deforming specific parts of the model, rather than the entire model, it's essential to accurately distinguish the parts to be deformed from the overall model.

[0071] Traditional methods for distinguishing regions mainly employ manual labeling of boundary vertices, connectivity segmentation based on region growing, or distinction based on physical properties. However, these methods have significant limitations. Manual labeling is intuitive and flexible but relies on human intervention, resulting in low efficiency and difficulty adapting to complex topologies. Region growing algorithms are efficient at partitioning regions but are sensitive to model noise, easily affected by noise interference, which in turn impacts the accuracy of distinction. Distinction methods based on physical properties are suitable for engineering simulations or biomechanical models but are overly dependent on physical parameters, resulting in low versatility. Clustering based on spatial distance struggles to effectively distinguish adjacent regions with similar geometric features but different functions.

[0072] To address the aforementioned issues, this embodiment proposes using the consistency of the normal vector field as a screening criterion. By calculating the angle threshold between the normal vectors of adjacent facets and the preset deformable facet normal vectors, automatic division of the deformable region is achieved. The normal vector, as a differential geometric attribute, can directly reflect the local directional characteristics of the surface, avoiding the dependence of traditional methods on the global topology. Furthermore, by adjusting the angle threshold, the sensitivity of region division can be dynamically controlled to meet different needs for deformation division.

[0073] Therefore, before model deformation, adjacent faces with normal vector differences within a certain range are identified, and the model formed by these faces is selected as the region requiring rough deformation. While directly traversing the model is intuitive and easy to implement, its efficiency is limited by the model's complexity and the number of vertices. As the number of vertices increases, the time complexity of traversal and comparison increases significantly, leading to a decrease in overall performance. In this embodiment, a large-scale, highly complex model needs to be processed, thus requiring a more efficient method for dividing the deformation region. The normal vector field consistency screening criterion is proposed based on this need and can better address the deformation requirements of complex models.

[0074] To improve extraction efficiency, this embodiment uses an octree for partitioning and then traversing to screen for adjacent nodes that meet the criteria. An octree is a data structure used for 3D spatial partitioning, offering advantages in fast response and low resource consumption when processing 3D graphics and performing spatial queries. The octree employs an adaptive subdivision strategy; when the number of faces within a node exceeds a threshold, the space can be recursively divided into eight subspaces, each node representing a cubic region, which can be further subdivided into eight smaller child nodes. This hierarchical structure gives octrees significant advantages in traversing and searching specific regions, and is more suitable for 3D models with millions of grid points. Due to the hierarchical structure of the octree, adjacent faces are often assigned to nearby nodes, which allows for more efficient use of locality information when searching for adjacent vertices with small differences in normal vectors, further accelerating the traversal process. Therefore, the higher the complexity of the 3D model and the greater the number of vertices, the more advantageous the octree traversal method becomes due to its efficient spatial partitioning, traversal, and search capabilities.

[0075] Introducing normal vectors into the octree space partitioning algorithm allows for more precise spatial segmentation that better aligns with the geometric features of curved surfaces, improving the accuracy of partitioning high-curvature and complex detail regions. In practice, SIMD is first used to compute the normal vectors of facets in parallel, and then applied to each facet in the triangular mesh model M. Its normal vector n i The coordinates of the vertex are calculated as shown in formula (1).

[0076]

[0077] in , and These are the coordinates of the vertices of the triangular facet. Each edge is recorded using a hash table. Simultaneously construct the adjacency list A for the corresponding face:

[0078]

[0079] An adaptive octree constrained by normal vectors is then used for construction. Traditional octrees, with their equal partitioning, ignore local geometric features, resulting in flat and high-curvature regions having the same partitioning depth, generating numerous meaningless child nodes and losing details. Therefore, in this embodiment, the space is divided into sub-regions with similar orientations based on the consistency of the normal vector direction. After initializing the root node's bounding box, the space is recursively partitioned based on a dynamic depth strategy. Facets are assigned to nodes, and for each facet contained within an octree node N, the geometry... The dispersion of its normal vector is shown in formula (3):

[0080]

[0081] in,

[0082]

[0083] Set the normal vector discrete threshold and maximum node depth If the dispersion of the normal vector direction of its internal surface patches And node depth This triggers the partitioning of child nodes.

[0084] For the target surface The set of spatially nearest faces can be queried using an octree spatial index. Calculate the dot product of the normal vectors:

[0085]

[0086] reserve The adjacency relationship of the facets. Construct an effective adjacency graph using the normal vector difference threshold. This refers to the area of ​​rough deformation.

[0087] (3) Constructing the control lattice:

[0088] After dividing the model to be deformed into coarse deformation regions, a free deformation algorithm is applied to these regions. The control lattice, as the core carrier of free deformation, directly determines the deformation efficiency and accuracy of the lantern model in a mixed reality environment. Traditional uniform lattices, by dividing control points at equal intervals, can achieve global deformation, but they expose significant shortcomings when dealing with highly complex models like lanterns: poor geometric adaptability, weak control over details, and high computational redundancy.

[0089] To address the above issues, this embodiment utilizes the pre-constructed octree and its natural spatial hierarchy to dynamically generate a control lattice that adapts to geometric features. The structure uses the corner points of the bounding box of each leaf node as initial control points.

[0090] In this way, octrees can not only be used for spatial partitioning and data management, but also as part of free deformation algorithms to realize the deformation of 3D models.

[0091] Therefore, after embedding the vertices of the colored light model into an adaptive control lattice generated based on an octree, a local coordinate system is dynamically defined using the hierarchical structure of the bounding boxes of the octree leaf nodes. Each local coordinate system constructs an orthogonal axis system along the longest side with the center of the bounding box as the origin, normalizing the vertex coordinates to the parameterized space.

[0092] (4) FFD deformation calculation:

[0093] Free deformation drives vertex coordinate updates through dynamic control of the lattice. Its core lies in mapping the global deformation of the model vertices to a weighted interpolation of the displacement of the control points.

[0094] Using the corner points and key geometric feature points of the control lattice as control points, the new vertex positions are calculated through an interpolation algorithm to complete the large-scale deformation of the model. This process relies on the spatial indexing characteristics of octrees, requiring only the traversal of nodes intersecting with the deformation region, significantly reducing redundant calculations and ensuring real-time performance in mixed reality scenarios. During the deformation calculation stage, the algorithm achieves a smooth transition of vertex displacement through Bernstein polynomial interpolation. The displacement weights of the control points are dynamically adjusted in conjunction with distance decay and normal vector consistency to avoid distortion of details in complex geometric regions.

[0095] (5) Output a rough deformation model:

[0096] After completing the FFD coarse adjustment calculation, the algorithm will output a coarse deformation model containing the coordinates of the deformed vertices, topological connectivity, and control point displacement parameters.

[0097] The free coarse deformation stage accurately locates the deformation region through octree space segmentation, and combined with the parameterized mapping of the control lattice, significantly reduces the computational complexity of massive vertices.

[0098] The feasible process of further partitioning the coarse deformation model into an octree space to obtain the fine deformation region includes:

[0099] Using the coarse deformation model region as a new bounding box, a secondary segmentation space is obtained; based on the normal vector discrete threshold and the included angle threshold smaller than those of the coarse adjustment stage, the secondary segmentation space is re-performed with octree recursive segmentation to obtain a set of leaf nodes; based on the set of leaf nodes, the cosine of the included angle between the normal vectors of the facets is repeatedly calculated to obtain a set of adjacent facets that satisfy the new included angle threshold; based on the set of adjacent facets, a fine deformation region is formed.

[0100] The feasible process of obtaining the normal gradient of adjacent patches within the fine deformation region includes:

[0101] Based on adjacent faces sharing the same edge within the fine deformation region, obtain the unit normal vector; based on the difference of the unit normal vectors and the length of the common edge, calculate the rate of change of the normal vector per unit length, and obtain the normal vector gradient.

[0102] An feasible process for optimizing Laplace weights based on gradient magnitude includes:

[0103] The normal vector gradient is normalized based on the global maximum gradient value to obtain the normalized gradient; the normalized gradient is multiplied by the balance factor to obtain the weight increment; the traditional cotangent weight is added to the weight increment to obtain the enhanced weight matrix; based on the enhanced weight matrix, the upper limit of the balance factor is limited to obtain the optimized Laplace weights.

[0104] The feasible process of constructing the Laplace deformation energy equation based on optimized Laplace weights includes:

[0105] Based on the optimized Laplacian weights, a quadratic energy term is constructed to express the difference between the current Laplacian coordinates of the vertex and the target Laplacian coordinates, thus obtaining the internal deformation energy. With preset constraint points and target positions, a position error term is added to obtain the Laplacian deformation energy equation.

[0106] The feasible process of solving the Laplace deformation energy equation to obtain the vertex displacement, and then superimposing the vertex displacement onto the coarse deformation model to output the final deformation model includes:

[0107] Based on the Laplace deformation energy equation, the vertex coordinates are iteratively updated using the gradient descent method to obtain the convergent displacement. The convergent displacement is then superimposed onto the corresponding vertices of the coarse deformation model to obtain the updated vertex coordinate set. Based on the updated vertex coordinate set and the original topological relationship, the final deformation model is output to achieve the shape adjustment of the colored light to be processed.

[0108] As a feasible implementation method, the Laplace optimization deformation process includes:

[0109] To correct local geometric distortions that may result from free coarse adjustment, a quadratic octree subdivision and normal vector gradient weight enhancement mechanism is introduced in the Laplacian deformation detail optimization stage. This stage uses Laplacian differential coordinates as constraints and dynamically adjusts deformation weights by quantifying the geometric abrupt changes in adjacent facets, achieving accurate restoration of high-order details of the colored lights while maintaining computational efficiency.

[0110] (1) Input a rough deformation model:

[0111] The input for the Plass refinement stage is the initial deformed model generated by the free coarse deformation, which includes vertex coordinates, control point displacement parameters, and octree spatial index data. The octree is used to quickly locate the focal deformation region, providing a foundation for subsequent secondary subdivision and weight optimization.

[0112] (2) Subdivision of a quadratic octree:

[0113] Based on the geometric features of the coarse-tuned model derived from octree traversal, a secondary octree subdivision is performed on the deformable region to capture more subtle deformation requirements. A smaller normal vector discretization threshold is selected. Difference threshold between normal vector and normal vector The coarsely deformed region is further subdivided into an octree to obtain the detailed optimization region. The secondary subdivision process still follows the dispersion of the normal vector direction of the internal facets of the nodes. And node depth Find it again Construct an effective adjacency graph from the facets. This refers to the fine deformation region.

[0114] (3) Laplace weight optimization driven by normal vector gradient:

[0115] After determining the fine deformation region, Laplacian mesh deformation is performed on the mesh within this region. Laplacian mesh deformation is a differential deformation method based on vertex coordinates, which achieves the deformation effect by calculating the Laplacian coordinates of the vertices. Laplacian coordinates contain local feature information of the surface, thus preserving the local shape characteristics of the 3D model during deformation.

[0116] The method for calculating the weights in the Laplacian mesh deformation algorithm is selected based on the deformation requirements. Commonly used weights include uniform weights and cotangent weights. The average weight is simply an average value, which has low accuracy; the cotangent weight depends on the trigonometric functions of the side angle and side length, which can better approximate the local features of the surface, but the weights tend to converge in flat regions.

[0117] To further optimize the computational efficiency of Laplacian deformation, this embodiment makes full use of the data obtained by the previous method, enhances the weights based on the gradient of the normal vector of the facet, and dynamically adjusts the deformation weights by quantifying the geometric abrupt change characteristics between adjacent facets, thereby improving the ability to preserve details while maintaining computational efficiency.

[0118] Get each piece normal vector For shared edges Adjacent face and The gradient of the normal vector is defined as:

[0119]

[0120] According to the surface curvature theory in differential geometry, the rate of change of the normal vector can characterize local geometric features. This gradient quantifies the abrupt change in the normal vector per unit length and is positively correlated with the principal curvature of the surface. Its magnitude reflects the rate of change of curvature of the surface at that point; a larger gradient indicates a steeper surface or more complex details.

[0121] To balance geometric sensitivity and computational stability, the normal vector gradient is further fused with the traditional cotangent weights to construct an enhanced weight matrix:

[0122]

[0123] Where β is the balance factor (β∈ 0, 1 This controls the strength of the gradient's influence. According to the weighted Laplace convergence condition in discrete differential geometry, the enhancement weights must satisfy symmetric positive definiteness. To ensure the positive definiteness and symmetry of the enhancement weight matrix, constraints are... . To achieve normalization, the global maximum gradient value is used. Traditional cotangent weights:

[0124]

[0125] in, and For the edge Two opposite angles.

[0126] By fusing the normal gradient with the Laplacian weights, the deformation energy is essentially optimized through curvature sensitivity weighting. In flat regions, the normal gradient approaches zero, and the weights are in standard cotangent form to maintain numerical stability and smoothness. In regions rich in detail, the normal gradient increases significantly, amplifying the weight differences to enhance geometric sensitivity during deformation. The core advantage of this weight fusion design lies in balancing geometric sensitivity and computational efficiency, significantly improving the performance of the Laplacian deformation algorithm in complex scenes.

[0127] The deformed energy function E combines the Laplacian coordinate difference and the normal vector gradient information. The normal vector gradient weights maintain symmetric positive definiteness, ensuring that L is positive semi-definite. The improved Laplacian energy function is convex, the constraint terms are convex, and the overall problem is a convex optimization problem. A convex problem has a unique minimum under the constraints. For a convex energy function, gradient descent guarantees convergence to the global minimum. In each iteration, by calculating the gradient of the energy function and updating the vertex position, the energy function value gradually decreases. Since the energy function is convex, this process converges to a stable value, i.e., the global minimum.

[0128] (4) Laplace constraint solution and deformation reconstruction:

[0129] Based on weight optimization, the system establishes the Laplacian deformation energy equation. By minimizing the difference in Laplacian coordinates before and after deformation and the positional error of user-constrained points, the vertex displacement is solved. Finally, the system applies the solved vertex displacement to the coarse-tuning model to complete the geometric reconstruction of local details. This stage not only corrects the surface distortion that may be caused by free deformation, but also preserves high-frequency geometric features through the differential properties of Laplacian coordinates, ensuring the visual fidelity of the model in mixed reality environments.

[0130] (5) Output the final deformed model:

[0131] After the refinement solution is completed, the system integrates the updated vertex coordinates, patch topology, and material properties into a standardized 3D model file, and outputs the final deformation result.

[0132] In the Laplace detail optimization stage, a deformation-sensitive model oriented towards the characteristics of the colored lantern model is constructed by fusing the normal vector gradient and the cotangent weight.

[0133] Experiments and Analysis:

[0134] This experiment aims to verify the applicability and advantages of the proposed algorithm for the 3D lantern model in a mixed reality interactive environment by comparing the performance and effects of this embodiment, the free deformation algorithm, the Laplacian mesh deformation algorithm, and the partition-based Laplacian deformation algorithm. The experiment was conducted using the advanced HoloLens 2 mixed reality platform, equipped with a Qualcomm Snapdragon 850 processor and 4GB of RAM, achieving a spatial positioning accuracy of ±1.5cm. Its high-precision spatial positioning capabilities and rich interactive interfaces provided an ideal testing platform for real-time algorithm verification. HoloLens employs SLAM technology, primarily combining depth sensors, camera data, and an inertial measurement unit for localization and mapping. Therefore, HoloLens can determine the user's position in physical space in real time and construct a virtual map of the surrounding environment in the process. This means the device can accurately understand the user's environment and precisely align virtual objects with the real world, providing a highly accurate and realistic mixed reality experience.

[0135] The test environment was deployed on the Unity 2022.3.6f1 framework, integrating the MRTK 2.8.0 toolkit, and the algorithm core was programmed in C#. In terms of experimental parameter settings, the octree segmentation depth during the free deformation stage was [value missing]. =6. Normal vector discrete threshold =0.15, Laplace optimization stage normal vector gradient balance factor β=0.7.

[0136] To comprehensively evaluate the algorithm's performance, this experiment used two types of 3D model data as test benchmarks: a general 3D model and a colored light 3D model. The general 3D model represents common 3D model structures, with vertex sizes ranging from thousands to tens of thousands, and is used to evaluate the algorithm's adaptability in general scenarios. The colored light model, on the other hand, is more complex and varied, containing more mesh vertex data and color information, with a vertex size of hundreds of thousands, and is used to evaluate the algorithm's ability to handle highly complex geometry and material rendering. The choice of these two 3D models aims to more broadly cover various application scenarios, thereby providing a more comprehensive evaluation of the algorithm's generalization performance.

[0137] Time delay comparison:

[0138] In 3D model deformation tasks, especially when dealing with highly complex models, end-to-end latency is one of the core metrics for evaluating algorithm practicality. This metric directly determines the smoothness of the user experience in scenarios such as interactive design, virtual reality, and real-time animation. Therefore, quantitatively comparing the time latency of different algorithms and clarifying their applicable boundaries on large-scale, highly detailed models is of great significance for practical engineering selection and algorithm optimization.

[0139] By comparing the deformation latency of this embodiment, the Laplace mesh deformation algorithm, and the partition-based Laplace mesh deformation algorithm when deforming general 3D models and 3D lantern models, the real-time performance advantage of this embodiment in mixed reality scenarios is verified. Before the experiment, the models were preprocessed and uniformly converted to FBX format. Excessively large lantern models (such as the Anicent lantern 3D model with 2.67 million vertices and 1.33 million meshes) were removed to avoid HoloLens2 memory overload causing model loading failures. "-" indicates excessively long deformation times. The experimental results are averaged and shown in Table 2. The experimental data shows that the latency of this embodiment on low-complexity models (such as Duck, with approximately 50,000 vertices) is not significantly different from the traditional Laplace algorithm and the partition algorithm. This is because the global matrix solution cost is lower for small-scale meshes, and the gain from distributed deformation cannot offset the additional cost of octree preprocessing. However, on high-complexity lantern models, the latency of this embodiment is significantly lower than the Laplace deformation algorithm and the partition-based Laplace deformation algorithm, but still significantly higher than the free deformation algorithm.

[0140] Table 2

[0141]

[0142] Experimental results show that this embodiment has a significant effect on delaying the deformation of the 3D model of the colored lights when running on HoloLens2.

[0143] Comparison of deformation accuracy:

[0144] In the accuracy evaluation of mesh deformation algorithms, the ability to preserve geometric details directly affects the realism and usability of the model. Especially when dealing with high-frequency feature models such as sculpted textures and mechanical parts, subtle deformation errors may lead to visual distortion or functional failure.

[0145] This embodiment addresses the problem of normal direction offset in complex models caused by traditional free deformation algorithms by designing a comparative experiment and conducting a quantitative analysis from the perspective of geometric continuity. The direction vector of a surface refers to the normal vector at a certain point on the surface. It is perpendicular to the surface and represents the local geometric features of the surface at that point. The preservation of geometric features depends on the accurate description of the local surface direction. If the algorithm processing causes the normal vector to deviate significantly from the original direction, the local geometric features will inevitably degrade. Therefore, the comparison of normal vectors can be regarded as the core evaluation index of the ability to preserve surface geometric features. By comparing the angle or direction cosine value of the vertex normal vectors before and after deformation, the degree of preservation of geometric features by deformation can be quantified. The angle of the normal vector is calculated as shown in formula (9):

[0146]

[0147] in, Let be the angle between the normal vectors, and n be the unit normal vector.

[0148] This experiment compares the deformation accuracy of the free deformation algorithm, the Laplacian deformation algorithm, the partition-based Laplacian deformation algorithm, and the embodiment in this example on the general 3D model Duck (54,622 vertices, 100,392 meshes) and the 3D model Lion (330,287 vertices, 660,490 meshes) using normal vectors, quantifying the degree of change of local orientation on the mesh surface during the deformation process, as shown in Table 3.

[0149] Table 3

[0150]

[0151] Experimental data shows that this embodiment reduces the mean normal deviation of the ordinary model compared to the free deformation algorithm, verifying the effectiveness of octree pre-screening and gradient weight optimization. Although there is still a gap compared to the Laplace deformation algorithm, this is a trade-off in computational resources made to improve real-time performance. The free deformation algorithm has a high mean normal deviation in complex colored light models, while this embodiment effectively suppresses geometric distortion in large-scale mesh deformation through octree feature screening and hierarchical constraint solving.

[0152] Experimental results show that this embodiment maintains the global shape while demonstrating a particularly strong ability to preserve local features, providing a reliable guarantee for the deformation accuracy of complex models.

[0153] The hybrid deformation framework proposed in this embodiment achieves an effective balance between latency and accuracy compared to existing methods. In terms of computational efficiency, thanks to the octree-driven hierarchical deformation strategy, the deformation latency of this embodiment is significantly better than traditional Laplace deformation and partitioned Laplace deformation algorithms. Regarding deformation quality, this embodiment significantly surpasses the geometric fidelity of free deformation through normal vector gradient weight optimization and secondary subdivision of the detail region.

[0154] This embodiment proposes a two-step deformation algorithm for 3D lantern models, specifically designed for use in mixed reality environments to achieve precise manipulation of the 3D model. This algorithm combines the rapid response of free deformation technology with the fine-tuning capabilities of the Laplace optimization algorithm, aiming to improve deformation efficiency and quality. In the free deformation stage, users can intuitively adjust the general shape of the model; subsequently, the Laplace optimization algorithm further refines the deformation result, ensuring the preservation of 3D model details and a smooth transition of the overall shape. Finally, a general 3D model and a 3D lantern model were selected as test objects to compare the performance of this embodiment, traditional free deformation algorithms, traditional Laplace mesh deformation algorithms, and partition-based Laplace mesh deformation algorithms in terms of deformation delay, deformation accuracy, and phenotypic effect. The conclusion is that this method not only improves the user interaction experience but also provides a more realistic and natural deformation effect for the combined application of lanterns and mixed reality. This algorithm excels in preserving model details while effectively avoiding local degradation of the model shape during large-scale deformation, effectively balancing the contradiction between delay and accuracy in existing methods. The combined use of octree search and Laplace mesh deformation significantly improves both computational efficiency and stability of the algorithm.

[0155] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included 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 two-step deformation method suitable for three-dimensional models of colored lights, characterized in that, Includes the following steps: Obtain the 3D model of the colored lights to be processed; The coarse deformation region of the 3D model of the lanterns was divided based on the octree space partitioning algorithm; In the coarse deformation region, a control lattice that fits the region boundary is generated, and the displacement of the lattice nodes is mapped to the coordinate adjustment of all vertices in the region to obtain a coarse deformation model; The coarse deformation model is further divided into octree spaces to obtain the fine deformation region; Obtain the normal vector gradient of adjacent facets within the fine deformation region, and optimize the Laplacian weights based on the gradient magnitude; Based on optimized Laplace weights, a Laplace deformation energy equation is constructed. Solving the Laplace deformation energy equation yields the vertex displacement, which is then superimposed onto the coarse deformation model to output the final deformation model, thus achieving the shape adjustment of the colored light to be processed. The process of dividing the 3D model of the colored lanterns into a coarse deformation region based on the octree space partitioning algorithm includes: Based on the vertex coordinates of each triangular facet in the 3D model of the colored lantern, calculate the unit normal vector of the facet to obtain the normal vector field; based on the normal vector field, record the facet to which each edge belongs and simultaneously construct an adjacency list to obtain the facet adjacency relationship; based on the facet adjacency relationship, with the model bounding box as the root node, recursively detect the normal vector dispersion within the node to obtain the nodes that need to be further segmented; based on the nodes that need to be further segmented, divide the node into eight equal parts and assign faces to obtain the leaf node set; based on the leaf node where the target facet is located and its spatially neighboring nodes, calculate the cosine of the angle between the normal vector of the adjacent facet and the target facet to obtain the set of adjacent facets that satisfy the angle threshold; based on the set of adjacent facets, combine them into a coarse deformation region; In the roughly deformed region, the process of generating a control lattice that conforms to the region boundary includes: Based on the bounding box of the octagonal leaf nodes corresponding to the coarse deformation region, extract the eight corner points of the bounding box to obtain the initial control point set; establish a local orthogonal coordinate system based on the center of the bounding box and the direction of the longest side to obtain the parameterized reference; normalize the world coordinates of the vertices in the region to the parameter space based on the parameterized reference to obtain the relative coordinates of the vertices in the lattice; construct a non-uniform control lattice based on the relative coordinates. The process of mapping the displacement of lattice nodes to coordinate adjustments of all vertices within the region to obtain a coarse deformation model includes: Based on the displacement of the control points in the parameter space, the lattice deformation driving signal is obtained; based on the driving signal, the relative coordinates of the vertices are calculated by polynomial interpolation to obtain the new coordinates of the vertices; based on the new coordinates, the positions of all vertices in the coarse deformation region are updated to obtain the coarse deformation model.

2. The method according to claim 1, characterized in that, The process of obtaining the 3D model of the colored lights to be processed includes: The original lantern model is obtained and its format is converted to obtain a unified data representation. Based on the unified data representation, isolated vertices and non-manifold edges are detected and removed to obtain a topologically complete 3D lantern model.

3. The method according to claim 1, characterized in that, The process of further partitioning the coarse deformation model into an octree space to obtain the fine deformation region includes: Using the coarse deformation model region as a new bounding box, a secondary segmentation space is obtained; based on the normal vector discrete threshold and the included angle threshold smaller than those of the coarse adjustment stage, the secondary segmentation space is re-performed with octree recursive segmentation to obtain a set of leaf nodes; based on the set of leaf nodes, the cosine of the included angle between the normal vectors of the facets is repeatedly calculated to obtain a set of adjacent facets that satisfy the new included angle threshold; based on the set of adjacent facets, a fine deformation region is formed.

4. The method according to claim 1, characterized in that, The process of obtaining the normal vector gradient of adjacent patches within the fine deformation region includes: Based on adjacent faces sharing the same edge within the fine deformation region, obtain the unit normal vector; based on the difference of the unit normal vectors and the length of the common edge, calculate the rate of change of the normal vector per unit length, and obtain the normal vector gradient.

5. The method according to claim 4, characterized in that, The process of optimizing Laplace weights based on gradient magnitude includes: The normal vector gradient is normalized based on the global maximum gradient value to obtain the normalized gradient; the normalized gradient is multiplied by the balance factor to obtain the weight increment; the traditional cotangent weight is added to the weight increment to obtain the enhanced weight matrix; based on the enhanced weight matrix, the upper limit of the balance factor is limited to obtain the optimized Laplace weights.

6. The method according to claim 1, characterized in that, The process of constructing the Laplace deformation energy equation based on optimized Laplace weights includes: Based on the optimized Laplacian weights, a quadratic energy term is constructed to express the difference between the current Laplacian coordinates of the vertex and the target Laplacian coordinates, thus obtaining the internal deformation energy. With preset constraint points and target positions, a position error term is added to obtain the Laplacian deformation energy equation.

7. The method according to claim 6, characterized in that, The process of solving the Laplace deformation energy equation to obtain the vertex displacement, and then superimposing the vertex displacement onto the coarse deformation model to output the final deformation model includes: Based on the Laplace deformation energy equation, the vertex coordinates are iteratively updated using the gradient descent method to obtain the convergent displacement. The convergent displacement is then superimposed onto the corresponding vertices of the coarse deformation model to obtain the updated vertex coordinate set. Based on the updated vertex coordinate set and the original topological relationship, the final deformation model is output to achieve the shape adjustment of the colored light to be processed.

Citation Information

Patent Citations

  • News scene three-dimensional reconstruction and visualization method based on multi-source remote sensing data

    CN119904592A

  • Three-dimensional point cloud segmentation method and apparatus based on locally weighted curvature and two-point method

    WO2025156819A1