CN111481936A - Virtual model generation method and device, storage medium and electronic device - Google Patents

Virtual model generation method and device, storage medium and electronic device Download PDF

Info

Publication number
CN111481936A
CN111481936A CN202010421555.9A CN202010421555A CN111481936A CN 111481936 A CN111481936 A CN 111481936A CN 202010421555 A CN202010421555 A CN 202010421555A CN 111481936 A CN111481936 A CN 111481936A
Authority
CN
China
Prior art keywords
virtual model
wiring
target
model
topology
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
CN202010421555.9A
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 CN202010421555.9A priority Critical patent/CN111481936A/en
Publication of CN111481936A publication Critical patent/CN111481936A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • 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

Landscapes

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

Abstract

The invention discloses a method and a device for generating a virtual model, a storage medium and an electronic device. The method comprises the following steps: acquiring a first virtual model; performing UV expansion on the first virtual model; creating target wiring on the UV unfolded first virtual model, and determining the wiring direction of the first virtual model through the target wiring, wherein the target wiring is used for indicating the trend of a target position, the target position is a position corresponding to a target position in the first virtual model, and the target position is a position of the target wiring on the UV unfolded first virtual model; and obtaining a second virtual model aiming at the topology of the first virtual model according to the wiring direction and the UV unfolded first virtual model. By the method and the device, the effect of improving the generation efficiency of the topology bottom die is achieved.

Description

