CN113838172A - Model processing method and device - Google Patents

Model processing method and device Download PDF

Info

Publication number
CN113838172A
CN113838172A CN202111033227.2A CN202111033227A CN113838172A CN 113838172 A CN113838172 A CN 113838172A CN 202111033227 A CN202111033227 A CN 202111033227A CN 113838172 A CN113838172 A CN 113838172A
Authority
CN
China
Prior art keywords
model
fragment
original
animation
target
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.)
Pending
Application number
CN202111033227.2A
Other languages
Chinese (zh)
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 CN202111033227.2A priority Critical patent/CN113838172A/en
Publication of CN113838172A publication Critical patent/CN113838172A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a model processing method and a model processing device. Wherein, the method comprises the following steps: acquiring material data of an original model, wherein the material data is used for representing the material type of the original model; performing morphological processing on the original model according to the material data to obtain a target model; and creating a morphological animation of the change of the original model to the target model. The invention solves the technical problem that the morphological change effect of the model is not vivid because the unified flow is adopted to process the model in the related technology.

Description

Model processing method and device
Technical Field
The invention relates to the field of model processing, in particular to a model processing method and device.
Background
At present, a single software is usually used for carrying out a flow processing on the form of the model, but because the processing processes of the model all adopt a uniform flow, different form change effects are difficult to present for different types of models, and the form change effect of the model is not vivid.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a model processing method and a model processing device, which are used for at least solving the technical problem that the form change effect of a model is not vivid because a unified flow is adopted to process the model in the related technology.
According to an aspect of an embodiment of the present invention, there is provided a model processing method, including: acquiring material data of an original model, wherein the material data is used for representing the material type of the original model; performing morphological processing on the original model according to the material data to obtain a target model; and creating a morphological animation of the change of the original model to the target model.
Optionally, the texture data includes: a first material type, the object model comprising: the first model is used for performing morphological processing on the original model according to the material data to obtain a target model, and comprises the following steps: and crushing the original model according to the first material type to obtain a first model, wherein the crushing is used for decomposing the original model into a plurality of fragment models, and the first model is composed of the plurality of fragment models.
Optionally, the morphological animation comprises: breaking animation, creating form animation of changing an original model to a target model, comprising: a fracturing animation is created in which the original model fractures into the first model.
Optionally, crushing the original model according to the first material type to obtain a first model, including: acquiring density distribution data of the original model, wherein the density distribution data is used for representing the crushing density of a to-be-crushed area of the original model, the to-be-crushed area is used for representing an area to be decomposed into a plurality of fragment models in the original model, and the crushing density is used for representing the density of the fragment models; and crushing the original model according to the density distribution data and the first material type to obtain a first model.
Optionally, creating a crushing animation of the original model into a plurality of fragment models, comprising: acquiring a first fragment model in the first model, wherein the first fragment model is a fragment model to be fixed in the plurality of fragment models; the first fragment model is fixed, and a crushing animation of the original model crushed into the fixed first fragment model and a second fragment model is created, wherein the second fragment model is the fragment model except the first fragment model in the plurality of fragment models.
Optionally, obtaining a first fragment model in the first model comprises: determining a first region in the first model, wherein the first region is a region to be fixed; and determining the fragment model corresponding to the first region as a first fragment model.
Optionally, creating a fracture animation of the original model fractured into the fixed first and second fragment models includes: obtaining a first constraint condition of a first target fragment model in the second fragment model, wherein the first constraint condition is generated based on the central point position of the first target fragment model; and processing the crushing path of the second fragment model based on the first constraint condition, and creating a crushing animation of the original model crushed into the fixed first fragment model and the second fragment model.
Optionally, the method further comprises: and carrying out surface treatment on the plurality of fragment models in the crushing animation to obtain the treated crushing animation, wherein the surfaces of the plurality of fragment models in the treated crushing animation have textures.
Optionally, the method further comprises: acquiring a special effect transmitting point of a second target fragment model in the broken animation, wherein the special effect transmitting point is used for transmitting a special effect of the second target fragment model; and generating a special effect of the second target fragment model based on the special effect transmitting points in the process of crushing the original model into a plurality of fragment models.
Optionally, obtaining a special effect emission point of the second target fragment model in the crushing animation includes: and acquiring a collision point of the second target fragment model, and determining the collision point as a special-effect emission point of the second target fragment model, wherein the collision point is a point for collision between the second target fragment model and other models.
Optionally, the texture data includes: a second material type, the object model comprising: the second model, the structure of the second model is different from the structure of the original model, carry on the form processing to the original model according to the material data, get the goal model, including: and carrying out deformation processing on the original model according to the second material type to obtain a second model, wherein the deformation processing is used for expressing that the original model is deformed into the second model.
Optionally, the morphological animation comprises: and (3) deformation animation, namely creating form animation of changing the original model to the target model, wherein the form animation comprises the following steps: and creating a deformation animation of deforming the original model into the target model.
Optionally, the deforming the original model according to the second material type to obtain a second model, including: performing surface conversion treatment on the surface of the original model to obtain a calculation model, wherein the surface conversion treatment is used for representing and converting the texture of the surface of the original model; and carrying out deformation processing on the calculation model according to the second material type to obtain a second model.
Optionally, the deforming the calculation model according to the second material type to obtain a second model, including: acquiring a second constraint condition of the calculation model, wherein the second constraint condition is a preset constraint point; and processing the deformation path of the calculation model based on the second constraint condition, and creating a deformation animation of deforming the original model into the second model.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a processing apparatus of a model, the apparatus including: the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring material data of an original model, and the material data is used for representing the material type of the original model; the processing module is used for carrying out morphological processing on the original model according to the material data to obtain a target model; and the creating module is used for creating the form animation of changing the original model to the target model.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a computer-readable storage medium including a stored program, wherein when the program runs, an apparatus in which the computer-readable storage medium is located is controlled to execute the processing method of the model according to the embodiment of the present invention.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a processor for executing a program, wherein the program executes a processing method of a model according to an embodiment of the present invention.
In the embodiment of the invention, the material data of the original model can be obtained firstly, wherein the material data is used for representing the material type of the original model, then the original model is processed according to the material data to obtain the target model, finally the form animation of changing the original model to the target model is created, so that different changing effects of the original model according to the material data of the original model are realized, it is easy to think that the displayed effects of the original model of different material data are completely different in the process of carrying out actual form change, therefore, the form animation of changing the original model to the target model can be more consistent with the form change in a real scene by carrying out the form processing on the original model according to the material data of the original model, thereby achieving a vivid form changing effect and further solving the problem that the model is processed by adopting a unified flow in the related technology, thereby leading to the technical problem that the shape change effect of the model is not vivid.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a model processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of processing a model according to an embodiment of the invention;
FIG. 3 is a schematic diagram of an original model according to an embodiment of the invention;
FIG. 4 is a schematic diagram of selecting nodes of different modes in a node flow according to an embodiment of the present invention;
FIG. 5 is a schematic illustration of a density profile data acquisition according to an embodiment of the present invention;
FIG. 6a is a schematic diagram of a first model obtained by crushing an original model according to density distribution data and a first material type according to an embodiment of the present invention;
FIG. 6b is a schematic diagram of a first model obtained by crushing an original model according to a first material type according to an embodiment of the present invention;
FIG. 7 is a schematic representation of a process for selecting a first fragment model 1 from the first models, according to an embodiment of the present invention;
FIG. 8 is a schematic illustration of a process for selecting the first fragment model 2 and the first fragment model 3 from the first model, in accordance with an embodiment of the present invention;
FIG. 9 is a schematic illustration of a fixing of a first fragment model according to an embodiment of the invention;
FIG. 10 is a diagram illustrating a rendering effect of a first constraint in a three-dimensional scene according to an embodiment of the invention;
FIG. 11 is a schematic illustration of an impactor model according to an embodiment of the invention;
FIG. 12 is a diagram of a dynamic point in a broken animation according to an embodiment of the invention;
FIG. 13 is a schematic illustration of an effect of not surface treating a plurality of fragment models, in accordance with an embodiment of the present invention;
FIG. 14 is a schematic illustration of the effect of a surface treatment on a plurality of fragment models, according to an embodiment of the invention;
FIG. 15 is a schematic diagram of another raw model according to an embodiment of the invention;
fig. 16 is a schematic view of a collapsed tent model according to an embodiment of the present invention;
FIG. 17 is a schematic diagram of a computational model with a triangular surface according to an embodiment of the invention;
FIG. 18 is a schematic illustration of a second model deformed after the addition of constraint points according to an embodiment of the invention;
FIG. 19 is a schematic diagram of a model processing device according to an embodiment of the invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method provided by the embodiment of the application can be executed in a mobile terminal, a computer terminal or a similar operation device. Taking the example of being operated on a mobile terminal, fig. 1 is a hardware structure block diagram of the mobile terminal of a model processing method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 can be used for storing computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a data processing method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
While a model processing method embodiment is provided in accordance with an embodiment of the present invention, it should be noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
FIG. 2 is a flow chart of a method of processing a model according to an embodiment of the invention. As shown in fig. 2, the method may include the steps of:
step S202, acquiring an original model and material data.
Wherein the material data is used to represent the material type of the original model.
The original model may be a model of any form.
The material data can be wood material, stone material, cloth material and the like.
In an optional embodiment, a user may set the original model and the material data of the original model according to a requirement, and after the user sets the original model, the user may obtain the original model set by the user and the material data corresponding to the original model, so as to further process the original model through the material data, thereby obtaining the target model.
In another alternative embodiment, since the original model with different material types has different morphological change processes, it is necessary to obtain the material data of the original model to determine the morphological change process of the original model, so as to achieve a more vivid animation effect.
In another optional embodiment, the user may select a material type according to the requirement of the animation, specifically, a node may be set to select material data of the original model, for example, when the user selects a node of a stone type, it is determined that the material data of the original model is a stone material, and then, morphological processing may be performed on the original model according to an algorithm related to the stone material.
Fig. 3 is a schematic diagram of the original model.
And step S204, performing morphological processing on the original model according to the material data to obtain a target model.
The above-mentioned morphological treatment may include a crushing treatment and a deforming treatment. Wherein, the crushing treatment refers to the crushing of the original model into a plurality of fragment models, and the deformation treatment refers to the change of the form of the original model.
In an alternative embodiment, after the texture data of the original model is obtained, the processing mode related to the texture data may be directly obtained, so that the original model is processed according to a different processing mode.
In another optional embodiment, a node-type process may be used to perform morphological processing on the original model, and a part that needs a modification effect in the morphological processing process may be reversely adjusted and modified through a node without remanufacturing the model processing process, and when the number of the original models that need to be processed is large, the processing efficiency of the original model may be improved through the node-type process, which only needs to adjust node parameters in the process for different original models, thereby improving the processing efficiency of the original model.
Fig. 4 is a schematic diagram illustrating selection of nodes in different modes in a node flow, where mode 1 may be a processing mode corresponding to a wood material, and mode 2 may be a processing mode corresponding to a stone material. When the material data of the original model is wood, the mode 1 may be selected to process the original model, and when the material data of the original model is stone, the mode 2 may be selected to process the original model. Alternatively, the user may select mode 1 and mode 2 by clicking on the switch mode node.
In another optional embodiment, after the original model is morphologically processed according to the material data to obtain the target model, the target model may be output and cached, and specifically, the target model may be cached in the hard disk, so that a user may directly read the cache in the hard disk in a subsequent use process, thereby avoiding repeated solution of the target model and reducing resource occupation of the memory.
Step S206, a form animation of changing the original model to the target model is created.
In an alternative embodiment, after the original model is morphologically processed to obtain the target model, a morphological animation of the original model changing to the target model may be created. So that the user can adjust the morphological processing process of the original model according to the morphological animation, thereby achieving a better morphological processing effect.
In another alternative embodiment, after the target model is obtained, a special effect in the form change process can be created based on the target model, so that the presentation effect of the form change is richer.
In another optional embodiment, the original model may be a stone model, the target model may be a model formed by a plurality of stone models, after the stone model is subjected to crushing treatment according to material data, a plurality of stone models may be obtained, and crushing animation for crushing the stone model into the plurality of stone models may be created, so that a user may adjust the crushing treatment process of the stone model according to the crushing animation, and the stone model may achieve a better crushing effect.
In yet another alternative embodiment, the original model may be a tent model, the target model may be a collapsed tent model, the collapsed tent model may be obtained after the deformation processing is performed on the tent model according to the material data, and a deformation animation in which the tent model is deformed into the collapsed tent model may be created, so that a user may adjust the deformation processing process of the tent model according to the deformation animation, thereby enabling the tent model to achieve a better deformation effect.
Through the steps, the material data of the original model can be obtained firstly, wherein the material data is used for representing the material type of the original model, then the original model is subjected to shape processing according to the material data to obtain the target model, finally the shape animation of changing the original model to the target model is created, so that different changing effects of the original model according to the material data of the original model are realized, it is easy to think that the displayed effects of the original model of different material data are completely different in the process of carrying out actual shape change, therefore, the shape processing is carried out on the original model according to the material data of the original model, the obtained shape animation of changing the original model to the target model can better accord with the shape change in a real scene, thereby achieving a vivid shape changing effect, and further solving the problem that the model is processed by adopting a unified flow in the related technology, thereby leading to the technical problem that the shape change effect of the model is not vivid.
Optionally, the texture data includes: a first material type, the object model comprising: the first model is used for performing morphological processing on the original model according to the material data to obtain a target model, and comprises the following steps: and crushing the original model according to the first material type to obtain a first model, wherein the crushing is used for decomposing the original model into a plurality of fragment models, and the first model is composed of the plurality of fragment models.
The first material type may be a material type obtained by crushing a plurality of pieces, for example, a wooden material, a stone material, a soil material, or the like.
The first model may be a model including a plurality of fragment models, for example, a plurality of block models, a plurality of gravel models, a plurality of soil models, and the like.
In an alternative embodiment, the original model may be crushed according to the first material type to obtain a plurality of fragment models decomposed by the original model, that is, the first model. In a game scene, an effect of object collision generally occurs, in order to make the effect of object collision more real and effective, the object can be crushed after the object collision, for example, when a huge stone in the game scene falls to the ground, the huge stone can be crushed into a plurality of broken stones when falling to the ground, in order to make the crushing process more real, the huge stone model can be crushed according to the material type of the stone, a plurality of broken stone models decomposed by the huge stone model are obtained, so that a user can view the more real crushed scene of the huge stone falling to the ground in the game scene.
Optionally, the morphological animation comprises: breaking animation, creating form animation of changing an original model to a target model, comprising: a fracturing animation is created in which the original model fractures into the first model.
In an optional embodiment, after the original model is fractured according to the first material type of the original model to obtain the first model, a fracture animation for fracturing the original model into the first model may be created, and the process of fracturing the original model into the first model is displayed through visual operation, so that a user can optimize the process of fracturing the original model into the first model according to the fracture animation, thereby achieving a better fracturing effect.
In another alternative embodiment, after the first model is obtained, a special effect in the crushing process can be created based on a plurality of fragment models in the first model, so that the display effect of the crushing animation is richer.
Optionally, crushing the original model according to the first material type to obtain a first model, including: obtaining density distribution data of the original model, wherein the density distribution data is used for representing a to-be-crushed area of the original model and crushing density of the to-be-crushed area, the to-be-crushed area is used for representing an area to be decomposed into a plurality of fragment models in the original model, the crushing density is used for representing density of the plurality of fragment models, and crushing the original model according to the density distribution data and the first material type to obtain the first model.
The density distribution data can be set by self, and the density distribution data can control the areas of a plurality of fragment models generated by the original model in the crushing process and the crushing density.
In an alternative embodiment, the density distribution data of the original model may be determined by a user by drawing the original model, as shown in fig. 5, the density distribution data is an acquisition diagram of the density distribution data, specifically, the user may draw the original model by dragging the circular area, and may acquire the drawing data of the drawing area after the user finishes drawing, so as to obtain the density distribution data of the original model.
In another alternative embodiment, a user may open a drawing node in the node flow to draw the density of the region to be crushed in the original model, so as to obtain density distribution data. Specifically, as shown in fig. 4, the drawing node may be set before the mode 2, wherein the drawing node may also be set before the mode 1, and the user may draw the original model by clicking the drawing node to determine the density distribution data, and then switch the material type of the original model to the first material type by switching the mode node, and further perform the crushing process on the original model by using the first material type according to the density distribution data to obtain the first model.
Fig. 6a is a schematic diagram of a first model obtained by crushing an original model according to density distribution data and a first material type, where the density of fragment models in a region corresponding to the density distribution data in the first model is higher, the density of fragment models in other regions is lower, and the fragment models in different regions in the first model have a certain difference, so that the first model is more vivid. Fig. 6b is a schematic diagram of a first model obtained by crushing an original model according to a first material type, wherein a plurality of fragment models in the first model are distributed uniformly without regions between densities, and the fragment models in different regions in the first model have small differences and are suitable for uniform crushing of the original model.
Optionally, creating a crushing animation of the original model into a plurality of fragment models, comprising: acquiring a first fragment model in the first model, wherein the first fragment model is a fragment model to be fixed in the plurality of fragment models; the first fragment model is fixed, and a crushing animation of the original model crushed into the fixed first fragment model and a second fragment model is created, wherein the second fragment model is the fragment model except the first fragment model in the plurality of fragment models.
In a game scene, a general building base cannot be easily collapsed in the process of collapsing the building model, so that a fixed part similar to the building base can exist in the process of crushing the model, the fixed part cannot be collapsed along with the crushing of the model, and the fixed part corresponds to the first fragment model.
In an alternative embodiment, a user may select a first fragment model of the first models, and the particular selection of the first fragment model of the first models may be made through two modes.
As shown in fig. 7, in the process of selecting the first fragment model 1 in the first model, the user controls the selection area in the first model by dragging the slide bar, and the fragment model corresponding to the selection area is the first fragment model.
As shown in FIG. 8, which is a schematic diagram of the process of selecting the first fragment model 2 and the first fragment model 3 in the first model, the user selects the first fragment model 2 and the first fragment model 3 by clicking on the fragment model in the first model. The process of selecting the first fragment model may be accomplished by editing the nodes in the node flow diagram.
In another alternative embodiment, as shown in FIG. 9, after the first fragment model is obtained, the first fragment model may be fixed so that during the process of crushing the original model into the first model, the first fragment model does not fall due to the crushing process, and may be fixed in the crushing scene without any change, while the second fragment model may be freely dropped to create a crushing animation in which the original model is crushed into the first model, but it should be noted that the first fragment model may have an interactive relationship with the second fragment model, for example, the first fragment model may shake due to the falling of the second fragment model during the crushing process.
Optionally, obtaining a first fragment model in the first model comprises: determining a first region in the first model, wherein the first region is a region to be fixed; and determining the fragment model corresponding to the first region as a first fragment model.
In an alternative embodiment, the region to be fixed in the first model may be selected according to the user's requirement, and the fragment model corresponding to the region to be fixed is determined as the first fragment model, so as to complete the selection of the first fragment model.
For example, a first region may be selected from the bottom up in the first model, and the fragment model corresponding to the first region may be determined as the first fragment model.
Optionally, creating a fracture animation of the original model fractured into the fixed first and second fragment models includes: and acquiring a first constraint condition of a first target fragment model in the second fragment model, wherein the first constraint condition is generated based on the central point position of the first target fragment model, processing the crushing path of the second fragment model based on the first constraint condition, and creating a crushing animation of the original model crushed into the fixed first fragment model and the second fragment model.
The first target fragment model described above may be each of the fragment models in the second fragment model, and may be any one or more of the fragment models in the second fragment model.
The first constraint is used to constrain the effect of the crushing between the first target fragment models, for example, the crushing of one fragment model during the crushing process may have an effect on the adjacent fragment models, and the effect may be adjusted by the first constraint.
For example, the closer the two fragment models are, the greater the influence of the two fragment models being broken, and the greater the parameter values of the first constraints of the two fragment models may be set to increase the influence of the break between the two fragment models; the further the two fragment models are, the smaller the influence of the two fragment models being broken, and the smaller the parameter values of the first constraints of the two fragment models can be set to reduce the influence of the two fragment models being broken.
In an alternative embodiment, the coordinate position of the center point of the first target fragment model may be obtained, specifically, a three-dimensional coordinate system may be established in a scene where the first target fragment model is located, the fragment model adjacent to each fragment model may be searched through the coordinate information of the center point of the first target fragment model in the three-dimensional coordinate system, and a line segment between the center point of the first target fragment model and the center point of the fragment model adjacent to the center point of the first target fragment model may be generated by adjusting the search distance and the search radius, where the line segment is the first constraint condition. Fig. 10 is a schematic diagram illustrating a presentation effect of the first constraint in a three-dimensional scene.
In another alternative embodiment, the constraint line node may be clicked in the node flow, and the user may adjust the parameter in the constraint line node, so as to obtain the first constraint condition of the first model.
In another alternative embodiment, another model may be added besides the original model, wherein the other model may be a collision object model colliding with the original model, and the original model may generate a fracture by colliding with the collision object model, thereby obtaining the first model. The ground at the bottom of the original model as in fig. 11 may be a bump model.
In another alternative embodiment, an additional model node can be set in the node flow so as to introduce the collision object model from the outside; parameter change nodes can be set in the node process so as to change parameters of the collision object model imported from the outside, such as the parameters of the mass, the friction value and the like of the collision object model; and finally, an output node can be set for outputting the crushing animation of the first model obtained after the original model collides with the collision object model.
In yet another optional embodiment, after the original model is broken into the broken animation of the first model, the dynamic point information in the broken animation is output, so that the dynamic point information is cached to a hard disk, a user can conveniently and directly read the cache of the hard disk, repeated calculation of a computer is avoided, and the load of a machine is reduced. FIG. 12 is a diagram illustrating dynamic points in a fracturing animation.
Optionally, the method further comprises: and performing surface treatment on the plurality of fragment models in the crushing animation to obtain the treated crushing animation, wherein the surfaces of the plurality of fragment models in the treated crushing animation have textures.
In an alternative embodiment, in the node flow, the user may click on the add details node to add texture details to the fracture surfaces of the plurality of fragment models, so that the fracture effect is more realistic. FIG. 13 is a schematic representation of the effect of not surface treating a plurality of fragment models; FIG. 14 is a schematic diagram of the effect of surface treatment on a plurality of fragment models, which can more realistically present textures of the plurality of fragment models, so that the crushing effect is more consistent with a real scene.
In another alternative embodiment, the processed crash animation may be exported to a three-dimensional file format, such as abc format, fbx format, and the like.
After the surface processing is performed on the plurality of fragment models in the crushing animation, the surfaces of the plurality of fragment models are textured, and therefore the number of faces and the number of vertices of the final output model are affected.
Optionally, the method further comprises: acquiring a special effect transmitting point of a second target fragment model in the broken animation, wherein the special effect transmitting point is used for transmitting a special effect of the second target fragment model; and generating a special effect of the second target fragment model based on the special effect transmitting points in the process of crushing the original model into a plurality of fragment models.
The special effect emitting point can be a collision point when the fragment model collides with other models, and can also be a collision point when the fragment models collide with each other.
The special effect can be a smoke special effect, a spark special effect and the like, wherein the special effect can be set according to the requirements of users.
In an optional embodiment, for an object which can generate smoke dust in the collision process, when the crushing animation of the corresponding original model is manufactured, the effect of the smoke dust needs to be created so as to achieve a vivid crushing effect, therefore, a special effect emission point of each fragment model in the crushing animation can be obtained so as to add the effect of the smoke dust at the special effect emission point, and the smoke dust can be emitted through the special effect emission points in the actual collision process of a plurality of fragment models.
In another optional embodiment, a special effect generation node may be set in the node process, a special effect of the second target fragment model may be set by clicking the special effect generation node, and after the special effect emission point of the second target fragment model is determined, the special effect emission point may be output and cached, so that computer recalculation is avoided, and occupation of memory resources is reduced.
Optionally, obtaining a special effect emission point of the second target fragment model in the crushing animation includes: and acquiring a collision point of the second target fragment model, and determining the collision point as a special-effect emission point of the second target fragment model, wherein the collision point is a point for collision between the second target fragment model and other models.
The other models described above may be patch models, and may be models of objects other than patch models.
The second target fragment model may be each fragment model in the crushing animation, and may be any one or more of a plurality of fragment models in the crushing animation.
In an alternative embodiment, because the fragment model may only produce smoke during the collision, the special effect emission point of the second target fragment model may be determined by obtaining the collision point of the second target fragment model to achieve a more realistic special effect.
Optionally, the texture data includes: a second material type, the object model comprising: the second model, the structure of the second model is different from the structure of the original model, carry on the form processing to the original model according to the material data, get the goal model, including: and carrying out deformation processing on the original model according to the second material type to obtain a second model, wherein the deformation processing is used for representing that the original model is deformed into the second model.
The second material type may be a material type that is easily deformed, such as cloth or plastic.
The second model may be a model with a changed original model structure, for example, a collapsed tent model.
In an alternative embodiment, the original model may be deformed according to the second material type, so as to obtain a deformed second model. Fig. 15 is a schematic diagram of an original model, which may be a tent model, and the corresponding second material type may be cloth. And deforming the tent model according to the second material type to obtain the collapsed tent model, as shown in fig. 16, which is a schematic diagram of the collapsed tent model.
Optionally, the morphological animation comprises: and (3) deformation animation, namely creating form animation of changing the original model to the target model, wherein the form animation comprises the following steps: and creating a deformation animation of deforming the original model into the target model.
In an alternative embodiment, a morphing animation of the tent model may be created to present the collapse process of the tent model.
Optionally, the deforming the original model according to the second material type to obtain a second model, including: performing surface conversion treatment on the surface of the original model to obtain a calculation model, wherein the surface conversion treatment is used for representing and converting the texture of the surface of the original model; and carrying out deformation processing on the calculation model according to the second material type to obtain a second model.
The texture can be triangular surface texture or quadrangular surface texture.
In an optional embodiment, the triangular surface texture of the surface of the original model may be subjected to surface conversion to obtain a quadrangular surface texture; the surface of the original model can be changed into four-corner surface texture to obtain triangular surface texture.
In another alternative embodiment, since the solving stability and speed of the triangular surface in the system (vel lum) of the three-dimensional software (houdini) are better than those of the four-corner surface, the surface of the original model can be converted into the triangular surface by adding the triangular surface-turning nodes in the node flow, so as to obtain the computational model, as shown in fig. 17, the schematic diagram of the computational model with the surface being the triangular surface is shown.
In another optional embodiment, a surface-to-surface parameter may be set in a surface-to-triangular-surface node in the node flow, where the larger the value in the surface-to-surface parameter is, the smaller the number of triangular surfaces on the obtained calculation model surface is, and the smaller the value in the surface-to-triangular-surface parameter is, the larger the number of triangular surfaces on the obtained calculation model surface is. It should be noted that the number of triangular surfaces on the calculation model has a direct relationship with the effect obtained by the deformation process, and when the number of triangular surfaces is larger, the effect after the deformation process is richer, but the calculation speed of the deformation process is also reduced, so that reasonable surface conversion parameters need to be set to control the number of surfaces of the model and the calculation speed of the model.
Optionally, the deforming the calculation model according to the second material type to obtain a second model, including: acquiring a second constraint condition of the calculation model, wherein the second constraint condition is a preset constraint point; and processing the deformation path of the calculation model based on the second constraint condition, and creating a deformation animation of deforming the original model into the second model.
In an alternative embodiment, in order to prevent the calculation model from deforming as a whole, a constraint point may be set in advance on the calculation model to control the part of the constraint point in the calculation model not to deform, for example, fig. 16 is a schematic diagram of a second model deformed after the constraint point is not added, and fig. 18 is a schematic diagram of a second model deformed after the constraint point is added, which does not deform as a whole due to collapse.
In another alternative embodiment, the second constraint condition may be set as a constraint of a certain region in the computational model, and a deformation animation in which the original model is deformed into the second model may be created by selecting a point in the region as a constraint point and processing a deformation path of the computational model based on the constraint point.
Fig. 19 is a schematic diagram of a model processing apparatus according to an embodiment of the present invention, as shown in fig. 19, the apparatus including: an acquisition module 1902, a processing module 1904, and a creation module 1906.
The acquisition module is used for acquiring material data of the original model, wherein the material data is used for representing the material type of the original model; the processing module is used for carrying out morphological processing on the original model according to the material data to obtain a target model; and the creating module is used for creating the form animation of changing the original model to the target model.
Optionally, the texture data includes: a first material type, the object model comprising: a first model, a first processing module, comprising: and the first processing unit is used for carrying out crushing processing on the original model according to the first material type to obtain a first model, wherein the crushing processing is used for decomposing the original model into a plurality of fragment models, and the first model is composed of the plurality of fragment models.
Optionally, the first creating module includes: the first creating unit is used for creating a crushing animation of crushing the original model into the first model.
Optionally, the first processing unit comprises: the device comprises a first obtaining subunit, a second obtaining subunit and a third obtaining subunit, wherein the first obtaining subunit is used for obtaining density distribution data of an original model, the density distribution data is used for representing a to-be-crushed area of the original model and the crushing density of the to-be-crushed area, the to-be-crushed area is used for representing an area to be decomposed into a plurality of fragment models in the original model, and the crushing density is used for representing the density of the fragment models; and the first processing subunit is used for carrying out crushing processing on the original model according to the density distribution data and the first material type to obtain a first model.
Optionally, the first creating unit includes: the second obtaining subunit is used for obtaining a first fragment model in the first model, wherein the first fragment model is a fragment model to be fixed in the plurality of fragment models; and the first fixing subunit is used for fixing the first fragment model and creating a crushing animation of the original model crushed into the fixed first fragment model and a second fragment model, wherein the second fragment model is the fragment model except the first fragment model in the plurality of fragment models.
Optionally, the second obtaining unit includes: the first determining subunit is used for determining a first area in the first model, wherein the first area is an area to be fixed; and the second determining subunit is used for determining the fragment model corresponding to the first region as the first fragment model.
Optionally, the first fixing unit comprises: a third obtaining subunit, configured to obtain a first constraint condition of the first target fragment model in the second fragment model, where the first constraint condition is generated based on a center point position of the first target fragment model; and the second processing subunit is used for processing the crushing path of the second fragment model based on the first constraint condition and creating a crushing animation of the original model crushed into the fixed first fragment model and the second fragment model.
Optionally, the apparatus comprises: and the second processing module is used for carrying out surface processing on the plurality of fragment models in the crushing animation to obtain the processed crushing animation, wherein the surfaces of the plurality of fragment models in the processed crushing animation have textures.
Optionally, the apparatus comprises: the second obtaining module is used for obtaining a special effect transmitting point of a second target fragment model in the broken animation, wherein the special effect transmitting point is used for transmitting a special effect of the second target fragment model; and the first generation module is used for generating the special effect of the second target fragment model based on the special effect emission point in the process of crushing the original model into a plurality of fragment models.
Optionally, the second obtaining module includes: and the second obtaining unit is used for obtaining a collision point of the second target fragment model and determining the collision point as a special-effect emission point of the second target fragment model, wherein the collision point is a point where collision is carried out between the second target fragment model and other models.
Optionally, the texture data includes: a second material type, the object model comprising: a second model having a structure different from the structure of the original model, a second processing module comprising: and the second processing unit is used for carrying out deformation processing on the original model according to the second material type to obtain a second model, wherein the deformation processing is used for expressing the deformation of the original model into the second model.
Optionally, the morphological animation comprises: a morphing animation, a first creation module, comprising: and the first creating unit is used for creating a deformation animation of deforming the original model into the target model.
Optionally, the second processing unit comprises: the third processing subunit is used for performing surface conversion processing on the surface of the original model to obtain a calculation model, wherein the surface conversion processing is used for representing and converting the texture of the surface of the original model; and the fourth processing subunit is used for carrying out deformation processing on the calculation model according to the second material type to obtain a second model.
Optionally, the fourth processing subunit includes: the fourth obtaining subunit is configured to obtain a second constraint condition of the calculation model, where the second constraint condition is a preset constraint point; and the fifth processing subunit is used for processing the deformation path of the calculation model based on the second constraint condition and creating the deformation animation of deforming the original model into the second model.
Embodiments of the present invention also provide a computer-readable storage medium. The computer readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the apparatus in which the computer readable storage medium is located is controlled to execute the model processing method according to the embodiment of the present invention.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention further provide an electronic device, which includes a processor and a memory, where the processor is configured to run a program stored in the memory to perform a processing method of a model of an embodiment of the present invention.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (17)

1. A method of model processing, comprising:
acquiring material data of an original model, wherein the material data is used for representing the material type of the original model;
performing morphological processing on the original model according to the material data to obtain a target model;
and creating a morphological animation of the change of the original model to the target model.
2. The method of claim 1, wherein the texture data comprises: a first material type, the target model comprising: the first model is used for performing morphological processing on the original model according to the material data to obtain a target model, and comprises the following steps:
and crushing the original model according to the first material type to obtain a first model, wherein the crushing is used for decomposing the original model into a plurality of fragment models, and the first model is composed of the fragment models.
3. The method of claim 2, wherein the morphological animation comprises: breaking animation, creating form animation of the original model changing to the target model, comprising:
creating a fracturing animation of the original model fracturing into the first model.
4. The method of claim 3, wherein crushing the original model according to the first material type to obtain a first model comprises:
acquiring density distribution data of the original model, wherein the density distribution data is used for representing a region to be crushed of the original model and the crushing density of the region to be crushed, the region to be crushed is used for representing a region to be decomposed into the fragment models in the original model, and the crushing density is used for representing the density of the fragment models;
and crushing the original model according to the density distribution data and the first material type to obtain the first model.
5. The method of claim 3, wherein creating a fracture animation of the original model fracture into the plurality of fragment models comprises:
obtaining a first fragment model in the first model, wherein the first fragment model is a fragment model to be fixed in the plurality of fragment models;
and fixing the first fragment model, and creating a crushing animation of the original model crushed into the fixed first fragment model and a second fragment model, wherein the second fragment model is the fragment model except the first fragment model in the plurality of fragment models.
6. The method of claim 5, wherein obtaining a first fragment model in the first model comprises:
determining a first region in the first model, wherein the first region is a region to be fixed;
and determining the fragment model corresponding to the first region as the first fragment model.
7. The method of claim 5, wherein creating a fracture animation of the original model fractured into the fixed first and second fragment models comprises:
obtaining a first constraint condition of a first target fragment model in the second fragment model, wherein the first constraint condition is generated based on the center point position of the first target fragment model;
and processing the crushing path of the second fragment model based on the first constraint condition, and creating a crushing animation of the original model being crushed into the fixed first fragment model and the second fragment model.
8. The method of claim 3, further comprising:
and carrying out surface treatment on the plurality of fragment models in the crushing animation to obtain the treated crushing animation, wherein the surfaces of the plurality of fragment models in the treated crushing animation have textures.
9. The method of claim 3, further comprising:
obtaining a special effect transmitting point of a second target fragment model in the crushing animation, wherein the special effect transmitting point is used for transmitting a special effect of the second target fragment model;
generating a special effect of the second target fragment model based on the special effect emission points during the breaking of the original model into the plurality of fragment models.
10. The method of claim 9, wherein obtaining a special effect emission point for a second target fragment model in the fracturing animation comprises:
and acquiring a collision point of the second target fragment model, and determining the collision point as the special-effect emission point of the second target fragment model, wherein the collision point is a point where collision is carried out between the second target fragment model and other models.
11. The method of claim 1, wherein the texture data comprises: a second material type, the target model comprising: the second model, the structure of the second model is different from the structure of the original model, and the original model is processed according to the material data to obtain a target model, including:
and carrying out deformation processing on the original model according to the second material type to obtain a second model, wherein the deformation processing is used for expressing the deformation of the original model into the second model.
12. The method of claim 11, wherein the morphological animation comprises: and (3) deformation animation, namely creating form animation of changing the original model to the target model, wherein the form animation comprises the following steps:
and creating a deformation animation of the original model into the target model.
13. The method of claim 11, wherein deforming the original model based on the second material type to obtain a second model comprises:
performing surface conversion treatment on the surface of the original model to obtain a calculation model, wherein the surface conversion treatment is used for representing and converting the texture of the surface of the original model;
and carrying out deformation processing on the calculation model according to the second material type to obtain a second model.
14. The method of claim 13, wherein deforming the computational model based on the second material type to obtain a second model comprises:
acquiring a second constraint condition of the calculation model, wherein the second constraint condition is a preset constraint point;
and processing the deformation path of the calculation model based on the second constraint condition, and creating the deformation animation of the original model into the second model.
15. An apparatus for processing a model, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring material data of an original model, and the material data is used for representing the material type of the original model;
the processing module is used for carrying out morphological processing on the original model according to the material data to obtain a target model;
and the creating module is used for creating the form animation of changing the original model to the target model.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the processing method of the model according to any one of claims 1 to 14.
17. An electronic device, comprising: a processor and a memory, the processor being configured to execute a program stored in the memory, wherein the program when executed performs a method of processing a model according to any one of claims 1 to 14.
CN202111033227.2A 2021-09-03 2021-09-03 Model processing method and device Pending CN113838172A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111033227.2A CN113838172A (en) 2021-09-03 2021-09-03 Model processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111033227.2A CN113838172A (en) 2021-09-03 2021-09-03 Model processing method and device

