CN115239890B - Skeleton construction method, skeleton construction device, storage medium and electronic equipment - Google Patents

Skeleton construction method, skeleton construction device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115239890B
CN115239890B CN202211139848.3A CN202211139848A CN115239890B CN 115239890 B CN115239890 B CN 115239890B CN 202211139848 A CN202211139848 A CN 202211139848A CN 115239890 B CN115239890 B CN 115239890B
Authority
CN
China
Prior art keywords
target
endpoint
model
determining
endpoints
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211139848.3A
Other languages
Chinese (zh)
Other versions
CN115239890A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211139848.3A priority Critical patent/CN115239890B/en
Publication of CN115239890A publication Critical patent/CN115239890A/en
Application granted granted Critical
Publication of CN115239890B publication Critical patent/CN115239890B/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
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30008Bone

Landscapes

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

Abstract

The application discloses a bone construction method, a bone construction device, a storage medium and an electronic device. Wherein, the method comprises the following steps: obtaining a target model of a bone to be bound; determining a central axis of the target model; acquiring a plurality of first target end points on a central axis, and determining target orientation data corresponding to each first target end point in the plurality of first target end points; under the condition that model data corresponding to the target model are obtained, determining a plurality of second target endpoints from the model data according to the target orientation data; the method comprises the steps of obtaining a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in a plurality of second target endpoints, building a target skeleton based on the first dynamic attribute and the second dynamic attribute, and being applied to an artificial intelligence scene and capable of relating to technologies such as image recognition, three-dimensional object reconstruction and the like. The technical problem that the skeleton building efficiency is low is solved.

Description

Skeleton construction method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computers, and in particular, to a bone construction method, apparatus, storage medium, and electronic device.
Background
In a 3D model building scenario, in a model making process for plant animation, setting up bones and assigning weights are generally performed manually by a person, but when a complex animation production requirement is faced, for example, when there are many leaves and petals of a plant model, the manual setting up of bones and the assignment of weights have a large workload and are difficult to modify, thereby causing a problem of low bone building efficiency. Therefore, there is a problem that the bone building efficiency is low.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a bone construction method, a bone construction device, a storage medium and electronic equipment, and aims to at least solve the technical problem of low bone construction efficiency.
According to an aspect of an embodiment of the present application, there is provided a bone construction method including: a bone construction method, comprising:
acquiring a target model of a bone to be bound, wherein the target model changes along with the change of the bone to which the target model is bound;
determining a central axis of the target model, wherein the central axis is a mark line corresponding to a trunk portion, and the trunk portion is a portion of the target model that guides a branch portion of the target model to change in an interlocking manner when the target model changes;
acquiring a plurality of first target end points on the central axis, and determining target orientation data corresponding to each first target end point in the plurality of first target end points;
under the condition that model data corresponding to the target model are obtained, determining a plurality of second target end points from the model data according to the target orientation data;
and acquiring a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints, and constructing a target skeleton based on the first dynamic attribute and the second dynamic attribute.
According to another aspect of embodiments of the present application, there is also provided a bone construction apparatus including:
the bone binding device comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining a target model of a bone to be bound, and the target model changes along with the change of the bone to which the target model is bound;
a first determining unit, configured to determine a central axis of the target model, where the central axis is a mark line corresponding to a trunk portion, and the trunk portion is a portion of the target model that guides a branch portion of the target model to change in an interlocking manner when the target model changes;
a second obtaining unit, configured to obtain a plurality of first target end points on the central axis, and determine target orientation data corresponding to each of the plurality of first target end points;
a second determining unit, configured to determine, when model data corresponding to the target model is obtained, a plurality of second target endpoints from the model data according to the target orientation data;
and the first building unit is used for acquiring a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints, and building a target skeleton based on the first dynamic attribute and the second dynamic attribute.
As an optional solution, the second determining unit includes:
a first building module, configured to build, according to the first orientation data, each side wing line where each first target endpoint is located when the target orientation data includes the first orientation data;
and the first determining module is used for determining the plurality of second target end points based on the wing points on the wing lines.
As an optional solution, the first determining module includes:
a first determining sub-module configured to, when the target orientation data includes second orientation data, specify, from the model data, target data to be successfully attached to the side wing points by attaching the model data to the side wing points indicated by the second orientation data;
and the second determining submodule is used for determining a plurality of data points corresponding to the target data as a plurality of second target end points.
As an alternative, the above-described device,
prior to said determining a central axis of said target model, said apparatus further comprising: a third obtaining unit, configured to obtain a top end point of the target model and a bottom end point of the target model;
the determining the central axis of the target model includes: a second determining module for determining the central axis based on the top end point and the bottom end point.
As an optional solution, the second obtaining unit includes:
a second obtaining module, configured to obtain the first target endpoints, where the first target endpoints include the top endpoint and the bottom endpoint;
a third determining module, configured to rank the plurality of first target endpoints according to a direction from the bottom endpoint to the top endpoint, and determine a ranking sequence of each first target endpoint;
and the first calculation module is used for calculating each first target endpoint based on the sequencing sequence to obtain the target orientation data.
As an optional solution, the first computing module includes:
the first acquisition submodule is used for acquiring a first target endpoint to be calculated;
a first calculating sub-module, configured to calculate a first orientation vector of the top endpoint with respect to a first endpoint when the first target endpoint to be calculated is the top endpoint, and determine the first orientation vector as target orientation data corresponding to the top endpoint, where the first endpoint is a first target endpoint of a previous sequence of the top endpoint among the plurality of first target endpoints; or, when the first target endpoint to be calculated is the bottom endpoint, calculating a second orientation vector of the bottom endpoint relative to a second endpoint, and determining the second orientation vector as the target orientation data corresponding to the bottom endpoint, wherein the second endpoint is a first target endpoint of a sequence following the bottom endpoint in the plurality of first target endpoints.
As an optional solution, the first computing module includes:
the second obtaining submodule is used for obtaining a first target endpoint to be calculated;
a second calculating sub-module, configured to calculate a third orientation vector of the first target endpoint to be calculated with respect to a third endpoint and a fourth orientation vector of the first target endpoint to be calculated with respect to a fourth endpoint, where the third endpoint is a first target endpoint in a sequence previous to the first target endpoint to be calculated, and the fourth endpoint is a first target endpoint in a sequence subsequent to the first target endpoint to be calculated, from the plurality of first target endpoints;
a third calculation submodule, configured to perform integrated calculation on the third orientation vector and the fourth orientation vector to obtain a target orientation vector;
and the third determining submodule is used for determining the target orientation vector as the target orientation data corresponding to the first target endpoint to be calculated.
As an optional aspect, before the obtaining the first dynamic attribute corresponding to each first target endpoint and the second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints, and building a target bone based on the first dynamic attribute and the second dynamic attribute, the apparatus further includes: a third obtaining unit, configured to obtain first target orientation data corresponding to each first target endpoint, where the first target orientation data includes the target orientation data; acquiring second target orientation data corresponding to each second target endpoint;
the obtaining of the first dynamic attributes corresponding to the first target end points and the second dynamic attributes corresponding to the second target end points of the second target end points and building a target skeleton based on the first dynamic attributes and the second dynamic attributes includes: a third obtaining module, configured to obtain the first dynamic attribute according to the first target orientation data, and obtain the second dynamic attribute according to the second target orientation data.
As an optional solution, the apparatus further includes: a fourth obtaining unit, configured to obtain a control weight of each vertex in the target model by the target skeleton after obtaining the first dynamic attribute corresponding to each first target endpoint and the second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints and building a target skeleton based on the first dynamic attribute and the second dynamic attribute, where each vertex corresponds to each first target endpoint and each second target endpoint;
and a first binding unit configured to bind the target skeleton and the target model after the first dynamic property corresponding to each first target endpoint and the second dynamic property corresponding to each second target endpoint among the plurality of second target endpoints are obtained and a target skeleton is built based on the first dynamic property and the second dynamic property, and to control each vertex based on the control weight so that the target model changes as the target skeleton changes when the target skeleton changes.
As an optional solution, the apparatus further includes: and a first integrating unit configured to, when the target bone is bound to the target model and the target bone is changed, control the vertices based on the control weights so that the target model changes as the target bone changes, and then, when the target model is a submodel of a target combination model and each submodel of the target combination model is bound to a bone, integrate the submodels to obtain a combination model bound to a bone.
As an optional solution, the apparatus further includes:
a third determining unit, configured to determine a central axis of the combined model after the sub-models are integrated to obtain the combined model bound to the bone;
a fourth determining unit, configured to, after the integration of the sub-models to obtain a combined model bound to a bone, obtain a plurality of first combined endpoints on a central axis of the target model, and determine combination orientation data corresponding to each of the first combined endpoints;
a fifth determining unit configured to determine, after the combination model bound to the bone is obtained by integrating the sub models, a plurality of second combination endpoints from the combination model data according to the combination orientation data when the combination model data corresponding to the combination model is obtained;
a first adjusting unit, configured to, after the integration of the sub-models to obtain a combined model bound to a bone, obtain a first combined dynamic property corresponding to each first combined endpoint and a second combined dynamic property corresponding to each second combined endpoint of the second combined endpoints, and adjust the bone bound to the combined model based on the first combined dynamic property and the second combined dynamic property.
According to yet another aspect of embodiments herein there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the bone construction method as above.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the bone construction method through the computer program.
In the embodiment of the application, a target model of a bone to be bound is obtained, wherein the target model changes along with the change of the bone to which the target model is bound; determining a central axis of the target model, wherein the central axis is a mark line corresponding to a trunk part, and the trunk part is a part of the target model, which guides a branch part of the target model to change in an interlocking manner when the target model changes; acquiring a plurality of first target end points on the central axis, and determining target orientation data corresponding to each first target end point in the plurality of first target end points; under the condition that model data corresponding to the target model are obtained, determining a plurality of second target end points from the model data according to the target orientation data; the method comprises the steps of obtaining first dynamic attributes corresponding to all first target end points and second dynamic attributes corresponding to all second target end points in a plurality of second target end points, building a target skeleton based on the first dynamic attributes and the second dynamic attributes, further determining other end points and corresponding orientation data on a model through the target end points on a central axis and the corresponding orientation data, completing skeleton building according to the dynamic attributes corresponding to the orientation data of all the calculated target end points, and further achieving the purpose of building a programmed automatic generation skeleton, so that the technical effect of improving skeleton building efficiency is achieved, and the technical problem of low skeleton building efficiency is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic illustration of an application environment of an alternative bone construction method according to an embodiment of the present application;
FIG. 2 is a schematic illustration of a flow of an alternative bone construction method according to an embodiment of the present application;
FIG. 3 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 4 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 5 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 6 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 7 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 8 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 9 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 10 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 11 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 12 is a schematic illustration of an alternative bone construction method according to an embodiment of the present application;
FIG. 13 is a schematic view of an alternative bone construction device according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, the terms are to be interpreted:
artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence base technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
Computer Vision technology (CV) Computer Vision is a science for researching how to make a machine "see", and further refers to that a camera and a Computer are used to replace human eyes to perform machine Vision such as identification, detection and measurement on a target, and further image processing is performed, so that the Computer processing becomes an image more suitable for human eyes to observe or is transmitted to an instrument to detect. As a scientific discipline, computer vision research-related theories and techniques attempt to build artificial intelligence systems that can capture information from images or multidimensional data. Computer vision technologies generally include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content/behavior recognition, three-dimensional object reconstruction, 3D technologies, virtual reality, augmented reality, synchronous positioning, map construction, and other technologies, and also include common biometric technologies such as face recognition and fingerprint recognition.
With the research and progress of artificial intelligence technology, the artificial intelligence technology is developed and applied in a plurality of fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, unmanned aerial vehicles, robots, smart medical care, smart customer service, and the like.
The scheme provided by the embodiment of the application relates to the technologies of image recognition of artificial intelligence, three-dimensional object reconstruction and the like, and is specifically explained by the following embodiments:
according to an aspect of an embodiment of the present application, a bone construction method is provided, which may optionally be applied, but not limited, to the environment as shown in fig. 1 as an alternative implementation. The system may include, but is not limited to, a user device 102 and a server 112, the user device 102 may include, but is not limited to, a display 104, a processor 106 and a memory 108, and the server 112 includes a database 114 and a processing engine 116.
The specific process comprises the following steps:
step S102, the user equipment 102 acquires model data of the target model 1002;
steps S104-S106, sending model data of the target model 1002 to the server 112 via the network 110;
step S108-S112, the server 112 determines the central axis of the target model 1002 from the model data in the target model 1002 through the processing engine, further obtains the orientation data of the first target endpoint, and determines the second target endpoint according to the orientation data of the first target endpoint;
steps S114-S116, sending the dynamic attributes corresponding to the first target endpoint and the second target endpoint to the user equipment 102 through the network 110;
in step S118, the user device 102 builds a target skeleton of the target model by using the dynamic property through the processor 106, displays the 3D model 1004 after the skeleton is bound on the display 104, and stores the dynamic property in the memory 108.
In addition to the example shown in fig. 1, the above steps may be performed by the client or the server independently, or by cooperation of the client and the server, such as the user equipment 102 performing the above steps of S108, so as to relieve the processing pressure of the server 112. The user equipment 102 includes, but is not limited to, a handheld device (e.g., a mobile phone), a notebook computer, a desktop computer, a vehicle-mounted device, and the like, and the application does not limit the specific implementation manner of the user equipment 102.
Optionally, as an alternative embodiment, as shown in fig. 2, the bone construction method includes:
s202, acquiring a target model of a bone to be bound, wherein the target model changes along with the change of the bone bound with the target model;
s204, determining a central axis of the target model, wherein the central axis is a mark line corresponding to a trunk part, and the trunk part is a part which guides the branch part of the target model to generate linkage change when the target model changes;
s206, acquiring a plurality of first target end points on the central axis, and determining target orientation data corresponding to each first target end point in the plurality of first target end points;
s208, under the condition that model data corresponding to the target model are obtained, determining a plurality of second target endpoints from the model data according to the target orientation data;
s210, acquiring a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints, and building a target skeleton based on the first dynamic attribute and the second dynamic attribute.
Optionally, in this embodiment, the bone construction method may be but not limited to be applied in a scene of bone building of a 3D model, and in a modeling process for a plant model such as petals, leaves, and the like, the prior art mainly uses two schemes: after a plant tool such as a SpeedTree is programmed to generate a plant, the SpeedTree calculates corresponding displacement of each part of a plant model according to the structure and wind parameters of the plant and generates a wind blowing animation; the other method is to use 3D software such as Maya to bind bones, manually set the bones, assign weights, and make animation by an animator after binding.
However, although the real natural wind animation can be generated by using the first programmed plant tool, the skeleton binding cannot be completed, and the animation in the case of meeting the requirement of making complex animation cannot be realized, for example, in the scenes of flowering, petal falling and the like, the real animation cannot be generated for each petal; and the second 3D software is used for binding the plants, under the scene that the plant model has more leaves and petals, bones are manually erected, and each vertex of the model is endowed with the weight of the bones, so that the workload is large and the modification is difficult. For example, the binding of a petal, if the petal is to have a controlled, transverse and longitudinal curvature, only one petal requires tens or even hundreds of bones, which makes the binding process cumbersome if the bones are erected manually.
This embodiment erects through programmed skeleton and generates skeleton weight, the user only need appoint petal 3D model bottom and two points at top can, surplus skeleton is built and will be accomplished work by the procedure is automatic, thereby tedious manual operation has been avoided, the threshold of model building has been reduced, and when facing the animation demand of making comparatively complicacy, both can generate comparatively real animation to each petal, for example when the petal is blown by the wind, the petal realizes the animation such as rotation according to the wind direction, animation such as displacement, completion skeleton that can be quick again is bound, for example, to the 3D model of the flower that has tens of petals, total skeleton quantity reaches the binding process of thousands of heels, only need several minutes time, the efficiency of skeleton construction has been improved.
Optionally, in this embodiment, in step S202, a target model of a bone to be bound is obtained, where the target model changes along with a change of the bone to which the target model is bound; the method includes determining a target model to be subjected to bone binding from unmodeled models, for example, constructing a virtual 3D scene in which a natural wind blows a flower, acquiring data information of each petal of the flower, numbering the petals, acquiring a petal model corresponding to the number according to the number corresponding to the petal to be bound with the bone, and determining the petal model as the target model.
Optionally, in this embodiment, the bone in the 3D model is a structure simulating animal bone, and is used to implement a structure that moves a large number of vertices to a specified position according to a certain rule, each part of the bone controls a first target endpoint of a nearby area, and when a certain part of the bone moves, the correspondingly controlled endpoints are pulled to move together, thereby completing the precise movement; the bound bones can be understood, but not limited to, as a plurality of bones are constrained by the principle of mechanical design, and when one bone moves, other bones related to the bone also move.
Optionally, in this embodiment, in step S204, a central axis of the target model is determined, where the central axis is a mark line corresponding to a trunk portion, and the trunk portion is a portion of the target model that guides the branch portion of the target model to change in a linkage manner when the target model changes; but is not limited to, a central axis of the target model may be artificially marked or automatically generated by a computer based on the determined geometric configuration and physical properties of the target model.
Alternatively, in this embodiment, the central axis may be, but is not limited to, a mark line of a trunk portion of the model, and the trunk portion is a portion that pulls other positions when the model changes, such as a main vein of the leaf, a line connecting the top end to the bottom end of the petal, a feather axis of the wing, and so on.
Optionally, in this embodiment, the method for determining the central axis may include, but is not limited to: calculating a median line of the target model, wherein the target model can be overlapped after being folded through the median line; and (3) under the condition that the petals are blown by wind, calculating the gravity center of the model according to the falling state of the petals, and determining a straight line passing through the gravity center and the two ends as a median line.
Further by way of example, optionally, as shown in fig. 3, a petal model 302 marked as H1 is obtained, a top end point 304 and a bottom end point 306 of the petal are determined, and a line segment connecting the top end point 304 and the bottom end point 306 of the petal is made on the petal model 302 as a central axis of the petal model 302; for example, as shown in fig. 4, a wing model 404 of a bird wing is obtained, a top end point 404 and a bottom end point 406 of the wing model are obtained, a line segment connecting the top end point 404 and the bottom end point 406 of the wing model 402 is made according to the bone density distribution of the bird wing, and the line segment passes through a distribution area with a high bone density to be bound and is determined as a central axis of the wing model.
Optionally, in this embodiment, in steps S206 to S208, a plurality of first target end points on the central axis are obtained, and target orientation data corresponding to each first target end point in the plurality of first target end points is determined; under the condition of obtaining model data corresponding to the target model, determining a plurality of second target endpoints from the model data according to the target orientation data; it can be understood, but not limited to, that the first target end points are marked on the central axis according to a computer or an artificial person, the orientation data of each first target end point on the target model is further determined, and the second target end points, except the first target end points, on the model, which need to be bone-bound are further determined according to the calculated orientation data of the first target end points on the target model.
Optionally, in this embodiment, acquiring a plurality of first target end points on the central axis includes: firstly, dividing a central axis into N sections according to the length or the quality, wherein N is a natural number more than or equal to 2, and the length of each section and the proportion of the central axis can be determined by the rigor and the resolution of a required scene but not limited by the length and the resolution of the required scene; the first target end points are used for determining the length of the bone and the distribution density of the bone, and the more the first target end points are in the unit length, the shorter the length of the bone is and the larger the distribution density of the bone is.
Optionally, in this embodiment, the target orientation data reflects an orientation of the central axis of the target at each first target endpoint according to data determined after vectors obtained after vectors of the front, left, and top directions of each first target endpoint in the three-dimensional space are orthogonal, where the three directions of the top, left, and top in the three-dimensional space are set as positive directions, and the three directions of the bottom, right, and top are set as negative directions.
Optionally, in this embodiment, the target model data may be, but is not limited to, data of a central axis of the target model and a target orientation of the first target endpoint; the second target end points may be, but are not limited to, other end points determined by a rule in both the left and right directions for each first target end point on the central axis.
Optionally, in this embodiment, in step S210, a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the multiple second target endpoints are obtained, and a target bone is built based on the first dynamic attribute and the second dynamic attribute, which may be understood as obtaining the corresponding first dynamic attribute according to the orientation data calculated by the first target endpoint, obtaining the corresponding second dynamic attribute according to the orientation data calculated by the second target endpoint, determining the density, the length, and the building position of the bone in the region according to the first dynamic attribute and the second dynamic attribute in the target model region range, but not limited to determining the density of the bone according to the density attribute in the dynamic attributes, determining the length of the bone according to the number of target endpoints in the region, and determining the building position of the bone according to the rotation angle and the offset in the dynamic attributes.
It should be noted that the density, the length and the building position of the bone to be bound are determined according to the number and the orientation data of the target endpoints, so that the automatic building of the bone is completed by combining multiple dimensions, and the building efficiency is improved.
The first dynamic attribute is an attribute that changes for each first target endpoint based on natural wind blowing or other environmental factors, and may include, but is not limited to: rotation angle, offset, etc.; the second dynamic property is a property that changes for each second target endpoint based on natural wind blowing or other environmental factors, and may include, but is not limited to: rotation angle, offset, etc.;
it should be noted that, the target orientations of the first target end point and the first target end point on the central axis are determined through the central axis, the orientation data calculated by the second target end point and the second target end point correspondingly are further determined according to the orientation data corresponding to the first target end point, and the bone construction is automatically completed through the dynamic attributes corresponding to the orientation data of the first target end point and the second target end point, so that the technical effect of improving the bone construction efficiency is achieved.
Further by way of example, optionally, for example, as shown in fig. 5 (a), a user acquires a petal model 502 to be subjected to bone construction, acquires a top end point and a bottom end point of the petal model, connects the top end point and the bottom end point, and determines a central axis 510 corresponding to a trunk portion of the petal model, for example, as shown in fig. 5 (b), divides the central axis 510 into a plurality of uniform segments according to a certain proportion according to a configuration of a development environment, a connection point of two adjacent segments is a first target end point 504, calculates a target orientation 506 of each first target end point in a three-dimensional space according to direction vectors of three directions of a front direction, a right direction and an upper direction of each first target end point 504 on the central axis 510, obtains target orientation data, for example, as shown in fig. 5 (c), and determines a second target end point 508 at a position of the petal model 502 except for the central axis 510 according to the target orientation data; and finally, constructing a target skeleton according to the dynamic attribute corresponding to the first target endpoint 504 and the dynamic attribute corresponding to the second target endpoint 508.
According to the embodiment provided by the application, the target model of the bone to be bound is obtained, wherein the target model changes along with the change of the bone to which the target model is bound; determining a central axis of the target model, wherein the central axis is a mark line corresponding to a trunk part, and the trunk part is a part which guides a branch part of the target model to generate linkage change when the target model is changed; acquiring a plurality of first target end points on a central axis, and determining target orientation data corresponding to each first target end point in the plurality of first target end points; under the condition of obtaining model data corresponding to the target model, determining a plurality of second target endpoints from the model data according to the target orientation data; the method comprises the steps of obtaining a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in a plurality of second target endpoints, building a target skeleton based on the first dynamic attribute and the second dynamic attribute, further determining other endpoints and corresponding orientation data on a model through the target endpoints and the corresponding orientation data on a central axis, and completing skeleton building according to the dynamic attributes corresponding to the orientation data of all the calculated target endpoints, so that the purpose of building a programmed automatic generation skeleton is achieved, and the technical effect of improving skeleton building efficiency is achieved.
As an alternative, determining a plurality of second target endpoints from the model data according to the target orientation data includes:
s1, under the condition that the target orientation data comprise first orientation data, constructing each side wing line where each first target endpoint is located according to the first orientation data;
and S2, determining a plurality of second target end points based on the wing points on the wing lines.
Alternatively, in the present embodiment, the first orientation data may be, but is not limited to, data of a vector in the left direction and a vector in a direction opposite to the left direction included in the target orientation data; the side wing line is a line segment passing through the first target endpoint and used for determining the second target endpoint, and specifically includes: and constructing a plurality of line segments along the left direction or the right direction according to the first orientation data of each first target endpoint, wherein each line segment is perpendicular to the central axis and can cover the whole target model.
Optionally, in this embodiment, the generating process of the wing points includes dividing the wing line into N segments according to the length of the wing line, where N is a natural number greater than or equal to 2, and a connection point between two adjacent segments is a wing point.
It should be noted that, through the orientation data of each first target end point on the central axis, the first target end point on each central axis is respectively constructed with a flank line in the left and right directions, so as to determine the second target end point, and the direction information in the three-dimensional space is utilized, thereby achieving the purpose of automatically finding the second target end point, and improving the efficiency and accuracy of determining the second target end point.
By further example, optionally, as shown in fig. 6 for example, a vector of each point in the target orientation data of the target model 602 in the left direction is obtained according to the target orientation data of the target model 602, the vector of each point in the left direction and a vector in a direction opposite to the vector are used as first orientation data, according to the first orientation data of each point on a central axis 606 of the petal model, a straight line with a length sufficient to cover the petals is constructed to the left and the right for each point on the central axis respectively as a flank line 608, and is subdivided into a plurality of line segments, and a connection point between two adjacent line segments is used as a flank point 604.
By the embodiment provided by the application, under the condition that the target orientation data comprises the first orientation data, constructing each side wing line where each first target endpoint is located according to the first orientation data; and determining a plurality of second target end points based on the side wing points on each side wing line, thereby achieving the purpose of programmatically and automatically determining other end points needing to build bones on the model except the end points on the central axis, and further achieving the technical effect of improving the efficiency and the accuracy of determining the second target end points.
As an alternative, determining a plurality of second target end points based on the flanking points on the respective flanking lines includes:
s1, under the condition that the target orientation data comprise second orientation data, indicating side wing points on each side wing line to adsorb the model data according to the second orientation data, and determining the target data successfully adsorbed by the side wing points from the model data;
and S2, determining a plurality of data points corresponding to the target data as a plurality of second target end points.
Alternatively, in the present embodiment, the second orientation data may be, but is not limited to, data of a vector in an upward direction and a vector in a direction opposite to the upward direction included in the target orientation data.
Alternatively, in this embodiment, the adsorption process may be understood as, but is not limited to: and mapping the wing points on each wing line onto the target model along the direction indicated by the second orientation data, or calculating the distance of the wing points on each wing line onto the target model along the direction indicated by the second orientation data, and in the case that the distance is less than or equal to a preset threshold value, mapping the wing points on the wing lines onto the target model, and determining the points mapped onto the target model as second target end points, wherein the mapping mode can be, but is not limited to, mapping onto the target model along the upward direction of the wing points or mapping onto the target model along the downward direction of the wing points.
It should be noted that, through the second forward and backward emitted rays passing through the central axis, when the rays coincide with the model data, or the length of the rays coinciding is less than or equal to a preset threshold, the adsorption is determined to be successful, and then the wing points on the wing lines are mapped onto the target model, so that the determination of the end points needing skeleton construction on the target model except for the first target end point is realized through the combination of the adsorption and mapping technical means, the confirmation of the model end points is automatically completed, the technical problems of low efficiency and wrong labeling of manual end point labeling are avoided, and the efficiency and accuracy of end point determination are improved.
Further by way of example, as shown in fig. 7, optionally, after determining the wing points 706 on each wing line 708 of the target model 702, obtaining a vector of each point in the target orientation data of the target model 702 in the upward direction, using the vector of each point in the upward direction and a vector in the opposite direction to the vector as second orientation data, according to the second orientation data of each point on the axis line of the petal model, firstly adsorbing the wing points 706 constructed on each point in the upward direction, then adsorbing the wing points 706 constructed on each point that are not adsorbed in the wing points 706 in the downward direction, and recording the end points successfully adsorbed as the second target end points 704.
According to the embodiment provided by the application, under the condition that the target orientation data comprises second orientation data, indicating the side wing points on each side wing line to adsorb the model data according to the second orientation data, and determining the target data successfully adsorbed by the side wing points from the model data; and determining a plurality of data points corresponding to the target data as a plurality of second target end points, thereby achieving the purpose of programmatically and automatically determining the end points of the bones to be built on the model, and further achieving the technical effect of improving the efficiency and the accuracy of end point determination.
As an alternative, determining a plurality of second target end points based on the flanking points on the respective flanking lines includes: before determining the central axis of the target model, the method further comprises: acquiring a top end point of the target model and a bottom end point of the target model;
determining a central axis of the object model, comprising: a central axis is determined based on the top and bottom endpoints.
Optionally, in this embodiment, the top endpoint may be, but is not limited to, the endpoint located at the topmost position among the target endpoints included in the target model, and there are no other target endpoints at the left direction, the right direction, and the upward direction of the endpoint; the bottom end point may be, but is not limited to, the end point located at the lowest portion among the target end points included in the target model, and no other target end point is located at the left, right, and downward directions of the end point; the top end point and the bottom end point can be labeled manually or automatically by adopting a neural network model and the like.
Optionally, in this embodiment, the shape of the target model may be determined in advance before the end points are labeled, the model of the bones to be bound is divided into a regular model, an irregular model, and a symmetric model, when the target model is the regular model, the top end point and the bottom end point are manually labeled, and a straight line segment connecting the top end point and the bottom end point is determined as the central axis of the model; under the condition that the target model is a symmetric model, determining a central line of the symmetric model as a central axis of the model; under the condition that the target model is an irregular model, manually marking a top end point and a bottom end point, then marking the center of gravity of the model by using a computer simulation, and determining a straight line segment passing through the three points as a central axis of the irregular target model.
It should be noted that, by dividing the shape of the target model in advance when marking the end points, and then determining the central axis of the target model according to different shapes, the efficiency of determining the central axis and the diversity of the means for dividing the central axis are improved.
By the embodiment provided by the present application, before determining the central axis of the target model, the method further includes: acquiring a top end point of the target model and a bottom end point of the target model; determining a central axis of the object model, comprising: the central axis is determined based on the top end point and the bottom end point, so that the purpose of determining the central axis of the target model is achieved, and the technical effect of improving the accuracy of the central axis is achieved.
As an optional scheme, acquiring a plurality of first target end points on a central axis, and determining target orientation data corresponding to each first target end point in the plurality of first target end points includes:
s1, obtaining a plurality of first target endpoints, wherein the plurality of first target endpoints comprise a top endpoint and a bottom endpoint;
s2, sequencing the plurality of first target endpoints according to the direction from the bottom endpoint to the top endpoint, and determining a sequencing sequence of each first target endpoint;
and S3, calculating each first target endpoint based on the sequencing sequence to obtain target orientation data.
Optionally, in this embodiment, the sorting sequence may be, but is not limited to, a sequence obtained by sorting a plurality of first target endpoints in a direction from a bottom endpoint to a top endpoint on the central axis, where the sorting manner may be, but is not limited to, using methods such as insert sorting, hill sorting, selection sorting, bubble sorting, merge sorting, quick sorting, heap sorting, radix sorting, and the like to improve the efficiency of sorting.
It should be noted that, by sorting the first target end points on the central axis, calculation of numbers on a subsequent coordinate system is facilitated, and efficiency of calculating orientation information is improved.
For further example, as shown in fig. 8, a plurality of first target end points on a central axis 804 on the target model are ranked from a bottom end point 806 to a top end point 802, and since there are 7 first target end points on the central axis 804, the bottom end point is set as P0, the top end point is set as P6, and the ranking sequence is determined according to P0 to P6.
Through the embodiment provided by the application, a plurality of first target endpoints are obtained, wherein the plurality of first target endpoints comprise a top endpoint and a bottom endpoint; sequencing the plurality of first target endpoints according to the direction from the bottom endpoint to the top endpoint, and determining a sequencing sequence of each first target endpoint; and calculating each first target endpoint based on the sequencing sequence to obtain target orientation data, and further achieving the purpose of calculating the target orientation data of the first target endpoints based on the sequencing numerical sequence, thereby realizing the technical effect of improving the calculation efficiency of the target orientation data.
As an alternative, calculating each first target endpoint based on the sorted sequence to obtain target orientation data includes:
s1, acquiring a first target endpoint to be calculated;
s2, under the condition that a first target endpoint to be calculated is a top endpoint, calculating a first orientation vector of the top endpoint relative to the first endpoint, and determining the first orientation vector as target orientation data corresponding to the top endpoint, wherein the first endpoint is a first target endpoint of a previous sequence of the top endpoint in the plurality of first target endpoints; or, in the case that the first target endpoint to be calculated is a bottom endpoint, calculating a second orientation vector of the bottom endpoint relative to a second endpoint, and determining the second orientation vector as target orientation data corresponding to the bottom endpoint, wherein the second endpoint is a first target endpoint of a sequence that is a next sequence of the bottom endpoint from among the plurality of first target endpoints.
Optionally, in this embodiment, the first endpoint is a first target endpoint of a previous sequence of top endpoints determined according to the sorting sequence from among the plurality of first target endpoints; the second endpoint is a first target endpoint of a sequence subsequent to a lower endpoint determined according to the sorted sequence from the plurality of first target endpoints.
Optionally, in this embodiment, the first orientation vector may be, but is not limited to be, understood as a vector calculated by the top endpoint and the first endpoint according to a formula, and used for reflecting the target orientation data of the top endpoint; the second orientation vector may be understood as, but is not limited to, a vector calculated by the lower end point and the second end point according to a formula for reflecting the target orientation data of the lower end point.
Optionally, in this embodiment, the formula for calculating the orientation data may include, but is not limited to, three calculation steps: calculating forward vectors, right vectors, and up vectors in turn, but not limited to, by means of vector calculation methods, top endpoints, such as calculation methods of forward vectors for top and bottom endpoints: subtracting the vector of the top end point from the vector of the first target end point of the previous sequence to obtain a forward vector of the top end point, wherein the specific formula is as follows:
Figure DEST_PATH_IMAGE001
wherein,
Figure 984960DEST_PATH_IMAGE002
which represents the forward direction vector of the vehicle,
Figure DEST_PATH_IMAGE003
it is expressed that the vector is unitized,
Figure 334164DEST_PATH_IMAGE004
vector data of a previous sequence to the top end point,
Figure DEST_PATH_IMAGE005
vector data for the top endpoint.
Further by way of example, after the sequencing sequence of the petal models is obtained, a top end point of the petal models and a first target end point of a previous sequence adjacent to the sequence where the top end point is located are obtained, vector unitization is performed according to the two first target end points to serve as target orientation data of the top end point, a lower end point of the petal models and a first target end point of a next sequence adjacent to the sequence where the lower end point is located are obtained, and vector unitization is performed according to the two first target end points to serve as target orientation data of the lower end point.
It should be noted that the efficiency of the top endpoint and the bottom endpoint calculation is improved by vector unitization and addition and subtraction of adjacent vectors.
According to the embodiment provided by the application, a first target endpoint to be calculated is obtained; under the condition that a first target endpoint to be calculated is a top endpoint, calculating a first orientation vector of the top endpoint relative to the first endpoint, and determining the first orientation vector as target orientation data corresponding to the top endpoint, wherein the first endpoint is a first target endpoint of a previous sequence of the top endpoint in a plurality of first target endpoints; or, under the condition that the first target endpoint to be calculated is the bottom endpoint, calculating a second orientation vector of the bottom endpoint relative to the second endpoint, and determining the second orientation vector as target orientation data corresponding to the bottom endpoint, wherein the second endpoint is the first target endpoint of a sequence after the bottom endpoint in the plurality of first target endpoints, and further achieving the purpose of calculating the orientation data of the top endpoint and the bottom endpoint in the first target endpoints on the axis, thereby achieving the technical effect of improving the efficiency and accuracy of the orientation data calculation.
As an alternative, calculating each first target endpoint based on the sorted sequence to obtain target orientation data includes:
s1, acquiring a first target endpoint to be calculated;
s2, calculating a third orientation vector of the first target endpoint to be calculated relative to a third endpoint and a fourth orientation vector of the first target endpoint to be calculated relative to a fourth endpoint, wherein the third endpoint is the first target endpoint of a previous sequence of the first target endpoint to be calculated in the plurality of first target endpoints, and the fourth endpoint is the first target endpoint of a next sequence of the first target endpoint to be calculated in the plurality of first target endpoints;
s3, performing integrated calculation on the third orientation vector and the fourth orientation vector to obtain a target orientation vector;
and S4, determining the target orientation vector as target orientation data corresponding to the first target endpoint to be calculated.
Optionally, in this embodiment, the third endpoint may be, but is not limited to be, understood as a first target endpoint of a previous sequence of first target endpoints to be calculated, except for the top endpoint and the bottom endpoint, determined according to the sorted sequence, among the plurality of first target endpoints; the fourth endpoint may be, but is not limited to be, understood as a first target endpoint of a sequence subsequent to a first target endpoint to be calculated, determined according to the sorted sequence, among the plurality of first target endpoints, except for the top endpoint and the bottom endpoint; the third orientation vector may be, but is not limited to be, understood as a vector calculated by the endpoint to be calculated and the third endpoint according to a formula; the fourth orientation vector may be, but is not limited to be, understood as a vector calculated according to a formula by the end point to be calculated and the fourth end point; the target orientation vector may be, but not limited to, a vector obtained by performing integrated unitization calculation on the third orientation vector and the fourth orientation vector.
Alternatively, in the present embodiment, the calculation method of the forward vectors of the endpoints other than the top endpoint and the bottom endpoint: the forward vector of the top end point is obtained by subtracting the vector of the first target end point of the previous sequence from the vector of the end point and subtracting the vector of the first target end point of the next sequence from the vector of the target end point, and the specific formula is as follows:
Figure 882957DEST_PATH_IMAGE006
wherein
Figure DEST_PATH_IMAGE007
Which represents the forward direction vector of the vehicle,
Figure 502157DEST_PATH_IMAGE003
it is expressed as a unit of a vector,
Figure 34770DEST_PATH_IMAGE008
is a target endpoint
Figure DEST_PATH_IMAGE009
The vector data of the previous sequence of (a),
Figure 30407DEST_PATH_IMAGE010
is a target endpoint
Figure 292762DEST_PATH_IMAGE009
The latter sequence of vector data.
Optionally, in this embodiment, after the orientation data of all the forward vectors of the first target endpoint are calculated, the method further includes calculating the orientation data of the right vector and the orientation data of the upward vector of the first target endpointThe upward vector of the preset world coordinate system is
Figure DEST_PATH_IMAGE011
The specific formula for calculating the right vector is
Figure 318749DEST_PATH_IMAGE012
The specific formula for calculating the upward vector of the first target endpoint is
Figure DEST_PATH_IMAGE013
Wherein, each first target end point has a front vector, a right vector and an upper vector,
Figure 932133DEST_PATH_IMAGE014
is a vector cross product.
Further by way of example, after the sequencing sequence of the petal models is obtained, other first target end points to be calculated in the petal models except for the top end point and the bottom end point are obtained, the first target end point of the previous sequence adjacent to the sequence where the end point to be calculated is obtained as a third end point, vector unitization is performed according to the end point to be calculated and the third end point to be used as a third orientation vector of the end point to be calculated, the first target end point of the next sequence adjacent to the sequence where the end point to be calculated is obtained as a fourth end point, vector unitization is performed according to the end point to be calculated and the fourth end point to be used as a fourth orientation vector of the end point to be calculated, and the third orientation vector and the fourth orientation vector are integrated and calculated to obtain the target orientation vector of the end point to be calculated.
It should be noted that, the vector data of each point on the axis is calculated by the above formula, so as to obtain the orientation data of each endpoint, thereby improving the accuracy of the orientation data calculation.
Through the embodiment provided by the application, the target orientation vector is determined as the target orientation data corresponding to the first target endpoint to be calculated
Optionally, in this embodiment, the third endpoint may be, but is not limited to be, understood as a first target endpoint of a previous sequence of first target endpoints to be calculated, except for the top endpoint and the bottom endpoint, determined according to the sorted sequence, among the plurality of first target endpoints; the fourth endpoint may be, but is not limited to be, understood as a first target endpoint of a sequence subsequent to a first target endpoint to be calculated, determined according to the sorted sequence, among the plurality of first target endpoints, except for a top endpoint and a bottom endpoint; the third orientation vector may be, but is not limited to be, understood as a vector calculated by the endpoint to be calculated and the third endpoint according to a formula; the fourth orientation vector may be, but is not limited to be, understood as a vector calculated according to a formula by the end point to be calculated and the fourth end point; the target orientation vector can be, but is not limited to, a vector obtained by performing integrated unitization calculation on the third orientation vector and the fourth orientation vector, so that the purpose of calculating the orientation data of each first target endpoint on the central axis in a vector mode is achieved, and the technical effect of improving the accuracy of the orientation data calculation is achieved.
As an optional scheme, before obtaining a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the multiple second target endpoints, and building a target bone based on the first dynamic attribute and the second dynamic attribute, the method further includes: acquiring first target orientation data corresponding to each first target endpoint, wherein the first target orientation data comprises target orientation data; acquiring second target orientation data corresponding to each second target endpoint;
acquiring a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in a plurality of second target endpoints, and building a target skeleton based on the first dynamic attribute and the second dynamic attribute, wherein the method comprises the following steps: the first dynamic attribute is obtained according to the first target orientation data, and the second dynamic attribute is obtained according to the second target orientation data.
Optionally, in this embodiment, it may be, but is not limited to be, understood that the first target endpoint and the second target endpoint are subjected to normalized naming, and the first dynamic attribute and the second dynamic attribute in the model region are obtained according to the calculated target orientation data corresponding to the first target endpoint and the second target endpoint.
Through the embodiment provided by the application, the purpose of generating different dynamic attributes according to the front, right and upper direction vectors of each endpoint is further achieved, and therefore the technical effect of improving the bone construction efficiency is achieved.
As an optional scheme, after obtaining a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints, and building a target skeleton based on the first dynamic attribute and the second dynamic attribute, the method further includes:
acquiring control weight of each vertex in the target model by the target skeleton, wherein each vertex corresponds to each first target endpoint and each second target endpoint;
and binding the target skeleton and the target model, and controlling each vertex based on the control weight when the target skeleton changes so as to enable the target model to change along with the change of the target skeleton.
Alternatively, in this embodiment, the control weight may be, but is not limited to, understood as that each bone may control multiple vertices, and one vertex may also be controlled by multiple bones, the control weight is used to reflect the control ability of each bone on each vertex in the target model, the higher the control weight is, the stronger the control ability of the bone on the vertex is, and when the bone changes, the vertex changes correspondingly according to the amplitude and angle of the bone change.
Through the embodiment provided by the application, after the first dynamic attribute corresponding to each first target endpoint and the second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints are obtained, and the target skeleton is built based on the first dynamic attribute and the second dynamic attribute, the method further comprises the following steps: acquiring control weight of each vertex in the target model by the target skeleton, wherein each vertex corresponds to each first target endpoint and each second target endpoint; and binding the target skeleton and the target model, and controlling each vertex based on the control weight when the target skeleton changes so that the target model changes along with the change of the target skeleton, thereby achieving the purpose of programmatically and automatically constructing the skeleton and further achieving the technical effect of improving the skeleton construction efficiency.
As an optional solution, after the target bone is bound to the target model and when the target bone changes, the vertices are controlled based on the control weights so that the target model changes with the target bone, the method further includes:
and under the condition that the target model is a sub-model of the target combined model and each sub-model of the target combined model is bound with the skeleton, integrating each sub-model to obtain the combined model bound with the skeleton.
Optionally, in this embodiment, the combination model may be, but not limited to, understood as including a plurality of sub models that complete the bone construction through the central axis, and in a case that each sub model completes the bone binding, the sub models are integrated to obtain the combination model bound to the bone, for example, the combination model is a flower, and the sub models are petals.
Optionally, in this embodiment, the integration process may include, but is not limited to, first numbering each established sub-model, and calculating, by using a network topology structure, an establishment manner and an order of a combination model in which each sub-model is located; or obtaining the central axis of the combined model by using secondary central axis calculation, further obtaining the orientation data of the first target endpoint and the orientation data of the second target endpoint in the combined model, determining corresponding dynamic data, and completing automatic bone binding.
According to the embodiment provided by the application, under the condition that the target model is the sub-model of the target combination model and each sub-model of the target combination model is bound with the skeleton, each sub-model is integrated to obtain the combination model bound with the skeleton, and the purpose from partial skeleton building to overall skeleton building is further achieved, so that the technical effect of improving the comprehensiveness of skeleton binding is achieved.
As an alternative, after integrating the sub-models to obtain the combined model bound to the bone, the method further comprises:
s1, determining a central axis of a combined model;
s2, acquiring a plurality of first combination end points on a central axis of the target model, and determining combination orientation data corresponding to each first combination end point in the plurality of first combination end points;
s3, under the condition that combined model data corresponding to the combined model are obtained, determining a plurality of second combined endpoints from the combined model data according to the combined orientation data;
and S4, acquiring a first combined dynamic property corresponding to each first combined end point and a second combined dynamic property corresponding to each second combined end point in the plurality of second combined end points, and adjusting the skeleton bound with the combined model based on the first combined dynamic property and the second combined dynamic property.
Optionally, in this embodiment, a central axis of the combined model is determined, for example, a central axis of the flower model, a plurality of first combined endpoints on the central axis of the combined model are obtained, combined orientation data of the first combined endpoints is determined, a plurality of second combined endpoints are determined from the combined model according to the calculated combined orientation data, and the programmed automatic adjustment of the skeleton bound to the combined model is completed in accordance with the first combined dynamic attribute of the first combined endpoint and the second combined dynamic attribute of the second combined endpoint.
It should be noted that through secondary building, parts and the whole are combined, the flower processing mode can be split into the whole flower and parts of petals under the condition that a complete flower model is bound by bones, the secondary bone binding is carried out by respectively using the method of the embodiment, and the bound bones are integrally adjusted, so that the beneficial effects of comprehensiveness and accuracy of bone building are improved.
For further example, optionally, as shown in fig. 9, a plurality of first combination end points 904 on a central axis of the target model 902 are obtained, and combination orientation data 906 corresponding to each first combination end point 904 in the plurality of first combination end points 904 is determined; determining a plurality of second combination endpoints 908 from the combined model data according to the combination orientation data 906 when the combined model data corresponding to the combined model is acquired; and acquiring a first combined dynamic property corresponding to each first combined endpoint 904 and a second combined dynamic property corresponding to each second combined endpoint 908 in the plurality of second combined endpoints 908, and adjusting the bone bound with the combined model based on the first combined dynamic property and the second combined dynamic property.
Through the embodiment provided by the application, the central axis of the combined model is determined; acquiring a plurality of first combination end points on a central axis of a target model, and determining combination orientation data corresponding to each first combination end point in the plurality of first combination end points; under the condition that combined model data corresponding to the combined model are obtained, determining a plurality of second combined endpoints from the combined model data according to the combined orientation data; the method comprises the steps of obtaining a first combination dynamic attribute corresponding to each first combination endpoint and a second combination dynamic attribute corresponding to each second combination endpoint in a plurality of second combination endpoints, and adjusting the skeleton bound with the combination model based on the first combination dynamic attribute and the second combination dynamic attribute so as to achieve the purpose of conveniently modifying the built skeleton integrally, thereby achieving the technical effect of improving the comprehensiveness and flexibility of skeleton building.
For ease of understanding, the above-described bone construction method is applied in a specific 3D modeling scenario:
as an alternative, for example, as shown in fig. 10, the specific steps are as follows:
step S1002, first, a 3D model of the flower needs to be obtained, for example, as shown in fig. 11;
step S1004, the user needs to perform basic processing on the flower model: marking the central axis of the petals, and placing a point on the central axis in a specific group (group name of raw spine, namely the original main skeleton);
step S1006, then using a For-Each node to access Each petal to an AutoPetalRigm (automatic transfer model) node;
and step S1008, after the nodes operate for a short time, the system automatically generates main skeleton and side wing skeleton along the central axis of the petals, gives each vertex of the model to skeleton weight, and outputs the bound 3D model.
Optionally, in this embodiment, for example, as shown in fig. 12, a flowchart inside the AutoPetalRig node is as follows, and the specific steps are as follows:
step S1202, input processing: the node acquires petal data transmitted by the For-arch node at the upper layer. This step requires the upper nodes to group vertices on the central axis individually and is named rawSpine. In addition, the node reads the petal serial number set on the parameter panel for bone naming. And obtaining the serial number of the petals from the For-easy node.
Step S1204, central axis resampling: this step first ranks vertices on the central axis, and since the parent-child relationship of bones in the KineFX bone system is determined by the order of the vertex numbers of the input graphics, it is necessary to rank the points on the central axis in order for the bones on the central axis of the petals to have a certain hierarchical relationship from the bottom of the petals to the top of the petals. After sorting, the length of the central axis is evenly subdivided, and the unit length used for subdivision determines the length of the bones on the central axis and the distribution density of the bones.
Step S1206, calculating a central axis orientation: in three-dimensional space, the front, right and top three orthogonal vectors of each point determine the Orientation of the bone represented by the point (Orientation), which in turn calculates the three vectors. First, the forward vector of each point on the central axis is calculated according to the position of each vertex on the central axis. By using
Figure DEST_PATH_IMAGE015
Representing the nth point on the central axis, the forward vector is calculated as follows: except for the first and last points:
Figure 465882DEST_PATH_IMAGE016
(ii) a The calculation method of the first point and the last point is as follows: the first point is that:
Figure DEST_PATH_IMAGE017
and the last point:
Figure 723688DEST_PATH_IMAGE018
whereinThe upward vector of the world coordinate system in Houdini is
Figure DEST_PATH_IMAGE019
The calculated right-facing vector is:
Figure 950270DEST_PATH_IMAGE020
Figure 457475DEST_PATH_IMAGE022
the upward vector is:
Figure DEST_PATH_IMAGE023
(ii) a Wherein, each point on the central axis has front, right and upper three orthogonal vectors, cross is the vector cross-product, norm is the vector unitization.
Step S1208, generating a flank: according to the orientation of each point on the central axis, each point on the central axis is respectively oriented
Figure 30801DEST_PATH_IMAGE024
And
Figure DEST_PATH_IMAGE025
both directions build a straight line of sufficient length to cover the petals and are subdivided into a plurality of line segments.
Step S1210, absorbing the lateral wing points in the positive direction: each point on the flank was adsorbed onto the model along its up vector using Ray nodes, and the points adsorbed onto the model were grouped into rayHitGroupFront.
Step S1212, reversely adsorbing the flanking points: the remaining dots are adsorbed onto the model in the opposite direction of up except for the dots in the group of rayHitGroupFlonts generated in the previous step, and the dots adsorbed onto the model are grouped into rayHitGroupBack. After this step, the petals had evenly distributed transverse segments and the points adsorbed on the model were all organized into two groups, rayHitGroupFlont and rayHitGroupBack.
Step S1214, collating the flank points: the points on the model that could not be attracted to either the front or back (except the points in both sets, rayHitFront and rayHitBack) were deleted and the segments were subdivided so that the shorter segments also had a certain density. The subdivision determines the density of the transverse skeleton, and the corresponding density can be adjusted according to the fineness of the binding requirement in actual use.
Step S1216, calculate Transform of each point on the flank: this step is similar to the calculation method in step (3), and calculates the front, right, and top three vectors for all points on the flanks.
Step S1218, programmatic naming: the skeleton is named according to a unified specification, points on a central axis are named as spine prefixes, points on a side wing are named as l _ wing prefixes and r _ wing prefixes, and a unique name character string is generated for each point by combining serial numbers of the points.
Step S1220 is to generate a Transform attribute, and generate the Transform attribute using a makertransform function from the front, right, and top three vectors of each point.
In step S1222, bone is generated using the RigDoctor node of KineFX.
Step S1224, skeleton weight generation: bone weights are automatically generated using three nodes Bonecapteurelines, tetemBed, bonecapteureBiharmonic.
And step S1226, after all the petal models are processed by the For-Each nodes, the flower models are bound.
Optionally, in this embodiment, the programmatic generation generates 3D assets using specific logic, algorithms rather than manually; houdini is software for producing and manufacturing 3D art assets, and is good at generating the art assets in a programming way; the method mainly comprises two steps of skeleton erection and skeleton weight endowing to model vertex, wherein the bound model can be used for making skeleton animation; the HDA is an abbreviation of Houdini Digital Asset, a special type Asset in Houdini software is used, each HDA realizes a specific algorithm function, a complete Houdini project comprises a plurality of HDA nodes, and all the nodes cooperate with each other to realize a complete programming function; transform is an attribute describing the position, rotation, and scaling of a three-dimensional space, and is usually represented by a matrix; kineFX is a new set of procedural animation tools introduced by Houdini18, which defines bones as points with parent-child relationships, with Transform attributes and names, and provides tools for programmatically processing bone data. The method can be applied to programming binding and animation production.
Through the embodiment provided by the application, the binding efficiency of the 3D model can be effectively improved, and the manufacturing and modifying time of a 3D binding operator is saved. The bone structure and naming of each petal model are subject to fixed rules, so that subsequent animation links can easily generate animation in a programmed manner by means of KineFX. The binding derived FBX manufactured according to the scheme can be compatible with various game engines, and the operation result of the skeleton animation in the unreal engine using the binding scheme has high operation efficiency and achieves the beneficial effect of improving the authenticity.
It is understood that in the specific implementation of the present application, related data such as user information, when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
According to another aspect of an embodiment of the present application, there is also provided a bone construction device for carrying out the above bone construction method. As shown in fig. 13, the apparatus includes:
a first obtaining unit 1302, configured to obtain a target model of a bone to be bound, where the target model changes as the bone to which the target model is bound changes;
a first determining unit 1304, configured to determine a central axis of the target model, where the central axis is a mark line corresponding to a trunk portion, and the trunk portion is a portion of the target model, where the trunk portion guides a branch portion of the target model to change in a linkage manner when the target model changes;
a second obtaining unit 1306, configured to obtain a plurality of first target end points on the central axis, and determine target orientation data corresponding to each first target end point in the plurality of first target end points;
a second determining unit 1308, configured to determine, when model data corresponding to the target model is obtained, a plurality of second target endpoints from the model data according to the target orientation data;
the first building unit 1310 is configured to obtain first dynamic attributes corresponding to each first target endpoint and second dynamic attributes corresponding to each second target endpoint in the multiple second target endpoints, and build a target skeleton based on the first dynamic attributes and the second dynamic attributes.
For specific embodiments, reference may be made to the examples shown in the bone construction device described above, and details in this example are not described herein again.
As an optional solution, the second determining unit 1308 includes:
the first building module is used for building each side wing line where each first target endpoint is located according to the first orientation data under the condition that the target orientation data comprise the first orientation data;
a first determination module for determining a plurality of second target end points based on the flanking points on the respective flanking lines.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
As an optional solution, the first determining module includes:
the first determining submodule is used for indicating the flanking points on each flanking line to adsorb the model data according to the second orientation data under the condition that the target orientation data comprise the second orientation data, and determining the target data successfully adsorbed by the flanking points from the model data;
and the second determining submodule is used for determining a plurality of data points corresponding to the target data as a plurality of second target end points.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
As an optional solution, the apparatus further includes:
the third acquisition unit is used for acquiring a top end point of the target model and a bottom end point of the target model before determining a central axis of the target model;
a second determination module that determines a central axis of the target model, comprising: for determining a central axis based on the top and bottom endpoints.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
As an alternative, the second obtaining unit 1306 includes:
a second obtaining module, configured to obtain a plurality of first target endpoints, where the plurality of first target endpoints include a top endpoint and a bottom endpoint;
the third determining module is used for sequencing the plurality of first target endpoints according to the direction from the bottom endpoint to the top endpoint and determining the sequencing sequence of each first target endpoint;
and the first calculation module is used for calculating each first target endpoint based on the sequencing sequence to obtain target orientation data.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
As an optional solution, the first computing module includes:
the first obtaining submodule is used for obtaining a first target endpoint to be calculated;
the first calculation submodule is used for calculating a first orientation vector of the top endpoint relative to the first endpoint under the condition that the first target endpoint to be calculated is the top endpoint, and determining the first orientation vector as target orientation data corresponding to the top endpoint, wherein the first endpoint is a first target endpoint of a previous sequence of the top endpoint in the plurality of first target endpoints; or, in the case that the first target endpoint to be calculated is the bottom endpoint, calculating a second orientation vector of the bottom endpoint relative to the second endpoint, and determining the second orientation vector as the target orientation data corresponding to the bottom endpoint, wherein the second endpoint is a first target endpoint of a sequence subsequent to the bottom endpoint in the plurality of first target endpoints.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
As an optional solution, the first computing module includes:
the second obtaining submodule is used for obtaining a first target endpoint to be calculated;
the second calculation submodule is used for calculating a third orientation vector of the first target endpoint to be calculated relative to a third endpoint and a fourth orientation vector of the first target endpoint to be calculated relative to a fourth endpoint, wherein the third endpoint is the first target endpoint of a sequence before the first target endpoint to be calculated in the plurality of first target endpoints, and the fourth endpoint is the first target endpoint of a sequence after the first target endpoint to be calculated in the plurality of first target endpoints;
the third calculation submodule is used for performing integrated calculation on the third orientation vector and the fourth orientation vector to obtain a target orientation vector;
and the third determining submodule is used for determining the target orientation vector as the target orientation data corresponding to the first target endpoint to be calculated.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
As an optional scheme, the apparatus further includes a third obtaining unit, configured to obtain first target orientation data corresponding to each first target endpoint before obtaining a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the multiple second target endpoints, and building a target bone based on the first dynamic attribute and the second dynamic attribute, where the first target orientation data includes target orientation data; acquiring second target orientation data corresponding to each second target endpoint;
a third obtaining module, configured to obtain a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the multiple second target endpoints, and build a target skeleton based on the first dynamic attribute and the second dynamic attribute, including: and acquiring a first dynamic attribute according to the first target orientation data and acquiring a second dynamic attribute according to the second target orientation data.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
As an optional scheme, the apparatus further comprises: a fourth obtaining unit, configured to, after obtaining the first dynamic attribute corresponding to each first target endpoint and the second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints, and building a target skeleton based on the first dynamic attribute and the second dynamic attribute,
acquiring control weight of each vertex in the target model by the target skeleton, wherein each vertex corresponds to each first target endpoint and each second target endpoint;
the first binding unit is used for binding the target skeleton and the target model after acquiring the first dynamic property corresponding to each first target endpoint and the second dynamic property corresponding to each second target endpoint in the plurality of second target endpoints, and building the target skeleton based on the first dynamic property and the second dynamic property, and controlling each vertex based on the control weight when the target skeleton changes so that the target model changes along with the change of the target skeleton.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
As an optional solution, the apparatus further includes: a first integration unit, for binding the target skeleton and the target model, and controlling each vertex based on the control weight when the target skeleton changes, so that after the target model changes along with the change of the target skeleton,
and under the condition that the target model is a sub-model of the target combination model and each sub-model of the target combination model is bound with the skeleton, integrating each sub-model to obtain the combination model bound with the skeleton.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
As an optional solution, the apparatus further includes:
the third determining unit is used for determining the central axis of the combined model after integrating each sub-model to obtain the combined model bound with the skeleton;
a fourth determining unit, configured to, after integrating the sub-models to obtain a combined model bound to the skeleton, obtain a plurality of first combination endpoints on a central axis of the target model, and determine combination orientation data corresponding to each first combination endpoint in the plurality of first combination endpoints;
a fifth determining unit, configured to determine, after integrating the sub-models to obtain a combined model bound to the bone, a plurality of second combination endpoints from the combined model data according to the combination orientation data when the combined model data corresponding to the combined model is obtained;
and the first adjusting unit is used for acquiring a first combined dynamic property corresponding to each first combined endpoint and a second combined dynamic property corresponding to each second combined endpoint in the plurality of second combined endpoints after integrating each sub-model to obtain a combined model bound with the skeleton, and adjusting the skeleton bound with the combined model based on the first combined dynamic property and the second combined dynamic property.
For a specific embodiment, reference may be made to the example shown in the bone construction method described above, and details in this example are not described herein again.
According to yet another aspect of an embodiment of the present application, there is also provided an electronic device for implementing the bone construction method described above, as shown in fig. 14, the electronic device comprising a memory 1402 and a processor 1404, the memory 1402 storing therein a computer program, the processor 1404 being configured to perform the steps of any of the method embodiments described above by means of the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, obtaining a target model of a bone to be bound, wherein the target model changes along with the change of the bone bound with the target model;
s2, determining a central axis of the target model, wherein the central axis is a mark line corresponding to a trunk part, and the trunk part is a part which guides the branch part of the target model to generate linkage change when the target model changes;
s3, obtaining a plurality of first target end points on the central axis, and determining target orientation data corresponding to each first target end point in the plurality of first target end points;
s4, under the condition that model data corresponding to the target model are obtained, determining a plurality of second target endpoints from the model data according to the target orientation data;
and S5, acquiring a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints, and building a target skeleton based on the first dynamic attribute and the second dynamic attribute.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 14 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, and a Mobile Internet Device (MID), a PAD, and the like. Fig. 14 does not limit the structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 14, or have a different configuration than shown in FIG. 14.
The memory 1402 may be used to store software programs and modules, such as program instructions/modules corresponding to the bone construction method and apparatus in the embodiment of the present application, and the processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, so as to implement the bone construction method described above. Memory 1402 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1402 can further include memory located remotely from the processor 1404, which can be connected to a terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1402 may be, but not limited to, specifically configured to store target orientation data, a first dynamic attribute, a second dynamic attribute, and other information. As an example, as shown in fig. 14, the memory 1402 may include, but is not limited to, a first obtaining unit 1302, a first determining unit 1304, a second obtaining unit 1306, a second determining unit 1308, and a first building unit 1310 in the bone building apparatus. In addition, other module units in the bone building apparatus described above may also be included, but are not limited to these, and are not described in detail in this example.
Optionally, the transmitting device 1406 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 1406 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmitting device 1406 is a Radio Frequency (RF) module used to communicate with the internet by wireless means.
In addition, the electronic device further includes: a display 1408 for displaying information such as the target orientation data, the first dynamic attribute, and the second dynamic attribute; and a connection bus 1410 for connecting the respective module parts in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication. A Peer-To-Peer (P2P) network may be formed between the nodes, and any type of computing device, such as a server, a terminal, and other electronic devices, may become a node in the blockchain system by joining the Peer-To-Peer network.
According to an aspect of the application, there is provided a computer program product comprising a computer program/instructions containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. When executed by the central processing unit, the computer programs perform various functions provided by the embodiments of the present application.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
It should be noted that the computer system of the electronic device is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments.
The computer system includes a Central Processing Unit (CPU) that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) or a program loaded from a storage section into a Random Access Memory (RAM). In the random access memory, various programs and data necessary for system operation are also stored. The central processor, the read-only memory and the random access memory are connected with each other through a bus. An Input/Output interface (i.e., I/O interface) is also connected to the bus.
The following components are connected to the input/output interface: an input section including a keyboard, a mouse, and the like; an output section including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section including a hard disk and the like; and a communication section including a network interface card such as a local area network card, a modem, or the like. The communication section performs communication processing via a network such as the internet. The driver is also connected to the input/output interface as needed. A removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive as necessary, so that a computer program read out therefrom is mounted into the storage section as necessary.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs, according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium. When executed by the central processing unit, performs various functions defined in the system of the present application.
According to an aspect of the present application, there is provided a computer-readable storage medium from which a processor of a computer device reads computer instructions, the processor executing the computer instructions to cause the computer device to perform the method provided in the above-mentioned various alternative implementations.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, obtaining a target model of a bone to be bound, wherein the target model changes along with the change of the bone to which the target model is bound;
s2, determining a central axis of the target model, wherein the central axis is a mark line corresponding to a trunk part, and the trunk part is a part which guides a branch part of the target model to generate linkage change when the target model changes;
s3, obtaining a plurality of first target end points on the central axis, and determining target orientation data corresponding to each first target end point in the plurality of first target end points;
s4, under the condition that model data corresponding to the target model are obtained, determining a plurality of second target endpoints from the model data according to the target orientation data;
and S5, acquiring a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints, and building a target skeleton based on the first dynamic attribute and the second dynamic attribute.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method of the embodiments of the present application.
In the embodiments of the present application, 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 the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (12)

