Method and device for generating engraved lines in a virtual model, terminal device and storage medium

By generating and associating pre-distributed point data of marker points in the virtual model, and utilizing the Niagara system and virtual skeleton, the problem of poor stability in manually drawn scribing lines by players was solved, thereby improving the aesthetics of scribing lines and increasing the richness of the game.

CN115690325BActive Publication Date: 2026-07-31GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU BOGUAN TELECOMM TECH LTD
Filing Date
2022-11-15
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, the method of players manually drawing lines on virtual models is unstable, making it difficult to control the shape and aesthetics of the lines, and it is impossible to draw using non-mouse input devices.

Method used

By loading pre-distributed point data, marker points are generated, and based on the pre-distributed point data of the marker points, scribing lines are generated on the surface of the virtual model. Coordinate transformation and material assignment are performed using virtual skeleton association and the Niagara system to generate aesthetically pleasing scribing lines.

Benefits of technology

It reduces the difficulty for players to create custom scribing lines, significantly improves the aesthetics of the scribing lines, and enhances the game's richness and playability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690325B_ABST
    Figure CN115690325B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, terminal device, and storage medium for generating scribing lines in a virtual model, comprising: loading pre-distributed point data corresponding to the virtual model; generating marker points corresponding to each pre-distributed point data; wherein the marker points are associated with the virtual skeleton of the virtual model; and generating scribing lines on the model surface corresponding to the virtual model based on the pre-distributed point data corresponding to at least one target marker point among the marker points. This invention can reduce the difficulty for players to customize and draw scribing lines, and can also significantly improve the aesthetics of the scribing lines, thereby increasing the richness and playability of the game.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game technology, and in particular to a method, apparatus, terminal device, and storage medium for generating lines in a virtual model. Background Technology

[0002] Currently, adding decorative grooves to the surface of virtual models (such as mecha models) can enhance their aesthetics and complexity. One related technology offers a method where players manually draw grooves during real-time gameplay. This requires players to obtain the model's surface coordinates by clicking with the mouse, connect these coordinates into spline patches using the Blueprint Spline function, and then adjust the width of the spline patches and add textures to simulate grooves to generate them on the virtual model's surface. However, this method of obtaining coordinates by clicking on the virtual model's surface is unstable, making it difficult to control the shape and aesthetics of the generated grooves. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method, apparatus, terminal device and storage medium for generating scribing lines in a virtual model, which can reduce the difficulty of players drawing custom scribing lines and significantly improve the aesthetics of the scribing lines, thereby increasing the richness and playability of the game.

[0004] In a first aspect, embodiments of the present invention provide a method for generating scribing lines in a virtual model, comprising: loading pre-distributed point data corresponding to the virtual model; generating a marker point corresponding to each of the pre-distributed point data; wherein the marker point is associated with the virtual skeleton of the virtual model; and generating scribing lines on the model surface corresponding to the virtual model based on the pre-distributed point data corresponding to at least one target marker point among the marker points.

[0005] Secondly, embodiments of the present invention also provide a device for generating scribing lines in a virtual model, comprising: a point data loading module for loading pre-distributed point data corresponding to the virtual model; a marker point generation module for generating a marker point corresponding to each of the pre-distributed point data; wherein the marker point is associated with the virtual skeleton of the virtual model; and a scribing line generation module for generating scribing lines on the model surface corresponding to the virtual model based on the pre-distributed point data corresponding to at least one target marker point among the marker points.

[0006] Thirdly, embodiments of the present invention also provide a terminal device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method described in any of the first aspects.

[0007] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method described in any of the first aspects.

[0008] This invention provides a method, apparatus, terminal device, and storage medium for generating scribing lines in a virtual model. First, pre-distributed point data corresponding to the virtual model is loaded, and a marker point corresponding to each pre-distributed point data is generated. This marker point is associated with the virtual skeleton of the virtual model. Then, based on the pre-distributed point data corresponding to at least one target marker point among the marker points, scribing lines on the model surface corresponding to the virtual model are generated. This method can generate corresponding marker points based on pre-configured pre-distributed point data corresponding to the virtual model when the scribing function is activated. This allows players to select at least one target marker point from the marker points and generate corresponding model surface scribing lines based on the pre-distributed point data corresponding to the target marker point. This reduces the difficulty for players to customize and draw scribing lines, significantly improves the aesthetics of the scribing lines, and thus enhances the richness and playability of the game.

[0009] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0010] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0011] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating a method for generating scribing lines in a virtual model according to an embodiment of the present invention.

[0013] Figure 2 A schematic diagram of an initial patch model provided in an embodiment of the present invention;

[0014] Figure 3 This is a schematic diagram of a preset point distribution data in a CSV folder provided by an embodiment of the present invention;

[0015] Figure 4 A schematic diagram of a parameter interface provided in an embodiment of the present invention;

[0016] Figure 5 A schematic diagram of an initial strip sheet provided in an embodiment of the present invention;

[0017] Figure 6 This is a schematic diagram illustrating the effect of edge correction processing provided in an embodiment of the present invention;

[0018] Figure 7 This is a schematic diagram of a model surface scribing provided in an embodiment of the present invention;

[0019] Figure 8 This is a schematic diagram of a device for generating scribing lines in a virtual model, provided in an embodiment of the present invention.

[0020] Figure 9 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Currently, the surface markings on mecha models are usually pre-made by modelers. The related technologies that allow players to manually draw markings during real-time gameplay have at least the following problems: (1) It is difficult to obtain the surface normal data of the mecha model by clicking on its surface with a mouse, resulting in the inability to correct the orientation of the generated marking facets, leading to facets intersecting with the model; (2) The coordinates obtained by clicking with a mouse are relatively unstable, making it difficult to control the shape and aesthetics of the connected lines; (3) When interacting with console games, it is impossible to use non-mouse input devices such as gamepads to draw markings. Based on this, the present invention provides a method, apparatus, terminal device, and storage medium for generating markings in a virtual model, which can reduce the difficulty of players customizing the drawing of markings and significantly improve the aesthetics of the markings, thereby increasing the richness and playability of the game.

[0023] In one embodiment of this disclosure, the method for generating scribing lines in a virtual model can run on a local terminal device or a server. When the method for generating scribing lines in a virtual model runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and client devices.

[0024] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of the line generation method in the virtual model are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.

[0025] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.

[0026] In one possible implementation, this disclosure provides a method for generating scribing lines in a virtual model, which provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system.

[0027] The technical solutions of this application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0028] To facilitate understanding of this embodiment, a method for generating scribing lines in a virtual model disclosed in this invention will first be described in detail. (See also...) Figure 1 The diagram shows a flowchart of a method for generating scribing lines in a virtual model. The method mainly includes the following steps S102 to S106:

[0029] Step S102: Load the pre-distributed point data corresponding to the virtual model. The virtual model can be a virtual machine model (e.g., Virtual Machine A). The pre-distributed point data can include multiple points and the normal orientation data, tangent orientation data, texture color data, driving skeleton data, and whether it is at an edge, etc., for each point. In one implementation, a scribing control can be provided through a graphical user interface. If a trigger operation (such as a click, swipe, or gesture) is detected for the scribing control, the scribing function is activated, and the pre-distributed point data is loaded. Optionally, the pre-distributed point data is generated in Maya or other 3D software and can be stored in CSV (Comma-Separated Values) format.

[0030] Step S104: Generate a marker point corresponding to each pre-distributed point data. The marker point is also a clickable sphere Actor object. Each pre-distributed point data has one corresponding marker point, which is associated with the virtual skeleton of the virtual model. In one implementation, the pre-distributed point data can be imported into the engine and converted into a DataTable asset format recognizable by the engine. When the in-game chisel function is activated, a large number of clickable marker points can be generated based on the pre-distributed point data, and these marker points can be attached to the virtual skeleton of the virtual model, thus associating the marker points with the virtual skeleton.

[0031] Step S106: Based on the pre-distributed point data corresponding to at least one target marker among the marker points, generate the model surface scribing corresponding to the virtual model. Here, the model surface scribing refers to the groove line effect on a hard surface model, such as the scribing effect on the surface of a mecha model like a Gundam figure. In one embodiment, at least one target marker can be selected from the marker points using an input device such as a gamepad or mouse. The pre-distributed point data corresponding to the target marker is then transmitted to the parameter interface of a pre-built Niagara system. The Niagara system calculates and generates scribing based on the pre-distributed point data corresponding to the target marker, and after correction using a coordinate transformation algorithm and material assignment, the model surface scribing is obtained. This model surface scribing is then attached to the virtual skeleton of the virtual model.

[0032] The method for generating scribing lines in a virtual model provided in this invention can generate corresponding marker points based on pre-distributed point data corresponding to a pre-configured virtual model when the scribing function is activated. This allows players to select at least one target marker point from the marker points and generate corresponding scribing lines on the model surface based on the pre-distributed point data corresponding to the target marker point. This reduces the difficulty for players to customize and draw scribing lines, significantly improves the aesthetics of the scribing lines, and enhances the richness and playability of the game.

[0033] During the data preparation stage, pre-distributed point data corresponding to the virtual model can be configured in Maya or other 3D software. For details, please refer to (1) to (2) below:

[0034] (1) Responding to a patch topology operation on the virtual model, an initial patch model corresponding to the virtual model is obtained. The patch topology operation is essentially manually creating the initial patch model, which includes multiple evenly distributed points, and the edges of the initial patch model are aligned with the edges of the virtual model. For example, see [link to example]. Figure 2 The diagram shown is a schematic of an initial patch model. It should be noted that during the process of initializing the topological patch model, the distribution of each point in the initial patch model should be kept uniform and the edges should be aligned.

[0035] (2) Determine the normal orientation data, tangent orientation data, texture color data, and driving skeleton data for each point in the initial patch model to obtain the pre-distributed point data corresponding to the virtual model. The pre-distributed point data is stored and categorized based on the driving skeleton data. In one implementation, the initial patch data can be imported into Houdini software, which automatically calculates the normal orientation data, tangent orientation data, and whether the point is on an edge for each point, and integrates the model color data at the corresponding positions in the virtual model. Specifically, after importing the initial patch data into Houdini software, the initial patch model can be subdivided, that is, points can be added to the initial patch model; the initial patch model is converted into lines to calculate the normal and tangent orientation data of each point on the line; then the lines are converted into points to read the texture color data at the corresponding coordinates in the virtual model using the coordinates of the point; the point IDs (Identity Documents) are mirrored to achieve left-right synchronization, and the point data is exported in ID order; when exporting point data, corresponding folders can be created according to the virtual skeletons (including shoulder bones, upper arm bones, lower arm bones, etc.) or virtual parts (including head, hands, feet, etc.) that drive the point, and the point data can be saved to these folders. Additionally, when exporting point data, Python can be used to export the point data as CSV format. For example, assuming there are 3 virtual skeletons, 3 CSV folders are automatically created, each named after a skeleton, thus using each CSV folder to store the corresponding point data, such as... Figure 3 The diagram shows a preset point distribution data in a CSV folder.

[0036] Additionally, Unreal Engine can retrieve the coordinates (i.e., bone coordinate data) and rotation data of the T-pose skeleton of the virtual model, and export the bone coordinate data and rotation data as CSV format to correct the hooking results.

[0037] During the data application phase, pre-distributed point data can be imported into the engine and converted into a DataTable asset format that the engine can recognize. Categories are then named according to their hierarchical structure, which includes the aforementioned virtual components and virtual skeletons. When the in-game lithography function is activated, a large number of clickable markers can be generated based on the pre-distributed point data and attached to the virtual skeletons.

[0038] For ease of understanding, this embodiment of the invention provides an implementation method for attaching markers to a virtual skeleton, as shown in steps 1 to 3 below:

[0039] Step 1: Obtain the rotation data corresponding to the virtual model, and the bone coordinate data of the virtual skeleton in the local coordinate system of the virtual model. In one implementation, the rotation data corresponding to the virtual model and the bone coordinate data of the virtual skeleton in the local coordinate system of the virtual model can be obtained in Unreal Engine.

[0040] Step 2: Based on the rotation data, determine the target point coordinates of the pre-distributed point data in the local coordinate system. In practice, this can be achieved by multiplying the initial point coordinates of the pre-distributed point data by the inverse matrix of the rotation data to obtain the intermediate point coordinates. Then, a coordinate system transformation is performed on the intermediate point coordinates to obtain the target point coordinates in the local coordinate system. During the attachment process, the pre-distributed point data can be multiplied by the inverse matrix of the rotation data, and the global coordinates can be transformed to the local space coordinates of the virtual skeleton. Attachment is then performed based on this transformation to match the character animation.

[0041] Step 3: Based on the matching relationship between the skeletal coordinate data and the target point coordinate data, the pre-distributed point data is attached to the virtual skeleton. In specific implementation, when the target point coordinate data and the skeletal coordinate data are the same, it can be determined that there is a matching relationship between the two, and the pre-distributed point data is attached to the position corresponding to the skeletal coordinate data in the virtual skeleton.

[0042] Regarding the aforementioned step S106, this embodiment of the invention provides an implementation method for generating surface scribing lines of a virtual model based on pre-distributed point data corresponding to at least one target marker among the marker points, as described in steps a to d below:

[0043] Step a: In response to a selection operation for a marker point, at least one target marker point is identified, and pre-distributed point data corresponding to each target marker point is extracted. The selection operation is essentially a click event for a marker point. In one implementation, a niagara system can be generated, in which multiple marker points are selected using click events; the selected marker points are the target marker points, and pre-distributed point data for each target marker point is extracted.

[0044] Step b involves generating an initial strip patch model based on the pre-distributed point data corresponding to each target marker point. For specific implementation details, please refer to steps b1 through b3 below:

[0045] Step b1: According to the selection order of the selection operation, integrate the pre-distributed point data corresponding to each target marker point into a scribing parameter array. The selection order is also the click order. In one implementation, the pre-distributed point data corresponding to each target marker point can be arranged into a scribing parameter array according to the click order, and stored as multiple data types such as pos_array (target point coordinate data), face_array (normal vector), N_array (tangent vector), color_array (color), custom_color (custom color), and width (width).

[0046] Step b2 involves passing the scribing parameter array to the pre-created parameter interface corresponding to the niagara system. The parameter interface is as follows: Figure 4 As shown.

[0047] Step b3: In the niagara system, an initial strip patch is generated based on the target point coordinate data in the scribing parameter array.

[0048] Step c: The initial strip patch model is corrected to obtain the target strip patch model. The correction process includes corner correction and / or edge correction. For ease of understanding, the embodiments of the present invention provide specific implementation methods for corner correction and edge correction, as shown in Method 1 to Method 2 below:

[0049] Method 1: For the corner correction process, please refer to (A1) to (A4) below for specific implementation:

[0050] (A1) If the initial strip patch model includes folds, divide the initial strip patch model into a first sub-patch model and a second sub-patch model. See [link to relevant documentation]. Figure 5 The diagram shown is a schematic of an initial strip patch. Figure 5 The diagram illustrates the initial strip patch model before and after correction, as well as the first and second sub-pattern models, which are the two sides of the fold.

[0051] (A2) Calculate the dot product between the first vector corresponding to the first sub-patch model and the second vector corresponding to the second sub-patch model, and calculate the modulus between the first and second vectors. In one embodiment, the first vector is denoted as ab, the second vector is denoted as bc, and then the dot product between vectors ab and bc is calculated, as well as the modulus between vectors ab and bc is calculated.

[0052] (A3) Determine the hypotenuse width corresponding to the bend angle based on the dot product and the modulus. In one implementation, the cosine value can be obtained by calculating the quotient of the modulus and the dot product, and the angle value of the bend angle can be solved by the inverse cosine. Then, the hypotenuse width corresponding to the bend angle can be determined based on the angle value.

[0053] (A4) The width of the initial strip patch is corrected based on the width of the hypotenuse. In one embodiment, the width of the hypotenuse can be used as the width of the first sub-patch model and the second sub-patch model to achieve the width correction of the initial strip patch.

[0054] Method 2: For edge correction processing, please refer to (B1) to (B3) below for specific implementation:

[0055] (B1) Generate virtual points corresponding to each edge point in the initial strip patch model. The edge points are the points at both ends of the initial strip patch model. In one implementation, two additional virtual points can be added at both ends of the initial strip patch model. Specifically, an empty point with coordinate 0 can be added at the beginning and end of the aforementioned scribing parameter array; this empty point is the virtual point.

[0056] (B2) In response to a virtual point position adjustment operation, the edge point is moved based on the virtual point's movement trajectory to adjust its position. In one implementation, the edge point can be moved by moving the virtual point, thereby aligning the edge point.

[0057] (B3) In response to an orientation adjustment operation for a virtual point, control the rotation of the edge point based on the virtual point's rotation angle to adjust the normal orientation of the edge point. See, for an example... Figure 6 The diagram shows the effect of edge correction processing. By controlling the orientation of two virtual points, the rotation of the edge points can be achieved. Specifically, the orientation of the two ends of the initial strip patch model can be corrected based on the input tangent orientation to achieve matching of the model edges.

[0058] Step d involves assigning a scribing material to the target stripe patch model to obtain the surface scribing corresponding to the virtual model. The scribing material includes a delayed decal material. In one implementation, a delayed decal material can be assigned to the target stripe patch model. Specifically, in the material shader, realistic groove effects can be simulated by adding normals, ambient occlusion, parallax effects, etc. Figure 7 The diagram shows a schematic of the surface markings on a model.

[0059] In one implementation, the model surface has at least one scribing line. After generating multiple scribing lines, each scribing line needs to be attached to the virtual skeleton of the virtual model. In practical applications, if multiple scribing lines are drawn, Niagara systems are generated multiple times at the attachment points. All Niagara systems in the same skeleton are attached to the skeleton using the same set of coordinate correction algorithms.

[0060] In summary, the method for generating scribing lines in a virtual model provided by this invention first involves manually retopologically analyzing an initial patch model, extracting and exporting pre-distributed point data from the initial patch model, and then loading the pre-distributed point data into the engine. During game execution, clickable markers can be generated based on the pre-distributed point data, and these markers are attached to the virtual skeleton. When the player interacts with a marker, the corresponding pre-distributed point data is passed to a parameter interface to generate scribing lines. Delayed decal materials are then applied to the scribing lines, and finally, the scribing lines are attached to the virtual skeleton. This method is based on manually generating pre-distributed points on the model surface, calculating and storing the required data. During interactive drawing in the game, this data is called, and scribing lines are generated using the Niagara system. After being corrected using a coordinate transformation algorithm, the scribing lines are attached to the character's animation skeleton and given realistic materials, achieving a perfect fusion between the drawn scribing lines and the original model, resulting in a neat and aesthetically pleasing effect. This invention transforms the original appearance decoration into an effect that can be customized by the player. The engraving becomes one of the modification gameplay elements, thereby significantly improving the richness and playability of the game. Moreover, it can reduce the number of engravings that need to be pre-made during the data preparation stage, thereby reducing the cost of model production.

[0061] Regarding the method for generating scribing lines in a virtual model provided in the foregoing embodiments, this invention provides an apparatus for generating scribing lines in a virtual model. (See [link to previous document]). Figure 8 The diagram shows a structural schematic of a device for generating scribing lines in a virtual model. This device mainly includes the following components:

[0062] Point data loading module 802 is used to load pre-distributed point data corresponding to the virtual model;

[0063] The marker point generation module 804 is used to generate marker points corresponding to each pre-distributed point data; wherein, the marker points are associated with the virtual skeleton of the virtual model;

[0064] The scribing generation module 806 is used to generate scribing lines on the model surface corresponding to the virtual model based on the pre-distributed point data corresponding to at least one target marker point among the marker points.

[0065] The virtual model scribing generation device provided in this embodiment of the invention can generate corresponding marker points based on pre-distributed point data corresponding to the pre-configured virtual model when the scribing function is activated. This allows players to select at least one target marker point from the marker points and generate corresponding scribing lines on the model surface based on the pre-distributed point data corresponding to the target marker point. This reduces the difficulty for players to customize and draw scribing lines, significantly improves the aesthetics of the scribing lines, and enhances the richness and playability of the game.

[0066] In one embodiment, the above-described apparatus further includes a point data generation module, configured to: respond to a patch topology operation on a virtual model to obtain an initial patch model corresponding to the virtual model; wherein the initial patch model includes a plurality of points evenly distributed, and the edges of the initial patch model are aligned with the edges of the virtual model; determine the normal orientation data, tangent orientation data, texture color data, and driving skeleton data of each point in the initial patch model to obtain pre-distributed point data corresponding to the virtual model; wherein the pre-distributed point data is classified and stored based on the driving skeleton data.

[0067] In one embodiment, the above-mentioned device further includes a first attachment module, configured to: acquire rotation data corresponding to the virtual model, and bone coordinate data of the virtual skeleton in the local coordinate system where the virtual model is located; determine the target point coordinate data of the pre-distributed point data in the local coordinate system based on the rotation data; and attach the pre-distributed point data to the virtual skeleton based on the matching relationship between the bone coordinate data and the target point coordinate data.

[0068] In one implementation, the first connection module is further configured to: calculate the product of the initial point coordinate data of the pre-distributed point data and the inverse matrix of the rotated data to obtain the intermediate point coordinate data; and perform coordinate system transformation on the intermediate point coordinate data to obtain the target point coordinate data in the local coordinate system.

[0069] In one embodiment, the scribing generation module 806 is further configured to: respond to a selection operation for a marker point, determine at least one target marker point, and extract pre-distributed point data corresponding to each target marker point; generate an initial strip patch model based on the pre-distributed point data corresponding to each target marker point; perform correction processing on the initial strip patch model to obtain a target strip patch model; and assign scribing material to the target strip patch model to obtain the scribing on the model surface corresponding to the virtual model.

[0070] In one implementation, the scribing generation module 806 is further configured to: integrate the pre-distributed point data corresponding to each target marker point into a scribing parameter array according to the selection order of the selection operation; pass the scribing parameter array to the parameter interface corresponding to the pre-created niagara system; and generate an initial strip patch in the niagara system based on the target point coordinate data in the scribing parameter array.

[0071] In one embodiment, the correction process includes corner correction processing; the scribing generation module 806 is further configured to: if the initial strip patch model includes a corner, divide the initial strip patch model into a first sub-pattern model and a second sub-pattern model; calculate the dot product between the first vector corresponding to the first sub-pattern model and the second vector corresponding to the second sub-pattern model, and calculate the modulus between the first vector and the second vector; determine the hypotenuse width corresponding to the corner based on the dot product and the modulus; and correct the width of the initial strip patch according to the hypotenuse width.

[0072] In one embodiment, the correction process includes edge correction processing; the scribing generation module 806 is further configured to: generate virtual points corresponding to each edge point in the initial strip patch model; in response to a position adjustment operation for the virtual points, control the movement of the edge points based on the movement trajectory of the virtual points to adjust the position of the edge points; in response to an orientation adjustment operation for the virtual points, control the rotation of the edge points based on the rotation angle of the virtual points to adjust the normal orientation of the edge points.

[0073] In one embodiment, the number of surface scribing lines on the model is at least one; the device further includes a second attachment module for attaching each surface scribing line to the virtual skeleton of the virtual model.

[0074] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0075] This invention provides a terminal device, specifically, the terminal device includes a processor and a storage device; the storage device stores a computer program, which is executed by the processor when it runs:

[0076] A method for generating scribing lines in a virtual model includes: loading pre-distributed point data corresponding to the virtual model; generating a marker point corresponding to each pre-distributed point data; wherein the marker point is associated with the virtual skeleton of the virtual model; and generating scribing lines on the model surface corresponding to the virtual model based on the pre-distributed point data corresponding to at least one target marker point among the marker points.

[0077] In one embodiment, the method further includes: responding to a patch topology operation for a virtual model to obtain an initial patch model corresponding to the virtual model; wherein the initial patch model includes a plurality of points evenly distributed, and the edges of the initial patch model are aligned with the edges of the virtual model; determining the normal orientation data, tangent orientation data, texture color data, and driving bone data of each point in the initial patch model to obtain pre-distributed point data corresponding to the virtual model; wherein the pre-distributed point data is classified and stored based on the driving bone data.

[0078] In one implementation, after generating the marker point corresponding to each pre-distributed point data, the method further includes: acquiring the rotation data corresponding to the virtual model, and the bone coordinate data of the virtual skeleton in the local coordinate system where the virtual model is located; determining the target point coordinate data of the pre-distributed point data in the local coordinate system based on the rotation data; and attaching the pre-distributed point data to the virtual skeleton based on the matching relationship between the bone coordinate data and the target point coordinate data.

[0079] In one implementation, the step of determining the target point coordinate data of the pre-distributed point data in the local coordinate system based on the rotation data includes: calculating the product of the initial point coordinate data of the pre-distributed point data and the inverse matrix of the rotation data to obtain the intermediate point coordinate data; and performing coordinate system transformation on the intermediate point coordinate data to obtain the target point coordinate data in the local coordinate system.

[0080] In one implementation, the step of generating surface scribings for a virtual model based on pre-distributed point data corresponding to at least one target marker among the marker points includes: responding to a selection operation for a marker point, determining at least one target marker point, and extracting pre-distributed point data corresponding to each target marker point; generating an initial strip patch model based on the pre-distributed point data corresponding to each target marker point; performing a correction process on the initial strip patch model to obtain a target strip patch model; and assigning scribing material to the target strip patch model to obtain surface scribings for the virtual model.

[0081] In one implementation, the step of generating an initial strip patch model based on the pre-distributed point data corresponding to each target marker point includes: integrating the pre-distributed point data corresponding to each target marker point into a scribing parameter array according to the selection order of the selection operation; passing the scribing parameter array to the parameter interface corresponding to the pre-created niagara system; and generating an initial strip patch in the niagara system based on the target point coordinate data in the scribing parameter array.

[0082] In one embodiment, the correction process includes corner correction processing; the step of correcting the initial strip patch model includes: if the initial strip patch model includes corners, dividing the initial strip patch model into a first sub-pattern model and a second sub-pattern model; calculating the dot product between a first vector corresponding to the first sub-pattern model and a second vector corresponding to the second sub-pattern model, and calculating the modulus between the first vector and the second vector; determining the hypotenuse width corresponding to the corner based on the dot product and the modulus; and correcting the width of the initial strip patch according to the hypotenuse width.

[0083] In one embodiment, the correction process includes edge correction processing; the step of correcting the initial strip patch model includes: generating a virtual point corresponding to each edge point in the initial strip patch model; in response to a position adjustment operation for the virtual point, controlling the movement of the edge point based on the movement trajectory of the virtual point to adjust the position of the edge point; in response to an orientation adjustment operation for the virtual point, controlling the rotation of the edge point based on the rotation angle of the virtual point to adjust the normal orientation of the edge point.

[0084] In one embodiment, the number of surface scribing lines on the model is at least one; after the step of assigning scribing material to the target strip patch model to obtain the surface scribing lines of the virtual model, the method further includes: attaching each surface scribing line of the model to the virtual skeleton of the virtual model.

[0085] The terminal device provided in this embodiment of the invention can generate corresponding marker points based on pre-distributed point data corresponding to a pre-configured virtual model when the scribing function is activated. This allows players to select at least one target marker point from the marker points and generate corresponding scribing lines on the model surface based on the pre-distributed point data corresponding to the target marker point. This reduces the difficulty for players to customize and draw scribing lines, significantly improves the aesthetics of the scribing lines, and enhances the richness and playability of the game.

[0086] Figure 9 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. The terminal device 100 includes: a processor 90, a memory 91, a bus 92, and a communication interface 93. The processor 90, the communication interface 93, and the memory 91 are connected through the bus 92. The processor 90 is used to execute executable modules, such as computer programs, stored in the memory 91.

[0087] The memory 91 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 93 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0088] Bus 92 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0089] The memory 91 is used to store programs. After receiving an execution instruction, the processor 90 executes the programs. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 90 or implemented by the processor 90.

[0090] The processor 90 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 90 or by instructions in software form. The processor 90 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 91. Processor 90 reads the information in memory 91 and, in conjunction with its hardware, completes the steps of the above method.

[0091] The computer program product of the readable storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code, wherein the program code includes instructions that can be executed:

[0092] A method for generating scribing lines in a virtual model includes: loading pre-distributed point data corresponding to the virtual model; generating a marker point corresponding to each pre-distributed point data; wherein the marker point is associated with the virtual skeleton of the virtual model; and generating scribing lines on the model surface corresponding to the virtual model based on the pre-distributed point data corresponding to at least one target marker point among the marker points.

[0093] In one embodiment, the method further includes: responding to a patch topology operation for a virtual model to obtain an initial patch model corresponding to the virtual model; wherein the initial patch model includes a plurality of points evenly distributed, and the edges of the initial patch model are aligned with the edges of the virtual model; determining the normal orientation data, tangent orientation data, texture color data, and driving bone data of each point in the initial patch model to obtain pre-distributed point data corresponding to the virtual model; wherein the pre-distributed point data is classified and stored based on the driving bone data.

[0094] In one implementation, after generating the marker point corresponding to each pre-distributed point data, the method further includes: acquiring the rotation data corresponding to the virtual model, and the bone coordinate data of the virtual skeleton in the local coordinate system where the virtual model is located; determining the target point coordinate data of the pre-distributed point data in the local coordinate system based on the rotation data; and attaching the pre-distributed point data to the virtual skeleton based on the matching relationship between the bone coordinate data and the target point coordinate data.

[0095] In one implementation, the step of determining the target point coordinate data of the pre-distributed point data in the local coordinate system based on the rotation data includes: calculating the product of the initial point coordinate data of the pre-distributed point data and the inverse matrix of the rotation data to obtain the intermediate point coordinate data; and performing coordinate system transformation on the intermediate point coordinate data to obtain the target point coordinate data in the local coordinate system.

[0096] In one implementation, the step of generating surface scribings for a virtual model based on pre-distributed point data corresponding to at least one target marker among the marker points includes: responding to a selection operation for a marker point, determining at least one target marker point, and extracting pre-distributed point data corresponding to each target marker point; generating an initial strip patch model based on the pre-distributed point data corresponding to each target marker point; performing a correction process on the initial strip patch model to obtain a target strip patch model; and assigning scribing material to the target strip patch model to obtain surface scribings for the virtual model.

[0097] In one implementation, the step of generating an initial strip patch model based on the pre-distributed point data corresponding to each target marker point includes: integrating the pre-distributed point data corresponding to each target marker point into a scribing parameter array according to the selection order of the selection operation; passing the scribing parameter array to the parameter interface corresponding to the pre-created niagara system; and generating an initial strip patch in the niagara system based on the target point coordinate data in the scribing parameter array.

[0098] In one embodiment, the correction process includes corner correction processing; the step of correcting the initial strip patch model includes: if the initial strip patch model includes corners, dividing the initial strip patch model into a first sub-pattern model and a second sub-pattern model; calculating the dot product between a first vector corresponding to the first sub-pattern model and a second vector corresponding to the second sub-pattern model, and calculating the modulus between the first vector and the second vector; determining the hypotenuse width corresponding to the corner based on the dot product and the modulus; and correcting the width of the initial strip patch according to the hypotenuse width.

[0099] In one embodiment, the correction process includes edge correction processing; the step of correcting the initial strip patch model includes: generating a virtual point corresponding to each edge point in the initial strip patch model; in response to a position adjustment operation for the virtual point, controlling the movement of the edge point based on the movement trajectory of the virtual point to adjust the position of the edge point; in response to an orientation adjustment operation for the virtual point, controlling the rotation of the edge point based on the rotation angle of the virtual point to adjust the normal orientation of the edge point.

[0100] In one embodiment, the number of surface scribing lines on the model is at least one; after the step of assigning scribing material to the target strip patch model to obtain the surface scribing lines of the virtual model, the method further includes: attaching each surface scribing line of the model to the virtual skeleton of the virtual model.

[0101] The readable storage medium provided in this embodiment of the invention can generate corresponding marker points based on pre-distributed point data corresponding to a pre-configured virtual model when the scribing function is activated. This allows players to select at least one target marker point from the marker points and generate corresponding scribing lines on the model surface based on the pre-distributed point data corresponding to the target marker point. This reduces the difficulty for players to customize and draw scribing lines, significantly improves the aesthetics of the scribing lines, and enhances the richness and playability of the game.

[0102] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0103] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for generating a ruled line in a virtual model, characterized by, include: Load the pre-distributed point data corresponding to the virtual model; Generate a marker point corresponding to each of the pre-distributed point data; wherein, the marker point is associated with the virtual skeleton of the virtual model; Based on the pre-distributed point data corresponding to at least one target marker among the marker points, generating the model surface scribing corresponding to the virtual model includes: responding to a selection operation for the marker point, determining at least one target marker point, and extracting the pre-distributed point data corresponding to each target marker point; generating an initial strip patch model based on the pre-distributed point data corresponding to each target marker point; performing a correction process on the initial strip patch model to obtain a target strip patch model; and assigning a scribing material to the target strip patch model to obtain the model surface scribing corresponding to the virtual model.

2. The method of claim 1, wherein, The method further includes: In response to a patch topology operation on the virtual model, an initial patch model corresponding to the virtual model is obtained; wherein the initial patch model includes a plurality of points evenly distributed, and the edges of the initial patch model are aligned with the edges of the virtual model; The normal orientation data, tangent orientation data, texture color data, and driving bone data of each point in the initial patch model are determined to obtain the pre-distributed point data corresponding to the virtual model; wherein, the pre-distributed point data is classified and stored based on the driving bone data.

3. The method according to claim 1, characterized in that, After the step of generating the marker point corresponding to each of the pre-distributed point data, the method further includes: Obtain the rotation data corresponding to the virtual model, and the bone coordinate data of the virtual skeleton in the local coordinate system where the virtual model is located; Based on the rotation data, determine the target point coordinates of the pre-distributed point data in the local coordinate system; Based on the matching relationship between the skeleton coordinate data and the target point coordinate data, the pre-distributed point data is attached to the virtual skeleton.

4. The method according to claim 3, characterized in that, The step of determining the target point coordinates of the pre-distributed point data in the local coordinate system based on the rotation data includes: The intermediate point coordinates are obtained by multiplying the initial point coordinates of the pre-distributed point data with the inverse matrix of the rotated data. The coordinate system of the intermediate point coordinate data is transformed to obtain the target point coordinate data in the local coordinate system.

5. The method of claim 1, wherein, The step of generating an initial strip patch model based on the pre-distributed point data corresponding to each target marker point includes: According to the selection order of the selection operation, the pre-distributed point data corresponding to each target marker point are integrated into a scribing parameter array; The array of scribing parameters is passed to the parameter interface corresponding to the pre-created niagara system. In the niagara system, an initial strip patch is generated based on the target point coordinate data in the scribing parameter array.

6. The method of claim 1, wherein, The correction process includes angle correction; the step of correcting the initial strip patch model includes: If the initial strip patch model includes a bend, the initial strip patch model is divided into a first sub-patch model and a second sub-patch model. Calculate the dot product between the first vector corresponding to the first sub-patch model and the second vector corresponding to the second sub-patch model, and calculate the modulus between the first vector and the second vector; Based on the dot product and the modulus, determine the width of the hypotenuse corresponding to the fold angle; The width of the initial strip surface is corrected based on the width of the hypotenuse.

7. The method of claim 1, wherein, The correction process includes edge correction processing; the step of correcting the initial strip patch model includes: Generate virtual points corresponding to each edge point in the initial strip patch model; In response to a position adjustment operation on the virtual point, the edge point is moved based on the movement trajectory of the virtual point to adjust its position; In response to an orientation adjustment operation for the virtual point, the edge point is rotated based on the rotation angle of the virtual point to adjust the normal orientation of the edge point.

8. The method of claim 1, wherein, The number of surface scribing lines on the model is at least one; after the step of assigning scribing material to the target strip patch model to obtain the surface scribing lines corresponding to the virtual model, the method further includes: Each of the surface scribing lines of the model is attached to the virtual skeleton of the virtual model.

9. A device for generating scribing lines in a virtual model, characterized in that, include: The point data loading module is used to load the pre-distributed point data corresponding to the virtual model; The marker point generation module is used to generate marker points corresponding to each of the pre-distributed point data; wherein, the marker points are associated with the virtual skeleton of the virtual model; A scribing generation module is used to generate scribings on the model surface of the virtual model based on the pre-distributed point data corresponding to at least one target marker among the marker points. The module includes: responding to a selection operation for the marker points, determining at least one target marker point, and extracting the pre-distributed point data corresponding to each target marker point; generating an initial stripe patch model based on the pre-distributed point data corresponding to each target marker point; performing a correction process on the initial stripe patch model to obtain a target stripe patch model; and assigning scribing material to the target stripe patch model to obtain the scribings on the model surface of the virtual model.

10. A terminal device, comprising: The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 8.

11. A computer readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method according to any one of claims 1 to 8.