Publications (1)

Publication Number Publication Date
CN113838172A true CN113838172A (en) 2021-12-24

Family

ID=78962258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111033227.2A Pending CN113838172A (en) 2021-09-03 2021-09-03 Model processing method and device

Country Status (1)

Country Link
CN (1) CN113838172A (en)

Similar Documents

Publication Publication Date Title
CN102663801A (en) Method for improving three-dimensional model rendering performance
KR20080018404A (en) Computer readable recording medium having background making program for making game
CN110428386B (en) Map grid merging method and device, storage medium and electronic device
CN107077746A (en) System, method and computer program product for network transmission and the Automatic Optimal of the 3D texture models of real-time rendering
CN109544253A (en) Marketing activity formulating method, device, equipment and storage medium based on AI
CN105117399A (en) Image search method and device
CN110766799A (en) Method and device for processing hair of virtual object, electronic device and storage medium
CN111035925A (en) Method and device for generating virtual traffic road network model in game and electronic device
CN110930484B (en) Animation configuration method and device, storage medium and electronic device
US20220016526A1 (en) Method and Apparatus for Vertex Reconstruction based on Terrain Cutting, Processor and Terminal
CN110709891A (en) Virtual reality scene model establishing method and device, electronic equipment and storage medium
CN113838172A (en) Model processing method and device
CN105701850A (en) Real-time method for collaborative animation
CN111986318A (en) Method and device for selecting steel to be processed
CN110414689A (en) Update method and device on a kind of machine learning model line
Davison et al. Interactive example-palettes for discrete element texture synthesis
KR100937795B1 (en) Treatment method for shaping of 3 dimension image using computer
CN110853122A (en) Animation generation method, animation generation device and storage medium
CN116485980A (en) Virtual object rendering method, device, equipment and storage medium
CN111375208B (en) Two-dimensional Euler diagram generation method and device for one-stroke game
CN111462343B (en) Data processing method and device, electronic equipment and storage medium
CN109002553B (en) Method and device for constructing hair model, electronic equipment and computer readable medium
CN112348965A (en) Imaging method, imaging device, electronic equipment and readable storage medium
CN113134230A (en) Virtual object clustering method and device, storage medium and electronic device
Jiang et al. AxialGen: a research prototype for automatically generating the axial map

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