CN113610960B - Method, device and storage medium for preventing mold penetration during three-dimensional model merging - Google Patents

Method, device and storage medium for preventing mold penetration during three-dimensional model merging Download PDF

Info

Publication number
CN113610960B
CN113610960B CN202110811398.7A CN202110811398A CN113610960B CN 113610960 B CN113610960 B CN 113610960B CN 202110811398 A CN202110811398 A CN 202110811398A CN 113610960 B CN113610960 B CN 113610960B
Authority
CN
China
Prior art keywords
model
dimensional model
component
dimensional
auxiliary
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
CN202110811398.7A
Other languages
Chinese (zh)
Other versions
CN113610960A (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.)
Fujian Kaimi Network Science & Technology Co ltd
Original Assignee
Fujian Kaimi Network Science & Technology 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 Fujian Kaimi Network Science & Technology Co ltd filed Critical Fujian Kaimi Network Science & Technology Co ltd
Priority to CN202110811398.7A priority Critical patent/CN113610960B/en
Publication of CN113610960A publication Critical patent/CN113610960A/en
Application granted granted Critical
Publication of CN113610960B publication Critical patent/CN113610960B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Abstract

The invention provides a method, a device and a storage medium for preventing a three-dimensional model from penetrating through the model during the combination, wherein the method for preventing the three-dimensional model from penetrating through the model during the combination comprises the steps of acquiring components to be combined according to a combination instruction; and replacing the part for the three-dimensional model, and deleting the part covered by the part in the three-dimensional model. According to the technical scheme, when the part is replaced for the three-dimensional model, the part covered by the part in the three-dimensional model is deleted, so that the part penetrating during the movement of the three-dimensional model is effectively avoided. And the mode penetration is avoided without calculation of a physical engine, so that the data operand is reduced, and the performance requirement on equipment can be greatly reduced.

Description

Method, device and storage medium for preventing mold penetration during three-dimensional model merging
Technical Field
The invention relates to the technical field of three-dimensional models, in particular to a method and a device for preventing a model from penetrating during three-dimensional model merging and a storage medium.
Background
In order to make the objects have more realistic figures, the objects such as figures, pets and the like playing different roles in the electronic game are modeled by adopting a three-dimensional model, and corresponding multiple sets of component models are arranged for the objects, so that a game player can select different components for figures or pets, such as different clothes, jewelry, ornaments and the like, according to requirements.
Since the three-dimensional model (e.g., character three-dimensional model, pet three-dimensional model) and the part model are separately built, the three-dimensional model is prone to the problem of mold penetration during movement or deformation. For example, a portion of the three-dimensional model of the character that would be covered by the part model is exposed outside the part model, and a broken line portion 11 of the three-dimensional model 1 as shown in fig. 1 is exposed outside the part model 2.
In order to solve the problem of mold penetration, the following two solutions are mainly adopted in the prior art:
1. adding rigid bodies for the motion parts of the three-dimensional models such as characters and the component models, and calculating the relation between the three-dimensional models and the component models in real time by using a physical engine so that the component models can follow up the three-dimensional models, thereby solving the problem of mold penetration;
2. designing a part model into a loose style;
however, the above scheme 1 requires a complex physical engine, which consumes very much performance, and as the fineness of the model and the number of bones increase, the performance consumption is further significantly improved; the above scheme 2 has the visual problem that the components are not fit or fit, and the image effect of the person is affected.
Disclosure of Invention
Therefore, a 3D model merging method is needed to solve the technical problem that the 3D model and the component model are easy to penetrate the model in the prior art.
In order to achieve the above object, the present inventors provide a method for preventing mold penetration when three-dimensional models are combined, comprising the steps of:
acquiring components to be combined according to the combination instruction;
and replacing the part for the three-dimensional model, and deleting the part covered by the part in the three-dimensional model.
Further, the 3D model merging method further includes the steps of:
presetting a component model corresponding to the component, wherein the component model comprises a component and an auxiliary model covered by the component;
the "replace the part for the three-dimensional model, delete the part of the three-dimensional model covered by the part" includes the following steps:
calculating the same part of the three-dimensional model as the auxiliary model;
deleting the same portion in the three-dimensional model;
and merging the three-dimensional model with the part after deleting the same part so as to merge the part on the three-dimensional model.
Further, the three-dimensional model and the auxiliary model each include coordinate points and a plane formed by the coordinate points; the "calculating the same portion of the three-dimensional model as the auxiliary model" includes:
calculating the same coordinate points of the three-dimensional model and the auxiliary model and a plane formed by the same coordinate points;
the "deleting the same portion in the three-dimensional model" includes: and deleting the same coordinate points and the planes formed by the same coordinate points in the three-dimensional model.
Further, the surface formed by the same coordinate points is formed by a plurality of triangular surfaces, and each vertex of the triangular surfaces is the coordinate point.
Further, the "presetting a component model corresponding to the component, where the component model includes a component and an auxiliary model covered by the component" includes the following steps:
presetting the parts, wherein the parts comprise any one or a combination of a plurality of clothes, jewelry, weapons and ornaments, and the clothes comprise any one or a combination of a plurality of hats, clothes, trousers, shoes, clothes bodies, sleeves and collars;
and acquiring a three-dimensional model or a part corresponding to the part in the three-dimensional model, and deleting the three-dimensional model or a part of the part which is not covered by the part to obtain the auxiliary model.
Further, the three-dimensional model is generated by a 3D physics engine, and the three-dimensional model pruning of portions not covered by the component is achieved by invoking an interface in the 3D physics engine.
Further, the three-dimensional model includes any one or more of a character model, a pet model, and an equipment model in a game.
In order to solve the technical problems, the invention also provides another technical scheme: the utility model provides a prevent wearing mould device when three-dimensional model merges, prevent wearing mould device when three-dimensional model merges includes:
the acquisition module is used for acquiring the components to be combined according to the combination instruction; and
and the merging module is used for replacing the parts for the three-dimensional model and deleting the parts covered by the parts in the three-dimensional model.
Further, the merging module includes:
the device comprises a presetting module, a control module and a control module, wherein the presetting module is used for presetting a component model corresponding to the component, and the component model comprises a component and an auxiliary model covered by the component;
a calculation module for calculating the same portion of the three-dimensional model as the auxiliary model;
a deletion module for deleting the same portion in the three-dimensional model; and
and the merging sub-module is used for merging the three-dimensional model with the component after deleting the same part so as to merge the component on the three-dimensional model.
In order to solve the technical problems, the invention also provides another technical scheme:
a computer storage medium having stored thereon a computer program which when executed by a processor implements a method of preventing threading when three-dimensional models according to any of the above aspects are combined.
Compared with the prior art, when the parts such as clothing, hair and the like are replaced for the three-dimensional model, the part covered by the parts in the three-dimensional model is deleted, so that the occurrence of mold penetration during the movement of the three-dimensional model is effectively avoided. In addition, the technical scheme does not need to avoid through-mould by physical engine calculation, reduces the data operand and can greatly reduce the performance requirement on equipment. Furthermore, the technical scheme adopts the mode that the same coordinate points in the three-dimensional model and the auxiliary model are deleted to delete part of the three-dimensional model, so that complex three-dimensional perspective calculation is not needed, and the performance requirement on equipment can be greatly reduced in the model merging step during merging.
Drawings
FIG. 1 is a schematic diagram of a prior art through-mold;
FIG. 2 is a flow chart of a method for preventing mold penetration during three-dimensional model merging according to an embodiment;
FIG. 3 is a flowchart illustrating the deletion of portions of the three-dimensional model that are covered by the component according to an embodiment;
FIG. 4 is a schematic diagram of a three-dimensional model merging process according to an embodiment;
FIG. 5 is a block diagram of a three-dimensional model merging apparatus according to an embodiment;
FIG. 6 is a block diagram of a merging module according to an embodiment;
fig. 7 is a schematic diagram of a computer storage medium according to an embodiment.
Reference numerals illustrate:
1. a 3D model;
11. a dotted line portion;
2. a component model;
10. a three-dimensional model;
21. clothing;
22. an auxiliary model;
400. the three-dimensional model is combined, and the device is used for preventing the model from penetrating;
410. an acquisition module;
420. a merging module;
421. a preset module;
422. a computing module;
423. deleting the module;
424. combining sub-modules;
700. a computer storage medium;
Detailed Description
In order to describe the technical content, constructional features, achieved objects and effects of the technical solution in detail, the following description is made in connection with the specific embodiments in conjunction with the accompanying drawings.
Referring to fig. 2 to 4, the present embodiment provides a method for preventing mold penetration during three-dimensional model merging. The method for preventing the mold penetration during the three-dimensional model combination can be applied to changing parts such as clothing, heads and the like for different three-dimensional models in a game, the method for preventing the mold penetration during the three-dimensional model combination can effectively avoid the mold penetration of the three-dimensional model, and the mold penetration is avoided without calculation by a physical engine, so that the data operation amount is reduced, and the performance requirement on equipment can be greatly reduced.
As shown in fig. 2, the method for preventing the mold penetration during the combination of the three-dimensional models comprises the following steps:
s101, acquiring components to be combined according to a combination instruction.
The system is internally provided with a three-dimensional model and more than two different components, and the combination instruction can be input from outside through input equipment or automatically produced by the system.
S102, replacing the parts for the three-dimensional model, and deleting the parts covered by the parts in the three-dimensional model.
Wherein the three-dimensional model includes a plurality of components, each component in the three-dimensional model is combinable, and the components are combined at a minimum granularity. The three-dimensional model may be an in-game character model that may be generated by a 3D physics engine, such as a character model generated from a Spine skeletal model that may include head, body, arms, legs, and the like in one embodiment. The components may also include a plurality of different portions, for example, components of a character model may include any one or more combinations of clothing including any one or more of hats, clothing, pants, shoes, clothing bodies, sleeves, collars, etc., the upper garment may be subdivided into clothing bodies (upper body), sleeves, etc., and the pants may be subdivided into sub-units of pants legs, waist of pants, etc., as desired. The ornament can be a wearing jewelry such as a bracelet, necklace, ring, or a flower worn on the head. When the component is a garment, the garment may be a full body garment comprising the three-dimensional model, such as garments including headwear, blouse, pants and shoes. In other embodiments the garment may also be a partial garment of different parts of the three-dimensional model, for example the garment may be just a sleeve, a belt or a hat.
In some embodiments, the three-dimensional model may also be a pet model or equipment model in a game, and the component may be a wig, an accessory, and an ornament for decorating the pet model or equipment model.
In step S102, the component is replaced with the three-dimensional model, that is, the three-dimensional model is combined with the component, for example, the three-dimensional model is put on (i.e., combined with) the garment. The deleting of the portion of the three-dimensional model covered by the part may be performed after the replacing of the part for the three-dimensional model. In some embodiments, the part to be covered by the component after the three-dimensional model is combined may be calculated first, then the part to be covered by the component in the three-dimensional model is deleted first, and finally the three-dimensional model and the component are combined to combine the component on the three-dimensional model.
In the embodiment, when the part is replaced for the three-dimensional model, the part covered by the part in the three-dimensional model is deleted, so that the occurrence of the part mold penetration during the movement of the three-dimensional model is effectively avoided. In addition, the technical scheme does not need to avoid through-mould by physical engine calculation, reduces the data operand and can greatly reduce the performance requirement on equipment.
As shown in fig. 3, in an embodiment, there is provided how to replace the component with a three-dimensional model, and delete a portion of the three-dimensional model covered by the component, which includes the steps of:
s201, presetting a component model corresponding to the component, wherein the component model comprises the component and an auxiliary model covered by the component.
Wherein the auxiliary model is provided for the respective component, each component is provided with a respective auxiliary model, the auxiliary model is located inside the respective component (i.e. the garment is worn on the auxiliary model), and the auxiliary model is completely covered by the component. The three-dimensional model and the auxiliary model each include coordinate points and a plane composed of the coordinate points. For example, the component is a garment, and the garment model includes the garment and an auxiliary model covered by the garment, the auxiliary model being located within the garment and being completely covered by the garment.
S202, calculating the same part of the three-dimensional model as the auxiliary model.
Wherein the auxiliary model is identical to a portion of the three-dimensional model, so that the same portion of the auxiliary model as the three-dimensional model can be found by comparing the coordinate points.
S203, deleting the same part in the three-dimensional model.
S204, merging the three-dimensional model with the component after deleting the same part so that the component is merged on the three-dimensional model.
In this embodiment, the part of the three-dimensional model covered by the component is deleted by deleting the same coordinate points, so that complicated three-dimensional perspective calculation is not required, and the performance requirement on the device can be greatly reduced in the model merging operation at the time of merging in step S204.
In one embodiment, the three-dimensional model and the auxiliary model each include coordinate points and a face composed of the coordinate points; the "calculating the same portion of the three-dimensional model as the auxiliary model" includes: and calculating the same coordinate points of the three-dimensional model and the auxiliary model and a plane formed by the same coordinate points.
The "deleting the same portion in the three-dimensional model" includes: and deleting the same coordinate points and the planes formed by the same coordinate points in the three-dimensional model.
The plane formed by the same coordinate points can adopt three adjacent coordinate points to form a triangular plane. In other embodiments, the surface formed by the same coordinate points may be a four-corner surface formed by four adjacent coordinate points.
In the above embodiment, the components include any one or more of a garment, jewelry, weapon, ornament, and the garment includes any one or more of a hat, a garment, trousers, shoes, a body, sleeves, and a collar.
In some embodiments, the component is a complete garment, and the three-dimensional model is incorporated with the complete garment (i.e., the component) when incorporated, i.e., the complete garment including the coat and pants (and in some cases, caps, shoes) is worn or replaced with the three-dimensional model. In this case, the auxiliary model can therefore be obtained by fitting the garment (i.e. the suit) onto the three-dimensional model and then deleting the part of the three-dimensional model that is not covered by the garment.
In other embodiments, the component may also be a more finely divided partial garment, for example, the jacket may be subdivided into a body (i.e., a main body portion of the jacket), a collar, sleeves, a waistband, etc., the garment may be any one of a body, a collar, sleeves, a waistband, or the garment may be a combination of a body and any one of a collar, sleeves, waistband. In this case, when the auxiliary model is created, a portion corresponding to the garment may be acquired from the three-dimensional model, and then a portion of the portion that is not covered by the garment may be deleted to obtain the auxiliary model. For example, when the garment is a sleeve, only the arm model at the position corresponding to the sleeve in the three-dimensional model is obtained, the sleeve is put on the arm model, and the part of the arm model which is not covered by the sleeve is deleted, so that the rest part of the model in the sleeve is the auxiliary model.
In some embodiments, the component combined with the three-dimensional model may also be hair, jewelry, luggage, weapon, or the like, so that by selecting a different component, hair (i.e., hairstyle), jewelry, or carrying a different weapon, or the like, may be replaced for the three-dimensional model. The three-dimensional model can be a character object in a game, so that the character object can play different roles in the game by combining the three-dimensional model of the character object with different parts, and clothes, bags, hair, jewelry, weapons and the like of the character object can be replaced.
Before merging, the auxiliary model is preset, for example, an auxiliary model for wearing a hat, shoes, trousers, various clothes, hair, jewelry, bags, weapons and the like is made. When the merging is needed, the prefabricated auxiliary models are directly called.
As shown in fig. 4, the three-dimensional model 10 is illustrated with an arm, and a sleeve as a garment 21 (i.e., a member). The three-dimensional arm model 10 includes a, b, c, d, e, f, g, h coordinate points, and triangular faces (a, b, e), (b, e, f), (e, f, g), (f, g, h), (g, h, c), and (h, c, d) composed of the coordinate points. The sleeve garment 21 includes an auxiliary model 22 located within the garment 21, the auxiliary model 22 including coordinate points e, f, g, h, and triangular faces (e, f, g) and (f, g, h) made up of these coordinate points. The auxiliary model 22 is located inside the garment 21 and is completely covered by the garment 21. In step S202, the coordinate points e, f, g, h, which are the same as the auxiliary model 22 and the arm three-dimensional model 10, and the triangular faces (e, f, g) and (f, g, h) composed of the coordinate points e, f, g, h can be found by the coordinate point comparison.
In step S203, the coordinate point e, f, g, h in the arm three-dimensional model 10 and the triangular faces (e, f, g) and (f, g, h) formed may be deleted; coordinate point e, f, g, h and the composed triangular faces (e, f, g) and (f, g, h) deletions may travel through the interface of the 3D physics engine.
In step S204, the arm three-dimensional model 10 with the same portion deleted is combined with the garment 21, so that the garment 21 is combined with the arm three-dimensional model 10. As shown in fig. 3, the combined garment 21 is worn on the arm three-dimensional model 10, and the part of the arm three-dimensional model 10 covered by the garment 21 is deleted, so that the mold penetration phenomenon does not occur when the arm three-dimensional model moves.
The embodiment shown in fig. 4 is equally applicable to hair, jewelry, weapons, etc. that also include auxiliary models corresponding thereto. For example, when the component is hair, the hair component includes hair and an auxiliary model of hair that is a model of head where it is covered (or contacted) by hair (the auxiliary model may also include a model of neck when the hair is relatively long); when the component is a weapon, the weapon component comprises a weapon body and a weapon auxiliary model, which is a body model where it is covered by the model. When non-clothing parts such as hair, jewelry, weapon and the like are combined with the three-dimensional model (namely, when the parts are replaced or worn), the method is the same as that of sleeve part replacement, the same parts of the auxiliary model of the non-clothing parts and the three-dimensional model are required to be calculated, then the parts of the three-dimensional model which are the same as the auxiliary model are deleted, and finally the non-clothing parts are combined on the three-dimensional model.
As shown in fig. 5, in one embodiment, a three-dimensional model merge mode-through prevention device 400 is provided. The anti-mold-penetration device 400 can be applied to the game for replacing parts of different three-dimensional models when the three-dimensional models are combined, the anti-mold-penetration device 400 can effectively avoid mold penetration of the three-dimensional models when the three-dimensional models are combined, and the mold penetration is avoided without calculation by a physical engine, so that the data operation amount is reduced, and the performance requirement on equipment can be greatly reduced. The three-dimensional model merging anti-mold-through device 400 comprises an acquisition module 410 and a merging module 420. The acquiring module 410 is configured to acquire the components to be combined according to the combining instruction. The merging module 420 is configured to replace the component with the three-dimensional model, and delete the portion of the three-dimensional model covered by the component.
The system is internally provided with a three-dimensional model and more than two different components, and the combination instruction can be input from outside through input equipment or automatically produced by the system.
And the three-dimensional model includes a plurality of components, each component in the three-dimensional model being combinable, the components being a combined minimum granularity. The three-dimensional model may be an in-game character model that may be generated by a 3D physics engine, such as a character model generated from a Spine skeletal model that may include head, body, arms, legs, and the like in one embodiment. The components may also include a plurality of different portions, for example, components of a character model may include any one or more combinations of clothing including any one or more of hats, clothing, pants, shoes, clothing bodies, sleeves, collars, etc., the upper garment may be subdivided into clothing bodies (upper body), sleeves, etc., and the pants may be subdivided into sub-units of pants legs, waist of pants, etc., as desired. When the component is a garment, the garment may be a full body garment comprising the three-dimensional model, such as garments including headwear, blouse, pants and shoes. In other embodiments the garment may also be a partial garment of different parts of the three-dimensional model, for example the garment may be just a sleeve, a belt or a hat.
In some embodiments, the three-dimensional model may also be a pet model or an outfit model in a game, and the garment is an ornament for decorating the pet model or the outfit model.
In the above embodiment, the components include any one or more of a garment, jewelry, weapon, ornament, and the garment includes any one or more of a hat, a garment, trousers, shoes, a body, sleeves, and a collar.
In some embodiments, the three-dimensional model is incorporated with the whole garment (i.e., the component) when it is incorporated, i.e., the whole garment including the coat and pants (and in some cases, caps, shoes) is worn or replaced for the three-dimensional model. In this case, the auxiliary model can therefore be obtained by fitting the garment (i.e. the suit) onto the three-dimensional model and then deleting the part of the three-dimensional model that is not covered by the garment.
In other embodiments, the garment may be a more finely divided partial garment, for example, the upper garment may be subdivided into a body (i.e., a main body portion of the upper garment), a collar, sleeves, a waistband, etc., the garment may be any one of a body, a collar, sleeves, a waistband, or the garment may be a combination of a body and any one of a collar, sleeves, waistband. In this case, when the auxiliary model is created, a portion corresponding to the garment may be acquired from the three-dimensional model, and then a portion of the portion that is not covered by the garment may be deleted to obtain the auxiliary model. For example, when the garment is a sleeve, only the arm model at the position corresponding to the sleeve in the three-dimensional model is obtained, the sleeve is put on the arm model, and the part of the arm model which is not covered by the sleeve is deleted, so that the rest part of the model in the sleeve is the auxiliary model.
In some embodiments, the component incorporated with the three-dimensional model may be hair, jewelry, luggage, a weapon, or the like.
Before merging, the auxiliary model is preset, for example, an auxiliary model for wearing a hat, shoes, trousers, various clothes, hair, jewelry, bags, weapons and the like is made. When the merging is needed, the prefabricated auxiliary models are directly called.
As shown in fig. 6, in an embodiment, the merging module 420 includes a preset module 421, a calculation module 422, a deletion module 423, and a merging sub-module 424.
The presetting module 421 is configured to preset a component model corresponding to the component, where the component model includes a component and an auxiliary model covered by the component.
Wherein the auxiliary model is provided for the respective component, each component is provided with a respective auxiliary model, the auxiliary model is located inside the respective component (i.e. the garment is worn on the auxiliary model), and the auxiliary model is completely covered by the component. The three-dimensional model and the auxiliary model each include coordinate points and a plane composed of the coordinate points.
The calculation module 422 is configured to calculate the same portion of the three-dimensional model as the auxiliary model. Wherein the auxiliary model is identical to a portion of the three-dimensional model, so that the same portion of the auxiliary model as the three-dimensional model can be found by comparing the coordinate points.
The deleting module 423 is configured to delete the same portion in the three-dimensional model.
The merging sub-module 424 is configured to merge the three-dimensional model with the component after deleting the same portion, so that the component is merged on the three-dimensional model.
In this embodiment, the part of the three-dimensional model covered by the component is deleted by deleting the same coordinate points, so that complicated three-dimensional perspective calculation is not required, and the performance requirement on the device can be greatly reduced in the model merging operation at the time of merging in step S204.
As shown in fig. 4, the three-dimensional model 10 is described with an arm as an example and sleeves as clothing 21. The presetting module 421 presets the arm three-dimensional model 10 and the sleeve garment 21, and the sleeve garment 21 includes the auxiliary model 22 located in the garment. The arm three-dimensional model 10 includes a, b, c, d, e, f, g, h coordinate points, and triangular faces (a, b, e), (b, e, f), (e, f, g), (f, g, h), (g, h, c) and (h, c, d) composed of these coordinate points. The assist model 22 includes coordinate points e, f, g, h, and triangular faces (e, f, g) and (f, g, h) composed of these coordinate points. The auxiliary model 22 is located inside the garment 21 and is completely covered by the garment 21.
The calculation module 422 is configured to find out that the auxiliary model 22 and the arm three-dimensional model 10 have the same coordinate point e, f, g, h, and triangular faces (e, f, g) and (f, g, h) formed by the coordinate points e, f, g, h by comparing the coordinate points.
The deletion module 423 may delete coordinate points e, f, g, h and the composed triangular faces (e, f, g) and (f, g, h) in the arm three-dimensional model 10; coordinate point e, f, g, h and the composed triangular faces (e, f, g) and (f, g, h) deletions may travel through the interface of the 3D physics engine.
The merging sub-module 424 performs a merging operation on the arm three-dimensional model 10 and the garment 21 after deleting the same portion, so that the garment 21 is merged onto the arm three-dimensional model 10. As shown in fig. 3, the combined garment 21 is worn on the arm three-dimensional model 10, and the part of the arm three-dimensional model 10 covered by the garment 21 is deleted, so that the mold penetration phenomenon does not occur when the arm three-dimensional model moves.
In this embodiment, when the merging module 420 replaces a component for a three-dimensional model, the portion of the three-dimensional model covered by the component is deleted, so that the occurrence of mold penetration of the component during movement of the three-dimensional model is effectively avoided. In addition, the technical scheme does not need to avoid through-mould by physical engine calculation, reduces the data operand and can greatly reduce the performance requirement on equipment.
The embodiment shown in fig. 4 is equally applicable to hair, jewelry, weapons, etc. that also include auxiliary models corresponding thereto. For example, when the component is hair, the hair component includes hair and an auxiliary model of hair that is a model of head where it is covered (or contacted) by hair (the auxiliary model may also include a model of neck when the hair is relatively long); when the component is a weapon, the weapon component comprises a weapon body and a weapon auxiliary model, which is a body model where it is covered by the model. When non-clothing parts such as hair, jewelry, weapon and the like are combined with the three-dimensional model (namely, when the parts are replaced or worn), the method is the same as that of sleeve part replacement, the same parts of the auxiliary model of the non-clothing parts and the three-dimensional model are required to be calculated, then the parts of the three-dimensional model which are the same as the auxiliary model are deleted, and finally the non-clothing parts are combined on the three-dimensional model.
As shown in fig. 7, in an embodiment, a computer storage medium 700 is provided, on which a computer program is stored, which when executed by a processor, implements the method for preventing mold penetration when the three-dimensional models according to any one of the above embodiments are combined.
When the computer program in the computer storage medium is used for replacing the part for the three-dimensional model, the part covered by the part in the three-dimensional model is deleted, so that the occurrence of the part mold penetration during the movement of the three-dimensional model is effectively avoided. In addition, the technical scheme does not need to avoid through-mould by physical engine calculation, reduces the data operand and can greatly reduce the performance requirement on equipment. Furthermore, the technical scheme adopts the mode that the same coordinate points in the three-dimensional model and the auxiliary model are deleted to delete part of the three-dimensional model, so that complex three-dimensional perspective calculation is not needed, and the performance requirement on equipment can be greatly reduced in the model merging step during merging. And the part of the three-dimensional model covered by the component is deleted by deleting the same coordinate points, so that complex three-dimensional perspective calculation is not needed, and the performance requirement on equipment can be greatly reduced in the model merging operation during the merging in the step S204.
It should be noted that, although the foregoing embodiments have been described herein, the scope of the present invention is not limited thereby. Therefore, based on the innovative concepts of the present invention, alterations and modifications to the embodiments described herein, or equivalent structures or equivalent flow transformations made by the present description and drawings, apply the above technical solution, directly or indirectly, to other relevant technical fields, all of which are included in the scope of the invention.

Claims (5)

1. The method for preventing the mold penetration during the combination of the three-dimensional models is characterized by comprising the following steps of:
presetting a component model corresponding to a component, wherein the component model comprises a component and an auxiliary model covered by the component;
acquiring components to be combined according to the combination instruction;
replacing the part for the three-dimensional model, and deleting the part covered by the part in the three-dimensional model to avoid the mold penetration when the three-dimensional model moves;
the "replace the part for the three-dimensional model, delete the part of the three-dimensional model covered by the part" includes the following steps:
calculating the same part of the three-dimensional model as the auxiliary model;
deleting the same portion in the three-dimensional model;
merging the three-dimensional model with the part after deleting the same part to enable the part to be merged on the three-dimensional model; avoid through-mold by physical engine calculation;
the three-dimensional model and the auxiliary model comprise coordinate points and a surface formed by the coordinate points; the "calculating the same portion of the three-dimensional model as the auxiliary model" includes:
calculating the same coordinate points of the three-dimensional model and the auxiliary model and a plane formed by the same coordinate points;
the "deleting the same portion in the three-dimensional model" includes: deleting the same coordinate points and the planes formed by the same coordinate points in the three-dimensional model;
the surface formed by the same coordinate points consists of a plurality of triangular surfaces, and each vertex of each triangular surface is the coordinate point;
the "presetting a component model corresponding to the component, wherein the component model comprises a component and an auxiliary model covered by the component" comprises the following steps:
presetting the parts, wherein the parts comprise any one or a combination of a plurality of clothes, jewelry, weapons and ornaments, and the clothes comprise any one or a combination of a plurality of hats, clothes, trousers, shoes, clothes bodies, sleeves and collars;
and acquiring a three-dimensional model or a part corresponding to the part in the three-dimensional model, and deleting the three-dimensional model or a part of the part which is not covered by the part to obtain the auxiliary model.
2. The method of claim 1, wherein the three-dimensional model is generated by a 3D physics engine, and wherein the three-dimensional model prunes portions not covered by the component by invoking an interface in the 3D physics engine.
3. The method of claim 1, wherein the three-dimensional model comprises any one or more of a character model, a pet model, and a outfit model in a game.
4. The utility model provides a prevent wearing mould device when three-dimensional model merges which characterized in that includes:
the acquisition module is used for acquiring the components to be combined according to the combination instruction; and
the merging module is used for replacing the parts for the three-dimensional model, and deleting the part covered by the parts in the three-dimensional model so as to avoid the mold penetration during the movement of the three-dimensional model;
the merging module comprises:
the device comprises a presetting module, a control module and a control module, wherein the presetting module is used for presetting a component model corresponding to the component, and the component model comprises a component and an auxiliary model covered by the component;
a calculation module for calculating the same portion of the three-dimensional model as the auxiliary model;
a deletion module for deleting the same portion in the three-dimensional model; and
the merging sub-module is used for merging the three-dimensional model with the component after deleting the same part so as to merge the component on the three-dimensional model; avoid through-mold by physical engine calculation;
the three-dimensional model and the auxiliary model comprise coordinate points and a surface formed by the coordinate points; the "calculating the same portion of the three-dimensional model as the auxiliary model" includes:
calculating the same coordinate points of the three-dimensional model and the auxiliary model and a plane formed by the same coordinate points; the surface formed by the same coordinate points consists of a plurality of triangular surfaces, and each vertex of each triangular surface is the coordinate point;
the "deleting the same portion in the three-dimensional model" includes: deleting the same coordinate points and the planes formed by the same coordinate points in the three-dimensional model;
the components comprise any one or a combination of a plurality of clothes, jewelry, weapons and ornaments, wherein the clothes comprise any one or a combination of a plurality of hats, clothes, trousers, shoes, clothes bodies, sleeves and collars;
and acquiring a three-dimensional model or a part corresponding to the part in the three-dimensional model, and deleting the three-dimensional model or a part of the part which is not covered by the part to obtain the auxiliary model.
5. A computer storage medium having stored thereon a computer program, wherein the program when executed by a processor implements a method of preventing threading when merging three-dimensional models according to any one of claims 1 to 3.
CN202110811398.7A 2021-07-19 2021-07-19 Method, device and storage medium for preventing mold penetration during three-dimensional model merging Active CN113610960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110811398.7A CN113610960B (en) 2021-07-19 2021-07-19 Method, device and storage medium for preventing mold penetration during three-dimensional model merging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110811398.7A CN113610960B (en) 2021-07-19 2021-07-19 Method, device and storage medium for preventing mold penetration during three-dimensional model merging

