CN112102452B - Animation model processing method and device, electronic equipment and storage medium - Google Patents

Animation model processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112102452B
CN112102452B CN202011035179.6A CN202011035179A CN112102452B CN 112102452 B CN112102452 B CN 112102452B CN 202011035179 A CN202011035179 A CN 202011035179A CN 112102452 B CN112102452 B CN 112102452B
Authority
CN
China
Prior art keywords
animation model
bone
skeleton
adjustment
simplification
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
CN202011035179.6A
Other languages
Chinese (zh)
Other versions
CN112102452A (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.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development 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 Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202011035179.6A priority Critical patent/CN112102452B/en
Publication of CN112102452A publication Critical patent/CN112102452A/en
Application granted granted Critical
Publication of CN112102452B publication Critical patent/CN112102452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

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

Abstract

The application relates to an animation model processing method, an animation model processing device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a first original animation model; executing the simplification operation of the first original animation model according to the simplification strategy to obtain a first simplified animation model; rendering the first simplified animation model. According to the technical scheme, after face pinching/man pinching is completed, the animation model is simplified, the bone data volume in the animation model is reduced, the calculated amount in the rendering process is reduced, the calculated speed is improved, and the game fluency is optimized.

Description

Animation model processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for processing an animation model, an electronic device, and a storage medium.
Background
When the model bones are modified to pinch the face or pinch the person, if the parameters are completely opened, the number of the pinching face bones can reach 45, the number of the pinching person bones can be increased by about 50, and a certain memory can be loaded for recording and storing the modified parameters of each model bone. In the game engine, the complete skeleton participates in the calculation of the animation model, and the calculated amount is large. Moreover, if the animation models on the scene are more, the computer is slower to calculate, and the phenomena of display blocking, frame dropping and the like are easy to occur.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, embodiments of the present application provide an animation model processing method, an apparatus, an electronic device, and a storage medium.
According to an aspect of an embodiment of the present application, there is provided an animation model processing method, including:
acquiring a first original animation model;
executing the simplification operation of the first original animation model according to the simplification strategy to obtain a first simplified animation model;
rendering the first simplified animation model.
Optionally, the performing the simplifying operation on the first original animation model according to the simplifying policy includes:
acquiring skeleton data corresponding to the first original animation model;
assigning vertex information corresponding to the bone data to the vertex of the original animation model;
and deleting the modified bone data corresponding to the simplified strategy from the bone data.
Optionally, the performing the simplifying operation on the first original animation model according to the simplifying policy further includes:
determining the simplification level of the first original animation model according to the adjustment operation of the simplification control;
and determining the modified bone data corresponding to the simplification level.
Optionally, the method further comprises:
storing the first original animation model in a server;
when a first adjustment operation of the first simplified animation model is received, acquiring the first original animation model from the server;
executing the first adjustment operation on the first original animation model to obtain a second original animation model;
executing the simplification operation of the second original animation model according to the simplification strategy to obtain a second simplified animation model;
rendering the second simplified animation model;
the second raw animation model is stored in the server.
Optionally, the method further comprises:
acquiring performance parameters of equipment for performing rendering;
and determining the simplification strategy according to the performance parameters.
Optionally, the performing the first adjustment operation on the first raw animation model includes:
determining a current bone corresponding to the first adjustment operation and an adjustment bone corresponding to the current bone;
acquiring a first weight corresponding to the current skeleton and a second weight corresponding to the adjusted skeleton;
determining a second adjustment parameter corresponding to the adjustment skeleton according to a first adjustment parameter corresponding to the first adjustment operation, the first weight and the second weight;
and performing a second adjustment operation on the adjusted skeleton according to the second adjustment parameter.
Optionally, the determining the adjusted bone corresponding to the current bone includes:
acquiring a control state of an associated adjustment control;
when the control state is an open state, determining that the adjustment skeleton comprises the current skeleton and an associated skeleton with the current skeleton;
and when the control state is a closed state, determining that the adjusted skeleton is the current skeleton.
Optionally, when the second adjustment operation is a scaling operation, the performing the second adjustment operation on the adjustment skeleton according to the second adjustment parameter includes:
determining a scaling skeleton corresponding to the adjusting skeleton, binding the scaling skeleton with the animation model and inheriting the coordinates of the adjusting skeleton;
reversely obtaining a second scaling multiple of the scaling bone in the first coordinate axis direction according to the first scaling multiple of the adjusting bone in the first coordinate axis direction, wherein the first coordinate axis direction comprises one coordinate axis direction or two coordinate axis directions of the adjusting bone, and the scaling operation of the adjusting bone in the first coordinate axis direction is opposite to that of the scaling bone;
obtaining auxiliary adjustment parameters of the scaled bones according to the first coordinate axial direction and the second scaling multiple;
and performing adjustment of the scaling skeleton according to the auxiliary adjustment parameters.
According to another aspect of an embodiment of the present application, there is provided an animation model processing device, including:
the acquisition module is used for acquiring a first original animation model;
the simplification module is used for executing the simplification operation on the first original animation model according to the simplification strategy to obtain a first simplified animation model;
and the rendering module is used for rendering the first simplified animation model.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that performs the steps described above when running.
According to another aspect of an embodiment of the present application, there is provided an electronic device including: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the above-mentioned method steps when executing the computer program.
According to another aspect of the embodiments of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-mentioned method steps.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
after face pinching/man pinching is completed, the animation model is simplified, the bone data amount in the animation model is reduced, the calculated amount in the rendering process is reduced, the calculated speed is improved, and the game fluency is optimized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flowchart of an animation model processing method according to an embodiment of the present application;
FIG. 2 is a flowchart of an animation model processing method according to another embodiment of the present application;
FIG. 3a is a schematic diagram of a simplified control provided by an embodiment of the present application when closed;
FIG. 3b is a schematic diagram of a simplified control provided in an embodiment of the present application when open;
FIG. 3c is a schematic diagram of an associated adjustment control provided in accordance with another embodiment of the present application;
FIG. 4 is a flowchart of an animation model processing method according to another embodiment of the present application;
FIG. 5 is a flowchart of an animation model processing method according to another embodiment of the present application;
FIG. 6 is a flowchart of an animation model processing method according to another embodiment of the present application;
FIG. 7 is a schematic view of a bone hierarchy provided in an embodiment of the present application;
FIG. 8 is a flowchart of an animation model processing method according to another embodiment of the present application;
FIG. 9 is a block diagram of an animation model processing device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of 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 apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
According to the embodiment of the application, after face pinching/man pinching is completed, the animation model is simplified, vertex information corresponding to skeleton data is assigned to the vertex of the original animation model, the set face pinching/man pinching skeleton is deleted, and the modification parameters corresponding to the skeleton are included, so that the animation model obtained through rendering is a model after face pinching/man pinching, the skeleton quantity of the animation model is reduced, the calculated amount in the rendering process is reduced, the calculation speed is improved, and the game smoothness is optimized.
The following first describes a processing method for an animation model according to an embodiment of the present invention.
Fig. 1 is a flowchart of an animation model processing method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S11, a first original animation model is obtained;
step S12, executing the simplifying operation of the first original animation model according to the simplifying strategy to obtain a first simplified animation model;
and step S13, rendering the first simplified animation model.
Optionally, the simplification strategy may include presetting bones to be deleted, and may also include simplifying the animation model.
Through the steps S11 to S13, after face pinching/man pinching is completed, the animation model is simplified, the bone data amount in the animation model is reduced, the calculated amount in the rendering process is reduced, the calculating speed is improved, and the game smoothness is optimized.
Fig. 2 is a flowchart of an animation model processing method according to another embodiment of the present application. As shown in fig. 2, the step S12 includes the steps of:
step S21, acquiring skeleton data corresponding to a first original animation model;
step S22, assigning vertex information corresponding to the skeleton data to the vertexes of the original animation model;
step S23, deleting the modified bone data corresponding to the simplified strategy from the bone data.
Through the steps S21 to S23, after the face pinching/pinching is completed, the animation model is simplified, vertex information corresponding to skeleton data is assigned to the vertices of the original animation model, the set face pinching/pinching skeleton is deleted, and modification parameters corresponding to the skeleton are included, so that the animation model obtained by rendering is a model after face pinching/pinching, the skeleton amount of the animation model is reduced, the calculated amount in the rendering process is reduced, the calculation speed is improved, and the game smoothness is optimized.
In this embodiment, a control may be provided to simplify the control, which may be in the form of a slide bar, knob, or the like. By means of the simplification control, the simplification operation can be turned on or off, and the level of simplification can also be adjusted.
The step S12 further includes: determining a simplification level of the first original animation model according to the adjustment operation of the simplification control; modified bone data corresponding to the reduction level is determined.
Fig. 3a and 3b are schematic diagrams of a simplified control provided in an embodiment of the present application when closed and open, respectively. The reduced control may be a knob, as shown in fig. 3a, which is turned off when the knob 31 is vertical. When the knob 31 is horizontal, the reduced control is in an on state, as shown in fig. 3 b.
Fig. 3c is a schematic diagram of an associated adjustment control provided in another embodiment of the present application. As shown in fig. 3c, at least one gear 32 is provided on the simplified control. When the knob 31 is rotated to the gear 32, the animation model is simplified according to the level of simplification corresponding to the gear 32.
Optionally, a plurality of gears can be arranged on the simplified control, the corresponding simplified level of the gear 1 is 1, and 30% of bone data is deleted; the corresponding simplification level of the gear 2 is 2, and 50% of bone data are deleted; the corresponding reduction level of gear 3 is 3, and 70% of bone data are deleted.
In an alternative embodiment, the simplification strategy is automatically adjusted from processor to processor. The method further comprises the steps of: acquiring performance parameters of equipment for performing rendering; a simplification strategy is determined based on the performance parameters.
Wherein the device performing rendering may include: graphics processor (Graphics Processing Unit, GPU), central processing unit (Central Processing Unit, CPU), etc.
Wherein the performance parameters of the GPU include at least one of: core number, core frequency, memory bit width, memory frequency, memory size, etc.
The performance parameters of the CPU include at least one of: frequency, buffer capacity, operating voltage, bus mode, manufacturing process, superscalar, etc.
According to the performance parameters of the device, the corresponding performance level or performance score of the device can be calculated, and according to the performance level or performance score, a simplification strategy can be determined. When the device performing the rendering includes at least two, an average of the performance levels or performance scores of the at least two devices may be calculated, and a simplification policy may be determined based on the average.
Based on the performance parameters of the GPU or the CPU, whether the simplification control needs to be started or not can be determined, and if the simplification control needs to be started, the simplification level of the animation model, such as the percentage of the deleted skeleton data, can be determined according to the performance parameters.
In an alternative embodiment, whether the simplification control needs to be opened or not and the simplification level of the animation model after the simplification control is opened can be determined according to the number of animation models required to be rendered or the number of bones (or the bone data amount) required to be rendered under the same screen. For example, when the number of animation models to be rendered under the same screen is 1-3, the simplification control is not turned on, and when the number of animation models under the same screen is 4 or more, the simplification control is turned on. When the number of the animation models under the same screen is 4-6, adopting a simplification strategy of a simplification level 1, and deleting 30% of skeleton data of each animation model; when the number of the animation models under the same screen is 7-9, adopting a simplification strategy of a simplification level 2, and deleting 50% of skeleton data of each animation model; when the number of the on-screen animation models is 10 or more, a simplification strategy of a simplification level 3 is adopted, and 70% of skeleton data is deleted by each animation model.
In another alternative embodiment, the simplification policies may also be controlled by the user to be turned on or not, and the user may also select a level of simplification as desired.
In this embodiment, after the simplified operation is performed on the animation model, the original animation model is not deleted, but the simplified animation model is rendered, and the original animation model is stored in the server, so that the animation model is convenient to modify again later.
Fig. 4 is a flowchart of an animation model processing method according to another embodiment of the present application. As shown in fig. 4, the method comprises the steps of:
step S31, storing a first original animation model in a server;
step S32, when a first adjustment operation of the first simplified animation model is received, acquiring a first original animation model from a server;
step S33, executing a first adjustment operation on the first original animation model to obtain a second original animation model;
step S34, executing the simplified operation of the second original animation model according to the simplified strategy to obtain a second simplified animation model;
step S35, rendering the second simplified animation model;
step S36, the second original animation model is stored in the server.
Alternatively, the simplification strategy in the above step S34 may be the same as or different from the simplification strategy in the above step S12.
Through the steps S31 to S36, when the adjustment operation on the first simplified animation model is received, the first original animation model which is not simplified is obtained from the server, the first original animation model is simplified to obtain the second simplified animation model for rendering, and the second original animation model after the adjustment on the first original animation model is still stored on the server, so that the calculated amount of the rendering process is reduced, and the simplified model can be recovered or modified again, thereby improving the usability of pinching faces/pinching people.
In this embodiment, when the animation model is adjusted, because there is a certain association relationship between bones, other bones associated with the current bone can be adjusted when the current bone is adjusted.
Fig. 5 is a flowchart of an animation model processing method according to another embodiment of the present application. As shown in fig. 5, the step S33 includes:
step S41, determining a current bone corresponding to the first adjustment operation and an adjustment bone corresponding to the current bone;
step S42, obtaining a first weight corresponding to the current skeleton and adjusting a second weight corresponding to the skeleton;
step S43, determining a second adjustment parameter corresponding to the bone according to the first adjustment parameter, the first weight and the second weight corresponding to the first adjustment operation;
step S44, a second adjustment operation for adjusting the skeleton is performed according to the second adjustment parameters.
In this embodiment, when a user adjusts one of the bones, the corresponding adjusting bone of the bone also performs a corresponding adjusting operation, so as to realize synchronous adjustment of the bone and the associated bone, and quickly and accurately adjust the effect of the animation model according to the needs of the user. Meanwhile, the user does not need to manually adjust each bone one by one, and other related bones can be synchronously adjusted only by adjusting one bone, so that the complexity of bone adjusting operation is reduced.
For interrelated bones, each bone has its corresponding weight representing the corresponding adjustment relationship of the bones during adjustment. For example, each bone is divided into 31 gears of-15 to 15 according to the original bone data, the weight of the current bone A is 0.6, the weight of the associated bone B is 1.2, and each time the current bone A adjusts 0.6 gears, the associated bone B adjusts 1.2 gears. If the current bone a is adjusted 3 gears from the initial position, the associated bone B is adjusted 3×1.2++0.6=6 gears.
The weight may be an adjustment relationship between actual bone data, including a relationship between adjustment parameters such as a rotation angle, a displacement distance, etc., that is, the adjustment parameters are directly calculated according to the bone data of the current bone, and the adjustment parameters corresponding to the associated bone are calculated according to the weight of each bone, which is not described herein.
In an alternative embodiment, the adjusted face bone range corresponding to the current face bone may be determined based on the opening or closing of the associated adjustment control. The step S41 includes the steps of: acquiring a control state of an associated adjustment control; when the control state is an open state, determining that the adjustment skeleton comprises a current skeleton and an associated skeleton with the current skeleton; and when the control state is in the closed state, determining to adjust the skeleton to be the current skeleton.
For example, for a bone to which an eye corresponds, when the associated condition control is closed, the user adjusts the "right orbit" bone, and the other bones "right inner canthus", "right outer canthus", "left orbit", "left inner canthus" and "left outer canthus" are not associated with the adjustment. The associated skeleton of the "right orbit" will be adjusted synchronously only when the associated condition control is on.
Optionally, when the control state is an on state, the control state further includes an association range level; the step S41 further includes: and determining the associated skeleton of the current skeleton according to the associated range level.
For example, for a bone to which the eye corresponds, when the associated range level is one level, the user adjusts the bone of the "right eye socket", only the bones of the "right inner eye corner" and the "right outer eye corner" follow the adjustment, while the bones of the "left eye socket", "left inner eye corner" and "left outer eye corner" remain unchanged.
Optionally, a plurality of gears can be further set on the associated adjustment control, and associated bone ranges corresponding to different gears are different. For example, for an eye bone, the associated bone corresponding to gear 1 is all the eye bones; the associated bones corresponding to the gear 2 comprise nose bones besides all bones of eyes; the associated bones corresponding to the gear 2 comprise the bones of the mouth besides all the bones of the eyes and the bones of the nose.
In the above embodiment, each gear of the association adjustment control is associated with the skeletal data selection range of the tree. When the associated adjustment control is opened, reading all the sub-skeletons of the current skeleton; when the associated adjustment control is closed, only the current skeleton is read; when the associated adjusting control is in a certain gear, reading the sub-skeleton of the corresponding range of the gear. In the bone adjustment process, the father bone of the current bone is not affected generally, but the father bone can be controlled to make corresponding following adjustment when adjusting the specific bone according to the requirement.
In an alternative embodiment, when multiple associated bones are adjusted, each bone requires a uniform initial state, i.e., multiple bones begin to adjust from the same initial state. The step S44 includes: acquiring an intermediate gear and a parameter adjusting range corresponding to the related skeleton, wherein the intermediate gear of the current skeleton is the same as that of the related skeleton; and determining a second adjusting parameter corresponding to the second adjusting gear according to the intermediate gear and the parameter adjusting range.
When adjusting a plurality of associated bones, the initial states of the bones, namely the intermediate states of the bones, need to be synchronized, so that the associated bones can be uniformly adjusted later. Fig. 6 is a flowchart of an animation model processing method according to another embodiment of the present application. As shown in fig. 6, the method further includes the step of determining intermediate gear positions of each bone, specifically as follows:
step S51, acquiring a first parameter adjusting range of a current bone, a second parameter adjusting range of a related bone and the gear numbers of a first adjusting component and a second adjusting component;
step S52, determining a first original gear corresponding to the original bone data of the current bone according to the first parameter adjusting range and the gear number, and determining a second original gear corresponding to the original bone data of the related bone according to the second parameter adjusting range and the gear number;
step S53, calculating an intermediate gear according to the first original gear, the second original gear, the first weight and the second weight.
The process of determining the intermediate gear is described in detail below by way of one specific example.
Each skeleton is divided into-15 to 15 total 31 gears according to the original skeleton data.
The associated three bones A, B, C are calculated to have their original gear-10, 7,1, respectively, based on their original bone data.
If the weights corresponding to the bones A, B, C are the same, the intermediate gear is
If the weights corresponding to the skeletons A, B, C are 0.6,1.2,0.8, the intermediate gear is
In this way, the skeleton A, B, C is adjusted by taking the same intermediate gear as a starting point, and the initial state is different from the original effect, but the error is relatively small, so that the subsequent multi-skeleton association adjustment is facilitated.
In this embodiment, in order to more freely adjust the bone, the user may pinch an exaggerated and abnormal face shape, so that the user may freely play the face, and at least one axial adjustment of the bone is allowed when the scaling operation is performed on the bone during the face pinching process.
In this example, a scaled bone xxx_Adjust (xxx is the bone name of the bone) is implanted into the bone. Fig. 7 is a schematic diagram of a bone hierarchy provided in an embodiment of the present application. As shown in fig. 7, each bone has its corresponding subset bone, which subset bone includes the corresponding scaled bone of the bone, and if there is a sub-bone, the subset bone also includes a sub-bone, which sub-bone also has its corresponding scaled bone and sub-bone, … …
For example, bone A, B and Head bone Head are both sub-bones of the Root bone Root. Wherein, subset bones of bone a comprise: the scaling skeleton a_adjust of the skeleton, and the child skeleton a_1 of the skeleton a, the child skeleton a_1 also having its corresponding scaling skeleton a_1_adjust.
Subset bones of bone B include: a scaling skeleton b_adjust of the skeleton, and a sub-skeleton b_1 of the skeleton B, a subset skeleton of the sub-skeleton b_1 comprising: scaling skeleton b_1_adjust and sub-skeleton b_2, while sub-skeleton b_2 also has its corresponding scaling skeleton b_2_adjust.
The subset bones of the Head bone Head include the Head Adjust bone head_adjust, while the face bones c_1, c_2, and c_3 are subset bones of the Head Adjust bone head_adjust. Facial bones include eye bones, nose bones, mouth bones, and the like.
Wherein, the scaling skeleton inherits the coordinates of the corresponding skeleton and is bound with the animation model.
Optionally, the scaled bone is a bone of a bone, aligned with a CS bone of the bone.
Wherein the bone skeleton, i.e. the animation skeleton, and the animation model has a skeleton structure composed of interconnected animation skeletons, and the animation is generated for the model by changing the orientation and position of the bone skeleton.
CS skeleton, character Studio, is a very important insert for 3DS MAX, to simulate the actions of humans and bipedal animals.
Aligning the scaling bone with the CS bone, and scaling the scaling bone to be the same size as the CS bone and moving to the same location as the CS bone.
Fig. 8 is a flowchart of an animation model processing method according to another embodiment of the present application. As shown in fig. 8, when the second adjustment operation is a zoom operation, the above-described step S44 includes the steps of:
step S61, determining a scaling skeleton corresponding to the adjusting skeleton, binding the scaling skeleton with the animation model and inheriting the coordinates of the adjusting skeleton;
step S62, reversely obtaining a second scaling multiple of the scaling bone in the first coordinate axis direction according to the first scaling multiple of the scaling bone in the first coordinate axis direction, wherein the first coordinate axis direction comprises one coordinate axis direction or two coordinate axis directions of the scaling bone, and the scaling operation of the scaling bone in the first coordinate axis direction is opposite to the scaling operation of the scaling bone in the first coordinate axis direction;
step S63, obtaining auxiliary adjustment parameters of scaled bones according to the first coordinate axial direction and the second scaling multiple;
step S64, adjusting the scaling skeleton according to the auxiliary adjusting parameters.
Wherein the second scaling factor may be less than or equal to the first scaling factor.
For example, when it is desired to enlarge the length of bone a, the bone a is enlarged overall in the direction of the three axes X, Y, Z, the bone length is enlarged in the direction of the X axis, the bone thickness is enlarged in the direction of the Y, Z, and the overall magnification is the same in all three axes.
To achieve scaling of only the length of bone a, it is necessary to control scaling of bone a_adjust in the Y, Z axial direction by a scaling factor that may be slightly less than or equal to the overall scaling factor on the three axes in Y, Z axial direction.
Thus, by the zooming-in operation on the joint bone a and the zooming-out operation on the zoomed bone a_adjust, the bone a is elongated only in length and the bone thickness is not changed as a whole.
For another example, when it is desired to Adjust only the thickness of the bone B, only the change in the scaling bone b_adjust of the bone B in the Y, Z axis may be adjusted. For example, when scaling the thickness of the abdominal bone abdomens, its scaled bone abdomens_adjust may be adjusted only in the Y, Z axial direction. Thus, bone B is scaled only in thickness, with no change in length.
Through the embodiment, the single-axial or two-axial adjustment of bones can be realized, and the free change of the body of the animation model is realized. And because the animation model is bound with the scaling skeleton, the regulated skeleton can adapt to animation motion and interaction effects.
The following are device embodiments of the present application, which may be used to perform method embodiments of the present application.
Fig. 9 is a block diagram of an animation model processing device according to an embodiment of the present application, where the device may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 9, the animation model processing device includes:
the acquisition module 1 is used for acquiring a first original animation model;
a simplification module 2, configured to perform a simplification operation on the first original animation model according to a simplification policy, to obtain a first simplified animation model;
and the rendering module 3 is used for rendering the first simplified animation model.
Optionally, the simplification module 2 is configured to obtain skeletal data corresponding to the first original animation model; assigning vertex information corresponding to the bone data to the vertex of the original animation model; and deleting the modified bone data corresponding to the simplified strategy from the bone data.
Optionally, the simplification module 2 is further configured to determine, according to an adjustment operation on a simplification control, a simplification level of the first original animation model; and determining the modified bone data corresponding to the simplification level.
Optionally, the apparatus further comprises: a memory module 4 and an adjustment module 5.
A storage module 4, configured to store the first raw animation model in a server;
an obtaining module 1, configured to obtain, when receiving a first adjustment operation on the first simplified animation model, the first original animation model from the server;
the adjusting module 5 is configured to perform the first adjusting operation on the first original animation model to obtain a second original animation model;
a simplification module 2, configured to perform a simplification operation on the second original animation model according to the simplification policy, to obtain a second simplified animation model;
a rendering module 3, configured to render the second simplified animation model;
and the storage module 4 is used for storing the second original animation model in the server.
Optionally, the apparatus further comprises:
a parameter acquisition module 6 for acquiring performance parameters of the device performing the rendering;
a policy determining module 7, configured to determine the reduced policy according to the performance parameter.
Optionally, the adjusting module 5 is configured to determine a current bone corresponding to the first adjusting operation and an adjusted bone corresponding to the current bone; acquiring a first weight corresponding to the current skeleton and a second weight corresponding to the adjusted skeleton; determining a second adjustment parameter corresponding to the adjustment skeleton according to a first adjustment parameter corresponding to the first adjustment operation, the first weight and the second weight; and performing a second adjustment operation on the adjusted skeleton according to the second adjustment parameter.
Optionally, the adjustment module 5 is further configured to obtain a control state of the associated adjustment control; when the control state is an open state, determining that the adjustment skeleton comprises the current skeleton and an associated skeleton with the current skeleton; and when the control state is a closed state, determining that the adjusted skeleton is the current skeleton.
Optionally, the adjusting module 5 is configured to determine, when the second adjusting operation is a scaling operation, a scaling skeleton corresponding to the adjusting skeleton, where the scaling skeleton is bound to the animation model and inherits coordinates of the adjusting skeleton; reversely obtaining a second scaling multiple of the scaling bone in the first coordinate axis direction according to the first scaling multiple of the adjusting bone in the first coordinate axis direction, wherein the first coordinate axis direction comprises one coordinate axis direction or two coordinate axis directions of the adjusting bone, and the scaling operation of the adjusting bone in the first coordinate axis direction is opposite to that of the scaling bone; obtaining auxiliary adjustment parameters of the scaled bones according to the first coordinate axial direction and the second scaling multiple; and performing adjustment of the scaling skeleton according to the auxiliary adjustment parameters.
The embodiment of the application further provides an electronic device, as shown in fig. 10, where the electronic device may include: the device comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 are in communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501, when executing the computer program stored in the memory 1503, implements the steps of the method embodiments described below.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, pi) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method embodiments described below.
It should be noted that, with respect to the apparatus, electronic device, and computer-readable storage medium embodiments described above, since they are substantially similar to the method embodiments, the description is relatively simple, and reference should be made to the description of the method embodiments for relevant points.
It is further noted that relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for processing an animation model, comprising:
acquiring a first original animation model;
executing the simplification operation of the first original animation model according to the simplification strategy to obtain a first simplified animation model; the simplification strategy comprises presetting bones to be deleted or simplifying levels of animation models;
rendering the first simplified animation model;
the method further comprises the steps of:
storing the first original animation model in a server;
when a first adjustment operation of the first simplified animation model is received, acquiring the first original animation model from the server;
executing the first adjustment operation on the first original animation model to obtain a second original animation model;
executing the simplification operation of the second original animation model according to the simplification strategy to obtain a second simplified animation model;
rendering the second simplified animation model;
the second raw animation model is stored in the server.
2. The method of claim 1, wherein the performing a reduced operation on the first raw animation model according to a reduced policy comprises:
acquiring skeleton data corresponding to the first original animation model;
assigning vertex information corresponding to the bone data to the vertex of the original animation model;
and deleting the modified bone data corresponding to the simplified strategy from the bone data.
3. The method of claim 2, wherein the performing a reduced operation on the first raw animation model according to a reduced policy further comprises:
determining the simplification level of the first original animation model according to the adjustment operation of the simplification control;
and determining the modified bone data corresponding to the simplification level.
4. A method according to any one of claims 1-3, characterized in that the method further comprises:
acquiring performance parameters of equipment for performing rendering;
and determining the simplification strategy according to the performance parameters.
5. The method of claim 1, wherein the performing the first adjustment operation on the first raw animation model comprises:
determining a current bone corresponding to the first adjustment operation and an adjustment bone corresponding to the current bone;
acquiring a first weight corresponding to the current skeleton and a second weight corresponding to the adjusted skeleton;
determining a second adjustment parameter corresponding to the adjustment skeleton according to a first adjustment parameter corresponding to the first adjustment operation, the first weight and the second weight;
and performing a second adjustment operation on the adjusted skeleton according to the second adjustment parameter.
6. The method of claim 5, wherein the determining the adjusted bone corresponding to the current bone comprises:
acquiring a control state of an associated adjustment control;
when the control state is an open state, determining that the adjustment skeleton comprises the current skeleton and an associated skeleton with the current skeleton;
and when the control state is a closed state, determining that the adjusted skeleton is the current skeleton.
7. The method of claim 5, wherein when the second adjustment operation is a zoom operation, the performing a second adjustment operation on the adjusted bone according to the second adjustment parameter comprises:
determining a scaling skeleton corresponding to the adjusting skeleton, binding the scaling skeleton with the animation model and inheriting the coordinates of the adjusting skeleton;
reversely obtaining a second scaling multiple of the scaling bone in the first coordinate axis direction according to the first scaling multiple of the adjusting bone in the first coordinate axis direction, wherein the first coordinate axis direction comprises one coordinate axis direction or two coordinate axis directions of the adjusting bone, and the scaling operation of the adjusting bone in the first coordinate axis direction is opposite to that of the scaling bone;
obtaining auxiliary adjustment parameters of the scaled bones according to the first coordinate axial direction and the second scaling multiple;
and performing adjustment of the scaling skeleton according to the auxiliary adjustment parameters.
8. An animation model processing device, comprising:
the acquisition module is used for acquiring a first original animation model;
the simplification module is used for executing the simplification operation on the first original animation model according to the simplification strategy to obtain a first simplified animation model; the simplification strategy comprises presetting bones to be deleted or simplifying levels of animation models;
the rendering module is used for rendering the first simplified animation model;
the apparatus further comprises: the storage module and the adjustment module are used for storing the data,
the storage module is used for storing the first original animation model in a server;
the acquisition module is used for acquiring the first original animation model from the server when receiving a first adjustment operation of the first simplified animation model;
the adjusting module is used for executing the first adjusting operation on the first original animation model to obtain a second original animation model;
the simplification module is used for executing the simplification operation of the second original animation model according to the simplification strategy to obtain a second simplified animation model;
the rendering module is used for rendering the second simplified animation model;
the storage module is used for storing the second original animation model in the server.
9. An electronic device, comprising: the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor being adapted to carry out the method steps of any one of claims 1-7 when the computer program is executed.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the method steps of any of claims 1-7.
CN202011035179.6A 2020-09-27 2020-09-27 Animation model processing method and device, electronic equipment and storage medium Active CN112102452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011035179.6A CN112102452B (en) 2020-09-27 2020-09-27 Animation model processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011035179.6A CN112102452B (en) 2020-09-27 2020-09-27 Animation model processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112102452A CN112102452A (en) 2020-12-18
CN112102452B true CN112102452B (en) 2024-03-22

Family

ID=73782415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011035179.6A Active CN112102452B (en) 2020-09-27 2020-09-27 Animation model processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112102452B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007072916A (en) * 2005-09-08 2007-03-22 Ricoh Co Ltd Three-dimensional shape data capacity reduction apparatus, three-dimensional animation reproducer, three-dimensional shape data capacity reduction method, three-dimensional animation reproduction method, and program
CN101308579A (en) * 2008-05-12 2008-11-19 中山大学 Adaptive simplifying method for three-dimensional animation model
CN101356549A (en) * 2003-05-14 2009-01-28 皮克萨公司 Defrobulated angles for character joint representation
CN101770655A (en) * 2009-12-25 2010-07-07 电子科技大学 Method for simplifying large-scale virtual dynamic group
WO2014008387A2 (en) * 2012-07-05 2014-01-09 King Abdullah University Of Science And Technology Three-dimensional object compression
CN104077797A (en) * 2014-05-19 2014-10-01 无锡梵天信息技术股份有限公司 Three-dimensional game animation system
CN105894555A (en) * 2016-03-30 2016-08-24 腾讯科技(深圳)有限公司 Method and device for simulating body motions of animation model
CN107527384A (en) * 2017-07-14 2017-12-29 中山大学 A kind of lattice simplified method of Three-Dimensional Dynamic based on motion feature and its system
CN206975717U (en) * 2017-08-08 2018-02-06 南京美卡数字科技有限公司 A kind of rendering device of extensive three-dimensional animation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020080143A1 (en) * 2000-11-08 2002-06-27 Morgan David L. Rendering non-interactive three-dimensional content

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101356549A (en) * 2003-05-14 2009-01-28 皮克萨公司 Defrobulated angles for character joint representation
JP2007072916A (en) * 2005-09-08 2007-03-22 Ricoh Co Ltd Three-dimensional shape data capacity reduction apparatus, three-dimensional animation reproducer, three-dimensional shape data capacity reduction method, three-dimensional animation reproduction method, and program
CN101308579A (en) * 2008-05-12 2008-11-19 中山大学 Adaptive simplifying method for three-dimensional animation model
CN101770655A (en) * 2009-12-25 2010-07-07 电子科技大学 Method for simplifying large-scale virtual dynamic group
WO2014008387A2 (en) * 2012-07-05 2014-01-09 King Abdullah University Of Science And Technology Three-dimensional object compression
CN104077797A (en) * 2014-05-19 2014-10-01 无锡梵天信息技术股份有限公司 Three-dimensional game animation system
CN105894555A (en) * 2016-03-30 2016-08-24 腾讯科技(深圳)有限公司 Method and device for simulating body motions of animation model
CN107527384A (en) * 2017-07-14 2017-12-29 中山大学 A kind of lattice simplified method of Three-Dimensional Dynamic based on motion feature and its system
CN206975717U (en) * 2017-08-08 2018-02-06 南京美卡数字科技有限公司 A kind of rendering device of extensive three-dimensional animation

Also Published As

Publication number Publication date
CN112102452A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US7038701B2 (en) Method for zooming
US10171729B2 (en) Directional adjustment for a camera based on exposure quality information
JP4355697B2 (en) Graphic model generation method and graphic model generation apparatus
KR20200087798A (en) Special effects program file package and methods and devices for creating special effects, electronic devices
WO1999053445A1 (en) Image processing apparatus and image processing method, program providing medium, and data providing medium
US8102403B1 (en) Techniques for interior coordinates
EP2579215A2 (en) Multipoint offset sampling deformation
CN109064549A (en) Index point detection model generation method and mark point detecting method
JP2007102734A (en) Image processor, image processing method and program
CN101578635B (en) Game device, and game device control method
CN111932659A (en) Method for processing skeleton model data, computer device and storage medium
CN112102452B (en) Animation model processing method and device, electronic equipment and storage medium
JP2000242811A (en) Image processing method and its image processor, and recording medium where integrated shaped model data and image processing program used for the same are recorded
CN112090082A (en) Facial skeleton processing method and device, electronic equipment and storage medium
US7372464B2 (en) Processing image data
JP2007234033A (en) Three-dimensional game apparatus and information storage medium
CN112102453B (en) Animation model skeleton processing method and device, electronic equipment and storage medium
US11948240B2 (en) Systems and methods for computer animation using an order of operations deformation engine
CN115908664B (en) Animation generation method and device for man-machine interaction, computer equipment and storage medium
CN116843809A (en) Virtual character processing method and device
WO2023173828A1 (en) Scene element processing method and apparatus, device, and medium
CN109074670B (en) Information processing apparatus, image generating method, and recording medium
CN116052263A (en) Control method and electronic equipment
CN108510433A (en) Space representation method, apparatus and terminal
CN101578634B (en) Image processor, and image processing method

Legal Events

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