CN114816457A - Method, device, storage medium and electronic device for cloning virtual model - Google Patents

Method, device, storage medium and electronic device for cloning virtual model Download PDF

Info

Publication number
CN114816457A
CN114816457A CN202210536547.8A CN202210536547A CN114816457A CN 114816457 A CN114816457 A CN 114816457A CN 202210536547 A CN202210536547 A CN 202210536547A CN 114816457 A CN114816457 A CN 114816457A
Authority
CN
China
Prior art keywords
virtual
model
virtual model
cloning
range
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
CN202210536547.8A
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 CN202210536547.8A priority Critical patent/CN114816457A/en
Publication of CN114816457A publication Critical patent/CN114816457A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • 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/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Landscapes

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

Abstract

The invention discloses a method, a device, a storage medium and an electronic device for cloning a virtual model. The method comprises the following steps: acquiring a first virtual model and a second virtual model, wherein the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model; selecting a cloning range on the first virtual model, wherein the cloning range is used for determining a placing area of the second virtual model on the surface of the first virtual model; and cloning the second virtual model to the first virtual model based on the cloning range to obtain a third virtual model, wherein the third virtual model is a virtual combined model of the second virtual model and the first virtual model. The invention solves the technical problems of high operation cost, poor design effect and large iteration modification difficulty of a method for manually designing and randomly placing the virtual detail model in the related art.

Description

