CN113554760B - Method and device for changing package, computer equipment and storage medium - Google Patents

Method and device for changing package, computer equipment and storage medium Download PDF

Info

Publication number
CN113554760B
CN113554760B CN202110898709.8A CN202110898709A CN113554760B CN 113554760 B CN113554760 B CN 113554760B CN 202110898709 A CN202110898709 A CN 202110898709A CN 113554760 B CN113554760 B CN 113554760B
Authority
CN
China
Prior art keywords
virtual grid
model
grid model
character
original character
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.)
Active
Application number
CN202110898709.8A
Other languages
Chinese (zh)
Other versions
CN113554760A (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

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, which are used for determining an original character model; acquiring a clothing component virtual grid model and character model rejection information corresponding to the clothing component virtual grid model, wherein the character model rejection information corresponds to the original character virtual grid model, the character model rejection information indicates a rejection area of the original character virtual grid model, and the rejection area comprises a through-mold 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 method can effectively solve the problem of mold penetration during the replacement of the original character virtual grid model, supports the replacement of a single clothing component model, is convenient and quick, ensures that the output model cannot penetrate the mold, and brings better game experience to players.

Description

Method and device for changing package, computer equipment and storage medium
Technical Field
The present invention relates to the field of game technologies, and in particular, to a method and apparatus for changing a package, a computer device, and a storage medium.
Background
Game reloading is an integral part of a high quality game that gives players a better game experience and immersion. The common mode of changing is to splice the bare die of the character with the clothing model, then multiplex the character animation by the way of animation redirection, and simultaneously, in order to utilize clothing resources to the greatest extent, enrich the experience of games, reduce the workload of artistic staff and need to put on the same set of clothing by different characters.
However, how to properly process the fit of clothing between different characters becomes a difficult problem, and if the fit is not proper, a similar bug will appear, which affects the game experience of the player to some extent.
The current treatment methods for this problem in the industry often have the following disadvantages: the modeler adapts the character bare model and the clothing model in the modeling tool, then combines the output, and directly replaces the whole model when the model is replaced. The method is only suitable for replacing the whole set of clothes, and is not suitable 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, which can effectively solve the problem of mould penetration during reloading of an original character virtual grid model, support the replacement of a single clothing component virtual grid model, are convenient and quick, ensure that the output model does not penetrate the mould, and provide better game experience for players.
The embodiment of the invention provides a method for replacing a package, which comprises the following steps: determining an original character virtual grid model; acquiring a clothing component virtual grid model and character model rejection information corresponding to the clothing component virtual grid model, wherein the character model rejection information corresponds to the original character virtual grid model, the character model rejection information indicates a rejection area of the original character virtual grid model, and the rejection area comprises a through-mold area of the original character virtual grid model when the clothing component virtual grid model is rendered on the original character virtual grid model; determining a region to be removed on the original character virtual grid model based on the character model removing 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 clothing component virtual grid model on the target character virtual grid model to obtain a reloaded character virtual grid model.
In an optional example, the step of obtaining character model rejection information corresponding to the virtual grid model of the clothing component includes: and acquiring character model rejection information of the clothing component virtual grid model, wherein the character model rejection information corresponds to the body type of the original character virtual grid model.
In an alternative example, the character model rejection information includes triangle meshes constituting the rejection area, first index information in the triangle meshes of the original character virtual mesh model; the determining, based on the character model rejection information, a region to be rejected on the original character virtual grid model includes: and determining a target triangular grid to be eliminated in the triangular grids of the original character virtual grid model based on the first index information of the triangular grids of the elimination area, wherein the target triangular grid forms an area to be eliminated of the original character virtual grid model.
In an optional example, the number of the clothing component virtual grid models is at least two, and the determining, based on the first index information of the triangle grids of the culling area, a target triangle grid to be culled in the triangle grids of the original character virtual grid model includes: combining the rejection areas based on character model rejection information of the virtual grid models of all the clothes parts to obtain combined rejection information, wherein the combined rejection information comprises first index information of triangular grids of the combined rejection areas in the triangular grids of the original character virtual grid models; and determining a target triangle mesh to be removed from the triangle meshes of the original character virtual mesh model based on the first index information of the triangle meshes in the combined removing area, wherein the target triangle mesh forms a region to be removed of the original character virtual mesh model.
In an optional example, the character model rejection information includes a string of binary character strings, each character corresponding to a triangle mesh, the position of the character in the character string indicating first index information of the corresponding triangle mesh in the triangle mesh of the original character virtual mesh model, the character being 1, indicating that the corresponding triangle mesh is the triangle mesh of the rejection area; in the different character model rejection information, the characters at the same position correspond to the triangle meshes at the same position.
In an optional example, the determining, based on the first index information of triangle meshes in the merged rejection area, a target triangle mesh to be rejected in a triangle mesh of the original character virtual mesh model includes: obtaining vertexes of triangular grids of the original character virtual grid model; traversing the first index information, and obtaining a first vertex list based on the vertices of the triangle meshes and the combined rejection information.
In an optional example, the removing the region to be removed on the original character virtual grid model to obtain a target character virtual grid model includes: traversing the vertexes of the original character virtual grid model, adding the vertexes which are not in the first vertex list into a second vertex list, and recording new index information of the vertexes in the second vertex list; traversing first index information of the original character virtual grid model, and if all vertexes of a triangle grid indicated by the first index information are in the second vertex list, identifying the triangle grid based on new index information of vertexes of the triangle grid to obtain second index information of the triangle grid; and generating a new grid model as a target character virtual grid model based on the second vertex list and the second index information.
In an alternative example, the reloading method further comprises: 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 component virtual grid model, wherein the rejection area is an area outside a non-mold-penetrating area on the original character virtual grid model, and the non-mold-penetrating area comprises an area where the original character virtual grid model is unlikely to have mold penetration phenomenon when the clothing component virtual grid model is rendered on the original character virtual grid model; acquiring first index information of triangular grids included in the eliminating area in the triangular grids of the original character virtual grid model; and obtaining character model rejection information corresponding to the virtual grid model of the clothing component based on the first index information of the triangular grid of the rejection area.
In an alternative example, the determining a culling area of the original character virtual grid model based on the apparel component virtual grid model includes: rendering the apparel component virtual grid model onto the original character virtual grid model; determining an occlusion area to be occluded by the virtual grid model of the clothing component on the original character virtual grid model; and determining a rejection area of the original character virtual grid model based on the triangular grids covered by the shielding area in the original character virtual grid model.
In an optional example, the obtaining, based on the first index information of the triangle mesh of the rejection area, character model rejection information corresponding to the virtual mesh model of the clothing component includes: generating an original character string based on first index information of triangular grids of the original character virtual grid model, wherein the number of characters of the original character string is equal to the total number of the triangular grids of the original character virtual grid model, one character corresponds to one triangular grid, and the position of the character in the original character string indicates the first index information of the corresponding triangular grid in the triangular grids of the original character virtual grid model; and in the original character string, setting the character corresponding to the triangular grid in the eliminating area as 1, and setting the character corresponding to the triangular grid outside the eliminating area as 0 to obtain character model eliminating information corresponding to the virtual grid model of the clothing component.
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 rejection information corresponding to the clothing component virtual grid model, where the character model rejection information indicates a rejection area of an original character virtual grid model of the target body type, and the rejection area includes a mold penetration 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 removed on the original character virtual grid model based on the character model removing information; the rejecting module is used for rejecting the region to be rejected on the original character virtual grid model to obtain a target character virtual grid model; and the processing module is used for rendering the clothing component virtual grid model on the target character virtual grid model to obtain a changed character virtual grid model.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the method when executing the computer program.
Embodiments of the present invention also provide a computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the method as described above.
Embodiments of the invention also provide 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 invention.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
According to the reloading method, the device, the electronic equipment and the storage medium, triangle marks of the to-be-processed area of the virtual grid model of the original character are rejected by obtaining rejection information, a target processing object is obtained, and then the target processing object is re-rendered with the virtual grid model of the clothing component and then processed, so that a target display object is obtained, the occurrence of mold penetration can be effectively avoided, the complete display of the virtual grid model of the clothing component can be ensured, and the attractiveness of the virtual grid model of the original character is improved. For the original character virtual grid model, the whole rejection information is used for rejecting all the virtual grid models of the clothing parts currently worn by the original character virtual grid model, a plurality of virtual grid models of the clothing parts are not required to be separately rendered with the original character virtual grid model, the workload is effectively reduced, and the replacement processing is more efficient. And different clothing components of different clothing can be replaced simultaneously for wearing, so that more personalized choices of clothing collocation are enhanced, and the game fun of players is improved. In addition, when the original character virtual grid models with different body types are worn on the same piece of clothing component virtual grid model, the same piece of rejection information can be used, namely the rejection information can be multiplexed onto the different original character virtual grid models with the same body type, and single rejection processing is not required to be carried out on the different original character virtual grid models with the same body type.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a retrofit system provided by an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a reloading method according to an embodiment of the present 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 meshing an original character virtual grid model provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of a target processing object according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a target display object according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a replacement device according to an embodiment of the present 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 grid model 100; a apparel component virtual grid model 200;
a region to be rejected 30; a target character virtual grid model 40; triangle marks 50;
the character virtual grid model 2000 after the replacement;
a reloading device 3000; a modeling module 300;
a first acquisition module 400; a second acquisition module 500; a culling module 600;
a first determination module 700; a processing module 800.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the invention provides a reloading method, a reloading device, computer equipment and a storage medium. In particular, the present embodiment provides a reloading method suitable for a reloading apparatus which can be integrated in a computer device. The computer device may be a terminal or other device, for example, a mobile phone, a tablet computer, a notebook computer, a desktop computer, etc.
The reloading method of the embodiment can be realized by a terminal or realized by the terminal and a server together.
Referring to fig. 1, a reloading system provided in an embodiment of the present invention includes a terminal 10, a server 20, etc.; the terminal 10 and the server 20 are connected to each other through a network, for example, a wired or wireless network connection.
Wherein the terminal 10 may be used to request data resources.
Wherein the resource data of the terminal 10 may be obtained 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 that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligence platforms, but is not limited thereto.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
A method of changing a package, comprising:
s101: determining an original character virtual grid model 100;
in this step, the original character virtual grid model 100 is obtained, i.e., a bare model of the character of the game is built, so that the model can be applied to the subsequent steps.
S102: acquiring a clothing component virtual grid model 200 and character model rejection information corresponding to the clothing component virtual grid model 200, wherein the character model rejection information corresponds to an original character virtual grid model 100, and indicates a rejection area of the original character virtual grid model 100, and the rejection area comprises a through-mold area of the original character virtual grid model 100 when the clothing component virtual grid model 200 is rendered on the original character virtual grid model 100;
in this step, it is necessary to acquire the virtual grid model 200 of the clothing component and the character model rejection information corresponding thereto, and it is understood that if the original virtual grid model 100 of the character represents the lower limb, the virtual grid model 200 of the clothing component corresponding to the lower limb is the trousers. If the original character virtual grid model 100 represents a torso, the corresponding clothing component virtual grid model 200 is a jacket, so it can be understood that in this step, the clothing component virtual grid model 200 corresponding to the original character virtual grid model 100 needs to be obtained, and character model rejection information of the region is obtained according to the region corresponding to the clothing component virtual grid model 200 on the original character virtual grid model 100.
Character model culling information may represent culling areas of the original character virtual grid model 100, where an explanation of the original character virtual grid model is required. It will be appreciated that the original character virtual grid model 100 may be the same model if the body types of the original character virtual grid model 100 are the same. That is, the character model culling information acquired by the original character virtual grid model 100 and the clothing member virtual grid model 200 may be multiplexed to the original character virtual grid model 100 of the same body type.
In other words, the homomorphic original character virtual grid models 100 can each be processed using character model culling information obtained from a single original character virtual grid model 100.
The culling area of the original character virtual grid model 100 can be represented by character model culling information, and the culling area can accurately know the area where the wearing mode occurs when the clothing component virtual grid model 200 is worn on the original character virtual grid model 100.
It should be further noted that, in the embodiment of the present invention, the setting of the homotype refers to character models of two characters, where the heights are within a certain range, or the heights are completely identical, but the body types (i.e. fat and thin) may be different, i.e. the homotype may be determined, that is, the rejection information may be multiplexed.
Further, the body types of the two character models can be determined by the numerical ranges of the body height and the waist circumference.
For example, the height of 1.6m-1.65m can be set to be a height range, and the waistline can be set to be 65cm-75cm to be a range, namely two character models, one height of 1.66m and the waistline of 66cm. And the other character has the height of 1.68m and the waistline of 74cm, so that the two character models can be considered as the same body type, namely, the two character models can multiplex the same character model rejection information.
It will be appreciated that the different positions of the model to be worn for different characters and different garments will be quite labor intensive if a single garment component virtual grid model 200 for a single character is to be configured separately, with the number of original character virtual grid models 100 and garment component virtual grid models 200 being divided into a large number. It is therefore desirable to devise an efficient method for concealing the mold-passing area. By multiplexing the rejection information to the original character virtual grid model 100 of the same body type, the performance can be effectively saved, and the character model rejection information can be multiplexed without acquiring the character model rejection information again for the original character virtual grid model 100 of the same body type, thereby being convenient and quick.
S103: determining a region to be rejected 30 on the original character virtual grid model 100 based on the character model rejection information;
in this step, the region 30 to be removed of the original character virtual grid model 100, that is, the region where the clothing component virtual grid model 200 covers the original character virtual grid model 100, can be effectively determined by the character model removal information. As can be seen from the foregoing, the virtual grid model 200 of the clothing component of the original character virtual grid model 100 is formed as a whole after being combined, and the virtual grid model 100 of the original character is formed as being integrated with the virtual grid model 200 of the clothing component, so that the region of the virtual grid model 100 of the original character corresponding to the pattern forming phenomenon is set as the region 30 to be removed.
For example, if the clothing component virtual grid model 200 is a coat, the region corresponding to the original character virtual grid model 100 is a torso, and thus the torso of the original character virtual grid model 100 can be defined as the region to be removed 30. If the clothing member virtual grid model 200 is trousers, the region corresponding to the original character virtual grid model 100 is a lower limb, whereby the lower limb of the original character virtual grid model 100 can be defined as the region to be removed 30.
For ease of description, the original character virtual grid model 100 is described by taking the legs of the character as an example, and the clothing component virtual grid model 200 is described by taking trousers to be worn by the character as an example.
As shown in fig. 3, it can be seen in fig. 3 that the original character virtual grid model 100 is a model of a leg of a person, the clothing component virtual grid model 200 is a trousers model, and after the trousers model and the leg model of the person are rendered, a model penetration occurs, and as shown in fig. 3, a region where a model penetration phenomenon exists on a display region of the original character virtual grid model 100. The display area can be understood as a picture area to be displayed to the player after the corresponding clothing component virtual grid model 200 is worn by the original character virtual grid model 100, that is, an area to be displayed to the player as a whole after the original character virtual grid model 100 and the trousers model are rendered.
In other words, as shown in fig. 3, after the lower limbs of the original character virtual grid model 100, i.e., the character model, are integrated with pants as the clothing member virtual grid model 200, the pants normally need to be covered on the outside of the lower limbs to realize that the lower limbs of the character model wear the pants.
However, after the mold penetration occurs, the lower limb mold of the human body is penetrated out from the outside of the trousers mold, resulting in insufficient display of the trousers mold, that is, the mold penetration region is at the lower limb of the human body, and thus, it can be understood that the mold penetration portion of the lower limb of the human body is taken as the region to be removed 30 according to the mold penetration region between the lower limb mold of the human body and the trousers mold.
Accordingly, if the mold penetrating occurs between the human trunk and the jacket model, the mold penetrating part of the human trunk 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 rejection information obtained through the above steps may reject the corresponding region of the original character virtual grid model 100, that is, the region to be rejected 30, thereby obtaining the target character virtual grid model 40. The target character virtual grid model 40 is the portion excluding the region of the model, as shown in fig. 5.
S105: the clothing component virtual grid model 200 is rendered on the target character virtual grid model 40 to obtain the reloaded character virtual grid model 2000.
In this step, as shown in fig. 6, after the target character virtual grid model 40 and the clothing component virtual grid model 200 are re-rendered, a complete model can be obtained, that is, the target character virtual grid model 40 and the clothing component virtual grid model 200 can be completely displayed, and no mold penetration phenomenon occurs.
According to the method for changing the clothes, according to the embodiment of the invention, the character model rejection information is obtained through the original character virtual grid model 100 and the clothes part virtual grid model 200, the corresponding region 30 to be rejected is obtained according to the character model rejection information, the target character virtual grid model 40 is obtained through rejecting the region 30 to be rejected, and the target character virtual grid model 40 and the clothes part virtual grid model 200 are integrated through reprocessing the target character virtual grid model 40, so that the problem that the original character virtual grid model 100 and the clothes part virtual grid model 200 are integrated is effectively solved, the clothes part virtual grid model 200 is completely displayed, the clothes part virtual grid model 200 can be replaced by a single clothes part virtual grid model 200, the matching of various clothes parts of the original character virtual grid model 100 by a player is facilitated, the game experience of the player is improved, in addition, the character model rejection information can be multiplexed onto the same-type on-time character model, the convenience and the rapidness are realized, and the performance is improved.
As a possible implementation manner, as shown in fig. 2, a method for replacing the present invention is provided, based on the above embodiment, in step S102: the step of obtaining character model rejection information corresponding to the virtual grid model 200 of the clothing component includes:
character model rejection information of the clothing component virtual grid model 200 corresponding to the body type of the original character virtual grid model 100 is acquired.
That is, as described above, when the virtual grid model 200 of the clothing component is rendered onto the original virtual grid model 100 of the person, the threading occurs, so that the rejection information having the same body type as the original virtual grid model 100 of the person can be obtained through the location information of the threading, thereby facilitating the subsequent rejection of the original virtual grid model 100 of the person and preventing the threading.
As shown in fig. 4, the original human virtual grid model 100 and the original human virtual grid model 100 are triangle mesh 50 models, and the number of triangle meshes 50 of the original human virtual grid model 100 and the original human virtual grid model 100 is the same.
Specifically, the original character virtual grid model 100 and the original character virtual grid model 100 are grid models formed by a plurality of triangle marks, and the number of triangles constituting the original character virtual grid model 100 is kept consistent with the number of triangles of the original character virtual grid model 100, thereby ensuring that the triangle arrangement order of the original character virtual grid model 100 and the original character virtual grid model 100 is the same, and facilitating the wealth character model to reject information.
Further, as shown in fig. 4, the character model culling information includes triangle mesh 50 constituting a culling area, first index information in triangle mesh 50 of the original character virtual mesh model 100.
In other words, the original character virtual grid model 100 is composed of the triangular grids 50, and the character model rejection information includes the triangular grids 50 in the rejection area and the first index information of the triangular grids 50 constituting the rejection area. Here, the information of the order of the index information, that is, the first index information, is the order of the triangle mesh 50 constituting the original character virtual mesh model 100.
As a possible implementation manner, as shown in fig. 4, a method for replacing the present invention is provided, based on the above embodiment, in step S103: determining the region to be culled 30 on the original character virtual grid model 100 based on the character model culling information includes:
s201: based on the first index information of the triangle mesh 50 of the culling area, a target triangle mesh 50 to be culled in the triangle mesh 50 of the original character virtual mesh model 100 is determined, and the target triangle mesh 50 constitutes the area 30 to be culled of the original character virtual mesh model 100.
Specifically, in this step, with respect to the triangular meshes 50 of the original character virtual mesh model 100, and according to the first index information, it is possible to know the information of the triangular meshes 50 to be eliminated, that is, the target triangular meshes 50, and the region where the target triangular meshes 50 exist, that is, the region 30 to be eliminated.
In other words, the lower limbs of the character are formed by triangular meshes 50, and the region to be removed is the region to be removed, but the lower limbs of the character are not all molded with the virtual mesh model 200 of the clothing component, i.e. the trousers, but the region between the trousers and the partial region of the lower limbs, and the region between the lower limb model and the trousers, i.e. the region to be removed 30, are molded.
Further, the number of apparel component virtual grid models 200 is at least two, that is, the number of apparel component virtual grid models 200 is at least two, for example, at least two models of a coat and pants.
As a possible implementation manner, as shown in fig. 4, a method for replacing the present invention is provided, based on the above embodiment, in step S201: determining a target triangle mesh 50 to be culled in the triangle mesh 50 of the original character virtual mesh model 100 based on the first index information of the triangle mesh 50 of the culled area includes:
S301: the merging of the rejection areas is performed based on the character model rejection information of each of the virtual grid models 200 of the clothing components, resulting in merged rejection information, which includes first index information of the triangle mesh 50 of the merged rejection area in the triangle mesh 50 of the original virtual grid model 100 of the character.
Specifically, in this step, the rejection areas of the virtual mesh models 200 of the respective clothing parts may be combined, that is, the rejection areas of the virtual mesh models 200 of the plurality of clothing parts are combined to obtain combined rejection information in which the rejection information of the plurality of character models is combined, where the combined rejection information includes the first index information of the triangle 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, whereby the original character virtual mesh model 100 corresponding to the plurality of clothing component virtual mesh models 200 can be simultaneously rejected by the merged rejection information. The rejection information after the rejection information of the multiple virtual grid models 200 of the clothing components is combined is implemented by a certain combination rule, and the combination rule is as follows:
The merging rule is as follows:wherein T represents a set; A. b and C respectively represent the virtual grid models 200 of apparel components for different garments; n represents the nth of the virtual mesh models 200 of apparel components to which the triangle is labeled as belonging.
Specifically, the head, torso and lower limbs of the original character virtual grid model 100 are described as examples, assuming that a represents the helmet of a-set clothing, B represents the upper garment of B-set clothing, and C represents the trousers of C-set clothing. It will be appreciated that T A Set of reject information representing head model corresponding to a suit helmet, T n A N is the nth triangle mesh 50 in the reject information of the head model corresponding to the helmet of the set A clothing, T is needed to be removed n A The nth triangular mesh 50 in the head model corresponding to the helmet of the a-suit is represented as a collection of culling information that needs to be culled. Correspondingly, T n B Then the set of eliminating information of the nth triangle mesh 50 is required to be eliminated in the trunk model corresponding to the jacket of the garment set B, T n C The set of culling information of the nth triangular mesh 50 needs to be culled from the lower limb model corresponding to the trousers of the garment of the set C.
When the original character virtual grid model 100 needs to replace the virtual grid model 200 of the clothing parts for the head, the trunk and the lower limbs at the same time, the combination rule is adopted The integration of the head, trunk and lower limbs rejection information is combined to obtain the whole rejection information, so that the original character virtual grid model 100 can be rapidly rejected when the clothing components of the original character virtual grid model 100 are replaced, the wearing of the model is prevented, and meanwhile, the condition that one original character virtual grid model 100 can be used for inserting and wearing the clothing component virtual grid models 200 belonging to different clothing is met, so that the clothing matching of players is moreAnd (5) sampling.
S302: based on the first index information of the triangle meshes 50 in the merged rejection area, a target triangle mesh 50 to be rejected in the triangle meshes 50 of the original character virtual mesh model 100 is determined, and the target triangle mesh 50 constitutes the area 30 to be rejected of the original character virtual mesh model 100.
Specifically, the target triangular mesh 50 to be removed in the triangular mesh 50 can be determined by the first index information of the triangular mesh 50 of the combined removing area, and the plurality of target triangular meshes 50 can form the area 30 to be removed of the original character virtual mesh model 100, i.e. the area to be removed of the original character virtual mesh model 100 can be marked.
Further, the character model rejection information includes a string of binary character strings, each character corresponds to a triangle mesh 50, the position of the character in the character string indicates the first index information of the corresponding triangle mesh 50 in the triangle mesh 50 of the original character virtual mesh model 100, the character is 1, and the corresponding triangle mesh 50 is the triangle mesh 50 of the rejection area.
Specifically, the culling information is a binary string file, where each number corresponds to a triangle in the triangle mesh 50, and the position of the number in the string may correspond to the triangle arranged according to the first index information on the original character virtual mesh model 100.
For example, the 30 th number in the string, i.e., the 30 th triangle in the triangle mesh 50 representing the original character virtual mesh model 100. Further, triangles that are in the culling area may be labeled as character 1, i.e., representing triangles that need to be culled.
Meanwhile, in the different character model rejection information, the characters at the same position correspond to the triangle mesh 50 at the same position.
As a possible implementation manner, the present invention proposes a reloading method based on the above embodiment, and the step S301 is: combining the rejection areas based on the character model rejection information of each clothing component virtual grid model 200 to obtain combined rejection information, including:
S401: character strings in character model rejection information of the virtual grid model 200 of each clothing component are subjected to OR operation on characters at the same position in each character string, and the operated character strings are obtained.
S402: and obtaining the combined 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 calculated to obtain an overall character string, so that the multiple clothing component virtual grid models 200 on the original character virtual grid model 100 may be eliminated.
As a possible implementation manner, the present invention proposes a reloading method based on the above embodiment, and the step S302 is as follows: based on the first index information of the triangle mesh 50 in the merged rejection area, determining the target triangle mesh 50 to be rejected in the triangle mesh 50 of the original character virtual mesh model 100 includes:
s501: obtaining vertices of the triangular mesh 50 of the original character virtual mesh model 100;
in this step, the second index information of the triangular mesh 50 is acquired, the index information being the arrangement order of the triangular mesh 50, and the second index information being the arrangement order of the triangular mesh 50 remaining after the elimination. And, or remove the vertices of the triangle mesh 50, by obtaining the vertices and the arrangement sequence of the triangle mesh 50, the reject list of the triangle mesh 50 can be effectively determined.
S502: traversing the first index information, obtaining a first vertex list based on the vertices of the triangle mesh 50 and the merged culling information.
Specifically, the first index information of the triangle mesh 50 is retrieved one by one, the arrangement order of the triangle mesh 50 is obtained, and the first vertex list is obtained based on the vertices of the triangle mesh 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, a method for replacing the present invention is provided, based on the above embodiment, in step 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, including:
s601: traversing the vertices of the original character virtual grid model 100, adding vertices not in the first vertex list to the second vertex list, and recording new index information of the vertices in the second vertex list.
Specifically, the information of all vertexes is searched from beginning to end, whether the vertexes exist in a first vertex list is checked, namely whether a vertex book exists in a list needing to be removed, if yes, the vertexes are removed, if not, the vertexes are reserved, a second vertex list is generated in a sorting mode, and a new arrangement sequence, namely new index information, is generated on the reserved vertexes.
S602: traversing the first index information of the original character virtual grid model 100, and if all the vertexes of the triangle grid 50 indicated by the second index information are in the second vertex list, identifying the triangle grid 50 based on the new index information of the vertexes of the triangle grid 50 to obtain second index information of the triangle grid 50.
In this step, all triangle meshes 50 are searched, if all three vertices of the triangle are in the vertex list to be kept, i.e. the second vertex list, the triangle is marked by the new index information of the vertices, i.e. the triangle meshes 50 can have the 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, through the above-described steps, a new mesh model, that is, a target character virtual mesh model 40, may be generated from the retained triangle order information, that is, the second index information, and the retained vertex list, that is, the second vertex list, as shown in fig. 5.
The method for replacing the shell in the embodiment of the invention further comprises the following steps:
s106: acquiring an original character virtual grid model 100 and a decoration component virtual grid model 200;
In this step, by acquiring the original character virtual grid model 100, that is, acquiring the original character virtual grid model 100 of the same body type as the original character virtual grid model 100, the definition of the same body type in the embodiment of the present invention is already described, and the description thereof will be omitted.
And simultaneously, a virtual grid model 200 of the clothing component is acquired, and the virtual grid model is matched with the original character virtual grid model 100 to realize rendering.
S107: determining a reject area of the original character virtual grid model 100 based on the clothing component virtual grid model 200, wherein the reject area is an area outside a non-mold-penetrating area on the original character virtual grid model 100, and the non-mold-penetrating area comprises an area where the original character virtual grid model 100 is unlikely to have a mold-penetrating phenomenon when the clothing component virtual grid model 200 is rendered on the original character virtual grid model 100;
in this step, as described above, the culling area of the original character virtual grid model 100, that is, the area where the mold penetration phenomenon occurs, is determined by the clothing component virtual grid model 200, and the original character virtual grid model 100 includes the non-mold penetration area, that is, the area where the mold penetration phenomenon of the original character virtual grid model 100 is impossible.
S108: acquiring first index information of the triangle mesh 50 included in the rejection area in the triangle mesh 50 of the original character virtual mesh model 100;
in this step, as before, the first index information in the triangular mesh 50 of the original character virtual mesh model 100 is acquired. I.e. triangle mesh 50 orders the information.
S109: based on the first index information of the triangle mesh 50 of the reject area, character model reject information corresponding to the virtual mesh model 200 of the clothing component is obtained.
In this step, character model removal information corresponding to the virtual grid model 200 of the clothing component can be obtained from the first index information.
As a possible implementation manner, the method for changing the dress provided by the present invention is based on the above embodiment, S107, determining the rejecting area of the original character virtual grid model 100 based on the clothing component virtual grid model 200, including:
s701, rendering the clothing component virtual grid model 200 onto the original character virtual grid model 100;
in this step, a model of a person wearing trousers as shown in fig. 3 may be obtained by rendering the dress parts virtual grid model 200 onto the original person virtual grid model 100, thereby obtaining a complete model, for example, by rendering trousers onto the original person virtual grid model 100.
S702, determining a mold penetration area where a mold penetration phenomenon occurs on the original character virtual grid model 100;
for example, as shown in fig. 3, when the virtual grid model 200 of the clothing component is rendered on the original character virtual grid model 100, a region of the mold penetration phenomenon occurs. In this step, a region where the mold penetration phenomenon occurs is acquired for facilitating the subsequent processing.
S703 determining a culling area of the original character virtual grid model 100 based on the triangle mesh 50 covered by the through-mold area in the original character virtual grid model 100.
In this step, as before, the position of the culling area of the original human virtual grid model 100 can be determined by confirming the triangular mesh 50 of the through-mold area of the original human virtual grid model 100.
As a possible implementation manner, the present invention proposes a reloading method based on the above embodiment, S107: determining a culling area of the original character virtual grid model 100 based on the apparel component virtual grid model 200 includes:
s801, rendering the clothing component virtual grid model 200 onto the original character virtual grid model 100;
in this step, a model of a person wearing trousers as shown in fig. 3 may be obtained by rendering the dress parts virtual grid model 200 onto the original person virtual grid model 100, thereby obtaining a complete model, for example, by rendering trousers onto the original person virtual grid model 100.
S802, determining an occlusion area to be occluded by the virtual grid model 200 of the clothing component on the original character virtual grid model 100;
it will be appreciated that when the clothing member virtual grid model 200 is rendered onto the original character virtual grid model 100, the clothing member virtual grid model 200 needs to occlude the original character virtual grid model 100, and thus it will be appreciated that in this step, the clothing member virtual grid model 200 needs to determine the area on the original character virtual grid model 100 that needs to be occluded.
S803 determines a culling area of the original human virtual grid model 100 based on the triangle mesh 50 covered by the occlusion area in the original human virtual grid model 100.
In this step, by determining the triangle mesh 50 of the occlusion region, the region on the original character virtual mesh model 100 that needs to be removed may be determined, that is, the region on the clothing component virtual mesh model 200 that should be removed from the original character virtual mesh model 100 is all marked as a removed region.
As a possible implementation manner, the present invention proposes a reloading method based on the above embodiment, S108: based on the first index information of the triangle mesh 50 of the reject area, character model reject information corresponding to the virtual mesh model 200 of the clothing component is obtained, 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 described above, the first index information indicates the arrangement order of the triangular meshes 50, and each triangular mesh 50 is represented by one character, and the position where the character is located, that is, the number of triangular meshes 50.
S902: in the original character string, the character corresponding to the triangle mesh 50 in the reject area is set to 1, the character corresponding to the triangle mesh 50 outside the reject area is set to 0, and the character model reject information corresponding to the clothing component virtual mesh model 200 is obtained.
In this step, it is understood that all triangle meshes 50 are represented by one character, and different character representations may be used for triangle meshes 50 at different positions, respectively, that is, triangles in the culling area may be represented by character 1, and triangle meshes 50 outside the culling area may be represented by character 0.
As shown in fig. 4, taking the human lower limb model as an example, for the treatment of the removed area and the area to be preserved of the human lower limb model, the area to be preserved, such as the knee part, may be marked with 0 after being marked with a triangle mesh 50 of one color. And the area to be removed is then gridded with a triangle mesh 50 of another color, which may be labeled 1.
After meshing the culling area and performing triangle meshing 50, the information can be derived to obtain a binary file composed of 0 and 1 strings, i.e., culling information. In the culling information, the lengths of the 0 and 1 strings represent the number of triangles required for meshing the original character virtual mesh model 100, and the number of the strings represents the number of triangle meshes 50 for meshing.
For example, still taking the human lower limb model above as an example, in mesh division of the human lower limb model, the triangular mesh 50 is used for mesh division, that is, the human 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 used as an area needing to be reserved, and is divided by a triangle new mark with one color, and meanwhile, the mark is 0. The other areas are divided as areas to be removed using a triangular mesh 50 of another color, and are marked 1. The culling information thus obtained 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 triangle mesh 50 is the triangle mesh 50 to be reserved. Where the second number is 1, it is indicated that the second triangular mesh 50 is the triangular mesh 50 to be culled.
In still other alternative embodiments of the present invention, the obtained string may be 11011011000 … …, which indicates that the first number is 1, that is, the first triangle mesh 50 is the triangle mesh 50 to be eliminated, the second number is not yet 1, that is, the second triangle mesh 50 is also the triangle mesh 50 to be eliminated, the third number is 0, that is, the third triangle mesh 50 is the triangle mesh 50 to be reserved, and so on, and will not be repeated herein.
The present invention is not limited thereto, and when the original character virtual grid model 100 is imported into the engine, the rearrangement optimization function of the triangle mesh 50 in the engine needs to be turned off.
In this step, the rearrangement optimization function of the triangle mesh 50 of the engine needs to be turned off when the established original character virtual mesh model 100 is imported into the engine. Therefore, the performance of the original character virtual grid model 100 when being imported into the engine can be optimized, and the situation that the game engine reorders the vertices of the imported original character virtual grid model 100 and the triangle grids 50, so that the arrangement sequence recorded in the index information is disordered and the reject information cannot be reused can be effectively avoided.
It should be noted that, due to the influence of the smooth group of vertices, the number of vertices of the original character virtual grid model 100 may be different after the virtual grid model is imported into the game engine.
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 an original character virtual grid model 100; a second obtaining module 500, configured to obtain a clothing component virtual grid model 200 and character model rejection information corresponding to the clothing component 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 mold penetration area of the original character virtual grid model 100 when the clothing component 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 rejection information, a region to be rejected 30 on the original character virtual grid model 100; the rejecting module 600 is configured to reject the region to be rejected 30 on the original character virtual grid model 100 to obtain a target character virtual grid model 40; processing module 800 is configured to render apparel component virtual grid model 200 on target persona virtual grid model 40 to obtain a reloaded persona virtual grid model 2000.
In addition, the embodiment of the application further provides a computer device, which 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 console, a personal computer (PC, personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), and the like. Fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application, as shown in fig. 8. 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. It will be appreciated by those skilled in the art that the computer device structure shown in the figures is not limiting of the computer device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The processor 401 is a control center of the computer device 1000, connects various parts of the entire computer device 1000 using various interfaces and lines, and performs various functions of the computer device 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 performing overall monitoring of the computer device 1000.
In the embodiment of the present application, the processor 401 in the computer device 1000 loads the instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions:
s101: determining an original character virtual grid model 100;
s102: acquiring a clothing component virtual grid model 200 and character model rejection information corresponding to the clothing component virtual grid model 200, wherein the character model rejection information corresponds to an 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 comprises a through mold area of the original character virtual grid model 100 when the clothing component virtual grid model 200 is rendered on the original character virtual grid model 100;
s103: determining a region to be rejected 30 on the original character virtual grid model 100 based on the character model rejection 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 clothing component virtual grid model 200 is rendered on the target character virtual grid model 40 to obtain the reloaded character virtual grid model 2000.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Optionally, as shown in fig. 8, the computer device 1000 further includes: a touch display 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch display 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407, respectively. Those skilled in the art will appreciate that the computer device structure shown in FIG. 8 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components.
The touch display 403 may be used to display a graphical user interface and receive 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. Wherein the display panel may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of a computer device, which may be composed 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, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations on or near the user (such as operations on or near the touch panel by the user using any suitable object or accessory such as a finger, stylus, etc.), 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 azimuth 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 detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 401, and can receive and execute commands sent from the processor 401. The touch panel may overlay the display panel, and upon detection of a touch operation thereon or thereabout, the touch panel is passed to the processor 401 to determine the type of touch event, and the processor 401 then provides a corresponding visual output on the display panel in accordance with the type of 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 implement the input and output functions. In some embodiments, however, the touch panel and the touch panel may be implemented as two separate components to perform the input and output functions. I.e. the touch-sensitive display 403 may also implement an input function as part of the input unit 406.
The radio frequency circuitry 404 may be used to transceive radio frequency signals to establish wireless communications with a network device or other computer device via wireless communications.
The audio circuitry 405 may be used to provide an audio interface between a user and a computer device through speakers, microphones, and so on. The audio circuit 405 may transmit the received electrical signal after audio data conversion to a speaker, where the electrical signal is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 405 and converted into audio data, which are processed by the audio data output processor 401 and sent via the radio frequency circuit 404 to, for example, another computer device, or which are output to the memory 402 for further processing. The audio circuit 405 may also include an ear bud jack to provide communication of the peripheral ear bud 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. Alternatively, the power supply 407 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, and power consumption management through the power management system. The power supply 407 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
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 will not be described herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, 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 having stored therein a plurality of computer programs that can be loaded by a processor to perform steps in any of the reloading methods provided by 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 clothing component virtual grid model 200 and character model rejection information corresponding to the clothing component virtual grid model 200, wherein the character model rejection information corresponds to an 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 comprises a through mold area of the original character virtual grid model 100 when the clothing component virtual grid model 200 is rendered on the original character virtual grid model 100;
s103: determining a region to be rejected 30 on the original character virtual grid model 100 based on the character model rejection 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 clothing component virtual grid model 200 is rendered on the target character virtual grid model 40 to obtain the reloaded character virtual grid model 2000.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps in any of the reloading methods provided in the embodiments of the present application may be executed by the computer program stored in the storage medium, so that the beneficial effects that any of the reloading methods provided in the embodiments of the present application may be achieved, which are detailed in the previous embodiments and are not repeated herein.
The foregoing has described in detail the methods, apparatuses, storage media and computer devices provided by the embodiments of the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing examples are provided to assist in understanding the methods and core ideas of the present application; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the ideas of the present application, the contents of the present specification should not be construed as limiting the present application in summary.

Claims (11)

1. A method of changing a package, comprising:
determining an original character virtual grid model;
acquiring a clothing component virtual grid model and character model rejection information corresponding to the clothing component virtual grid model, wherein the character model applicable to the character model rejection information is the same as the original character virtual grid model in body type, the character model rejection information indicates a rejection area of the original character virtual grid model with the same body type, the rejection area comprises a mold penetrating 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 character model rejection information comprises triangular grids forming the rejection area, first index information in the triangular grids of the original character virtual grid model is included, and the number of the clothing component virtual grid models is at least two;
Combining the rejection areas based on character model rejection information of the virtual grid models of all the clothes parts to obtain combined rejection information, wherein the combined rejection information comprises first index information of triangular grids of the combined rejection areas in the triangular grids of the original character virtual grid models;
determining a target triangular grid to be removed from the triangular grids of the original character virtual grid model based on the first index information of the triangular grids in the combined removing area, wherein the target triangular grid forms a to-be-removed area of the original character virtual grid model;
removing the region to be removed on the original character virtual grid model to obtain a target character virtual grid model;
and rendering the clothing component virtual grid model on the target character virtual grid model to obtain a reloaded character virtual grid model.
2. The method according to claim 1, wherein the character model rejection information includes a string of binary character strings, each character corresponding to a triangular mesh of a virtual mesh model, the position of the character 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 rejection area; in the different character model rejection information, the characters at the same position correspond to the triangle meshes at the same position.
3. The method according to claim 1, wherein the determining, based on the first index information of triangle meshes in the merged rejection area, a target triangle mesh to be rejected from the triangle meshes of the original character virtual mesh model includes:
obtaining vertexes of triangular grids of the original character virtual grid model;
traversing the first index information, and obtaining a first vertex list based on the vertices of the triangle meshes and the combined rejection information.
4. The method of changing the original character virtual grid model according to claim 3, wherein the removing the region to be removed from the original character virtual grid model to obtain a target character virtual grid model comprises:
traversing the vertexes of the original character virtual grid model, adding the vertexes which are not in the first vertex list into a second vertex list, and recording new index information of the vertexes in the second vertex list;
traversing first index information of the original character virtual grid model, and if all vertexes of a triangle grid indicated by the first index information are in the second vertex list, identifying the triangle grid based on new index information of vertexes of the triangle grid to obtain second index information of the triangle grid;
And generating a new grid model as a target character virtual grid model based on the second vertex list and the second index information.
5. The method of changing a package according to any one of claims 1-4, further comprising:
acquiring an original character virtual grid model and a clothing component virtual grid model;
determining a rejection area of the original character virtual grid model based on the clothing component virtual grid model, wherein the rejection area is an area outside a non-mold-penetrating area on the original character virtual grid model, and the non-mold-penetrating area comprises an area where the original character virtual grid model is unlikely to have mold penetration phenomenon when the clothing component virtual grid model is rendered on the original character virtual grid model;
acquiring first index information of triangular grids included in the eliminating area in the triangular grids of the original character virtual grid model;
and obtaining character model rejection information corresponding to the virtual grid model of the clothing component based on the first index information of the triangular grid of the rejection area.
6. The method of retrofitting of claim 5 wherein said determining a culling area of said original character virtual grid model based on said apparel component virtual grid model comprises:
Rendering the apparel component virtual grid model onto the original character virtual grid model;
determining a mold penetrating area in which a mold penetrating phenomenon occurs on the original character virtual grid model;
and determining a rejection area of the original character virtual grid model based on the triangular grids covered by the mold penetrating area in the original character virtual grid model.
7. The method of retrofitting of claim 5 wherein said determining a culling area of said original character virtual grid model based on said apparel component virtual grid model comprises:
rendering the apparel component virtual grid model onto the original character virtual grid model;
determining an occlusion area to be occluded by the virtual grid model of the clothing component on the original character virtual grid model;
and determining a rejection area of the original character virtual grid model based on the triangular grids covered by the shielding area in the original character virtual grid model.
8. The method of changing the dress form according to claim 5, wherein the obtaining of character model rejection information corresponding to the virtual grid model of the dress part based on the first index information of the triangle mesh of the rejection area includes:
Generating an original character string based on first index information of triangular grids of the original character virtual grid model, wherein the number of characters of the original character string is equal to the total number of the triangular grids of the original character virtual grid model, one character corresponds to one triangular grid, and the position of the character in the original character string indicates the first index information of the corresponding triangular grid in the triangular grids of the original character virtual grid model;
and in the original character string, setting the character corresponding to the triangular grid in the eliminating area as 1, and setting the character corresponding to the triangular grid outside the eliminating area as 0 to obtain character model eliminating information corresponding to the virtual grid model of the clothing component.
9. A refill unit, 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 rejection information corresponding to the clothing component virtual grid model, where a character model to which the character model rejection information is applicable is the same as a body type of the original character virtual grid model, the character model rejection information indicates a rejection area of the original character virtual grid model with the same body type, the rejection area includes a mold penetrating 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 character model rejection information includes triangle grids forming the rejection area, and a number of the clothing component virtual grid models is at least two in the triangle grids of the original character virtual grid model;
The first determining module is used for merging the rejection areas based on the character model rejection information of the virtual grid models of the clothing parts to obtain merged rejection information, wherein the merged rejection information comprises first index information of triangle grids of the merged rejection areas in the triangle grids of the original character virtual grid models; determining a target triangular grid to be removed from the triangular grids of the original character virtual grid model based on the first index information of the triangular grids in the combined removing area, wherein the target triangular grid forms a to-be-removed area of the original character virtual grid model;
the rejecting module is used for rejecting the region to be rejected on the original character virtual grid model to obtain a target character virtual grid model;
and the processing module is used for rendering the clothing component virtual grid model on the target character virtual grid model to obtain a changed character virtual grid model.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the steps of the method according to any of claims 1-8 when the computer program is executed.
11. A computer readable storage medium having stored thereon a plurality of computer programs, wherein the computer programs, when executed by a processor, implement the steps of the method of any of claims 1-8.
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 CN113554760A (en) 2021-10-26
CN113554760B true 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 (10)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10953334B2 (en) * 2019-03-27 2021-03-23 Electronic Arts Inc. Virtual character generation from image or video data

Patent Citations (10)

* 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
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
CN113554760A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
CN111282268B (en) Plot showing method, plot showing device, plot showing terminal and storage medium in virtual environment
CN110675412B (en) Image segmentation method, training method, device and equipment of image segmentation model
CN113350802B (en) Voice communication method, device, terminal and storage medium in game
CN110852942A (en) Model training method, and media information synthesis method and device
CN108525306B (en) Game implementation method and device, storage medium and electronic equipment
CN112927332A (en) Skeletal animation updating method, device, equipment and storage medium
CN112870718A (en) Prop using method and device, storage medium and computer equipment
CN113554760B (en) Method and device for changing package, computer equipment and storage medium
CN113101666A (en) Game role model method, device, computer equipment and storage medium
CN113426129A (en) User-defined role appearance adjusting method, device, terminal and storage medium
CN117274475A (en) Halo effect rendering method and device, electronic equipment and readable storage medium
CN113362435B (en) Virtual component change method, device, equipment and medium of virtual object model
CN117455753A (en) Special effect template generation method, special effect generation device and storage medium
CN112149599A (en) Expression tracking method and device, storage medium and electronic equipment
CN116109737A (en) Animation generation method, animation generation device, computer equipment and computer readable storage medium
CN112843729B (en) Operation parameter determination method and device, computer equipment and storage medium
CN115222904A (en) Terrain processing method and device, electronic equipment and readable storage medium
CN113413600A (en) Information processing method, information processing device, computer equipment and storage medium
CN117523142A (en) Virtual fitting method, virtual fitting device, electronic equipment and computer readable storage medium
CN117523136B (en) Face point position corresponding relation processing method, face reconstruction method, device and medium
CN117689792A (en) Virtual garment generation method and device, electronic equipment and readable storage medium
CN117982886A (en) Sound source control method and device for virtual scene, computer equipment and storage medium
CN116531750A (en) Mesh structure generation method, mesh structure generation device, electronic device and readable storage medium
CN117689815A (en) Model body type adjusting method, device, computer equipment and storage medium
CN115888092A (en) Mapping processing method and device for virtual object, computer equipment and storage medium

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