CN113554760A - Reloading method and device, computer equipment and storage medium - Google Patents

Reloading method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113554760A
CN113554760A CN202110898709.8A CN202110898709A CN113554760A CN 113554760 A CN113554760 A CN 113554760A CN 202110898709 A CN202110898709 A CN 202110898709A CN 113554760 A CN113554760 A CN 113554760A
Authority
CN
China
Prior art keywords
model
character
mesh
original character
virtual grid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110898709.8A
Other languages
Chinese (zh)
Other versions
CN113554760B (en
Inventor
叶东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110898709.8A priority Critical patent/CN113554760B/en
Publication of CN113554760A publication Critical patent/CN113554760A/en
Application granted granted Critical
Publication of CN113554760B publication Critical patent/CN113554760B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/825Fostering virtual characters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/807Role playing or strategy games
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a reloading method, a reloading device, computer equipment and a storage medium, wherein an original character model is determined; acquiring a clothing part virtual grid model and character model removing information corresponding to the clothing part virtual grid model, wherein the character model removing information corresponds to the original character virtual grid model, the character model removing information indicates a removing area of the original character virtual grid model, and the removing area comprises a die penetrating area of the original character virtual grid model when the clothing part virtual grid model is rendered on the original character virtual grid model; the problem of wearing the mould that appears when the virtual grid model of original personage changes outfit can effectual solution to support the change of single clothing part model, convenient and fast, the model of output can not wear the mould, and the game experience that brings for the player is better.

Description

Reloading method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of games, in particular to a reloading method, a reloading device, computer equipment and a storage medium.
Background
The game reloading is an indispensable part of a high-quality game, and can bring better game experience and immersion feeling to players. The common mode of changing clothes is to splice the bare model of a character with a clothing model, then reuse the character animation in a mode of animation redirection, and meanwhile, in order to utilize clothing resources to the maximum extent, enrich the experience of games, reduce the workload of art workers, different characters need to be capable of wearing the same set of clothing.
However, different characters have different body forms, and how to correctly process the clothes adaptation among different characters becomes a big problem, and if the processing is not correct, a bug similar to a model wearing often appears, which affects the game experience of a player to a certain extent.
The current industry approach to this problem often has the following disadvantages: and (3) the modeler adapts the angle bare model and the garment model in the modeling tool, then the angle bare model and the garment model are combined and output, and the whole model is directly replaced when the garment is changed. This is only suitable for replacing a complete set of garments and not for replacing a single part.
Disclosure of Invention
The embodiment of the invention provides a reloading method, a reloading device, computer equipment and a storage medium, and by using the reloading method of the embodiment of the invention, the problem of die punching in reloading of an original character virtual grid model can be effectively solved, the replacement of a single dress part virtual grid model is supported, the reloading method is convenient and quick, the output model cannot be punched, and the game experience brought to players is better.
The embodiment of the invention provides a reloading method, which comprises the following steps: determining an original character virtual grid model; acquiring a clothing part virtual grid model and character model removing information corresponding to the clothing part virtual grid model, wherein the character model removing information corresponds to the original character virtual grid model, the character model removing information indicates a removing area of the original character virtual grid model, and the removing area comprises a die-penetrating area of the original character virtual grid model when the clothing part virtual grid model is rendered on the original character virtual grid model; determining a region to be eliminated on the original character virtual grid model based on the character model eliminating information; removing the region to be removed on the original character virtual grid model to obtain a target character virtual grid model; and rendering the clothes part virtual grid model on the target character virtual grid model to obtain the reloaded character virtual grid model.
In an optional example, the step of obtaining the character model rejection information corresponding to the virtual mesh model of the clothing part includes: and acquiring character model removing information of the clothing part virtual grid model corresponding to the body type of the original character virtual grid model.
In an optional example, the character model culling information includes a triangular mesh constituting the culling area, first index information in the triangular mesh of the original character virtual mesh model; determining the region to be eliminated on the original character virtual grid model based on the character model eliminating information comprises the following steps: and determining a target triangular mesh to be eliminated in the triangular meshes of the original character virtual mesh model based on the first index information of the triangular meshes of the eliminated area, wherein the target triangular mesh forms an area to be eliminated of the original character virtual mesh model.
In an optional example, the number of the apparel part virtual mesh models is at least two, and the determining, based on the first index information of the triangular meshes in the elimination area, a target triangular mesh to be eliminated in the triangular meshes of the original character virtual mesh model includes: merging the rejection areas based on character model rejection information of each clothing part virtual grid model to obtain merged rejection information, wherein the merged rejection information comprises first index information of triangular grids of the merged rejection areas in triangular grids of the original character virtual grid model; and determining a target triangular mesh to be eliminated in the triangular meshes of the original character virtual mesh model based on the first index information of the triangular meshes in the merged elimination area, wherein the target triangular mesh forms an area to be eliminated of the original character virtual mesh model.
In an optional example, the character model culling information includes a string of binary character strings, each character corresponds to a triangular mesh, the position of the character in the character string indicates first index information of the corresponding triangular mesh in the triangular mesh of the original character virtual mesh model, the character is 1, and the character indicates that the corresponding triangular mesh is a triangular mesh of a culling area; in the rejection information of different character models, characters at the same position correspond to triangular meshes at the same position.
In an optional example, the determining, based on the first index information of the triangle meshes in the merged culling area, a target triangle mesh to be culled from the triangle meshes of the original character virtual mesh model includes: acquiring vertexes of a triangular mesh of the virtual mesh model of the original character; and traversing the first index information, and based on the vertexes of the triangular meshes and the merged rejection information, obtaining a first vertex list.
In an optional example, the removing the region to be removed from the original character virtual grid model to obtain a target character virtual grid model includes: traversing the vertex of the original character virtual mesh model, adding the vertex which is not in the first vertex list into a second vertex list, and recording new index information of the vertex in the second vertex list; traversing first index information of the original character virtual mesh model, and if all vertexes of the triangular mesh indicated by the first index information are in the second vertex list, identifying the triangular mesh based on new index information of the vertexes of the triangular mesh to obtain second index information of the triangular mesh; and generating a new mesh model as the target character virtual mesh model based on the second vertex list and the second index information.
In an optional example, the reloading method further includes: acquiring an original character virtual grid model and a decoration part virtual grid model; determining a rejection area of the original character virtual grid model based on the clothing part virtual grid model, wherein the rejection area is an area except a non-die-punching area on the original character virtual grid model, and the non-die-punching area comprises an area where the original character virtual grid model cannot be punched when the clothing part virtual grid model is rendered on the original character virtual grid model; acquiring first index information of the triangular meshes included in the elimination area in the triangular meshes of the original character virtual mesh model; and obtaining character model removing information corresponding to the virtual mesh model of the clothing part based on the first index information of the triangular mesh of the removing area.
In an optional example, the determining a culling area of the original character virtual mesh model based on the apparel part virtual mesh model comprises: rendering the apparel component virtual mesh model onto the original character virtual mesh model; determining an occlusion area which needs to be occluded by the clothing part virtual grid model on the original character virtual grid model; and determining a rejection area of the original character virtual grid model based on the triangular grid covered by the occlusion area in the original character virtual grid model.
In an optional example, the obtaining of character model elimination information corresponding to the clothing part virtual mesh model based on the first index information of the triangular mesh of the elimination area includes: generating an original character string based on first index information of the triangular meshes of the original character virtual mesh model, wherein the number of characters of the original character string is equal to the total number of the triangular meshes of the original character virtual mesh model, one character corresponds to one triangular mesh, and the position of the character in the original character string indicates the first index information of the corresponding triangular mesh in the triangular meshes of the original character virtual mesh model; in the original character string, setting characters corresponding to the triangular meshes in the elimination area as 1, and setting characters corresponding to the triangular meshes outside the elimination area as 0, so as to obtain character model elimination information corresponding to the virtual mesh model of the clothing part.
The embodiment of the invention provides a reloading device, which comprises: the first acquisition module is used for acquiring an original character virtual grid model; a second obtaining module, configured to obtain a clothing component virtual grid model and character model removing information corresponding to the clothing component virtual grid model, where the character model removing information indicates a removing area of an original character virtual grid model of the target body type, and the removing area includes a mold threading area of the original character virtual grid model when the clothing component virtual grid model is rendered on the original character virtual grid model; the first determining module is used for determining a region to be eliminated on the original character virtual grid model based on the character model eliminating information; the removing module is used for removing the area to be removed on the original character virtual grid model to obtain a target character virtual grid model; and the processing module is used for rendering the clothes part virtual grid model on the target character virtual grid model to obtain the reloaded character virtual grid model.
Embodiments of the present invention further provide a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method when executing the computer program.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method as described above.
An embodiment of the present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method according to the first aspect of the present invention.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
According to the reloading method provided by the embodiment of the invention, the triangular marks of the to-be-processed area of the original character virtual grid model are removed by obtaining the removal information to obtain the target processing object, and then the target processing object and the clothing part virtual grid model are re-rendered and processed to obtain the target display object, so that the occurrence of die-threading is effectively avoided, the clothing part virtual grid model is ensured to be completely displayed, and the attractiveness of the original character virtual grid model is improved. Aiming at the original character virtual grid model, the whole elimination information is used for proposing and processing all dress part virtual grid models worn by the original character virtual grid model at present, a plurality of dress part virtual grid models do not need to be separately rendered with the original character virtual grid model, the workload is effectively reduced, and the processing of changing the dress is more efficient. And different clothing parts of different clothing can be replaced at the same time for wearing, so that more personalized choices of clothing matching are enhanced, and the game fun of players is improved. In addition, when the same type of clothing part virtual grid model is worn by the original character virtual grid models with different body types, the same removing information can be used, namely the removing information can be multiplexed on a plurality of different original character virtual grid models with the same body type, and the plurality of different original character virtual grid models with the same body type do not need to be subjected to single removing treatment.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a reloading system provided by an embodiment of the invention;
FIG. 2 is a schematic flow chart of a reloading method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a display object to be processed according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the virtual mesh model of the original character for mesh generation according to the embodiment of the present invention;
FIG. 5 is a schematic diagram of a target processing object provided by an embodiment of the invention;
FIG. 6 is a schematic diagram of a target presentation object provided by an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a reloading apparatus according to an embodiment of the invention;
fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Reference numerals
A computer device 1000;
a processor 401; a memory 402; a touch display screen 403; a radio frequency circuit 404; an audio circuit 405; an input unit 406; a power supply 407;
a terminal 10; a server 20;
an original character virtual mesh model 100; a clothing part virtual grid model 200;
a region to be rejected 30; a target character virtual grid model 40; a triangular mark 50;
the reloaded virtual mesh model 2000;
a reloading device 3000; a modeling module 300;
a first obtaining module 400; a second obtaining module 500; a culling module 600;
a first determination module 700; a processing module 800.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a reloading method, a reloading device, computer equipment and a storage medium. In particular, the present embodiments provide a reloading method suitable for reloading devices that may be integrated in a computer apparatus. The computer device may be a terminal or other device, such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, or other device.
The reloading method of the embodiment can be implemented by the terminal, or by the terminal and the server together.
Referring to fig. 1, a reloading system provided in an embodiment of the present invention includes a terminal 10, a server 20, and the like; the terminal 10 and the server 20 are connected via a network, such as a wired or wireless network connection.
The terminal 10 may be configured to request a data resource.
Wherein the resource data of the terminal 10 can be acquired from the server 20.
The server 20 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, but is not limited thereto.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
A method of reloading comprising:
s101: determining an original character virtual grid model 100;
in this step, obtaining the virtual mesh model 100 of the original character is to build a bare model of the game character, so that the model can be applied to the subsequent steps.
S102: acquiring a dress part virtual grid model 200 and character model removing information corresponding to the dress part virtual grid model 200, wherein the character model removing information corresponds to the original character virtual grid model 100, the character model removing information indicates a removing area of the original character virtual grid model 100, and the removing area comprises a die-threading area of the original character virtual grid model 100 when the dress part virtual grid model 200 is rendered on the original character virtual grid model 100;
in this step, it is necessary to obtain clothing part virtual mesh model 200 and character model removal information corresponding thereto, and it can be understood that if original character virtual mesh model 100 represents a lower limb, clothing part virtual mesh model 200 corresponding to the lower limb is trousers. If the original character virtual mesh model 100 represents the torso, the corresponding clothing part virtual mesh model 200 is the jacket, so it can be understood that, in this step, the clothing part virtual mesh model 200 corresponding to the original character virtual mesh model 100 needs to be obtained, and character model elimination information of the region is obtained according to the region of the clothing part virtual mesh model 200 corresponding to the original character virtual mesh model 100.
The character model culling information may represent culled areas of the original character virtual mesh model 100, which need to be addressed here. It is understood that the virtual mesh model of the original character 100 can be the same model if the shape of the virtual mesh model of the original character 100 is the same. That is, character model rejection information obtained by the original character virtual mesh model 100 and the apparel part virtual mesh model 200 may be multiplexed to the original character virtual mesh model 100 of the same body type.
In other words, the homomorphic primitive character virtual mesh models 100 can be processed using character model culling information obtained from a single primitive character virtual mesh model 100.
The removed area of the original character virtual mesh model 100 can be represented by character model removal information, and the removed area can accurately understand the area where the die-cutting occurs when the clothing part virtual mesh model 200 is worn on the original character virtual mesh model 100.
It should be further noted that, in the embodiment of the present invention, the above setting of the same body type refers to that the body sizes of the character models of the two roles are within a certain range, or the body sizes are completely the same, but the body types (i.e. the body weight) may be different, i.e. the same body type can be determined, i.e. the culling information can be multiplexed.
Further, the body types of the two character models can be determined by the numerical ranges of the height and the waist circumference.
For example, a height of 1.6m to 1.65m may be set as a height range, and a waist length of 65cm to 75cm may be set as a range, i.e., two character models, a height of 1.66m and a waist length of 66 cm. And the other character is 1.68m in height and 74cm in waist, and the two character models can be considered to be of the same body type, namely the two character models can be reused to provide information for the character model.
It is understood that the positions of different characters and different clothes are different from each other, and if the individual clothes part virtual grid models 200 of the individual characters need to be configured separately, it will be a very heavy workload if the number of the original character virtual grid models 100 and the number of the clothes part virtual grid models 200 are large. Therefore, an efficient method for hiding the through-mold part needs to be designed. By multiplexing the rejection information for the same-type original character virtual grid model 100, the performance can be effectively saved, and the character model rejection information can be multiplexed for the same-type original character virtual grid model 100 without acquiring the character model rejection information again, so that the method is convenient and fast.
S103: determining a region to be eliminated 30 on the original character virtual grid model 100 based on character model elimination information;
in this step, the region to be eliminated 30 of the original character virtual mesh model 100, that is, the region covered by the apparel part virtual mesh model 200 on the original character virtual mesh model 100, can be effectively determined by the character model elimination information. As can be seen from the foregoing, the original character virtual mesh model 100 and the clothing part virtual mesh model 200 are integrated to form an integral, and the original character virtual mesh model 100 is penetrated in a partial region when being integrated with the clothing part virtual mesh model 200, so that the region of the original character virtual mesh model 100 corresponding to the penetration phenomenon is set as the region to be removed 30.
For example, if the clothing part virtual mesh model 200 is a jacket, the area corresponding to the original character virtual mesh model 100 is a trunk, and thus the trunk of the original character virtual mesh model 100 can be determined as the region to be eliminated 30. If apparel part virtual mesh model 200 is pants, the region corresponding to original character virtual mesh model 100 is the lower limb, and thus the lower limb of original character virtual mesh model 100 can be set as region to be eliminated 30.
For convenience of explanation, the original character virtual mesh model 100 will be described by taking the legs of a character as an example, and the clothing part virtual mesh model 200 will be described by taking trousers worn by the character as an example.
As shown in fig. 3, it can be seen in fig. 3 that the original character virtual mesh model 100 is a model of a human leg, and the apparel part virtual mesh model 200 is a trousers model, and after rendering the trousers model and the character leg model, mold threading occurs, and a region where mold threading occurs is an area where the mold threading phenomenon exists on the display region of the original character virtual mesh model 100 shown in fig. 3. The display area may be understood as a picture area to be displayed to the player after the original character virtual mesh model 100 wears the corresponding apparel part virtual mesh model 200, that is, an area to be displayed to the player as a whole after the original character virtual mesh model 100 and the pants model are rendered.
In other words, as shown in fig. 3, after the lower limbs of the original character virtual mesh model 100, i.e., the character model, and the trousers as the clothing part virtual mesh model 200 are integrated, the trousers are normally covered outside the lower limbs to realize that the trousers are worn by the lower limbs of the character model.
However, after the model is worn, the lower limb model of the human body penetrates from the outside of the trousers model, so that the trousers model is displayed incompletely, that is, the model wearing area is on the lower limb of the human body, and therefore, it can be understood that the part of the lower limb model of the human body is taken as the area to be removed 30 according to the model wearing area between the lower limb model of the human body and the trousers model.
Correspondingly, if the model is worn between the human body and the coat model, the part of the human body where the model is worn can be used as the region 30 to be removed.
S104: removing the region 30 to be removed on the original character virtual grid model 100 to obtain a target character virtual grid model 40;
in this step, the character model removing information obtained in the above steps can remove the corresponding region of the original character virtual mesh model 100, that is, remove the region to be removed 30, thereby obtaining the target character virtual mesh model 40. The target character virtual mesh model 40 is the portion from which the cut-through regions are removed, as shown in fig. 5.
S105: the apparel part virtual mesh model 200 is rendered on the target character virtual mesh model 40 to obtain a re-assembled character virtual mesh model 2000.
In this step, as shown in fig. 6, after re-rendering the target character virtual grid model 40 and the apparel part virtual grid model 200, a complete model can be obtained, i.e., the target character virtual grid model 40 and the apparel part virtual grid model 200 can be completely displayed without generating a die-through phenomenon.
According to the changing method of the embodiment of the invention, character model removing information is obtained through the original character virtual grid model 100 and the clothing part virtual grid model 200, the corresponding region 30 to be removed is obtained according to the character model removing information, the region 30 to be removed is further removed to obtain the target character virtual grid model 40, the target character virtual grid model 40 and the clothing part virtual grid model 200 are integrated through reprocessing of the target character virtual grid model 40, so that the die-through problem of the original character virtual grid model 100 and the clothing part virtual grid model 200 after integration is effectively solved, the clothing part virtual grid model 200 is completely displayed, the replacement of the clothing part virtual grid model 200 can be a single clothing part virtual grid model 200, and a player can conveniently match various clothing parts with the original character virtual grid model 100, the game experience of the player is improved, in addition, the character model removing information can be multiplexed with the character models in the same size on time, the convenience and the rapidness are realized, and the performance is improved.
As a possible implementation manner, as shown in fig. 2, on the basis of the foregoing embodiment, the reloading method provided by the present invention includes the following steps in step S102: the step of obtaining the character model removing information corresponding to the dress part virtual grid model 200 includes:
character model rejection information corresponding to the body type of the original character virtual mesh model 100 is acquired for the apparel part virtual mesh model 200.
That is, as mentioned above, when the apparel part virtual grid model 200 is rendered on the original character virtual grid model 100, the threading occurs, so that the removal information with the same body type as that of the original character virtual grid model 100 can be obtained through the position information of the threading, which is convenient for removing the original character virtual grid model 100 subsequently and prevents the threading from occurring.
As shown in fig. 4, the original character virtual mesh model 100 and the original character virtual mesh model 100 are triangular mesh 50 models, and the number of triangular meshes 50 of the original character virtual mesh model 100 and the original character virtual mesh model 100 is the same.
Specifically, the original character virtual mesh model 100 and the original character virtual mesh model 100 are mesh models formed by a plurality of triangle marks, and the number of triangles forming the original character virtual mesh model 100 is consistent with the number of triangles of the original character virtual mesh model 100, so that the arrangement sequence of the triangles of the original character virtual mesh model 100 and the original character virtual mesh model 100 can be ensured to be the same, and the rich character model can be removed conveniently.
Further, as shown in fig. 4, the character model culling information includes the triangular mesh 50 constituting the culling area, and first index information in the triangular mesh 50 of the original character virtual mesh model 100.
In other words, the original character virtual mesh model 100 is composed of the triangular meshes 50, and the character model culling information includes the triangular meshes 50 at the culling area and the first index information of the triangular meshes 50 constituting the culling area. Note that the index information is information of the arrangement order, and here is the arrangement order of the triangular meshes 50 constituting the virtual mesh model 100 of the original character, i.e., the first index information.
As a possible implementation manner, as shown in fig. 4, on the basis of the foregoing embodiment, the reloading method provided by the present invention includes, in step S103: determining the region to be eliminated 30 on the original character virtual grid model 100 based on the character model elimination information includes:
s201: based on the first index information of the triangular meshes 50 of the rejection region, the target triangular meshes 50 to be rejected in the triangular meshes 50 of the original character virtual mesh model 100 are determined, and the target triangular meshes 50 form the region to be rejected 30 of the original character virtual mesh model 100.
Specifically, in this step, with respect to the triangular mesh 50 of the virtual mesh model 100 of the original character, and according to the first index information, the information of the triangular mesh 50 to be removed, that is, the target triangular mesh 50, and the area where the target triangular mesh 50 exists, that is, the area to be removed 30, can be known.
In other words, the lower limbs of the person are described as the example, the lower limbs of the person are formed by the triangular meshes 50, and the region to be removed is the region to be removed 30, but the lower limbs of the person are not all penetrated through the model of the virtual mesh 200 of the clothing part, that is, the trousers, but are penetrated through the parts of the lower limbs and the trousers.
Further, the number of apparel part virtual mesh models 200 is at least two, that is, apparel part virtual mesh models 200 are at least two, for example, at least two models of a jacket and pants.
As a possible implementation manner, as shown in fig. 4, on the basis of the foregoing embodiment, in the reloading method provided by the present invention, the step S201: determining a target triangular mesh 50 to be removed in the triangular meshes 50 of the original character virtual mesh model 100 based on the first index information of the triangular meshes 50 of the removal region, including:
s301: merging the rejection areas based on character model rejection information of each clothing part virtual grid model 200 to obtain merged rejection information, wherein the merged rejection information comprises first index information of the triangular grids 50 of the merged rejection areas in the triangular grids 50 of the original character virtual grid model 100.
Specifically, in this step, the rejection areas of the virtual mesh models 200 of the clothing parts may be merged, that is, merged rejection information merged with rejection information of the plurality of character models is obtained by merging the rejection areas of the virtual mesh models 200 of the clothing parts, where the merged rejection information includes the first index information of the triangular mesh 50 to be rejected.
That is, the first index information of the triangular mesh 50 in the merged rejection area is also included in the merged rejection information, so that the original character virtual mesh model 100 corresponding to the plurality of clothing part virtual mesh models 200 can be simultaneously rejected by the merged rejection information. The elimination information of the virtual grid model 200 of the multiple clothing parts is merged and then eliminated, and the merged elimination information is realized by a certain merging rule as follows:
the merging rule is as follows:
Figure BDA0003198983300000121
wherein T represents a set; A. b and C represent the apparel part virtual mesh models 200 of different garments, respectively; n represents the nth one of the apparel part virtual mesh models 200 to which the triangle is labeled as it belongs.
Specifically, the head, the trunk and the lower limbs of the virtual mesh model 100 of the original character are taken as an example, and it is assumed that a represents a helmet of a suit, B represents a jacket of B suit and C represents trousers of C suit. Then it can be understood that TASet of reject information representing a head model corresponding to suit-A helmet, Tn AN in the item (A) is the nth triangular mesh 50 in the elimination information of the head model corresponding to the helmet of the suit A, Tn AA set of culling information that the nth triangular mesh 50 in the head model corresponding to the helmet of the a suit needs to be culled. Accordingly, Tn BThen, it represents the set of the elimination information, T, for eliminating the nth triangular mesh 50 from the trunk model corresponding to the jacket of the set B of clothesn CThe elimination letter of the nth triangular mesh 50 needs to be eliminated from the lower limb model corresponding to the trousers divided into C sets of clothesA collection of information.
When the original character virtual grid model 100 needs to replace the head, the trunk and the lower limbs of the garment part virtual grid model 200 at the same time, the merging rule is used
Figure BDA0003198983300000131
The set of the elimination information of the head, the trunk and the lower limbs is combined to obtain integral elimination information, so that the original character virtual grid model 100 can be quickly eliminated when the clothes parts of the original character virtual grid model 100 are replaced, the model wearing is prevented, meanwhile, the requirement that the original character virtual grid model 100 can interpenetrate the clothes part virtual grid models 200 belonging to different clothes for wearing is met, and the clothes matching of players is more diversified.
S302: based on the first index information of the triangular meshes 50 in the merged rejection region, the target triangular meshes 50 to be rejected in the triangular meshes 50 of the original character virtual mesh model 100 are determined, and the target triangular meshes 50 form the region to be rejected 30 of the original character virtual mesh model 100.
Specifically, the target triangular mesh 50 to be eliminated in the triangular mesh 50 may be determined by the first index information of the triangular mesh 50 in the eliminated region after merging, and the plurality of target triangular meshes 50 may form the area to be eliminated 30 of the original character virtual mesh model 100, that is, the area to be eliminated of the original character virtual mesh model 100 may be marked.
Further, the character model rejection information includes a string of binary character strings, each character corresponds to a triangular mesh 50, the position of the character in the character string indicates the first index information of the corresponding triangular mesh 50 in the triangular mesh 50 of the original character virtual mesh model 100, and the character is 1, which indicates that the corresponding triangular mesh 50 is the triangular mesh 50 of the rejection area.
Specifically, the culling information is a file formed by a binary character string, where each number corresponds to a triangle in the triangular mesh 50, and the position of the number in the character string may correspond to a triangle arranged according to the first index information on the original character virtual mesh model 100.
For example, the 30 th digit in the character string, i.e., the 30 th triangle in the triangular mesh 50 representing the virtual mesh model 100 of the original character. Further, the triangle in the culling area can be marked as character 1, i.e. representing the triangle to be culled.
Meanwhile, in the different character model rejection information, the characters at the same position correspond to the triangular meshes 50 at the same position.
As a possible implementation manner, in the reloading method provided by the present invention, on the basis of the foregoing embodiment, the step S301: the character model rejection information based on each clothing part virtual grid model 200 is merged in the rejection area to obtain merged rejection information, which comprises:
s401: and performing OR operation on the character strings in the character model rejection information of the virtual grid model 200 of each clothing part, and performing OR operation on the characters at the same positions in the character strings to obtain the operated character strings.
S402: and acquiring merged rejection information based on the operated character strings.
Specifically, in the above two steps, the character strings in each clothing component may be unified and merged to obtain an integral character string, so that the virtual mesh models 200 of the plurality of clothing components on the virtual mesh model 100 of the original character may be eliminated.
As a possible implementation manner, in the reloading method provided by the present invention, on the basis of the foregoing embodiment, the step S302: determining a target triangular mesh 50 to be removed in the triangular meshes 50 of the original character virtual mesh model 100 based on the merged first index information of the triangular meshes 50 in the removal region, including:
s501: acquiring the vertexes of the triangular mesh 50 of the virtual mesh model 100 of the original character;
in this step, the second index information of the triangular meshes 50 is obtained, where the index information is the arrangement order of the triangular meshes 50, and the second index information is the arrangement order of the triangular meshes 50 that is retained after being eliminated. And or removing the vertices of the triangular mesh 50, the culling list of the triangular mesh 50 can be effectively determined by obtaining the vertices and the arrangement order of the triangular mesh 50.
S502: and traversing the first index information, and based on the vertex of the triangular mesh 50 and the merged rejection information, obtaining a first vertex list.
Specifically, the first index information of the triangular meshes 50 is retrieved one by one, the arrangement order of the triangular meshes 50 is obtained, and the first vertex list is obtained based on the vertices of the triangular meshes 50 and the merged rejection information.
In other words, the first vertex list records information of vertices that need to be culled.
As a possible implementation manner, as shown in fig. 5, on the basis of the foregoing embodiment, the reloading method provided by the present invention includes, in step S104: removing the region 30 to be removed from the original character virtual grid model 100 to obtain a target character virtual grid model 40, which comprises:
s601: the vertices of the original character virtual mesh model 100 are traversed, vertices not in the first vertex list are added to the second vertex list, and new index information of the vertices in the second vertex list is recorded.
Specifically, all vertex information is searched from beginning to end, whether the vertex exists in a first vertex list or not is checked, namely whether the vertex book is in a list needing to be removed or not is checked, if yes, the vertex is removed, if not, the vertex is reserved and a second vertex list is generated in a sorting mode, and the reserved vertex generates a new arrangement sequence, namely new index information.
S602: traversing the first index information of the original character virtual mesh model 100, if all the vertices of the triangular mesh 50 indicated by the second index information are in the second vertex list, identifying the triangular mesh 50 based on the new index information of the vertices of the triangular mesh 50, and obtaining the second index information of the triangular mesh 50.
In this step, all triangle meshes 50 are retrieved, and if three vertices of a triangle are all in the vertex list that needs to be preserved, i.e., the second vertex list, the triangle is marked with new index information of the vertices, so that the triangle mesh 50 can have new arrangement order information, i.e., the second index information.
S603: based on the second vertex list and the second index information, a new mesh model is generated as the target character virtual mesh model 40.
In this step, a new mesh model, i.e., the target character virtual mesh model 40, can be generated based on the retained triangle order information, i.e., the second index information, and the retained vertex list, i.e., the second vertex list, through the above-described steps, as shown in fig. 5.
The reloading method of the embodiment of the invention further comprises the following steps:
s106: obtaining an original character virtual grid model 100 and a decoration part virtual grid model 200;
in this step, the original character virtual grid model 100 is obtained, that is, the original character virtual grid model 100 having the same body type as the original character virtual grid model 100 is obtained, and the definition of the same body type in the embodiment of the present invention is already described above, and is not described here.
Meanwhile, a dress part virtual grid model 200 is obtained and is matched with the original character virtual grid model 100 to realize rendering.
S107: determining a removed area of the original character virtual grid model 100 based on the clothing part virtual grid model 200, wherein the removed area is an area except a non-die-through area on the original character virtual grid model 100, and the non-die-through area comprises an area where the original character virtual grid model 100 cannot be subjected to die-through phenomenon when the clothing part virtual grid model 200 is rendered on the original character virtual grid model 100;
in this step, as described above, the removed area of the original character virtual mesh model 100, i.e., the area where the die-cut phenomenon has occurred, is determined by the apparel part virtual mesh model 200, while the non-die-cut area, i.e., the area where the die-cut phenomenon is unlikely to occur in the original character virtual mesh model 100, is included in the original character virtual mesh model 100.
S108: acquiring first index information of the triangular meshes 50 included in the rejection area in the triangular meshes 50 of the virtual mesh model 100 of the original character;
in this step, as described above, the first index information in the triangular mesh 50 of the original character virtual mesh model 100 is acquired. I.e., the triangular mesh 50 ordering information.
S109: character model rejection information corresponding to the clothing part virtual mesh model 200 is obtained based on the first index information of the triangular mesh 50 in the rejection region.
In this step, character model removal information corresponding to the clothing part virtual mesh model 200 may be obtained through the first index information.
As a possible implementation manner, based on the above embodiment, in step S107, the determining, based on the apparel part virtual grid model 200, a culling area of the original character virtual grid model 100 includes:
s701, rendering the dress part virtual grid model 200 to the original character virtual grid model 100;
in this step, a model of the character wearing pants, as shown in fig. 3, may be obtained by rendering the apparel part virtual mesh model 200 onto the original character virtual mesh model 100 to obtain a complete model, for example, rendering pants onto the original character virtual mesh model 100.
S702, determining a die-punching area with a die-punching phenomenon on the original character virtual grid model 100;
for example, as shown in fig. 3, a die-through phenomenon may occur when the virtual mesh model 200 of the piece of apparel is rendered on the virtual mesh model 100 of the original character. In this step, the region where the mold penetration phenomenon occurs is acquired for convenience of subsequent processing.
And S703, determining the elimination area of the original character virtual grid model 100 based on the triangular grid 50 covered by the die-penetrating area in the original character virtual grid model 100.
In this step, as before, the location of the culled area of the original character virtual mesh model 100 can be determined by the validation of the triangular mesh 50 of the 100-threaded area of the original character virtual mesh model.
As a possible implementation manner, on the basis of the foregoing embodiment, in the reloading method provided by the present invention, S107: determining a culling area of the original character virtual mesh model 100 based on the apparel part virtual mesh model 200, comprising:
s801, rendering the dress part virtual grid model 200 to the original character virtual grid model 100;
in this step, a model of the character wearing pants, as shown in fig. 3, may be obtained by rendering the apparel part virtual mesh model 200 onto the original character virtual mesh model 100 to obtain a complete model, for example, rendering pants onto the original character virtual mesh model 100.
S802, determining an occlusion area which needs to be occluded by the dress part virtual grid model 200 on the original character virtual grid model 100;
it is understood that, when the apparel part virtual grid model 200 is rendered on the original character virtual grid model 100, the apparel part virtual grid model 200 needs to cover the original character virtual grid model 100, and thus, in this step, the apparel part virtual grid model 200 needs to determine the area on the original character virtual grid model 100 that needs to be covered.
And S803, determining the elimination area of the original character virtual grid model 100 based on the triangular grid 50 covered by the occlusion area in the original character virtual grid model 100.
In this step, the area to be removed on the original character virtual mesh model 100 can be determined by the determined triangular mesh 50 of the occlusion area, that is, all the areas where the original character virtual mesh model 100 should be removed by the clothing part virtual mesh model 200 can be marked as removed areas.
As a possible implementation manner, on the basis of the foregoing embodiment, in the reloading method provided by the present invention, S108: obtaining character model rejection information corresponding to the clothing part virtual grid model 200 based on the first index information of the triangular grid 50 in the rejection area, including:
s901: generating an original character string based on the first index information of the triangular meshes 50 of the original character virtual mesh model 100, wherein the number of characters of the original character string is equal to the total number of the triangular meshes 50 of the original character virtual mesh model 100, one character corresponds to one triangular mesh 50, and the position of the character in the original character string indicates the first index information of the corresponding triangular mesh 50 in the triangular meshes 50 of the original character virtual mesh model 100;
specifically, as mentioned above, the first index information indicates the arrangement order of the triangular meshes 50, and each triangular mesh 50 is represented by a character, and the position of the character represents the number of triangular meshes 50.
S902: in the original character string, the character corresponding to the triangular mesh 50 in the elimination area is set to 1, the character corresponding to the triangular mesh 50 outside the elimination area is set to 0, and character model elimination information corresponding to the clothing part virtual mesh model 200 is obtained.
In this step, it can be understood that all the triangular meshes 50 are represented by one character, and different characters can be respectively used for the triangular meshes 50 at different positions, that is, the triangle in the culling area can be represented by character 1, and the triangular meshes 50 outside the culling area can be represented by character 0.
As shown in fig. 4, the lower limb model is taken as an example for explanation, and the processing of the removed area and the area to be reserved of the lower limb model may be performed by marking the area to be reserved, such as the knee part, with a triangular mesh 50 of one color and then marking the area to be reserved with 0. The area to be removed is then meshed with a triangular mesh 50 of another color, and then marked as 1.
After the culling area is subjected to mesh division and triangular meshes 50 are performed, information can be derived to obtain a binary file consisting of strings of 0 and 1, namely culling information. It should be noted that, in the culling information, the lengths of the strings 0 and 1 represent the number of triangles required for mesh-dividing the original character virtual mesh model 100, and the number of the strings, i.e., the number of the triangle meshes 50 representing mesh-division.
For example, still in the case of the above lower limb model, when the lower limb model is mesh-divided, the lower limb model is mesh-divided using the triangular mesh 50, that is, the lower limb model is divided by forming one mesh by a plurality of triangles.
When the human lower limb model is subjected to grid division, the knee part is taken as an area needing to be reserved, and is divided by a new triangular mark with one color, and the mark is 0. The other regions are divided as regions to be culled using a triangular mesh 50 of another color, while being labeled 1. The thus obtained culling information is a binary file of a string formed of 0 and 1.
In some embodiments of the present invention, the obtained string may be 01010101 … …, which indicates that the first number is 0, and indicates that the first triangular mesh 50 is the triangular mesh 50 to be reserved. Where the second number is 1, it indicates that the second triangular mesh 50 is the triangular mesh 50 to be culled.
In some further alternative embodiments of the present invention, the obtained string may be 11011011000 11011000 … …, which indicates that the first number is 1, that is, the first triangular mesh 50 is the triangular mesh 50 to be eliminated, the second number is not yet 1, that is, the second triangular mesh 50 is also the triangular mesh 50 to be eliminated, the third number is 0, that is, the third triangular mesh 50 is the triangular mesh 50 to be retained, and so on, and thus the description is omitted here.
The present invention is not limited thereto, and when the virtual mesh model 100 of the original character is introduced into the engine, the rearrangement optimization function of the triangular mesh 50 in the engine needs to be turned off.
In this step, when the created virtual mesh model 100 of the original character is introduced into the engine, the rearrangement optimization function of the triangular mesh 50 of the engine needs to be turned off. Therefore, the performance of the original character virtual grid model 100 when the model is introduced into the engine can be optimized, and the situation that the arrangement sequence recorded in the index information is disordered and the information cannot be reused and removed due to the fact that the game engine reorders the vertexes of the introduced original character virtual grid model 100 and the triangular grids 50 can be effectively avoided.
It should be noted that the number of vertices of the original character virtual grid model 100 may be different after the game engine is introduced due to the influence of the smooth set of vertices.
In order to better implement the above method, correspondingly, an embodiment of the present invention further provides a reloading device 3000, as shown in fig. 7, including: the system comprises a first acquisition module 400, a second acquisition module 500, a first determination module 700, a rejection module 600 and a processing module 800, wherein the first acquisition module 400 is used for determining the original character virtual grid model 100; a second obtaining module 500, configured to obtain the clothing part virtual grid model 200 and character model rejection information corresponding to the clothing part virtual grid model 200, where the character model rejection information corresponds to the original character virtual grid model 100, and the character model rejection information indicates a rejection area of the original character virtual grid model 100, and the rejection area includes a die-through area of the original character virtual grid model 100 when the clothing part virtual grid model 200 is rendered on the original character virtual grid model 100; a first determining module 700, configured to determine, based on the character model elimination information, an area to be eliminated 30 on the original character virtual grid model 100; a removing module 600, configured to remove the region to be removed 30 in the original character virtual grid model 100 to obtain a target character virtual grid model 40; and a processing module 800, configured to render the apparel part virtual grid model 200 on the target character virtual grid model 40, so as to obtain a re-assembled character virtual grid model 2000.
In addition, the embodiment of the present application further provides a Computer device, where the Computer device may be a terminal, and the terminal may be a terminal device such as a smart phone, a tablet Computer, a notebook Computer, a touch screen, a game machine, a Personal Computer (PC), a Personal Digital Assistant (PDA), and the like. As shown in fig. 8, fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device 1000 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. Those skilled in the art will appreciate that the computer device configurations illustrated in the figures are not meant to be limiting of computer devices and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The processor 401 is a control center of the computer apparatus 1000, connects various parts of the entire computer apparatus 1000 using various interfaces and lines, performs various functions of the computer apparatus 1000 and processes data by running or loading software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby integrally monitoring the computer apparatus 1000.
In the embodiment of the present application, the processor 401 in the computer device 1000 loads instructions corresponding to processes of one or more application programs into the memory 402, and the processor 401 runs the application programs stored in the memory 402, so as to implement various functions as follows:
s101: determining an original character virtual grid model 100;
s102: acquiring a dress part virtual grid model 200 and character model removing information corresponding to the dress part virtual grid model 200, wherein the character model removing information corresponds to the original character virtual grid model 100, the character model removing information indicates a removing area of the original character virtual grid model 100, and the removing area comprises a die-penetrating area of the original character virtual grid model 100 when the dress part virtual grid model 200 is rendered on the original character virtual grid model 100;
s103: determining a region to be eliminated 30 on the original character virtual grid model 100 based on character model elimination information;
s104: removing the region 30 to be removed on the original character virtual grid model 100 to obtain a target character virtual grid model 40;
s105: the apparel part virtual mesh model 200 is rendered on the target character virtual mesh model 40 to obtain a re-assembled character virtual mesh model 2000.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Optionally, as shown in fig. 8, the computer device 1000 further includes: touch-sensitive display screen 403, radio frequency circuit 404, audio circuit 405, input unit 406 and power 407. The processor 401 is electrically connected to the touch display screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power source 407. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 8 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The touch display screen 403 may be used for displaying a graphical user interface and receiving operation instructions generated by a user acting on the graphical user interface. The touch display screen 403 may include a display panel and a touch panel. The display panel may be used, among other things, to display information entered by or provided to a user and various graphical user interfaces of the computer device, which may be made up of graphics, text, icons, video, and any combination thereof. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations of a user on or near the touch panel (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus pen, and the like), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 401, and can receive and execute commands sent by the processor 401. The touch panel may overlay the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel may transmit the touch operation to the processor 401 to determine the type of the touch event, and then the processor 401 may provide a corresponding visual output on the display panel according to the type of the touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 403 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two separate components to perform the input and output functions. That is, the touch display screen 403 may also be used as a part of the input unit 406 to implement an input function.
The rf circuit 404 may be used for transceiving rf signals to establish wireless communication with a network device or other computer device via wireless communication, and for transceiving signals with the network device or other computer device.
The audio circuit 405 may be used to provide an audio interface between a user and a computer device through speakers, microphones. The audio circuit 405 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 405 and converted into audio data, which is then processed by the audio data output processor 401, and then sent to, for example, another computer device via the radio frequency circuit 404, or output to the memory 402 for further processing. The audio circuit 405 may also include an earbud jack to provide communication of a peripheral headset with the computer device.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 407 is used to power the various components of the computer device 1000. Optionally, the power source 407 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, power consumption management, and the like through the power management system. The power supply 407 may also include one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, or any other component.
Although not shown in fig. 8, the computer device 1000 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described in detail herein.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute the steps in any reloading method provided by the embodiments of the present application. For example, the computer program may perform the steps of:
s101: determining an original character virtual grid model 100;
s102: acquiring a dress part virtual grid model 200 and character model removing information corresponding to the dress part virtual grid model 200, wherein the character model removing information corresponds to the original character virtual grid model 100, the character model removing information indicates a removing area of the original character virtual grid model 100, and the removing area comprises a die-penetrating area of the original character virtual grid model 100 when the dress part virtual grid model 200 is rendered on the original character virtual grid model 100;
s103: determining a region to be eliminated 30 on the original character virtual grid model 100 based on character model elimination information;
s104: removing the region 30 to be removed on the original character virtual grid model 100 to obtain a target character virtual grid model 40;
s105: the apparel part virtual mesh model 200 is rendered on the target character virtual mesh model 40 to obtain a re-assembled character virtual mesh model 2000.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any reloading method provided in the embodiments of the present application, beneficial effects that can be achieved by any reloading method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The reloading method, the reloading device, the storage medium and the computer device provided by the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation manner of the present application, and the description of the embodiments above is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (15)

1. A method of reloading, comprising:
determining an original character virtual grid model;
acquiring a clothing part virtual grid model and character model removing information corresponding to the clothing part virtual grid model, wherein the character model removing information corresponds to the original character virtual grid model, the character model removing information indicates a removing area of the original character virtual grid model, and the removing area comprises a die-penetrating area of the original character virtual grid model when the clothing part virtual grid model is rendered on the original character virtual grid model;
determining a region to be eliminated on the original character virtual grid model based on the character model eliminating information;
removing the region to be removed on the original character virtual grid model to obtain a target character virtual grid model;
and rendering the clothes part virtual grid model on the target character virtual grid model to obtain the reloaded character virtual grid model.
2. The reloading method of claim 1, wherein the step of obtaining character model removing information corresponding to the virtual mesh model of the clothing part comprises: and acquiring character model removing information corresponding to the figure types of the clothing part virtual grid model and the original character virtual grid model.
3. The reloading method according to claim 1, wherein said character model culling information comprises a triangular mesh constituting said culling area, first index information in the triangular mesh of said original character virtual mesh model;
determining the region to be eliminated on the original character virtual grid model based on the character model eliminating information comprises the following steps:
and determining a target triangular mesh to be eliminated in the triangular meshes of the original character virtual mesh model based on the first index information of the triangular meshes of the eliminated area, wherein the target triangular mesh forms an area to be eliminated of the original character virtual mesh model.
4. The reloading method of claim 3, wherein the number of the dress part virtual mesh models is at least two, and the determining, based on the first index information of the triangular meshes of the culling area, a target triangular mesh to be culled among the triangular meshes of the original character virtual mesh model comprises:
merging the rejection areas based on character model rejection information of each clothing part virtual grid model to obtain merged rejection information, wherein the merged rejection information comprises first index information of triangular grids of the merged rejection areas in triangular grids of the original character virtual grid model;
and determining a target triangular mesh to be eliminated in the triangular meshes of the original character virtual mesh model based on the first index information of the triangular meshes in the merged elimination area, wherein the target triangular mesh forms an area to be eliminated of the original character virtual mesh model.
5. The reloading method as recited in claim 1, wherein the character model culling information includes a string of binary characters, each character corresponding to a triangular mesh of a virtual mesh model, a position of the character in the string indicating first index information of the corresponding triangular mesh in the triangular mesh of the original character virtual mesh model, the character being 1 indicating that the corresponding triangular mesh is a triangular mesh of a culled area; in the rejection information of different character models, characters at the same position correspond to triangular meshes at the same position.
6. The reloading method of claim 4, wherein said determining a target triangle to be culled from the triangle meshes of the virtual mesh model of the original character based on the first index information of the triangle meshes in the merged culling area comprises:
acquiring vertexes of a triangular mesh of the virtual mesh model of the original character;
and traversing the first index information, and based on the vertexes of the triangular meshes and the merged rejection information, obtaining a first vertex list.
7. The reloading method as recited in claim 6, wherein said removing the region to be removed from the original character virtual grid model to obtain a target character virtual grid model comprises:
traversing the vertex of the original character virtual mesh model, adding the vertex which is not in the first vertex list into a second vertex list, and recording new index information of the vertex in the second vertex list;
traversing first index information of the original character virtual mesh model, and if all vertexes of the triangular mesh indicated by the first index information are in the second vertex list, identifying the triangular mesh based on new index information of the vertexes of the triangular mesh to obtain second index information of the triangular mesh;
and generating a new mesh model as the target character virtual mesh model based on the second vertex list and the second index information.
8. The reloading method according to any one of claims 1 to 7, further comprising:
acquiring an original character virtual grid model and a decoration part virtual grid model;
determining a rejection area of the original character virtual grid model based on the clothing part virtual grid model, wherein the rejection area is an area except a non-die-punching area on the original character virtual grid model, and the non-die-punching area comprises an area where the original character virtual grid model cannot be punched when the clothing part virtual grid model is rendered on the original character virtual grid model;
acquiring first index information of the triangular meshes included in the elimination area in the triangular meshes of the original character virtual mesh model;
and obtaining character model removing information corresponding to the virtual mesh model of the clothing part based on the first index information of the triangular mesh of the removing area.
9. The reloading method of claim 8, wherein said determining a culling area for said original character virtual mesh model based on said apparel part virtual mesh model comprises:
rendering the apparel component virtual mesh model onto the original character virtual mesh model;
determining a die-penetrating area with a die-penetrating phenomenon on the original character virtual grid model;
and determining a rejection area of the original character virtual grid model based on the triangular grid covered by the die-penetrating area in the original character virtual grid model.
10. The reloading method of claim 8, wherein said determining a culling area for said original character virtual mesh model based on said apparel part virtual mesh model comprises:
rendering the apparel component virtual mesh model onto the original character virtual mesh model;
determining an occlusion area which needs to be occluded by the clothing part virtual grid model on the original character virtual grid model;
and determining a rejection area of the original character virtual grid model based on the triangular grid covered by the occlusion area in the original character virtual grid model.
11. The reloading method of claim 8, wherein the obtaining of character model rejection information corresponding to the virtual mesh model of the clothing part based on the first index information of the triangular mesh of the rejection area comprises:
generating an original character string based on first index information of the triangular meshes of the original character virtual mesh model, wherein the number of characters of the original character string is equal to the total number of the triangular meshes of the original character virtual mesh model, one character corresponds to one triangular mesh, and the position of the character in the original character string indicates the first index information of the corresponding triangular mesh in the triangular meshes of the original character virtual mesh model;
in the original character string, setting characters corresponding to the triangular meshes in the elimination area as 1, and setting characters corresponding to the triangular meshes outside the elimination area as 0, so as to obtain character model elimination information corresponding to the virtual mesh model of the clothing part.
12. A reloading device, comprising:
the first acquisition module is used for determining an original character virtual grid model;
a second obtaining module, configured to obtain a clothing component virtual grid model and character model removing information corresponding to the clothing component virtual grid model, where the character model removing information corresponds to the original character virtual grid model, the character model removing information indicates a removing area of the original character virtual grid model, and the removing area includes a die-through area of the original character virtual grid model when the clothing component virtual grid model is rendered on a grid of the original character virtual grid model;
the first determining module is used for determining a region to be eliminated on the original character virtual grid model based on the character model eliminating information;
the removing module is used for removing the area to be removed on the original character virtual grid model to obtain a target character virtual grid model;
and the processing module is used for rendering the clothes part virtual grid model on the target character virtual grid model to obtain the reloaded character virtual grid model.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the steps of the method according to any of claims 1-11 are implemented when the computer program is executed by the processor.
14. A computer-readable storage medium, on which a plurality of computer programs are stored, wherein the computer programs, when executed by a processor, implement the steps of the method according to any one of claims 1-11.
15. A computer program product comprising a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1-11.
CN202110898709.8A 2021-08-05 2021-08-05 Method and device for changing package, computer equipment and storage medium Active CN113554760B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110898709.8A CN113554760B (en) 2021-08-05 2021-08-05 Method and device for changing package, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110898709.8A CN113554760B (en) 2021-08-05 2021-08-05 Method and device for changing package, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113554760A true CN113554760A (en) 2021-10-26
CN113554760B CN113554760B (en) 2024-02-13

Family

ID=78105355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110898709.8A Active CN113554760B (en) 2021-08-05 2021-08-05 Method and device for changing package, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113554760B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5850222A (en) * 1995-09-13 1998-12-15 Pixel Dust, Inc. Method and system for displaying a graphic image of a person modeling a garment
CN103366401A (en) * 2013-08-05 2013-10-23 上海趣搭网络科技有限公司 Quick display method for multi-level virtual clothes fitting
CN105740521A (en) * 2016-01-25 2016-07-06 北京大学 Small grid removing method and apparatus in oil reservoir numerical simulation system solution process
CN106327562A (en) * 2016-09-09 2017-01-11 武汉布偶猫科技有限公司 Method of solving penetration problem in case of clothing collocation in three-dimensional simulation
CN107833092A (en) * 2017-10-27 2018-03-23 深圳狗尾草智能科技有限公司 Virtual portrait trial assembly method and system based on scene and state
CN109087369A (en) * 2018-06-22 2018-12-25 腾讯科技(深圳)有限公司 Virtual objects display methods, device, electronic device and storage medium
CN110163728A (en) * 2019-05-30 2019-08-23 肖伯祥 A kind of customized clothing customization method for platemaking
CN111028320A (en) * 2019-12-11 2020-04-17 腾讯科技(深圳)有限公司 Cloth animation generation method and device and computer readable storage medium
US20200306640A1 (en) * 2019-03-27 2020-10-01 Electronic Arts Inc. Virtual character generation from image or video data
CN112734886A (en) * 2021-01-08 2021-04-30 北京爱奇艺科技有限公司 Biological model die-threading detection method and device, electronic equipment and storage medium
CN113192158A (en) * 2021-03-09 2021-07-30 刘梦祈 3D model lofting method based on computer geometric migration algorithm

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5850222A (en) * 1995-09-13 1998-12-15 Pixel Dust, Inc. Method and system for displaying a graphic image of a person modeling a garment
CN103366401A (en) * 2013-08-05 2013-10-23 上海趣搭网络科技有限公司 Quick display method for multi-level virtual clothes fitting
CN105740521A (en) * 2016-01-25 2016-07-06 北京大学 Small grid removing method and apparatus in oil reservoir numerical simulation system solution process
CN106327562A (en) * 2016-09-09 2017-01-11 武汉布偶猫科技有限公司 Method of solving penetration problem in case of clothing collocation in three-dimensional simulation
CN107833092A (en) * 2017-10-27 2018-03-23 深圳狗尾草智能科技有限公司 Virtual portrait trial assembly method and system based on scene and state
CN109087369A (en) * 2018-06-22 2018-12-25 腾讯科技(深圳)有限公司 Virtual objects display methods, device, electronic device and storage medium
US20200306640A1 (en) * 2019-03-27 2020-10-01 Electronic Arts Inc. Virtual character generation from image or video data
CN110163728A (en) * 2019-05-30 2019-08-23 肖伯祥 A kind of customized clothing customization method for platemaking
CN111028320A (en) * 2019-12-11 2020-04-17 腾讯科技(深圳)有限公司 Cloth animation generation method and device and computer readable storage medium
CN112734886A (en) * 2021-01-08 2021-04-30 北京爱奇艺科技有限公司 Biological model die-threading detection method and device, electronic equipment and storage medium
CN113192158A (en) * 2021-03-09 2021-07-30 刘梦祈 3D model lofting method based on computer geometric migration algorithm

Also Published As

Publication number Publication date
CN113554760B (en) 2024-02-13

Similar Documents

Publication Publication Date Title
CN111420399B (en) Virtual character reloading method, device, terminal and storage medium
CN111282268B (en) Plot showing method, plot showing device, plot showing terminal and storage medium in virtual environment
CN114205324B (en) Message display method, device, terminal, server and storage medium
KR102034838B1 (en) Terminal and server providing a video call service
CN110136236B (en) Personalized face display method, device and equipment for three-dimensional character and storage medium
CN112148404B (en) Head portrait generation method, device, equipment and storage medium
CN109426343B (en) Collaborative training method and system based on virtual reality
CN113516742A (en) Model special effect manufacturing method and device, storage medium and electronic equipment
CN113398583A (en) Applique rendering method and device of game model, storage medium and electronic equipment
CN113350802A (en) Voice communication method, device, terminal and storage medium in game
CN108525306B (en) Game implementation method and device, storage medium and electronic equipment
CN114782605A (en) Rendering method and device of hair virtual model, computer equipment and storage medium
CN111539795A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN113426129B (en) Method, device, terminal and storage medium for adjusting appearance of custom roles
CN110622218A (en) Image display method, device, storage medium and terminal
CN108537149B (en) Image processing method, image processing device, storage medium and electronic equipment
CN113101666A (en) Game role model method, device, computer equipment and storage medium
CN113332719A (en) Virtual article marking method, device, terminal and storage medium
CN112561084A (en) Feature extraction method and device, computer equipment and storage medium
CN112149599A (en) Expression tracking method and device, storage medium and electronic equipment
CN113554760B (en) Method and device for changing package, computer equipment and storage medium
CN113362435B (en) Virtual component change method, device, equipment and medium of virtual object model
CN115645921A (en) Game indicator generating method and device, computer equipment and storage medium
KR20170018613A (en) System and method for advertisement using 3d model
CN108525307B (en) Game implementation method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant