A digital ceramic throwing and glazing interactive method and system
Patent Information
- Application Number
- CN202610845822.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2046-06-12
AI Technical Summary
[0004]本发明的目的在于提供一种数字陶瓷拉坯与上釉交互方法及系统,以解决上述背景技术中提到的现有的手势坐标到几何形变参数的精确映射问题、实时大规模顶点计算的性能瓶颈、手势有效性的可靠判断问题、手势端与触摸屏端的双端实时协同渲染等问题
[0015]由上述技术方案可知,本发明与现有技术相比至少具备以下优点和积极效果:通过线性归一化将毫米级物理坐标转换为世界坐标,并引入灵敏度系数,使感应范围内的手势稳定、可控地驱动径向形变,消除物理坐标直接驱动造成的幅度失控。采用向量化批量运算代替逐顶点循环,使数千个顶点的高斯加权形变与上釉计算可在单帧时间内完成,保障实时渲染流畅无卡顿。通过手部存在性与角速度门限的双重过滤,有效屏蔽感应区边界抖动噪声和系统静止时的误触发,显著提高手势识别的可靠性。设置最小半径下限防止网格几何自交,设置最大拉伸上限防止过度变形,确保虚拟陶坯在任意手势驱动下保持合理的几何形态。手势端专注三维空间形变,触摸屏端专注颜色选取与纹样贴附,两端在单一帧循环内独立处理各自数据流,实现了手势拉坯与触摸上釉的双端实时协同;支持传统纹样的独立叠加,每层纹样参数可调;实现成品图像的自动化采集与远程传输,支持展览现场多终端联动显示,形成完整的互动装置闭环。
Smart Images

Figure CN122387326B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of human-computer interaction technology, specifically to a digital ceramic throwing and glazing interaction method and system. Background Technology
[0002] In traditional ceramic production, throwing and glazing rely on manual operations, which have high technical barriers and material costs, making it difficult to offer interactive experiences to the general public. Existing digital ceramic interaction solutions mainly fall into two categories: The first is a two-dimensional operation solution based on a touchscreen or mouse, where users control the deformation and coloring of a virtual ceramic blank through two-dimensional input methods such as swiping and clicking. This type of interaction lacks a three-dimensional spatial sense and immersive experience, making it difficult to simulate the spatial movements of the hands during real throwing. The second type is a full-body motion capture solution based on depth cameras, such as using devices like Kinect to track user body movements. While this type of solution achieves contactless interaction, its hand recognition granularity is relatively coarse, lacking sufficient resolution for fine movements and unable to achieve precise control of radial deformation down to the centimeter level, thus limiting the delicacy of the thrown shapes.
[0003] TouchDesigner, as a real-time interactive visual programming platform, supports Python scripts to modify the vertex coordinates of 3D meshes frame by frame in its Script SOP. It also integrates Leap Motion CHOP with native gesture sensor data, providing a strong foundation for technical integration. The Leap Motion sensor can track the 3D coordinates of the palm with sub-millimeter precision at 120fps within the sensing space, making it suitable for gesture interaction scenarios requiring precise spatial positioning. However, directly using its physical coordinates for virtual geometry deformation control still presents the following technical challenges: Leap Motion outputs millimeter-level absolute physical coordinates, while the radial deformation of the virtual cylinder requires a normalized relative displacement; directly using physical coordinates to drive deformation leads to uncontrollable deformation amplitude, and differences in user gesture habits cannot be adjusted using uniform parameters. The virtual ceramic blank's mesh has thousands of vertices, requiring Gaussian weighted radial offset calculations for all vertices each frame; using Python's vertex-by-vertex loop under 60fps real-time rendering constraints will cause a frame rate drop and noticeable stuttering. The Leap Motion sensing area suffers from boundary noise, causing coordinate jitter or abrupt changes when a hand enters or exits the boundary. Directly driving deformation without filtering will produce undesirable geometrical abrupt effects, impacting user experience stability. When the cylinder's vertices are compressed inwards beyond the critical radius of geometric self-intersection, mesh interpenetration deformation occurs; when stretched outwards beyond a reasonable proportion, visual distortion occurs. The wheel-throwing function is driven by the gesture input, while glazing and pattern application are driven by the touchscreen. Both input inputs must synchronously process their respective data streams within the same frame loop, resulting in high complexity in coordinating data stream isolation and intra-frame state maintenance. Summary of the Invention
[0004] The purpose of this invention is to provide a digital ceramic throwing and glazing interaction method and system to solve the problems mentioned in the background art, such as the accurate mapping of gesture coordinates to geometric deformation parameters, the performance bottleneck of real-time large-scale vertex calculation, the reliable judgment of gesture validity, and the real-time collaborative rendering between the gesture terminal and the touch screen terminal.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: According to one aspect of the present invention, a digital ceramic throwing and glazing interactive method is provided, the method comprising: Real-time acquisition of hand motion data, including three-dimensional position coordinates and angular velocity, and dual validity judgment based on hand presence and angular velocity threshold; if valid, the gesture parameters of the current frame are used for subsequent deformation calculation; otherwise, the gesture parameters are not updated and the geometric state of the previous frame is maintained. The horizontal displacement of the effective gesture is converted into a radial offset, and the vertical displacement is mapped to the longitudinal position of the 3D model. Centered on the longitudinal action position, the deformation influence weight of each vertex of the three-dimensional model is calculated based on the longitudinal distance. The radial scaling factor is determined by combining the radial offset and the preset intensity coefficient. The radial radius of the vertex is bidirectionally constrained by the preset minimum radius lower limit and maximum stretching upper limit. All vertex coordinates are updated by vectorized batch operation. In response to a drawing operation on the touch panel, the touch position is obtained and mapped to the vertical drawing position of the 3D model. The drawing influence weight of each vertex is calculated based on the vertical drawing position. The target color is determined according to the current drawing mode. The color data is cumulatively mixed with the original vertex color according to the drawing influence weight and the preset mixing intensity, and the updated color data is stored. The system receives the pattern and adjustable parameters selected by the user, generates multiple layers of patterns through multiple graphics rendering units, adaptively tiles them according to the UV coordinates corresponding to the model surface, and composites them onto the already colored model surface to generate a complete texture map. The final rendered image is then generated based on the complete texture map. The final rendered image is saved and transmitted over the network to a designated server.
[0006] Based on the aforementioned scheme, the dual validity judgment based on the presence of the hand and the angular velocity threshold includes: when the number of detected hands is greater than zero and the absolute value of the angular velocity exceeds the preset velocity threshold, the gesture in the current frame is determined to be valid; otherwise, it is determined to be invalid, and the deformation calculation of the current frame is frozen to maintain the geometric state of the previous frame.
[0007] Based on the aforementioned scheme, the conversion of the horizontal displacement of the effective gesture into a radial offset includes: clamping the horizontal coordinates of the palm according to the sensing interval and normalizing them to the [0,1] interval, then converting them into a symmetrical offset, and multiplying them by the sensitivity coefficient; The process of mapping vertical displacement to the longitudinal position of the three-dimensional model includes: clamping the vertical coordinates of the palm according to the sensing interval and normalizing them to the [0,1] interval, and then linearly mapping them to the height range of the model.
[0008] Based on the aforementioned scheme, the deformation influence weight is calculated using a power-law attenuation formula: Deformation influence weight = max(0, 1 - (longitudinal distance / longitudinal influence radius)^attenuation exponent) The longitudinal influence radius and attenuation index are configurable parameters. The radial radius increment is determined by the product of the radial offset, the global deformation intensity coefficient, and the deformation influence weight.
[0009] Based on the aforementioned scheme, the bidirectional constraints include: a lower bound constraint that the radial radius is not less than the larger of the minimum radius limit and the initial radius minus the maximum stretching distance, and an upper bound constraint that the radial radius does not exceed the sum of the initial radius and the maximum stretching distance; wherein, the maximum stretching distance is determined according to the product of a preset stretching ratio and the model height range.
[0010] Based on the aforementioned scheme, the influence weights are calculated using a power-law decay formula: Drawing influence weight = max(0, 1 - (|vertex Y coordinate - vertical drawing position| / vertical influence radius of stroke)^attenuation exponent) The formula for calculating the cumulative mixing is: New color = Original color × (1 - Blend intensity × Rendering influence weight) + Target color × (Blend intensity × Rendering influence weight) The mixing intensity is a configurable parameter.
[0011] Based on the aforementioned scheme, the adjustable parameters include pattern density, pattern size, and pattern aspect ratio; the adaptive tiling includes: dynamically calculating the number of complete patterns that can be arranged in each row and the periodic width based on the pattern reference width and spacing coefficient, performing periodic folding and transparent interval clipping on the UV coordinates, and sampling the pattern pattern after mapping the local coordinates of the visible area to standard texture coordinates.
[0012] Based on the aforementioned scheme, the synthesis onto the already colored model surface adopts a transparency-pre-overlay blending method to sequentially superimpose multiple layers of textures; the complete texture is used as the base color texture input based on physically rendered materials, and lighting calculations are performed in combination with normal maps, roughness maps, and parallax maps.
[0013] Based on the aforementioned scheme, saving the final rendered image and transmitting it to a designated server via the network includes: starting a countdown after entering the confirmation page; responding to the user's sending operation or the countdown reaching zero; forcibly refreshing the rendering target and saving it as an image file; sending the image data to a preset server address via the TCP protocol; resetting the geometry, color buffer, pattern layer, and interaction markers after sending; and returning to the standby page.
[0014] According to another aspect of the present invention, a digital ceramic throwing and glazing interactive system is provided, the system comprising: The gesture acquisition module is used to collect hand motion data in real time, including three-dimensional position coordinates and angular velocity. It makes a validity judgment based on the presence of the hand and the angular velocity threshold. If the judgment is valid, the gesture parameters of the current frame are used for subsequent deformation calculation; otherwise, the gesture parameters are not updated and the geometric state of the previous frame is maintained. The coordinate mapping module is used to convert the horizontal displacement of an effective gesture into a radial offset and to map the vertical displacement into the longitudinal position of the 3D model. The geometric deformation module is used to calculate the deformation influence weight of each vertex of the three-dimensional model based on the longitudinal distance with the longitudinal action position as the center, determine the radial scaling factor by combining the radial offset and the preset intensity coefficient, and impose bidirectional constraints on the radial radius of the vertex by the preset minimum radius lower limit and maximum stretching upper limit, and update the coordinates of all vertices by vectorized batch operation. The color drawing module is used to respond to drawing operations on the touch panel, obtain the touch position and map it to the vertical drawing position of the model, calculate the drawing influence weight of each vertex based on the vertical drawing position, determine the target color according to the current drawing mode, and perform cumulative mixing with the original vertex color according to the drawing influence weight and preset mixing intensity, and store the updated color data. The pattern rendering module is used to receive the pattern selected by the user and the adjustable parameters of the pattern, generate multi-layer patterns through multiple graphics rendering units, adaptively tile them according to the UV coordinates corresponding to the model surface, and composite them onto the already colored model surface to generate a complete texture map. The final rendered image is generated based on the complete texture map. The output module is used to save the final rendered image and transmit it to a designated server via a network.
[0015] It can be known from the above technical solutions that compared with the prior art, the present invention has at least the following advantages and beneficial effects: millimeter-level physical coordinates are converted into world coordinates through linear normalization, and a sensitivity coefficient is introduced, so that gestures within the induction range can stably and controllably drive radial deformation, and the amplitude out of control caused by direct driving of physical coordinates is eliminated. Vectorized batch operation is used instead of vertex-by-vertex loop, so that Gaussian weighted deformation and glazing calculation of thousands of vertices can be completed within a single frame time, ensuring smooth real-time rendering without stuttering. Through the double filtering of hand existence and angular velocity threshold, the boundary jitter noise of the induction area and false triggering when the system is stationary are effectively shielded, and the reliability of gesture recognition is significantly improved. A minimum radius lower limit is set to prevent grid geometric self-intersection, and a maximum stretching upper limit is set to prevent excessive deformation, so as to ensure that the virtual ceramic body maintains a reasonable geometric shape under any gesture drive. The gesture end focuses on three-dimensional spatial deformation, and the touch screen end focuses on color selection and pattern attachment. Both ends process their respective data streams independently within a single frame cycle, realizing real-time dual-end collaboration of gesture throwing and touch glazing; independent superposition of traditional patterns is supported, and parameters of each layer of patterns can be adjusted; automatic collection and remote transmission of finished product images are realized, multi-terminal linked display at the exhibition site is supported, and a complete closed loop of interactive devices is formed.
[0016] It should be understood by the present invention that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. Description of Drawings
[0017] The drawings herein are incorporated into and constitute a part of the specification, show embodiments conforming to the present invention, and are used to explain the principle of the present invention together with the specification. Obviously, the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained from these drawings without creative effort. In the drawings: Figure 1 is a schematic diagram of a digital ceramic throwing and glazing interaction method according to the present invention; Figure 2 is a schematic flow diagram of gesture data acquisition and validity filtering of the present invention; Figure 3 is a schematic flow diagram of finished product collection and output of the present invention. Detailed Description of the Embodiments
[0018] To more clearly illustrate the purpose, technical solutions, and advantages of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein. On the contrary, these embodiments are provided so that the present invention will be more comprehensive and complete, and fully convey the concept of the exemplary embodiments to those skilled in the art.
[0019] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.
[0020] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0021] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0022] The present invention will now be described in detail with reference to specific embodiments.
[0023] Example 1
[0024] like Figure 1 As shown in the figure, this embodiment provides a digital ceramic throwing and glazing interaction method. The specific steps of the method are as follows: S1: Real-time acquisition of hand motion data, including three-dimensional position coordinates and angular velocity. Based on the presence of the hand and the angular velocity threshold, a dual validity judgment is made. If the judgment is valid, the gesture parameters of the current frame are updated; otherwise, the geometric state of the previous frame is maintained.
[0025] In this embodiment, as Figure 2As shown, the user's hand motion data is stably and reliably acquired from the Leap Motion sensor, and invalid signals caused by the hand entering or leaving the boundary of the sensing area or static shaking are removed through a dual validity judgment mechanism to ensure that only real and intentional throwing actions can drive the virtual ceramic blank to deform.
[0026] Upon system startup, the TouchDesigner project loads all operator nodes. The Leap Motion sensor connects to the host via USB, and its accompanying driver (Ultraleap driver) runs at a sampling frequency of 120 frames per second. The sensor performs continuous optical scanning of the sensing space (horizontal ±150mm, vertical 100mm~350mm) using an infrared emitter and receiver array to complete hand skeleton recognition and 3D coordinate calculation. The Leap MotionCHOP node built into TouchDesigner subscribes to the tracking data stream pushed by the driver through the local SDK. During the cook (calculation refresh) phase of each frame, this CHOP node reads the latest hand tracking results and converts them into multi-channel signal outputs, including: The `hands` channel represents the number of hands detected within the current sensing area. In this embodiment, the data from `hand0` is read (assuming the user interacts with only one hand). The `hands` channel determines whether a hand is present (`hands > 0.5` is valid). Then, `hand0 / palm:tx` and `hand0 / palm:ty` are obtained as hand position parameters. The `angular_velocity` channel represents the instantaneous angular velocity of the hand around its three axes (in degrees per second). Specifically, the `hand0 / palm:tx` channel represents the absolute X-axis coordinate of the hand's center (in millimeters); the `hand0 / palm:ty` channel represents the absolute Y-axis coordinate of the hand's center (in millimeters); and the `hand0 / palm:tz` channel represents the absolute Z-axis coordinate of the hand's center (in millimeters), i.e., the distance between the hand and the sensor. This constitutes the complete three-dimensional position coordinates (tx, ty, tz). While the `tz` channel is not directly used for deformation driving, it serves as an auxiliary reference in hand validity determination and, together with the other two axes, defines the complete three-dimensional pose of the hand in the sensing space.
[0027] The presence of a hand is the first level of filtering for gesture validity. Within each frame cycle, the `hands` channel value output by the LeapMotion CHOP is read first. If this value is greater than 0.5 (meaning at least one hand is detected), a valid hand is determined to exist within the current sensing area, and subsequent coordinate data can be passed downstream. If the value is equal to 0 (no hand detected), a hand is considered missing. When a hand is missing, a coordinate freeze strategy is implemented, without updating any deformation or shading parameters. The geometric deformation and color rendering calculations for this frame are skipped, and all vertex positions and colors retain the final state of the previous frame. Specifically, the CHOP execution scripts (chopexec2 and chopexec3) monitor the original coordinates of the X and Y axes respectively. If the original coordinates are zero, the write operation to the buffer is skipped, allowing the deformation module to continue using the previously recorded valid hand coordinates (left_x, left_y). This strategy effectively avoids geometrical abrupt changes or flickering caused by a hand briefly moving out of the sensing area.
[0028] Angular velocity thresholding serves as the second level of filtering for gesture validity. Even if a hand is present, the user may unconsciously hover their hand within the sensing area, causing slight tremors. Such tremors should not cause deformation of the ceramic blank; therefore, an angular velocity threshold is introduced as a second level of validity assessment. Specifically, the CHOP execution script (chopexec1) reads the angular_velocity channel output by LeapMotion CHOP in each frame's callback function, reads the angular velocity channel value, takes its absolute value, and writes this absolute value to the first channel of the dedicated constant node consangular_velocity_abs. Before execution, the Deformation Main Script (ScriptSOP) reads the absolute angular velocity value and compares it with the preset velocity threshold DEFORMATION_SPEED_THRESHOLD (default value: 10 degrees / second, which can be adjusted via the config.json file): if the absolute angular velocity is greater than or equal to the threshold value, it means that the user is performing an intentional and sufficiently fast rotation or movement gesture, and the deformation is determined to be valid. In this frame, the radial deformation calculation in steps S2-S3 is performed with the full deformation intensity parameters; if the absolute angular velocity is less than the threshold value, it means that the hand is in a stationary or slightly trembling state, and the deformation is determined to be invalid. The deformation increment in this frame will be reduced to a very small value (for example, the offset is multiplied by a coefficient close to 0, or the deformation calculation is skipped directly), thereby filtering out unintentional false triggers.
[0029] The hand coordinates (tx, ty) of the current frame are only passed to the normalization mapping module when the hand is present (hands > 0.5) and the angular velocity exceeds the threshold; otherwise, the gesture parameters are not updated, and the geometric state of the previous frame is maintained. The first-level filter is responsible for excluding invalid frames caused by missing or occluded hands, while the second-level filter is responsible for filtering out minor drifts and vibration noise when the hand is stationary. The two work together to significantly improve the stability and anti-interference capability of gesture interaction.
[0030] When a hand briefly moves out of the sensing area, triggering a coordinate freeze, the `hands` channel is continuously monitored. Once the hand re-enters the sensing area, the `hands` channel returns to a positive value in the next sampling frame. At this point, the Leap Motion CHOP immediately outputs the new hand coordinates, and the CHOP executes a script to write the valid coordinates back to the buffer register. The deformation module automatically resumes its response to the user's gestures. This automatic recovery process after hand loss requires no user intervention or manual reset and is completely transparent to the user, with no perceptible interruption in the user experience.
[0031] S2: Convert the horizontal displacement of the effective gesture into a radial offset, and map the vertical displacement to the longitudinal position of the 3D model.
[0032] The horizontal and vertical coordinates (raw_x, raw_y) of the hand, after validity filtering, are converted into radial deformation parameters recognizable by the virtual ceramic blank (cylindrical mesh): horizontal offset (driving radial expansion or contraction) and longitudinal action position (determining the height range in which deformation occurs). The mapping process employs a linear normalization algorithm and introduces a superboundary clamping and sensitivity adjustment mechanism to eliminate unit and amplitude differences between physical coordinates and virtual space. In this embodiment, the three-dimensional model refers to the virtual ceramic blank (hereinafter referred to as ceramic blank or cylinder) composed of a cylindrical mesh, and the longitudinal action position refers to the world height coordinates (world_y) obtained after normalizing and mapping the vertical coordinates of the gesture or touch point, used to determine the center of action of deformation or coloring along the height direction of the model.
[0033] First, boundary checks and out-of-bounds clamping are performed on the original hand coordinates to ensure the numerical stability of the mapping results. In this embodiment, based on the nominal sensing range of the LeapMotion sensor, the effective range of the X-axis is LEAP_X_MIN=-150mm, LEAP_X_MAX=+150mm; the effective range of the Y-axis is LEAP_Y_MIN=100mm, LEAP_Y_MAX=350mm.
[0034] If raw_x < LEAP_X_MIN, then raw_x = LEAP_X_MIN; if raw_x > LEAP_X_MAX, then raw_x = LEAP_X_MAX. The same clamping process applies to the Y-axis. This clamping processing ensures that even if the gesture briefly crosses the sensing boundary, the normalization result is still restricted within the interval [0,1], and an abnormal deformation control amount will not be generated.
[0035] Further, the X-axis is processed. The X-axis coordinate represents the displacement of the palm in the horizontal direction (left-right direction), which is used to control the direction and amplitude of the radial deformation of the clay body: moving the palm to the right drives the clay body to expand outward (radial enlargement), and moving the palm to the left drives the clay body to contract inward (radial compression). First, the clamped raw_x is linearly mapped to the interval [0,1], and the normalized horizontal palm position norm_x is: norm_x=(raw_x-LEAP_X_MIN) / (LEAP_X_MAX-LEAP_X_MIN) Substituting the parameters gives: norm_x=(raw_x+150) / 300 norm_x=0 corresponds to the leftmost end (-150mm), 0.5 corresponds to the center position (0mm), and 1 corresponds to the rightmost end (+150mm). To obtain a symmetric offset (with the center at 0, negative to the left, and positive to the right), a transformation is performed, and the original symmetric offset obtained after centering norm_x is: offset_raw=(norm_x-0.5)×2; at this time, the range of offset_raw is [-1,+1]. A sensitivity coefficient MOUSE_SENSITIVITY (default value 0.5, adjustable via config.json) is further introduced to obtain the final radial offset: offset=offset_raw×MOUSE_SENSITIVITY That is: offset=(norm_x-0.5)×2×MOUSE_SENSITIVITY MOUSE_SENSITIVITY determines the mapping ratio between gesture displacement and deformation amplitude; a larger value results in a more sensitive deformation response. After this mapping, the actual value range of offset is approximately [-0.5,+0.5] (when the sensitivity is 0.5), a positive value indicates outward expansion, and a negative value indicates inward contraction.
[0036] Further, the Y-axis is processed. The Y-axis coordinate represents the height of the palm relative to the sensor (the vertical distance from the sensor), which is used to determine the action position of the current gesture on the longitudinal direction of the clay body, so that the deformation or coloring operation is concentrated near the height indicated by the hand. The clamped raw_y is linearly mapped to the interval [0,1], and the normalized palm height is: norm_y=(raw_y-LEAP_Y_MIN) / (LEAP_Y_MAX-LEAP_Y_MIN) Substituting the parameters, we get: norm_y = (raw_y - 100) / 250 norm_y=0 corresponds to the lowest height (100mm), and 1 corresponds to the highest height (350mm).
[0037] To align with the world coordinate system of the virtual cylinder (bottom Y=-1.0, top Y=+1.0, span 2.0), a linear mapping is performed using the cylinder's world coordinate height range CYLINDER_HEIGHT_RANGE (default value 2.0): world_y=norm_y×CYLINDER_HEIGHT_RANGE-1.0 That is: world_y = norm_y × 2.0 - 1.0 Where world_y is the world coordinate height value of the cylinder. When norm_y=0, world_y=-1.0 (bottom of the ceramic blank); when norm_y=1, world_y=+1.0 (top of the ceramic blank). world_y will be used as the center point of the Gaussian weight distribution in the deformation calculation in step S3, and as the vertical reference for color drawing in step S4.
[0038] For the Z-axis, this system adopts a polar coordinate deformation model and does not perform independent mapping on the Z-axis (the direction of hand depth). The horizontal position of each vertex in the virtual cylindrical mesh is determined by the radial radius r and the azimuth angle θ. During deformation calculation, the radial expansion or contraction driven by the gesture is applied uniformly to all azimuth angles of the current world_y height section, that is, on the same height circumference, all vertices share the same radial change. The new Z-coordinate after deformation is automatically calculated by the new radius new_radius and the original azimuth angle through trigonometric functions: z_new = new_radius × sin(θ); where θ = arctan2(z_initial, x_initial) is fixed during initialization. Therefore, the Z-axis does not require independent normalization mapping, so that the throwing effect presents an axisymmetric natural shape, which conforms to the physical behavior of real pottery blanks under uniform hand pressure.
[0039] The key parameters involved in the above mapping process are all managed through an external configuration file, config.json, allowing for adaptation to different user habits or display environment needs without modifying the source code. Upon system startup, the config.json file is read, and the parameter values are synchronized to the corresponding constant CHOP nodes for use by the normalization module. Users can adjust the interaction sensitivity and sensing range on-site by modifying the configuration file without restarting the program or recompiling.
[0040] After the above calculations are completed, offset and world_y are passed as two floating-point parameters to the real-time geometric deformation calculation module (Script SOP) in step S3. Offset determines the direction (positive / negative) and basic amplitude of the deformation, while world_y determines the center height of the deformation-affected area. The two parameters are updated once in each valid frame and, together with the vertex data, drive the radial deformation of the ceramic blank.
[0041] S3: Taking the longitudinal action position as the center, calculate the influence weight of each vertex of the three-dimensional model according to the longitudinal distance, determine the radial deformation ratio by combining the radial offset and the preset intensity coefficient, and impose bidirectional constraints on the radial radius of the vertex by the preset minimum radius and maximum stretch ratio, and update the coordinates of all vertices by vectorized batch operation.
[0042] Using the offset and world height coordinates world_y generated in step S2, perform real-time radial deformation calculations on all vertices of the virtual ceramic blank (cylindrical mesh).
[0043] Upon system startup, a 3D cylindrical mesh is generated by the Tube SOP node, with a resolution of 32 rows (height direction) × 32 columns (circumferential direction), totaling approximately 1024 vertices. Each vertex contains initial Cartesian coordinates (x, y, z), where the y coordinate ranges from [-1.0, +1.0] (from bottom to top), and the x and z coordinates form a circle on the horizontal cross-section. During the first frame, the Script SOP's initialization callback function performs preprocessing, including: traversing all vertices and calculating the initial radial radius r_initial = √(x² + z²) based on their initial x and z coordinates; storing r_initial in the array initial_radii as the reference radius for that vertex, which remains unchanged in all subsequent frames; calculating the fixed azimuth angle θ = atan2(z, x) for each vertex; and calculating the global maximum stretch distance. MAX_STRETCH_DISTANCE=MAX_STRETCH_RATIO×CYLINDER_HEIGHT_RANGE MAX_STRETCH_RATIO is the maximum stretch ratio, a preset constant (default value 0.35), representing the maximum ratio of radial stretch to the initial radius. CYLINDER_HEIGHT_RANGE is the model height range, with a default value of 2.0.
[0044] Furthermore, after obtaining a valid world_y for each frame, the deformation impact weight calculation stage begins. To avoid the performance bottleneck caused by per-vertex looping, NumPy vectorized array operations are used to calculate the weights for all vertices simultaneously. The Y coordinates of all vertices are extracted from the current mesh, forming a column vector vertex_y (length 1024). The longitudinal distance between each vertex and the gesture's center is calculated: dy=|vertex_y-world_y| Where vertex_y represents an array of the current Y coordinates of all vertices in the cylindrical mesh; world_y is a scalar, which is subtracted from this array via a broadcast mechanism to obtain a difference array equal to the number of vertices. The deformation influence weight of each vertex is calculated using the Gaussian decay (power decay) formula: weight=max(0,1-(dy / INFLUENCE_RADIUS)^FALLOFF_POWER) In the formula, INFLUENCE_RADIUS is the vertical influence radius (in world coordinates), with a default value of 0.40. When dy ≥ INFLUENCE_RADIUS, the weight is zero, indicating that the vertex is not affected by the current gesture. FALLOFF_POWER is the decay exponent, with a default value of 2. The larger the exponent, the slower the weight decays near the center and the faster it decays near the edge, resulting in a clearer boundary of the deformation region; the smaller the exponent, the more uniform the weight decay and the smoother the transition. Each element in the weight array weight ranges from [0,1], with a weight of 1 at the center (dy=0) and smoothly decreasing to 0 at the edges.
[0045] After obtaining the offset and weight array, calculate the radial scaling factor for each vertex in the current frame. The scaling factor is defined as: scale_factor=1+offset×DEFORMATION_STRENGTH×weight DEFORMATION_STRENGTH is the global deformation intensity coefficient, with a default value of 0.02. This coefficient controls the maximum deviation of the scaling factor from 1, preventing excessive deformation jumps caused by rapid gestures. offset is the gesture offset obtained by normalizing the X-axis (radial offset in step S2). The sign of offset determines the deformation direction; a positive value makes the scaling factor greater than 1 (outward expansion), and a negative value makes the scaling factor less than 1 (inward contraction).
[0046] Multiply the radial radius of the current vertex by the scaling factor to obtain a temporary new radius: temp_radius=current_radius×scale_factor To prevent geometric distortion (overstretching leading to shape distortion) or physical errors (overcompression leading to mesh self-intersection), the system performs a two-way clamp on the updated radius. Lower and upper bound constraints are applied to the temporary new radius, with the constraint formulas as follows: new_radius=clamp(temp_radius,lower_bound,upper_bound) Among them, upper_bound is an upper bound constraint that limits the radial radius to no more than the sum of the initial radius and the maximum stretch distance, preventing excessive expansion from causing shape distortion; upper_bound=initial_radius+MAX_STRETCH_DISTANCE lower_bound is the lower bound constraint, which is the larger of the minimum radius limit and the initial radius minus the maximum stretch distance: lower_bound=max(MIN_RADIUS_LIMIT,initial_radius-MAX_STRETCH_DISTANCE) MIN_RADIUS_LIMIT is the minimum radius limit, with a default value of 0.10 (world coordinate units); it prevents vertices from compressing inwards and crossing the center of the circle, thus preventing mesh self-intersection. initial_radius-MAX_STRETCH_DISTANCE limits the inward contraction to no more than the maximum stretch distance, avoiding excessive concavity in one direction. Taking the larger value of both ensures that a reasonable geometric shape can be maintained even with a small initial radius.
[0047] This clamping operation is completed in one step using NumPy's clip function, without vertex-by-vertex branching, resulting in high performance.
[0048] The cylindrical mesh uses polar coordinates, where the horizontal position of each vertex is uniquely determined by its radial radius r and fixed azimuth angle θ. During deformation, θ remains unchanged, only r is updated. After calculating new_radius, it is restored to Cartesian coordinates (x, z) and written back to the vertex buffer. The fixed azimuth angle θ (in radians) of each vertex is obtained from the array stored during initialization; the new coordinates are calculated in batches using trigonometric functions. x_new = new_radius × cos(θ) z_new = new_radius × sin(θ) The array is vectorized using NumPy's `np.cos` and `np.sin` operations, producing a result array with the same number of vertices. `x_new` and `z_new` are combined with the unchanged y-coordinates (vertex_y) of the current frame, and the positions of all vertices are written back at once using the point position setting interface provided by ScriptSOP. This write-back operation is performed at the end of TouchDesigner's cook cycle, and the new positions will take effect in the next frame's rendering.
[0049] The `new_radius` and updated vertex positions output in this step will serve as the geometric state of the current frame, used for color drawing in subsequent step S4 (geometric positions and colors are calculated independently within the same frame) and the final rendering output; the deformed vertex radius will serve as the input for the `current_radius` of the next frame, achieving a continuous deformation effect accumulated over multiple frames. If step S1 determines that the gesture is invalid, step S3 is skipped, `current_radius` remains in the state of the previous frame, and the clay body undergoes no deformation.
[0050] S4: In response to the drawing operation on the touch panel, obtain the touch position and map it to the vertical drawing position of the 3D model, calculate the drawing influence weight of each vertex based on the vertical drawing position, determine the target color according to the current drawing mode, and perform cumulative mixing with the original color of the vertex according to the drawing influence weight and the preset mixing intensity, and store the updated color data.
[0051] Responding to user touch or drag operations on the main display screen, the system applies the user-selected brush color to the virtual ceramic blank surface in a gradual and natural manner, simulating the smearing and coloring effect in ceramic glazing. It also supports an eraser mode to gradually restore the colored areas to the base color. The color drawing module and the deformation module execute independently and in parallel within the same frame cycle, without interfering with each other, ensuring that users can perform throwing and glazing operations simultaneously or alternately.
[0052] Touch events on the main display screen are received through TouchDesigner's built-in interactive panel nodes (e.g., interact_ui2 / panel1). This node outputs key channels within each frame cycle, including: the select channel (a boolean value > 0.5 indicating the touchscreen was pressed or dragged, otherwise 0); and the ty channel (the normalized Y-coordinate of the touch point on the screen, ranging from [0,1], where 0 corresponds to the bottom of the screen and 1 corresponds to the top). The color rendering module reads these two channels at the beginning of each frame. If select > 0.5, a valid touch rendering operation is determined for the current frame, and subsequent weight calculation and color blending processes are initiated; if select ≤ 0.5, the color update for this frame is skipped, and the vertex color buffer remains unchanged.
[0053] To determine the vertical position of the touch drawing operation on the ceramic blank, the normalized Y-coordinate ty of the touch point is mapped to the cylindrical world coordinates target_y. This coordinate represents the vertical drawing position of the operation on the model surface. The mapping formula is: target_y=ty×CYLINDER_HEIGHT_RANGE-1.0 Where CYLINDER_HEIGHT_RANGE is the height range parameter of the cylinder; ty=0 (bottom of the screen) is mapped to target_y=-1.0 (bottom of the ceramic blank), and ty=1 (top of the screen) is mapped to target_y=+1.0 (top of the ceramic blank); target_y will be used as the center height for calculating the stroke weight.
[0054] To simulate the natural diffusion effect of paint glaze, with a darker center and lighter edges, a Gaussian decay weight based on vertical distance is calculated for each vertex, centered at target_y. This weight is used to calculate the rendering influence weight. A power-law decay formula is employed. weight_paint=max(0,1-(|vertex.y-target_y| / INFLUENCE_RADIUS)^FALLOFF_POWER) In the formula, vertex.y is the Y-coordinate of the current vertex in the world coordinate system (range [-1, +1]); INFLUENCE_RADIUS is the vertical influence radius of the stroke, with a default value of 0.20 (world coordinate units). This radius is approximately 10% of the total height of the clay body (2.0), making the stroke width moderate, allowing for detailed drawing of local patterns without being too narrow; when |vertex.y - target_y| ≥ INFLUENCE_RADIUS, the weight is clamped to 0, and the vertex does not participate in this drawing. FALLOFF_POWER is the attenuation index, with a default value of 3.0; compared to the attenuation index (2.0) in the deformation module, this value is larger, making the stroke edges decay faster and the boundaries clearer, simulating the hard edge feel of a real brush or paintbrush; users can adjust this parameter through the configuration file to obtain a soft or sharp stroke effect. The weight array is calculated in batches using NumPy vectorization, without needing to loop through each vertex.
[0055] Brush mode and eraser mode are provided, which are controlled by the user through the toggle button on the iPad touch screen P3 page; the mode status is passed to the color drawing module through the tool channel of a Constant CHOP. (1) When tool=0, it is brush mode. The target color brush_color is taken from the current RGB value selected by the user on the iPad P3 page; the P3 page provides 9 preset color buttons and HSV color palettes. After the color is selected, the value0 channel of the three Slider CHOPs (slider_r, slider_g, slider_b) is updated in real time; the color drawing module reads these values every frame to obtain RGB triplet, and the range of each component is [0,1]. (2) When tool=1, it is eraser mode. The target color is replaced with the background color BASE_COLOR, the default value is (0.70,0.70, 0.70), which corresponds to the unglazed bisque background color; the eraser mode uses the same blending logic as the brush to gradually restore the colored area, without writing additional branch code, ensuring the simplicity and consistency of the code.
[0056] For each vertex, the color update formula is as follows: new_color=old_color×(1-PAINT_STRENGTH×weight_paint)+brush_color×(PAINT_STRENGTH×weight_paint) Where `old_color` is the original color, i.e., the current RGB color attribute of the vertex (from the color buffer); `brush_color` is the target color of the brush or eraser; `weight_paint` is the drawing influence weight; `PAINT_STRENGTH` is the blending intensity, representing the maximum proportion of color overlay per frame, with a default value of 0.30. This parameter controls the color blending depth of a single touch operation: when `weight_paint=1.0`, a maximum of 30% of `brush_color` is blended into the current color per frame, with the remaining 70% retaining the original color. Therefore, a single touch can produce a soft transition color mark, and multiple applications in the same area can accumulate frame by frame, gradually deepening the color until it approaches `brush_color`, simulating the layering effect of repeated applications in real glazing. `(PAINT_STRENGTH×weight_paint)` is the actual blending coefficient, which changes linearly with the weight, with the center area of the brush pen blending the most and the edge areas blending less, forming a natural gradient. This blending formula is essentially linear interpolation (Lerp), changing only a small portion of the vertex color per frame, avoiding abrupt color changes in a single operation, while also supporting incremental cumulative shading. After the blending result is calculated, each channel is clamped to the [0,1] interval and written back to the vertex color buffer (vertex attribute Cd in TouchDesigner). This buffer is maintained throughout the program's execution and is unaffected by frame switching, thus achieving a multi-frame cumulative rendering effect.
[0057] This step (color drawing) and step S3 (geometric deformation) are executed within the same Script SOP or through two independent Script SOPs running side-by-side. Since the data domains they operate on are different—deformation modifies the vertex position P, and color modifies the vertex color Cd—there are no write conflicts. TouchDesigner's frame scheduling mechanism allows two callback functions to be called sequentially or in parallel within the same frame, each reading its own input (touch, gesture, current vertex state), calculating independently, and writing back different fields of the vertex attributes; ensuring that while the user is performing wheel throwing (gesture deformation), they can still glaze the ceramic surface via the touchscreen. The two interaction modes are completely decoupled and do not block each other.
[0058] Furthermore, a global reset function is provided. When the user clicks the Reset button on the P2 page, the script3_callbacks.reset_geometry() function will be triggered. In addition to restoring the geometry, this function will also reset the color buffer of all vertices to BASE_COLOR (i.e., the base color), clear all glazing and drawing traces, and restore the clay body to its initial uncolored state.
[0059] NumPy vectorized batch computation ensures that the total time for calculating the weights of 1024 vertices, color blending, and buffer writing, combined with the deformation calculation in step S3, is far less than the 16.7ms budget corresponding to 60fps, guaranteeing smooth real-time interaction. Visually, Gaussian decay in brush stroke weights, combined with progressive blending ratios, achieves soft edges and overlayable coloring effects similar to a real brush or airbrush. Compared to simple pixel-by-pixel filling, this significantly enhances the realism and artistic expression of the glazing operation.
[0060] S5: Receives the pattern and adjustable parameters selected by the user, generates multiple layers of patterns through multiple graphics rendering units, adaptively tiles them according to the UV coordinates corresponding to the model surface, and composites them onto the already colored model surface to generate a complete texture.
[0061] Responding to the traditional pattern and its parameters (density, size, aspect ratio) selected by the user on the iPad touchscreen, the pattern is rendered onto the virtual ceramic blank surface in an adaptive tiling manner through multiple independent GLSL shader nodes. This is then overlaid with the glaze base map generated in step S4, creating a complete base color map that combines glaze color and decorative pattern. This solves the problem of pattern stretching and deformation on three-dimensional curved surfaces and supports the free combination and real-time parameter adjustment of up to four layers of patterns. In this embodiment, the graphics rendering unit refers to the GLSL TOP node in the TouchDesigner platform. Each node independently runs a GLSL shader program to convert the input pattern image into an adaptively tiling pattern and output an RGBA image with an alpha channel.
[0062] A P4 pattern selection page is provided, which users can operate through a graphical interface, including: (1) Adding / deleting layers. Each time the "Add" button is clicked, a new layer is dynamically added through layer_io DAT, corresponding to an independent GLSL TOP (texture operator) rendering node; a maximum of four layers (glsl1 to glsl4) are supported, and if more are added, a prompt will be displayed that no more can be added. (2) Selecting patterns. Each layer can independently select from 26 built-in traditional decorative patterns (such as cloud patterns, dragon patterns, lotus scrolls, etc.); after selection, the image file path of the pattern is written to the file parameter of the corresponding GLSL node, triggering the shader to reload the texture. (3) Adjusting parameters. Each layer provides three sliders, which are bound to the uniform variables of the shader of that layer, including: u_spacing (pattern spacing / density), u_scale (pattern size), u_aspect (pattern aspect ratio); the parameter values are updated in real time, and the rendering results are refreshed instantly without recompiling the shader.
[0063] Each GLSL TOP node is responsible for converting the input 2D pattern image into an equally spaced, unstretched, adjustable-parameter adaptive tiling pattern, outputting an RGBA image with an alpha channel. The shader performs the following five core steps in the pixel shader: (1) Aspect Ratio Correction. To avoid stretching and distortion of the texture due to the inconsistency between the output canvas resolution and the input texture resolution, the shader first obtains the actual pixel size (srcW, srcH) of the input texture and the output canvas size (outW, outH), and calculates the aspect ratio correction factor: aspectIn=float(srcW) / float(srcH); Aspect ratio correction: uv.y = uv.y * aspectIn / (outW / outH); Where srcW and srcH are the pixel width and pixel height of the pattern image, respectively; aspectIn is the aspect ratio of the input pattern image; outW and outH are the pixel width and pixel height of the output canvas, respectively; uv.y is the Y component of the normalized texture coordinates of the current pixel, with a value range of [0,1]. This operation scales the UV coordinates along the Y-axis to ensure that the pattern is correctly presented with its original aspect ratio regardless of the output canvas ratio.
[0064] (2) Global scaling and axial independent stretching. Read the uniform variables u_scale.x and u_aspect, and transform the UV coordinates: uv.x = uv.x / u_scale.x; uv.y=uv.y / (u_scale.x*u_aspect); `uv.x` and `uv.y` are the x and y coordinates of the current pixel in the texture coordinate system, respectively. When `u_scale.x > 1`, the UV coordinates are magnified, allowing more texture units to be arranged within the same canvas, making the texture appear smaller; when `u_scale.x < 1`, the texture becomes larger. `u_aspect` independently controls the Y-axis scaling, which can stretch a square texture into a vertical rectangle (`u_aspect > 1`) or a horizontal rectangle (`u_aspect < 1`). This transformation is performed in the normalized UV space, and subsequent tiling steps are based on the transformed coordinates.
[0065] (3) Adaptive tiling count and calculation of cycle width. To achieve a whitespace spacing that changes proportionally to the pattern size, the shader uses a dynamic tiling count algorithm. The number of complete patterns that can be arranged in each row and the cycle width are dynamically calculated based on the pattern base width and the spacing coefficient. The compile-time constant BASE_TILES=8.0 is defined to represent the base tiling count (i.e., 8 patterns arranged in each row when there is no spacing). Then the base width of a single pattern is motifW_base=1.0 / BASE_TILES=0.125.
[0066] Read the spacing coefficient u_spacing.x (range [0,1], default 0.5) and calculate the desired gap width: gapDesired=u_spacing.x*motifW_base; unitW = motifW_base + gapDesired; tiles = floor(1.0 / unitW); period=1.0 / tiles; Where gapDesired is the desired width of the transparent interval, unitW is the width of a complete cycle (one pattern plus one gap), tiles is the number of cycles that can be fully accommodated within the canvas width (rounded down), and period is the actual width of each cycle. This algorithm ensures that no half-patterns appear at the canvas boundaries, and that all gaps are visually evenly distributed.
[0067] (4) Periodic positioning and transparent interval clipping. Periodic folding and transparent interval clipping are performed on the UV coordinates. The X component of the UV coordinates of the current pixel (after scaling) is mapped to a single period to determine whether it falls within the visible area of the pattern: xWorld=uv.x; xLocal = mod(xWorld, period); pad = 0.5 * (period - motifW_base); if(xLocal<pad||xLocal> pad+motifW_base) fragColor=vec4(0,0,0,0); Where xWorld represents the normalized texture coordinates of the current pixel in the horizontal direction, xLocal represents the local coordinates of the current pixel within its current period, motifW_base is the base width of a single pattern, pad is the width of the single-sided transparent interval for each period; (pad + motifW_base) represents the right boundary of the visible area of the pattern; fragColor is the final output color of the current pixel. Equal widths on both sides ensure that the pattern is centered within the period. If xLocal falls outside [pad, pad + motifW_base], it is output as transparent. If a pixel falls within the transparent interval, the shader directly discards or outputs a fully transparent pixel without texture sampling, thus generating precise whitespace that varies proportionally to the pattern size. The same principle applies to the Y direction, ensuring that the pattern also has an evenly spaced tiling effect in the vertical direction.
[0068] (5) UV remapping and texture sampling. The pattern is sampled after mapping the local coordinates of the visible area to standard texture coordinates. For pixels falling within the visible area (pattern area), their local coordinates are remapped to standard texture coordinates [0,1] in order to sample from the pattern image: tx=(xLocal-pad) / motifW_base; texUV=vec2(tx,ty); / / ty is processed similarly to the Y-axis Where tx is the result of linearly mapping xLocal from the visible area of the pattern to the standard texture coordinate space [0,1]; texUV is the final two-dimensional texture coordinate. To prevent texture boundaries from overflowing into adjacent pattern areas and causing color pollution during bilinear sampling, half-pixel shrinkage protection is added: texel=0.5 / textureSize(sTD2DInputs[0],0); texUV=clamp(texUV,texel,1.0-texel); Where textureSize(sTD2DInputs[0],0) is a built-in GLSL function, texel is a half-pixel offset; clamp(texUV,texel,1.0-texel) clamps each component of texUV to the intervals [texel.x,1.0-texel.x] and [texel.y,1.0-texel.y] respectively, ensuring that the sampling point is always within the effective pixel center range of the texture. Finally, the texture image is sampled by texture(sTD2DInputs[0], texUV) and the RGBA color value is output. The alpha of the texture area is usually 1, and the alpha of the transparent interval area is 0.
[0069] Furthermore, four GLSL TOP nodes (glsl1~glsl4) independently output pattern images with alpha channels. A alpha overlay blending method is used to sequentially stack multiple patterns. This is achieved by using a compositing node (such as Composite TOP or a custom GLSL compositor) to stack these layers sequentially in Alpha Over blending mode (SrcOver). The blending rule is: Result Color = Foreground Color × Foreground Opacity + Background Color × (1 - Foreground Opacity). This blending mode ensures that the pattern only covers the underlying image in non-transparent areas, while transparent areas fully reveal the colors of the underlying layers. There is no simple addition of color values between layers, avoiding overexposure or hue shifts that can occur with additive blending. The edges of the pattern transition naturally due to the continuous change in alpha. The stacking order is as follows: the first layer (glsl1) is directly stacked on top of the glaze base image generated in step S4; the second layer (glsl2) is stacked on top of the result of the first layer; and so on, up to the fourth layer (glsl4). Users can manage the layer order via the layer_io DAT and can delete or hide any layer.
[0070] After all pattern layers and the glaze base map are combined, a complete base colormap is generated, with its size consistent with the rendering output resolution (e.g., 1920×1080). This complete map serves as the input to the base colormap of the physically based rendering material, and is combined with the normal map, roughness map, and parallax map for lighting calculations. In this embodiment, this map is used as the base colormap input to the TouchDesigner PBR material node (pbr1), and is connected to the physically based lighting calculation pipeline. The PBR material node is also configured with a normal map, height map (parallax displacement), roughness map, metallicity map (constantly 0, ceramics are non-metallic), specular intensity map, and ambient occlusion map. These maps work together to ensure that the final rendered ceramic surface not only has the color information of the painted patterns, but also the gloss, texture, and depth of the glaze, significantly enhancing visual realism. The composited complete texture is used as the base color texture, and combined with the normal map, roughness map and parallax map, the final rendered image is generated through a physically based rendering pipeline.
[0071] All layer parameters (u_spacing, u_scale, u_ratio) are adjusted in real time via sliders on the iPad P4 screen; parameter values are passed to the corresponding GLSL shader as uniform variables via the param_io DAT; since the shader does not need to be recompiled, only the uniform cache needs to be updated, the response latency for parameter adjustment is less than one frame (approximately 16.7ms), resulting in visually instantaneous changes. In terms of performance, each GLSL TOP node runs independently on the GPU, with four layers processed in parallel; even at high output resolutions (1920×1080), modern GPUs (such as GTX 1060 and above) can easily maintain above 60fps; the overhead of compositing nodes and PBR materials is also handled by the GPU, with almost zero CPU load.
[0072] The input for step S5 depends on the glaze base map generated in step S4. Its output base color texture serves as the base color for the PBR material and directly participates in the final rendering. After completing the pattern overlay, the user can proceed to step S6 for finished product acquisition and transmission. Throughout the process, pattern parameters and color drawing are independent of each other. The user can perform the glazing and pattern application in any order, and the system will correctly synthesize the results.
[0073] S6: Save the final rendered image and transmit it over the network to the specified server.
[0074] The system generates an image file from the user's completed digital ceramic artwork (i.e., the final rendered image) after throwing, glazing, and pattern overlay, and transmits it to a display server via the network, enabling the saving, sharing, and multi-terminal interactive display of the creative results. Simultaneously, the system automatically resets the interactive state after transmission, providing a clean initial environment for the next user.
[0075] like Figure 3 As shown, after the user completes the pattern selection (P4 page) and clicks the "Finish" button, the page control module calls set_page(5) to switch the iPad touchscreen and main display screen to the P5 confirmation page. This page contains the following elements: a send button for manually triggering the upload of the artwork; a countdown display area (Text TOP), initially displayed for 30 seconds; and a prompt text informing the user that they will be automatically returned to the homepage after the countdown reaches zero. When entering the P5 page, time_manager DAT automatically starts the countdown timer. The timer decrements the remaining time variable by a delayed call (once per second) to the run() function and synchronously updates the display content of TextTOP; this method ensures that the countdown is accurate and does not block the main rendering thread. During the countdown, the user can click the "send" button to upload the artwork at any time, or they can do nothing before the countdown reaches zero and wait for the automatic process to be triggered.
[0076] When the user clicks the "Send" button or the countdown reaches zero, the image acquisition process is executed. To ensure that the saved image is completely consistent with the current screen display, including dynamic particle effects or lighting changes that may have been caused by the last touch or gesture, the rendering TOP node is first forcibly refreshed. Specifically, before calling top.save() via the Python script, the system triggers the rendering TOP to recalculate one frame, ensuring that the latest state of all upstream nodes (including geometric deformation, color buffer, pattern composition, and PBR material output) is synchronized to the rendering target. Further, the save() method of the rendering TOP is called to output the current frame as a PNG format image file and store it in a local preset path; the save path can be configured through the output_folder parameter in config.json, with the default value being the . / exports / folder under the project directory.
[0077] After saving, the `send_image` script (implemented as a Python DAT) reads all the bytes of the newly generated PNG file and sends it to the remote display server via TCP. Specifically, it retrieves the pre-configured server address (`server_host`) and port (`server_port`) from `config.json`, creates a TCP socket connection, and sends the byte data of the image file to the server. Upon receiving the data, the server can display the user's digital ceramic creation on the large display screen. If a connection failure occurs during transmission (e.g., the server is not running or the network is down), the system displays a corresponding error message on the interface, but retains the local image file without automatic deletion, allowing for manual resending or troubleshooting later.
[0078] Regardless of whether the image is sent by the user or triggered by the countdown reaching zero, the system must perform a reset operation after saving and transmitting the image (or if the transmission fails). This resets the geometry, color buffer, pattern layer, and interaction flags, and returns to the standby page. Specifically, this includes: stopping the countdown, clearing all delayed calls and timing flags in the time_manager DAT to prevent further triggering after reaching zero; resetting the geometry by calling script3_callbacks.reset_geometry() to restore the radii of all vertices of the cylinder to their initial values and clearing the color buffer to the base color BASE_COLOR; clearing the pattern layer by deleting all dynamically created GLSL TOP layers in the layer_io DAT, restoring it to a pattern-free state; resetting the page state by calling set_page(1) in the page control module to switch the iPad touchscreen and main display screen back to the P1 welcome standby page; and resetting the interaction flags by resetting the is_start channel (the activation flag for rotating the ceramic plate) to false, waiting for the next user to rotate the ceramic plate to re-enter the interaction. After the reset is complete, the system returns to its initial standby state. The next user can trigger a page switch by rotating the ceramic plate and begin a new digital ceramic making experience.
[0079] Example 2
[0080] This embodiment exemplarily presents a digital ceramic throwing and glazing interactive system, including a gesture acquisition module, a coordinate mapping module, a geometric deformation module, a color drawing module, a pattern rendering module, and an output module.
[0081] The gesture acquisition module is used to collect hand motion data in real time, including the three-dimensional position coordinates of the palm and the angular velocity of the hand. It performs dual validity judgment based on the presence of the hand (whether there is a hand in the sensing area) and the angular velocity threshold. When the hand is present and the absolute value of the angular velocity exceeds the preset threshold, the gesture of the current frame is determined to be valid. The gesture parameters of the current frame are used for subsequent deformation calculations, and the palm coordinates are passed to the downstream module. Otherwise, it is determined to be invalid, and the geometric state of the previous frame is maintained, thereby shielding boundary jitter and static false triggers.
[0082] The coordinate mapping module is used to convert the horizontal displacement of an effective gesture into a radial offset and map the vertical displacement into the longitudinal position of the 3D model. This module linearly transforms the sensor's millimeter-level physical coordinates to virtual space through linear normalization and supports sensitivity coefficient adjustment.
[0083] The geometric deformation module is used to calculate the deformation influence weight of each vertex of the 3D model based on the longitudinal distance, with the longitudinal action position as the center. It calculates the radial scaling factor by combining the radial offset and the preset strength coefficient, and multiplies the current radius by the scaling factor to obtain a temporary new radius. It applies a two-way constraint to the temporary new radius, with the lower bound being the larger value between the minimum radius limit and the initial radius minus the maximum stretching distance, and the upper bound being the sum of the initial radius and the maximum stretching distance. It uses vectorized batch operation to update the coordinates of all vertices to achieve real-time casting deformation.
[0084] The color drawing module is used to respond to drawing operations on the touch panel, obtain the touch position and map it to the vertical drawing position of the model, calculate the drawing influence weight of each vertex based on the vertical drawing position, determine the target color according to the current drawing mode, accumulate and mix the original color of the vertex according to the drawing influence weight and the preset mixing intensity, and store the updated color data in the vertex color buffer to achieve a progressive glazing effect.
[0085] The pattern rendering module receives the pattern selected by the user and the adjustable parameters (density, size, aspect ratio) of each pattern layer. It generates multiple layers of patterns through multiple graphics rendering units (GLSL shader nodes). Based on the UV coordinates of the model surface, it adaptively tiles each pattern layer (including aspect ratio correction, periodic folding, transparency interval clipping, and texture remapping). It uses a transparency pre-overlay blending method to sequentially composite the multiple patterns onto the shaded model surface to generate a complete base color map. The composited complete map is used as the base color map, combined with normal maps, roughness maps, and parallax maps, and the final rendered image is generated through a physically based rendering pipeline.
[0086] The output module is used to save the final rendered image and transmit it to a designated server over the network; it enables the saving, sharing, and multi-terminal interactive display of digital ceramic works; after the transmission is completed, the module automatically resets the system's geometry, color buffer, pattern layers, and interactive state, and returns to the standby page for the next user.
[0087] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims. It should be understood that the invention is not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A digital ceramic throwing and glazing interactive method, characterized in that, The method includes: Real-time acquisition of hand motion data, including three-dimensional position coordinates and angular velocity, and dual validity judgment based on hand presence and angular velocity threshold; if valid, the gesture parameters of the current frame are used for subsequent deformation calculation; otherwise, the gesture parameters are not updated and the geometric state of the previous frame is maintained. The horizontal displacement of the effective gesture is converted into a radial offset, and the vertical displacement is mapped to the longitudinal position of the 3D model. Centered on the longitudinal action position, the deformation influence weight of each vertex of the 3D model is calculated based on the longitudinal distance. The radial scaling factor is determined by combining the radial offset and a preset intensity coefficient. A bidirectional constraint is applied to the radial radius of the vertices using a preset minimum radius lower limit and maximum stretching upper limit. Vectorized batch computation is used to update the coordinates of all vertices. The deformation influence weight is calculated using a power-law decay formula. Deformation influence weight = max(0, 1 - (longitudinal distance / longitudinal influence radius)^attenuation exponent); The longitudinal influence radius and attenuation index are configurable parameters; the radial scaling factor is determined by the product of the radial offset, the global deformation intensity coefficient, and the deformation influence weight. In response to a drawing operation on the touch panel, the touch position is acquired and mapped to the vertical drawing position of the 3D model. Based on the vertical drawing position, the drawing influence weight of each vertex is calculated. The target color is determined according to the current drawing mode. The color is then cumulatively blended with the original vertex color based on the drawing influence weight and a preset blending intensity, and the updated color data is stored. The drawing influence weight is calculated using a power-law decay formula. Drawing influence weight = max(0, 1 - (|vertex Y coordinate - vertical drawing position| / vertical influence radius of stroke)^attenuation exponent) The formula for calculating the cumulative mixing is: New color = Original color × (1 - Blend intensity × Rendering influence weight) + Target color × (Blend intensity × Rendering influence weight) The mixing intensity is a configurable parameter. The system receives the pattern and adjustable parameters selected by the user, generates multiple layers of patterns through multiple graphics rendering units, adaptively tiles them according to the UV coordinates corresponding to the model surface, and composites them onto the already colored model surface to generate a complete texture map. The final rendered image is then generated based on the complete texture map. The final rendered image is saved and transmitted over the network to a designated server.
2. The digital ceramic throwing and glazing interactive method according to claim 1, characterized in that, The dual validity judgment based on the presence of the hand and the angular velocity threshold includes: when the number of detected hands is greater than zero and the absolute value of the angular velocity exceeds the preset velocity threshold, the gesture in the current frame is determined to be valid; otherwise, it is determined to be invalid, and the deformation calculation of the current frame is frozen to maintain the geometric state of the previous frame.
3. The digital ceramic throwing and glazing interactive method according to claim 1, characterized in that, The process of converting the horizontal displacement of an effective gesture into a radial offset includes: clamping the horizontal coordinates of the palm according to the sensing interval and normalizing them to the [0,1] interval, then converting them into a symmetrical offset and multiplying them by the sensitivity coefficient; The process of mapping vertical displacement to the longitudinal position of the three-dimensional model includes: clamping the vertical coordinates of the palm according to the sensing interval and normalizing them to the [0,1] interval, and then linearly mapping them to the height range of the model.
4. The digital ceramic throwing and glazing interactive method according to claim 1, characterized in that, The bidirectional constraints include: a lower bound constraint that the radial radius is not less than the larger of the minimum radius limit and the initial radius minus the maximum stretching distance; and an upper bound constraint that the radial radius does not exceed the sum of the initial radius and the maximum stretching distance. The maximum stretching distance is determined based on the product of a preset stretching ratio and the model height range.
5. The digital ceramic throwing and glazing interactive method according to claim 1, characterized in that, The adjustable parameters include pattern density, pattern size, and pattern aspect ratio; The adaptive tiling includes: dynamically calculating the number of complete patterns that can be arranged in each row and the periodic width based on the pattern reference width and spacing coefficient; performing periodic folding and transparent interval clipping on the UV coordinates; and sampling the pattern after mapping the local coordinates of the visible area to the standard texture coordinates.
6. The digital ceramic throwing and glazing interactive method according to claim 1, characterized in that, The composite material is applied to the already colored model surface using a transparency-overlay blending method, which sequentially overlays multiple textures. The complete texture map serves as the base color texture input for physically based rendering materials, and is combined with normal maps, roughness maps, and parallax maps for lighting calculations.
7. The digital ceramic throwing and glazing interactive method according to claim 1, characterized in that, Saving the final rendered image and transmitting it to a designated server via the network includes: starting a countdown after entering the confirmation page; responding to a user's sending operation or the countdown reaching zero; forcibly refreshing the rendering target and saving it as an image file; sending the image data to a preset server address via the TCP protocol; resetting the geometry, color buffer, pattern layer, and interaction markers after sending; and returning to the standby page.
8. A digital ceramic throwing and glazing interactive system for implementing the method described in any one of claims 1-7, characterized in that, include: The gesture acquisition module is used to collect hand motion data in real time, including three-dimensional position coordinates and angular velocity. It makes a validity judgment based on the presence of the hand and the angular velocity threshold. If the judgment is valid, the gesture parameters of the current frame are used for subsequent deformation calculation; otherwise, the gesture parameters are not updated and the geometric state of the previous frame is maintained. The coordinate mapping module is used to convert the horizontal displacement of an effective gesture into a radial offset and to map the vertical displacement into the longitudinal position of the 3D model. The geometric deformation module is used to calculate the deformation influence weight of each vertex of the three-dimensional model based on the longitudinal distance with the longitudinal action position as the center, determine the radial scaling factor by combining the radial offset and the preset intensity coefficient, and impose bidirectional constraints on the radial radius of the vertex by the preset minimum radius lower limit and maximum stretching upper limit, and update the coordinates of all vertices by vectorized batch operation. The color drawing module is used to respond to drawing operations on the touch panel, obtain the touch position and map it to the vertical drawing position of the model, calculate the drawing influence weight of each vertex based on the vertical drawing position, determine the target color according to the current drawing mode, and perform cumulative mixing with the original vertex color according to the drawing influence weight and preset mixing intensity, and store the updated color data. The pattern rendering module is used to receive the pattern selected by the user and the adjustable parameters of the pattern, generate multi-layer patterns through multiple graphics rendering units, adaptively tile them according to the UV coordinates corresponding to the model surface, and composite them onto the already colored model surface to generate a complete texture map. The final rendered image is generated based on the complete texture map. The output module is used to save the final rendered image and transmit it to a designated server via a network.
Citation Information
Patent Citations
Historic building protection display method and system based on virtual reality
CN119556822A
Energy flow interface 3D interaction method
CN121597069A