1. A bone construction method, comprising:
acquiring a target model of a bone to be bound, wherein the target model changes along with the change of the bone to which the target model is bound;
determining a central axis of the target model, wherein the central axis is a mark line corresponding to a main part, and the main part is a part which guides a branch part of the target model to generate linkage change when the target model changes in the target model;
obtaining a plurality of first target end points on the central axis, and determining target orientation data corresponding to each first target end point in the plurality of first target end points;
under the condition that model data corresponding to the target model are obtained, determining a plurality of second target endpoints from the model data according to the target orientation data;
acquiring first dynamic attributes corresponding to the first target end points and second dynamic attributes corresponding to the second target end points in the second target end points, and building a target skeleton based on the first dynamic attributes and the second dynamic attributes;
the determining a plurality of second target endpoints from the model data according to the target orientation data includes: if the target orientation data comprises first orientation data, constructing each side wing line where each first target endpoint is located according to the first orientation data; determining the plurality of second target endpoints based on the flanking points on the respective flanking lines;
the obtaining a plurality of first target end points on the central axis and determining target orientation data corresponding to each of the plurality of first target end points includes: obtaining the plurality of first target endpoints, wherein the plurality of first target endpoints comprise a top endpoint and a bottom endpoint; sequencing the plurality of first target endpoints according to the direction from the bottom endpoint to the top endpoint, and determining a sequencing sequence of each first target endpoint; and calculating each first target endpoint based on the sequencing sequence to obtain the target orientation data.
2. The method of claim 1, wherein said determining the plurality of second target end points based on the flanking points on the respective flanking lines comprises:
under the condition that the target orientation data comprise second orientation data, indicating a side wing point on each side wing line according to the second orientation data to adsorb the model data, and determining target data successfully adsorbed by the side wing point from the model data;
determining a plurality of data points corresponding to the target data as the plurality of second target endpoints.
3. The method of claim 1,
prior to the determining the central axis of the object model, the method further comprises: acquiring a top end point of the target model and a bottom end point of the target model;
the determining the central axis of the target model includes: determining the central axis based on the top endpoint and the bottom endpoint.
4. The method of claim 1, wherein said computing each first target endpoint based on the ordered sequence to obtain the target orientation data comprises:
acquiring a first target endpoint to be calculated;
if the first target endpoint to be calculated is the top endpoint, calculating a first orientation vector of the top endpoint relative to the first endpoint, and determining the first orientation vector as target orientation data corresponding to the top endpoint, wherein the first endpoint is a first target endpoint of a previous sequence of the top endpoints in the plurality of first target endpoints; or, when the first target endpoint to be calculated is the bottom endpoint, calculating a second orientation vector of the bottom endpoint relative to a second endpoint, and determining the second orientation vector as target orientation data corresponding to the bottom endpoint, where the second endpoint is a first target endpoint of a sequence subsequent to the bottom endpoint in the plurality of first target endpoints.
5. The method of claim 1, wherein said computing the respective first target endpoints based on the ordered sequence to obtain the target orientation data comprises:
acquiring a first target endpoint to be calculated;
calculating a third orientation vector of the first target endpoint to be calculated relative to a third endpoint and a fourth orientation vector of the first target endpoint to be calculated relative to a fourth endpoint, wherein the third endpoint is the first target endpoint in the first target endpoints, the ordering sequence is the first target endpoint in the previous sequence of the first target endpoint to be calculated, and the fourth endpoint is the first target endpoint in the first target endpoints, the ordering sequence is the first target endpoint in the next sequence of the first target endpoint to be calculated;
performing integrated calculation on the third orientation vector and the fourth orientation vector to obtain a target orientation vector;
and determining the target orientation vector as target orientation data corresponding to the first target endpoint to be calculated.
6. The method according to any one of claims 1 to 5,
before the obtaining the first dynamic attributes corresponding to the first target endpoints and the second dynamic attributes corresponding to the second target endpoints of the second target endpoints, and building a target bone based on the first dynamic attributes and the second dynamic attributes, the method further includes: acquiring first target orientation data corresponding to each first target endpoint, wherein the first target orientation data comprises the target orientation data; acquiring second target orientation data corresponding to each second target endpoint;
the obtaining the first dynamic attributes corresponding to the first target endpoints and the second dynamic attributes corresponding to the second target endpoints in the second target endpoints, and building a target skeleton based on the first dynamic attributes and the second dynamic attributes includes: and acquiring the first dynamic attribute according to the first target orientation data and acquiring the second dynamic attribute according to the second target orientation data.
7. The method according to any one of claims 1 to 5, wherein after said obtaining the first dynamic attributes corresponding to the respective first target endpoints and the second dynamic attributes corresponding to the respective second target endpoints of the plurality of second target endpoints, and building a target bone based on the first dynamic attributes and the second dynamic attributes, the method further comprises:
obtaining control weights of the target skeleton to each vertex in the target model, wherein each vertex corresponds to each first target endpoint and each second target endpoint;
and binding the target skeleton and the target model, and controlling the vertexes based on the control weight when the target skeleton changes so as to enable the target model to change along with the change of the target skeleton.
8. The method of claim 7, wherein after said binding the target bone to the target model and controlling the respective vertices based on the control weights to change the target model as the target bone changes, the method further comprises:
and integrating all the submodels to obtain the combined model bound with the skeleton under the condition that the target model is a submodel of the target combined model and all the submodels of the target combined model are bound with the skeleton.
9. The method of claim 8, wherein after said integrating the respective submodels into a combined model that has been bound to bone, the method further comprises:
determining a central axis of the combined model;
acquiring a plurality of first combination end points on a central axis of the target model, and determining combination orientation data corresponding to each first combination end point in the plurality of first combination end points;
under the condition that combined model data corresponding to the combined model are obtained, determining a plurality of second combined endpoints from the combined model data according to the combined orientation data;
and acquiring a first combined dynamic attribute corresponding to each first combined end point and a second combined dynamic attribute corresponding to each second combined end point in the plurality of second combined end points, and adjusting the bone bound with the combined model based on the first combined dynamic attribute and the second combined dynamic attribute.
10. A bone construction device, comprising:
the bone binding method comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining a target model of a bone to be bound, and the target model changes along with the change of the bone to which the target model is bound;
the first determining unit is used for determining a central axis of the target model, wherein the central axis is a mark line corresponding to a main part, and the main part is a part which guides the branch parts of the target model to generate linkage change when the target model is changed;
a second obtaining unit, configured to obtain a plurality of first target end points on the central axis, and determine target orientation data corresponding to each first target end point of the plurality of first target end points;
the second determining unit is used for determining a plurality of second target end points from the model data according to the target orientation data under the condition that the model data corresponding to the target model is obtained;
the first building unit is used for obtaining a first dynamic attribute corresponding to each first target endpoint and a second dynamic attribute corresponding to each second target endpoint in the plurality of second target endpoints and building a target skeleton based on the first dynamic attribute and the second dynamic attribute;
the second determination unit includes: the first building module is used for building each side wing line where each first target endpoint is located according to the first orientation data under the condition that the target orientation data comprises the first orientation data; a first determining module for determining the plurality of second target end points based on the flanking points on the respective flanking lines;
the second acquisition unit includes: a second obtaining module, configured to obtain the first target endpoints, where the first target endpoints include a top endpoint and a bottom endpoint; a third determining module, configured to rank the multiple first target endpoints according to a direction from the bottom endpoint to the top endpoint, and determine a ranking sequence of each first target endpoint; and the first calculation module is used for calculating each first target endpoint based on the sequencing sequence to obtain the target orientation data.
11. A computer-readable storage medium, characterized in that it comprises a stored program, wherein the program is executable by a terminal device or a computer to perform the method of any one of claims 1 to 9.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 9 by means of the computer program.
CN202211139848.3A 2022-09-19 2022-09-19 Skeleton construction method, skeleton construction device, storage medium and electronic equipment Active CN115239890B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211139848.3A CN115239890B (en) 2022-09-19 2022-09-19 Skeleton construction method, skeleton construction device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211139848.3A CN115239890B (en) 2022-09-19 2022-09-19 Skeleton construction method, skeleton construction device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115239890A CN115239890A (en) 2022-10-25
CN115239890B true CN115239890B (en) 2023-03-14

