CN113362435A - Virtual component changing method, device, equipment and medium of virtual object model - Google Patents

Virtual component changing method, device, equipment and medium of virtual object model Download PDF

Info

Publication number
CN113362435A
CN113362435A CN202110668581.6A CN202110668581A CN113362435A CN 113362435 A CN113362435 A CN 113362435A CN 202110668581 A CN202110668581 A CN 202110668581A CN 113362435 A CN113362435 A CN 113362435A
Authority
CN
China
Prior art keywords
model
virtual object
virtual
mesh
transformed
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.)
Granted
Application number
CN202110668581.6A
Other languages
Chinese (zh)
Other versions
CN113362435B (en
Inventor
谢乃闻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110668581.6A priority Critical patent/CN113362435B/en
Publication of CN113362435A publication Critical patent/CN113362435A/en
Application granted granted Critical
Publication of CN113362435B publication Critical patent/CN113362435B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses a virtual component changing method, a virtual component changing device, virtual component changing equipment and a virtual component changing medium of a virtual object model. The method comprises the following steps: determining a virtual object model and a virtual component model arranged on the virtual object model; obtaining model transformation parameters of the virtual object model; controlling the model mesh of the virtual object model to be transformed from a first position to a second position according to the model transformation parameters of the virtual object model; determining position transformation parameters of the model mesh vertexes of the virtual component model according to the second position and the corresponding relation between the model mesh vertexes of the virtual component model and the model mesh of the virtual object model; and controlling the rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.

Description

Virtual component changing method, device, equipment and medium of virtual object model
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for changing a virtual component of a virtual object model.
Background
In games, the animation associated with the virtual object model is an important component of the reality of the game, and is usually produced in an art production tool by an art worker, and is represented in a game engine in the form of skeleton animation or blendshape, and is used as an art asset after production for running the game. When the related animation of the virtual object model is completed, if the related animation of the virtual object model changes, some virtual components connected with the related animation on the virtual object model also need to change and move together with the attached related animation, such as a woundplast attached to the face, a beard and the like. If the related animation which is already produced is reintroduced into the art production tool to produce the virtual parts with the connection again, the production cost is high, a great deal of effort of related technicians is consumed for correspondingly adjusting the virtual parts when the related animation changes, and some virtual parts are dynamically added, so that the dynamic loading condition of the parts is difficult to reflect in the art production tool.
Disclosure of Invention
The embodiment of the application provides a virtual component changing method, a virtual component changing device and a virtual component changing medium for a virtual object model, so that a virtual component is changed along with the change of the virtual object model, and manufacturing cost and energy of related technicians are reduced.
The embodiment of the application provides a virtual component change method of a virtual object model, which comprises the following steps:
determining a virtual object model and a virtual component model arranged on the virtual object model;
obtaining model transformation parameters of the virtual object model;
controlling the model mesh of the virtual object model to be transformed from a first position to a second position according to the model transformation parameters of the virtual object model;
determining position transformation parameters of model mesh vertexes of the virtual component model according to the second position and the corresponding relation between the model mesh vertexes of the virtual component model and the model mesh of the virtual object model;
and controlling the rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.
Correspondingly, an embodiment of the present application further provides a virtual component changing apparatus for a virtual object model, including:
a model acquisition unit configured to determine a virtual object model and a virtual component model provided on the virtual object model;
a first parameter obtaining unit configured to obtain a model transformation parameter of the virtual object model;
a control unit for controlling the model mesh of the virtual object model to be transformed from a first position to a second position according to model transformation parameters of the virtual object model;
a second parameter obtaining unit, configured to determine a position transformation parameter of a model mesh vertex of the virtual component model according to the second position and a corresponding relationship between a model mesh vertex of the virtual component model and a relative position of a model mesh of the virtual object model;
and the rendering unit is used for controlling the rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.
Optionally, the second parameter obtaining unit is further configured to:
obtaining the position of the model mesh of the transformed virtual object model according to the second position;
obtaining model mesh vertexes of the virtual component model and the corresponding relation of the relative positions of the model meshes of the virtual object model;
determining the position of a transformed associated graph related to the model mesh vertex of the transformed virtual component model according to the position of the model mesh of the transformed virtual object model and the corresponding relation of the relative position;
and determining position transformation parameters of model mesh vertexes of the transformed virtual component model according to the corresponding relation between the positions of the transformed associated graphs and the relative positions.
Optionally, the second parameter obtaining unit is further configured to:
acquiring an initial association graph related to a model mesh vertex of the virtual component model in a model mesh of the virtual object model;
acquiring the corresponding relation between the model mesh vertex of the virtual component model and the initial associated graph, and the projection parameters generated in the corresponding initial associated graph by projecting the model mesh vertex of the virtual component model;
and taking the corresponding relation and the projection parameters as the corresponding relation of the relative position.
Optionally, the second parameter obtaining unit is further configured to:
obtaining a vertex which is closest to a model mesh vertex of the virtual component model from model mesh vertices included in the model mesh of the virtual object model, and taking the vertex as a related vertex;
obtaining a model mesh taking the associated vertex as a vertex from the model mesh of the virtual object model as a candidate associated graph;
obtaining candidate projection points of model mesh vertexes of the virtual component model projected to each candidate associated graph;
and in each candidate projection point, obtaining a candidate projection point closest to the associated vertex as a target projection point, and obtaining a candidate associated graph where the target projection point is located as the initial associated graph.
Optionally, the second parameter obtaining unit is further configured to:
acquiring a first identifier of a model mesh vertex of the virtual component model and a second identifier of the initial associated graph;
acquiring the corresponding relation between the first identifier and the second identifier, and taking the corresponding relation as the corresponding relation between the model grid vertex of the virtual component model and the initial associated graph;
determining a model mesh vertex of the virtual component model, and acquiring a relative position relation between a target projection point and an initial associated graph to which the target projection point belongs in the corresponding initial associated graph;
acquiring a model mesh vertex of the virtual component model, and projecting a first projection distance generated in a corresponding initial association graph;
and taking the relative position relation and the first projection distance as the projection parameters.
Optionally, the second parameter obtaining unit is further configured to:
acquiring a first identifier of a model mesh vertex of the virtual component model;
acquiring a second identifier corresponding to the first identifier based on the corresponding relation between the model grid vertex of the virtual component model and the initial associated graph in the corresponding relation of the relative orientation;
and obtaining the model mesh corresponding to the second identifier in the model mesh of the transformed virtual object model, wherein the model mesh is used as the transformed associated graph, and the position of the transformed associated graph is obtained.
Optionally, the second parameter obtaining unit is further configured to:
acquiring the relative position relation between the target projection point and the initial associated graph according to the relative position corresponding relation;
in the converted associated graph, acquiring a third position parameter of the converted target projection point according to the relative position relation;
acquiring a model mesh vertex of the virtual component model according to the corresponding relation of the relative positions, and projecting a first projection distance generated in a corresponding initial associated graph;
projecting the first projection distance as a model mesh vertex of the transformed virtual component model to a second projection distance generated in the transformed association graph;
and determining the position transformation parameters of the model mesh vertexes of the transformed virtual component model based on the third position parameters and the second projection distance.
Optionally, the rendering unit is further configured to:
generating model mesh vertexes of the transformed virtual component model on the transformed virtual object model according to the position transformation parameters;
and connecting model mesh vertexes of the transformed virtual component model, and rendering the transformed virtual component model in the transformed virtual object model.
Optionally, the first parameter obtaining unit is further configured to:
acquiring a first position parameter of a model mesh vertex included in the virtual object model;
acquiring a transformed virtual object model according to the first position parameter, wherein the transformed virtual object model comprises a second position parameter of a model mesh vertex;
and taking the first position parameter and the second position parameter as the model transformation parameters.
Optionally, the control unit is further configured to:
determining model mesh vertexes included in the virtual object model according to the first position parameter;
connecting model mesh vertexes included in the virtual object model, and determining the first position of the virtual object model;
determining model mesh vertexes included in the transformed virtual object model according to the second position parameter;
connecting model mesh vertices included in the transformed virtual object model, and determining the second position of the transformed virtual object model;
controlling a transformation of a model mesh of the virtual object model from the first location to the second location.
Similarly, an embodiment of the present application further provides a computer device, including:
a memory for storing a computer program;
a processor for performing any of the steps of changing the virtual components of the virtual object model.
Furthermore, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of any one of the virtual component change methods of the virtual object model.
The embodiment of the application provides a virtual part changing method, a device, equipment and a medium of a virtual object model, according to the corresponding relation between model mesh vertexes of the virtual part model and the relative position of a model mesh in the virtual object model, the binding of each model mesh vertex of the virtual part model and the corresponding model mesh in the virtual object model is realized, when the model mesh of the virtual object model is changed, each model mesh vertex of the virtual part can change along with the bound model mesh, when the model transformation parameter of the virtual object model is obtained, the position transformation parameter of the model mesh vertex of the transformed virtual part model can be obtained, the virtual part can change along with the change of the virtual object model, the formed transformed virtual object model is prevented from being reintroduced into an art manufacturing tool, and the virtual part connected with the virtual part is manufactured again, the manufacturing cost and the energy of related technicians are reduced, and the situation that the virtual part is difficult to load in the art manufacturing tool is avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a system diagram of a virtual component changing apparatus of a virtual object model provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a virtual component change method of a virtual object model according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an initial association graph determining method provided in an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a method for determining model mesh vertices of a transformed virtual component model according to an embodiment of the present application;
fig. 5 is another schematic flowchart of a virtual component changing method of a virtual object model according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a virtual component changing apparatus of a virtual object model according to an embodiment of the present application
Fig. 7 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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.
The embodiment of the application provides a virtual component changing method, a virtual component changing device, virtual component changing equipment and a virtual component changing medium of a virtual object model. Specifically, the virtual component changing method of the virtual object model according to the embodiment of the present application may be executed by a computer device, where the computer device may be a terminal or a server. The terminal may be a terminal device such as a smart phone, a tablet Computer, a notebook Computer, a touch screen, a game machine, a Personal Computer (PC), a Personal Digital Assistant (PDA), and the like, and may further include a client, which may be a game application client, a browser client carrying a game program, or an instant messaging client, and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content distribution network service, big data and an artificial intelligence platform.
For example, when the virtual component change method of the virtual object model is run on a terminal, the terminal device stores a game application and is used to present a scene in a game screen and a virtual object model existing in the game scene. The terminal device is used for interacting with a user through a graphical user interface, for example, downloading and installing a game application program and running through the terminal device, and displaying the graphical user interface. The manner in which the terminal device provides the graphical user interface to the user may include a variety of ways, for example, the graphical user interface may be rendered for display on a display screen of the terminal device or presented by holographic projection. For example, the terminal device may include a touch display screen for presenting a graphical user interface including a game screen and receiving operation instructions generated by a user acting on the graphical user interface, and a processor for executing the game application, generating the graphical user interface, responding to the operation instructions, and controlling display of the graphical user interface on the touch display screen.
For example, when the virtual component change method of the virtual object model is run on a server, it may be a cloud game. Cloud gaming refers to a gaming regime based on cloud computing. In the running mode of the cloud game, the running body of the game application program and the game picture presenting body are separated, and the virtual component changing method of the virtual object model is completed on the cloud game server. The game screen presentation is performed at a cloud game client, which is mainly used for receiving and sending game data and presenting the game screen, for example, the cloud game client may be a display device with a data transmission function near a user side, such as a mobile terminal, a television, a computer, a palm computer, a personal digital assistant, and the like, but a terminal device for performing game data processing is a cloud game server at the cloud end. When a game is played, a user operates the cloud game client to send an operation instruction to the cloud game server, the cloud game server runs a game program according to the operation instruction, data such as a game picture and the like are coded and compressed, the data are returned to the cloud game client through a network, and finally the data are decoded through the cloud game client and the game picture is output.
Referring to fig. 1, fig. 1 is a system schematic diagram of a virtual component changing apparatus of a virtual object model according to an embodiment of the present disclosure. The system may include at least one terminal device and at least one game server. The terminal held by the user can be connected to the game server of a different game via a network. When the system includes a plurality of terminals, a plurality of game servers, and a plurality of networks, different terminals may be connected to each other through different networks and through different game servers. For example, the network may be a wireless network, which may be a Wireless Local Area Network (WLAN), a Local Area Network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, or the like, or a wired network. In addition, different terminals can also be connected to other terminals or a game server by using the own Bluetooth network or a hotspot network.
The embodiment of the application provides a virtual component change method of a virtual object model, which can be executed by a terminal or a server. The embodiment of the application is described by being executed by a terminal, wherein the terminal is used for determining a virtual object model and a virtual component model arranged on the virtual object model; obtaining model transformation parameters of the virtual object model; controlling the model mesh of the virtual object model to be transformed from a first position to a second position according to the model transformation parameters of the virtual object model; determining position transformation parameters of the model mesh vertexes of the virtual component model according to the second position and the corresponding relation between the model mesh vertexes of the virtual component model and the model mesh of the virtual object model; and controlling the rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment will be described from the perspective of a virtual component changing apparatus of a virtual object model, which may be specifically integrated in a terminal device, where the terminal device may include a smart phone, a notebook computer, a tablet computer, a personal computer, and other devices.
The method for changing a virtual component of a virtual object model provided in the embodiment of the present application may be executed by a processor of a terminal, as shown in fig. 2, a specific flow of the method for changing a virtual component of a virtual object model mainly includes steps 201 to 205, which are described in detail as follows:
step 201, determining a virtual object model and a virtual component model arranged on the virtual object model.
In this embodiment of the application, the virtual object model may be a three-dimensional virtual object appearing in a game scene, for example, a virtual character model, a virtual prop model, a virtual building model, and the like. The virtual object model may be composed of a plurality of model meshes, and the plurality of model meshes connected to form the virtual object model may be triangular meshes, quadrangular meshes, or the like. Taking a triangular mesh as an example, the vertices of a plurality of triangular meshes are attached and bound to a bone model of the virtual object to form an external contour of the virtual object, and the vertices of each triangular mesh can be controlled by a plurality of bones and thus change along with the change of the bones.
In the embodiment of the present application, in order to make the virtual object more realistic, enrich the external features of different virtual objects, and meet the visual characteristics of the virtual object in different game scenes, at least one virtual component model may be disposed on the virtual object model, for example, the virtual component model may be an attachment of the virtual object, i.e., a wound dressing attached to the face of the virtual character, an eye contour of the virtual character (i.e., a transition treatment between an eyeball and a skin of the virtual character), or a personalized component of the virtual object, i.e., hair, beard, eyelashes, and the like. The model mesh connected to form the virtual part model may be a triangular mesh, a quadrangular mesh, or the like, and the model mesh connected to form the virtual part model may be the same as or different from the model mesh connected to form the virtual object model.
In the embodiment of the present application, in order to form virtual object models in different game scenes, virtual object models before and after transformation may be formed in an art production tool (e.g., 3Dmax, Maya) in advance, and may be represented in a game engine in the form of a skeletal animation or a blendshape.
In the embodiment of the present application, the virtual part model may be set on the virtual object model by a painting manufacturer when the virtual object model is created, or may be set on the virtual object model by a player who acquires the virtual part model for a reason such as completing a mission during a game.
Step 202, obtaining model transformation parameters of the virtual object model.
In this embodiment of the present application, the model transformation parameters may be position parameters of the virtual object model before and after transformation, that is, "obtaining the model transformation parameters of the virtual object model" in step 202 may be: acquiring a first position parameter of a model mesh vertex included in a virtual object model; acquiring a transformed virtual object model according to the first position parameter, wherein the transformed virtual object model comprises a second position parameter of a model mesh vertex; and taking the first position parameter and the second position parameter as model transformation parameters.
In this embodiment, a coordinate system may be created for the virtual object model, the first location parameter may be a coordinate value of a vertex of the model mesh included in the virtual object model in the coordinate system, and the second location parameter may be a coordinate value of a vertex of the model mesh included in the transformed virtual object model in the coordinate system. If the virtual object model is expressed in the game engine in the form of skeleton animation, the model mesh vertex of the virtual object model is connected with the skeleton joint point of the virtual object in a hanging mode, when the virtual object model is changed, the model mesh vertex of the virtual object model moves along with the connected skeleton joint point, namely the first position parameter changes, and finally the second position parameter is formed.
And step 203, controlling the model mesh of the virtual object model to be transformed from the first position to the second position according to the model transformation parameters of the virtual object model.
In the embodiment of the present application, after the model transformation parameters of the virtual object model are obtained, the step 203 of "controlling the model mesh of the virtual object model to be transformed from the first position to the second position according to the model transformation parameters of the virtual object model" may be: determining model mesh vertexes included by the virtual object model according to the first position parameter; connecting model mesh vertexes included in the virtual object model, and determining a first position of the virtual object model; determining model mesh vertexes included in the transformed virtual object model according to the second position parameter; connecting model mesh vertexes included in the transformed virtual object model, and determining a second position of the transformed virtual object model; the model mesh controlling the virtual object model is transformed from a first position to a second position.
And 204, determining position transformation parameters of the model mesh vertexes of the virtual component model according to the second position and the corresponding relation of the relative positions of the model mesh vertexes of the virtual component model and the model mesh of the virtual object model.
In this embodiment of the application, the step 204 of determining the position transformation parameter of the model mesh vertex of the virtual component model according to the second position and the corresponding relationship between the model mesh vertex of the virtual component model and the model mesh of the virtual object model may specifically be: obtaining the position of the model mesh of the transformed virtual object model according to the second position; acquiring a relative position corresponding relation between a model mesh vertex of the virtual component model and a model mesh of the virtual object model; determining the position of a transformed association graph related to the model mesh vertex of the transformed virtual component model according to the position of the model mesh of the transformed virtual object model and the corresponding relation of the relative position; and determining the position transformation parameters of the model mesh vertexes of the transformed virtual component model according to the corresponding relation between the positions and the relative orientations of the transformed associated graphs.
In this embodiment of the application, the second position is a position where the transformed virtual object model is located, so that a position where the model mesh of the transformed virtual object model is located can be obtained according to the second position.
In one embodiment of the present application, in order to obtain a relative orientation correspondence between model mesh vertices of the virtual component model after transformation and model meshes in the virtual object model when the virtual object model changes, a relative orientation correspondence between each model mesh vertex of the virtual component model and a model mesh in the virtual object model may be preset, and the relative orientation correspondence may be recorded in the game engine.
In the embodiment of the present application, the model mesh vertices of the virtual component model may be vertices forming an outer contour of the virtual component model, or may be vertices of all model meshes included in the virtual component model. When the model mesh vertices change, the shape of the virtual part model changes accordingly.
In this embodiment of the present application, the "obtaining a corresponding relationship between model mesh vertices of the virtual component model and relative orientations of the model meshes of the virtual object model" in the above steps may specifically be: acquiring an initial association graph related to a model mesh vertex of the virtual component model in a model mesh of the virtual object model; acquiring a corresponding relation between model mesh vertexes of the virtual component model and the initial associated graph, and projecting the model mesh vertexes of the virtual component model on projection parameters generated in the corresponding initial associated graph; and taking the corresponding relation and the projection parameters as a corresponding relation of relative orientation.
In some embodiments of the present application, in order to make model mesh vertices of the virtual component model vary with the variation of the model mesh of the virtual object model, a corresponding model mesh, i.e. an initial association graph, may be found in the model mesh of the virtual object model for each model mesh vertex of the virtual component model. The method comprises the steps of obtaining the corresponding relation of the model mesh vertexes of a virtual component model and the initial associated graphs, achieving the binding relation of each model mesh vertex of the virtual component model and the corresponding initial associated graph, and after the virtual object model is transformed, transforming the initial associated graphs along with the transformation of the virtual object model to form the transformed associated graphs, so that the transformed associated graphs corresponding to each model mesh vertex of the virtual component model can be obtained in the transformed virtual object model, and determining the positions of each model mesh vertex of the transformed virtual component model in the transformed virtual object model according to the transformed associated graphs having the binding relation with each model mesh vertex of the virtual component model, thereby forming the transformed virtual component model.
In one embodiment of the present application, in order to ensure that each model mesh vertex of the transformed virtual component model is at a unique position in the transformed virtual component model, each model mesh vertex of the virtual component model may be set to uniquely correspond to one initial associated graph in the virtual object model.
In this embodiment of the present application, in order to make the position change of the virtual component model in the virtual object before and after the change smoother and more reasonable, an initial association graph may be determined based on distance relationships between vertices of each model mesh of the virtual component model and the model mesh in the virtual object model, where the obtaining of the initial association graph related to the vertices of the model mesh of the virtual component model in the model mesh of the virtual object model may be:
obtaining a vertex which is closest to a model mesh vertex of the virtual component model from model mesh vertices included in the model mesh of the virtual object model, and taking the vertex as an associated vertex;
obtaining a model mesh taking an associated vertex as a vertex from the model mesh of the virtual object model as a candidate associated graph;
acquiring candidate projection points of model mesh vertexes of the virtual component model projected to each candidate associated graph;
and acquiring a candidate projection point with the closest distance to the associated vertex from the candidate projection points as a target projection point, and acquiring a candidate associated graph where the target projection point is positioned as an initial associated graph.
In one embodiment of the present application, the associated vertex may be a vertex that is closest to a model mesh vertex of the virtual part model on the surface of the virtual object model, i.e. the model mesh vertex of the virtual part model is closest to the associated vertex along the surface of the virtual object model.
In some embodiments of the present application, the associated vertex may also be the vertex that is the closest straight-line distance from a model mesh vertex of the virtual part model, i.e. the straight-line distance between the associated vertex and the model mesh vertex may be the distance formed by penetrating the virtual object model.
In this embodiment, the candidate associated graph may be a model mesh in which the associated vertex is any one of vertices in each direction of the virtual object model.
In an embodiment of the present application, the candidate projection point refers to a point at which each model mesh vertex is projected into the corresponding candidate associated graph, and if the candidate associated graph is small, the corresponding model mesh vertex can be projected into an extended region of the candidate associated graph, so as to form a target projection point in the extended region of the candidate associated graph.
In the embodiment of the present application, the target projection point may be a point closest to the associated vertex along the surface of the virtual object model, and the target projection point may also be a point closest to the associated vertex by a straight line distance.
For example, as shown in a schematic diagram of the initial association graph determining method shown in fig. 3, in the virtual object model before change, a vertex closest to a model mesh vertex V of the virtual component model is J, a model mesh 301, a model mesh 302, a model mesh 303, and a model mesh 304 with J as a vertex are obtained, the model mesh vertex V is projected onto the model mesh 301, the model mesh 302, the model mesh 303, and the model mesh 304, respectively, to obtain a target projection point P closest to the vertex J, and the model mesh 301 where the target projection point P is located is the initial association graph.
In this embodiment of the application, "obtaining a correspondence between a model mesh vertex of the virtual component model and the initial associated graph, and obtaining a projection parameter generated by projecting the model mesh vertex of the virtual component model onto the corresponding initial associated graph" may be:
acquiring a first identifier of a model mesh vertex of the virtual component model and a second identifier of the initial associated graph;
acquiring the corresponding relation between the first identifier and the second identifier as the corresponding relation between the vertex of the model mesh of the virtual component model and the initial associated graph;
determining a model mesh vertex of the virtual component model, and acquiring a relative position relation between a target projection point and an initial associated graph to which the target projection point belongs in the corresponding initial associated graph;
acquiring a model mesh vertex of the virtual component model, and projecting a first projection distance generated in the corresponding initial associated graph;
and taking the relative position relation and the first projection distance as projection parameters.
In the embodiment of the present application, the first identifier is a unique identifier for identifying each model mesh vertex of the virtual part model, for example, the model mesh vertices may be sequentially numbered according to the position distribution of the model mesh vertices on the virtual part model, and the number of each vertex may be the first identifier of each model mesh vertex.
In some embodiments of the present application, the second identifier is a unique identifier for identifying each initial associated graph, for example, each initial associated graph may be numbered in sequence according to a position relationship of the initial associated graph on the virtual object model, and a number corresponding to each initial associated graph may be used as the second identifier of each initial associated graph. It should be noted that, all model meshes on the virtual object model may be numbered, and the number of each initial associated graph is recorded as the second identifier, or only the initial associated graphs may be numbered to obtain the second identifier of each initial associated graph.
In an embodiment of the present application, different identifiers may be added to each model mesh vertex of the virtual component model as a first identifier, different identifiers may be added to each initial associated graph as a second identifier, and the identifier of the model mesh vertex of the virtual component model is the same as the identifier of its corresponding initial associated graph. Wherein, the different marks may be different colors, different shapes, etc. of the marks.
In an embodiment of the present application, the first projection distance may be a distance between a model mesh vertex of the virtual component model and the corresponding target projection point.
In the embodiment of the present application, when the virtual object model changes, the shape of the model mesh on the virtual object model may change, the position of the whole part or all of the model mesh may change, and the like, the relative position relationship between the model meshes does not change, and in the transformed virtual object model, the corresponding relationship between the model mesh vertices of the transformed virtual component model and the relative position of the transformed associated graph does not change, so that the transformed associated graph corresponding to the model mesh vertices of the transformed virtual component model may be obtained based on the preset relative position relationship. In step 203, determining the position of the transformed associated graph related to the model mesh vertex of the transformed virtual component model according to the position of the model mesh of the transformed virtual object model and the corresponding relationship between the relative orientations may be:
acquiring a first identifier of a model mesh vertex of a virtual component model;
acquiring a second identifier corresponding to the first identifier based on the corresponding relation between the model grid vertex of the virtual component model and the initial associated graph in the corresponding relation of the relative orientation;
and obtaining the model mesh corresponding to the second identifier in the model mesh of the transformed virtual object model as the transformed associated graph, and obtaining the position of the transformed associated graph.
In some embodiments of the present application, the first identifier of each model mesh vertex of the virtual component model does not change with the change of the shape or position of the virtual component model, and the second identifier of the model mesh of the virtual object model does not change with the change of the virtual object model, so that the second identifier corresponding to the first identifier of each model mesh vertex can be obtained according to the correspondence between the first identifier and the second identifier, and the model mesh corresponding to the second identifier in the transformed virtual object model is obtained, that is, the transformed associated graph is obtained, and thus the position where the transformed associated graph is located is obtained.
For example, taking the number of the model mesh vertex of the virtual component model as the first identifier and the number of the model mesh of the virtual object model as the second identifier, based on the correspondence, the number m corresponding to the model mesh vertex with the number n is obtained, and in the transformed virtual object model, the model mesh with the number m is obtained, that is, the transformed associated graph is obtained.
In the embodiment of the application, because each model mesh vertex of the virtual component model is bound with the corresponding initial associated graph, the model mesh vertex can change along with the change of the bound initial associated graph, and therefore, the corresponding relation between the position of the transformed associated graph and the relative position according to which the associated graph is bound is obtained, and the position transformation parameter of the model mesh vertex of the transformed virtual component model can be obtained. The step of determining the position transformation parameters of the model mesh vertices of the transformed virtual component model according to the corresponding relationship between the positions and the relative orientations of the transformed associated graphics may include:
obtaining the relative position relation between the target projection point and the initial associated graph according to the relative position corresponding relation;
in the converted associated graph, acquiring a third position parameter of the converted target projection point according to the relative position relation;
acquiring a model mesh vertex of the virtual component model according to the corresponding relation of the relative directions, and projecting a first projection distance generated in the corresponding initial associated graph;
projecting the first projection distance as a model mesh vertex of the transformed virtual component model to a second projection distance generated in the transformed association graph;
and determining the position transformation parameters of the model mesh vertexes of the transformed virtual component model based on the third position parameters and the second projection distance.
In the embodiment of the present application, since the target projection point is located in the initial associated graph, when the initial associated graph changes, the position of the target projection point included in the initial associated graph also changes, so that in the virtual object model before the change and the virtual object model after the transformation, the relative position of the target projection point and the model mesh to which the target projection point belongs does not change. And the projection distance between the model mesh vertex of the transformed virtual part model and the transformed target projection point is not changed, so that the position of the model mesh vertex of the virtual part model corresponding to the transformed target projection point can be obtained by back projection according to the position of the transformed target projection point, when the transformed associated graph corresponding to the model mesh vertex of the virtual part model is determined in the transformed virtual object model, the position of the target projection point in the transformed associated graph can be determined according to the relative position relationship, so that in the transformed virtual object model, a third position parameter of the transformed target projection point is obtained, and a second projection distance between the model mesh vertex of the transformed virtual part model and the transformed target win point is obtained according to the first projection distance between the model mesh vertex of the virtual part model and the target projection point, and further acquiring the position transformation parameters of the model mesh vertexes of the transformed virtual component model according to the third position parameters and the second projection distance. The third position parameter may be a position of the target projected point relative to the transformed virtual object model, for example, a coordinate system is set according to the virtual object model, and the third position parameter may be a coordinate parameter of the target projected point in the coordinate system.
In the embodiment of the present application, as shown in fig. 4, in the virtual object model before change, the model mesh vertex V of the virtual object model corresponds to the initial association graph 401, the target projection point of the model mesh vertex V in the initial association graph 401 is the point a, the projection distance is the length d of the line segment VA, when the virtual object model changes, in the virtual object model after change, the transformed association graph 402 corresponding to the model mesh vertex V after change is obtained based on the relative orientation correspondence, the relative position relationship of the target projection point a with respect to the initial association graph 401 is obtained, the target projection point B corresponding to the model mesh vertex V after change is obtained in the transformed association graph 402 according to the relative position relationship, the projection distance d of the model mesh vertex V before change projected to the target projection point a is obtained, and according to the target projection point B and the projection distance d, carrying out back projection to obtain a model mesh vertex V of the transformed virtual component model.
And step 205, controlling rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.
In this embodiment of the present application, in the step 205, "controlling rendering of the transformed virtual component model according to the position transformation parameter on the transformed virtual object model" may be:
generating a model mesh vertex of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter;
model mesh vertices of the transformed virtual component model are connected, and the transformed virtual component model is rendered in the transformed virtual object model.
In some embodiments of the present application, after obtaining the third position parameter of the transformed target projection point and the model mesh vertex of the transformed virtual component model and projecting the third position parameter and the model mesh vertex of the transformed virtual component model to the second projection distance generated by the transformed target projection point, the model mesh vertex of the transformed virtual component model may be obtained, and the position parameter in the transformed virtual object model, that is, the position of the transformed model mesh vertex may be determined in the transformed virtual model, so as to generate the transformed model mesh vertex correspondingly, and after generating each model mesh vertex, each model mesh vertex is connected, and the transformed virtual component model is rendered.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
The embodiment of the application provides a virtual part model change method of a virtual object model, which realizes the binding of each model mesh vertex of the virtual part model and a corresponding model mesh in the virtual object model according to the corresponding relation between the model mesh vertex of the virtual part model and the relative position of the model mesh in the virtual object model, when the model mesh of the virtual object model changes, each model mesh vertex of the virtual part can change along with the bound model mesh, when obtaining the model transformation parameter of the virtual object model, the position transformation parameter of the model mesh vertex of the transformed virtual part model can be obtained, the virtual part can change along with the change of the virtual object model, the formed transformed virtual object model is prevented from being reintroduced into an art manufacturing tool, and the virtual part connected with the virtual part is manufactured again, the manufacturing cost and the energy of related technicians are reduced, and the situation that the virtual part is difficult to load in the art manufacturing tool is avoided.
Referring to fig. 5, fig. 5 is another schematic flow chart of a virtual component model changing method of a virtual object model according to an embodiment of the present disclosure. The specific process of the method can be as follows:
and step 501, acquiring a virtual object model.
For example, the virtual object model includes a virtual object formed by connecting a plurality of model meshes, and at least one virtual component model is further provided on the virtual object model, and the virtual component model is formed by connecting a plurality of model meshes.
Step 502, obtaining the vertex forming the virtual part model outline from the vertex of the model mesh of the virtual object model as the target model mesh vertex.
For example, the target model mesh vertices of the virtual part model are vertices that form the outer contour of the virtual part model.
Step 503, obtaining an initial association graph related to the target model mesh vertex of the virtual component model in the model mesh included in the virtual object model.
For example, a vertex closest to a model mesh vertex of the virtual component model may be acquired as a related vertex from among model mesh vertices included in the model mesh of the virtual object model; obtaining a model mesh taking an associated vertex as a vertex from the model mesh of the virtual object model as a candidate associated graph; acquiring candidate projection points of model mesh vertexes of the virtual component model projected to each candidate associated graph; and acquiring a candidate projection point with the closest distance to the associated vertex from the candidate projection points as a target projection point, and acquiring a candidate associated graph where the target projection point is positioned as an initial associated graph.
Step 504, obtaining a relative position corresponding relation between model mesh vertexes of the virtual component model and the initial associated graph.
For example, acquiring a corresponding relation between model mesh vertices of the virtual component model and the initial associated graph, and projecting the model mesh vertices of the virtual component model on projection parameters generated in the corresponding initial associated graph; and taking the corresponding relation and the projection parameters as a corresponding relation of relative orientation.
And 505, determining the position of the transformed associated graph related to the model mesh vertex of the transformed virtual component model according to the position of the model mesh of the transformed virtual object model and the corresponding relation of the relative position.
For example, a first identification of a model mesh vertex of the virtual part model is obtained; acquiring a second identifier corresponding to the first identifier based on the corresponding relation between the model grid vertex of the virtual component model and the initial associated graph in the corresponding relation of the relative orientation; and obtaining the model mesh corresponding to the second identifier in the model mesh of the transformed virtual object model as the transformed associated graph, and obtaining the position of the transformed associated graph.
Step 506, determining position transformation parameters of model mesh vertexes of the transformed virtual component model according to the corresponding relation between the positions and the relative orientations of the transformed associated graphs.
For example, according to the corresponding relation of the relative position, the relative position relation between the target projection point and the initial associated graph is obtained; in the converted associated graph, acquiring a third position parameter of the converted target projection point according to the relative position relation; acquiring a model mesh vertex of the virtual component model according to the corresponding relation of the relative directions, and projecting a first projection distance generated in the corresponding initial associated graph; projecting the first projection distance as a model mesh vertex of the transformed virtual component model to a second projection distance generated in the transformed association graph; and determining the position transformation parameters of the model mesh vertexes of the transformed virtual component model based on the third position parameters and the second projection distance.
And step 507, controlling rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameters.
For example, generating model mesh vertices of the transformed virtual component model on the transformed virtual object model according to the position transformation parameters; model mesh vertices of the transformed virtual component model are connected, and the transformed virtual component model is rendered in the transformed virtual object model.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
The embodiment of the application provides a virtual part model change method of a virtual object model, which realizes the binding of each model mesh vertex of the virtual part model and a corresponding model mesh in the virtual object model according to the corresponding relation between the model mesh vertex of the virtual part model and the relative position of the model mesh in the virtual object model, when the model mesh of the virtual object model changes, each model mesh vertex of the virtual part can change along with the bound model mesh, when obtaining the model transformation parameter of the virtual object model, the position transformation parameter of the model mesh vertex of the transformed virtual part model can be obtained, the virtual part can change along with the change of the virtual object model, the formed transformed virtual object model is prevented from being reintroduced into an art manufacturing tool, and the virtual part connected with the virtual part is manufactured again, the manufacturing cost and the energy of related technicians are reduced, and the situation that the virtual part is difficult to load in the art manufacturing tool is avoided.
In order to better implement the virtual component model change method of the virtual object model according to the embodiments of the present application, the embodiments of the present application further provide a virtual component model change apparatus of the virtual object model. Referring to fig. 6, fig. 6 is a schematic structural diagram of a virtual component model changing apparatus of a virtual object model according to an embodiment of the present application. The virtual component model changing apparatus of the virtual object model may include a model acquisition unit 601, a first parameter acquisition unit 602, a control unit 603, a second parameter acquisition unit 604, and a rendering unit 605.
The model obtaining unit 601 is configured to determine a virtual object model and a virtual component model arranged on the virtual object model;
a first parameter obtaining unit 602, configured to obtain a model transformation parameter of a virtual object model;
a control unit 603 for controlling a model mesh of the virtual object model to be transformed from a first location to a second location in accordance with model transformation parameters of the virtual object model;
a second parameter obtaining unit 604, configured to determine a position transformation parameter of a model mesh vertex of the virtual component model according to the second position and a corresponding relationship between a model mesh vertex of the virtual component model and a model mesh of the virtual object model;
a rendering unit 605, configured to control rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.
Optionally, the second parameter obtaining unit 604 is further configured to:
obtaining the position of the model mesh of the transformed virtual object model according to the second position;
acquiring a relative position corresponding relation between a model mesh vertex of the virtual component model and a model mesh of the virtual object model;
determining the position of a transformed association graph related to the model mesh vertex of the transformed virtual component model according to the position of the model mesh of the transformed virtual object model and the corresponding relation of the relative position;
and determining the position transformation parameters of the model mesh vertexes of the transformed virtual component model according to the corresponding relation between the positions and the relative orientations of the transformed associated graphs.
Optionally, the second parameter obtaining unit 604 is further configured to:
acquiring an initial association graph related to a model mesh vertex of the virtual component model in a model mesh of the virtual object model;
acquiring a corresponding relation between model mesh vertexes of the virtual component model and the initial associated graph, and projecting the model mesh vertexes of the virtual component model on projection parameters generated in the corresponding initial associated graph;
and taking the corresponding relation and the projection parameters as a corresponding relation of relative orientation.
Optionally, the second parameter obtaining unit 604 is further configured to:
obtaining a vertex which is closest to a model mesh vertex of the virtual component model from model mesh vertices included in the model mesh of the virtual object model, and taking the vertex as an associated vertex;
obtaining a model mesh taking an associated vertex as a vertex from the model mesh of the virtual object model as a candidate associated graph;
acquiring candidate projection points of model mesh vertexes of the virtual component model projected to each candidate associated graph;
and acquiring a candidate projection point with the closest distance to the associated vertex from the candidate projection points as a target projection point, and acquiring a candidate associated graph where the target projection point is positioned as an initial associated graph.
Optionally, the second parameter obtaining unit 604 is further configured to:
acquiring a first identifier of a model mesh vertex of the virtual component model and a second identifier of the initial associated graph;
acquiring the corresponding relation between the first identifier and the second identifier as the corresponding relation between the vertex of the model mesh of the virtual component model and the initial associated graph;
determining a model mesh vertex of the virtual component model, and acquiring a relative position relation between a target projection point and an initial associated graph to which the target projection point belongs in the corresponding initial associated graph;
acquiring a model mesh vertex of the virtual component model, and projecting a first projection distance generated in the corresponding initial associated graph;
and taking the relative position relation and the first projection distance as projection parameters.
Optionally, the second parameter obtaining unit 604 is further configured to:
acquiring a first identifier of a model mesh vertex of a virtual component model;
acquiring a second identifier corresponding to the first identifier based on the corresponding relation between the model grid vertex of the virtual component model and the initial associated graph in the corresponding relation of the relative orientation;
and obtaining the model mesh corresponding to the second identifier in the model mesh of the transformed virtual object model as the transformed associated graph, and obtaining the position of the transformed associated graph.
Optionally, the second parameter obtaining unit 604 is further configured to:
obtaining the relative position relation between the target projection point and the initial associated graph according to the relative position corresponding relation;
in the converted associated graph, acquiring a third position parameter of the converted target projection point according to the relative position relation;
acquiring a model mesh vertex of the virtual component model according to the corresponding relation of the relative directions, and projecting a first projection distance generated in the corresponding initial associated graph;
projecting the first projection distance as a model mesh vertex of the transformed virtual component model to a second projection distance generated in the transformed association graph;
and determining the position transformation parameters of the model mesh vertexes of the transformed virtual component model based on the third position parameters and the second projection distance.
Optionally, the rendering unit 605 is further configured to:
generating a model mesh vertex of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter;
model mesh vertices of the transformed virtual component model are connected, and the transformed virtual component model is rendered in the transformed virtual object model.
Optionally, the first parameter obtaining unit 602 is further configured to:
acquiring a first position parameter of a model mesh vertex included in a virtual object model;
acquiring a transformed virtual object model according to the first position parameter, wherein the transformed virtual object model comprises a second position parameter of a model mesh vertex;
and taking the first position parameter and the second position parameter as model transformation parameters.
Optionally, the control unit 603 is further configured to:
determining model mesh vertexes included by the virtual object model according to the first position parameter;
connecting model mesh vertexes included in the virtual object model, and determining a first position of the virtual object model;
determining model mesh vertexes included in the transformed virtual object model according to the second position parameter;
connecting model mesh vertexes included in the transformed virtual object model, and determining a second position of the transformed virtual object model;
the model mesh controlling the virtual object model is transformed from a first position to a second position.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
The virtual component model changing apparatus of the virtual object model according to the embodiment of the present application determines the virtual object model and the virtual component model disposed on the virtual object model by the model obtaining unit 601, obtains the model transformation parameters of the virtual object model by the first parameter obtaining unit 602, controls the model mesh of the virtual object model to be transformed from the first position to the second position by the control unit 603 according to the model transformation parameters of the virtual object model, then determines the position transformation parameters of the model mesh vertices of the virtual component model according to the second position and the corresponding relationship between the model mesh vertices of the virtual component model and the model mesh of the virtual object model by the second parameter obtaining unit 604, and finally controls the rendering of the transformed virtual component model on the transformed virtual object model by the rendering unit 605 according to the position transformation parameters, the virtual part model is changed along with the change of the virtual object model, and the formed transformed virtual object model is prevented from being reintroduced into an art manufacturing tool, and the virtual part model connected with the formed transformed virtual object model is prevented from being manufactured again.
Correspondingly, the embodiment of the application also provides a computer device, which can be a terminal, and the terminal can be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game machine, a personal computer, a personal digital assistant and the like. As shown in fig. 7, fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer apparatus 700 includes a processor 701 having one or more processing cores, a memory 702 having one or more computer-readable storage media, and a computer program stored on the memory 702 and executable on the processor. The processor 701 is electrically connected to the memory 702. Those skilled in the art will appreciate that the computer device configurations illustrated in the figures are not meant to be limiting of computer devices and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The processor 701 is a control center of the computer device 700, connects various parts of the entire computer device 700 using various interfaces and lines, performs various functions of the computer device 700 and processes data by running or loading software programs and/or modules stored in the memory 702, and calling data stored in the memory 702, thereby monitoring the computer device 700 as a whole.
In the embodiment of the present application, the processor 701 in the computer device 700 loads instructions corresponding to processes of one or more application programs into the memory 702, and the processor 701 executes the application program stored in the memory 702, so as to implement various functions as follows:
determining a virtual object model and a virtual component model arranged on the virtual object model; obtaining model transformation parameters of the virtual object model; controlling the model mesh of the virtual object model to be transformed from a first position to a second position according to the model transformation parameters of the virtual object model; determining position transformation parameters of the model mesh vertexes of the virtual component model according to the second position and the corresponding relation between the model mesh vertexes of the virtual component model and the model mesh of the virtual object model; and controlling the rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Optionally, as shown in fig. 7, the computer device 700 further includes: a touch display screen 703, a radio frequency circuit 704, an audio circuit 705, an input unit 706, and a power supply 707. The processor 701 is electrically connected to the touch display screen 703, the radio frequency circuit 704, the audio circuit 705, the input unit 706, and the power source 707. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 7 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The touch display screen 703 may be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display screen 703 may include a display panel and a touch panel. The display panel may be used, among other things, to display information entered by or provided to a user and various graphical user interfaces of the computer device, which may be made up of graphics, text, icons, video, and any combination thereof. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations of a user on or near the touch panel (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus pen, and the like), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 701, and can receive and execute commands sent by the processor 701. The touch panel may cover the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel transmits the touch operation to the processor 701 to determine the type of the touch event, and then the processor 701 provides a corresponding visual output on the display panel according to the type of the touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 703 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two separate components to perform the input and output functions. That is, the touch display screen 703 can also be used as a part of the input unit 706 to implement an input function.
The radio frequency circuit 704 may be used for transceiving radio frequency signals to establish wireless communication with a network device or other computer device through wireless communication, and for transceiving signals with the network device or other computer device.
Audio circuitry 705 may be used to provide an audio interface between a user and a computer device through speakers and microphones. The audio circuit 705 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 705 and converted into audio data, which is then processed by the output processor 701 and transmitted to, for example, another computer device via the radio frequency circuit 704, or output to the memory 702 for further processing. The audio circuit 705 may also include an earbud jack to provide communication of a peripheral headset with the computer device.
The input unit 706 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 707 is used to power the various components of the computer device 700. Optionally, the power supply 707 may be logically connected to the processor 701 through a power management system, so as to implement functions of managing charging, discharging, power consumption management, and the like through the power management system. The power supply 707 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown in fig. 7, the computer device 700 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described in detail herein.
In the foregoing embodiments, 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.
As can be seen from the above, the computer device provided in this embodiment can bind each model mesh vertex of the virtual part model with the target projection point formed in the model mesh having the corresponding relationship according to the corresponding relationship between each model mesh vertex of the virtual part model set on the virtual object and the model mesh in the virtual object model, when the virtual object model changes, each model mesh vertex of the virtual part model changes with the bound target projection point, and when the change parameter of the target projection point is obtained, the first position parameter of the model mesh vertex of the virtual part model in the transformed virtual object model can be obtained, so that the virtual part model changes with the change of the virtual object model, and the formed transformed virtual object model is prevented from being reintroduced into the art manufacturing tool, and the virtual part model having the connection therewith is manufactured again, the manufacturing cost and the energy of related technicians are reduced, and the situation that the virtual part model is difficult to load in the art manufacturing tool is avoided.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer readable storage medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute the steps in any of the virtual component model changing methods of the virtual object model provided in the present application. For example, the computer program may perform the steps of:
determining a virtual object model and a virtual component model arranged on the virtual object model; obtaining model transformation parameters of the virtual object model; controlling the model mesh of the virtual object model to be transformed from a first position to a second position according to the model transformation parameters of the virtual object model; determining position transformation parameters of the model mesh vertexes of the virtual component model according to the second position and the corresponding relation between the model mesh vertexes of the virtual component model and the model mesh of the virtual object model; and controlling the rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in the method for changing the virtual component model of any virtual object model provided in the embodiment of the present application, the beneficial effects that can be achieved by the method for changing the virtual component model of any virtual object model provided in the embodiment of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
In the foregoing embodiments, 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.
The method, the apparatus, the device and the medium for changing the virtual component model of the virtual object model provided in the embodiment of the present application are described in detail, and a specific example is applied to illustrate the principle and the implementation manner of the present invention, and the description of the embodiment is only used to help understanding the technical scheme and the core idea of the present invention; those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (13)

1. A virtual component changing method for a virtual object model, comprising:
determining a virtual object model and a virtual component model arranged on the virtual object model;
obtaining model transformation parameters of the virtual object model;
controlling the model mesh of the virtual object model to be transformed from a first position to a second position according to the model transformation parameters of the virtual object model;
determining position transformation parameters of model mesh vertexes of the virtual component model according to the second position and the corresponding relation between the model mesh vertexes of the virtual component model and the model mesh of the virtual object model;
and controlling the rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.
2. The method of claim 1, wherein determining the position transformation parameters for the model mesh vertices of the virtual component model based on the second positions and the relative positional correspondence of the model mesh vertices of the virtual component model to the model mesh of the virtual object model comprises:
obtaining the position of the model mesh of the transformed virtual object model according to the second position;
obtaining model mesh vertexes of the virtual component model and the corresponding relation of the relative positions of the model meshes of the virtual object model;
determining the position of a transformed associated graph related to the model mesh vertex of the transformed virtual component model according to the position of the model mesh of the transformed virtual object model and the corresponding relation of the relative position;
and determining position transformation parameters of model mesh vertexes of the transformed virtual component model according to the corresponding relation between the positions of the transformed associated graphs and the relative positions.
3. The method of claim 2, wherein said obtaining model mesh vertices of the virtual component model corresponding to the relative orientations of the model mesh of the virtual object model comprises:
acquiring an initial association graph related to a model mesh vertex of the virtual component model in a model mesh of the virtual object model;
acquiring the corresponding relation between the model mesh vertex of the virtual component model and the initial associated graph, and the projection parameters generated in the corresponding initial associated graph by projecting the model mesh vertex of the virtual component model;
and taking the corresponding relation and the projection parameters as the corresponding relation of the relative position.
4. The method of claim 3, wherein obtaining an initial association graph associated with model mesh vertices of the virtual part model in the model mesh of the virtual object model comprises:
obtaining a vertex which is closest to a model mesh vertex of the virtual component model from model mesh vertices included in the model mesh of the virtual object model, and taking the vertex as a related vertex;
obtaining a model mesh taking the associated vertex as a vertex from the model mesh of the virtual object model as a candidate associated graph;
obtaining candidate projection points of model mesh vertexes of the virtual component model projected to each candidate associated graph;
and in each candidate projection point, obtaining a candidate projection point closest to the associated vertex as a target projection point, and obtaining a candidate associated graph where the target projection point is located as the initial associated graph.
5. The method according to claim 3, wherein the obtaining of the correspondence between the model mesh vertices of the virtual component model and the initial association graph and the projection parameters generated in the corresponding initial association graph by projecting the model mesh vertices of the virtual component model comprises:
acquiring a first identifier of a model mesh vertex of the virtual component model and a second identifier of the initial associated graph;
acquiring the corresponding relation between the first identifier and the second identifier, and taking the corresponding relation as the corresponding relation between the model grid vertex of the virtual component model and the initial associated graph;
determining a model mesh vertex of the virtual component model, and acquiring a relative position relation between a target projection point and an initial associated graph to which the target projection point belongs in the corresponding initial associated graph;
acquiring a model mesh vertex of the virtual component model, and projecting a first projection distance generated in a corresponding initial association graph;
and taking the relative position relation and the first projection distance as the projection parameters.
6. The method of claim 5, wherein determining the location of the transformed associated graph associated with the vertices of the model mesh of the transformed virtual part model according to the location of the model mesh of the transformed virtual object model and the relative orientation correspondence comprises:
acquiring a first identifier of a model mesh vertex of the virtual component model;
acquiring a second identifier corresponding to the first identifier based on the corresponding relation between the model grid vertex of the virtual component model and the initial associated graph in the corresponding relation of the relative orientation;
and obtaining the model mesh corresponding to the second identifier in the model mesh of the transformed virtual object model, wherein the model mesh is used as the transformed associated graph, and the position of the transformed associated graph is obtained.
7. The method according to claim 3, wherein the determining the position transformation parameters of the model mesh vertices of the transformed virtual component model according to the corresponding relationship between the position and the relative orientation of the transformed associated graph comprises:
acquiring the relative position relation between the target projection point and the initial associated graph according to the relative position corresponding relation;
in the converted associated graph, acquiring a third position parameter of the converted target projection point according to the relative position relation;
acquiring a model mesh vertex of the virtual component model according to the corresponding relation of the relative positions, and projecting a first projection distance generated in a corresponding initial associated graph;
projecting the first projection distance as a model mesh vertex of the transformed virtual component model to a second projection distance generated in the transformed association graph;
and determining the position transformation parameters of the model mesh vertexes of the transformed virtual component model based on the third position parameters and the second projection distance.
8. The method according to claim 1, wherein said controlling rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameters comprises:
generating model mesh vertexes of the transformed virtual component model on the transformed virtual object model according to the position transformation parameters;
and connecting model mesh vertexes of the transformed virtual component model, and rendering the transformed virtual component model in the transformed virtual object model.
9. The method of claim 1, wherein obtaining model transformation parameters for the virtual object model comprises:
acquiring a first position parameter of a model mesh vertex included in the virtual object model;
acquiring a transformed virtual object model according to the first position parameter, wherein the transformed virtual object model comprises a second position parameter of a model mesh vertex;
and taking the first position parameter and the second position parameter as the model transformation parameters.
10. The method of claim 9, wherein controlling the model mesh of the virtual object model to transform from a first location to a second location according to the model transformation parameters of the virtual object model comprises:
determining model mesh vertexes included in the virtual object model according to the first position parameter;
connecting model mesh vertexes included in the virtual object model, and determining the first position of the virtual object model;
determining model mesh vertexes included in the transformed virtual object model according to the second position parameter;
connecting model mesh vertices included in the transformed virtual object model, and determining the second position of the transformed virtual object model;
controlling a transformation of a model mesh of the virtual object model from the first location to the second location.
11. A virtual component changing apparatus for a virtual object model, comprising:
a model acquisition unit configured to determine a virtual object model and a virtual component model provided on the virtual object model;
a first parameter obtaining unit configured to obtain a model transformation parameter of the virtual object model;
a control unit for controlling the model mesh of the virtual object model to be transformed from a first position to a second position according to model transformation parameters of the virtual object model;
a second parameter obtaining unit, configured to determine a position transformation parameter of a model mesh vertex of the virtual component model according to the second position and a corresponding relationship between a model mesh vertex of the virtual component model and a relative position of a model mesh of the virtual object model;
and the rendering unit is used for controlling the rendering of the transformed virtual component model on the transformed virtual object model according to the position transformation parameter.
12. A computer device, comprising:
a memory for storing a computer program;
a processor for implementing the steps in the virtual component variation method of the virtual object model according to any one of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps in the virtual component variation method of the virtual object model according to any one of claims 1 to 10.
CN202110668581.6A 2021-06-16 2021-06-16 Virtual component change method, device, equipment and medium of virtual object model Active CN113362435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110668581.6A CN113362435B (en) 2021-06-16 2021-06-16 Virtual component change method, device, equipment and medium of virtual object model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110668581.6A CN113362435B (en) 2021-06-16 2021-06-16 Virtual component change method, device, equipment and medium of virtual object model

Publications (2)

Publication Number Publication Date
CN113362435A true CN113362435A (en) 2021-09-07
CN113362435B CN113362435B (en) 2023-08-08

Family

ID=77534483

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110668581.6A Active CN113362435B (en) 2021-06-16 2021-06-16 Virtual component change method, device, equipment and medium of virtual object model

Country Status (1)

Country Link
CN (1) CN113362435B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117258303A (en) * 2023-11-20 2023-12-22 腾讯科技(深圳)有限公司 Model comparison method and related device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780766A (en) * 2016-11-24 2017-05-31 腾讯科技(深圳)有限公司 Matching implementation method and relevant apparatus
US20190206145A1 (en) * 2016-11-24 2019-07-04 Tencent Technology (Shenzhen) Company Limited Image synthesis method, device and matching implementation method and device
US20200184714A1 (en) * 2017-08-18 2020-06-11 Tencent Technology (Shenzhen) Company Limited Method for renfering of simulating illumination and terminal
US20200312022A1 (en) * 2019-06-14 2020-10-01 Beijing Dajia Internet Information Technology Co., Ltd. Method and device for processing image, and storage medium
US20210043000A1 (en) * 2019-05-15 2021-02-11 Zhejiang Sensetime Technology Development Co., Ltd. Method, apparatus and device for processing deformation of virtual object, and storage medium
CN112370783A (en) * 2020-12-02 2021-02-19 网易(杭州)网络有限公司 Virtual object rendering method and device, computer equipment and storage medium
US20210158591A1 (en) * 2018-05-22 2021-05-27 Magic Leap, Inc. Computer generated hair groom transfer tool
CN112891954A (en) * 2021-02-02 2021-06-04 网易(杭州)网络有限公司 Virtual object simulation method and device, storage medium and computer equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780766A (en) * 2016-11-24 2017-05-31 腾讯科技(深圳)有限公司 Matching implementation method and relevant apparatus
US20190206145A1 (en) * 2016-11-24 2019-07-04 Tencent Technology (Shenzhen) Company Limited Image synthesis method, device and matching implementation method and device
US20200184714A1 (en) * 2017-08-18 2020-06-11 Tencent Technology (Shenzhen) Company Limited Method for renfering of simulating illumination and terminal
US20210158591A1 (en) * 2018-05-22 2021-05-27 Magic Leap, Inc. Computer generated hair groom transfer tool
US20210043000A1 (en) * 2019-05-15 2021-02-11 Zhejiang Sensetime Technology Development Co., Ltd. Method, apparatus and device for processing deformation of virtual object, and storage medium
US20200312022A1 (en) * 2019-06-14 2020-10-01 Beijing Dajia Internet Information Technology Co., Ltd. Method and device for processing image, and storage medium
CN112370783A (en) * 2020-12-02 2021-02-19 网易(杭州)网络有限公司 Virtual object rendering method and device, computer equipment and storage medium
CN112891954A (en) * 2021-02-02 2021-06-04 网易(杭州)网络有限公司 Virtual object simulation method and device, storage medium and computer equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
熊伟: "基于三维动画的虚拟人物表情动作系统设计", 《现代电子技术》 *
熊伟: "基于三维动画的虚拟人物表情动作系统设计", 《现代电子技术》, vol. 43, no. 20, 15 October 2020 (2020-10-15), pages 97 - 101 *
陶志良等: "拓扑结构可变的动态多细节层次模型", 《自动化学报》 *
陶志良等: "拓扑结构可变的动态多细节层次模型", 《自动化学报》, vol. 27, no. 02, 22 March 2001 (2001-03-22), pages 200 - 206 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117258303A (en) * 2023-11-20 2023-12-22 腾讯科技(深圳)有限公司 Model comparison method and related device
CN117258303B (en) * 2023-11-20 2024-03-12 腾讯科技(深圳)有限公司 Model comparison method and related device

Also Published As

Publication number Publication date
CN113362435B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN110136236B (en) Personalized face display method, device and equipment for three-dimensional character and storage medium
CN112233211A (en) Animation production method and device, storage medium and computer equipment
CN112802172A (en) Texture mapping method and device of three-dimensional model, storage medium and computer equipment
CN112206517B (en) Rendering method, rendering device, storage medium and computer equipment
CN114742925A (en) Covering method and device for virtual object, electronic equipment and storage medium
CN113426129B (en) Method, device, terminal and storage medium for adjusting appearance of custom roles
CN113362435B (en) Virtual component change method, device, equipment and medium of virtual object model
CN112891954B (en) Simulation method and device for virtual object, storage medium and computer equipment
CN113101666B (en) Game character model method, apparatus, computer device, and storage medium
CN114782605A (en) Rendering method and device of hair virtual model, computer equipment and storage medium
CN112206519B (en) Method, device, storage medium and computer equipment for realizing game scene environment change
CN113350792B (en) Contour processing method and device for virtual model, computer equipment and storage medium
CN117058284A (en) Image generation method, device and computer readable storage medium
CN115526967A (en) Animation generation method and device for virtual model, computer equipment and storage medium
CN115588065A (en) Method and device for generating hair model, computer equipment and storage medium
CN116212374A (en) Model processing method, device, computer equipment and storage medium
CN113345059B (en) Animation generation method and device, storage medium and electronic equipment
CN115272432A (en) Model information processing method, device, storage medium and computer equipment
CN115645921A (en) Game indicator generating method and device, computer equipment and storage medium
CN115631276A (en) Animation production method, animation production device, computer equipment and computer readable storage medium
CN115908643A (en) Storm special effect animation generation method and device, computer equipment and storage medium
CN115731339A (en) Virtual model rendering method and device, computer equipment and storage medium
CN115861519A (en) Rendering method and device of hair model, computer equipment and storage medium
CN115393495A (en) Texture processing method and device for virtual model, computer equipment and storage medium
CN116109729A (en) Curve processing method, curve processing device, computer equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant