A method and system for simulating a fiber-scale fabric structure
By using Catmull-Rom spline curves and OpenGL lighting rendering technology, a fiber-scale fabric structure model was constructed, which solved the problem of insufficient fiber-scale simulation in existing technologies and achieved a highly realistic fabric simulation effect.
Patent Information
- Application Number
- CN202611263532.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-11-27
AI Technical Summary
Existing CAD software for woven fabric design cannot accurately reproduce the true geometric shape and spatial interweaving relationship of yarn at the fiber scale, making it difficult to simulate the spiral winding structure inside the fiber bundle and the branching shape of the yarn surface, resulting in a large gap between the design effect and the actual finished product.
A single-fiber curve model is constructed using Catmull-Rom spline curves, a fiber bundle model is constructed based on yarn type, and a hair generation mechanism is superimposed. Combined with OpenGL lighting rendering, a multi-scale, highly realistic 3D simulation from single fiber to multi-layer fabric is achieved.
It achieves precise representation of micro-entanglement structures at the fiber scale, flexible control of the branching structure of the fiber bundle model, and highly realistic texture details and lighting effects, thus enhancing the realism of fabric simulation.
Smart Images

Figure CN123179656A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fabric simulation technology, and more specifically to a fiber-scale fabric structure simulation method and system. Background Technology
[0002] Woven fabric design initially relied on traditional manual operations, requiring designers to manually plan yarn direction and loop structure based on experience. This not only resulted in long design cycles and low efficiency but also made it difficult to accurately control fabric characteristics, further limiting large-scale batch design. With technological advancements, computer-aided design (CAD) software has gradually been applied to the field of woven fabric design, replacing some manual steps and becoming the mainstream technology in the industry.
[0003] Current CAD software for woven fabric design improves design efficiency, supporting core design steps such as creating new canvases, yarn arrangement, weave design (including weave library selection and custom creation), loop settings, and filling areas with different weaves. It automatically generates process files such as heddle patterns and pattern templates, ultimately achieving 3D fabric simulation and garment style application previews, covering the entire process from "design-process-effect verification" and meeting the needs of all scenarios from creative design to practical reference. However, the simulation capabilities of existing CAD software are mostly limited to the macroscopic geometric level. Their yarn models are usually represented by idealized smooth cylinders or ellipsoids, which cannot accurately reproduce the real geometric shape and spatial interweaving relationship of yarn at the fiber scale. Specifically, existing systems lack detailed modeling of single fiber curve paths, making it difficult to represent the helical winding structure formed by the twisting process within the fiber bundle, and even more difficult to simulate the fuzzy branching morphology of the yarn surface caused by post-processing (such as napping, singeing, and brushing). In addition, for multi-colored spun yarns formed by mixing multi-colored fibers, existing rendering methods usually use simplified texture mapping, failing to combine lighting models to achieve a realistic expression of fiber-level color mixing effects. For multi-layered complex structures, existing software also lacks methods for constructing structures based on indirect fiber bundle relationships. These shortcomings result in a significant gap between the design effect and the actual finished product, making it difficult for designers to intuitively predict the final appearance and severely impacting design efficiency and product development cycles.
[0004] Therefore, how to provide a simulation method and system that can restore the weaving process at the fiber scale based on three-dimensional dynamic technology, establish various weave models of woven fabrics, accurately simulate the real effects of fabric post-processing, and help designers intuitively predict the finished product effect is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the present invention provides a fiber-scale fabric structure simulation method and system. A single fiber curve model is constructed by using Catmull-Rom splines, and a fiber bundle model is constructed based on yarn type. The hair branch generation mechanism and multi-layer splicing structure are further superimposed. Combined with color spinning settings and OpenGL lighting rendering, a multi-scale, highly realistic three-dimensional simulation from single fiber to multi-layer fabric is achieved.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: On one hand, the present invention provides a method for simulating fiber-scale fabric structures, including: S1. Based on the interlacing points of the fabric structure, extract the warp and weft interlacing points in the minimum cycle, and construct a single fiber curve model using Catmull-Rom spline curves. S2. Based on the current yarn type, construct a fiber bundle model using the single fiber curve model; S3. Determine whether the fabric needs to be branched. If yes, proceed to S4; otherwise, proceed to S5. S4. Based on the parameters of branch breakpoint, branch length, and disturbance amplitude, establish a hairy generation mechanism, and superimpose the hairy generation mechanism on the fiber bundle model to obtain a branched fiber bundle model. S5. Determine whether the fabric is a multi-layer structure. If yes, proceed to S6; otherwise, jump directly to S7. S6. Construct a multi-layer fabric structure model using the splicing method based on the interlacing relationship; S7. Determine whether the three-dimensional model constructed by the fabric needs to be colored. If it needs to be colored, set the color of each layer of warp yarn, weft yarn, and each strand of yarn, and then render the three-dimensional model constructed by the fabric based on OpenGL lighting rendering. If not, render the three-dimensional model constructed by the fabric directly based on OpenGL lighting rendering.
[0007] Preferably, S1 specifically includes: Based on the weave type of the woven fabric, the warp and weft points are extracted from the smallest repeat unit as control points for the single fiber curve. With every four consecutive control points P i ,P i+1 ,P i+2 ,P i+3 As a group, the curve segment between two adjacent control points is calculated using the Catmull-Rom spline curve formula; By connecting each curve segment in sequence, a continuous smooth spline curve passing through all control points is constructed to obtain the fitted spatial interlacing path of the warp or weft yarns. By adjusting the control point spacing and interpolation density, the smoothness of the curve is optimized, and a single-fiber curve model is obtained.
[0008] Preferably, S2 includes: Based on the current yarn type, determine whether the current yarn layer is an untwisted fiber bundle; If it is an untwisted fiber bundle, the fiber bundle model is obtained by applying isotropic random displacement within a preset range, with the single fiber curve as the center line and the three-dimensional morphological modeling method based on uniform random shaking. If it is a twisted fiber bundle, then based on polar coordinate offset and phase difference control, a spiral twist is applied to the single fiber curve to generate a spiral twisted shape, and a hollow structure is formed by adjusting the distance between the fiber and the center line to obtain a single fiber bundle model. If the woven fabric consists of multiple fiber bundles, the individual fiber bundle models are combined to obtain the fiber bundle model.
[0009] Preferably, based on polar coordinate offset and phase difference control, a helical twist is applied to the single fiber curve to generate a helical twisted shape, and a hollow structure is formed by adjusting the distance between the fiber and the center line to obtain a single fiber bundle model, including: Using the single fiber curve as the reference yarn centerline, calculate the local coordinate system of any point on the centerline to obtain the normal vector N and the sub-normal vector B, and construct a cross-sectional plane perpendicular to the yarn axis. Within the cross-sectional plane, the offset of the fiber surface points is calculated based on the polar coordinate to Cartesian coordinate transformation relationship:
[0010] in, This describes the offset distance of a fiber surface point in the X-axis direction within a cross-sectional plane perpendicular to the yarn axis. This describes the offset of a fiber surface point in the Y-axis direction within a cross-sectional plane perpendicular to the yarn axis. This indicates that the offset only occurs in a plane perpendicular to the axis; For radius parameter, Twist parameter; Using a stochastic phase model Assign an initial phase angle to each fiber, calculate the spatial coordinates of the j-th fiber at position t, and obtain the twisted fiber bundle model:
[0011] in, These are the coordinates of the centerline trajectory of the yarn. Let be the distance from the j-th fiber to the centerline, k be the helical parameter, t be the position parameter, N be the normal vector, and B be the binormal vector. Based on the rotation angle.
[0012] Preferably, individual fiber bundle models are combined to obtain a fiber bundle model, including: Using the yarn space curve C(s) as the central axis, a Frenet frame that varies with the axis is constructed based on the arc length parameter s. For the i-th strand, the spatial position is:
[0013] Where R is the radius of the strand from the central axis, L is the lead of the helix, T(s) is the unit tangent vector, N(s) is the normal vector, and B(s) is the binormal vector; Let be the initial phase angle of the i-th line; Each strand is wrapped with a fiber shell, with the spatial curve P of each strand. i (s) represents the new centerline. Construct the corresponding Frenet frame. The path of the k-th attached fiber in the fiber shell can be represented as:
[0014] in, For the conductance of the fiber, This represents the initial phase of the fiber; By adjusting r and By controlling the tightness of fiber wrapping and the fineness of surface texture, a multi-fiber bundle model is obtained.
[0015] Preferably, S4 includes: Using the spiral space curve of the yarn backbone as a carrier, the breakpoints on the spiral curve are selected as the attachment points of hair by random sampling with equal probability, and the number of breakpoints on a unit length of yarn is controlled by the hair index. At the breakpoint, a local coordinate system is constructed based on the tangent vector, normal vector, and binormal vector. The direction of the tangent vector is determined by normalizing the vector difference between adjacent points. When the magnitude of the normal vector approaches zero, the direction is switched to the vertical. The branch length is determined according to the feather type, and a branch curve containing multiple control points is generated by using a corresponding uniformly distributed branch length in a parametric recursive manner. A gradual random perturbation is applied to the branch curve, and a sinusoidal modulation function is used to achieve a smooth transition of the perturbation; Control the direction of the feathers according to the finishing type; The generated hair-like structure is superimposed onto the fiber bundle model to obtain the branched fiber bundle model.
[0016] Preferably, rendering the generated 3D model of the woven fabric based on OpenGL lighting rendering includes: The Phong reflection model is used to decompose the reflected light from the fabric surface into three components: ambient light, diffuse reflection, and specular reflection for illumination calculation. The corresponding illumination coefficient and specular index are configured according to the surface characteristics of the woven fabric. Each fiber is modeled as a continuously stretched generalized cylinder. The cross-section of the fiber is switched between circular, triangular, and strip-shaped according to the simulation requirements, and the circular cross-section is discretized by circumferential uniform sampling. The fiber surface normal vector is calculated by per-vertex normal interpolation, and the vertex normal is obtained by area-weighted averaging of adjacent prism faces to complete the smooth coloring of the fiber surface. It adopts a GPU-first hybrid rendering pipeline, uses Vertex Buffer Objects (VBOs) and Index Buffer Objects (EBOs) to organize vertex and mesh data in batches, and automatically falls back to CPU immediate mode rendering when the GPU is unavailable. By configuring a fixed-direction top light source and adjusting the light source attenuation factor to simulate the spatial attenuation of light, a highly realistic visualization rendering output of the 3D model of the woven fabric is achieved.
[0017] Preferably, the joining method includes: inner warp joining method, outer warp joining method, combined joining method, joining warp joining method, and joining weft joining method.
[0018] On the other hand, the present invention also provides a fiber-scale fabric structure simulation system, comprising: The single-fiber modeling module is used to extract the warp and weft points in the minimum cycle based on the interlacing points of the fabric structure, and to construct a single-fiber curve model using Catmull-Rom spline curves. The fiber bundle modeling module is used to construct a fiber bundle model based on the single fiber curve model according to the current layer yarn type. The branch processing module is used to establish a hair generation mechanism based on the branch breakpoint, branch length, and disturbance amplitude parameters when the fabric needs to add branches. The hair generation mechanism is then superimposed on the fiber bundle model to obtain a branched fiber bundle model. A multi-layer processing module is used to construct a multi-layer fabric structure model based on the interlacing relationship using a splicing method when the fabric has a multi-layer structure. The first rendering module is used to set the color of each layer of warp yarn, weft yarn, and each strand of yarn when the three-dimensional model of the fabric needs to be colored. The second rendering module is used to render the three-dimensional model of the fabric based on OpenGL lighting rendering when the fabric does not need to be dyed or after the dyeing process is completed.
[0019] As can be seen from the above technical solutions, compared with the prior art, this invention discloses a fiber-scale fabric structure simulation method and system. By constructing a single-fiber curve model using Catmull-Rom spline curves, it can accurately present the microscopic winding structure at the fiber scale, solving the problem of existing simulation systems lacking fiber-level three-dimensional dynamic effects. Based on this, fiber bundle models are constructed for different yarn types such as untwisted, twisted, and multi-ply yarns. Furthermore, a multi-layer fabric structure model is constructed using a splicing method, achieving multi-scale, full-structure coverage from single fibers to multi-layer fabrics, providing a complete simulation framework for digital fabric design and structural expression. Furthermore, this invention uses a hairiness generation mechanism to superimpose branch structures onto the fiber bundle model, achieving flexible control over yarn hairiness morphology. By combining color spinning settings with OpenGL lighting rendering, using the Phong reflection model for lighting calculations and per-vertex normal interpolation to achieve smooth fiber surface coloring, and cooperating with a GPU-priority hybrid rendering pipeline, the simulation results have a high degree of visual realism in terms of texture details, lighting effects, and three-dimensionality, effectively improving the realism of fabric simulation. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0021] Figure 1 A flowchart of the simulation method provided by the present invention.
[0022] Figure 2 Construction of Catmull-Rom splines.
[0023] Figure 3 This is a cross-sectional view of the yarn.
[0024] Figure 4 This is a model of twisted fiber bundles.
[0025] Figure 5 This is a diagram of a curved spiral twist.
[0026] Figure 6 It can be a single, double, or multiple spiral diagram.
[0027] Figure 7 Generate schematic diagram for branch model
[0028] Figure 8 This is an image showing the effect of single-sided napped corduroy.
[0029] Figure 9This is a double-layer woven fabric structure model.
[0030] Figure 10 This is the method of connecting the inner meridians.
[0031] Figure 11 This is a method of connecting the two sides of the face.
[0032] Figure 12 This is a combined connection method.
[0033] Figure 13 This is an additional yarn splicing method.
[0034] Figure 14 An image showing the effect of attaching the yarn.
[0035] Figure 15 This is a simulation image of a woven fabric. Detailed Implementation
[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] This invention discloses a fiber-scale fabric structure simulation method, such as... Figure 1 As shown, it includes: S1. Based on the interlacing points of the fabric structure, extract the warp and weft interlacing points in the minimum cycle, and construct a single fiber curve model using Catmull-Rom spline curves. S2. Based on the current yarn type, construct a fiber bundle model using the single fiber curve model; S3. Determine whether the fabric needs to be branched. If yes, proceed to S4; otherwise, proceed to S5. S4. Based on the parameters of branch breakpoint, branch length, and disturbance amplitude, establish a hairy generation mechanism, and superimpose the hairy generation mechanism on the fiber bundle model to obtain a branched fiber bundle model. S5. Determine whether the fabric is a multi-layer structure. If yes, proceed to S6; otherwise, jump directly to S7. S6. Construct a multi-layer fabric structure model using the splicing method based on the interlacing relationship; S7. Determine whether the three-dimensional model constructed by the fabric needs to be colored. If it needs to be colored, set the color of each layer of warp yarn, weft yarn, and each strand of yarn, and then render the three-dimensional model constructed by the fabric based on OpenGL lighting rendering. If not, render the three-dimensional model constructed by the fabric directly based on OpenGL lighting rendering.
[0038] Furthermore, S1 specifically includes: Based on the weave type of the woven fabric, the warp and weft points are extracted from the smallest repeat unit as control points for the single fiber curve. With every four consecutive control points P i ,P i+1 ,P i+2 ,P i+3 As a group, the curve segment between two adjacent control points is calculated using the Catmull-Rom spline curve formula; By connecting each curve segment in sequence, a continuous smooth spline curve passing through all control points is constructed to obtain the fitted spatial interlacing path of the warp or weft yarns. By adjusting the control point spacing and interpolation density, the smoothness of the curve is optimized, and a single-fiber curve model is obtained.
[0039] The detailed process is as follows: Connecting the warp and weft points in the minimum cycle respectively forms a single fiber model of the minimum cycle. The structure of woven fabric is a complex curve formed by the interlacing of yarns, and its geometry can be regarded as a kind of spatial spline curve.
[0040] Catmull-Rom splines are widely used interpolation splines in computer graphics and geometric modeling. They accurately pass through given control points and provide smooth curve transitions. Compared to NURBS (Non-Uniform Rational B-Splines), Catmull-Rom splines compute node vectors and basis functions, making the implementation more intuitive and efficient, suitable for real-time interactive modeling. A Catmull-Rom spline is a piecewise cubic interpolation curve, where each curve segment is defined by four consecutive control points (p0, p1, p2, p3), and interpolation occurs between p1 and p2. The expression for the interpolation curve is as follows:
[0041] Where t∈[0,1] are interpolation parameters. For example... Figure 2 In this embodiment of the invention, a Catmull-Rom spline curve is constructed by connecting multiple warp and weft weft points in the minimum repeat weave, ensuring that the curve strictly passes through all control points and maintains a smooth transition. Specifically, firstly, interlacing points are extracted as weft points based on the structural geometric characteristics of different woven fabrics to ensure that the curve accurately represents the spatial path of the yarn; then, for every four consecutive control points (such as P...),... i ,P i+1 ,P i+2 ,P i+3 Calculate P i+1 To P i+2 The Catmull-Rom curve segment between them is as follows Figure 2 As shown; finally, the smoothness of the curve is optimized by adjusting the control point spacing and interpolation density to make it conform to the mechanical properties of the actual yarn.
[0042] The Catmull-Rom spline curves constructed based on weft points in this paper can accurately fit the interlacing structure of woven fabrics with different wefts. Catmull-Rom splines do not require the calculation of node vectors and basis functions, making them more suitable for real-time modeling in woven fabric simulations that require accurate interpolation.
[0043] Specifically, S2 includes: Based on the current yarn type, determine whether the current yarn layer is an untwisted fiber bundle; If it is an untwisted fiber bundle, the fiber bundle model is obtained by applying isotropic random displacement within a preset range, with the single fiber curve as the center line and the three-dimensional morphological modeling method based on uniform random shaking. Untwisted yarn refers to a type of yarn in which fibers are bonded together through physical or chemical methods without relying on traditional twisting processes. Because no mechanical twisting is applied, its structure is loose and soft, possessing unique properties and making it widely used in high-end textiles and functional fabrics.
[0044] The untwisted fiber bundle model does not involve a twisting process; the fibers are arranged around the fiber bundle axis within a set range, and the yarn cross-section is as follows: Figure 3 As shown. This model is based on a three-dimensional morphological modeling method using uniform random jitter. By applying isotropic random displacements within a preset range, it achieves accurate simulation of the natural morphology of the yarn. The algorithm uses NumPy's uniformly distributed random number generator to apply independent perturbations to the curve control points in three-dimensional space. The core mathematical expression of the new coordinates of the control points after the perturbation is shown in the following equation:
[0045] In the formula: N is the original coordinate, δ is the global amplitude coefficient, This represents a uniformly distributed random variable within an interval. This design ensures that yarn deformation has the same probability in all directions of space, consistent with the physical characteristics of random yarn crimping in reality.
[0046] If it is a twisted fiber bundle, then based on polar coordinate offset and phase difference control, a spiral twist is applied to the single fiber curve to generate a spiral twisted shape, and a hollow structure is formed by adjusting the distance between the fiber and the center line to obtain a single fiber bundle model. If the woven fabric consists of multiple fiber bundles, the individual fiber bundle models are combined to obtain the fiber bundle model.
[0047] Furthermore, based on polar coordinate offset and phase difference control, a helical twist is applied to the single fiber curve to generate a helical twisted shape. A hollow structure is formed by adjusting the distance between the fiber and the centerline, resulting in a single fiber bundle model, including: Using the single fiber curve as the reference yarn centerline, calculate the local coordinate system of any point on the centerline to obtain the normal vector N and the sub-normal vector B, and construct a cross-sectional plane perpendicular to the yarn axis. Within the cross-sectional plane, the offset of the fiber surface points is calculated based on the polar coordinate to Cartesian coordinate transformation relationship:
[0048] in, This describes the offset distance of a fiber surface point in the X-axis direction within a cross-sectional plane perpendicular to the yarn axis. This describes the offset of a fiber surface point in the Y-axis direction within a cross-sectional plane perpendicular to the yarn axis. This indicates that the offset only occurs in a plane perpendicular to the axis; For radius parameter, Twist parameter; Using a stochastic phase model Assign an initial phase angle to each fiber, calculate the spatial coordinates of the j-th fiber at position t, and obtain the twisted fiber bundle model:
[0049] in, These are the coordinates of the centerline trajectory of the yarn. Let be the distance from the j-th fiber to the centerline, k be the helical parameter, t be the position parameter, N be the normal vector, and B be the binormal vector. Based on the rotation angle.
[0050] Specifically, yarn twisting is a key process in textile engineering. By rotating the fiber bundle around its own axis, it endows the yarn with necessary mechanical properties and structural stability. This process directly affects the yarn's strength, elongation, surface morphology, and the final fabric's performance. Based on the analysis of yarn twisting in woven fabrics, a system has been established... Figure 4 A model of twisted fiber bundles.
[0051] The spatial structure of a twisted fiber bundle model resembles a helix. The essence of twisting lies in generating radial pressure between the fibers by twisting the fiber bundle, thereby enhancing the friction and cohesion between the fibers. When the fiber bundle rotates around its axis, the outer fibers are arranged in a helical pattern, while the inner fibers form centripetal pressure due to the twisting effect. This structural change transforms the originally loose fiber assembly into a continuous yarn structure. The degree of twisting in yarn is usually characterized by twist and twist vectorization. This paper proposes a yarn twist modeling method based on polar coordinate transformation, which constructs a model by parametrically controlling the curve radius, helical direction, and degree of twist. Figure 5 The curved spiral torsion model.
[0052] This method applies polar coordinate offsets to the baseline yarn centerline to construct a twist structure with continuous and smooth characteristics. Its mathematical expression is based on the transformation relationship between polar and Cartesian coordinates. Given any point on the yarn centerline, the normal and binormal vectors in its local coordinate system are first calculated, constructing a cross-sectional plane perpendicular to the yarn axis. On this plane, the offset of points on the yarn surface is calculated using polar coordinate formulas as shown below:
[0053] In the formula: and These describe the offset distance of a fiber surface point in the X-axis direction and the offset amount in the Y-axis direction within a cross-sectional plane perpendicular to the yarn axis. This indicates that the offset only occurs in a plane perpendicular to the axis. (Radius parameter) Control the distance of the j-th yarn from the center line; twist parameter is obtained through... The twist degree of the yarn is controlled by k, which represents the number of twists per unit length. The negative sign indicates Z-twist (right-hand twist). By adjusting the twist parameter k, twist structures with different levels of tightness can be achieved. The curve parameter t is a normalized position parameter used to represent the relative position of points along the yarn centerline or branch curve. By utilizing the initial position differences and migration effects of each individual fiber during the twisting process, a random disturbance effect on the yarn surface is achieved.
[0054] To simulate the random distribution characteristics of fibers in real yarn, a random phase model is used. ,in Let be the initial phase angle of the j-th fiber, which follows the... The uniform distribution on the fiber surface serves as a control parameter reflecting the dispersion of the fiber distribution. This design adjusts... The range of values for can simulate the degree of randomness in the spatial arrangement of fibers of different types of yarn. The spatial coordinates of the j-th fiber at position t are:
[0055] In the formula: These are the coordinates of the centerline trajectory of the yarn. Let be the distance from the j-th fiber to the center line, k be the helix parameter, t be the position parameter (along the yarn length), N be the normal vector (perpendicular to the center line and pointing outwards), and B be the sub-normal vector (perpendicular to both the center line and the normal vector). Based on the rotation angle (generated by twisting) and The initial phase (a unique random offset for each fiber) determines the specific position of the fiber on the helix. All offsets are calculated in the local coordinate system of the yarn centerline point, ensuring the correct positioning of the fiber point in three-dimensional space. For each sampling point on the centerline, its corresponding polar coordinate offset is calculated and superimposed on the original position to form the yarn surface trajectory. By introducing random phase perturbation, the randomness of surface details can be increased while maintaining the overall twist structure, simulating the surface characteristics of real yarn.
[0056] Furthermore, individual fiber bundle models are combined to obtain fiber bundle models, including: Using the yarn space curve C(s) as the central axis, a Frenet frame that varies with the axis is constructed based on the arc length parameter s. For the i-th strand, the spatial position is:
[0057] Where R is the radius of the strand from the central axis, L is the lead of the helix, T(s) is the unit tangent vector, N(s) is the normal vector, and B(s) is the binormal vector; Let be the initial phase angle of the i-th line; Each strand is wrapped with a fiber shell, with the spatial curve P of each strand. i (s) represents the new centerline. Construct the corresponding Frenet frame. The path of the k-th attached fiber in the fiber shell can be represented as:
[0058] in, For the conductance of the fiber, This represents the initial phase of the fiber; By adjusting r and By controlling the tightness of fiber wrapping and the fineness of surface texture, a multi-fiber bundle model is obtained.
[0059] The multi-ply and helical fiber structure model of woven fabrics proposed in this paper, based on geometry and differential geometry theory, expands the traditional yarn structure from a single centerline to a collection of multiple parallel helical strands. Each warp or weft yarn consists of n (usually n=2 or 4) intertwined red helical strands. These strands are distributed around a virtual central axis and move along the axis at a constant angular velocity, forming single, double, or multiple helical spatial structures, such as... Figure 6 As shown.
[0060] Let the central axis be a space curve C(s), where s is the arc length parameter, its unit tangent vector is T(s), its normal vector is N(s), and its binormal vector is B(s) = T(s) × N(s), forming a Frenet frame that varies with arc length. For the i-th strand (i = 0, 1, ..., n-1), its spatial position is given by the following formula:
[0061] Where R is the radius of the strand from the central axis, and L is the lead of the helix (i.e., the arc length required to complete one full turn of the twist). Let L be the initial phase angle of the i-th strand, ensuring that each strand is uniformly distributed across the cross-section. This model not only accurately represents the geometry of multi-strand yarns during the twisting process, but also achieves flexible control over yarn twist, strand spacing, and apparent density through the adjustment of lead L and radius R.
[0062] Building upon this, to further simulate the fiber coverage effect of a real yarn surface, a grayish-white fiber shell is wrapped around each red ply. This fiber shell consists of m (typically m=10) fine helical fibers, which are wound around the ply itself with a smaller radius r and a higher twist density, forming a nested helical structure similar to a "rope within a rope." Let the red ply be a space curve P. i (s), its Frenet frame is Then the path of the kth attached fiber can be represented as:
[0063] in For the conductance of the fiber, This represents the initial phase of the fiber. By adjusting r and... It can control the tightness of fiber wrapping and the fineness of surface texture, thus visually creating a smooth transition from core strands to surface fibers, enhancing the three-dimensionality and realism of the yarn.
[0064] This model achieves high-precision geometric modeling of the three-dimensional morphology of woven yarns through a double-layered helical structure of multi-strand spirals and fiber shells. It not only provides a reliable geometric foundation for fabric appearance simulation but also lays the structural framework for subsequent fuzz simulation, mechanical analysis, and rendering.
[0065] In another embodiment, S4 includes: Using the spiral space curve of the yarn backbone as a carrier, the breakpoints on the spiral curve are selected as the attachment points of hair by random sampling with equal probability, and the number of breakpoints on a unit length of yarn is controlled by the hair index. At the breakpoint, a local coordinate system is constructed based on the tangent vector, normal vector, and binormal vector. The direction of the tangent vector is determined by normalizing the vector difference between adjacent points. When the magnitude of the normal vector approaches zero, the direction is switched to the vertical. The branch length is determined according to the feather type, and a branch curve containing multiple control points is generated by using a corresponding uniformly distributed branch length in a parametric recursive manner. A gradual random perturbation is applied to the branch curve, and a sinusoidal modulation function is used to achieve a smooth transition of the perturbation; Control the direction of the feathers according to the finishing type; The generated hair-like structure is superimposed onto the fiber bundle model to obtain the branched fiber bundle model.
[0066] Specifically, yarn hairiness refers to the protruding fibers on the surface of yarn. Its formation is influenced by factors such as fiber raw materials, fiber length and morphology, and is also closely related to the state of the knitting needles during weaving, yarn tension, and chemical treatments in finishing processes. The morphological characteristics of hairiness directly affect the appearance and performance of the fabric. Based on the differences in the shape of the fibers protruding from the yarn matrix, hairiness can be divided into three categories: end hairiness, loop hairiness, and floating hairiness. End hairiness occurs when one end of the fiber protrudes from the yarn matrix, with a proportion of hairiness shorter than 4mm, mainly caused by short fibers. Loop hairiness occurs when the middle part of the fiber protrudes from the yarn matrix, primarily caused by long fibers being wound around the yarn axis during movement. Loop hairiness often forms 8-9mm hairiness after friction, especially after winding. Floating hairiness consists of loose hairiness attached to the yarn matrix. This type of hairiness is mostly caused by impurities in the yarn, which are exacerbated by strong friction during subsequent processing, resulting in fly hair.
[0067] This paper proposes an integrated 3D modeling method for the napping and hairiness of yarns and woven fabrics. This method uses the spiral spatial curve of the yarn backbone as the core carrier. On the one hand, it introduces random branch curves with shapes dominated by control points on the spiral curve to achieve accurate simulation of the hairiness morphology of different types of yarns. On the other hand, based on the local coordinate system progressive perturbation strategy, it simulates the lying shape and spatial distribution characteristics of the hairiness on the fabric surface after finishing processes such as napping and brushing by selecting the hairiness attachment point, controlling the growth direction, and defining the perturbation parameters with precise mathematical definitions. Finally, it achieves controllable hairiness distribution and corduroy stripe appearance effect.
[0068] Regarding the selection of the location of the hair attachment point, this method randomly selects a breakpoint on the yarn backbone (spiral curve) and applies random perturbations along the normal and subnormal directions to generate a three-dimensional structure that conforms to the actual yarn hair distribution pattern, such as... Figure 4As shown. In the mathematical model construction, the local coordinate system at any breakpoint Pbreak on the spiral curve is composed of the tangent vector T, the normal vector N, and the binormal vector B. The number m of breakpoints Pbreak is controlled by the set hairiness index H, which is a core indicator characterizing yarn quality, measured by the number of hairs on a 10-meter yarn. The generation of the branch curve follows the principle of asymptotic perturbation, and the core mathematical expression of the three-dimensional coordinates of the k-th control point on the branch curve is shown in the following equation:
[0069] In the formula: This is the step size coefficient. The number of control points contained in a single branch ( Branch length is divided according to the variation of feather type. Branch length follows a uniform distribution. If it is terminal feather, the branch length follows a uniform distribution. If the feathers are loops, the branch lengths should follow a uniform distribution. If the planktonic feathers follow a uniformly distributed branch length... , Here is the normalization parameter (k is the index of the current control point). The random disturbance factor, uniformly distributed in three-dimensional space, is... Ensure the feather orientation is random. Achieving a parabolic distribution of disturbance intensity, maximizing the curvature in the middle of the hairline while naturally attenuating at both ends, conforms to the morphological characteristics of actual yarn hairline. Three hairline models are shown below. Figure 7 As shown.
[0070] In the algorithm implementation, the breakpoint location is first determined based on the probability distribution, and an equal probability random sampling strategy is used to select the breakpoint on the spiral curve. There are several breakpoints, among which Let be the total number of points on the spiral curve. In the differential geometry calculation stage, the precise tangent vector direction is obtained by normalizing the vector difference between adjacent points, as shown in the equation:
[0071] In the formula: when the normal vector When the modulus approaches zero (i.e., T is close to vertical), the system automatically switches to the default vertical direction to ensure the robustness of the coordinate system establishment. The branch generation stage adopts a parameterized recursive method, with each branch containing 8 control points, and a smooth transition of disturbances is achieved through a sine modulation function.
[0072] Friction is a process that breaks and lifts the ends of fibers on the fabric surface through abrasion, forming a dense layer of short fibers. This enhances the fabric's softness, warmth, and napped texture. Building upon the basic fiber structure, this model introduces a progressive orientation alignment mechanism to simulate the visual effect of increased fiber quantity and directional flattening during the friction process. This mechanism assumes that during the initial free growth phase of friction, the fibers maintain a random orientation, and then gradually converge towards a target direction (usually parallel to the fabric surface and along a dominant direction, such as the fabric's longitudinal or transverse direction) under mechanical force. This physical process is mathematically modeled using piecewise interpolation functions.
[0073] Define the normalized progress parameter k~=k / K for the feather growth process. Set a combing initiation threshold η∈(0,1), for example, η=0.35. When k~<η, the feathers are in the free growth phase, and their direction is mainly dominated by the random perturbation model described in the previous section; when the feathers enter the combing phase, their direction begins to be power-law interpolated towards the target direction:
[0074] in, The alignment weight function is defined as follows:
[0075] parameter Control the alignment rate. When At that time, the alignment process is fast in the initial stage and slow in the later stage; when The alignment process is slow at the beginning and rapid at the end, more closely resembling the phenomenon of the ends of brush bristles being strongly straightened during actual brushing. Simultaneously, to preserve the soft texture of the bristles, a certain proportion of lateral disturbance is maintained as a lower limit during the alignment process. This ensures that the feathers do not become completely stiff, forming a gradual drooping shape with "loose roots and straight tips".
[0076] Compared to the gradual flattening of brushed fibers, brushing requires a more consistent and distinct uniform orientation of the bristles. Therefore, this model employs a strongly constrained orientation field for control. At the initial stage of bristle generation, a globally unified desired orientation is assigned to each bristle. This direction is typically perpendicular to the direction of movement of the brush roller and tangent to the fabric surface. During the generation process, the initial direction of the hairs... exist Randomly selected within a small solid angle range nearby:
[0077] Where R represents the rotation operation. For random rotation axis, This is the maximum permissible deviation angle (usually very small, such as 5°~15°). For each subsequent growth step, a strong guiding force is introduced to continuously pull the current growth direction towards... Its mathematical expression is to add a guiding term to the disturbance term:
[0078] Where β is the guidance strength coefficient. This force field ensures that even with random perturbations, the overall axis of the feathers remains tightly centered around the target direction. The distribution simulates the surface state of a fabric after it has been densely brushed.
[0079] To achieve the characteristic stripes of corduroy fabrics, or the special effect of generating fuzz only on one side of the fabric, this model introduces a spatial mask technique. This technique defines a binary generation function corresponding to the fabric's warp and weft mesh (or surface parameter domain). This controls the generation permissions of the feathers. For the corduroy effect, It is a periodic function of the warp column index j:
[0080] Among them, the set of retained columns Its repetition period R can be freely defined by the user, thus flexibly generating stripe patterns of varying widths and spacings. Only in The aforementioned fuzz generation algorithm will only be activated on the corresponding yarn segment.
[0081] For a one-sided fuzzing effect (simulating fuzzing only on the front side of the fabric), the mask function M is defined in relation to the surface orientation of the yarn segments. This means that only those yarn segments facing the front can grow fuzz. Yarn segments on the back side are suppressed by the mask, thus accurately reproducing the physical reality of "one-sided fuzzing" in the 3D model. Figure 8 As shown, this provides key technical support for single-sided pile fabrics such as simulated velvet and fleece.
[0082] In summary, the fabric texture model constructed in this study is a multi-layered, controllable composite system. The basic layer consists of random breakpoints and progressive perturbations, generating natural, original texture morphology. The process layer simulates the finishing effects of napping and brushing through two sub-modules: gradual direction alignment (collapse) and strongly constrained direction field (brushing). The spatial control layer achieves regionalized generation of corduroy stripes and single-sided napping through periodic column masks and single-sided orientation masks. These three logical layers can be enabled independently or combined arbitrarily, enabling the model to highly flexibly simulate the appearance of various fabrics, from ordinary napping to complex functional finishes (such as single-sided brushed corduroy), providing a powerful parametric modeling tool for computer-aided fabric design and effect prediction.
[0083] The generated hairy structure, as verified by experiments, possesses four major physical characteristics: In terms of spatial distribution, the hairs are uniformly distributed along the yarn axis without local aggregation; in terms of directional distribution, the three-dimensional perturbation factor ensures isotropy; in terms of length distribution, it conforms to the statistical laws of actual yarn hairs; and in terms of morphological characteristics, it exhibits a natural, gradually decreasing attenuation effect. Model parameters such as branch length range and perturbation amplitude can be flexibly adjusted according to different hair types, providing a reliable foundation for subsequent woven fabric design.
[0084] Double-layer and multi-layer weaves are structures formed by interlacing two or more sets of warp yarns with two or more sets of weft yarns to create overlapping upper and lower layers or multiple layers of fabric, such as... Figure 9 As shown. Based on their relative positions, the upper and lower layers are called the outer layer and the inner layer, respectively. The warp and weft yarns of the outer layer are called the outer warp and outer weft, and the warp and weft yarns of the inner layer are called the inner warp and inner weft. Depending on their purpose, the outer and inner layers can be separated or joined together.
[0085] Using a set of weft yarns, the outer and inner warp yarns are spirally interwoven, alternating between the outer and inner layers, forming a cylindrical hollow bag structure called a tubular weave. Tubular weaves can be used to make specialized industrial products such as water hoses, seamless drying fabrics, cylindrical filter cloths, and seamless bags.
[0086] (1) The inner warp is raised and the outer weft interweaves to form a joint structure. This jointing method is called the "inner warp jointing method" or the "bottom-to-top" jointing method, such as Figure 10 As shown.
[0087] (2) The outer warp sinks and interweaves with the inner weft to form a joint structure. This jointing method is called the "outer warp jointing method" or the "upper to lower" jointing method, such as Figure 11 As shown.
[0088] (3) The inner warp and outer weft interweave, and at the same time the outer warp and inner weft interweave to form a joint structure of the fabric. This jointing method is called "joint jointing method", such as Figure 12 As shown.
[0089] (4) The additional warp yarns are interwoven with the outer and inner weft yarns to form a joint structure, which is called the "joint warp joining method".
[0090] (5) The additional weft yarn is interwoven with the outer and inner warp yarns to form a joint structure, which is called "joint weft joining method".
[0091] In a double-layer woven fabric, the formation of the bonding structure depends on the interaction mechanism between the outer and inner layers of yarns. Its core lies in establishing the cross-configuration relationship between the warp and weft yarns of the upper (outer) and lower (inner) layers to achieve structural stability and a uniform appearance. Let the upper warp yarn set be... The upper weft yarn is assembled as The lower layer of warp yarns is assembled as follows: The lower layer weft yarns are assembled as Define the interleaving function. This indicates the vertical relationship between the warp yarn (w) and the weft yarn (f) at their intersection point. When I=1, the warp yarn is on top; when I=0, the weft yarn is on top. Double-layer splicing can be achieved through the following three methods: The first method is the "inner warp joining method," which involves the lower layer of warp yarns. Improve and connect with the upper weft yarn Intertwined, forming a "bottom-to-top" structure, the connection points satisfy:
[0092] This method achieves interlayer connection by locally lifting the lower layer yarns, with the joints hidden on the back of the fabric, while keeping the surface of the upper layer structure flat.
[0093] The second method is the "top warp joining method," which involves joining the upper warp yarns. Sink and merge with the lower weft yarn Intertwining forms an "upper-to-lower" structure, with the following connection conditions:
[0094] This method utilizes the upper yarn to complete the splicing in a localized area, with the splicing point located on the inside of the fabric, which is beneficial to the integrity of the surface appearance.
[0095] The third method is the "combined splicing method," which combines the two mechanisms mentioned above, allowing the lower warp yarns to... With the upper weft yarn Interweaving, while the upper warp yarns With the lower weft yarn Intertwined, together forming a connection system, its mathematical description is:
[0096] This method enhances interlayer bonding through bidirectional interweaving, making the fabric structure more balanced and stable, and is suitable for applications requiring high interlayer peel strength.
[0097] The three splicing methods described above can all be structurally achieved by adjusting the interlacing logic of I(w,f), which essentially involves precise control of the spatial positional relationship of the yarns. In 3D interlacing modeling, let the yarn centerline be the spatial curve C(s) and the interlacing height difference be h. Then, at the intersection point (i,j), the yarn height can be expressed as:
[0098] in The reference plane height is used. By introducing a set of interlacing points across layers and assigning corresponding δ values to each, the inner warp joint, outer warp joint, or combined joint can be flexibly configured within a unified model framework, thereby achieving diversified and high-fidelity three-dimensional reconstruction of the interlacing structure of double-layer woven fabrics.
[0099] For methods employing additional weft yarns: In the design of double-layered woven fabrics, the weft yarns connecting the outer and inner layers are crucial for achieving interlayer bonding and overall performance. Based on the configuration of the weft yarns, there are two main typical processes: "warp weft ...
[0100] Assume the outer fabric is made of warp yarns j s and weft yarn w s Composition, the inner fabric is made of warp yarns j l and weft yarn w l Composition. If the warp-jointing method is used, then an additional warp yarn is introduced. c Its relation to the table and the latitude w s He Liwei w l The interweaving pattern can be expressed as:
[0101] This function controls the vertical position of different layers of weft yarns to make j c As it passes through the surface and inner layers, it forms the necessary spatial curvature, resulting in periodic undulations in the thickness direction y. Its spatial trajectory can be modeled as a piecewise spatial curve:
[0102] in and These represent the center lines of the outer and inner yarns, respectively. Interlayer distance, and This represents the normal vector between the surface and inner layers at the interlacing point. The model adjusts the normal vector at the interlacing point... With normal offset, the insertion depth and appearance of the joint can be precisely controlled.
[0103] If the weft splicing method is used, then additional splicing weft yarns are introduced, such as... Figure 13As shown, its interlacing pattern is similar to that of the outer and inner warp meridians, and can be described by a similar Boolean interlacing matrix. At this point, the trajectory of the connecting latitude exhibits periodic interlacing in the -z plane, and its mathematical model is:
[0104] In the formula The interlacing strength function controls the lateral offset of the weft yarn between the outer and inner layers; and These are the secondary normal vectors of the outer and inner yarns at this point, respectively, reflecting the natural torsional deformation of the yarns during the interlacing process. The effect is as follows: Figure 14 As shown.
[0105] Although the yarn directions are orthogonal in both splicing methods, their core geometric principles are based on the combined effect of interlayer interleaving functions and local frame perturbations: by controlling the vertical relationship between the additional yarn and each layer of yarn (interlacing matrix), a continuous and natural splicing path is constructed in three-dimensional space; at the same time, by using small random perturbations in the directions of the normal and sub-normal vectors, the local deformation of real yarns at the interlacing points and the tendency of surface hairs to attach are simulated, thereby giving the fabric surface a natural texture undulation and visual layering while maintaining the interlayer bonding force.
[0106] The first three splicing methods utilize the warp and weft yarns of the outer and inner layers themselves and are collectively referred to as self-splicing methods; the latter two splicing methods require additional warp or weft yarns and are collectively referred to as additional thread splicing methods.
[0107] Of the five splicing methods mentioned above, the first three are generally used. The latter two methods require an additional set of warp or weft yarns, which complicates the production process and reduces efficiency; therefore, they are rarely used except for special needs.
[0108] In another embodiment, rendering the generated 3D model of the woven fabric based on OpenGL lighting rendering includes: The Phong reflection model is used to decompose the reflected light from the fabric surface into three components: ambient light, diffuse reflection, and specular reflection for illumination calculation. The corresponding illumination coefficient and specular index are configured according to the surface characteristics of the woven fabric. Each fiber is modeled as a continuously stretched generalized cylinder. The cross-section of the fiber is switched between circular, triangular, and strip-shaped according to the simulation requirements, and the circular cross-section is discretized by circumferential uniform sampling. The fiber surface normal vector is calculated by per-vertex normal interpolation, and the vertex normal is obtained by area-weighted averaging of adjacent prism faces to complete the smooth coloring of the fiber surface. It adopts a GPU-first hybrid rendering pipeline, uses Vertex Buffer Objects (VBOs) and Index Buffer Objects (EBOs) to organize vertex and mesh data in batches, and automatically falls back to CPU immediate mode rendering when the GPU is unavailable. By configuring a fixed-direction top light source and adjusting the light source attenuation factor to simulate the spatial attenuation of light, a highly realistic visualization rendering output of the 3D model of the woven fabric is achieved.
[0109] In a 3D fabric simulation and rendering system, lighting and shadow rendering are core technical aspects for creating realistic visual representations. This system is based on the principles of physical optics and uses a local lighting model to simulate the interaction between light and the fabric surface. The lighting calculation follows the classic Phong reflection model, decomposing surface reflected light into three components: ambient, diffuse, and specular. Its mathematical expression is as follows:
[0110] in, For the final pixel intensity, and Let be the intensity of ambient light and the intensity of the i-th light source, respectively. , and These are the ambient light, diffuse reflection, and specular reflection coefficients, respectively. Let be the direction vector of the light source. For the surface normal vector, The direction vector of the reflected light. The observation direction vector is given, and α is the specular specular index. In the specific implementation, the system sets the top light source as a fixed-direction parallel light, whose position vector is... Furthermore, differentiated parameter configurations were applied to address the varying surface characteristics of knitted and woven fabrics. For knitted fabrics, the ambient light coefficient was reduced. Improve diffuse reflectance coefficient And set the specular reflection coefficient. With highlight index This significantly enhances the three-dimensionality and surface gloss of the fibrous tubular structure; while for woven fabrics, softer parameters are used. This is to reflect its relatively flat surface optical properties.
[0111] At the geometric level, each fiber is modeled as a continuously stretched generalized cylinder, whose cross-sectional shape can switch between circular, triangular, and strip-shaped according to simulation requirements. For a circular cross-section, the discretization process is achieved by uniformly sampling the circumference: Let the cross-sectional radius be r, then the parameterized coordinates of the j-th sampling point are:
[0112] in Center of the cross section and Let n be the basis vectors of the local coordinate system, and n be the number of subdivisions. Selected in the knitted fabric pattern. To generate sufficiently smooth visual contours, while the woven fabric mode employs... To balance rendering efficiency and quality, a triangular section is directly defined by its three vertices, forming a rigid prism; a strip section, on the other hand, is defined by its four vertices as a rectangular cross-section, with its aspect ratio determined by parameters. Controlled to produce a flattened cross-section.
[0113] Normal vector calculation is crucial for lighting effects. The system employs per-vertex normal interpolation to achieve smooth shading. For each vertex on the cross-section ring, its normal is obtained by weighted averaging of the areas of adjacent prism faces:
[0114] Where F(v) is the set of all triangle faces containing vertex v. Let f be the area of surface f. The normal vector to the surface is obtained by normalizing the cross product of two sides of the triangle: This calculation method ensures that even at lower levels of subdivision (such as the three faces of a triangular cross-section or the four faces of a strip cross-section), the fiber surface can still exhibit a continuous gradient of light, avoiding the angularity caused by planar coloring.
[0115] The rendering pipeline employs a hybrid strategy, prioritizing batch rendering using GPU-accelerated Vertex Buffer Objects (VBOs). When the GPU becomes unavailable, the system automatically falls back to CPU immediate rendering mode. In the GPU path, vertex coordinates and normal data are pre-uploaded to video memory, and triangle meshes are efficiently organized using Element Buffer Objects (EBOs). During a draw call, the state machine required for lighting calculations is activated, and the fixed-function pipeline performs per-pixel lighting composition based on the aforementioned Phong model. This is achieved by adjusting the light source attenuation factor (a constant term). linear terms quadratic term This further simulates the natural attenuation of light in space, enhancing the sense of depth in the scene. The rendered image is shown below. Figure 15 As shown.
[0116] Ultimately, by tightly integrating geometric modeling, normal generation, and physical lighting calculations, the system achieves highly realistic visualization of knitted and woven fabrics in three-dimensional space. Different cross-sectional shapes and lighting parameter configurations not only reflect the physical differences in fabric structures but also provide a flexible and precise technical foundation for the visualization and analysis of material appearance.
[0117] On the other hand, the present invention also provides a fiber-scale fabric structure simulation system, comprising: The single-fiber modeling module is used to extract the warp and weft points in the minimum cycle based on the interlacing points of the fabric structure, and to construct a single-fiber curve model using Catmull-Rom spline curves. The fiber bundle modeling module is used to construct a fiber bundle model based on the single fiber curve model according to the current layer yarn type. The branch processing module is used to establish a hair generation mechanism based on the branch breakpoint, branch length, and disturbance amplitude parameters when the fabric needs to add branches. The hair generation mechanism is then superimposed on the fiber bundle model to obtain a branched fiber bundle model. A multi-layer processing module is used to construct a multi-layer fabric structure model based on the interlacing relationship using a splicing method when the fabric has a multi-layer structure. The first rendering module is used to set the color of each layer of warp yarn, weft yarn, and each strand of yarn when the three-dimensional model of the fabric needs to be colored. The second rendering module is used to render the three-dimensional model of the fabric based on OpenGL lighting rendering when the fabric does not need to be dyed or after the dyeing process is completed.
[0118] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0119] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for simulating fiber-scale fabric structures, characterized in that, include: S1. Based on the interlacing points of the fabric structure, extract the warp and weft interlacing points in the minimum cycle, and construct a single fiber curve model using Catmull-Rom spline curves. S2. Based on the current yarn type, construct a fiber bundle model using the single fiber curve model; S3. Determine whether the fabric needs to be branched. If yes, proceed to S4; otherwise, proceed to S5. S4. Based on the parameters of branch breakpoint, branch length, and disturbance amplitude, establish a hairy generation mechanism, and superimpose the hairy generation mechanism on the fiber bundle model to obtain a branched fiber bundle model. S5. Determine whether the fabric is a multi-layer structure. If yes, proceed to S6; otherwise, jump directly to S7. S6. Construct a multi-layer fabric structure model using the splicing method based on the interlacing relationship; S7. Determine whether the three-dimensional model constructed by the fabric needs to be colored. If it needs to be colored, set the color of each layer of warp yarn, weft yarn, and each strand of yarn, and then render the three-dimensional model constructed by the fabric based on OpenGL lighting rendering. If not, render the three-dimensional model constructed by the fabric directly based on OpenGL lighting rendering.
2. The fiber-scale fabric structure simulation method according to claim 1, characterized in that, S1 specifically includes: Based on the weave type of the woven fabric, the warp and weft points are extracted from the smallest repeat unit as control points for the single fiber curve. With every four consecutive control points P i ,P i+1 ,P i+2 ,P i+3 As a group, the curve segment between two adjacent control points is calculated using the Catmull-Rom spline curve formula; By connecting each curve segment in sequence, a continuous smooth spline curve passing through all control points is constructed to obtain the fitted spatial interlacing path of the warp or weft yarns. By adjusting the control point spacing and interpolation density, the smoothness of the curve is optimized, and a single-fiber curve model is obtained.
3. The fiber-scale fabric structure simulation method according to claim 1, characterized in that, S2 include: Based on the current yarn type, determine whether the current yarn layer is an untwisted fiber bundle; If it is an untwisted fiber bundle, the fiber bundle model is obtained by applying isotropic random displacement within a preset range, with the single fiber curve as the center line and the three-dimensional morphological modeling method based on uniform random shaking. If it is a twisted fiber bundle, then based on polar coordinate offset and phase difference control, a spiral twist is applied to the single fiber curve to generate a spiral twisted shape, and a hollow structure is formed by adjusting the distance between the fiber and the center line to obtain a single fiber bundle model. If the woven fabric consists of multiple fiber bundles, the individual fiber bundle models are combined to obtain the fiber bundle model.
4. The fiber-scale fabric structure simulation method according to claim 3, characterized in that, Based on polar coordinate offset and phase difference control, a helical twist is applied to the single fiber curve to generate a helical twisted shape. A hollow structure is formed by adjusting the distance between the fiber and the centerline, resulting in a single fiber bundle model, including: Using the single fiber curve as the reference yarn centerline, calculate the local coordinate system of any point on the centerline to obtain the normal vector N and the sub-normal vector B, and construct a cross-sectional plane perpendicular to the yarn axis. Within the cross-sectional plane, the offset of the fiber surface points is calculated based on the polar coordinate to Cartesian coordinate transformation relationship: in, This describes the offset distance of a fiber surface point in the X-axis direction within a cross-sectional plane perpendicular to the yarn axis. This describes the offset of a fiber surface point in the Y-axis direction within a cross-sectional plane perpendicular to the yarn axis. This indicates that the offset only occurs in a plane perpendicular to the axis; For radius parameter, Twist parameter; Using a stochastic phase model Assign an initial phase angle to each fiber, calculate the spatial coordinates of the j-th fiber at position t, and obtain the twisted fiber bundle model: in, These are the coordinates of the centerline trajectory of the yarn. Let be the distance from the j-th fiber to the centerline, k be the helical parameter, t be the position parameter, N be the normal vector, and B be the binormal vector. Based on the rotation angle.
5. The fiber-scale fabric structure simulation method according to claim 4, characterized in that, Combining individual fiber bundle models yields a fiber bundle model, including: Using the yarn space curve C(s) as the central axis, a Frenet frame that varies with the axis is constructed based on the arc length parameter s. For the i-th strand, the spatial position is: Where R is the radius of the strand from the central axis, L is the lead of the helix, T(s) is the unit tangent vector, N(s) is the normal vector, and B(s) is the binormal vector; Let be the initial phase angle of the i-th line; Each strand is wrapped with a fiber shell, with the spatial curve P of each strand. i (s) represents the new centerline. Construct the corresponding Frenet frame. The path of the k-th attached fiber in the fiber shell can be represented as: in, For the conductance of the fiber, This represents the initial phase of the fiber; By adjusting r and By controlling the tightness of fiber wrapping and the fineness of surface texture, a multi-fiber bundle model is obtained.
6. The fiber-scale fabric structure simulation method according to claim 1, characterized in that, S4 include: Using the spiral space curve of the yarn backbone as a carrier, the breakpoints on the spiral curve are selected as the attachment points of hair by random sampling with equal probability, and the number of breakpoints on a unit length of yarn is controlled by the hair index. At the breakpoint, a local coordinate system is constructed based on the tangent vector, normal vector, and binormal vector. The direction of the tangent vector is determined by normalizing the vector difference between adjacent points. When the magnitude of the normal vector approaches zero, the direction is switched to the vertical. The branch length is determined according to the feather type, and a branch curve containing multiple control points is generated by using a corresponding uniformly distributed branch length in a parametric recursive manner. A gradual random perturbation is applied to the branch curve, and a sinusoidal modulation function is used to achieve a smooth transition of the perturbation; Control the direction of the feathers according to the finishing type; The generated hair-like structure is superimposed onto the fiber bundle model to obtain the branched fiber bundle model.
7. The fiber-scale fabric structure simulation method according to claim 1, characterized in that, The generated 3D model of the woven fabric is rendered using OpenGL lighting rendering, including: The Phong reflection model is used to decompose the reflected light from the fabric surface into three components: ambient light, diffuse reflection, and specular reflection for illumination calculation. The corresponding illumination coefficient and specular index are configured according to the surface characteristics of the woven fabric. Each fiber is modeled as a continuously stretched generalized cylinder. The cross-section of the fiber is switched between circular, triangular, and strip-shaped according to the simulation requirements, and the circular cross-section is discretized by circumferential uniform sampling. The fiber surface normal vector is calculated by per-vertex normal interpolation, and the vertex normal is obtained by area-weighted averaging of adjacent prism faces to complete the smooth coloring of the fiber surface. It adopts a GPU-first hybrid rendering pipeline, uses Vertex Buffer Objects (VBOs) and Index Buffer Objects (EBOs) to organize vertex and mesh data in batches, and automatically falls back to CPU immediate mode rendering when the GPU is unavailable. By configuring a fixed-direction top light source and adjusting the light source attenuation factor to simulate the spatial attenuation of light, a highly realistic visualization rendering output of the 3D model of the woven fabric is achieved.
8. The fiber-scale fabric structure simulation method according to claim 1, characterized in that, The joining methods include: inner warp joining method, outer warp joining method, combined joining method, warp joining method, and weft joining method.
9. A fiber-scale fabric structure simulation system, characterized in that, include: The single-fiber modeling module is used to extract the warp and weft points in the minimum cycle based on the interlacing points of the fabric structure, and to construct a single-fiber curve model using Catmull-Rom spline curves. The fiber bundle modeling module is used to construct a fiber bundle model based on the single fiber curve model according to the current layer yarn type. The branch processing module is used to establish a hair generation mechanism based on the branch breakpoint, branch length, and disturbance amplitude parameters when the fabric needs to add branches. The hair generation mechanism is then superimposed on the fiber bundle model to obtain a branched fiber bundle model. A multi-layer processing module is used to construct a multi-layer fabric structure model based on the interlacing relationship using a splicing method when the fabric has a multi-layer structure. The first rendering module is used to set the color of each layer of warp yarn, weft yarn, and each strand of yarn when the three-dimensional model of the fabric needs to be colored. The second rendering module is used to render the three-dimensional model of the fabric based on OpenGL lighting rendering when the fabric does not need to be dyed or after the dyeing process is completed.