Method, device, storage medium and electronic device for cloning virtual model
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, a storage medium and an electronic device for cloning a virtual model.
Background
In the design process of the virtual model, a large workload of placing the model and a high requirement on model randomness (for example, random differences are needed to exist in the size, the rotation effect, the placing position and the like of the model) generally exist for the model containing more details. The traditional model design method is mainly to manually place models in a game engine directly or to manually place the models in three-dimensional graphic design software and then package and input the models into the game engine. However, the method for manually placing the model containing more details has the following defects: high manual operation cost, poor design effect and high iteration modification difficulty.
In view of the above problems, no effective solution has been proposed.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a storage medium and an electronic device for cloning a virtual model, which are used for at least solving the technical problems of high operation cost, poor design effect and high iteration modification difficulty of a method for manually designing and randomly placing a virtual detail model by manpower in the related art.
According to an aspect of an embodiment of the present invention, there is provided a method of cloning a virtual model, including:
acquiring a first virtual model and a second virtual model, wherein the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model; selecting a cloning range on the first virtual model, wherein the cloning range is used for determining a placing area of the second virtual model on the surface of the first virtual model; and cloning the second virtual model to the first virtual model based on the cloning range to obtain a third virtual model, wherein the third virtual model is a virtual combined model of the second virtual model and the first virtual model.
Optionally, selecting the clone range on the first virtual model comprises: distributing a plurality of candidate clone points on the surface of the first virtual model; selecting a plurality of target clone points from the plurality of candidate clone points; the cloning range is determined by a plurality of cloning sites of interest.
Optionally, cloning the second virtual model to the first virtual model based on the cloning scope comprises: based on the cloning range, the second virtual model is cloned to a plurality of target cloning sites.
Optionally, distributing the plurality of candidate clone points over the surface of the first virtual model comprises: determining a target distribution density of a plurality of candidate clone points based on a first parameter, wherein the first parameter is used for density control of the plurality of candidate clone points; a plurality of candidate clone points are distributed on a surface of the first virtual model according to the target distribution density.
Optionally, the method for cloning a virtual model further includes: determining a target geometric attribute of the second virtual model based on a second parameter, wherein the second parameter is used for performing geometric attribute control on the second virtual model; and adjusting the display form of the second virtual model according to the target geometric attributes.
Optionally, the second parameter comprises: range remapping parameters, the geometric properties of the second virtual model including: rotation properties, determining target geometric properties of the second virtual model based on the second parameters comprising: remapping the first value range to a second value range based on the range remapping parameter, wherein the first value range is a pre-input rotation range, and the second value range is a pre-set remapping range; and determining the rotation attribute through the second value range.
Optionally, the display modality includes: the rotating form, the adjusting the display form of the second virtual model according to the target geometric attributes comprises: and adjusting the rotation form in the second value range according to the rotation attribute.
Optionally, the second parameter comprises: range remapping parameters, the geometric properties of the second virtual model including: a scaling property, the determining the target geometric property of the second virtual model based on the second parameter comprising: remapping the initial control vector to the target control vector based on the second parameter, wherein the initial control vector is a scaling control vector input in advance, and the dimension of the initial control vector is used for determining the scaling dimension of the second virtual model, and the scaling dimension comprises at least one of the following: height scaling, length scaling and width scaling, wherein the value range of the target control vector is a preset remapping range; the scaling property is determined by the target control vector.
Optionally, the display modality includes: the zooming mode, the adjusting the display mode of the second virtual model according to the target geometric attribute comprises: and according to the scaling attribute, adjusting the scaling form under the control of the target control vector.
Optionally, the second parameter comprises: embedding strength parameters, the geometric properties of the second virtual model including: embedding properties, the determining the target geometric properties of the second virtual model based on the second parameters comprising: replacing the first position to a second position based on the embedding strength parameter, wherein the first position is a coordinate position before replacement corresponding to the second virtual model, and the second position is a coordinate position after replacement corresponding to the second virtual model; the embedded property is determined by the second location.
Optionally, the display modality includes: and the embedding form, adjusting the display form of the second virtual model according to the target geometric attributes comprises: and adjusting the embedding form through the second position according to the embedding attribute.
Optionally, the method for cloning a virtual model further includes: comparing the vertex color of each cloning point in the plurality of target cloning points with a preset threshold value to obtain a comparison result; deleting part of the clone points from the multiple target clone points by using the comparison result to obtain a deletion range; the third virtual model is adjusted to a fourth virtual model based on the deletion range.
Optionally, deleting some clone points from the plurality of target clone points by using the comparison result, and obtaining a deletion range includes: acquiring attribute identifications of partial clone points from a plurality of target clone points by using a comparison result; determining the point sequence number of the partial cloning points through the attribute identification of the partial cloning points; deleting partial cloning points from the plurality of target cloning points based on the point sequence numbers of the partial cloning points to obtain a deletion range.
Optionally, adjusting the third virtual model to the fourth virtual model based on the deletion range comprises: acquiring a part of virtual model corresponding to the deletion range from the third virtual model; and deleting the part of the virtual model to obtain a fourth virtual model.
Optionally, the method for cloning a virtual model further includes: and according to at least one model surface deletion strategy, performing surface number deletion of at least one detail size level on the third virtual model to obtain at least one fifth virtual model, wherein the at least one model surface deletion strategy is determined by multi-level detail parameters corresponding to the third virtual model.
Optionally, the method for cloning a virtual model further includes: and carrying out plane expansion arrangement on the third virtual model to obtain a target illumination map.
Optionally, the method for cloning a virtual model further includes: and packaging the third virtual model to obtain the target digital asset, and determining a third parameter corresponding to the third virtual model, wherein the third parameter is used for debugging the target digital asset in the target software interface.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for cloning a virtual model, including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a first virtual model and a second virtual model, the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model; the selecting module is used for selecting a cloning range on the first virtual model, wherein the cloning range is used for determining a placing area of the second virtual model on the surface of the first virtual model; and the cloning module is used for cloning the second virtual model to the first virtual model based on the cloning range to obtain a third virtual model, wherein the third virtual model is a virtual combined model of the second virtual model and the first virtual model.
Optionally, the selecting module is further configured to: distributing a plurality of candidate clone points on the surface of the first virtual model; selecting a plurality of target clone points from the plurality of candidate clone points; the cloning range is determined by a plurality of cloning sites of interest.
Optionally, the cloning module is further configured to: based on the cloning range, the second virtual model is cloned to a plurality of target cloning sites.
Optionally, the selecting module is further configured to: determining a target distribution density of a plurality of candidate clone points based on a first parameter, wherein the first parameter is used for density control of the plurality of candidate clone points; a plurality of candidate clone points are distributed on a surface of the first virtual model according to the target distribution density.
Optionally, the apparatus for cloning a virtual model further includes: the first adjusting module is used for determining the target geometric attribute of the second virtual model based on a second parameter, wherein the second parameter is used for carrying out geometric attribute control on the second virtual model; and adjusting the display form of the second virtual model according to the target geometric attributes.
Optionally, the first adjusting module is further configured to: remapping the first value range to a second value range based on the range remapping parameter, wherein the first value range is a pre-input rotation range, and the second value range is a pre-set remapping range; and determining the rotation attribute through the second value range.
Optionally, the first adjusting module is further configured to: and adjusting the rotation form in the second value range according to the rotation attribute.
Optionally, the first adjusting module is further configured to: remapping the initial control vector to the target control vector based on the second parameter, wherein the initial control vector is a scaling control vector input in advance, and the dimension of the initial control vector is used for determining the scaling dimension of the second virtual model, and the scaling dimension comprises at least one of the following: height scaling, length scaling and width scaling, wherein the value range of the target control vector is a preset remapping range; the scaling property is determined by the target control vector.
Optionally, the first adjusting module is further configured to: and according to the scaling attribute, adjusting the scaling form under the control of the target control vector.
Optionally, the first adjusting module is further configured to: replacing the first position to a second position based on the embedding strength parameter, wherein the first position is a coordinate position before replacement corresponding to the second virtual model, and the second position is a coordinate position after replacement corresponding to the second virtual model; the embedded property is determined by the second location.
Optionally, the first adjusting module is further configured to: and adjusting the embedding form through the second position according to the embedding attribute.
Optionally, the apparatus for cloning a virtual model further includes: the second adjusting module is used for comparing the vertex color of each cloning point in the plurality of target cloning points with a preset threshold value to obtain a comparison result; deleting part of the clone points from the multiple target clone points by using the comparison result to obtain a deletion range; the third virtual model is adjusted to a fourth virtual model based on the deletion range.
Optionally, the second adjusting module is further configured to: acquiring attribute identifications of partial clone points from a plurality of target clone points by using a comparison result; determining the point sequence number of the partial cloning points through the attribute identification of the partial cloning points; deleting partial cloning points from the plurality of target cloning points based on the point sequence numbers of the partial cloning points to obtain a deletion range.
Optionally, the second adjusting module is further configured to: acquiring a part of virtual model corresponding to the deletion range from the third virtual model; and deleting the part of the virtual model to obtain a fourth virtual model.
Optionally, the apparatus for cloning a virtual model further includes: and the deleting module is used for deleting the number of the surfaces of at least one detail size level of the third virtual model according to at least one model surface deleting strategy to obtain at least one fifth virtual model, wherein the at least one model surface deleting strategy is determined by multi-level detail parameters corresponding to the third virtual model.
Optionally, the apparatus for cloning a virtual model further includes: and the unfolding module is used for carrying out plane unfolding arrangement on the third virtual model to obtain a target illumination map.
Optionally, the apparatus for cloning a virtual model further includes: and the packaging module is used for packaging the third virtual model to obtain the target digital asset and determining a third parameter corresponding to the third virtual model, wherein the third parameter is used for debugging the target digital asset in the target software interface.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the method for cloning a virtual model in any one of the above when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including: comprising a memory in which a computer program is stored and a processor arranged to execute the computer program to perform the method of cloning a virtual model according to any of the above.
In at least some embodiments of the present invention, a first virtual model and a second virtual model are first obtained, where the first virtual model is a virtual subject model to be used in a game scene, the second virtual model is a virtual detail model to be placed on a surface of the virtual subject model, a cloning range is selected on the first virtual model, where the cloning range is used to determine a placement area of the second virtual model on the surface of the first virtual model, the second virtual model is cloned to the first virtual model based on the cloning range to obtain a third virtual model, where the third virtual model is a virtual combination model of the second virtual model and the first virtual model, so as to achieve a purpose of automatically and randomly placing the virtual detail model on the virtual subject model, thereby achieving a technical effect of reducing design labor cost and difficulty of the virtual model with more details, further, the technical problems that in the related art, the method for manually designing and randomly placing the virtual detail model manually has high operation cost, poor design effect and high iteration modification difficulty are solved.
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 specification, 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 of a method of cloning a virtual model according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a method of cloning a virtual model according to one embodiment of the invention;
FIG. 3 is a schematic diagram of an alternative virtual model in accordance with one embodiment of the present invention;
FIG. 4 is a schematic diagram of an alternative virtual portfolio model, according to one embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative virtual detail model geometry property control process, according to one embodiment of the present invention;
FIG. 6 is a block diagram of an apparatus for cloning a virtual model according to one embodiment of the invention;
FIG. 7 is a block diagram of an alternative apparatus for cloning a virtual model, in accordance with one embodiment of the present invention;
FIG. 8 is a block diagram of an alternative apparatus for cloning a virtual model, in accordance with one embodiment of the present invention;
FIG. 9 is a block diagram of an alternative apparatus for cloning a virtual model, in accordance with one embodiment of the present invention;
FIG. 10 is a block diagram of an alternative apparatus for cloning a virtual model, in accordance with one embodiment of the present invention;
FIG. 11 is a block diagram of an alternative apparatus for cloning a virtual model, in accordance with one embodiment of the present invention;
fig. 12 is a block diagram of an electronic device according to an embodiment of the invention.
Detailed Description
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 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.
In accordance with one embodiment of the present invention, there is provided an embodiment of a method of cloning a virtual model, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that described herein.
The method for cloning the virtual model in one embodiment of the invention can be operated on a terminal device or a server. The terminal device may be a local terminal device. When the method for cloning the virtual model runs on the server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system comprises the server and the client device.
In an optional embodiment, various cloud applications may be run under the cloud interaction system, for example: and (5) cloud games. Taking a cloud game as an example, a cloud game refers to a game mode based on cloud computing. In the running mode of the cloud game, the running main body of the game program and the game picture presenting main body are separated, the storage and the running of the method for cloning the virtual model are finished on a cloud game server, and the client equipment is used for receiving and sending data and presenting the game picture, for example, the client equipment can be display equipment with a data transmission function close to a user side, such as a mobile terminal, a television, a computer, a palm computer and the like; however, the terminal device performing the information processing is a cloud game server in the cloud. When a game is played, a player operates the client device to send an operation instruction to the cloud game server, the cloud game server runs the game according to the operation instruction, data such as game pictures and the like are encoded and compressed, the data are returned to the client device through a network, and finally the data are decoded through the client device and the game pictures are output.
In an alternative embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used for presenting a game screen. The local terminal device is used for interacting with the player through a graphical user interface, namely, a game program is downloaded and installed and operated through an electronic device conventionally. The manner in which the local terminal device provides the graphical user interface to the player may include a variety of ways, for example, it may be rendered for display on a display screen of the terminal or provided to the player through holographic projection. For example, the local terminal device may include a display screen for presenting a graphical user interface including a game screen and a processor for running the game, generating the graphical user interface, and controlling display of the graphical user interface on the display screen.
In a possible implementation manner, an embodiment of the present invention provides a method for cloning a virtual model, which provides a graphical user interface through a terminal device, where the terminal device may be the aforementioned local terminal device, and may also be the aforementioned client device in a cloud interaction system.
Taking a Mobile terminal operating in a local terminal device as an example, the Mobile terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet device (Mobile Internet Devices, abbreviated as MID), a PAD, a game console, etc. Fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a method for cloning a virtual model 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 processors 102 may include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), a programmable logic device (FPGA), a neural Network Processor (NPU), a Tensor Processor (TPU), an Artificial Intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal may further include a transmission device 106, an input/output device 108, and a display device 110 for communication functions. 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 may be used for storing computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the method for cloning a virtual model 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, that is, the method for cloning a virtual model described above is implemented. 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.
The inputs in the input output Device 108 may come from a plurality of Human Interface Devices (HIDs). For example: keyboard and mouse, game pad, other special game controller (such as steering wheel, fishing rod, dance mat, remote controller, etc.). Some human interface devices may provide output functions in addition to input functions, such as: force feedback and vibration of the gamepad, audio output of the controller, etc.
The display device 110 may be, for example, a head-up display (HUD), a touch screen type Liquid Crystal Display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI) with which a user can interact by touching finger contacts and/or gestures on a touch-sensitive surface, where the human-machine interaction function optionally includes the following interactions: executable instructions for creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, emailing, call interfacing, playing digital video, playing digital music, and/or web browsing, etc., for performing the above-described human-computer interaction functions, are configured/stored in one or more processor-executable computer program products or readable storage media.
In this embodiment, a method for cloning a virtual model running in the mobile terminal is provided, and fig. 2 is a flowchart of a method for cloning a virtual model according to an embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step S21, acquiring a first virtual model and a second virtual model, wherein the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model;
the first virtual model is a virtual subject model in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model in the game scene. For example: the virtual subject model may be a virtual road model in a game scene, and the virtual detail model may be a virtual grass model on a surface of the road model. For another example: the virtual body model may be a building body model in a game scene, and the virtual detail model may be a virtual decoration model on a surface of the building body model.
For example: the method provided by embodiments of the present invention may be used when performing random cloning of the virtual ornament model Z1 on the surface of the virtual building model B1. FIG. 3 is a schematic diagram of an alternative virtual model according to one embodiment of the present invention, as shown in FIG. 3, virtual building model B1 (shown in FIG. 3 as a two-dimensional schematic diagram in cross-section) is a virtual subject model for cloning a virtual detail model to its surface. The virtual ornament model Z1 (shown in two-dimensional schematic view in cross-section in fig. 3) is a single virtual detail model for random cloning onto the surface of the virtual body model.
Step S22, selecting a cloning range on the first virtual model, wherein the cloning range is used for determining the placing area of the second virtual model on the surface of the first virtual model;
the clone range may be used to determine the area of the virtual detail model that lies on the surface of the virtual subject model. The selecting of the clone range on the first virtual model may be selecting an area on the surface of the virtual subject model for randomly placing the virtual detail model.
Specifically, the selection of the clone range on the first virtual model further includes other method steps, which may refer to the further description of the embodiment of the present invention, which is not repeated herein.
And step S23, cloning the second virtual model to the first virtual model based on the cloning range to obtain a third virtual model, wherein the third virtual model is a virtual combination model of the second virtual model and the first virtual model.
The third virtual model may be a virtual combination model formed by the virtual subject model and at least one of the virtual detail models. For example: the virtual composite model may be composed of a virtual road model and a plurality of virtual grass models on a surface of the virtual road model in a game scene.
Cloning the second virtual model to the first virtual model based on the cloning range may be cloning and randomly placing at least one virtual detail model within a cloning range on a surface of the virtual subject model.
Specifically, cloning the second virtual model to the first virtual model and obtaining the third virtual model based on the cloning range further include other method steps, which may refer to the following further description of the embodiments of the present invention, and are not repeated herein.
In at least some embodiments of the present invention, a first virtual model and a second virtual model are first obtained, where the first virtual model is a virtual subject model to be used in a game scene, the second virtual model is a virtual detail model to be placed on a surface of the virtual subject model, a cloning range is selected on the first virtual model, where the cloning range is used to determine a placement area of the second virtual model on the surface of the first virtual model, the second virtual model is cloned to the first virtual model based on the cloning range to obtain a third virtual model, where the third virtual model is a virtual combination model of the second virtual model and the first virtual model, so as to achieve a purpose of automatically and randomly placing the virtual detail model on the virtual subject model, thereby achieving a technical effect of reducing design labor cost and difficulty of the virtual model with more details, further, the technical problems that in the related art, the method for manually designing and randomly placing the virtual detail model manually has high operation cost, poor design effect and high iteration modification difficulty are solved.
The above-described method of embodiments of the present invention is further described below.
Optionally, in step S22, selecting a clone range on the first virtual model may include performing the steps of:
step S221, distributing a plurality of candidate clone points on the surface of the first virtual model;
step S222, selecting a plurality of target clone points from a plurality of candidate clone points;
in step S223, a cloning range is determined by the plurality of target cloning sites.
The clone range on the first virtual model may be determined by a plurality of target clone points on the first virtual model. The first virtual model is a virtual subject model in a game scene. The plurality of target clone points are some or all of the clone points selected from a plurality of candidate clone points distributed on the surface of the virtual subject model.
Alternatively, the plurality of candidate clone points may be distributed on the surface of the first virtual model, wherein the distribution method may be specified by an artist on the first virtual model, or may be generated according to a preset distribution rule based on the first virtual model.
For example: the method provided by embodiments of the present invention may be used when performing random cloning of the virtual ornament model Z1 on the surface of the virtual building model B1. By presetting the Scatter nodes in the game engine, a plurality of clone points can be randomly distributed on the surface of the virtual building model B1, and the plurality of clone points are recorded as a clone Point set Point01 (corresponding to the plurality of candidate clone points).
In an actual application scenario, a technician may select part or all of the clone points from the clone Point set Point01 according to the requirements of the scenario, and record the selected clone points as clone Point sets Point _ T (which are equivalent to the above multiple target clone points). And determining the Area of the virtual building model B1 needing to clone the virtual ornament model Z1 through the selected clone Point set Point _ T, wherein the Area is marked as Area 0.
Alternatively, the Area0 may be a minimum circumscribed Area determined by a plurality of clone points included in the clone Point set Point _ T. In this example, random cloning of the ornament Z1 is performed on all surfaces of the virtual building model B1, that is, all cloning points in the cloning Point set Point01 are selected as the cloning Point set Point _ T.
Optionally, in step S23, cloning the second virtual model to the first virtual model based on the cloning range may include performing the steps of:
step S231, cloning the second virtual model to a plurality of target cloning sites based on the cloning range.
The cloning of the second virtual model to the plurality of target cloning sites based on the cloning range described above may be: and determining a plurality of target cloning points contained in the target cloning range, and cloning the second virtual model to each target cloning point in the plurality of target cloning points.
Optionally, when the second virtual model is cloned to each of the plurality of target clone points, the second virtual model may be randomly adjusted (e.g., scaled, deformed, etc.) and randomly placed (e.g., rotated, shifted, etc.) on the target clone point, so as to achieve a random effect of placing the virtual detail model on the virtual subject model.
For example: the method provided by embodiments of the present invention may be used when performing random cloning of the virtual ornament model Z1 on the surface of the virtual building model B1. The Copy node in the preset game engine comprises an interface A and an interface B. Inputting a virtual building model B1 into the interface A, inputting a virtual ornament model Z1 into the interface B, determining a clone Point set Point _ T by a preset game engine through an Area0 determined on the virtual building model B1 and used for cloning, and randomly cloning a virtual ornament model Z1 to the clone Point set Point _ T.
Fig. 4 is a schematic diagram of an alternative virtual combination model according to an embodiment of the present invention, and as shown in fig. 4, all of the ground outer surface of the virtual building model B1 is determined as a clone Area0, and according to the method provided by the present embodiment, the virtual decoration model Z1 is randomly cloned onto the virtual building model B1, so that the virtual combination model C1 shown in fig. 4 can be obtained.
Optionally, in step S221, distributing the plurality of candidate clone points on the surface of the first virtual model may include performing the steps of:
step S2211, determining target distribution densities of a plurality of candidate clone points based on a first parameter, wherein the first parameter is used for density control of the plurality of candidate clone points;
step S2212, distributing a plurality of candidate clone points on the surface of the first virtual model according to the target distribution density.
The first parameter may be a preset density control parameter, and the first parameter may be used to perform density control on a plurality of candidate clone points on the surface of the virtual subject model. Based on the first parameter, a target distribution density of the plurality of candidate clone points on the surface of the virtual subject model may be determined. The target distribution density is used to reflect the distribution density of the plurality of candidate clone points.
According to the target distribution density, a plurality of candidate clone points may be distributed on the surface of the first virtual model, wherein the distribution method may be that the plurality of candidate clone points are generated by a clone point distribution function node in a preset game engine according to the target distribution density.
For example: the method provided by embodiments of the present invention may be used when performing random cloning of the virtual ornament model Z1 on the surface of the virtual building model B1. When the Scatter node in the game engine is preset to determine the clone Point set Point01, the density of the clone points in the clone Point set Point01 can be controlled according to a density control parameter d01 preset by a technician.
Alternatively, the density control parameter d01 may be a minimum threshold value for the distance between any two cloning sites.
It is easy to note that, in general, the Copy node of the default game engine is model-cloned according to the number of cloning points on the virtual model surface. However, the number of the upper surfaces and the number of the points of the virtual model designed by the three-dimensional graphic design software by the art personnel are small, and the requirement of model cloning is generally difficult to meet. Therefore, the method provided by the embodiment of the invention can solve the technical problem of poor model cloning effect caused by insufficient number of model surfaces or points.
Optionally, when density control is performed on a plurality of candidate clone points, a dense region where the candidate clone points are distributed on the surface of the virtual subject model may also be controlled by adding noise waves on the surface of the virtual subject model.
Optionally, the method for cloning a virtual model may further include the following steps:
step S24, determining the target geometric attribute of the second virtual model based on the second parameter, wherein the second parameter is used for geometric attribute control of the second virtual model;
step S25 is to adjust the display mode of the second virtual model according to the target geometric attributes.
The second virtual model may be a virtual detail model. The second parameter may be used for geometric property control of the virtual detail model. The geometric properties may include: size attributes, rotation attributes, embedding attributes, mapping attributes, and the like.
The display modality of the virtual detail model may be adjusted in accordance with the target geometric property of the virtual detail model determined based on the second parameter. Correspondingly, the display modality may include: dimensional form, rotational form, embedded form, etc.
Determining a target geometric property of a second virtual model based on the second parameter
Optionally, in step S24, the second parameter includes: range remapping parameters, the geometric properties of the second virtual model including: the rotation property, determining the target geometric property of the second virtual model based on the second parameter, may comprise performing the steps of:
step S241, remapping a first value range to a second value range based on the range remapping parameter, wherein the first value range is a pre-input rotation range, and the second value range is a pre-set remapping range;
and step S242, determining the rotation attribute through the second value range.
The second parameter may be a parameter for controlling a geometric property of the virtual detail model. The second parameter may include a range remapping parameter. The geometric properties of the virtual detail model may include rotational properties. The range remapping parameters may be used to control the process of range remapping the rotation attribute related parameters of the virtual detail model.
The first range of values may be a range of rotation of the virtual detail model input by the technician. The second value range may be a remapping range corresponding to the first value range, which is preset by a technician. The first value range and the second value range can be both expressed as an angle value range, a rotation percentage value range and the like.
Based on the range remapping parameter, the first value range may be remapped to the second value range. According to the second value range, the rotation attribute of the virtual detail model can be determined.
Optionally, in step S25, the display modality includes: the rotating modality, adjusting the display modality of the second virtual model according to the target geometric property, may comprise the following execution steps:
and step S251, adjusting the rotation form in the second value range according to the rotation attribute.
The display modality may be a modality displayed when the virtual detail model is cloned onto the surface of the virtual subject model. The display modality may include a rotation modality.
The second value range may be a value range obtained by remapping a rotation range input in advance. The rotation property may be a geometric property of the virtual detail model determined according to the second value range. According to the rotation attribute, the rotation form of the virtual detail model can be adjusted in the corresponding second value range. The rotation mode of the virtual detail model can be adjusted by adjusting the rotation angle of the virtual detail model, or adjusting the rotation percentage of the virtual detail model.
For example: the method provided by embodiments of the present invention may be used when performing random cloning of the virtual ornament model Z1 on the surface of the virtual building model B1. By adopting a geometric attribute node Attribute in a preset game engine, the Attribute node can read a virtual building model B1 in interface A, a virtual decoration model Z1 in interface B and a plurality of parameters related to the model B1 and the model Z1 (such as a random point position P and a sequence number Ptnum on the model B1, model color information Cd, model normal line information N and the like) of the Copy node.
Fig. 5 is a schematic diagram of a geometric attribute control process of an optional virtual detail model according to an embodiment of the present invention, and as shown in fig. 5, in an Attributop node of a preset game engine, based on a plurality of model parameters read by the node, a rotation attribute control of a ornament model may be performed.
Specifically, through the Random node Random1, the preset rotation range RR1 (corresponding to the above-described first value range) of the virtual ornament model Z1 can be obtained. Through the range remapping node Fit, the preset rotation range RR1 may be remapped to obtain a remapping rotation range RR2 (equivalent to the second value range). The rotation attribute RX1 corresponding to the virtual ornament model Z1 is output through the output attribute rot node Bind3 based on the remapped rotation range RR 2.
Alternatively, the Random node Random1 may provide a Random number value of 0 to 1, and the range remapping node may map the existing rotation data to a specified Random range (e.g., 0 to 1).
Further, the preset game engine may adjust the rotation form of the virtual ornament model Z1 to be cloned within the remapping rotation range RR2 according to the rotation attribute RX1 corresponding to the virtual ornament model Z1.
Optionally, in step S24, the second parameter includes: range remapping parameters, the geometric properties of the second virtual model including: scaling the property, determining the target geometric property of the second virtual model based on the second parameter may comprise performing the steps of:
step S243, remapping the initial control vector to the target control vector based on the second parameter, where the initial control vector is a scaling control vector input in advance, and a dimension of the initial control vector is used to determine a scaling dimension of the second virtual model, where the scaling dimension includes at least one of: height scaling, length scaling and width scaling, wherein the value range of the target control vector is a preset remapping range;
in step S244, a scaling attribute is determined by the target control vector.
The second parameter may be a parameter for controlling a geometric property of the virtual detail model. The second parameter may include a range remapping parameter. The geometric properties of the virtual detail model may include scaling properties. The range remapping parameters may be used to control the process of range remapping vectors associated with scaling attributes of the virtual detail model.
The initial control vector may be a previously input scaling control vector. The dimensions of the initial control vector may be used to determine scaling dimensions of the virtual detail model, which may include at least one of height scaling, length scaling, width scaling. The height scaling, length scaling, width scaling may be scaling in three directions perpendicular to each other in three-dimensional space. The value range of the target control vector may be a preset remapping range.
The initial control vector may be remapped to the target control vector based on the range remapping parameter. From the target control vector, scaling properties of the virtual detail model may be determined.
Optionally, in step S25, the display modality includes: the scaling configuration, adjusting the display configuration of the second virtual model according to the target geometric property, may comprise the following steps:
step S252, adjusting the zoom mode under the control of the target control vector according to the zoom attribute.
The display modality may be a modality displayed when the virtual detail model is cloned onto the surface of the virtual subject model. The display modality may include a zoom modality.
The target control vector may be a control vector obtained by remapping a scaling control vector input in advance. The scaling property may be a geometric property of the virtual detail model determined from the second range of values. According to the scaling property, the scaling form of the virtual detail model can be adjusted under the control of the corresponding target control vector.
For example: the method provided by embodiments of the present invention may be used when performing random cloning of the virtual ornament model Z1 on the surface of the virtual building model B1. And randomly zooming the virtual ornament model Z1 in the X direction, the Y direction and the Z direction in a preset game engine, wherein the X direction, the Y direction and the Z direction are mutually vertical in pairs. Scaling in the X direction is referred to as length scaling, scaling in the Y direction is referred to as width scaling, and scaling in the Z direction is referred to as height scaling.
Still as shown in fig. 5, an initial control vector RV1(rx, ry, rz) of the virtual ornament model Z1 may be obtained through a Random node Random4, where rx is used to represent the scaling of the obtained virtual ornament model Z1 in the X direction, ry is used to represent the scaling of the obtained virtual ornament model Z1 in the Y direction, and rz is used to represent the scaling of the obtained virtual ornament model Z1 in the Z direction.
Still as shown in fig. 5, an existing initial control vector (e.g., a one-dimensional vector manually input by a technician) can be mapped by the range remapping node to a remapped control vector RV2(rx, ry, rz) (equivalent to the target control vector) in a specified format (three-dimensional vector corresponding to the X-direction, Y-direction, and Z-direction).
Still as shown in fig. 5, by computing node Parm1, a prescribed vector calculation may be made for remapped control vector RV2(rx, ry, rz). For example: the specified vector calculation may be to multiply the remapped control vector RV2(rx, ry, rz) by a constant parameter between 0 and 1 to control the scaling magnitude in the X, Y, and Z directions.
Still as shown in fig. 5, the scaling behavior of the virtual ornament model Z1 may be controlled by the scaling control node Add1 or Add2, resulting in a scaling control result RV3(rx, ry, rz). For example: the zoom control node Add1 may be used to control the virtual ornament model Z1 to randomly zoom in the Z-direction only; the zoom control node Add2 may be used to control the virtual ornament model Z1 to randomly zoom in the X-direction, Y-direction, and Z-direction in the same scale.
Optionally, in an actual application scenario, the technician may add more zoom control nodes according to the requirements of the scenario, such as a zoom control node for controlling the virtual detail model to randomly zoom only in the X direction, a zoom control node for controlling the virtual detail model to randomly zoom only in the Y direction, a zoom control node for controlling the virtual detail model to randomly zoom only in the X direction and the Y direction (Z direction fixation), a zoom control node for controlling the virtual detail model to randomly zoom only in the Y direction and the Z direction (X direction fixation), a zoom control node for controlling the virtual detail model to randomly zoom only in the X direction and the Z direction (Y direction fixation), and so on.
Still as shown in fig. 5, based on the above-described scaling control result RV3(rx, ry, rz), the scaling attribute RS1 corresponding to the virtual ornament model Z1 is output through the output attribute rot node Bind 2.
Further, the preset game engine may adjust the scaling configuration of the virtual ornament model Z1 to be cloned under the control of the remapping control vector RV2(rx, ry, rz) according to the scaling attribute RS1 corresponding to the virtual ornament model Z1.
Optionally, in step S24, the second parameter includes: embedding strength parameters, the geometric properties of the second virtual model including: determining the target geometric property of the second virtual model based on the second parameter may comprise performing the steps of:
step S245, replacing the first position to a second position based on the embedding strength parameter, wherein the first position is a coordinate position before replacement corresponding to the second virtual model, and the second position is a coordinate position after replacement corresponding to the second virtual model;
step S246, determining the embedding attribute through the second position.
The second parameter may be a parameter for controlling a geometric property of the virtual detail model. The second parameter may include an embedding strength parameter. The geometric properties of the virtual detail model may include embedded properties. The embedding strength parameter can be used for controlling the position replacement process corresponding to the virtual detail model.
The first position may be a coordinate position where the virtual detail model is cloned on the surface of the virtual subject model before the replacement corresponding to the virtual detail model, and the second position may be a coordinate position where the virtual detail model is cloned on the surface of the virtual subject model after the replacement corresponding to the virtual detail model.
The first location may be displaced to the second location based on the embedding strength parameter. From this second position, the embedded properties of the virtual detail model can be determined.
Optionally, in step S25, the display modality includes: the embedding modality, adjusting the display modality of the second virtual model according to the target geometric property, may comprise the following execution steps:
step S253, adjusting the embedding form by the second position according to the embedding attribute.
The display modality may be a modality displayed when the virtual detail model is cloned onto the surface of the virtual subject model. The display modality may include an embedded modality.
The second position may be a coordinate position where the virtual detail model is cloned on the surface of the virtual subject model after corresponding replacement of the virtual detail model. The embedded property may be a geometric property of the virtual detail model determined from the second position. According to the embedding attribute, the embedding form of the virtual detail model can be adjusted through the corresponding second position.
For example: the method provided by embodiments of the present invention may be used when performing random cloning of the virtual ornament model Z1 on the surface of the virtual building model B1. The depth of insertion of the virtual ornament model Z1 on the surface of the virtual construction model B1 is controlled by the insertion strength parameter.
As also shown in fig. 5, the corresponding pre-replacement Random coordinate position RP1 (corresponding to the first position described above) at which the virtual ornament model Z1 was cloned to the surface of the virtual building model B1 can be obtained by the Random node Random 6.
Still as shown in fig. 5, by calculating the nodes Parm5 and Parm6, the random coordinate position RP1 before the transformation can be calculated in a correlated manner. For example: the calculation node Parm5 can be used for carrying out replacement gray level identification according to the embedded strength parameter and the random coordinate position RP1 before replacement; the compute node par 6 may be used to determine the permutation magnitude from the embedding strength parameter.
Still as shown in fig. 5, the virtual ornament model Z1 can be highly displaced (the direction of height displacement may be the N direction corresponding to the surface normal of the virtual building model B1) by the displacement node displaceml 1 based on the coordinate position calculation result RP2, resulting in a displaced coordinate position RP3 (equivalent to the above-described second position).
Still as shown in fig. 5, based on the above-described replaced coordinate position RP3, the embedded attribute RQ1 corresponding to the virtual ornament model Z1 is output through the output attribute rot node Bind 1.
Further, the preset game engine may adjust the embedded form of the virtual ornament model Z1 to be cloned through the replaced coordinate position RP3 according to the embedded attribute RQ1 corresponding to the virtual ornament model Z1.
Optionally, the method for cloning a virtual model may further include the following steps:
step S26, comparing the vertex color of each clone point in the multiple target clone points with a preset threshold value to obtain a comparison result;
step S27, deleting partial clone points from the multiple target clone points by using the comparison result to obtain a deletion range;
in step S28, the third virtual model is adjusted to the fourth virtual model based on the deletion range.
The plurality of target clone points may be some or all of the clone points selected from a plurality of candidate clone points distributed on the surface of the virtual body model. The vertex color of each of the plurality of target clone points may be model color information Cd of the virtual subject model surface, and the vertex color may be pre-drawn by a technician through three-dimensional graphic design software.
The third virtual model is a virtual combination model of the second virtual model and the first virtual model. The third virtual model may be a virtual composition model obtained by randomly cloning at least one virtual detail model to a surface of the virtual subject model.
The preset threshold may be a threshold preset by a technician for adjusting the virtual model. Comparing the vertex color of each of the plurality of target clone points with the preset threshold value to obtain the comparison result. The comparison result may be used to determine an adjustment range on the virtual portfolio model.
The comparison result may be used to delete some of the clone points from the plurality of target clone points, thereby obtaining the deletion range. The deletion range may be a minimum circumscribed area corresponding to the deleted partial clone point.
Based on the deletion range, the third virtual model may be adjusted to the fourth virtual model. The adjusting operation may be deleting the virtual detail model in the area corresponding to the deletion range on the surface of the third virtual model to control the actual clone area.
Alternatively, in step S27, deleting some clone points from the plurality of target clone points using the comparison result, and obtaining the deletion range may include performing the steps of:
step S271, obtaining the attribute identification of partial clone points from a plurality of target clone points by using the comparison result;
step S272, determining the point sequence number of the partial cloning point through the attribute identification of the partial cloning point;
and step S273, deleting the partial cloning points from the plurality of target cloning points based on the point sequence numbers of the partial cloning points to obtain a deletion range.
The comparison result is the result of comparing the vertex color of each clone point in the plurality of target clone points with a preset threshold value. Using the comparison, the attribute identifications of the partial clone points can be obtained from the plurality of target clone points. The attribute identification may be used to identify each of the partial clone points.
The point sequence number of the partial clone point can be determined by the attribute identification of the partial clone point. The point sequence number may be a sequence number of a clone point on the surface of the virtual subject model for cloning the virtual detail model, and the point sequence number may be one of a plurality of parameters read by the preset game engine based on the virtual subject model and the virtual detail model.
Based on the point numbers of the partial clone points, the partial clone points can be deleted from the plurality of target clone points, and a deletion range can be obtained. Deleting a portion of the cloning sites from the plurality of target cloning sites may comprise: and deleting the partial cloning points corresponding to the sequence numbers of the points to be deleted from the plurality of target cloning points by taking the point sequence numbers of the partial cloning points as the sequence numbers of the points to be deleted. The deletion range may be a minimum circumscribed area corresponding to the deleted partial clone point.
Optionally, in step S28, adjusting the third virtual model to the fourth virtual model based on the deletion range may include performing the steps of:
step S281, acquiring a partial virtual model corresponding to the deletion range from the third virtual model;
in step S282, a part of the virtual models is deleted to obtain a fourth virtual model.
The third virtual model is a virtual combination model of the second virtual model and the first virtual model. The third virtual model may be a virtual composition model obtained by randomly cloning at least one virtual detail model to a surface of the virtual subject model. The deletion range is an area of the virtual main body model surface corresponding to the deleted partial clone point.
Determining a part of the cloned virtual detail model in the deletion range on the surface of the virtual main body model from the virtual combination model, and deleting the part of the virtual detail model, wherein the virtual combination model after the part of the virtual detail model is deleted is the fourth virtual model
For example: the method provided by embodiments of the present invention may be used when performing random cloning of the virtual ornament model Z1 on the surface of the virtual building model B1. The virtual building model B1 and the virtual ornament model Z1 may be created in advance by an art designer using three-dimensional graphic design software. In making the virtual building model B1, the surface color Cd of the virtual building model B1 may be drawn. The value range of the surface color Cd is [0,1], wherein 0 represents black, 1 represents white, and a value between 0 and 1 represents gray.
In the preset game engine, the control of the surface cloning range of the virtual building model B1 can be carried out through a Delete node. Specifically, according to the value of the surface color Cd, the clone area a21 and the clone-unnecessary area a22 are determined. The determination method comprises the following steps: a preset cloning threshold Cd _ g is 0.2 (equivalent to the preset threshold), the color comparison result RB of the cloning point of which the surface color Cd of the virtual building model B1 is less than Cd _ g is output as 0, and the color comparison result RB of the cloning point of which the surface color Cd of the virtual building model B1 is greater than or equal to Cd _ g is output as 1. Finally, according to the color comparison result RB corresponding to each of the plurality of clone points on the surface of the virtual building model B1, the clone point RB ═ 1 is labeled as belonging to the clone region a21, and the clone point RB ═ 0 is labeled as belonging to the clone-unnecessary region a 22.
On the virtual combined model C1 of the virtual building model B1 and the virtual ornament model Z1, a part of the ornament model to be deleted may be determined according to the clone-free region a22, and deletion of the part of the ornament model may result in a deletion-adjusted virtual combined model C2.
Optionally, the method for cloning a virtual model may further include the following steps:
and step S29, performing surface number deletion of at least one detail size level on the third virtual model according to at least one model surface deletion strategy to obtain at least one fifth virtual model, wherein the at least one model surface deletion strategy is determined by multi-level detail parameters corresponding to the third virtual model.
The multilevel Detail (Lod) technology is a technology for determining resource allocation of object rendering according to the position and importance of a node of a virtual model in a display environment, reducing the number of faces and the Detail of an unimportant object, and obtaining high-efficiency rendering operation. The multilevel detail parameters corresponding to the third virtual model may be parameter sets (such as a surface parameter and a detail parameter) related to the Lod technology.
At least one mold face deletion strategy can be determined according to the multi-level detail parameters. Specifically, for example: and determining a plurality of detail size levels corresponding to the third virtual model determined according to the multilevel detail parameters (such as a smaller level with the detail size smaller than a smaller threshold, a larger level with the detail size larger than a larger threshold, and a middle level with the detail size between the smaller threshold and the larger threshold), and determining a plurality of corresponding model surface deletion strategies (such as the deletion of the model surface at the smaller level, the deletion of the model surface at the middle level, the deletion of the model surface at the larger level, the deletion of the model surface at the smaller level and the middle level, the deletion of the model surface at the smaller level and the larger level, and the deletion of the model surface at the middle level and the larger level).
And according to at least one model surface deletion strategy corresponding to the third virtual model, performing surface deletion at least one detail size level on the third virtual model to obtain at least one fifth virtual model.
For example: when a plurality of Lod models are created based on the virtual combined model C1 composed of the virtual building model B1 and the virtual ornament model Z1, the method provided by the embodiment of the present invention may be used. In a practical application scenario, the number of clones of the detail model in the virtual composition model C1 needs to be reduced in order to make the Lod model. Specifically, the method for reducing the number of clones of the detail model in the virtual portfolio model C1 may include:
step E1, randomly distributing cloning points on the surface of the virtual building model B1, extracting the serial numbers Ptnum of the randomly distributed cloning points, and converting the serial numbers into cloning points ID;
step E2, adding attribute name IDs for a plurality of randomly distributed cloning points, wherein the value of the attribute name ID corresponding to the same cloning point can be the same as the cloning point ID;
step E3, the virtual combined model C1 composed of the virtual building model B1 and the virtual ornament model Z1 is subjected to face number deletion at 4 levels, so as to obtain corresponding 4 Lod models, which are respectively denoted as Lod0, Lod1, Lod2, and Lod 3.
Optionally, the Lod model corresponding to the face number subtraction at the 4 levels may be: the low-level plane number is deleted corresponding to the low-level 0, the medium-level plane number is deleted corresponding to the Lod1, the high-level plane number is deleted corresponding to the Lod2, and the low-level plane number and the medium-level plane number are deleted corresponding to the Lod 3.
Optionally, the above-mentioned face number deletion process at 4 levels may be performed by presetting a model face-subtracted node multiple in the game engine, where the model face-subtracted node multiple may output 4 Lod models (including Lod0, Lod1, Lod2, Lod3) simultaneously.
After face pruning and Lod modeling, the random cloning process described above may be performed. In determining the deletion range using the Delete node, the attribute name IDs of the randomly distributed clone points on the surface of the virtual building model B1 may be identified and the deletion range may be controlled.
Optionally, the method for cloning a virtual model may further include the following steps:
and step S210, performing plane expansion and arrangement on the third virtual model to obtain a target illumination map.
The third virtual model is a virtual combination model of the second virtual model and the first virtual model. The third virtual model may be a virtual composition model obtained by randomly cloning at least one virtual detail model to a surface of the virtual subject model. And performing plane expansion arrangement on the third virtual model to obtain the target illumination map. The target lighting map may be used to render the third virtual model in a virtual scene.
For example: the method provided by the embodiment of the present invention may be used when making a UV light map based on the virtual combined model C1 composed of the virtual building model B1 and the virtual ornament model Z1. In a preset game engine, UV arrangement is carried out on the virtual combined model C1 by using a UV arrangement node uvlayout, and the typesetting precision of a following model (such as a following model volume) is zoomed on the UV arrangement result, so that a UV illumination map which is well matched with the virtual combined model C1 can be obtained.
Optionally, the method for cloning a virtual model may further include the following steps:
and S211, packaging the third virtual model to obtain the target digital asset, and determining a third parameter corresponding to the third virtual model, wherein the third parameter is used for debugging the target digital asset in the target software interface.
The third virtual model is a virtual combination model of the second virtual model and the first virtual model. The third virtual model may be a virtual composition model obtained by randomly cloning at least one virtual detail model to a surface of the virtual subject model. The third virtual model may be packaged in a preset game engine as a target digital asset.
Based on the target digital asset, a third parameter of the third virtual model may be determined. The third parameter may be an exposure parameter determined during packaging of the third virtual model, and the third parameter may be used for debugging the target digital asset within the target software interface.
For example: the method provided by the embodiment of the present invention may be used when performing the packaging process based on the virtual combined model C1 composed of the virtual building model B1 and the virtual ornament model Z1. The method comprises the steps of using a packaging processing node Subnet in a preset game engine to determine parameters needing to be exposed (such as clone point density, random scaling parameters, Lod model, illumination map and the like), linking the parameters needing to be protected to the Subnet node, specifying a value range corresponding to the parameters needing to be exposed, and outputting a virtual combined model C1 consisting of a virtual building model B1 and a virtual ornament model Z1 as Digital Assets (such as Houdini Digital Assets, Had for short).
Alternatively, the digital assets may be provided to other design software (e.g., UE4, 3D Max, Maya, etc.), which may debug and use the virtual combined model C1 composed of the virtual building model B1 and the virtual ornament model Z1 according to the exposed parameters.
It is easy to note that, by the method provided by the embodiment of the present invention, the virtual detail model can be automatically and randomly cloned on the surface of the virtual main body model, and the density, range, behavior (such as scaling, rotation, embedding) and the like of random cloning can be controlled by related parameters.
It is easy to note that, with the method provided by the embodiment of the present invention, multiple Lod models can be automatically generated based on a randomly cloned virtual combination model, and the precision of the multiple Lod models is controlled by related adjustment parameters, and an illumination map with higher accuracy can also be generated by automatically arranging the randomly cloned virtual combination models. Therefore, one of the beneficial effects of the invention is as follows: the Lod model with high precision and the illumination map with high accuracy are provided, and the convenience degree of designing the virtual combination model in the actual application scene is improved.
In addition, by the method provided by the embodiment of the invention, the randomly cloned virtual combination model can be packaged into digital assets with stronger compatibility, so that various design software (such as UE4, 3D Max, Maya and the like) can conveniently use the randomly cloned virtual combination model, and the convenience degree of designing the virtual combination model in an actual application scene is further improved.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for cloning a virtual model is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of an apparatus for cloning a virtual model according to an embodiment of the present invention, as shown in fig. 6, the apparatus includes: an obtaining module 601, configured to obtain a first virtual model and a second virtual model, where the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on a surface of the virtual subject model; a selecting module 602, configured to select a cloning range on the first virtual model, where the cloning range is used to determine a placement area of the second virtual model on a surface of the first virtual model; a cloning module 603, configured to clone the second virtual model to the first virtual model based on the cloning range, so as to obtain a third virtual model, where the third virtual model is a virtual combination model of the second virtual model and the first virtual model.
Optionally, the selecting module 602 is further configured to: distributing a plurality of candidate clone points on the surface of the first virtual model; selecting a plurality of target clone points from the plurality of candidate clone points; the cloning range is determined by a plurality of cloning sites of interest.
Optionally, the cloning module 603 is further configured to: based on the cloning range, the second virtual model is cloned to a plurality of target cloning sites.
Optionally, the selecting module 603 is further configured to: determining a target distribution density of a plurality of candidate clone points based on a first parameter, wherein the first parameter is used for density control of the plurality of candidate clone points; a plurality of candidate clone points are distributed on a surface of the first virtual model according to the target distribution density.
Optionally, fig. 7 is a block diagram of an alternative apparatus for cloning a virtual model according to an embodiment of the present invention, and as shown in fig. 7, the apparatus includes, in addition to all modules shown in fig. 6: a first adjusting module 604, configured to determine a target geometric property of the second virtual model based on a second parameter, where the second parameter is used for performing geometric property control on the second virtual model; and adjusting the display form of the second virtual model according to the target geometric attributes.
Optionally, the first adjusting module 604 is further configured to: remapping the first value range to a second value range based on the range remapping parameter, wherein the first value range is a pre-input rotation range, and the second value range is a pre-set remapping range; and determining the rotation attribute through the second value range.
Optionally, the first adjusting module 604 is further configured to: and adjusting the rotation form in the second value range according to the rotation attribute.
Optionally, the first adjusting module 604 is further configured to: remapping the initial control vector to the target control vector based on the second parameter, wherein the initial control vector is a scaling control vector input in advance, and the dimension of the initial control vector is used for determining the scaling dimension of the second virtual model, and the scaling dimension comprises at least one of the following: height scaling, length scaling and width scaling, wherein the value range of the target control vector is a preset remapping range; the scaling property is determined by the target control vector.
Optionally, the first adjusting module 604 is further configured to: and according to the scaling attribute, adjusting the scaling form under the control of the target control vector.
Optionally, the first adjusting module 604 is further configured to: replacing the first position to a second position based on the embedding strength parameter, wherein the first position is a coordinate position before replacement corresponding to the second virtual model, and the second position is a coordinate position after replacement corresponding to the second virtual model; the embedded property is determined by the second location.
Optionally, the first adjusting module 604 is further configured to: and adjusting the embedding form through the second position according to the embedding attribute.
Optionally, fig. 8 is a block diagram of a structure of an alternative apparatus for cloning a virtual model according to an embodiment of the present invention, and as shown in fig. 8, the apparatus includes, in addition to all modules shown in fig. 7: a second adjusting module 605, configured to compare a vertex color of each clone point in the multiple target clone points with a preset threshold to obtain a comparison result; deleting part of the clone points from the multiple target clone points by using the comparison result to obtain a deletion range; the third virtual model is adjusted to a fourth virtual model based on the deletion range.
Optionally, the second adjusting module 605 is further configured to: acquiring attribute identifications of partial clone points from a plurality of target clone points by using a comparison result; determining the point sequence number of the partial cloning points through the attribute identification of the partial cloning points; deleting partial cloning points from the plurality of target cloning points based on the point sequence numbers of the partial cloning points to obtain a deletion range.
Optionally, the second adjusting module 605 is further configured to: acquiring a part of virtual model corresponding to the deletion range from the third virtual model; and deleting the part of the virtual model to obtain a fourth virtual model.
Optionally, fig. 9 is a block diagram of an alternative apparatus for cloning a virtual model according to an embodiment of the present invention, and as shown in fig. 9, the apparatus includes, in addition to all modules shown in fig. 8: a deleting module 606, configured to delete, according to at least one model surface deletion policy, the number of surfaces of the third virtual model at least one detail size level to obtain at least one fifth virtual model, where the at least one model surface deletion policy is determined by a multi-level detail parameter corresponding to the third virtual model.
Optionally, fig. 10 is a block diagram of an alternative apparatus for cloning a virtual model according to an embodiment of the present invention, and as shown in fig. 10, the apparatus includes, in addition to all modules shown in fig. 9: and an unfolding module 607, configured to perform plane unfolding arrangement on the third virtual model to obtain a target illumination map.
Optionally, fig. 11 is a block diagram of an alternative apparatus for cloning a virtual model according to an embodiment of the present invention, and as shown in fig. 11, the apparatus includes, in addition to all modules shown in fig. 10: and a packaging module 608, configured to package the third virtual model to obtain the target digital asset, and determine a third parameter corresponding to the third virtual model, where the third parameter is used to debug the target digital asset in the target software interface.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
acquiring a first virtual model and a second virtual model, wherein the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model; selecting a cloning range on the first virtual model, wherein the cloning range is used for determining a placing area of the second virtual model on the surface of the first virtual model; and cloning the second virtual model to the first virtual model based on the cloning range to obtain a third virtual model, wherein the third virtual model is a virtual combined model of the second virtual model and the first virtual model.
Optionally, selecting the clone range on the first virtual model comprises: distributing a plurality of candidate clone points on the surface of the first virtual model; selecting a plurality of target clone points from the plurality of candidate clone points; the cloning range is determined by a plurality of cloning sites of interest.
Optionally, cloning the second virtual model to the first virtual model based on the cloning scope comprises: based on the cloning range, the second virtual model is cloned to a plurality of target cloning sites.
Optionally, distributing the plurality of candidate clone points over the surface of the first virtual model comprises: determining a target distribution density of a plurality of candidate clone points based on a first parameter, wherein the first parameter is used for density control of the plurality of candidate clone points; a plurality of candidate clone points are distributed on a surface of the first virtual model according to the target distribution density.
Optionally, the method for cloning a virtual model further includes: determining a target geometric attribute of the second virtual model based on a second parameter, wherein the second parameter is used for performing geometric attribute control on the second virtual model; and adjusting the display form of the second virtual model according to the target geometric attributes.
Optionally, the second parameter comprises: range remapping parameters, the geometric properties of the second virtual model including: rotation properties, determining target geometric properties of the second virtual model based on the second parameters comprising: remapping the first value range to a second value range based on the range remapping parameter, wherein the first value range is a pre-input rotation range, and the second value range is a pre-set remapping range; and determining the rotation attribute through the second value range.
Optionally, the display modality includes: the rotating form, the adjusting the display form of the second virtual model according to the target geometric attributes comprises: and adjusting the rotation form in the second value range according to the rotation attribute.
Optionally, the second parameter comprises: range remapping parameters, the geometric properties of the second virtual model including: a scaling property, the determining the target geometric property of the second virtual model based on the second parameter comprising: remapping the initial control vector to the target control vector based on the second parameter, wherein the initial control vector is a scaling control vector input in advance, and the dimension of the initial control vector is used for determining the scaling dimension of the second virtual model, and the scaling dimension comprises at least one of the following: height scaling, length scaling and width scaling, wherein the value range of the target control vector is a preset remapping range; the scaling property is determined by the target control vector.
Optionally, the display modality includes: the zooming mode, the adjusting the display mode of the second virtual model according to the target geometric attribute comprises: and according to the scaling attribute, adjusting the scaling form under the control of the target control vector.
Optionally, the second parameter comprises: embedding strength parameters, the geometric properties of the second virtual model including: embedding properties, the determining the target geometric properties of the second virtual model based on the second parameters comprising: replacing the first position to a second position based on the embedding strength parameter, wherein the first position is a coordinate position before replacement corresponding to the second virtual model, and the second position is a coordinate position after replacement corresponding to the second virtual model; the embedded property is determined by the second location.
Optionally, the display modality includes: and the embedding form, adjusting the display form of the second virtual model according to the target geometric attributes comprises: and adjusting the embedding form through the second position according to the embedding attribute.
Optionally, the method for cloning a virtual model further includes: comparing the vertex color of each cloning point in the plurality of target cloning points with a preset threshold value to obtain a comparison result; deleting part of the clone points from the multiple target clone points by using the comparison result to obtain a deletion range; the third virtual model is adjusted to a fourth virtual model based on the deletion range.
Optionally, deleting some clone points from the plurality of target clone points by using the comparison result, and obtaining a deletion range includes: acquiring attribute identifications of partial clone points from a plurality of target clone points by using a comparison result; determining the point sequence number of the partial cloning points through the attribute identification of the partial cloning points; deleting partial cloning points from the plurality of target cloning points based on the point sequence numbers of the partial cloning points to obtain a deletion range.
Optionally, adjusting the third virtual model to the fourth virtual model based on the deletion range comprises: acquiring a part of virtual model corresponding to the deletion range from the third virtual model; and deleting the part of the virtual model to obtain a fourth virtual model.
Optionally, the method for cloning a virtual model further includes: and according to at least one model surface deletion strategy, performing surface number deletion of at least one detail size level on the third virtual model to obtain at least one fifth virtual model, wherein the at least one model surface deletion strategy is determined by multi-level detail parameters corresponding to the third virtual model.
Optionally, the method for cloning a virtual model further includes: and carrying out plane expansion arrangement on the third virtual model to obtain a target illumination map.
Optionally, the method for cloning a virtual model further includes: and packaging the third virtual model to obtain the target digital asset, and determining a third parameter corresponding to the third virtual model, wherein the third parameter is used for debugging the target digital asset in the target software interface.
Acquiring a first virtual model and a second virtual model, wherein the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model; selecting a cloning range on the first virtual model, wherein the cloning range is used for determining a placing area of the second virtual model on the surface of the first virtual model; and cloning the second virtual model to the first virtual model based on the cloning range to obtain a third virtual model, wherein the third virtual model is a virtual combined model of the second virtual model and the first virtual model.
The second virtual model is cloned to the first virtual model through the cloning range selected from the first virtual model, so that the purpose of automatically and randomly placing the virtual detail model on the virtual main body model is achieved, the technical effect of reducing the design labor cost and difficulty of the virtual model containing more details is achieved, and the technical problems that in the related art, the operation cost is high, the design effect is poor and the iteration modification difficulty is high due to the method for manually designing and randomly placing the virtual detail model manually in the related art are solved.
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.
Fig. 12 is a block diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 12, the electronic device 120 may include: a processor 122 (the processor 122 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 124 for storing data, and a transmission device 126 for communication functions.
The electronic device 120 may further include: a display, a keyboard, a cursor control device (e.g., a mouse), an input/output interface (I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 12 is only an illustration and is not intended to limit the structure of the electronic device. For example, electronic device 120 may also include more or fewer components than shown in FIG. 12, or have a different configuration than shown in FIG. 12. The memory 124 may be used for storing computer programs and corresponding data, such as computer programs and corresponding data corresponding to the method for cloning a virtual model in embodiments of the present invention. The processor 122 executes various functional applications and data processing, i.e., the method of cloning the virtual model described above, by executing computer programs stored in the memory 124.
Memory 124 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, memory 124 may further include memory located remotely from processor 122, which may be connected to electronic device 120 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 126 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the electronic device 120. In one example, the transmission device 126 includes a Network Interface Controller (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 126 can be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the electronic device 120.
Alternatively, in this embodiment, the processor 122 may be configured to execute the following steps by a computer program:
acquiring a first virtual model and a second virtual model, wherein the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model; selecting a cloning range on the first virtual model, wherein the cloning range is used for determining a placing area of the second virtual model on the surface of the first virtual model; and cloning the second virtual model to the first virtual model based on the cloning range to obtain a third virtual model, wherein the third virtual model is a virtual combined model of the second virtual model and the first virtual model.
Optionally, selecting the clone range on the first virtual model comprises: distributing a plurality of candidate clone points on the surface of the first virtual model; selecting a plurality of target clone points from the plurality of candidate clone points; the cloning range is determined by a plurality of cloning sites of interest.
Optionally, cloning the second virtual model to the first virtual model based on the cloning scope comprises: based on the cloning range, the second virtual model is cloned to a plurality of target cloning sites.
Optionally, distributing the plurality of candidate clone points over the surface of the first virtual model comprises: determining a target distribution density of a plurality of candidate clone points based on a first parameter, wherein the first parameter is used for density control of the plurality of candidate clone points; a plurality of candidate clone points are distributed on a surface of the first virtual model according to the target distribution density.
Optionally, the method for cloning a virtual model further includes: determining a target geometric attribute of the second virtual model based on a second parameter, wherein the second parameter is used for performing geometric attribute control on the second virtual model; and adjusting the display form of the second virtual model according to the target geometric attributes.
Optionally, the second parameter comprises: range remapping parameters, the geometric properties of the second virtual model including: rotation properties, determining target geometric properties of the second virtual model based on the second parameters comprising: remapping the first value range to a second value range based on the range remapping parameter, wherein the first value range is a pre-input rotation range, and the second value range is a pre-set remapping range; and determining the rotation attribute through the second value range.
Optionally, the display modality includes: the rotating form, the adjusting the display form of the second virtual model according to the target geometric attributes comprises: and adjusting the rotation form in the second value range according to the rotation attribute.
Optionally, the second parameter comprises: range remapping parameters, the geometric properties of the second virtual model including: a scaling property, the determining the target geometric property of the second virtual model based on the second parameter comprising: remapping the initial control vector to the target control vector based on the second parameter, wherein the initial control vector is a scaling control vector input in advance, and the dimension of the initial control vector is used for determining the scaling dimension of the second virtual model, and the scaling dimension comprises at least one of the following: height scaling, length scaling and width scaling, wherein the value range of the target control vector is a preset remapping range; the scaling property is determined by the target control vector.
Optionally, the display modality includes: the zooming mode, the adjusting the display mode of the second virtual model according to the target geometric attribute comprises: and according to the scaling attribute, adjusting the scaling form under the control of the target control vector.
Optionally, the second parameter comprises: embedding strength parameters, the geometric properties of the second virtual model including: embedding properties, the determining the target geometric properties of the second virtual model based on the second parameters comprising: replacing the first position to a second position based on the embedding strength parameter, wherein the first position is a coordinate position before replacement corresponding to the second virtual model, and the second position is a coordinate position after replacement corresponding to the second virtual model; the embedded property is determined by the second location.
Optionally, the display modality includes: and the embedding form, adjusting the display form of the second virtual model according to the target geometric attributes comprises: and adjusting the embedding form through the second position according to the embedding attribute.
Optionally, the method for cloning a virtual model further includes: comparing the vertex color of each cloning point in the plurality of target cloning points with a preset threshold value to obtain a comparison result; deleting part of the clone points from the multiple target clone points by using the comparison result to obtain a deletion range; the third virtual model is adjusted to a fourth virtual model based on the deletion range.
Optionally, deleting some clone points from the plurality of target clone points by using the comparison result, and obtaining a deletion range includes: acquiring attribute identifications of partial clone points from a plurality of target clone points by using a comparison result; determining the point sequence number of the partial cloning points through the attribute identification of the partial cloning points; deleting partial cloning points from the plurality of target cloning points based on the point sequence numbers of the partial cloning points to obtain a deletion range.
Optionally, adjusting the third virtual model to the fourth virtual model based on the deletion range comprises: acquiring a part of virtual model corresponding to the deletion range from the third virtual model; and deleting the part of the virtual model to obtain a fourth virtual model.
Optionally, the method for cloning a virtual model further includes: and according to at least one model surface deletion strategy, performing surface number deletion of at least one detail size level on the third virtual model to obtain at least one fifth virtual model, wherein the at least one model surface deletion strategy is determined by multi-level detail parameters corresponding to the third virtual model.
Optionally, the method for cloning a virtual model further includes: and carrying out plane expansion arrangement on the third virtual model to obtain a target illumination map.
Optionally, the method for cloning a virtual model further includes: and packaging the third virtual model to obtain the target digital asset, and determining a third parameter corresponding to the third virtual model, wherein the third parameter is used for debugging the target digital asset in the target software interface.
The second virtual model is cloned to the first virtual model through the cloning range selected from the first virtual model, so that the purpose of automatically and randomly placing the virtual detail model on the virtual main body model is achieved, the technical effect of reducing the design labor cost and difficulty of the virtual model containing more details is achieved, and the technical problems that in the related art, the operation cost is high, the design effect is poor and the iteration modification difficulty is high due to the method for manually designing and randomly placing the virtual detail model manually in the related art are solved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed technical contents can be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (20)

1. A method of cloning a virtual model, comprising:
acquiring a first virtual model and a second virtual model, wherein the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model;
selecting a clone range on the first virtual model, wherein the clone range is used for determining a placing area of the second virtual model on the surface of the first virtual model;
and cloning the second virtual model to the first virtual model based on the cloning range to obtain a third virtual model, wherein the third virtual model is a virtual combined model of the second virtual model and the first virtual model.
2. The method of claim 1, wherein selecting the clone range on the first virtual model comprises:
distributing a plurality of candidate clone points on a surface of the first virtual model;
selecting a plurality of target cloning points from the plurality of candidate cloning points;
determining the cloning range by the plurality of cloning sites of interest.
3. The method of claim 2, wherein cloning the second virtual model to the first virtual model based on the cloning scope comprises:
cloning the second virtual model to the plurality of target cloning sites based on the cloning range.
4. The method of claim 2, wherein distributing the plurality of candidate clone points across the surface of the first virtual model comprises:
determining a target distribution density of the plurality of candidate clone points based on a first parameter, wherein the first parameter is used for density control of the plurality of candidate clone points;
distributing the plurality of candidate clone points on the surface of the first virtual model according to the target distribution density.
5. The method of claim 1, further comprising:
determining a target geometric property of the second virtual model based on a second parameter, wherein the second parameter is used for geometric property control of the second virtual model;
and adjusting the display form of the second virtual model according to the target geometric attributes.
6. The method of claim 5, wherein the second parameter comprises: range remapping parameters, the geometric properties of the second virtual model including: a rotation property, the determining the target geometric property of the second virtual model based on the second parameter comprising:
remapping a first value range to a second value range based on the range remapping parameter, wherein the first value range is a pre-input rotation range, and the second value range is a pre-set remapping range;
and determining the rotation attribute through the second value range.
7. The method of claim 6, wherein the display modality comprises: a rotation modality, wherein adjusting the display modality of the second virtual model according to the target geometric attribute comprises:
and adjusting the rotation form in the second value range according to the rotation attribute.
8. The method of claim 5, wherein the second parameter comprises: range remapping parameters, the geometric properties of the second virtual model including: a scaling property, the determining the target geometric property of the second virtual model based on the second parameter comprising:
remapping an initial control vector to a target control vector based on the second parameter, wherein the initial control vector is a scaling control vector input in advance, and a dimension of the initial control vector is used for determining a scaling dimension of the second virtual model, and the scaling dimension includes at least one of: height scaling, length scaling and width scaling, wherein the value range of the target control vector is a preset remapping range;
determining the scaling attribute from the target control vector.
9. The method of claim 8, wherein the display modality comprises: a zoom configuration, wherein adjusting the display configuration of the second virtual model according to the target geometric property comprises:
and adjusting the zooming form under the control of the target control vector according to the zooming attribute.
10. The method of claim 5, wherein the second parameter comprises: embedding strength parameters, the geometric properties of the second virtual model including: embedded properties, the determining the target geometric properties of the second virtual model based on the second parameters comprising:
replacing a first position to a second position based on the embedding strength parameter, wherein the first position is a coordinate position before replacement corresponding to the second virtual model, and the second position is a coordinate position after replacement corresponding to the second virtual model;
determining the embedding attribute from the second location.
11. The method of claim 10, wherein the display modality comprises: an embedding modality, wherein adjusting the display modality of the second virtual model according to the target geometric attribute comprises:
and adjusting the embedding form through the second position according to the embedding attribute.
12. The method of claim 2, further comprising:
comparing the vertex color of each cloning point in the plurality of target cloning points with a preset threshold value to obtain a comparison result;
deleting part of the clone points from the plurality of target clone points by using the comparison result to obtain a deletion range;
adjusting the third virtual model to a fourth virtual model based on the deletion range.
13. The method of claim 12, wherein deleting the portion of the clone points from the plurality of target clone points using the comparison results, and wherein obtaining the deletion range comprises:
acquiring the attribute identifications of the partial clone points from the plurality of target clone points by using the comparison result;
determining the point sequence number of the partial cloning point through the attribute identification of the partial cloning point;
deleting the partial clone points from the plurality of target clone points based on the point sequence numbers of the partial clone points to obtain the deletion range.
14. The method of claim 12, wherein adjusting the third virtual model to the fourth virtual model based on the deletion range comprises:
acquiring a partial virtual model corresponding to the deletion range from the third virtual model;
and deleting the part of the virtual model to obtain the fourth virtual model.
15. The method of claim 1, further comprising:
and according to at least one model surface deletion strategy, performing surface number deletion on the third virtual model at least one detail size level to obtain at least one fifth virtual model, wherein the at least one model surface deletion strategy is determined by multi-level detail parameters corresponding to the third virtual model.
16. The method of claim 1, further comprising:
and performing plane expansion arrangement on the third virtual model to obtain a target illumination map.
17. The method of claim 1, further comprising:
and packaging the third virtual model to obtain a target digital asset, and determining a third parameter corresponding to the third virtual model, wherein the third parameter is used for debugging the target digital asset in a target software interface.
18. An apparatus for cloning a virtual model, comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a first virtual model and a second virtual model, the first virtual model is a virtual subject model to be used in a game scene, and the second virtual model is a virtual detail model to be placed on the surface of the virtual subject model;
a selecting module, configured to select a clone range on the first virtual model, where the clone range is used to determine a placement area of the second virtual model on a surface of the first virtual model;
and the cloning module is used for cloning the second virtual model to the first virtual model based on the cloning range to obtain a third virtual model, wherein the third virtual model is a virtual combination model of the second virtual model and the first virtual model.
19. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to perform a method of cloning a virtual model as claimed in any one of claims 1 to 17 when executed.
20. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the method of cloning a virtual model as claimed in any one of claims 1 to 17.
CN202210536547.8A 2022-05-17 2022-05-17 Method, device, storage medium and electronic device for cloning virtual model Pending CN114816457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210536547.8A CN114816457A (en) 2022-05-17 2022-05-17 Method, device, storage medium and electronic device for cloning virtual model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210536547.8A CN114816457A (en) 2022-05-17 2022-05-17 Method, device, storage medium and electronic device for cloning virtual model

Publications (1)

Publication Number Publication Date
CN114816457A true CN114816457A (en) 2022-07-29

Family

ID=82514596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210536547.8A Pending CN114816457A (en) 2022-05-17 2022-05-17 Method, device, storage medium and electronic device for cloning virtual model

Country Status (1)

Country Link
CN (1) CN114816457A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883564A (en) * 2023-02-21 2023-03-31 青岛创新奇智科技集团股份有限公司 Media stream processing method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883564A (en) * 2023-02-21 2023-03-31 青岛创新奇智科技集团股份有限公司 Media stream processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP2023171435A (en) Device and method for generating dynamic virtual content in mixed reality
CN111450529B (en) Game map acquisition method and device, storage medium and electronic device
US10762682B2 (en) Skinning weights and underlying object suppression of three-dimensional images
CN115375822A (en) Cloud model rendering method and device, storage medium and electronic device
RU2680355C1 (en) Method and system of removing invisible surfaces of a three-dimensional scene
CN113318428A (en) Game display control method, non-volatile storage medium, and electronic device
CN114816457A (en) Method, device, storage medium and electronic device for cloning virtual model
US20190147626A1 (en) Systems and methods for encoding features of a three-dimensional virtual object using one file format
US11625900B2 (en) Broker for instancing
US20230377268A1 (en) Method and apparatus for multiple dimension image creation
US11908073B2 (en) Methods and systems for dynamically rendering three-dimensional models in real-time to generate a non-fungible token and a physical model thereof without provisioning or managing servers
CN113706675B (en) Mirror image processing method, mirror image processing device, storage medium and electronic device
CN115115814A (en) Information processing method, information processing apparatus, readable storage medium, and electronic apparatus
CN114742970A (en) Processing method of virtual three-dimensional model, nonvolatile storage medium and electronic device
CN115120980A (en) Game scene generation method and device, storage medium and electronic device
CN115131489A (en) Cloud layer rendering method and device, storage medium and electronic device
CN114299203A (en) Processing method and device of virtual model
CN114820895A (en) Animation data processing method, device, equipment and system
US7256800B2 (en) Vertex interaction
Gil et al. A Shader-Based Architecture for Virtual Reality Applications on Mobile Devices
CN115120972A (en) Target fluid rendering method and device, storage medium and electronic device
US9569875B1 (en) Ordered list management
CN116310039A (en) Model rendering method and device and electronic device
WO2024093609A1 (en) Superimposed light occlusion rendering method and apparatus, and related product
Xu et al. Research on the Digital Promotion and Development of the Achang Forging Skills in Yunnan

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