Publications (2)

Publication Number Publication Date
CN113610960A CN113610960A (en) 2021-11-05
CN113610960B true CN113610960B (en) 2024-04-02

Family

ID=78337822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110811398.7A Active CN113610960B (en) 2021-07-19 2021-07-19 Method, device and storage medium for preventing mold penetration during three-dimensional model merging

Country Status (1)

Country Link
CN (1) CN113610960B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115147324B (en) * 2022-08-01 2024-03-22 聚好看科技股份有限公司 Fusion method and device of human body model and clothing model

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101785033A (en) * 2007-08-24 2010-07-21 株式会社岛精机制作所 Layering simulation apparatus, simulation method, simulation program
CN107609946A (en) * 2017-09-19 2018-01-19 北京优时尚科技有限责任公司 A kind of display control method and computing device
CN109584360A (en) * 2018-12-03 2019-04-05 西安数文科技有限公司 A kind of inscription rubbing method and device
CN112862956A (en) * 2021-02-05 2021-05-28 南京大学 Human body and garment model collision detection and processing method based on HRBFs

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107958482B (en) * 2016-10-17 2021-06-18 杭州海康威视数字技术股份有限公司 Three-dimensional scene model construction method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101785033A (en) * 2007-08-24 2010-07-21 株式会社岛精机制作所 Layering simulation apparatus, simulation method, simulation program
CN107609946A (en) * 2017-09-19 2018-01-19 北京优时尚科技有限责任公司 A kind of display control method and computing device
CN109584360A (en) * 2018-12-03 2019-04-05 西安数文科技有限公司 A kind of inscription rubbing method and device
CN112862956A (en) * 2021-02-05 2021-05-28 南京大学 Human body and garment model collision detection and processing method based on HRBFs

