Chain object display method and device, equipment and storage medium
By building a physical model including line segments and pendant nodes, and calculating the rotation angle information about the axis based on image data, the problem of poor virtual trial-oning effect of chain objects in the prior art is solved, and a more realistic physical simulation and display effect is achieved. .
Patent Information
- Application Number
- CN202311058236.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-21
AI Technical Summary
In the field of virtual jewelry trial-wearing, by simplifying chain objects such as necklaces into fine cloth strips and physically simulating based on fabric simulation algorithms, the user's trial-wearing effect on chain objects is poor.
Provide a chain object display method, by obtaining a physical model of the target chain object, the model consists of line segments and multiple pendant nodes, the pendant nodes and line segments form a triangle, and obtain the axis of the line segment corresponding to the pendant node based on the image to be processed Rotation angle information calculates the rotation angle information about each line segment, and then performs physical simulation and display.
Through more accurate physical simulation, the display effect of chain objects is improved and the user's virtual trial-on experience is improved.
Smart Images

Figure CN119494938A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to a chain-like object display method, device, equipment and storage medium. Background Art
[0002] With the continuous development of artificial intelligence technology, augmented reality AR technology has been applied in various industries, such as virtual makeup, virtual clothes fitting, virtual glasses fitting, and virtual jewelry fitting.
[0003] In the field of virtual jewelry try-on, jewelry such as necklaces are usually simplified into thin cloth strips for physical simulation. In other words, the physical simulation of chain objects such as necklaces is currently implemented based on cloth simulation algorithms, thereby presenting the effect of virtual try-on to users on the front-end interface.
[0004] However, since the movement characteristics of chain-like objects such as necklaces are different from those of cloth, simplifying them into thin cloth strips and performing physical simulation on them entirely based on cloth simulation algorithms will result in poor results for users to try on chain-like objects such as necklaces. Summary of the invention
[0005] In order to solve the above technical problems, an embodiment of the present disclosure provides a method for displaying chain-like objects.
[0006] In a first aspect, the present disclosure provides a method for displaying a chain-like object, the method comprising:
[0007] In response to a preset interaction request for a target chain-like object, a physical model of the target chain-like object is obtained; wherein the physical model is composed of line segments obtained by modeling the target chain-like object and a plurality of pendant nodes, and the plurality of pendant nodes respectively form triangles with corresponding line segments;
[0008] Based on the image to be processed, obtaining the rotation angle information about the axis of the line segment corresponding to the pendant node in the physical model; wherein the target chain-shaped object is displayed on the image to be processed;
[0009] Determine the rotation angle information about the axis of each line segment in the physical model based on the rotation angle information about the axis of the line segment corresponding to the pendant node;
[0010] The target chain object is displayed based on the rotation angle information about the axis of each line segment in the physical model.
[0011] In an optional implementation, determining the rotation angle information about the axis of each line segment in the physical model based on the rotation angle information about the axis of the line segments corresponding to the at least two pendant nodes respectively includes:
[0012] Interpolation calculation is performed based on the axis rotation angle information of the line segments respectively corresponding to the at least two pendant nodes to obtain the axis rotation angle information of each line segment in the physical model.
[0013] In an optional embodiment, the physical model of the target chain-like object includes a first type of pendant node and a second type of pendant node, the first type of pendant node is a pendant node obtained by modeling the pendant object in the target chain-like object, and the second type of pendant node is a virtual node added in the physical model.
[0014] In an optional implementation, the angle between adjacent pendant nodes in the physical model is no greater than a preset angle threshold.
[0015] In an optional implementation, the displaying of the target chain-shaped object based on the rotation angle information about the axis of each line segment in the physical model includes:
[0016] Based on the rotation angle information about each line segment in the physical model, a physical simulation is performed on the target chain-shaped object to obtain a physical simulation result;
[0017] The target chain object is displayed according to the physical simulation result.
[0018] In an optional implementation, distance constraints are set between the line segments having a connection relationship in the physical model, and the physical simulation of the target chain-like object is performed based on the rotation angle information about the axis of each line segment in the physical model to obtain the physical simulation result, including:
[0019] Based on the distance constraint condition and the rotation angle information of each line segment in the physical model, cloth simulation is performed on the target chain-like object to obtain a physical simulation result.
[0020] In an optional implementation manner, in response to a preset interaction request for a target chain-like object, obtaining a physical model of the target chain-like object includes:
[0021] In response to a request for trying on a target chain-like object, obtaining a physical model of the target chain-like object;
[0022] Correspondingly, the step of obtaining the rotation angle information about the axis of the line segments respectively corresponding to the at least two pendant nodes in the physical model includes:
[0023] Based on the trial wearing picture captured in real time by the camera, the rotation angle information about the axis of the line segments respectively corresponding to the at least two pendant nodes in the physical model is obtained.
[0024] In a second aspect, an embodiment of the present disclosure provides a chain-shaped object display device, the device comprising:
[0025] A first acquisition module is used to acquire a physical model of the target chain-like object in response to a preset interaction request for the target chain-like object; wherein the physical model is composed of line segments obtained by modeling the target chain-like object and a plurality of pendant nodes, and the plurality of pendant nodes respectively form triangles with corresponding line segments;
[0026] A second acquisition module is used to acquire the rotation angle information about the axis of the line segment corresponding to the pendant node in the physical model based on the image to be processed; wherein the target chain object is displayed on the image to be processed;
[0027] A first determination module, configured to determine the rotation angle information about the axis of each line segment in the physical model based on the rotation angle information about the axis of the line segment corresponding to the pendant node;
[0028] A display module is used to display the target chain object based on the rotation angle information about each line segment in the physical model.
[0029] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the above method.
[0030] In a fourth aspect, the present disclosure provides a chain object display device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0031] In a fifth aspect, the present disclosure provides a computer program product, wherein the computer program product comprises a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.
[0032] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:
[0033] The embodiment of the present disclosure provides a method for displaying a chain-like object. When a preset interaction request for a target chain-like object is received, the physical model of the target chain-like object is first obtained, wherein the physical model is composed of line segments obtained by modeling the target chain-like object and a plurality of pendant nodes, and the plurality of pendant nodes respectively form triangles with the corresponding line segments. Secondly, based on the image to be processed, the rotation angle information of the line segments corresponding to the pendant nodes in the physical model of the target chain-like object is obtained, and based on the rotation angle information of the line segments corresponding to the pendant nodes, the rotation angle information of each line segment in the physical model is calculated, and then the target chain-like object is displayed based on the rotation angle information of each line segment. The embodiment of the present disclosure models the target chain-like object into a physical model including line segments and a plurality of pendant nodes, and the pendant nodes and the corresponding line segments form a triangle, forming a stable constraint on the radial direction of the line segments. Based on the stable constraint formed on the radial direction of the line segments, the target chain-like object is physically simulated, which can improve the physical simulation effect of the target chain-like object, thereby improving the display effect of the target chain-like object. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] Figure 1 A flowchart of a chain-like object display method provided by an embodiment of the present disclosure;
[0037] Figure 2 A schematic diagram of the structure of a physical model of a target chain-like object provided in an embodiment of the present disclosure;
[0038] Figure 3 A schematic structural diagram of a chain-shaped object display device provided in an embodiment of the present disclosure;
[0039] Figure 4 A schematic structural diagram of a chain-shaped object display device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0040] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0041] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0042] Augmented Reality (AR) technology refers to the real-time interaction of information and data by superimposing virtual information with real environment images. The virtual-real blend of augmented reality turns the entire world around the user into an interactive object, becoming a new mode of information interaction. The application scope of augmented reality technology in life is becoming wider and wider.
[0043] Chain-like objects refer to objects with a chain-like structure, such as bracelets, necklaces and other accessories.
[0044] Physical simulation refers to a simulation experiment based on the similarity of physical quantities between the physical model and the prototype. Specifically, the physical model is established based on the similarity theory. The laws between certain quantities obtained from experiments on the physical model are then deduced back to the prototype, thereby gaining an understanding of the regularity of the prototype.
[0045] In the field of virtual jewelry trying on, currently only cloth simulation algorithms are used to physically simulate virtual jewelry, that is, virtual jewelry is simplified into thin cloth strips. However, since the movement characteristics of virtual jewelry are different from those of cloth, the current virtual jewelry trying on effect is not good.
[0046] To this end, the embodiment of the present disclosure provides a chain object display method. When a preset interaction request for a target chain object is received, the physical model of the target chain object is first obtained, wherein the physical model is composed of line segments obtained by modeling the target chain object and multiple pendant nodes, and the multiple pendant nodes respectively form triangles with the corresponding line segments. Secondly, based on the image to be processed, the rotation angle information of the line segments corresponding to the pendant nodes in the physical model of the target chain object is obtained, and based on the rotation angle information of the line segments corresponding to the pendant nodes, the rotation angle information of each line segment in the physical model is calculated, and then, the target chain object is physically simulated based on the rotation angle information of each line segment. The embodiment of the present disclosure models the target chain object into a physical model including line segments and multiple pendant nodes, and the pendant nodes and the corresponding line segments form a triangle, forming a stable constraint on the radial direction of the line segment. Based on the stable constraint formed on the radial direction of the line segment, the target chain object is displayed, which can improve the physical simulation effect of the target chain object, thereby improving the virtual try-on effect presented to the user.
[0047] In addition, since the physical model of the target chain-like object in the embodiment of the present disclosure is composed of one-dimensional line segments, physical simulation of the target chain-like object based on the physical model designed in the embodiment of the present disclosure can optimize system performance to a large extent.
[0048] Based on this, the present disclosure provides a method for displaying chain-like objects. Figure 1 , is a flow chart of a chain object display method provided by an embodiment of the present disclosure, the method specifically comprising:
[0049] S101: In response to a preset interaction request for a target chain-like object, a physical model of the target chain-like object is acquired.
[0050] The physical model is composed of line segments obtained by modeling the target chain-like object and a plurality of pendant nodes, and the plurality of pendant nodes respectively form triangles with the corresponding line segments.
[0051] The chain object display method provided by the embodiment of the present disclosure can be applied to a terminal device, such as a client device deployed with the chain object display method. The target chain object may include objects with a chain structure such as necklaces and bracelets, and the pendant node refers to a pendant on the target chain object, such as a pendant on a necklace or bracelet.
[0052] In the disclosed embodiment, the target chain-like object is modeled in advance to obtain a physical model of the target chain-like object, and a corresponding relationship between the target chain-like object and the physical model is established.
[0053] Specifically, in the modeling process, a plurality of line segments having a connection relationship and forming a chain structure are used to simulate the target chain object, and the pendant objects in the target chain object are simulated as pendant nodes to obtain a physical model of the target chain object.
[0054] Distance constraints are set between the connected line segments in the physical model to form a ring structure. If physical simulation is performed based only on distance constraints, it is easy to cause the target chain object in the physical simulation effect to have abnormal simulation states such as wrong flipping posture and frequent changes. Therefore, the embodiment of the present disclosure adds a pendant node to the physical model. Under the influence of gravity and support force (such as the support force provided by the neck and wrist, etc.), the posture of the target chain object at the pendant node is credible. For example, when trying on a bracelet, if you keep flipping your wrist, the bracelet will present a posture that conforms to the actual situation.
[0055] like Figure 2, which is a schematic diagram of a physical model of a target chain-like object provided by an embodiment of the present disclosure, wherein the physical model of the target chain-like object is composed of line segments (including line segment 1) obtained by modeling the target chain-like object and a plurality of pendant nodes (including pendant node 1 and pendant node 2), each pendant node and the corresponding line segment form a triangle, such as pendant node 1 and line segment 2 forming a triangle, see Figure 2 As shown in the dashed box, the triangular structure has stability, therefore, the embodiment of the present disclosure forms radial stability constraints on the line segment by constructing a triangle.
[0056] In the disclosed embodiment, the physical model of the target chain-like object may include only the first type of pendant nodes. In addition, the physical model of the target chain-like object may include the first type of pendant nodes and the second type of pendant nodes. The first type of pendant nodes are pendant nodes obtained by modeling the pendant objects in the target chain-like object, and the second type of pendant nodes are virtual nodes added in the physical model.
[0057] In an optional implementation, if the target chain-like object does not have a pendant object, that is, the prototype of the chain-like object does not have a pendant object, a virtual pendant node can be added to the physical model so that the target chain-like object includes multiple pendant nodes. If the number of pendant nodes in the physical model is not greater than a preset number threshold, at least one virtual node can be added to the physical model as a pendant node. The preset number threshold can be set based on demand, for example, it can be 2.
[0058] In order to ensure the physical model effect on the target chain-like object, the angle between adjacent pendant nodes in the physical model of the target chain-like object is not greater than a preset angle threshold, and the preset angle threshold may be 180 degrees, for example.
[0059] In another optional implementation, if the physical model obtained based on the prototype modeling of the target chain-like object does not have a pendant node or only includes one pendant node, a virtual pendant node can be added to the physical model so that the physical model includes multiple pendant nodes and the angle between adjacent pendant nodes is not greater than a preset angle threshold.
[0060] In addition, if the physical model obtained based on the prototype modeling of the target chain-like object includes multiple pendant nodes, but the angles between adjacent pendant nodes among the multiple pendant nodes are all greater than the preset angle threshold, it is also possible to add virtual pendant nodes to the physical model so that the angle between at least two adjacent pendant nodes in the physical model is not greater than the preset angle threshold.
[0061] In practical applications, the preset interaction request for the target chain-like object may include a try-on request for a target necklace, a target bracelet, etc. When the try-on request for the target necklace or the target bracelet is received, a physical model of the target necklace or the target bracelet is obtained.
[0062] S102: Based on the image to be processed, obtain the rotation angle information about the axis of the line segment corresponding to the pendant node in the physical model.
[0063] Among them, the target chain object is displayed on the image to be processed, and the image to be processed can be one frame or multiple frames of images, for example, one frame or multiple consecutive frames of video images, or one frame or multiple consecutive frames of real-time camera shooting images, etc.
[0064] In an optional implementation, when a preset interaction request for a target chain-like object is received, a physical model of the target chain-like object is obtained. In addition, a camera of the current device is turned on, and based on a camera shot, rotation angle information about an axis of a line segment corresponding to a pendant node in the object model is obtained.
[0065] For example, in a necklace try-on scenario, after the user clicks the try-on control for the target necklace, the camera is turned on to capture the user's necklace try-on position, such as the neck. Based on the camera's captured image, the user can adjust the virtual necklace's try-on angle, etc. For example, the user can adjust the necklace's pendant position. Based on the camera's captured image of the user adjusting the virtual necklace, the axial rotation angle information of the line segment corresponding to the pendant node in the physical model of the target necklace can be obtained. Specifically, by identifying the positions of the key points of the human body in the image captured by the camera (such as using the nodes of the neck and head as the positions of the key points of the human body in the necklace try-on scenario, and using the nodes of the arm, wrist, finger, etc. as the positions of the key points of the human body in the bracelet try-on scenario), the axial rotation angle of the line segment corresponding to the pendant node in the physical model of the target necklace can be obtained. In addition, the implementation method of how to obtain the axial rotation angle information of the line segment corresponding to the pendant node in the physical model based on the camera's captured image is not limited in the embodiments of the present disclosure.
[0066] like Figure 2 As shown, it is assumed that the rotation angle of the line segment (line segment 2) corresponding to the pendant node 1 is A, and the rotation angle of the line segment (line segment 3) corresponding to the pendant node 2 is B.
[0067] S103: Based on the axis rotation angle information of the line segment corresponding to the pendant node, determine the axis rotation angle information of each line segment in the physical model.
[0068] In the disclosed embodiment, after obtaining the axis rotation angle information of the line segments corresponding to the pendant nodes in the physical model of the target chain-like object, the axis rotation angle information of other line segments in the physical model is calculated based on the axis rotation angle information of the line segments corresponding to each pendant node.
[0069] In an optional implementation, the interpolation calculation method can be used to calculate the rotation angle information of other line segments in the physical model. Specifically, the interpolation calculation is performed based on the rotation angle information of the line segments corresponding to the pendant nodes in the physical model to obtain the rotation angle information of each line segment.
[0070] like Figure 2 As shown, assuming that the axis rotation angle of the line segment corresponding to pendant node 1 (line segment 2) is A, and the axis rotation angle of the line segment corresponding to pendant node 2 (line segment 3) is B, then the line segments between line segment 2 and line segment 3 can be obtained based on interpolation calculation. Assuming that there are three line segments between line segment 2 and line segment 3, the axis rotation angles of these three line segments are A+(|AB| / 5), A+2×(|AB| / 5) and A+3×(|AB| / 5) respectively.
[0071] In another optional implementation, other algorithms may be used to calculate the rendering angle information of other line segments based on the rotation angle information of the line segment corresponding to the pendant node. For example, the physical simulation in the embodiment of the present disclosure is implemented using a rigid body collision simulation or cloth simulation algorithm, and the physical simulation result includes the rotation angle information of each line segment. The embodiment of the present disclosure does not limit the method for determining the rendering angle information of each line segment.
[0072] S104: Displaying the target chain-shaped object based on the rotation angle information about each line segment in the physical model.
[0073] In the disclosed embodiment, after obtaining the rotation angle information of each line segment in the target chain-like object, a physical simulation algorithm can be used to perform physical simulation on the target chain-like object, thereby more realistically simulating the prototype motion state of the target chain-like object to enhance the authenticity of the display of the target chain-like object.
[0074] In the disclosed embodiment, based on the rotation angle information about each line segment in the physical model, a physical simulation is performed on the target chain-like object to obtain a physical simulation result; then, the target chain-like object is displayed according to the physical simulation result.
[0075] In an optional implementation, a distance constraint condition is set between adjacent line segments in the physical model of the target chain-like object, which is used to constrain the distance relationship between adjacent line segments during the physical simulation process. Wherein, adjacent line segments refer to line segments with a connection relationship, such as Figure 2 Based on the distance constraint and the rotation angle information of each line segment in the physical model, cloth simulation is performed on the target chain-like object to obtain a physical simulation result, thereby realizing physical simulation of the target chain-like object.
[0076] In another optional implementation, in addition to using the cloth simulation algorithm, other physical simulation algorithms may also be used, which is not limited in the embodiments of the present disclosure.
[0077] In the disclosed embodiment, by setting distance constraints between line segments with connection relationships in the physical model, axial stability constraints are implemented on the line segments in the physical model. In addition, pendant nodes and corresponding line segments form triangles to implement radial stability constraints on the line segments in the physical model. Based on the above-mentioned axial and radial constraints, physical simulation of the target chain-like object is performed, which can more realistically simulate the real display effect of the target chain-like object.
[0078] In the chain object display method provided by the embodiment of the present disclosure, when a preset interaction request for a target chain object is received, the physical model of the target chain object is first obtained, wherein the physical model is composed of line segments obtained by modeling the target chain object and a plurality of pendant nodes, and the plurality of pendant nodes respectively form triangles with the corresponding line segments. Secondly, based on the image to be processed, the rotation angle information of the line segments corresponding to the pendant nodes in the physical model of the target chain object is obtained, and based on the rotation angle information of the line segments corresponding to the pendant nodes, the rotation angle information of each line segment in the physical model is calculated, and then, the target chain object is displayed based on the rotation angle information of each line segment. The embodiment of the present disclosure models the target chain object into a physical model including line segments and a plurality of pendant nodes, and the pendant nodes and the corresponding line segments form a triangle, forming a stable constraint on the radial direction of the line segments, and based on the stable constraint formed on the radial direction of the line segments, the target chain object is physically simulated, which can improve the physical simulation effect of the target chain object, thereby improving the display effect of the target chain object.
[0079] On the basis of the above-mentioned embodiments, the chain-like object display method provided by the embodiments of the present disclosure can be applied to try-on scenarios, for example, try-on scenarios of necklaces, bracelets, etc.
[0080] Specifically, in response to a request for trial wearing of the target chain-like object, the physical model of the target chain-like object is obtained. During the trial wearing process, the camera captures the trial wearing picture in real time, and based on the trial wearing picture captured by the camera in real time, the rotation angle information about the axis of the line segments corresponding to at least two pendant nodes in the physical model of the target chain-like object is obtained. Specifically, the method for obtaining the rotation angle information about the axis is not limited. After obtaining the rotation angle information about the axis of the line segments corresponding to at least two pendant nodes in the physical model, the difference calculation method is used to calculate the rotation angle information about the axis of each line segment in the physical model based on the rotation angle information about the axis of the line segments corresponding to the pendant nodes. After obtaining the rotation angle information about the axis of each line segment in the physical model, the target chain-like object is physically simulated. Then, the target chain-like object after physical simulation is rendered, and the trial wearing effect of the target chain-like object is displayed on the interface.
[0081] Since the embodiment of the present disclosure models the target chain-like object as a physical model including line segments and multiple pendant nodes, and the pendant nodes and the corresponding line segments form a triangle to achieve radial stability constraints on the line segments, therefore, on the basis of the distance constraints between adjacent line segments, adding radial stability constraints on the line segments can enhance the physical simulation effect of the target chain-like object, thereby enhancing the user's trial wearing effect.
[0082] Based on the above method embodiment, the present disclosure also provides a chain-shaped object display device, referring to Figure 3 , is a schematic diagram of the structure of a chain-shaped object display device provided by an embodiment of the present disclosure, the device comprising:
[0083] A first acquisition module 301 is used to acquire a physical model of the target chain-like object in response to a preset interaction request for the target chain-like object; wherein the physical model is composed of line segments obtained by modeling the target chain-like object and a plurality of pendant nodes, and the plurality of pendant nodes respectively form triangles with corresponding line segments;
[0084] The second acquisition module 302 is used to acquire the rotation angle information of the line segment corresponding to the pendant node in the physical model based on the image to be processed; wherein the target chain object is displayed on the image to be processed;
[0085] A first determination module 303, configured to determine the rotation angle information about the axis of each line segment in the physical model based on the rotation angle information about the axis of the line segment corresponding to the pendant node;
[0086] The display module 304 is used to display the target chain object based on the rotation angle information about each line segment in the physical model.
[0087] In an optional implementation manner, the first determining module is specifically configured to:
[0088] Interpolation calculation is performed based on the axis rotation angle information of the line segments respectively corresponding to the at least two pendant nodes to obtain the axis rotation angle information of each line segment in the physical model.
[0089] In an optional embodiment, the physical model of the target chain-like object includes a first type of pendant node and a second type of pendant node, the first type of pendant node is a pendant node obtained by modeling the pendant object in the target chain-like object, and the second type of pendant node is a virtual node added in the physical model.
[0090] In an optional implementation, the angle between adjacent pendant nodes in the physical model is no greater than a preset angle threshold.
[0091] In an optional implementation, the display module includes:
[0092] A physical simulation submodule, used to perform physical simulation on the target chain-like object based on the rotation angle information about the axis of each line segment in the physical model to obtain a physical simulation result;
[0093] The display submodule is used to display the target chain object according to the physical simulation result.
[0094] In an optional implementation manner, distance constraints are set between the line segments having a connection relationship in the physical model, and the physical simulation submodule is specifically used to:
[0095] Based on the distance constraint condition and the rotation angle information of each line segment in the physical model, cloth simulation is performed on the target chain-like object to obtain a physical simulation result.
[0096] In an optional implementation manner, the first acquisition module is specifically configured to:
[0097] In response to a request for trying on a target chain-like object, obtaining a physical model of the target chain-like object;
[0098] Accordingly, the second acquisition module is specifically used for:
[0099] Based on the trial wearing picture captured in real time by the camera, the rotation angle information about the axis of the line segments respectively corresponding to the at least two pendant nodes in the physical model is obtained.
[0100] In the chain-like object display device provided by the embodiment of the present disclosure, when a preset interaction request for a target chain-like object is received, the physical model of the target chain-like object is first obtained, wherein the physical model is composed of line segments obtained by modeling the target chain-like object and a plurality of pendant nodes, and the plurality of pendant nodes respectively form triangles with the corresponding line segments. Secondly, based on the image to be processed, the rotation angle information of the line segments corresponding to the pendant nodes in the physical model of the target chain-like object is obtained, and based on the rotation angle information of the line segments corresponding to the pendant nodes, the rotation angle information of each line segment in the physical model is calculated, and then, the target chain-like object is displayed based on the rotation angle information of each line segment. The embodiment of the present disclosure models the target chain-like object into a physical model including line segments and a plurality of pendant nodes, and the pendant nodes and the corresponding line segments form a triangle, forming a stable constraint on the radial direction of the line segments, and based on the stable constraint formed on the radial direction of the line segments, the target chain-like object is physically simulated, which can improve the physical simulation effect of the target chain-like object, thereby improving the display effect of the target chain-like object.
[0101] In addition to the above-mentioned method and apparatus, the embodiment of the present disclosure further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device implements the chain object display method described in the embodiment of the present disclosure.
[0102] The embodiment of the present disclosure further provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the chain object display method described in the embodiment of the present disclosure is implemented.
[0103] In addition, the present disclosure also provides a chain-shaped object display device, see Figure 4 As shown, it may include:
[0104] Processor 401, memory 402, input device 403 and output device 404. The number of processors 401 in the chain object display device can be one or more. Figure 4 In some embodiments of the present disclosure, the processor 401, the memory 402, the input device 403 and the output device 404 may be connected via a bus or other means, wherein: Figure 4 The example of connecting through bus is taken in the following.
[0105] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing of the chain-like object display device by running the software programs and modules stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The input device 403 can be used to receive input digital or character information, and generate signal input related to user settings and function control of the chain-like object display device.
[0106] Specifically in this embodiment, the processor 401 will load the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 will run the applications stored in the memory 402, thereby realizing various functions of the above-mentioned chain object display device.
[0107] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0108] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for displaying a chain-like object, characterized in that: The method comprises: In response to a preset interaction request for a target chain-like object, a physical model of the target chain-like object is obtained; wherein the physical model is composed of line segments obtained by modeling the target chain-like object and a plurality of pendant nodes, and the plurality of pendant nodes respectively form triangles with corresponding line segments; Based on the image to be processed, obtaining the rotation angle information about the axis of the line segment corresponding to the pendant node in the physical model; wherein the target chain-shaped object is displayed on the image to be processed; Determine the rotation angle information about the axis of each line segment in the physical model based on the rotation angle information about the axis of the line segment corresponding to the pendant node; The target chain object is displayed based on the rotation angle information about the axis of each line segment in the physical model.
2. The method according to claim 1, characterized in that The determining the rotation angle information about the axis of each line segment in the physical model based on the rotation angle information about the axis of the line segments respectively corresponding to the at least two pendant nodes comprises: Interpolation calculation is performed based on the axis rotation angle information of the line segments respectively corresponding to the at least two pendant nodes to obtain the axis rotation angle information of each line segment in the physical model.
3. The method according to claim 1 or 2, characterized in that: The physical model of the target chain-like object includes a first type of pendant node and a second type of pendant node, wherein the first type of pendant node is a pendant node obtained by modeling the pendant objects in the target chain-like object, and the second type of pendant node is a virtual node added in the physical model.
4. The method according to claim 3, characterized in that The angle between adjacent pendant nodes in the physical model is not greater than a preset angle threshold.
5. The method according to claim 1, characterized in that The displaying of the target chain-shaped object based on the rotation angle information about the axis of each line segment in the physical model includes: Based on the rotation angle information about each line segment in the physical model, a physical simulation is performed on the target chain-shaped object to obtain a physical simulation result; The target chain object is displayed according to the physical simulation result.
6. The method according to claim 5, characterized in that Distance constraints are set between the line segments with connection relationships in the physical model, and based on the rotation angle information about the axis of each line segment in the physical model, the target chain-like object is physically simulated to obtain a physical simulation result, including: Based on the distance constraint condition and the rotation angle information of each line segment in the physical model, cloth simulation is performed on the target chain-like object to obtain a physical simulation result.
7. The method according to claim 1, characterized in that The step of obtaining a physical model of the target chain-like object in response to a preset interaction request for the target chain-like object includes: In response to a request for trying on a target chain-like object, obtaining a physical model of the target chain-like object; Correspondingly, the step of obtaining the rotation angle information about the axis of the line segments respectively corresponding to the at least two pendant nodes in the physical model includes: Based on the trial wearing picture captured in real time by the camera, the rotation angle information about the axis of the line segments respectively corresponding to the at least two pendant nodes in the physical model is obtained.
8. A chain-shaped object display device, characterized in that: The device comprises: A first acquisition module is used to acquire a physical model of the target chain-like object in response to a preset interaction request for the target chain-like object; wherein the physical model is composed of line segments obtained by modeling the target chain-like object and a plurality of pendant nodes, and the plurality of pendant nodes respectively form triangles with corresponding line segments; A second acquisition module is used to acquire the rotation angle information about the axis of the line segment corresponding to the pendant node in the physical model based on the image to be processed; wherein the target chain object is displayed on the image to be processed; A first determination module, configured to determine the rotation angle information about the axis of each line segment in the physical model based on the rotation angle information about the axis of the line segment corresponding to the pendant node; A display module is used to display the target chain object based on the rotation angle information about each line segment in the physical model.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 7.
10. A chain-shaped object display device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.