Virtual model generation method and device, storage medium and electronic device
Technical Field
The invention relates to the field of computers, in particular to a method and a device for generating a virtual model, a storage medium and an electronic device.
Background
At present, when a topology bottom die is realized, the topology bottom die is usually a manual topology, wiring manufacturing is performed based on the top point of a high die, the top point and the surface of the topology are used for continuously wrapping the high die, however, model wiring needs to be manually adjusted in real time, and the density of wiring needs to be planned according to the detail degree of the high die, so that the topology bottom die is obtained.
Because the method is manufactured little by little manually, a plurality of manufacturing steps are repeated labor, thereby resulting in longer manufacturing time. In addition, with the increasing number of game surfaces, the time length of manual wiring is increased correspondingly. In the manual wiring process, some low-level errors or wiring disorder and the like easily occur, so that the generation efficiency of the topological model is low.
Aiming at the technical problem of low efficiency of generating a topology bottom die in the prior art, no effective solution is provided at present.
Disclosure of Invention
The invention mainly aims to provide a method and a device for generating a virtual model, a storage medium and an electronic device, which at least solve the technical problem of low efficiency of generating a topology base model.
To achieve the above object, according to one aspect of the present invention, there is provided a method of generating a virtual model. The method can comprise the following steps: acquiring a first virtual model; performing UV expansion on the first virtual model; creating target wiring on the UV unfolded first virtual model, and determining the wiring direction of the first virtual model through the target wiring, wherein the target wiring is used for indicating the trend of a target position, the target position is a position corresponding to a target position in the first virtual model, and the target position is a position of the target wiring on the UV unfolded first virtual model; and obtaining a second virtual model aiming at the topology of the first virtual model according to the wiring direction and the UV unfolded first virtual model.
Optionally, after obtaining a second virtual model for the first virtual model topology according to the routing direction and the UV-unfolded first virtual model, the method further includes: acquiring a replacement mapping for adjusting wiring; and adjusting the wiring on the second virtual model according to the replacement mapping.
Optionally, obtaining a replacement map for adjusting the routing includes: and acquiring a replacement mapping for adjusting the wiring through the second virtual model and the UV unfolded first virtual model.
Optionally, adjusting the routing on the second virtual model according to the replacement map includes: and adjusting the wiring on the second virtual model according to the color of each area in the replacement mapping, wherein the colors of different areas of the replacement mapping represent the concave-convex degree of the corresponding area.
Optionally, before the UV unfolding of the first virtual model, the method further includes: and simplifying the first virtual model according to the fluctuation amplitude of the surface of the first virtual model.
Optionally, before the UV unfolding of the first virtual model, the method further includes: dividing the first virtual model into a plurality of first sub-models, wherein each first sub-model corresponds to one part of the first virtual model; performing UV expansion on the first virtual model, including: each first sub-model of the first virtual model is UV expanded.
Optionally, before UV expanding each first sub-model of the first virtual model, the method further includes: and simplifying each first submodel according to the fluctuation change amplitude of the surface of each first submodel.
Optionally, after obtaining a second virtual model for the first virtual model topology according to the routing direction and the UV expanded first virtual model, the method includes: determining whether the number of faces of the second virtual model meets a preset condition; and if not, replacing the second virtual model with the first virtual model.
In order to achieve the above object, according to another aspect of the present invention, there is also provided a virtual model generation apparatus. The apparatus may include: a first obtaining unit configured to obtain a first virtual model; the unfolding unit is used for carrying out UV unfolding on the first virtual model; the determining unit is used for creating target wiring on the UV unfolded first virtual model and determining the wiring direction of the first virtual model through the target wiring, wherein the target wiring is used for indicating the trend of a target position, the target position is a position corresponding to a target position in the first virtual model, and the target position is a position of the target wiring on the UV unfolded first virtual model; and the second obtaining unit is used for obtaining a second virtual model aiming at the topology of the first virtual model according to the wiring direction and the UV unfolded first virtual model.
In order to achieve the above object, according to another aspect of the present invention, there is provided a storage medium. The storage medium has stored therein a computer program, wherein the computer program is arranged to perform the method of data processing of an embodiment of the invention when executed.
In order to achieve the above object, according to another aspect of the present invention, an electronic device is provided. The electronic device comprises a memory and a processor, and is characterized in that the memory stores a computer program, and the processor is configured to run the computer program to execute the data processing method of the embodiment of the invention.
In this embodiment, a first virtual model is obtained; performing UV expansion on the first virtual model; creating target wiring on the UV unfolded first virtual model, and determining the wiring direction of the first virtual model through the target wiring, wherein the target wiring is used for indicating the trend of a target position, the target position is a position corresponding to a target position in the first virtual model, and the target position is a position of the target wiring on the UV unfolded first virtual model; and obtaining a second virtual model aiming at the topology of the first virtual model according to the wiring direction and the UV unfolded first virtual model. That is to say, this application can realize automatic topology to topological high mould, just can control the trend of whole wiring through establishing main target wiring, and the wiring is regular, and saves time, and then advance according to the wiring direction and obtain the die block that the high mould corresponds, and the preparation time of having avoided manual topology to lead to is longer, and some low-level errors appear easily, perhaps wiring is in disorder scheduling problem to reach the technological effect that improves the efficiency that generates topological die block, solved the technical problem that improves the efficiency that generates topological die block.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a method for generating a virtual model according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of generating a virtual model according to an embodiment of the invention;
FIG. 3 is a schematic illustration of a stack portion in a first virtual model according to an embodiment of the invention;
FIG. 4 is a schematic diagram of an interface for polygon group panel functions according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a target wire for indicating the direction of a target site according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a comparison of results of a calculation not through a target wiring and results of a calculation through a target wiring according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a topology operation implemented based on ZBursh according to an embodiment of the present invention;
FIG. 8 is a diagram of an operational topology model according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a process for generating a topology model according to an embodiment of the invention;
FIG. 10 is a schematic diagram of a combination of a subdivided topology model with selected high modes according to an embodiment of the present invention;
FIG. 11 is a schematic illustration of the effect of routing to raised and recessed regions of a second virtual model, in accordance with an embodiment of the present invention;
FIG. 12 is a schematic illustration of the effect of not routing to raised and recessed regions of a second virtual model, in accordance with an embodiment of the present invention;
FIG. 13 is a schematic illustration of a triangular surface in a second virtual model according to embodiments of the invention;
FIG. 14 is a schematic diagram of determining the orientation of the mold surface of a second virtual model by triangular surfaces according to an embodiment of the present invention;
FIG. 15 is a schematic diagram of a routing requirement according to a second virtual model, according to an embodiment of the present invention; and
fig. 16 is a schematic diagram of a virtual model generation apparatus according to an embodiment of the present 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 better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application 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 should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations 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 an example of the method running on a mobile terminal, fig. 1 is a hardware structure block diagram of the mobile terminal of the method for generating a virtual model according to the 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 examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over 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.
In the present embodiment, a method for generating a virtual model running on the mobile terminal is provided, and fig. 2 is a flowchart of a method for generating a virtual model according to an embodiment of the present invention. As shown in fig. 2, the method may include the steps of:
step S202, a first virtual model is obtained.
In the technical solution provided by step S202 of the present invention, the first virtual model may be a model for generating a virtual character in a game scene, for example, a clothing model of the virtual character, and may be a high model, and when the first virtual model is generated as a corresponding bottom model, both the number of faces and the routing direction are highly required.
The generation method of the virtual model of this embodiment can be applied to drawing software, for example, the drawing software ZBrush. This embodiment may determine the first virtual model described above in zscrub.
Step S204, performing UV expansion on the first virtual model.
In the technical solution provided by step S204 of the present invention, after the first virtual model is obtained, the first virtual model may be UV expanded.
In this embodiment, when the first virtual model is unfolded, a UV mask plug-in ZBrush may be used to perform one-touch UV unfolding on the first virtual model, and the UV unfolded first virtual model includes horizontal position information (U) and vertical position information (V), that is, includes UV information, which may be automatic un-stretched UV information, so that the UV unfolded first virtual model may also be referred to as a UV patch, UV-bearing unfolded model.
In the embodiment, the first virtual model is subjected to UV unfolding through the UV Maste plug-in, so that the complicated UV unfolding work can be quickly completed, and the generation efficiency of the final topology bottom die is improved.
Step S206, a target wiring is created on the UV unfolded first virtual model, and the wiring direction of the first virtual model is determined through the target wiring.
In the technical solution provided in step S206 of the present invention, after the UV expansion of the first virtual model, a target wire may be created on the UV expanded first virtual model, and a wire direction of the first virtual model may be determined by the target wire, where the target wire is used to indicate a direction of a target location, the target location is a location in the first virtual model corresponding to a target location, and the target location is a location of the target wire on the UV expanded first virtual model.
In this embodiment, a target wire is created on the UV-deployed first virtual model, and the target wire may be a target guide line drawn on the UV-deployed first virtual model for indicating the trend of the target site, which may also be referred to as a wire of the target site. The embodiment can calculate the very uniform wiring suitable for the animation skin through the target wiring, so that the target wiring can be used for controlling the whole wiring direction of the first virtual model, the wiring is regular, and the time is saved. The target portion is a portion of the first virtual model corresponding to a target position, for example, a sleeve, a hat, a chest, or the like of a garment, and the target position is a position of the target wiring on the UV-developed first virtual model.
Optionally, this embodiment may use a brush control (ZRemesterGuid) in ZBrush to create the target route on the UV-unrolled first virtual model.
And S208, obtaining a second virtual model aiming at the topology of the first virtual model according to the wiring direction and the UV unfolded first virtual model.
In the technical solution provided by step S208 of the present invention, after the routing direction of the first virtual model is determined by the target routing, a second virtual model for the topology of the first virtual model is obtained according to the routing direction and the UV-developed first virtual model.
In this embodiment, in ZBrush, the first virtual model after UV expansion may be topologically processed according to the routing direction by using parameters of a panel zremcher therein to obtain a second virtual model for the topology of the first virtual model, and the second virtual model may be a topology bottom model corresponding to a high model, where UV information may also be retained while the second virtual model is obtained by calculation, so that manual topology work in ZBrush is automatically completed by the above method, and cumbersome repeated work is avoided, especially for generation of a second virtual model with a high number of planes.
In the related art, when topology wiring is performed, due to the fact that manual one-point manufacturing is performed, manufacturing time is long, low-level errors are prone to occur, wiring is messy, and the like, ZBrush and other software are combined to generate a topology model, for example, ZBrush and Maya software are combined, so that the generation process of the topology model is complex, an effective topology model is difficult to generate specially aiming at a game scene, and the generation efficiency of a topology bottom die is low.
However, in the above steps S202 to S208 of the present application, a first virtual model is obtained; performing UV expansion on the first virtual model; creating target wiring on the UV unfolded first virtual model, and determining the wiring direction of the first virtual model through the target wiring, wherein the target wiring is used for indicating the trend of a target position, the target position is a position corresponding to a target position in the first virtual model, and the target position is a position of the target wiring on the UV unfolded first virtual model; and obtaining a second virtual model aiming at the topology of the first virtual model according to the wiring direction and the UV unfolded first virtual model. That is to say, this embodiment can realize automatic topology for the topological high mould, just can control the trend of whole wiring through establishing main target wiring, and the wiring is regular, and saves time, and then advances to obtain the die block that the high mould corresponds according to the wiring direction, has avoided the preparation time that manual topology leads to longer, and some low-level errors appear easily, or the wiring is in disorder scheduling problem to reach the technological effect that improves the efficiency that generates the topological die block, solved the technical problem that improves the efficiency that generates the topological die block.
The above-described scheme of this embodiment is further described below.
As an optional implementation manner, after obtaining the second virtual model for the first virtual model topology according to the routing direction and the UV unfolded first virtual model in step S208, the method further includes: acquiring a replacement mapping for adjusting wiring; and adjusting the wiring on the second virtual model according to the replacement mapping.
In this embodiment, in the game, the requirement on the outline of the topological bottom die is very high, and in this embodiment, after obtaining the second virtual model for the topology of the first virtual model according to the first virtual model after the deployment in the wiring direction and UV, the wiring of the second virtual model needs to be further adjusted to meet the wiring requirement on the topological bottom die in the game. Optionally, the embodiment obtains a replacement map for adjusting the routing according to the second virtual model, the replacement map is obtained by using a height map, and the position of an actual geometric point on the textured surface is moved along the surface normal according to the value stored in the texture, so that the map has the capability of representing details and depth, and can simultaneously allow self-hiding, self-projection and edge contour rendering, thereby enabling the rendered information to be more intuitive.
Optionally, the embodiment uses the ZBursh's Muiti Map Exporter panel functionality to quickly generate the above-described replacement Map based on the second virtual model. Since it is easier to modify the routing on the plane, the replacement map of this embodiment belongs to a plane map, through which adjustments to the routing on the second virtual model can be directed, compared to the traditional topological approach.
As an optional implementation, obtaining a replacement map for adjusting a routing includes: and acquiring a replacement mapping for adjusting the wiring through the second virtual model and the UV unfolded first virtual model.
In this embodiment, when obtaining the replacement map for adjusting the wiring is implemented, the second virtual model may be subdivided, and optionally, the embodiment may perform a plurality of times of subdivision processing on the second virtual model, for example, three times of subdivision processing, where the subdivided second virtual model, that is, the topology base model having a subdivision level, generates the replacement map by the subdivided second virtual model and the UV-expanded first virtual model, so as to adjust the wiring on the second virtual model.
As an optional implementation, adjusting the routing on the second virtual model according to the replacement map includes: and adjusting the wiring on the second virtual model according to the color of each area in the replacement mapping, wherein the colors of different areas of the replacement mapping represent the concave-convex degree of the corresponding area.
In this embodiment, the degree of concavity and convexity of the corresponding region in the replacement map may be characterized by color, for example, the region in the replacement map with the degree of convexity greater than the first threshold may have a first color, which may be white, and the region with the degree of concavity greater than the second threshold may have a second color, which may be black. The first threshold may be a preset critical value for measuring a high degree of protrusion, so that a region with a degree of protrusion greater than the first threshold is a region with a relatively high degree of protrusion, and the second threshold may be a preset critical value for measuring a high degree of depression, so that a region with a degree of depression greater than the second threshold is a region with a relatively high degree of depression.
This embodiment may adjust the routing on the second virtual model based on the color of the regions in the displacement map. Optionally, the embodiment identifies a target region in the replacement map, where the target region may include the region with the degree of protrusion greater than the first threshold and/or the region with the degree of recess greater than the second threshold, and optionally, the embodiment adjusts the routing on the second virtual model according to the target region in the replacement map to ensure that the routing of the second virtual model is sufficient and the outline is clear.
In this embodiment, since the second virtual model is a topological base model of the game, the requirement for the outline of the appearance is very high, and even if the wiring is uniform, it is difficult to meet the requirement if there is no change in the outline. Optionally, the second virtual model after the routing adjustment of this embodiment needs to have the outline with the variation amplitude higher than a third threshold value, where the third threshold value is a critical value for measuring whether the variation amplitude is an explicit outline or not. Since the replacement chartlet is generated by the second virtual model, the target area in the replacement chartlet has a corresponding area in the second virtual model, in this embodiment, lines smaller than the target number are added to the area corresponding to the second virtual model according to the target area in the replacement chartlet, for example, according to the trend of the replacement chartlet, a concave portion in the area corresponding to the second virtual model is repaired, and the wiring in the concave portion is appropriately increased to increase the number of faces, where the target number is a preset critical threshold for measuring the small number of wirings, that is, the embodiment achieves the purpose of defining the outline of the second virtual model by adding few wirings to the area corresponding to the second virtual model, thereby satisfying the wiring requirement of the topology base model in the game. If no wiring is added to the region corresponding to the second virtual model, it is difficult to specify the outline of the second virtual model.
In this embodiment, the orientation of the triangular surface in the second virtual model can be used to refine the orientation of the mold surface of the second virtual model, which may affect the outline of the second virtual model, so that the triangular surface needs to be emphasized in the second virtual model. In this embodiment, the directions of the plurality of wires in the region corresponding to the second virtual model may be adjusted according to the target region in the replacement map, so as to determine at least one triangular surface, and the direction of the at least one triangular surface may show the direction of the mold surface in the second virtual model. Because the number of the surfaces required by game production is very low, the embodiment optimizes the triangular surface by adjusting the wiring of the second virtual model, can ensure the outline of each angle of the second virtual model, and can more clearly express the fluctuation of the outline, thereby meeting the wiring requirement in the game virtual model production.
As an optional implementation manner, before performing UV expansion on the first virtual model in step S204, the method further includes: and simplifying the first virtual model according to the fluctuation amplitude of the surface of the first virtual model.
In this embodiment, since the first virtual model includes the stacked portion, the stacked portion refers to a portion of the first virtual model where the undulating edges have large variations and are intersected together, and the stacked portion has little effect on generating the second virtual model corresponding to the first virtual model. Therefore, before the UV expansion of the first virtual model, the embodiment may determine the fluctuation range of the surface of the first virtual model, and then simplify the first virtual model according to the fluctuation range of the surface of the first virtual model, where the simplification of the first virtual model requires to summarize details of the first virtual model on the premise of ensuring the outline of the first virtual model.
As an optional implementation manner, before performing UV expansion on the first virtual model in step S204, the method further includes: dividing the first virtual model into a plurality of first sub-models, wherein each first sub-model corresponds to one part of the first virtual model; performing UV expansion on the first virtual model, including: each first sub-model of the first virtual model is UV expanded.
In this embodiment, after the first virtual model is obtained, the first virtual model may be divided into a plurality of first sub-models, the plurality of first sub-models form a model group, and each first sub-model corresponds to a part of the first virtual model, for example, a sleeve, a chest, and a hat, which are different first sub-models. Optionally, the embodiment may automatically distinguish different colors in the first virtual model by using a polygon group (PolyGroups) panel function in ZBrush, and quickly select regions corresponding to different first sub-models, using an Auto group (Auto Groups) control, thereby greatly simplifying mechanical and tedious operations.
After dividing the first virtual model into a plurality of first sub-models, the embodiment may UV expand each of the first sub-models of the first virtual model.
As an optional implementation, before UV expanding each first sub-model of the first virtual model, the method further includes: and simplifying each first submodel according to the fluctuation change amplitude of the surface of each first submodel.
In this embodiment, the first submodel may include a stacking portion, and this embodiment may simplify each first submodel according to a fluctuation range of a surface of each first submodel, and may summarize details on the premise of ensuring an outline of the first submodel, and delete the stacking portion in the plurality of first submodels, respectively, to obtain a plurality of second submodels. Alternatively, this embodiment may use the DynaMesh panel in ZBrush to calculate large undulation edge variations in the first submodel and to delete some unnecessary stack parts to get the second submodel to avoid affecting the generation of the bottom die topology. In this embodiment, when the purpose of simplifying each first submodel is achieved by the above method, the purpose of simplifying the first virtual model is achieved, and then each first submodel of the first virtual model is UV-expanded, and a target wiring is created on each first submodel after UV expansion.
As an optional implementation manner, after obtaining the second virtual model for the first virtual model topology according to the routing direction and the UV unfolded first virtual model in step S208, the method further includes: determining whether the number of faces of the second virtual model meets a preset condition; and if not, replacing the second virtual model with the first virtual model.
In this embodiment, the first virtual model after UV expansion may be subjected to topology processing a plurality of times according to the wiring direction, where the number of times of topology processing may be determined according to the actual situation, and may be three times of topology processing. Optionally, when the first virtual model after UV expansion is subjected to first topology processing, a second sub-model with a large number of surfaces is calculated, and the second sub-model is executed again, where the number of surfaces becomes half of the first sub-model, and the number of surfaces becomes half of the second sub-model, so that the operation result is more controllable. After obtaining a second virtual model for the topology of the first virtual model according to the routing direction and the UV-expanded first virtual model, it may be determined whether the number of faces of the second virtual model satisfies a preset condition, where the preset condition may be a condition that the number of faces of the second virtual model is higher than a target number of times. And if the number of the faces of the second virtual model meets the preset condition, replacing the second virtual model with the first virtual model. Alternatively, if the number of faces of the second virtual model is determined not to satisfy the preset condition, the second virtual model may be retained.
Alternatively, in this embodiment, the second sub-model with the desired number of surfaces may be directly input, and only one topology processing is performed, but the effect of the finally obtained topology bottom model is slightly worse than that of the topology bottom model obtained by performing multiple topology processing on the first virtual model after UV expansion.
In this embodiment, the first virtual model after UV expansion with UV information may be converted into a bottom die plane model without UV information according to the routing direction, where the bottom die plane model and the virtual model without UV information have the same position and shape, and the bottom die plane model may be mapped onto the surface of the first virtual model according to the routing direction, that is, the virtual model without UV information is adsorbed on the surface of the first virtual model according to the routing direction to perform vertex transfer, and the obtained final topology bottom die may present undulation details, and the topology bottom die has few faces but high-modulus details, and the topology bottom die has a good mapping effect, and a resource-saving manner of topology bottom die mapping is also required in a game.
In the embodiment, when the topology bottom die is generated, partial automatic topology can be realized, the wiring is regular, the time is saved, the UV information can be kept while the topology bottom die is operated, the output efficiency is improved, the wiring of the detail can be guided and adjusted through timely mapping, the manufacturing requirement of the topology bottom die is met through manual fine adjustment, the technical effect of improving the generation efficiency of the topology bottom die is achieved, and the technical problem of low generation efficiency of the topology bottom die is solved.
The above-described method of embodiments of the present invention is described below by way of example with reference to the preferred embodiments. The method is specifically applied to ZBursh for introduction.
The embodiment provides a method for realizing a topological bottom die based on ZBursh operation, which is realized by a DynaMesh panel function, a PolyGroups panel function, an Uv Master panel function, a ZRemesh panel function, a Transfer attributes Options UV panel function and a Muiti Map export panel function in ZBursh. The panel functions described above are described below.
The DynaMesh panel function of the embodiment can be used for inducing fluctuation of an analysis model, generalizing details on the premise of ensuring the outline profile, and providing guidance for bottom die topology.
The function of the PolyGroups panel can quickly select different areas, thereby greatly simplifying mechanical and fussy operation.
The Uv Master panel function can automatically distribute un-stretched Uv, and complete fussy Uv work instantly, thereby improving the output efficiency.
The ZRemesher panel function can be used for calculating topology, and the work of manual topology is automatically completed by utilizing the parameters of the panel, so that the problem of complex repeated work is solved, and particularly, the working efficiency of 90 percent can be improved for bottom moulds with high surface number.
And the Transfer attributes Options UV Transfer function can be used for quickly realizing the position Transfer of UV and model vertexes.
The Muiti Map export panel function can be used for quickly generating a replacement mapping and guiding the wiring of a modified topology model, compared with the traditional topology, the information on the mapping is more intuitive, and the wiring is easier to modify on a plane.
The ZBrush-based version of this embodiment is further described below in conjunction with the panel functionality described above.
The first virtual model of this embodiment may be a garment model, which is split into smooth groups, then the DynaMesh panel function is used to calculate large edge variations in the first virtual model, and to remove some unnecessary stack parts.
FIG. 3 is a schematic illustration of a stacked portion in a first virtual model according to an embodiment of the invention. As shown in fig. 3, the part in the white frame of the sleeve is the part where the folds are stacked together, and the unnecessary stacked part can be summarized to the outline by the function of the DynaMesh panel, otherwise, a plurality of places are crossed together to influence the topological bottom die.
The smooth grouping comprises different first sub-models such as sleeves, a chest, a coat and hat and the like. FIG. 4 is a schematic diagram of an interface of polygon group panel functions according to an embodiment of the present invention. As shown in fig. 4, in response to an operation acting on an automatic grouping (automatic group) control, different regions can be quickly selected, different colors can be automatically distinguished, and mechanical and tedious operations are greatly simplified.
The embodiment further utilizes the Uv Master panel function to perform Uv one-key unfolding on the divided first sub-model to obtain a Uv patch, so as to achieve the purpose of performing Uv unfolding on the first virtual model. The embodiment creates a target route on the UV-unfolded first virtual model for directing the route direction. FIG. 5 is a schematic diagram of a target wire for indicating the direction of a target site according to an embodiment of the invention. As shown in fig. 5, the arrow indicates the target wiring, i.e., the line running to the target location, the target location is a location in the first virtual model corresponding to the target location, and the target location is a location of the first virtual model after UV expansion of the target wiring.
Fig. 6 is a schematic diagram of a comparison graph of a result of calculation not through the target wiring and a result of calculation through the target wiring according to an embodiment of the present invention. As shown in fig. 6, the left diagram is the result of calculation not performed by the target wiring is uneven and asymmetrical in wiring, and the right diagram is the result of calculation performed by the target wiring is even in wiring and symmetrical about the target wiring a as an axis of symmetry.
In the embodiment, the ZRemsher operation can be used for calculating the topology, and the operation can be performed for several times according to the actual situation. Generally, 3 left and right operations are performed, a model with a large number of surfaces can be calculated for the first time, and the number of surfaces is executed again, so that the number of surfaces becomes half of the first time, and the number of surfaces becomes half of the second time. This has the advantage that the result of the operation is made more controllable. Alternatively, the embodiment may directly input the desired number of surfaces, and only perform one operation, but the effect of performing topology processing more times is slightly worse.
Fig. 7 is a schematic diagram of implementing a topology operation based on zscrub according to an embodiment of the present invention. As shown in fig. 7, target wirings (as shown by dotted lines in the figure, which may include UV patches on which no target wiring is drawn) are drawn on UV patches of a plurality of first sub-models in a model group by a ZBrush brush (ZRemesherGuid), a curve strength may be set to 100% by clicking a control x (curvesstrength), and then a control y (zremesher) is clicked to calculate a topology, so that uniform and symmetric wirings of the UV patches are obtained.
FIG. 8 is a diagram of an operational topology model according to an embodiment of the present invention. As shown in fig. 8, the topological model is a topological model of a garment model, and does not reflect the more obvious details of the wrinkle, etc., and it can be combined with the high model to reflect the details of the wrinkle, etc.
FIG. 9 is a schematic diagram of a process for generating a topology model according to an embodiment of the invention. As shown in fig. 9, the developed model 2 with UV information and the bottom mold plane model 3 without UV information have the same position and shape, and the information in the developed model 2 with UV information can be transferred to the bottom mold plane model 3 without UV, so that 3 and the top mold 1 with UV have the same UV shape, and attaching 3 to the corresponding top mold 1, the computed topology model 4 can be obtained, which can be subdivided, and thus a subdivided topology model 5, which is a once-subdivided topology model, is obtained.
FIG. 10 is a schematic diagram of a combination of a subdivided topology model with selected high modes according to an embodiment of the present invention. As shown in fig. 10, after the topology model 5 is obtained by once subdivision, the topology model may be further subdivided three times to obtain a topology model 6, the corresponding high model 7 is selected, then the topology model 6 is selected, and vertex transfer is performed to obtain a topology model 8 reflecting the clothes fold, and the topology model may be determined as a second virtual model obtained by developing the first virtual model in accordance with the wiring direction and UV. The high module 7 is a clothing model with a large number of faces and a large number of details, the high module 7 is mapped to the topological model 6 to obtain a topological model, and the topological model 8 has few faces but has the details of the high module 7, so that the topological model can be applied to games.
In this embodiment, since the outline requirement of the second virtual model is very high in the game, the second virtual model can be further adjusted in its wiring after it is obtained. The embodiment generates the replacement map through the second virtual model with the subdivision level, and adds the wiring or adjusts the wiring to the area corresponding to the second virtual model according to the trend of the replacement map. Optionally, this embodiment needs to add a point line to the region where the protrusion and the recess of the second virtual model are relatively serious, so as to ensure sufficient wiring, and also can adjust the direction of the triangular surface of the topology model, which may affect the outline, and the following point is added here.
Fig. 11 is a schematic diagram of an effect of wiring to a convex region and a concave region of a second virtual model according to an embodiment of the present invention. As shown in fig. 11, the second virtual model for playing the game has a very high requirement on the outline, P is used for representing the convex region of the second virtual model, Q is used for representing the concave region of the second virtual model, and P and Q can be obtained by adding few lines to P and Q, respectively, so as to achieve the purpose of defining the outline of the second virtual model.
FIG. 12 is a schematic illustration of the effect of not routing to raised and recessed regions of a second virtual model, according to an embodiment of the present invention. As shown in fig. 12, although the wiring is more uniform, it lacks profile variations, which do not meet the requirements of a topology model that is effective in the game.
FIG. 13 is a schematic diagram of a triangular surface in a second virtual model according to an embodiment of the invention. As shown in fig. 13, the meaning of the triangular faces of the second virtual model is to refine the orientation of the mold surfaces of the second virtual model.
Fig. 14 is a schematic diagram of determining the direction of the mold surface of the second virtual model by the triangular surface according to the embodiment of the present invention. These connected triangular faces are intended to define the orientation of the mold surface of the second virtual model, as shown in fig. 14. Because the number of the required surfaces for game production is very low, the contour of each angle can be ensured by adjusting and optimizing the triangular surface.
Fig. 15 is a schematic diagram of a wiring requirement conforming to the second virtual model according to an embodiment of the present invention, in fig. 15, the wiring (for example, represented by ×) is applied to the convex region and the concave region of the second virtual model, and the optimized triangular surface (for example, represented by a solid triangle) is adjusted, so that the wiring conforming to the topological bottom die requirement can more clearly express the undulating effect of the outline.
In the embodiment, ZBursh drawing software is utilized, when the topology bottom die is generated, partial automatic topology can be realized, wiring is regular, time is saved, UV information can be kept while the topology model is operated, output efficiency is improved, fine wiring can be guided and adjusted through timely mapping, manufacturing requirements of the topology model are met through manual fine adjustment, the technical effect of improving the generation efficiency of the topology bottom die is achieved, and the technical problem of low generation efficiency of the topology bottom die is solved.
The embodiment of the invention also provides a device for generating the virtual model. It should be noted that the virtual model generation apparatus of this embodiment may be used to execute the virtual model generation method of the embodiment of the present invention.
Fig. 16 is a schematic diagram of a virtual model generation apparatus according to an embodiment of the present invention. As shown in fig. 16, the generating device 160 of the virtual model may include: a first acquisition unit 161, a deployment unit 162, a determination unit 163, and a second acquisition unit 164.
A first obtaining unit 161, configured to obtain a first virtual model.
An unfolding unit 162 for UV unfolding the first virtual model.
A determining unit 163, configured to create a target routing on the UV-developed first virtual model, and determine a routing direction of the first virtual model through the target routing, where the target routing is used to indicate a direction of a target location, the target location is a location in the first virtual model corresponding to a target location, and the target location is a location of the target routing on the UV-developed first virtual model.
A second obtaining unit 164, configured to obtain a second virtual model for the first virtual model topology according to the routing direction and the UV-expanded first virtual model.
The virtual model generation device of the embodiment can realize automatic topology aiming at the generation of the topology model of the virtual role, can control the trend of the whole wiring by establishing main target wiring, has regular wiring and saves time, and further carries out topology processing according to the wiring direction to obtain the topology model, thereby avoiding the problems of long manufacturing time caused by manual topology, easy occurrence of low-level errors, or messy wiring and the like, achieving the technical effect of improving the generation efficiency of the topology model, solving the technical problem of low generation efficiency of the topology model, and further improving the generation efficiency of the virtual model.
The embodiment of the invention also provides a storage medium, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the device where the storage medium is located is controlled to execute the method for generating the virtual model of the embodiment of the 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 also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
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 description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by 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 (11)

1. A method for generating a virtual model, comprising:
acquiring a first virtual model;
performing UV expansion on the first virtual model;
creating target wiring on the first virtual model after UV expansion, and determining a wiring direction of the first virtual model through the target wiring, wherein the target wiring is used for indicating the trend of a target position, the target position is a position corresponding to a target position in the first virtual model, and the target position is a position of the target wiring on the first virtual model after UV expansion;
and obtaining a second virtual model aiming at the first virtual model topology according to the wiring direction and the first virtual model after UV expansion.
2. The method of claim 1, wherein after obtaining a second virtual model for the first virtual model topology according to the first virtual model after the routing direction and UV unrolling, the method further comprises:
acquiring a replacement mapping for adjusting wiring;
and adjusting the wiring on the second virtual model according to the replacement mapping.
3. The method of claim 2, wherein obtaining the replacement map for adjusting the routing comprises:
and acquiring a replacement mapping for adjusting wiring through the second virtual model and the UV unfolded first virtual model.
4. The method of claim 2, wherein the adjusting the routing on the second virtual model according to the displacement map comprises:
and adjusting the wiring on the second virtual model according to the color of each region in the replacement map, wherein the colors of different regions of the replacement map represent the concave-convex degree of the corresponding region.
5. The method of claim 1, wherein prior to UV unfolding the first virtual model, the method further comprises:
and simplifying the first virtual model according to the fluctuation change amplitude of the surface of the first virtual model.
6. The method of claim 1,
before the UV unfolding the first virtual model, further comprising: dividing the first virtual model into a plurality of first sub-models, wherein each first sub-model corresponds to one part of the first virtual model;
the UV expanding the first virtual model comprises: UV unfolding each first sub-model of the first virtual model.
7. The method of claim 6, wherein prior to the UV expanding each first sub-model of the first virtual model, the method further comprises:
and simplifying each first submodel according to the fluctuation change amplitude of the surface of each first submodel.
8. The method of claim 1, wherein after the first virtual model after the developing by the routing direction and UV, obtaining a second virtual model for the first virtual model topology, the method further comprises:
determining whether the number of faces of the second virtual model meets a preset condition;
and if not, replacing the second virtual model with the first virtual model.
9. An apparatus for generating a virtual model, comprising:
a first obtaining unit configured to obtain a first virtual model;
an unfolding unit, configured to perform UV unfolding on the first virtual model;
a determining unit, configured to create a target wiring on the first virtual model after UV development, and determine a wiring direction of the first virtual model through the target wiring, where the target wiring is used to indicate a trend of a target location, the target location is a location in the first virtual model corresponding to a target location, and the target location is a location of the target wiring on the first virtual model after UV development;
and the second obtaining unit is used for obtaining a second virtual model aiming at the topology of the first virtual model according to the wiring direction and the first virtual model after UV expansion.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, controls an apparatus in which the storage medium is located to perform the method of any of claims 1 to 8.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 8.
CN202010421555.9A 2020-05-18 2020-05-18 Virtual model generation method and device, storage medium and electronic device Pending CN111481936A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010421555.9A CN111481936A (en) 2020-05-18 2020-05-18 Virtual model generation method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010421555.9A CN111481936A (en) 2020-05-18 2020-05-18 Virtual model generation method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN111481936A true CN111481936A (en) 2020-08-04

Family

ID=71790651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010421555.9A Pending CN111481936A (en) 2020-05-18 2020-05-18 Virtual model generation method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111481936A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112734894A (en) * 2021-01-25 2021-04-30 腾讯科技(深圳)有限公司 Virtual hair drawing method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108734756A (en) * 2018-05-15 2018-11-02 深圳市腾讯网络信息技术有限公司 The production method and device of animation, storage medium, electronic device
CN109427083A (en) * 2017-08-17 2019-03-05 腾讯科技(深圳)有限公司 Display methods, device, terminal and the storage medium of three-dimensional avatars
CN111145326A (en) * 2019-12-26 2020-05-12 网易(杭州)网络有限公司 Processing method of three-dimensional virtual cloud model, storage medium, processor and electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109427083A (en) * 2017-08-17 2019-03-05 腾讯科技(深圳)有限公司 Display methods, device, terminal and the storage medium of three-dimensional avatars
CN108734756A (en) * 2018-05-15 2018-11-02 深圳市腾讯网络信息技术有限公司 The production method and device of animation, storage medium, electronic device
CN111145326A (en) * 2019-12-26 2020-05-12 网易(杭州)网络有限公司 Processing method of three-dimensional virtual cloud model, storage medium, processor and electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112734894A (en) * 2021-01-25 2021-04-30 腾讯科技(深圳)有限公司 Virtual hair drawing method and device, storage medium and electronic equipment
CN112734894B (en) * 2021-01-25 2023-07-14 腾讯科技(深圳)有限公司 Virtual hair drawing method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN108332365B (en) Air conditioner control method and device
US20170116771A1 (en) 3d model rendering method and apparatus and terminal device
CN105183405A (en) 3D printing method for user-defined surface hollow model
CN109427088A (en) A kind of rendering method and terminal of illumination simulation
CN105069226A (en) Three-dimensional modeling method based on template
CN110124318B (en) Method and device for making virtual vegetation, electronic equipment and storage medium
CN103065357B (en) Based on the figure for shadow-play model production method of common three-dimensional model
CN111695223A (en) Network topology layout method and system
US9177421B2 (en) Hair meshes
CN106067189B (en) Magnanimity three-dimensional cable and channel pattern automation modeling and rendering intent
CN107146285A (en) A kind of any free form surface Meshing Method based on surface fitting
CN111481936A (en) Virtual model generation method and device, storage medium and electronic device
CN110033507A (en) Line method for drafting, device, equipment and readable storage medium storing program for executing are retouched in model pinup picture
CN114998503A (en) White mold automatic texture construction method based on live-action three-dimension
CN104574480A (en) Rapid generation method of role hair style in three-dimensional animation
CN105956328B (en) Method for establishing blade model by using high-freedom-degree parametric surface
CN104574479A (en) Rapid generating method for bird single feathers in three-dimensional animation
CN112529996B (en) Method and device for generating model and electronic equipment
CN109615709A (en) The modeling of multiple person cooperational three-dimensional scenic and method for drafting based on cloud computing
CN114969856A (en) Method for adjusting curved surface edge recognition and editing range implementation of grid model
CN113870406A (en) Free-form model making and material pasting method and readable storage medium
CN107274489A (en) A kind of guiding collimation method free form surface Meshing Method based on Doubly curved surfaces
CN113450441A (en) Rendering method and device of three-dimensional virtual model and electronic equipment
CN114241114B (en) Rendering method and device of materials, storage medium and electronic device
CN105574919A (en) Method for generating embossment effect via tracing of thangka lines

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200804

RJ01 Rejection of invention patent application after publication