Also Published As

Publication number Publication date
CN113610960A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
US10922898B2 (en) Resolving virtual apparel simulation errors
US10410359B2 (en) Methods for capturing images of markers of a person to control interfacing with an application
US9892540B2 (en) Image-based deformation of simulated characters of varied topology
JP7403534B2 (en) Methods and systems for generating 3D reconstructions of humans
US7409259B2 (en) Computer-assisted method for designing garments
US20210065418A1 (en) Appearance-flow-based image generation
US20090079743A1 (en) Displaying animation of graphic object in environments lacking 3d redndering capability
US10582733B2 (en) Methods for producing garments and garment designs
CN106075909A (en) A kind of system and method that changes the outfit of playing
CN108734758B (en) Image model configuration method and device and computer storage medium
CN113610960B (en) Method, device and storage medium for preventing mold penetration during three-dimensional model merging
CN114612643B (en) Image adjustment method and device for virtual object, electronic equipment and storage medium
KR102033161B1 (en) method for transferring garment draping between avatars
Du et al. VTON-SCFA: A virtual try-on network based on the semantic constraints and flow alignment
CN108404414A (en) Fusion method, device, storage medium, processor and the terminal of picture
CN111476908A (en) Dress designing system
CN113289335B (en) Virtual object display method, device, equipment and storage medium
US11669999B2 (en) Techniques for inferring three-dimensional poses from two-dimensional images
CN113069763A (en) Game role reloading method and device and electronic equipment
CN112329227A (en) Sports garment type generation method and system
Marion et al. Comics and films
CN112580652A (en) Virtual decoration method and device, electronic equipment and storage medium
CN115293958A (en) Clothes deformation method, virtual fitting method and related device
Marion et al. Fashion and gender in superhero comics and films
Dam et al. Time-Efficient and Identity-Consistent Virtual Try-On Using A Variant of Altered Diffusion Models

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