Virtual object rendering method and apparatus, terminal device, and storage medium

By determining the correspondence of surface parameters and vertex matching between virtual objects, the problem of material limitations in the prior art is solved, and seamless matching of virtual decorations between different virtual objects is achieved, thus improving the user experience.

CN116173499BActive Publication Date: 2026-01-02NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310009556.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2026-01-02
Estimated Expiration
2043-01-04

AI Technical Summary

Technical Problem

In existing technologies, cloth unwrapping algorithms are only applicable to virtual clothing made of soft materials and cannot effectively match virtual characters of different body types, which has significant limitations.

Method used

By determining the correspondence between the surface parameters of the first virtual object and the second virtual object, the vertices of the target virtual decoration are determined from the vertices of the first virtual object, and the target virtual decoration is rendered on the surface of the second virtual object according to the correspondence, thus achieving material-independent matching.

Benefits of technology

This allows the target virtual decoration to match both the first and second virtual objects, making it widely applicable and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116173499B_ABST
    Figure CN116173499B_ABST
Patent Text Reader

Abstract

The application provides a virtual object rendering method and device, terminal equipment and storage medium, and relates to the technical field of computers. The method comprises the following steps: determining the corresponding relationship between the first surface parameter of a first virtual object and the second surface parameter of a second virtual object, and the surface of the first virtual object is pre-rendered with a target virtual decoration; determining the first vertex corresponding to a target vertex in the target virtual decoration from the vertex of the first virtual object; determining the second vertex corresponding to the target vertex from the vertex of the second virtual object according to the first vertex corresponding to the target vertex and the corresponding relationship; and rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex. The target virtual decoration can be matched with the first virtual object and the second virtual object, and the virtual decoration with any material can be matched with different virtual objects, so that the application range is wide, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a virtual object rendering method and device, terminal equipment and storage medium. BACKGROUND

[0002] In the game scene, there is usually a virtual character, and the virtual character can wear a virtual costume. The virtual character can change different virtual costumes, so that the virtual character can wear different virtual costumes, or the same virtual costume is set on different virtual characters. The change of the virtual costume of the virtual character has also become a research hotspot.

[0003] In the related art, if the material of the virtual costume is ordinary cloth or silk soft material, the virtual costume can be made by using the plate method of the clothing design auxiliary tool. In this way, the virtual costume can be matched with virtual characters of different body types by using the cloth solving method.

[0004] However, in the related art, the cloth solving method is only applicable to virtual costumes made of soft materials, and cannot match virtual characters of different body types for virtual costumes made of other materials, which has great limitations. SUMMARY

[0005] The present application aims to solve the problem that the cloth solving method in the related art is only applicable to virtual costumes made of soft materials, and cannot match virtual characters of different body types for virtual costumes made of other materials, which has great limitations.

[0006] To achieve the above-mentioned purpose, the technical solutions adopted by the embodiments of the present application are as follows:

[0007] In a first aspect, the embodiments of the present application provide a virtual object rendering method, comprising:

[0008] determining the correspondence between the first surface parameters of the first virtual object and the second surface parameters of the second virtual object, and the surface of the first virtual object is pre-rendered with a target virtual decoration;

[0009] determining the first vertex corresponding to the target vertex in the target virtual decoration from the vertices of the first virtual object;

[0010] According to the first vertex corresponding to the target vertex and the correspondence, determining the second vertex corresponding to the target vertex from the vertices of the second virtual object;

[0011] According to the second vertex corresponding to the target vertex, rendering the target virtual decoration on the surface of the second virtual object.

[0012] In a second aspect, the embodiments of the present application further provide a virtual object rendering device, comprising:

[0013] a determining module configured to determine a correspondence between a first surface parameter of a first virtual object and a second surface parameter of a second virtual object, the surface of the first virtual object being pre-rendered with a target virtual decoration; determine, from vertices of the first virtual object, a first vertex corresponding to a target vertex in the target virtual decoration; determine, from vertices of the second virtual object, a second vertex corresponding to the target vertex according to the first vertex corresponding to the target vertex and the correspondence;

[0014] a rendering module configured to render the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex.

[0015] In a third aspect, the embodiments of the present application further provide a terminal device, comprising a memory and a processor, the memory stores a computer program executable by the processor, and the processor implements the virtual object rendering method of any one of the first aspect when executing the computer program.

[0016] In a fourth aspect, the embodiments of the present application further provide a computer readable storage medium, the storage medium stores a computer program, and the computer program is read and executed to implement the virtual object rendering method of any one of the first aspect.

[0017] The embodiments of the present application provide a virtual object rendering method, comprising: determining a correspondence between a first surface parameter of a first virtual object and a second surface parameter of a second virtual object, the surface of the first virtual object being pre-rendered with a target virtual decoration; determining, from vertices of the first virtual object, a first vertex corresponding to a target vertex in the target virtual decoration; determining, from vertices of the second virtual object, a second vertex corresponding to the target vertex according to the first vertex corresponding to the target vertex and the correspondence; and rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex. Based on the first vertex corresponding to the target vertex and the correspondence, the second vertex corresponding to the target vertex is determined from the vertices of the second virtual object, and accordingly the target virtual decoration can be rendered on the surface of the second virtual object, so that the target virtual decoration can match the first virtual object and the second virtual object, and is not limited by the material of the virtual decoration. The virtual object of any material can match different virtual objects, and the application range is wide, and the user experience is improved. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as limiting the scope, and for those of ordinary skill in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0019] Figure 1 A flowchart of a virtual object rendering method provided by an embodiment of the present application is shown in FIG. 3.

[0020] Figure 2 A flowchart of a virtual object rendering method provided by an embodiment of the present application is shown in FIG. 3.

[0021] Figure 3 A flowchart of a virtual object rendering method provided by an embodiment of the present application is shown in FIG. 3.

[0022] Figure 4 A comparison diagram before and after smoothing provided by an embodiment of the present application is shown in FIG. 5.

[0023] Figure 5 A flowchart of a virtual object rendering method provided by an embodiment of the present application is shown in FIG. 3.

[0024] Figure 6 A diagram showing that a virtual object is provided with a plurality of annular rings is shown in FIG. 6.

[0025] Figure 7 A flowchart of a virtual object rendering method provided by an embodiment of the present application is shown in FIG. 3.

[0026] Figure 8 A structural diagram of a virtual object rendering device provided by an embodiment of the present application is shown in FIG. 7.

[0027] Figure 9 A structural diagram of a terminal device provided by an embodiment of the present application is shown in FIG. 8. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments.

[0029] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0030] In the description of this application, it should be noted that if the terms "upper", "lower", etc. appear to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship that the product of this application is usually placed in, it is only for the convenience of describing this application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0031] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.

[0033] In related technologies, if the material of virtual clothing is ordinary fabric or soft materials like silk, pattern making tools can be used to create virtual clothing. This allows for the use of fabric analysis to match virtual clothing to virtual characters of different body types. However, in these technologies, the fabric analysis algorithm is only applicable to virtual clothing made of soft materials. It cannot match virtual clothing made of other materials to virtual characters of different body types, presenting a significant limitation.

[0034] To solve the above technical problems in the related art, the embodiment of the present application provides a virtual object rendering method, which comprises: determining a corresponding relationship between a first surface parameter of a first virtual object and a second surface parameter of a second virtual object, the surface of the first virtual object being pre-rendered with a target virtual decoration; determining a first vertex corresponding to a target vertex in the target virtual decoration from vertices of the first virtual object; determining a second vertex corresponding to the target vertex from vertices of the second virtual object according to the first vertex corresponding to the target vertex and the corresponding relationship; and rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex. The first vertex corresponding to the target vertex in the target virtual decoration in the first virtual object is determined; the second vertex corresponding to the target vertex is determined from the vertices of the second virtual object based on the corresponding relationship between the first surface parameter of the first virtual object and the second surface parameter of the second virtual object and the first vertex corresponding to the target vertex, and then the target virtual decoration is rendered on the surface of the second virtual object, so that the target virtual decoration can be matched with the first virtual object and the second virtual object, and is not limited by the material of the virtual decoration, and can be matched with different virtual objects for any material of the virtual decoration, has a wide range of application, and improves the user experience.

[0035] The virtual object rendering method provided in the embodiment of the present application can be applied to a terminal device, which can be any of the following: a desktop computer, a notebook computer, a tablet computer, a smart phone, and the like.

[0036] The virtual object rendering method provided in the embodiment of the present application is explained and described below.

[0037] Figure 1 A flowchart of the virtual object rendering method provided in the embodiment of the present application is shown in FIG. 1, which can comprise the following steps. Figure 1

[0038] In S101, a corresponding relationship between a first surface parameter of a first virtual object and a second surface parameter of a second virtual object is determined.

[0039] In the embodiment of the present application, the surface of the first virtual object is pre-rendered with a target virtual decoration.

[0040] In the embodiment of the present application, the first surface parameter of the first virtual object can be a first surface parameter of a vertex in the first virtual object, and the second surface parameter of the second virtual object can be a second surface parameter of a vertex in the second virtual object.

[0041] It should be noted that the first surface parameter of the target part of the first virtual object corresponds to the second surface parameter of the target part of the second virtual object, and examples of the target part include a shoulder part, a waist part, an elbow part, a nose, and the like.​

[0042] For example, the target virtual decoration can be a virtual clothing or a virtual fur, etc. In addition, the first virtual object and the second virtual object can both be virtual characters, or both be virtual pets, or can be other types of virtual objects, and the embodiments of the present application do not specifically limit this.

[0043] S102, from the vertices of the first virtual object, determine a first vertex corresponding to a target vertex in the target virtual decoration.

[0044] The number of target vertices can be multiple, and the number of vertices of the first virtual object can also be multiple. In some embodiments, from the multiple vertices of the first virtual object, a first vertex corresponding to each target vertex in the target virtual decoration is determined.

[0045] S103, according to the first vertex corresponding to the target vertex and the corresponding relationship, determine a second vertex corresponding to the target vertex from the vertices of the second virtual object.

[0046] The vertices of the second virtual object can also be multiple vertices. According to the corresponding relationship between the first vertex corresponding to the target vertex, the first body surface parameters of the vertices in the first virtual object, and the second body surface parameters of the vertices in the second virtual object, the second vertex corresponding to the target vertex can be determined.

[0047] It should be noted that after determining the second vertex corresponding to each target vertex, the position of each target vertex with respect to the second virtual object is determined.

[0048] S104, according to the second vertex corresponding to the target vertex, render the target virtual decoration on the surface of the second virtual object.

[0049] When the first virtual object and the second virtual object are both virtual characters, the first virtual object and the second virtual object can be virtual characters of different sizes.

[0050] In some embodiments, according to the second vertex corresponding to the target vertex, the position of each target vertex with respect to the second virtual object is determined, and then according to the position of each target vertex with respect to the second virtual object, the target virtual decoration can be rendered on the surface of the second virtual object.

[0051] It should be noted that the target virtual decoration originally rendered on the surface of the first virtual object, and the target virtual decoration is rendered on the surface of the second virtual object by performing the above steps S101-S104. At this time, the surface of the first virtual object can still render the target virtual decoration, or the surface of the first virtual object no longer renders the target virtual decoration, and the embodiments of the present application do not make specific limitations. Rendering the target virtual decoration on the surface of the first virtual object or the second virtual object realizes the matching of the target virtual object with different virtual objects.

[0052] In summary, the embodiments of the present application provide a virtual object rendering method, which comprises: determining the corresponding relationship between the first surface parameter of the first virtual object and the second surface parameter of the second virtual object, and the surface of the first virtual object is pre-rendered with a target virtual decoration; determining the first vertex corresponding to the target vertex in the target virtual decoration from the vertices of the first virtual object; determining the second vertex corresponding to the target vertex from the vertices of the second virtual object according to the first vertex corresponding to the target vertex and the corresponding relationship; and rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex. Based on the first vertex corresponding to the target vertex and the corresponding relationship, the second vertex corresponding to the target vertex is determined from the vertices of the second virtual object, and the target virtual decoration can be rendered on the surface of the second virtual object accordingly, so that the target virtual decoration can be matched with the first virtual object and the second virtual object, and is not limited by the material of the virtual decoration. Any material virtual decoration can be matched with different virtual objects, and the application range is wider, and the user experience is improved.

[0053] Optionally, determining the first vertex corresponding to the target vertex in the target virtual decoration from the vertices of the first virtual object comprises:

[0054] Determining the first vertex corresponding to the target vertex from the vertices of the first virtual object comprises: determining the first vertex closest to the target vertex from the vertices of the first virtual object, and obtaining the first vertex corresponding to the target vertex.

[0055] In some embodiments, the first vertex corresponding to each target vertex is determined from the plurality of vertices of the first virtual object, and the first vertex corresponding to each target vertex is obtained. Wherein, the first vertex corresponding to each target vertex can be determined in sequence, or the first vertex corresponding to each target vertex can be determined simultaneously, and the embodiments of the present application do not make specific limitations.

[0056] For example, the target virtual decoration can be represented as ClothA, the first virtual object can be represented as BodyA, and the point in BodyA closest to the target vertex A in ClothA can be represented as PosA.

[0057] In some embodiments, the KD Tree algorithm (a data structure and corresponding algorithm used to find the nearest neighbor of a multi-dimensional vector) can be used to divide the first virtual object in X, Y and Z directions, compare the target vertex with the median in X, Y and Z directions, determine the target region in the first virtual object, and determine the first vertex corresponding to the target vertex from the vertices of the target region in the first virtual object. The efficiency of finding the first vertex corresponding to the target vertex is improved.

[0058] Optionally, Figure 2 A flowchart of a virtual object rendering method provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the process of determining the second vertex corresponding to the target vertex from the vertices of the second virtual object according to the first vertex corresponding to the target vertex and the correspondence relationship in S103 can include: Figure 2

[0059] S201, determining the second vertex corresponding to the first vertex from the vertices of the second virtual object according to the first vertex and the correspondence relationship.

[0060] In some embodiments, the second vertex corresponding to the first vertex can be determined according to the correspondence relationship between the first surface parameters of the first virtual object and the second surface parameters of the second virtual object, the first vertex being a vertex in the first virtual object, and the second vertex being a vertex in the second virtual object.

[0061] S202, taking the target vertex corresponding to the first vertex as the target vertex corresponding to the second vertex.

[0062] The target vertex corresponding to the second vertex can also be understood as the second vertex corresponding to the target vertex.

[0063] For example, the target virtual decoration can be represented as ClothA, the first virtual object can be represented as BodyA, and the second virtual object can be represented as BodyB. The point in BodyA closest to the target vertex A in ClothA can be represented as PosA, the point in BodyB corresponding to PosA can be represented as PosB, and the second vertex corresponding to the target vertex A in ClothA can be represented as PosB.

[0064] Optionally, the process of rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex in S104 can include:

[0065] rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex, the skeletal binding data of the target virtual decoration and the weight data.

[0066] ​The skeleton binding data and the weight data of the target virtual decoration can be the skeleton binding data and the weight data of the target virtual decoration when the target virtual decoration is bound to the first virtual object.

[0067] In some embodiments, the target virtual decoration is generated on the surface of the second virtual object according to the second vertex corresponding to the target vertex, and then the target virtual decoration is rendered on the surface of the second virtual object according to the skeleton binding data and the weight data of the target virtual decoration when the target virtual decoration is bound to the first virtual object.

[0068] In summary, the skeleton binding data and the weight data of the target virtual decoration when the target virtual decoration is bound to the first virtual object are used as the skeleton binding data and the weight data of the target virtual decoration for the second virtual object, which can improve the efficiency of skeleton binding and weight brushing, save time, and reduce the cycle of resource iteration.

[0069] Optionally, the first vertex is a vertex of a plurality of joint parts in the first virtual object, the target vertex is a vertex corresponding to a plurality of joint parts in the target virtual decoration, and the second vertex is a vertex of a plurality of joint parts in the second virtual object.

[0070] It should be noted that determining the correspondence between the vertices corresponding to the plurality of joint parts can reduce the amount of calculation and improve the calculation efficiency. The vertices of the non-joint parts can be directly reserved, thereby improving the production time of the clothing mesh of the target virtual decoration.

[0071] Of course, the first vertex is all or part of the vertices in the first virtual object, the target vertex is all or part of the vertices in the target virtual decoration, and the second vertex is all or part of the vertices in the second virtual object.

[0072] In summary, determining the correspondence between the vertices corresponding to the plurality of key parts can reduce the amount of calculation and improve the calculation efficiency. The Laplacian coordinates of the vertices of the non-key parts can be directly reserved, thereby preserving the original features of the target virtual decoration.

[0073] Optionally, Figure 3 A flowchart of a virtual object rendering method provided by an embodiment of the present application is shown in FIG. 1. Figure 3 As shown in FIG. 1, before the process of rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex in S104, the method can further include:

[0074] S301, reserving other vertices of the target virtual decoration except the target vertex.

[0075] The shape of the non-joint parts in the target virtual ornament can be fitted according to the Laplace coordinates of the other vertices in the target virtual ornament by reserving the Laplace coordinates of the other vertices in the target virtual ornament.

[0076] It should be noted that the vertices can form a mesh, and when the three-dimensional mesh is deformed, the original local mesh information needs to be reserved as much as possible, and the deformed mesh is smooth. The Laplace mesh deformation method is adopted. The physical meaning of the Laplace coordinates is the weighted average of the coordinates of a point and the coordinates of the neighboring points, which can be used to represent local information. As long as the Laplace coordinates are kept as much as possible after deformation, the local information of the mesh can be kept as much as possible. Therefore, the Laplace coordinates of the other vertices in the target virtual ornament are adopted, and the shape of the non-joint parts in the target virtual ornament is reserved.

[0077] In addition, the Laplace coordinates can be represented as follows:

[0078]

[0079] wherein δ i represents the Laplace coordinates of the i th vertex, represents X, Y, and Z components of the Laplace coordinates, v i represents three-dimensional coordinates of the i th vertex, represents a weight, v j represents three-dimensional coordinates of the j th vertex.

[0080] In the embodiments of the present application, the weight can be a cotangent weight, that is, the average of the cotangents of the adjacent angles. The formula can be represented as: Of course, the weight can also be a uniform weight, that is, the reciprocal of the number of adjacent vertices. The embodiments of the present application do not specifically limit this.

[0081] S302, processing the other vertices to obtain processed other vertices.

[0082] In the embodiments of the present application, a preset algorithm can be used to smooth the other vertices to obtain the processed other vertices.

[0083] In the embodiments of the present application, the original straight line and smooth curve information formed by the other vertices will be destroyed. For fitting a curve for discrete points or fitting the original local shape after mesh deformation, an algorithm is needed for shape fitting. The preset algorithm is used to smooth the other vertices to obtain the processed other vertices.

[0084] The process of rendering the target virtual ornament on the surface of the second virtual object according to the second vertex corresponding to the target vertex in S104 can include:

[0085] According to the second vertex corresponding to the target vertex and the processed other vertices, the target virtual decoration is rendered on the surface of the second virtual object.

[0086] In the embodiments of the present application, part of the target virtual decoration can be rendered on the surface of the plurality of joints of the second virtual object according to the second vertex corresponding to the target vertex; and part of the target virtual decoration can be rendered on the surface of the plurality of non-joints of the second virtual object according to the Laplace coordinates of the other vertices in the target virtual decoration, so as to render the target virtual decoration on the surface of the second virtual object.

[0087] Optionally, the process of processing the other vertices to obtain the processed other vertices in S302 can include: performing smoothing processing on the other vertices by using a least square method to obtain the processed other vertices.

[0088] In some embodiments, the originally straight line and smooth curve information of the Laplace coordinates of the other vertices can be destroyed, and the least square method is used for curve fitting to restore the information, and the places where the curvature changes greatly can be actively smoothed to obtain the processed other vertices; and the target virtual decoration is rendered on the surface of the second virtual object based on the processed other vertices, so that the rendering effect is better.

[0089] It should be noted that the embodiments of the present application can also provide a tool for manually processing smoothing.

[0090] Figure 4 A comparison diagram before and after smoothing processing provided by the embodiments of the present application is shown in (a) of FIG. 8, which is not subjected to smoothing processing and has too large curvature change; and (b) of FIG. 8 shows that the area with too large curvature is processed to be relatively smooth after smoothing processing. Figure 4 Figure 4

[0091] Optionally, Figure 5 A flowchart of a virtual object rendering method provided by the embodiments of the present application is shown in FIG. 10, and the process of determining the first surface parameters of the first virtual object in S101 can include: Figure 5

[0092] S501, a plurality of circular rings are arranged on the surface of the first virtual object.

[0093] In some embodiments, a plurality of bones in the first virtual object are determined, and the start point and the end point of each bone are determined, and the position, direction and bone length of each bone are known, and a preset number of virtual circular rings are arranged between the start point and the end point of each bone, so that the plurality of virtual circular rings are arranged on the surface of the first virtual object.

[0094] ​​​For example, the bipedal human-like skeleton is generally shaped similarly, often adopting a T pose / A pose standing skeleton, and the skeletons of different human models may be different in details, but generally can be one-to-one corresponding, such as left hand to left hand, right upper arm to right upper arm, etc. Therefore, a preset number of virtual rings can be set between the starting point and the terminal of each bone, realizing the setting of multiple rings.

[0095] Optionally, the body surface rings can be automatically calculated by using a Biped skeleton (the Biped skeleton is a two-legged animal system provided in 3dmax).

[0096] The virtual ring can be perpendicular to the skeleton in the first virtual object.

[0097] Figure 6 A schematic diagram of a virtual object provided by an embodiment of the present application is shown in FIGS. (a) and (b) of Figure 6 The body surface of the virtual object is provided with a plurality of virtual rings.

[0098] S502, determining a first surface parameter of a vertex in the first virtual object according to the plurality of rings and the vertex in the first virtual object.

[0099] The first surface parameter of the vertex in the first virtual object can be determined according to the relative positional relationship between the plurality of rings and the vertex in the first virtual object.

[0100] Optionally, Figure 7 A flowchart of a virtual object rendering method provided by an embodiment of the present application is shown in FIG. Figure 7 The process of determining the first surface parameter of the vertex in the first virtual object according to the plurality of rings and the vertex in the first virtual object in S502 can include:

[0101] S601, determining a ring corresponding to a vertex in the first virtual object.

[0102] The ring corresponding to each vertex in the first virtual object can be the two rings closest to each vertex, and the vertex is between the two rings.

[0103] S602, determining a first surface parameter of a vertex in the first virtual object according to a ring corresponding to the vertex in the first virtual object.

[0104] In some embodiments, the relative position relationship can be calculated by interpolation for the vertex in the first virtual object, and the vertex A can be represented by coordinates: [torus 1, torus 2, interpolation, torus rotation angle, distance from the center of the torus], and the entire surface can be represented by this representation method to obtain the first surface parameter of the vertex in the first virtual object.

[0105] Optionally, a plurality of toruses are arranged on the surface of the second virtual object; and the second surface parameter of the vertex in the second virtual object is determined according to the plurality of toruses and the vertex in the second virtual object.

[0106] The process of determining the second surface parameter of the vertex in the second virtual object according to the torus corresponding to the vertex in the second virtual object can include:

[0107] The torus corresponding to the vertex in the second virtual object is determined; and the second surface parameter of the vertex in the second virtual object is determined according to the torus corresponding to the vertex in the second virtual object.

[0108] It should be noted that the process of determining the first surface parameter of the first virtual object is similar to the process of determining the second surface parameter of the second virtual object, which will not be described here.

[0109] As described above, the torus corresponding to the vertex in the first virtual object is determined; and the first surface parameter of the vertex in the first virtual object is determined according to the torus corresponding to the vertex in the first virtual object. The parameterization of the vertex in the first virtual object is realized.

[0110] In summary, the embodiment of the present application provides a virtual object rendering method, which includes: determining the corresponding relationship between the first surface parameter of the first virtual object and the second surface parameter of the second virtual object, and the surface of the first virtual object is pre-rendered with a target virtual decoration; determining the first vertex corresponding to the target vertex in the target virtual decoration from the vertex of the first virtual object; determining the second vertex corresponding to the target vertex from the vertex of the second virtual object according to the first vertex corresponding to the target vertex and the corresponding relationship; and rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex. Based on the first vertex corresponding to the target vertex and the corresponding relationship, the second vertex corresponding to the target vertex is determined from the vertex of the second virtual object, and accordingly the target virtual decoration can be rendered on the surface of the second virtual object, so that the target virtual decoration can be matched with the first virtual object and the second virtual object, and is not limited by the material of the virtual decoration. The virtual decoration of any material can be matched with different virtual objects, and the application range is wide, and the user experience is improved.

[0111] Moreover, the vertex is smoothed, and the rendering effect is better; only the corresponding relationship between the vertices corresponding to the plurality of joint parts is determined, the calculation amount is reduced, the calculation efficiency is improved, the vertices of non-joint parts can be directly reserved; the efficiency of the bone binding and the weight brushing is improved, the time is saved, and the resource iteration period is reduced.

[0112] The following describes a virtual object rendering device, an electronic device, and a storage medium for performing the virtual object rendering method provided in the present application, and the specific implementation process and technical effects are described above in relation to the virtual object rendering method. The following will not be described again.

[0113] Figure 8 A structural schematic diagram of a virtual object rendering device provided by an embodiment of the present application is shown in FIG. 1. Figure 8 As shown in FIG. 1, the device can include:

[0114] A determination module 701 is configured to determine a corresponding relationship between a first surface parameter of a first virtual object and a second surface parameter of a second virtual object, the surface of the first virtual object being pre-rendered with a target virtual decoration; determine a first vertex corresponding to a target vertex in the target virtual decoration from vertices of the first virtual object; and determine a second vertex corresponding to the target vertex from vertices of the second virtual object according to the first vertex corresponding to the target vertex and the corresponding relationship.

[0115] A rendering module 702 is configured to render the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex.

[0116] Optionally, the determination module 701 is specifically configured to determine a first vertex closest to the target vertex from the vertices of the first virtual object, to obtain the first vertex corresponding to the target vertex.

[0117] Optionally, the determination module 701 is specifically configured to determine a second vertex corresponding to the first vertex from the vertices of the second virtual object according to the first vertex and the corresponding relationship; and take the target vertex corresponding to the first vertex as a target vertex corresponding to the second vertex.

[0118] Optionally, the rendering module 702 is specifically configured to render the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex, bone binding data of the target virtual decoration, and weight data.

[0119] Optionally, the first vertex is a vertex of a plurality of joint parts in the first virtual object, the target vertex is a vertex corresponding to the plurality of joint parts in the target virtual decoration, and the second vertex is a vertex of the plurality of joint parts in the second virtual object.

[0120] Optionally, the device further includes:

[0121] a reservation module configured to reserve other vertices in the target virtual decoration except the target vertex;

[0122] a processing module configured to process the other vertices to obtain processed other vertices;

[0123] The rendering module 702 is specifically configured to render the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex and the processed other vertices.

[0124] Optionally, the processing module is specifically configured to perform smoothing processing on the other vertices by using a least square method to obtain the processed other vertices.

[0125] Optionally, the determining module 701 is specifically configured to set a plurality of annular rings on the surface of the first virtual object, and determine first surface parameters of the vertices in the first virtual object according to the plurality of annular rings and the vertices in the first virtual object.

[0126] Optionally, the determining module 701 is specifically configured to determine an annular ring corresponding to a vertex in the first virtual object, and determine first surface parameters of the vertex in the first virtual object according to the annular ring corresponding to the vertex in the first virtual object.

[0127] The device is used for executing the method provided in the foregoing embodiments, and has similar implementation principles and technical effects, which will not be described herein again.

[0128] The modules above can be one or more integrated circuits configured to implement the methods above, for example, one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of a processing element scheduling code, the processing element can be a general-purpose processor, for example, a Central Processing Unit (CPU) or other processor capable of invoking program code. For another example, the modules can be integrated together to be implemented in the form of a system-on-a-chip (SOC).

[0129] Figure 9 A structural schematic diagram of a terminal device provided for an embodiment of the present application is provided, and the terminal device includes a processor 801 and a memory 802.

[0130] The memory 802 is configured to store a program, and the processor 801 invokes the program stored in the memory 802 to execute the method embodiments described above. The specific implementation manners and technical effects are similar, and will not be repeated here.

[0131] For example, the method can include:

[0132] Determining a correspondence relationship between a first surface parameter of a first virtual object and a second surface parameter of a second virtual object, and a surface of the first virtual object is pre-rendered with a target virtual decoration;

[0133] From the vertices of the first virtual object, determining a first vertex corresponding to a target vertex in the target virtual decoration;

[0134] According to the first vertex corresponding to the target vertex and the correspondence relationship, determining a second vertex corresponding to the target vertex from the vertices of the second virtual object;

[0135] According to the second vertex corresponding to the target vertex, rendering the target virtual decoration on the surface of the second virtual object.

[0136] Optionally, the determining of the first vertex corresponding to the target vertex in the target virtual decoration from the vertices of the first virtual object includes:

[0137] From the vertices of the first virtual object, determining a first vertex closest to the target vertex to obtain the first vertex corresponding to the target vertex.

[0138] Optionally, the second vertex corresponding to the target vertex is determined from vertices of the second virtual object according to the first vertex and the correspondence.

[0139] The second vertex corresponding to the first vertex is determined from vertices of the second virtual object according to the first vertex and the correspondence.

[0140] The target vertex corresponding to the first vertex is taken as a target vertex corresponding to the second vertex.

[0141] Optionally, the second vertex corresponding to the target vertex is used to render the target virtual decoration on a surface of the second virtual object.

[0142] The target virtual decoration is rendered on the surface of the second virtual object according to the second vertex corresponding to the target vertex, the skeletal binding data of the target virtual decoration and the weight data.

[0143] Optionally, the first vertex is a vertex of a plurality of joint parts in the first virtual object, the target vertex is a vertex corresponding to the plurality of joint parts in the target virtual decoration, and the second vertex is a vertex of the plurality of joint parts in the second virtual object.

[0144] Optionally, before the target virtual decoration is rendered on the surface of the second virtual object according to the second vertex corresponding to the target vertex, the method further includes:

[0145] The other vertices except the target vertex in the target virtual decoration are reserved.

[0146] The other vertices are processed to obtain processed other vertices.

[0147] The target virtual decoration is rendered on the surface of the second virtual object according to the second vertex corresponding to the target vertex.

[0148] The target virtual decoration is rendered on the surface of the second virtual object according to the second vertex corresponding to the target vertex and the processed other vertices.

[0149] Optionally, processing the other vertices to obtain the processed other vertices includes:

[0150] The other vertices are smoothed by using a least square method to obtain the processed other vertices.

[0151] Optionally, the first surface parameter of the first virtual object is determined.

[0152] a plurality of tori are set on the surface of the first virtual object;

[0153] a first surface parameter of a vertex in the first virtual object is determined according to the plurality of tori and the vertex in the first virtual object.

[0154] Optionally, the first surface parameter of the vertex in the first virtual object is determined according to the corresponding torus of the vertex in the first virtual object.

[0155] a torus corresponding to the vertex in the first virtual object is determined.

[0156] the first surface parameter of the vertex in the first virtual object is determined according to the torus corresponding to the vertex in the first virtual object.

[0157] According to the above, based on the first vertex corresponding to the target vertex and the corresponding relationship, the second vertex corresponding to the target vertex is determined from the vertices of the second virtual object, so that the target virtual decoration can be rendered on the surface of the second virtual object, so that the target virtual decoration can match the first virtual object and the second virtual object, and is not limited by the material of the virtual decoration. The virtual decoration of any material can match different virtual objects, has a wide range of applications, and improves the user experience.

[0158] Optionally, the present application also provides a program product, for example, a computer readable storage medium, comprising a program which, when executed by a processor, is used to execute the above-mentioned method embodiments.

[0159] Optionally, the method can comprise:

[0160] a corresponding relationship between a first surface parameter of a first virtual object and a second surface parameter of a second virtual object is determined, a surface of the first virtual object being pre-rendered with a target virtual decoration;

[0161] a first vertex corresponding to a target vertex in the target virtual decoration is determined from vertices of the first virtual object;

[0162] a second vertex corresponding to the target vertex is determined from vertices of the second virtual object according to the first vertex corresponding to the target vertex and the corresponding relationship;

[0163] the target virtual decoration is rendered on the surface of the second virtual object according to the second vertex corresponding to the target vertex.

[0164] Optionally, the first vertex corresponding to the target vertex in the target virtual decoration is determined from the vertices of the first virtual object.

[0165] Determine, from the vertices of the first virtual object, a first vertex closest to the target vertex, to obtain a first vertex corresponding to the target vertex.

[0166] Optionally, the determining, from the vertices of the second virtual object, a second vertex corresponding to the target vertex according to the first vertex corresponding to the target vertex and the correspondence relationship comprises:

[0167] Determine, from the vertices of the second virtual object, a second vertex corresponding to the first vertex according to the first vertex and the correspondence relationship.

[0168] Take the target vertex corresponding to the first vertex as the target vertex corresponding to the second vertex.

[0169] Optionally, the second vertex corresponding to the target vertex comprises:

[0170] Render the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex, the skeletal binding data of the target virtual decoration and the weight data.

[0171] Optionally, the first vertex is a vertex of a plurality of joint parts in the first virtual object, the target vertex is a vertex corresponding to the plurality of joint parts in the target virtual decoration, and the second vertex is a vertex of the plurality of joint parts in the second virtual object.

[0172] Optionally, before the rendering of the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex, the method further comprises:

[0173] Reserve other vertices of the target virtual decoration except the target vertex.

[0174] Process the other vertices to obtain processed other vertices.

[0175] The rendering of the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex comprises:

[0176] Render the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex and the processed other vertices.

[0177] Optionally, the processing of the other vertices to obtain processed other vertices comprises:

[0178] Smooth the other vertices by using a least square method to obtain processed other vertices.

[0179] Optionally, the determining the first surface parameter of the first virtual object comprises:

[0180] A plurality of annular rings are set on the surface of the first virtual object.

[0181] According to the plurality of annular rings and the vertex in the first virtual object, the first surface parameter of the vertex in the first virtual object is determined.

[0182] Optionally, the determining the first surface parameter of the first virtual object comprises:

[0183] The annular ring corresponding to the vertex in the first virtual object is determined.

[0184] According to the annular ring corresponding to the vertex in the first virtual object, the first surface parameter of the vertex in the first virtual object is determined.

[0185] In summary, based on the first vertex corresponding to the target vertex and the correspondence relationship, the second vertex corresponding to the target vertex is determined from the vertices of the second virtual object, and accordingly the target virtual decoration can be rendered on the surface of the second virtual object, so that the target virtual decoration can match the first virtual object and can match the second virtual object, and is not limited by the material of the virtual decoration. For virtual decorations of any material, different virtual objects can be matched, the application range is wider, and the user experience is improved.

[0186] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, which can be electrical, mechanical or other forms.

[0187] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0188] In addition, each of the function units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software function unit.

[0189] The integrated unit realized in the form of software function unit can be stored in a computer readable storage medium. The software function unit stored in a storage medium includes a plurality of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (English: Read-Only Memory, for short: ROM), a random access memory (English: Random Access Memory, for short: RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0190] The above is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method of rendering a virtual object, the method comprising: The method comprises the following steps: determining a correspondence between a first surface parameter of a first virtual object and a second surface parameter of a second virtual object, a surface of the first virtual object being pre-rendered with a target virtual decoration; wherein the first virtual object and the second virtual object are different virtual objects; from vertices of the first virtual object, determining a first vertex corresponding to a target vertex in the target virtual decoration; from the first vertex corresponding to the target vertex and the correspondence, determining a second vertex corresponding to the target vertex from vertices of the second virtual object; rendering the target virtual decoration on a surface of the second virtual object according to the second vertex corresponding to the target vertex; the determining of the second vertex corresponding to the target vertex from the vertices of the second virtual object according to the first vertex corresponding to the target vertex and the correspondence comprises: determining a second vertex corresponding to the first vertex from the vertices of the second virtual object according to the first vertex and the correspondence; taking the target vertex corresponding to the first vertex as the target vertex corresponding to the second vertex.

2. The method of claim 1, wherein, the determining of the first vertex corresponding to the target vertex from the vertices of the first virtual object comprises: determining a first vertex closest to the target vertex from the vertices of the first virtual object, to obtain the first vertex corresponding to the target vertex.

3. The method of claim 1, wherein, the rendering of the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex comprises: rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex, skeleton binding data of the target virtual decoration and weight data.

4. The method of claim 1, wherein, the first vertex is a vertex of a plurality of joint parts in the first virtual object, the target vertex is a vertex corresponding to the plurality of joint parts in the target virtual decoration, and the second vertex is a vertex of the plurality of joint parts in the second virtual object.

5. The method of claim 4, wherein, before the rendering of the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex, the method further comprises: reserving other vertices of the target virtual decoration except the target vertex; processing the other vertices to obtain processed other vertices; the rendering of the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex comprises: rendering the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex and the processed other vertices.

6. The method of claim 5, wherein, the processing of the other vertices to obtain the processed other vertices comprises: adopting a least square method to perform smoothing processing on the other vertices to obtain the processed other vertices.

7. The method of claim 1, wherein, the determining of the first surface parameter of the first virtual object comprises: setting a plurality of annular rings on a body surface of the first virtual object; determining the first surface parameter of the vertices in the first virtual object according to the plurality of annular rings and the vertices in the first virtual object.

8. The method of claim 7, wherein, The first surface parameter of the vertex in the first virtual object is determined according to the plurality of tori and the vertex in the first virtual object, including: A torus corresponding to the vertex in the first virtual object is determined; The first surface parameter of the vertex in the first virtual object is determined according to the torus corresponding to the vertex in the first virtual object.

9. A virtual object rendering apparatus, comprising: Comprising: A determining module is configured to determine a corresponding relationship between a first surface parameter of a first virtual object and a second surface parameter of a second virtual object, the surface of the first virtual object being pre-rendered with a target virtual decoration, wherein the first virtual object and the second virtual object are different virtual objects; determine a first vertex corresponding to a target vertex in the target virtual decoration from vertices of the first virtual object; determine a second vertex corresponding to the target vertex from vertices of the second virtual object according to the first vertex corresponding to the target vertex and the corresponding relationship; A rendering module is configured to render the target virtual decoration on the surface of the second virtual object according to the second vertex corresponding to the target vertex. The determining module is specifically configured to determine a second vertex corresponding to the first vertex from vertices of the second virtual object according to the first vertex and the corresponding relationship; and take the target vertex corresponding to the first vertex as a target vertex corresponding to the second vertex.

10. A terminal device, comprising: Comprising: A memory and a processor, the memory storing a computer program executable by the processor, and the processor implements the virtual object rendering method in any one of claims 1-8 when executing the computer program.

11. A computer readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is read and executed to implement the virtual object rendering method in any one of claims 1-8.

Citation Information

Patent Citations

  • Real-time rendering method and device and terminal

    CN109718554A

  • Virtual garment rendering method and device

    CN115471595A