Family

ID=83681247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211139848.3A Active CN115239890B (en) 2022-09-19 2022-09-19 Skeleton construction method, skeleton construction device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115239890B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254343A (en) * 2011-07-01 2011-11-23 浙江理工大学 Convex hull and OBB (Oriented Bounding Box)-based three-dimensional grid model framework extracting method
CN111243082A (en) * 2020-01-08 2020-06-05 浙江大学 Method, system, device and storage medium for obtaining digital image reconstruction image
CN111260764A (en) * 2020-02-04 2020-06-09 腾讯科技(深圳)有限公司 Method, device and storage medium for making animation
CN114581469A (en) * 2022-02-12 2022-06-03 瓴域影诺(北京)科技有限公司 Method and device for automatically extracting axes of femur and tibia of lower limb and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127819B (en) * 2016-06-30 2019-10-08 上海联影医疗科技有限公司 The method and device thereof of vessel centerline are extracted in medical image
CN112967374B (en) * 2021-02-20 2022-12-09 济南大学 Method and system for obtaining digital pre-bending model of orthopedic operation steel plate
CN113592987A (en) * 2021-07-15 2021-11-02 深圳市慧鲤科技有限公司 Skeleton mapping method and device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254343A (en) * 2011-07-01 2011-11-23 浙江理工大学 Convex hull and OBB (Oriented Bounding Box)-based three-dimensional grid model framework extracting method
CN111243082A (en) * 2020-01-08 2020-06-05 浙江大学 Method, system, device and storage medium for obtaining digital image reconstruction image
CN111260764A (en) * 2020-02-04 2020-06-09 腾讯科技(深圳)有限公司 Method, device and storage medium for making animation
CN114581469A (en) * 2022-02-12 2022-06-03 瓴域影诺(北京)科技有限公司 Method and device for automatically extracting axes of femur and tibia of lower limb and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"下肢外骨骼的动力学分析与运动规划";贾山;《中国博士学位论文全文数据库 医药卫生科技辑》;20170215(第02期);E080-41 *

Also Published As

Publication number Publication date
CN115239890A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
CN108919944A (en) A kind of virtual roaming method carrying out data lossless interaction in display end based on digital city model realization
Zhao Application of 3D CAD in landscape architecture design and optimization of hierarchical details
Xie et al. Tree modeling with real tree-parts examples
CN102044089A (en) Method for carrying out self-adaption simplification, gradual transmission and rapid charting on three-dimensional model
CN110889900A (en) Low-airspace-oriented three-dimensional modeling and visualization method
KR20100125106A (en) Apparatus and method for three-dimensional modeling using lattice structure
CN106611441A (en) Processing method and device for three-dimensional map
CN115661374B (en) Rapid retrieval method based on space division and model voxelization
CN113421338B (en) Method for three-dimensional rendering of two-dimensional vector
CN116091570B (en) Processing method and device of three-dimensional model, electronic equipment and storage medium
US7030875B2 (en) Environmental reasoning using geometric data structure
CN111508033A (en) Camera parameter determination method, image processing method, storage medium, and electronic apparatus
CN109697748A (en) Model compression processing method, model pinup picture processing method device, storage medium
CN109102565B (en) Method for automatically generating virtual terrain
CN113284249B (en) Multi-view three-dimensional human body reconstruction method and system based on graph neural network
CN113592015B (en) Method and device for positioning and training feature matching network
CN112991300B (en) Single wood skeleton extraction and visualization method based on neighborhood characteristics
Shardakov et al. Development of an adaptive module for visualization of the surrounding space for cloud educational environment
CN115239890B (en) Skeleton construction method, skeleton construction device, storage medium and electronic equipment
Williams et al. A time-line approach for the generation of simulated settlements
CN112687007A (en) LOD technology-based stereo grid map generation method
JP2832463B2 (en) 3D model reconstruction method and display method
CN113870406A (en) Free-form model making and material pasting method and readable storage medium
CN118261985B (en) Three-coordinate machine intelligent positioning detection method and system based on stereoscopic vision
KR20020079268A (en) The System and Method composing 3D contents with 3D human body in Virtual Reality with real time.

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40077100

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant