A method, device, equipment and medium for generating a virtual object model in a game

By obtaining and matching the block parts of the benchmark virtual object model, the problem of difficulty in diversification and personalization of virtual object models is solved, and seamless switching of virtual object models and meeting diverse and personalized needs is achieved.

CN115364485BActive Publication Date: 2025-05-13NETEASE (SHANGHAI) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211007360.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2025-05-13
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

The existing technology is difficult to meet the diverse and personalized needs of virtual object models in games, resulting in limited differentiation and personalization of virtual object models.

Method used

By obtaining each benchmark model of the benchmark virtual object, the target virtual object chunking model corresponding to the part to be replaced is determined, and it is matched and unified with the benchmark virtual object chunking model, and the parts to be replaced in the benchmark virtual object model are replaced, thereby generating the target virtual object model.

Benefits of technology

It realizes seamless switching of virtual object chunking models, meets players' aesthetic needs and matching freedom, and improves the diversity and personalization of virtual objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115364485B_ABST
    Figure CN115364485B_ABST
Patent Text Reader

Abstract

The present application discloses a virtual object model generation method, device, equipment and medium, which are applied to the field of computer graphics processing technology to solve the problem that the existing technology is difficult to meet the diversified and personalized needs of players for virtual objects in the game. Specifically, by determining from each reference model of the reference virtual object that has a seam relationship with the target virtual object block model of the part to be replaced as the target reference model, and unifying the normal information of each edge vertex at the seam between the target virtual object block model and each target reference model, the normal direction of each edge vertex at the seam can be standardized, so that the virtual object block model of different parts can be seamlessly switched without affecting the light and shadow effects of the virtual object model, and then the aesthetic needs and matching freedom of the players can be met to a greater extent, and the diversification and personalization of virtual objects in the game can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer graphics processing technology, and in particular to a method, device, equipment and medium for generating a virtual object model in a game. Background Art

[0002] With the development of computer image processing technology and artistic capabilities as well as the improvement of gaming software computing power, the designs of virtual objects such as virtual characters, virtual items, virtual monsters and virtual props in various games, especially massively multiplayer online role-playing games (MMORPGs), are usually highly stylized, which can increase the fun of the game and meet the personalized requirements of players for virtual objects in the game.

[0003] At present, in order to meet the personalized requirements of players for virtual objects in games, it is usually necessary to take into account the diversity of the virtual object's entire body during the production of virtual object models, especially the diversity of facial features during the production of virtual character models. However, for different virtual objects, directly replacing the virtual object model will result in time-consuming and labor-intensive processing and high performance consumption. If the ratio between the virtual object block models is adjusted, the shape of the virtual object model cannot be changed, resulting in limited differentiation and personalization of the virtual object model, making it difficult to meet the diversified and personalized requirements of players for virtual objects in games. Summary of the invention

[0004] The embodiments of the present application provide a method, device, equipment and medium for generating a virtual object model in a game, so as to solve the problem that the virtual object model generation method in the prior art is difficult to meet the diversified and personalized needs of game characters.

[0005] The technical solutions provided by the embodiments of this application are as follows:

[0006] On the one hand, an embodiment of the present application provides a method for generating a virtual object model in a game, comprising:

[0007] Acquire each reference model of the reference virtual object; wherein each reference model includes a reference virtual object model of the reference virtual object and reference virtual object block models corresponding to different parts of the reference virtual object model;

[0008] Determine the target virtual object block model corresponding to the part to be replaced, and determine, from each reference model, each reference model that has a seam relationship with the target virtual object block model as a target reference model;

[0009] Matching edge vertices of the target virtual object block model with edge vertices of each target reference model respectively to obtain edge vertex groups; wherein each edge vertex group includes at least two edge vertices, the at least two edge vertices belong to the target virtual object block model and each target reference model respectively, and at least two edge vertices overlap each other at the seam between the target virtual object block model and each target reference model;

[0010] For each edge vertex group, normal information of at least two edge vertices included in the edge vertex group is unified to obtain target normal information of the edge vertices represented by the edge vertex group;

[0011] Based on target normal information of edge vertices represented by each edge vertex group, the reference virtual object block model of the to-be-replaced part in the reference virtual object model is replaced with the target virtual object block model to obtain the target virtual object model.

[0012] In a possible implementation, obtaining each reference model of the reference virtual object includes:

[0013] Determine any virtual object model of the reference virtual object as the reference virtual object model; split the reference virtual object model according to different parts to obtain reference virtual object block models corresponding to the different parts of the reference virtual object model; and compose reference models of the reference virtual object based on the reference virtual object model and the reference virtual object block models corresponding to the different parts;

[0014] or;

[0015] The method comprises the following steps: splitting virtual object block models corresponding to different parts from at least two virtual object models of a reference virtual object, and unifying the normal information of each edge vertex at the seam between the virtual object block models corresponding to the different parts to obtain reference virtual object block models corresponding to the different parts; recombining the reference virtual object block models corresponding to the different parts to obtain a reference virtual object model; and composing reference models of the reference virtual object based on the reference virtual object model and the reference virtual object block models corresponding to the different parts.

[0016] In a possible implementation, before matching the edge vertices of the target virtual object block model with the edge vertices of each target reference model to obtain each edge vertex group, the method further includes:

[0017] Based on the number of connected faces of each vertex of the target virtual object block model, filter out each edge vertex of the target virtual object block model from each vertex of the target virtual object block model;

[0018] For each target reference model, based on the number of connected faces of each vertex of the target reference model, each edge vertex of the target reference model is screened out from each vertex of the target reference model.

[0019] In a possible implementation, edge vertices of the target virtual object block model are matched with edge vertices of each target reference model respectively to obtain edge vertex groups, including:

[0020] For each edge vertex of the target virtual object block model, the edge vertices of the target virtual object block model and the edge vertices of each target reference model that are closest to the edge vertex of the target virtual object block model are formed into an edge vertex group.

[0021] In a possible implementation, edge vertices of the target virtual object block model are matched with edge vertices of each target reference model respectively to obtain edge vertex groups, including:

[0022] For each edge vertex of the target virtual object block model, the edge vertices of the target virtual object block model and the edge vertices of each target reference model that have the same position as the edge vertex of the target virtual object block model are formed into an edge vertex group.

[0023] In a possible implementation, normal information of at least two edge vertices included in the edge vertex group is unified to obtain target normal information of the edge vertices represented by the edge vertex group, including:

[0024] The normal information of at least two edge vertices included in the edge vertex group is averaged to obtain target normal information of the edge vertices represented by the edge vertex group.

[0025] In a possible implementation, based on target normal information of edge vertices represented by each edge vertex group, a reference virtual object block model of a to-be-replaced portion in the reference virtual object model is replaced with a target virtual object block model to obtain a target virtual object model, including:

[0026] The baseline virtual object block model of the to-be-replaced part in the baseline virtual object model is replaced with the target virtual object block model, and based on the target normal information of the edge vertices represented by each edge vertex group, the normal information of each edge vertex at the joint between the target virtual object block model and each target baseline model is updated respectively to obtain the target virtual object model.

[0027] On the other hand, an embodiment of the present application provides a device for generating a virtual object model in a game, comprising:

[0028] A model acquisition unit, configured to acquire each reference model of the reference virtual object; wherein each reference model includes a reference virtual object model of the reference virtual object and reference virtual object block models corresponding to different parts of the reference virtual object model;

[0029] A target determination unit is used to determine a target virtual object block model corresponding to the part to be replaced, and determine, from each reference model, each reference model having a seam relationship with the target virtual object block model as a target reference model;

[0030] A vertex matching unit, used to match edge vertices of the target virtual object block model with edge vertices of each target reference model to obtain edge vertex groups; wherein each edge vertex group includes at least two edge vertices, the at least two edge vertices belong to the target virtual object block model and each target reference model respectively, and at least two edge vertices overlap each other at the seam between the target virtual object block model and each target reference model;

[0031] A normal unification unit is used to unify the normal information of at least two edge vertices included in each edge vertex group to obtain target normal information of the edge vertices represented by the edge vertex group;

[0032] The replacement and reorganization unit is used to replace the reference virtual object block model of the to-be-replaced part in the reference virtual object model with the target virtual object block model based on the target normal information of the edge vertices represented by each edge vertex group, so as to obtain the target virtual object model.

[0033] In a possible implementation manner, when acquiring each reference model of the reference virtual object, the model acquisition unit is specifically configured to:

[0034] Determine any virtual object model of the reference virtual object as the reference virtual object model; split the reference virtual object model according to different parts to obtain reference virtual object block models corresponding to the different parts of the reference virtual object model; and compose reference models of the reference virtual object based on the reference virtual object model and the reference virtual object block models corresponding to the different parts;

[0035] or;

[0036] The method comprises the following steps: splitting virtual object block models corresponding to different parts from at least two virtual object models of a reference virtual object, and unifying the normal information of each edge vertex at the seam between the virtual object block models corresponding to the different parts to obtain reference virtual object block models corresponding to the different parts; recombining the reference virtual object block models corresponding to the different parts to obtain a reference virtual object model; and composing reference models of the reference virtual object based on the reference virtual object model and the reference virtual object block models corresponding to the different parts.

[0037] In a possible implementation manner, the device for generating a virtual object model in a game provided by an embodiment of the present application further includes:

[0038] The vertex acquisition unit is used to filter out the edge vertices of the target virtual object block model from the vertices of the target virtual object block model based on the number of connection faces of each vertex of the target virtual object block model; for each target reference model, the edge vertices of the target reference model are filtered out from the vertices of the target reference model based on the number of connection faces of each vertex of the target reference model.

[0039] In a possible implementation, when edge vertices of the target virtual object block model are matched with edge vertices of each target reference model respectively to obtain each edge vertex group, the vertex matching unit is specifically used to:

[0040] For each edge vertex of the target virtual object block model, the edge vertices of the target virtual object block model and the edge vertices of each target reference model that are closest to the edge vertex of the target virtual object block model are formed into an edge vertex group.

[0041] In a possible implementation, when edge vertices of the target virtual object block model are matched with edge vertices of each target reference model respectively to obtain each edge vertex group, the vertex matching unit is specifically used to:

[0042] For each edge vertex of the target virtual object block model, the edge vertices of the target virtual object block model and the edge vertices of each target reference model that have the same position as the edge vertex of the target virtual object block model are formed into an edge vertex group.

[0043] In a possible implementation, when normal information of at least two edge vertices included in the edge vertex group is unified to obtain target normal information of the edge vertices represented by the edge vertex group, the normal unification unit is specifically used to:

[0044] The normal information of at least two edge vertices included in the edge vertex group is averaged to obtain target normal information of the edge vertices represented by the edge vertex group.

[0045] In a possible implementation, based on target normal information of edge vertices represented by each edge vertex group, the reference virtual object block model of the to-be-replaced part in the reference virtual object model is replaced with the target virtual object block model to obtain the target virtual object model, and the replacement and reorganization unit is specifically used to:

[0046] The baseline virtual object block model of the to-be-replaced part in the baseline virtual object model is replaced with the target virtual object block model, and based on the target normal information of the edge vertices represented by each edge vertex group, the normal information of each edge vertex at the joint between the target virtual object block model and each target baseline model is updated respectively to obtain the target virtual object model.

[0047] On the other hand, an embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for generating a virtual object model in a game provided in an embodiment of the present application is implemented.

[0048] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the method for generating a virtual object model in a game provided by an embodiment of the present application is implemented.

[0049] The beneficial effects of the embodiments of the present application are as follows:

[0050] In an embodiment of the present application, by determining from each reference model of the reference virtual object that has a seam relationship with the target virtual object block model of the part to be replaced as the target reference model, and unifying the normal information of the edge vertices at the seams between the target virtual object block model and each target reference model, the normal orientation of each edge vertices at the seam can be standardized, so that the virtual object block models of different parts can be seamlessly switched without affecting the light and shadow effects of the target virtual object model finally obtained, and then the virtual object block models of each component can be freely switched according to the actual game requirements, so that the aesthetic needs and matching freedom of the players can be met to a greater extent, and the diversification and personalization of virtual objects in the game can be realized.

[0051] Other features and advantages of the present application will be described in the subsequent description, and in part, will become apparent from the description, or will be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0053] Figure 1 A schematic diagram of an overview of a method for generating a virtual object model in an embodiment of the present application;

[0054] Figure 2 A schematic diagram of a specific process of a method for generating a virtual object model in an embodiment of the present application;

[0055] Figure 3 This is a functional structure diagram of a virtual object model generating device in an embodiment of the present application;

[0056] Figure 4 Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and beneficial effects of this application clearer, the technical solution in the embodiment of this application will be clearly and completely described below in conjunction with the drawings in the embodiment of this application. Obviously, the described embodiment is only a part of the embodiment of this application, not all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] At present, in order to increase the fun of the game, the design of virtual objects such as virtual characters, virtual items, virtual monsters and virtual props in the game is usually highly stylized. Therefore, the diversity of virtual objects usually needs to be considered in the process of virtual object model making. However, the current virtual object model making is usually time-consuming, labor-intensive and performance-intensive, and it is difficult to meet players' diverse and personalized needs for virtual objects in the game.

[0059] To this end, in an embodiment of the present application, each reference model that has a seam relationship with the target virtual object block model of the part to be replaced is determined from each reference model of the reference virtual object as the target reference model, and the edge vertices of the target virtual object block model are matched with the edge vertices of each target reference model to obtain each edge vertex group; the normal information of at least two edge vertices contained in each edge vertex group is unified to obtain the target normal information of the edge vertices represented by each edge vertex group; based on the target normal information of the edge vertices represented by each edge vertex group, the reference virtual object block model of the part to be replaced in the reference virtual object model is replaced with the target virtual object block model to obtain the target virtual object model.

[0060] In this way, by determining from the various benchmark models of the benchmark virtual object that have a seam relationship with the target virtual object block model of the part to be replaced as the target benchmark models, and unifying the normal information of the edge vertices at the seams between the target virtual object block model and the target benchmark models, the normal directions of the edge vertices at the seams can be standardized, so that the virtual object block models of different parts can be seamlessly switched without affecting the light and shadow effects of the target virtual object model finally obtained, and then the virtual object block models of each component can be freely switched according to the actual game needs, so that the aesthetic needs and matching freedom of the players can be met to a greater extent, and the diversification and personalization of virtual objects in the game can be realized.

[0061] After introducing the application scenarios and design concepts of the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described in detail below.

[0062] The embodiment of the present application provides a method for generating a virtual object model in a game, which can be applied to electronic devices such as computing devices and user terminals, wherein the computing devices include but are not limited to servers, virtual machines, etc., and the user terminals include but are not limited to mobile phones, tablet computers, PDAs, laptop computers, desktop computers, etc. Figure 1 As shown, the general process of the method for generating a virtual object model in a game provided by the embodiment of the present application is as follows:

[0063] Step 101: Acquire each reference model of a reference virtual object; wherein each reference model includes a reference virtual object model of the reference virtual object and reference virtual object block models corresponding to different parts of the reference virtual object model.

[0064] In a specific implementation, when the electronic device obtains each reference model of the reference virtual object, it can adopt but is not limited to the following methods:

[0065] The first method: the electronic device determines any virtual object model of a baseline virtual object as a baseline virtual object model; splits the baseline virtual object model according to different parts to obtain baseline virtual object block models corresponding to different parts of the baseline virtual object model; and composes each baseline model of the baseline virtual object based on the baseline virtual object model and the baseline virtual object block models corresponding to different parts.

[0066] The second method: the electronic device splits the virtual object block models corresponding to different parts from at least two virtual object models of the reference virtual object, and unifies the normal information of the edge vertices at the seams between the virtual object block models corresponding to the different parts to obtain the reference virtual object block models corresponding to the different parts; reorganizes the reference virtual object block models corresponding to the different parts to obtain the reference virtual object model; and composes each reference model of the reference virtual object based on the reference virtual object model and the reference virtual object block models corresponding to the different parts.

[0067] It is worth mentioning that the electronic device can also use any of the above methods to obtain the various benchmark models of the benchmark virtual object in advance, and save the various benchmark models of the benchmark virtual object to a designated storage area (such as a database, memory, etc.), so that when obtaining the various benchmark models of the benchmark virtual object, they can be directly obtained from the designated storage area.

[0068] Step 102: Determine the target virtual object block model corresponding to the part to be replaced, and determine, from among the reference models, each reference model that has a seam relationship with the target virtual object block model as a target reference model.

[0069] During specific implementation, after the electronic device determines the target virtual object block model corresponding to the part to be replaced, it can determine, from each benchmark model, the benchmark models that have a seam relationship with the target virtual object block model corresponding to the part to be replaced as the target benchmark models based on the pre-saved seam relationship between the different parts and each benchmark model.

[0070] Step 103: Match the edge vertices of the target virtual object block model with the edge vertices of each target reference model to obtain edge vertex groups; wherein each edge vertex group includes at least two edge vertices, at least two edge vertices belong to the target virtual object block model and each target reference model respectively, and at least two edge vertices overlap with each other at the seam between the target virtual object block model and each target reference model.

[0071] In a specific implementation, the electronic device may first filter out the edge vertices of the target virtual object block model from the vertices of the target virtual object block model based on the number of connection faces of the vertices of the target virtual object block model, and for each target reference model, filter out the edge vertices of the target reference model from the vertices of the target reference model based on the number of connection faces of the vertices of the target reference model; then, for each edge vertex of the target virtual object block model, the edge vertices of the target virtual object block model and the edge vertices of each target reference model that are closest to the edge vertices of the target virtual object block model are formed into an edge vertex group, and / or the edge vertices of the target virtual object block model and the edge vertices of each target reference model that are at the same position as the edge vertex of the target virtual object block model are formed into an edge vertex group.

[0072] Step 104: for each edge vertex group, normal information of at least two edge vertices included in the edge vertex group is unified to obtain target normal information of the edge vertices represented by the edge vertex group.

[0073] In a specific implementation, the electronic device may average the normal information of at least two edge vertices included in each edge vertex group to obtain the target normal information of the edge vertices represented by the edge vertex group. For example, the average value of the normal information of at least two edge vertices included in the edge vertex group is determined as the target normal information of the edge vertices represented by the edge vertex group; or in another example, the weighted average value of the normal information of at least two edge vertices included in the edge vertex group is determined as the target normal information of the edge vertices represented by the edge vertex group.

[0074] Step 105: Based on the target normal information of the edge vertices represented by each edge vertex group, the reference virtual object block model of the to-be-replaced part in the reference virtual object model is replaced with the target virtual object block model to obtain the target virtual object model.

[0075] In a specific implementation, the electronic device can replace the baseline virtual object block model of the to-be-replaced part in the baseline virtual object model with the target virtual object block model, and based on the target normal information of the edge vertices represented by each edge vertex group, update the normal information of each edge vertex at the joint between the target virtual object block model and each target baseline model to obtain the target virtual object model.

[0076] Generally speaking, in MMORPG, players have high requirements for the personalization and diversity of virtual characters. Therefore, the diversity of facial features needs to be considered in the design process of virtual character models. Different virtual character models can be generated through face pinching technology. In practical applications, the virtual character model generation methods based on face pinching technology include the following two methods:

[0077] The first method: Change the facial skin by binding bones, divide the face into multiple partitions, and use the slider controller to control the displacement position of the partition bones, thereby affecting the corresponding area of ​​the skin model. The partition bone displacement operation during the face pinching process generates the partition bone change value, and then superimposes the initial matrix of the default bone to achieve a secondary change;

[0078] The second method: Use fusion deformation to control subtle changes in face pinching. By making different deformations of the same face and controlling the parameters, the position of the point changes transitionally in the parameters of different deformed faces. This method is often used to create exaggerated expressions of virtual characters. Through a series of target shape objects, the basic object can obtain a very smooth and high-precision deformation effect.

[0079] However, the above two methods of generating virtual character models usually have the following defects: 1. In order to prevent deformation through the model, some games will sacrifice the degree of freedom, making it difficult to make a variety of reasonable deformations, and the degree of detail of joint adjustment is limited; 2. Bone face pinching is suitable for characters with realistic appearance, and cannot achieve stylized production; 3. Extreme pulling of bones will cause the problem of model deformation and angularity; 4. When using fusion deformation to control subtle changes in face pinching, each deformation requires adding an entire head, which consumes a lot of resources and performance.

[0080] To this end, as one of the virtual object models, the virtual character model can be generated by the in-game virtual object model generation method provided in the embodiment of the present application, thereby achieving seamless switching of virtual character block models of different parts without affecting the light and shadow effects of the virtual character model, and then freely switching the virtual character block models of each component according to actual game requirements, thereby satisfying the players' aesthetic needs and matching freedom to a greater extent, and realizing the diversification and personalization of virtual characters in the game.

[0081] Specifically, in the embodiment of the present application, the virtual character model can be a full-body model of the virtual character, and different parts can include but are not limited to feet, calves, knees, thighs, torso, arms, neck, face, etc. The virtual character model can also be a face model of the virtual character, and different parts can include but are not limited to face, eye sockets, nose, mouth, ears. Based on this, the following takes the virtual character model as an example to further describe the method for generating a virtual object model in the game provided in the embodiment of the present application, see Figure 2As shown, the specific process of the method for generating a virtual object model in a game provided by the embodiment of the present application is as follows:

[0082] Step 201: Acquire each reference face model of the reference virtual character from a designated storage area; wherein each reference face model includes a reference face overall model, a reference eye socket block model, a reference nose block model, a reference mouth block model, and a reference ear block model of the reference virtual character.

[0083] Step 202: Determine the facial block model corresponding to the part to be replaced; wherein the facial block model includes an eye socket block model, a nose block model, a mouth block model, and an ear block model.

[0084] Step 203: Determine, from among the reference facial models of the reference virtual character, the reference facial models that are connected to the eye socket block model as target reference facial models; wherein the target reference facial models include a reference facial overall model, a reference nose block model, and a reference ear block model.

[0085] Step 204: based on the number of connected faces of each vertex of the reference facial overall model, filter out edge vertices of the reference facial overall model from each vertex of the reference facial overall model; and based on the number of connected faces of each vertex of the orbital block model, filter out edge vertices of the orbital block model from each vertex of the orbital block model.

[0086] Step 205: For each edge vertex of the target orbital block model, the edge vertex of the orbital block model and the edge vertices of the reference facial model that are closest to and have the same position as the edge vertex of the orbital block model are combined to form an edge vertex group at the seam between the orbital block model and the reference facial model.

[0087] Step 206: for each edge vertex group at the seam between the orbital block model and the reference facial overall model, average the normal information of the two edge vertices included in the edge vertex group to obtain target normal information of the edge vertices represented by the edge vertex group.

[0088] Step 207: Based on a method similar to steps 204-206, obtain the target normal information of the edge vertices represented by each edge vertex group at the seam between the orbital block model and the reference nose block model, and the target normal information of the edge vertices represented by each edge vertex group at the seam between the orbital block model and the reference ear block model.

[0089] Step 208: Accumulate and merge target normal information of edge vertices represented by edge vertex groups at the seams between the eye socket block model and the reference face overall model, the reference nose block model, and the reference ear block model to obtain a target eye socket block model.

[0090] Step 209: Based on a method similar to steps 203 to 208, the normal information of each edge vertex at the seam of the nose block model, the mouth block model and the ear block model is processed to obtain the target nose block model, the target mouth block model and the target ear block model.

[0091] Step 210: The target eye socket block model, the target nose block model, the target mouth block model and the target ear block model are cumulatively combined to obtain the target virtual character face model.

[0092] Based on the above embodiments, the embodiments of the present application provide a virtual object model generation device, which can be applied to electronic devices such as computing devices and user terminals, wherein computing devices include but are not limited to servers, virtual machines, etc., and user terminals include but are not limited to mobile phones, tablet computers, PDAs, laptop computers, desktop computers, etc. For details, see Figure 3 As shown, the device 300 for generating a virtual object model in a game provided by an embodiment of the present application at least includes:

[0093] The model acquisition unit 301 is used to acquire each reference model of the reference virtual object; wherein each reference model includes a reference virtual object model of the reference virtual object and reference virtual object block models corresponding to different parts of the reference virtual object model;

[0094] A target determination unit 302 is used to determine a target virtual object block model corresponding to the part to be replaced, and determine, from among the reference models, each reference model that has a seam relationship with the target virtual object block model as a target reference model;

[0095] The vertex matching unit 303 is used to match the edge vertices of the target virtual object block model with the edge vertices of each target reference model to obtain edge vertex groups; wherein each edge vertex group includes at least two edge vertices, the at least two edge vertices belong to the target virtual object block model and each target reference model respectively, and at least two edge vertices overlap each other at the seam between the target virtual object block model and each target reference model;

[0096] A normal unification unit 304 is used to unify the normal information of at least two edge vertices included in each edge vertex group to obtain target normal information of the edge vertices represented by the edge vertex group;

[0097] The replacement and reorganization unit 305 is used to replace the reference virtual object block model of the to-be-replaced part in the reference virtual object model with the target virtual object block model based on the target normal information of the edge vertices represented by each edge vertex group, so as to obtain the target virtual object model.

[0098] In a possible implementation manner, when acquiring each reference model of the reference virtual object, the model acquisition unit 301 is specifically configured to:

[0099] Determine any virtual object model of the reference virtual object as the reference virtual object model; split the reference virtual object model according to different parts to obtain reference virtual object block models corresponding to the different parts of the reference virtual object model; and compose reference models of the reference virtual object based on the reference virtual object model and the reference virtual object block models corresponding to the different parts;

[0100] or;

[0101] The method comprises the following steps: splitting virtual object block models corresponding to different parts from at least two virtual object models of a reference virtual object, and unifying the normal information of each edge vertex at the seam between the virtual object block models corresponding to the different parts to obtain reference virtual object block models corresponding to the different parts; recombining the reference virtual object block models corresponding to the different parts to obtain a reference virtual object model; and composing reference models of the reference virtual object based on the reference virtual object model and the reference virtual object block models corresponding to the different parts.

[0102] In a possible implementation manner, the virtual object model generation device 300 provided in the embodiment of the present application further includes:

[0103] The vertex acquisition unit 306 is used to filter out the edge vertices of the target virtual object block model from the vertices of the target virtual object block model based on the number of connection faces of each vertex of the target virtual object block model; for each target reference model, based on the number of connection faces of each vertex of the target reference model, filter out the edge vertices of the target reference model from the vertices of the target reference model.

[0104] In a possible implementation, when the edge vertices of the target virtual object block model are matched with the edge vertices of each target reference model respectively to obtain each edge vertex group, the vertex matching unit 303 is specifically used to:

[0105] For each edge vertex of the target virtual object block model, the edge vertices of the target virtual object block model and the edge vertices of each target reference model that are closest to the edge vertex of the target virtual object block model are formed into an edge vertex group.

[0106] In a possible implementation, when the edge vertices of the target virtual object block model are matched with the edge vertices of each target reference model respectively to obtain each edge vertex group, the vertex matching unit 303 is specifically used to:

[0107] For each edge vertex of the target virtual object block model, the edge vertices of the target virtual object block model and the edge vertices of each target reference model that have the same position as the edge vertex of the target virtual object block model are formed into an edge vertex group.

[0108] In a possible implementation, when normal information of at least two edge vertices included in the edge vertex group is unified to obtain target normal information of the edge vertices represented by the edge vertex group, the normal unification unit 304 is specifically used to:

[0109] The normal information of at least two edge vertices included in the edge vertex group is averaged to obtain target normal information of the edge vertices represented by the edge vertex group.

[0110] In a possible implementation, based on the target normal information of the edge vertices represented by each edge vertex group, the reference virtual object block model of the to-be-replaced part in the reference virtual object model is replaced with the target virtual object block model, and when the target virtual object model is obtained, the replacement and reorganization unit 305 is specifically used to:

[0111] The baseline virtual object block model of the to-be-replaced part in the baseline virtual object model is replaced with the target virtual object block model, and based on the target normal information of the edge vertices represented by each edge vertex group, the normal information of each edge vertex at the joint between the target virtual object block model and each target baseline model is updated to obtain the target virtual object model.

[0112] It should be noted that the principle of solving the technical problem by the in-game virtual object model generation device 300 provided in the embodiment of the present application is similar to the in-game virtual object model generation method provided in the embodiment of the present application. Therefore, the implementation of the in-game virtual object model generation device 300 provided in the embodiment of the present application can refer to the implementation of the in-game virtual object model generation method provided in the embodiment of the present application, and the repeated parts will not be repeated.

[0113] After introducing the method and device for generating a virtual object model in a game provided by an embodiment of the present application, next, a brief introduction to the electronic device provided by an embodiment of the present application is given.

[0114] See also Figure 4As shown, the electronic device 400 provided in the embodiment of the present application includes at least: a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program, the method for generating a virtual object model in a game provided in the embodiment of the present application is implemented.

[0115] The electronic device 400 provided in the embodiment of the present application may further include a bus 403 connecting different devices (including the processor 401 and the memory 402). The bus 403 represents one or more of several types of bus structures, including a memory bus, a peripheral bus, a local bus, and the like.

[0116] The memory 402 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 4021 and / or a cache memory 4022 , and may further include a read-only memory (ROM) 4023 .

[0117] The memory 402 may also include a program tool 4025 having a set (at least one) of program modules 4024, including but not limited to: an operating subsystem, one or more applications, other program modules, and program data, each of which or some combination may include the implementation of a network environment.

[0118] The electronic device 400 may also communicate with one or more external devices 404 (e.g., keyboards, remote controls, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 400 (e.g., mobile phones, computers, etc.), and / or communicate with any device that enables the electronic device 400 to communicate with one or more other electronic devices 400 (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 405. Furthermore, the electronic device 400 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 406. Figure 4 As shown, the network adapter 406 communicates with other modules of the electronic device 400 via the bus 403. It should be understood that although Figure 4Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) subsystems, tape drives, and data backup storage subsystems.

[0119] It should be noted that Figure 4 The electronic device 400 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0120] The computer-readable storage medium provided in the embodiment of the present application is introduced below. The computer-readable storage medium provided in the embodiment of the present application stores computer instructions, and when the computer instructions are executed by the processor, the method for generating a virtual object model in the game provided in the embodiment of the present application is implemented. Specifically, the computer instructions can be built-in or installed in the processor, so that the processor can implement the method for generating a virtual object model in the game provided in the embodiment of the present application by executing the built-in or installed computer instructions.

[0121] In addition, the method for generating a virtual object model in a game provided by an embodiment of the present application can also be implemented as a computer program product, which includes a program code. When the program code is run on a processor, it implements the method for generating a virtual object model in a game provided by an embodiment of the present application.

[0122] The computer program product provided in the embodiments of the present application may adopt any combination of one or more readable storage media, wherein the readable storage medium may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. Specifically, more specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, RAM, ROM, Erasable Programmable Read Only Memory (EPROM), optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0123] The computer program product provided in the embodiment of the present application may adopt a CD-ROM and include program code, and may also be run on electronic devices such as computing devices, user terminals, etc. However, the computer program product provided in the embodiment of the present application is not limited thereto. In the embodiment of the present application, the readable storage medium may be any tangible medium containing or storing program code, and the program code may be used by or in combination with an instruction execution system, apparatus, or device.

[0124] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0125] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0126] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0127] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for generating a virtual object model in a game, characterized in that: include: Acquire each reference model of the reference virtual object; wherein each reference model includes a reference virtual object model of the reference virtual object and reference virtual object block models corresponding to different parts of the reference virtual object model; Determine a target virtual object block model corresponding to the part to be replaced, and determine, from the reference models, reference models that have a seam relationship with the target virtual object block model as target reference models; Based on the number of connected faces of each vertex of the target virtual object block model, filter out the edge vertices of the target virtual object block model from the vertices of the target virtual object block model; for each target reference model, based on the number of connected faces of each vertex of the target reference model, filter out the edge vertices of the target reference model from the vertices of the target reference model; For each edge vertex of the target virtual object block model, the edge vertices of the target virtual object block model and the edge vertices of each target reference model that are closest to or have the same position as the edge vertex of the target virtual object block model are combined into an edge vertex group; wherein each edge vertex group includes at least two edge vertices, the at least two edge vertices belong to the target virtual object block model and the target reference models respectively, and the at least two edge vertices overlap each other at the seam between the target virtual object block model and the target reference models; For each edge vertex group, normal information of at least two edge vertices included in the edge vertex group is unified to obtain target normal information of the edge vertices represented by the edge vertex group; Based on the target normal information of the edge vertices represented by the edge vertex groups, the reference virtual object block model of the to-be-replaced part in the reference virtual object model is replaced with the target virtual object block model to obtain a target virtual object model.

2. The method for generating a virtual object model in a game according to claim 1, characterized in that: Obtain each benchmark model of the benchmark virtual object, including: Determine any virtual object model of the reference virtual object as the reference virtual object model; split the reference virtual object model according to different parts to obtain reference virtual object block models corresponding to the different parts of the reference virtual object model; and compose reference models of the reference virtual object based on the reference virtual object model and the reference virtual object block models corresponding to the different parts; or; The method comprises the steps of: splitting virtual object block models corresponding to different parts from at least two virtual object models of the reference virtual object, and unifying the normal information of each edge vertices at the seams between the virtual object block models corresponding to the different parts to obtain the reference virtual object block models corresponding to the different parts; recombining the reference virtual object block models corresponding to the different parts to obtain the reference virtual object model; and composing each reference model of the reference virtual object based on the reference virtual object model and the reference virtual object block models corresponding to the different parts.

3. The method for generating a virtual object model in a game according to claim 1, wherein: Unifying the normal information of at least two edge vertices included in the edge vertex group to obtain target normal information of the edge vertices represented by the edge vertex group includes: The normal information of at least two edge vertices included in the edge vertex group is averaged to obtain target normal information of the edge vertices represented by the edge vertex group.

4. The method for generating a virtual object model in a game according to claim 1, wherein: Based on target normal information of edge vertices represented by each edge vertex group, replacing the reference virtual object block model of the to-be-replaced part in the reference virtual object model with the target virtual object block model to obtain a target virtual object model, including: The benchmark virtual object block model of the to-be-replaced part in the benchmark virtual object model is replaced with the target virtual object block model, and based on the target normal information of the edge vertices represented by the edge vertex groups, the normal information of each edge vertex at the joint between the target virtual object block model and each target benchmark model is updated respectively to obtain the target virtual object model.

5. A device for generating a virtual object model in a game, characterized in that: include: A model acquisition unit, configured to acquire each reference model of a reference virtual object; wherein each reference model includes a reference virtual object model of the reference virtual object and reference virtual object block models corresponding to different parts of the reference virtual object model; A target determination unit, used to determine a target virtual object block model corresponding to the part to be replaced, and determine, from the reference models, each reference model having a seam relationship with the target virtual object block model as a target reference model; A vertex matching unit, used for matching edge vertices of the target virtual object block model with edge vertices of each target reference model to obtain edge vertex groups; wherein each edge vertex group includes at least two edge vertices, the at least two edge vertices belong to the target virtual object block model and the target reference models respectively, and the at least two edge vertices overlap each other at the seam between the target virtual object block model and the target reference models; A normal unification unit, configured to unify normal information of at least two edge vertices included in each edge vertex group to obtain target normal information of edge vertices represented by the edge vertex group; a replacement and reorganization unit, configured to replace the reference virtual object block model of the to-be-replaced part in the reference virtual object model with the target virtual object block model based on target normal information of the edge vertices represented by each edge vertex group, so as to obtain a target virtual object model; The device further includes: a vertex acquisition unit, configured to filter out edge vertices of the target virtual object block model from the vertices of the target virtual object block model based on the number of connected faces of the vertices of the target virtual object block model; for each target reference model, filter out edge vertices of the target reference model from the vertices of the target reference model based on the number of connected faces of the vertices of the target reference model; The vertex matching unit is specifically used to: for each edge vertex of the target virtual object block model, form an edge vertex group with the edge vertices of the target virtual object block model and the edge vertices of each target reference model that are closest to the edge vertex of the target virtual object block model; The vertex matching unit is specifically used to: for each edge vertex of the target virtual object block model, form an edge vertex group with the edge vertices of the target virtual object block model and the edge vertices of each target reference model that have the same position as the edge vertex of the target virtual object block model.

6. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for generating a virtual object model in a game as described in any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method for generating a virtual object model in a game as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Game assisting method and device, electronic device and storage medium

    CN109276882A

  • Face processing method and device for virtual character in game and readable storage medium

    CN111632374A