Method and device for controlling brush to realize convenient modification of three-dimensional model in three-dimensional space and storage medium
Patent Information
- Application Number
- CN202510603279.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-26
AI Technical Summary
笔刷多次触碰模型后产生编辑效果重复叠加,导致用户需反复修改;另外,用户需要不断重复“编辑”和“调整镜头”,交互操作麻烦,用户体验差
Smart Images

Figure CN120543802A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a method, device and storage medium for controlling a brush in a three-dimensional space to conveniently modify a three-dimensional model. Background Art
[0002] Currently, the editing operations for 3D models in 3D space on the market are mainly based on the following media: On the computer side, you rely on the keyboard to input values and the mouse to click command buttons. Figure 1 As shown, users can use the mouse to select a specific coordinate origin and then use the keyboard to enter precise parameters (such as length, radius, and coordinate offset) to generate the model. After creation, geometric parameters can be continuously edited and adjusted using a combination of mouse and keyboard operations. Meanwhile, for 3D manipulation / moving the lens, the main method is to select commands from the menu bar or toolbar, specify the base point and rotation / movement axis (color-coded XYZ axes), and then drag the mouse to complete the transformation.
[0003] On mobile devices, multi-touch gestures are used for screen operations. Figure 2 As shown, users can create a model by selecting a pre-set polygonal model from the toolbar and dragging it to the editing area. Once created, they can rotate the object with a single finger drag, pinch to scale the model with two fingers, and long-press the object to pan or slide it along a specific axis.
[0004] The digital display or iPad + stylus provides high-precision input through the stylus, and the user can use the stylus to carve surface details of the model (such as texture and wrinkles), while controlling the brush strength through pressure sensitivity to achieve delicate and complex effects. Figure 3 As shown, for 3D operation / moving the lens, users can customize stylus gestures (such as double-clicking to switch modes and sliding to call out menus), flexibly switching between editing mode and lens mode, and improving operational efficiency.
[0005] In summary, existing solutions for 3D manipulation / moving the camera primarily rely on selecting commands from the menu bar or toolbar, specifying the base point and rotation / movement axes (color-coded X, Y, and Z axes) through interactive gestures, and adjusting the parameters of each axis by sliding the screen to complete the transformation. Repeated brush strokes on the model create overlapping editing effects, forcing users to repeatedly modify the model. Furthermore, users must repeatedly "edit" and "adjust the camera," making interactive operations cumbersome and resulting in a poor user experience. Summary of the Invention
[0006] In response to the problems existing in the prior art, the purpose of the present invention is to provide a method, device and storage medium for controlling a brush in three-dimensional space to realize convenient modification of a three-dimensional model, so as to improve the convenience of user operation.
[0007] To achieve the above object, the technical solution adopted by the present invention is as follows: A method for conveniently modifying a 3D model by controlling a brush in a three-dimensional space. The method sets the 3D model as a judgment hot zone and sets a camera that can revolve around the 3D model as the center. The method includes the following steps: Select the modification item of the 3D model; When the user's finger touches the screen and slides, the displacement modification function is responded to, and the position where the finger slides on the screen is detected in real time. A sphere with a radius of r is generated in real time with the contact point between the finger and the screen as the center of the sphere. The outer common tangent of the spheres generated during the finger sliding process forms a sliding track. At the same time, a sphere is also generated at the center point of the 3D model; Obtain the outer common tangents between the spheres at both ends of the sliding track and the sphere at the center point of the 3D model respectively. The outer common tangents include the top outer common tangent, the bottom outer common tangent and the side outer common tangent; Extend the sliding track until it is connected to the outer common tangent to form a selected hot zone, and modify the position of the 3D model in the selected hot zone according to the selected modification item; During the above modification process, the sliding track is mapped in real time to form the revolution track of the camera. The camera moves along the revolution track to update the screen display image, and the camera always takes the 3D model as the center during the movement.
[0008] Set a time threshold T. When the modification item is selected and the finger touches the screen without sliding, the editing function is started, and the staying time t of the finger touching the screen is monitored. If t < T, it is determined that the editing function ends; if t >= T, it is determined that the displacement modification function is triggered, and when the finger releases the screen, it is determined that the displacement modification function stops.
[0009] During a single finger sliding process, if the sliding track angle of the finger exceeds 360 degrees, the movement modification function stops when the sliding track angle reaches 360 degrees, a selected hot zone corresponding to the 360-degree sliding track is generated, and the 3D model in the selected hot zone is modified; the part of the sliding track exceeding 360 degrees is not processed.
[0010] After selecting the modification item, if the finger makes multiple slides, the displacement modification function is responded again when the user's finger touches the screen again and slides, and a new selected hot zone is generated. If the new selected hot zone overlaps with the previous selected hot zone, the original modification operation of the 3D model corresponding to the overlapping area is cancelled, and the camera follows the movement to update the image; If the modification item is changed and the finger touches the screen again for modification, the modification function is directly superimposed.
[0011] A device for controlling a brush in three-dimensional space to conveniently modify a three-dimensional model includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method for controlling a brush in three-dimensional space to conveniently modify a three-dimensional model as described above. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: when the computer program / instruction is executed by a processor, the steps of the method for controlling a brush in three-dimensional space to conveniently modify a three-dimensional model are implemented.
[0012] By adopting this solution, the present invention monitors finger position and target mapping from the moment the screen is touched to determine activation and editing the target until the screen is left to determine completion, achieving a smooth experience similar to a single stroke. This can avoid the operational smoothness issues of a multi-object editing environment in three-dimensional space, which requires frequent switching of control brushes and camera switches due to perspective issues. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 Provide a schematic diagram for modifying the 3D model on the computer side; Figure 2 Schematic diagram of 3D model modification for mobile terminal; Figure 3 A schematic diagram of modifying a 3D model using a tablet and a stylus; Figure 4 It is a schematic diagram of the principle of the present invention; Figure 5 Modify the flow chart for the present invention; Figure 6 Schematic diagram of the displacement modification of a three-dimensional model according to an embodiment of the present invention Figure 1 ; Figure 7 Schematic diagram of the displacement modification of a three-dimensional model according to an embodiment of the present invention Figure 2 . DETAILED DESCRIPTION
[0014] like Figure 4-7 As shown, the present invention discloses a method for controlling a brush in three-dimensional space to conveniently modify a three-dimensional model. The method sets up a three-dimensional model as a determination hot zone and sets up a camera that can revolve around the three-dimensional model as a center. The method includes the following steps: Select the modification item of the 3D model (such as graffiti, clear, copy, etc.); When a user touches the screen and swipes, the system responds to the displacement modification function and detects the finger's sliding position on the screen in real time. A sphere with a radius of r is generated in real time with the point of contact between the finger and the screen as the center. The outer common tangent of the sphere generated during the finger swiping forms the swiping trajectory. At the same time, a sphere is also generated at the center point of the 3D model. Obtain the external common tangents between the spheres at both ends of the sliding track and the sphere at the center point of the 3D model respectively. The external common tangents include the top external common tangent, the bottom external common tangent, and the side external common tangent; Extend the sliding track until it connects with the external common tangent to form a selected hot zone, and modify the position of the 3D model in this selected hot zone according to the selected modification item; Figure 6 In the figure shown after the movement, the covered part of the sphere on the middle high mountain is the position to be edited and modified; Figure 7 In the figure of part (3), the yellow part of the 3D model is also the position to be edited and modified after selection.
[0015] During the above modification process, the sliding track is mapped in real time to form the revolution orbit of the camera. The camera moves along the revolution orbit to update the screen display image, and the camera always takes the 3D model as the center during the movement.
[0016] Set a time threshold T. When a modification item is selected and the finger touches the screen without sliding, start the editing function and monitor the staying time t of the finger touching the screen. If t < T, it is determined that the editing function ends; if t >= T, it is determined that the displacement modification function is triggered, and when the finger releases the screen, it is determined that the displacement modification function stops.
[0017] During a single finger swipe, if the angle of the finger's sliding track exceeds 360 degrees, stop the movement modification function when the sliding track angle reaches 360 degrees, generate the selected hot zone corresponding to the 360-degree sliding track, and modify the 3D model within the selected hot zone. The part of the sliding track exceeding 360 degrees is not processed.
[0018] After selecting a modification item, if the finger makes multiple swipes, that is, the finger swipes once and then leaves the screen, and then touches the screen again to swipe. When the user's finger touches the screen again and swipes, the displacement modification function is responded to again to generate a new selected hot zone. If the new selected hot zone overlaps with the previous selected hot zone, the original modification operation of the 3D model corresponding to the overlapping area is cancelled, and the camera follows the movement to update the image.
[0019] If the modification item is changed and the finger touches the screen again for modification, the modification function is directly superimposed. If it is changed to a previously selected modification item, the modification function is also directly superimposed.
[0020] For example, the user first selects the clear function, then touches the screen with the finger to perform the first swipe modification, and then touches the screen again with the finger after leaving the screen to perform the second swipe modification. If the selected hot zone generated during the second swipe overlaps with the selected hot zone generated during the first swipe, the three-dimensional model corresponding to the overlapping area will be canceled and cleared. On this basis, the user changes the modification item to the graffiti function, and then makes a modification. This modification can be superimposed on the last clear modification. Next, the user changes the modification item to the clear function again, and then touches the screen with the finger to perform a swipe modification. If the selected hot zone generated by this swipe overlaps with the selected hot zone generated when the clear function was previously performed, the clear function is directly superimposed without canceling the clear operation. By monitoring the time the finger stays on the screen after triggering the function, the triggering of other functions is determined, thereby realizing one interactive gesture but the coexistence of two interactive functions.
[0021] Specific functions can be flexibly set and edited; not only can modular combination parameters be preset based on the toolbar, but also customized designs can be made according to actual project requirements.
[0022] The function is activated by touching the screen, edits the target, and ends when the screen is left. It monitors the finger position and target mapping throughout the process, achieving a smooth experience similar to drawing with one stroke.
[0023] By monitoring the displacement of the finger's touch point on the screen, the resulting revolution is mapped, offering broad scalability and applicability. This can avoid the issues of frequent switching between brush controls and camera switching in 3D multi-object editing environments (where the front object obscures the back or nearly overlaps) caused by perspective issues.
[0024] This invention avoids the problem of repeated editing effects caused by multiple brush touches on the model, which leads to repeated modifications by the user. It also reduces the user's experience of repeated "editing" and "adjusting the lens" interactive operations during the design process.
[0025] The above description is merely an embodiment of the present invention and does not limit the technical scope of the present invention. Therefore, any minor modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A method for conveniently modifying a 3D model by controlling a brush in 3D space. The method establishes a 3D model as a hotspot for determination and sets up a camera that orbits around the 3D model as its center. The method is characterized by: The method includes the following steps: Select a modification item of the 3D model; When the user's finger touches and slides on the screen, respond to the displacement modification function, and continuously detect the position where the finger slides on the screen, and a sphere with a radius of r is generated in real time with the contact point between the finger and the screen as the center of the sphere; the external common tangent of the spheres generated during the finger sliding forms a sliding track; at the same time, a sphere is also generated at the center point of the 3D model; Obtain the external common tangents between the spheres at both ends of the sliding track and the sphere at the center point of the 3D model respectively. The external common tangents include the top external common tangent, the bottom external common tangent, and the side external common tangent; Extend the sliding track until it connects with the external common tangent to form a selected hot zone, and modify the position of the 3D model in the selected hot zone according to the selected modification item; During the above modification process, the sliding track is mapped in real time to form the公转轨道 of the camera, and the camera moves along the公转轨道 to update the screen display image. The camera always takes the 3D model as the center during the movement; 2. The method of controlling a brush in three-dimensional space to conveniently modify a three-dimensional model according to claim 1, characterized in that: Set a time threshold T. When a modification item is selected and the finger touches the screen without sliding, start the editing function, and monitor the residence time t of the finger touching the screen. If t < T, it is determined that the editing function ends; if t >= T, it is determined that the displacement modification function is triggered, and when the finger releases the screen, it is determined that the displacement modification function stops; 3. The method of controlling a brush in three-dimensional space to conveniently modify a three-dimensional model according to claim 1, characterized in that: During a single finger sliding process, if the sliding track angle of the finger exceeds 360 degrees, stop the movement modification function when the sliding track angle reaches 360 degrees, generate the selected hot zone corresponding to the 360-degree sliding track, and modify the 3D model in the selected hot zone; the part of the sliding track exceeding 360 degrees is not processed; 4. The method of controlling a brush in three-dimensional space to conveniently modify a three-dimensional model according to claim 1, characterized in that: After selecting a modification item, if the finger makes multiple slides, when the user's finger touches the screen again and slides, respond to the displacement modification function again to generate a new selected hot zone. If the new selected hot zone overlaps with the previous selected hot zone, the original modification operation of the 3D model corresponding to the overlapping area is cancelled, and the camera follows the movement to update the image; If the modification item is changed and the finger touches the screen again for modification, directly superimpose the modification function; 5. A device for controlling a brush in three-dimensional space to conveniently modify a three-dimensional model, characterized by: It includes a memory, a processor, and a computer program stored on the memory. The processor executes the computer program to implement the steps of a method for conveniently modifying a 3D model by controlling a brush in a three-dimensional space as described in any one of claims 1-4; 6. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by the processor, the steps of a method for conveniently modifying a 3D model by controlling a brush in a three-dimensional space as described in any one of claims 1-4 are implemented.