CN101872490A - Improved three-dimensional model deformation method under abrupt change in coordinate axis direction - Google Patents

Improved three-dimensional model deformation method under abrupt change in coordinate axis direction Download PDF

Info

Publication number
CN101872490A
CN101872490A CN 201010216621 CN201010216621A CN101872490A CN 101872490 A CN101872490 A CN 101872490A CN 201010216621 CN201010216621 CN 201010216621 CN 201010216621 A CN201010216621 A CN 201010216621A CN 101872490 A CN101872490 A CN 101872490A
Authority
CN
China
Prior art keywords
dimensional model
summit
bone
deformation
local coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 201010216621
Other languages
Chinese (zh)
Inventor
陈宇峰
郝云生
李立杰
李凤霞
张姮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
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 Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN 201010216621 priority Critical patent/CN101872490A/en
Publication of CN101872490A publication Critical patent/CN101872490A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The invention discloses an improved three-dimensional model deformation method under abrupt change in coordinate axis direction, in which a three-dimensional model is divided into a deformation area, a transition area and a non-deformation area. In the deformation area of the three-dimensional model, the local coordinate of the deformed grid peak is obtained by utilizing an interpolation method to compute an arc curve corresponding to the grid peak after bending deformation so as to realize smooth transition of the surface of the three-dimensional model at the nearby area of a joint point and the stretching and compression in the corresponding area of the three-dimensional area after bending deformation; the local coordinate of the grid peak after deformation in the non-deformation area is obtained by carrying out European style conversion on a part of peaks in the non-deformation area; the smooth transition between the non-deformation area and the deformation area on the surface of the three-dimensional model is realized via interpolation on the distance from the grid peak in the transition area to skeleton; and the bending deformation of the three-dimensional model when the included angle of the skeleton is larger than 180 degrees is realized by revising the computation process of the local coordinates of the grid peaks of the deformation area, the transition area and the non-deformation area under abrupt change in coordinate axis direction of a local coordinate system.

Description

Three-dimensional model deformation method under a kind of improved abrupt change in coordinate axis direction
Technical field
The present invention relates to the three-dimensional model deformation method under a kind of improved abrupt change in coordinate axis direction, belong to computer graphics, virtual reality technology field.
Background technology
In the distortion of three-dimensional model, following several deformation technology is arranged usually: Morphing method, FFD deformation method, based on the deformation method of bone.The Morphing method realizes distortion by interpolation method, and the control volume that the FFD deformation method surrounds the three-dimensional model surface by control is realized distortion, realizes distortion by the model surface grid vertex is set corresponding to the weights that influence of bone based on the deformation technology of bone.
For actor model, two parts packets of information is arranged usually with which, the model bone information of the surface mesh information of representation model geometric properties and representation model topological characteristic.The distortion of actor model has following characteristics usually: distortion occurs near the zone the articulation point, belongs to local deformation; Distortion causes that around an articulation point rotation therefore the model after the distortion is consistent with the motion conditions of bone by one section bone.
The Morphing method belongs to overall situation distortion, and can not combine with the motion of bone; The FFD deformation method is to each summit of three-dimensional model, all needs by calculating this summit to the polynomial expression of all control vertexs with the coordinate after obtaining this vertex deformation, and the The deformation calculation complexity can not reach the deformation velocity that meets the demands; Need the user to carry out repeatedly adjustment based on the deformation method of bone, increased the use difficulty influencing weights.
In " a kind of method for bending deformation of three-dimensional model " based on circular curve, three-dimensional model is divided into distorted area, zone of transition and non-deformation zone, in flexural deformation, by the coordinate after the circular curve acquisition distorted area grid vertex distortion of calculating distorted area grid vertex correspondence, according to the flexural deformation parameter non-deformation zone grid vertex is carried out corresponding euclidean transformation, by the zone of transition grid vertex is carried out the seamless link that interpolation realizes distorted area and non-deformation zone apart from the distance of bone.
But in flexural deformation, when angle of bend less than 0, the angle that is the bone of articulation point both sides increases, the angle of the bone of articulation point both sides may be greater than 180 ° at this moment, then after after the distortion local coordinate system being upgraded to the transformation matrix of world coordinate system, the x axle of local coordinate system and z direction of principal axis are opposite with original direction, are called abrupt change in coordinate axis direction.In this case, use said method will obtain wrong deformation result.
At the deficiency of said method, the inventive method proposes the three-dimensional model deformation method under a kind of improved abrupt change in coordinate axis direction.
Summary of the invention
The objective of the invention is to overcome the defective of prior art,, propose the three-dimensional model deformation method under a kind of improved abrupt change in coordinate axis direction in order to solve the problem of the quick distortion true to nature of actor model.
The present invention is achieved through the following technical solutions:
The skeletal structure of three-dimensional model is: articulation point A and O connect into bone OA, and articulation point B and O connect into bone OB, and bone OA and bone OB are positioned near the axis of three-dimensional model.
Use the local coordinate after following method is calculated the three-dimensional model vertex deformation:
(1) near three-dimensional model surface mesh shangguan node O, selects two summit P 1, P 2,, should make plane OP as preferably 1P 2With bone OA and bone OB angle separately about equally.
(2) obtain plane OP according to following method 1P 2Equation coefficient,
1. calculate tri-vector
Figure BSA00000167066700021
Wherein * the vectorial multiplication cross of expression;
2. n=n '/| n ' |, variable s=-n μ oμ wherein oThe vector representation of the coordinate of expression articulation point O in world coordinate system; The dot product of expression vector;
3. V=[n, s]; V has stored plane OP 1P 2Four coefficients of equation,
The coefficient of plane equation is meant A, B, C and the D among the Ax+By+Cz+D=0.
(3), judge its grid vertex and plane OP to each triangular mesh of three-dimensional model 1P 2Relation, if all summits of grid all with articulation point A at plane OP 1P 2The same side, judge that then this triangular mesh belongs to bone OA, otherwise judge that this triangular mesh belongs to bone OB; If all do not constitute in the master pattern, then need before judgement, regard non-triangular mesh as a plurality of triangles and form by triangular mesh.
Judge that summit and articulation point A are at plane OP 1P 2The same side method be:
To a summit in the grid, the vector representation of the coordinate in world coordinate system is P, and the vector representation of the coordinate of articulation point A in world coordinate system is μ A,
Calculate f P=nP+s, f A=n μ AIf+s is f PWith f AJack per line judges that then summit P and summit A are at plane OP 1P 2The same side, otherwise judge that summit P and summit A be not at plane OP 1P 2The same side.
(4) make the local coordinate of calculating the three-dimensional model correspondence with the following method be tied to the transformation matrix F of world coordinate system 1:
F 1Be 4 * 4 matrixes, F 1 = α 1 T β 1 T γ 1 T μ o T 0 0 0 1 ,
Subscript T representing matrix matrix transpose operation wherein,
And, vector Vector γ 11'/| γ 1' |,
Figure BSA00000167066700032
Vector α 11* γ 1
(5) make the local coordinate of calculating each grid vertex of three-dimensional model with the following method:
The local coordinate of grid vertex P is μ in the three-dimensional model P 'PF 1 -T, μ wherein PThe vector representation of the expression coordinate of summit P in world coordinate system, subscript-T represents earlier matrix is carried out matrix transpose operation again to finding the inverse matrix as a result.
(6) the local coordinate μ of articulation point B B 'BF 1 -T, μ wherein BThe vector representation of the coordinate of expression articulation point B in world coordinate system.
(7) according to following method three-dimensional model is divided into distorted area, zone of transition and non-deformation zone,
1. set the maximal projection value d of vector on bone OA and bone OB that distorted area grid vertex and articulation point O constitute;
2. set the value L of minimum projection of vector on bone OA that non-deformation zone grid vertex and articulation point O constitute 1, and the value L of the minimum projection on bone OB 2Should guarantee when being provided with that d is less than L 1, L 2Among minimum value;
3. in three-dimensional model, to belonging to each grid vertex of bone OA, its local coordinate that obtains in step (5) is written as P=, and (x, y z), less than d, judge then that this summit belongs to the distorted area as if y; If y is greater than L 1, judge that then this summit belongs to non-deformation zone; If y is more than or equal to d and smaller or equal to L 1, judge that then this summit belongs to zone of transition;
4. in three-dimensional model,, use μ to belonging to each grid vertex of bone OB P 'The local coordinate of representing this summit is calculated l PP 'μ B '/ | μ B '|, if l PLess than d, judge that then this summit belongs to the distorted area; If l PGreater than L 2, judge that then this summit belongs to non-deformation zone; If l PMore than or equal to d and smaller or equal to L 2, judge that then this summit belongs to zone of transition;
(8) according to vector the projection value on corresponding bone of following each grid vertex of method calculating three-dimensional model with articulation point O formation,
1. for each grid vertex that belongs to bone OA in the three-dimensional model, the projection value of vector on bone OA that this grid vertex and articulation point O constitute equals y, y from the local coordinate P=of this grid vertex (x, y, z);
2. for each grid vertex that belongs to bone OB in the three-dimensional model, the projection value of vector on bone OB that this grid vertex and articulation point O constitute is P 2μ B '/ | μ B '|, P wherein 2Be this grid vertex local coordinate;
(9) center of circle local coordinate O ' of the circular curve of each grid vertex correspondence of three-dimensional model=(d/cos (υ)) γ, central angle θ=π-υ * 2, the point O ' to bone OA apart from r=dtan (υ), wherein γ=γ '/| γ ' |, γ '=(α+b)/2, υ=arccos (α b)/2, and α=μ B '/ | μ B '|, b=(0,1,0).
(10) for each grid vertex in three-dimensional model deformation district, the t value of this summit correspondence
Figure BSA00000167066700041
The location parameter ratio value of this summit on corresponding circular curve
Figure BSA00000167066700042
Wherein P ' is the local coordinate of the subpoint of this summit on the AOB of plane, the local coordinate on this summit be written as P=(x, y, z), P '=(x, y, 0) then, vectorial χ=(1,0,0).Obtain the maximal value t in all t values MAXWith minimum value t MIN
(11) calculate the t value of each grid vertex correspondence in the three-dimensional model zone of transition according to following method,
1. for each grid vertex that belongs to bone OA in the three-dimensional model zone of transition, the t value of this summit correspondence is-x that wherein the local coordinate of this grid vertex is P 1=(x, y, z);
2. for each grid vertex that belongs to bone OB in the three-dimensional model zone of transition, the t value of this summit correspondence is P wherein 2' be the local coordinate of the subpoint of this summit on the AOB of plane, the local coordinate of this grid vertex is P 2=(x, y, z), P then 2'=(x, y, 0), some C coordinate is d α.
(12) make the local coordinate of summit after flexural deformation of the deformed region that calculates three-dimensional model with the following method, wherein flexural deformation angle is w 2,
1. if θ+w 2<0, at this moment, abrupt change in coordinate axis direction can take place after tying up to distortion in the local coordinate of partial model correspondence, if θ+w 2<0, the central angle θ ' after then being out of shape=-(θ+w 2), otherwise θ '=θ+w 2, if θ+w 2<0 and | θ ' |=| θ |, the corresponding t value of circular arc that then length remains unchanged in deformation process in three-dimensional model t C=-(t MAX+ t MIN)/2, otherwise, t C=d[θ cot (θ/2)-θ ' cot (θ '/2)]/(θ '-θ);
2. the minimum value t ' in the t value of all grid vertexes in the distorted area of three-dimensional model after being out of shape MIN=t C-t m, t wherein m=(t MAX-t MIN)/2;
3. if t C+ t m<[d/sin (θ '/2)] [1-cos (θ '/2)], then the maximal value t ' in the t value of all grid vertexes in the distorted area of distortion back three-dimensional model MAX=[d/sin (θ '/2)] [1-cos (θ '/2)], otherwise t ' MAX=t C+ t m
4. the center of circle local coordinate O "=(x of the circular curve of each grid vertex correspondence of three-dimensional model after being out of shape 0, y 0, 0), x wherein 0=dcot (θ '/2), y 0=d, the radius r of circular curve '=x;
5. for each grid vertex in three-dimensional model deformation district, the preceding local coordinate of this grid vertex distortion is written as P=, and (x, y z), obtain the t value t on this summit from the result of calculation of step (10) 1, if θ+w 2<0, the t value t after this vertex deformation 2=t ' MAX-(t ' MAX-t ' MIN) (t 1-t MIN)/(t MAX-t MIN), otherwise, t 2=t ' MIN+ (t ' MAX-t ' MIN) (t 1-t MIN)/(t MAX-t MIN), from the result of calculation of step (10), obtain the ratio value τ on this summit, the local coordinate P ' after this vertex deformation=(x ', y ', z '), wherein x '=x 0+ (r '+t 2) cos (π+θ ' τ), y '=y 0+ (r '+t 2) sin (π+θ ' τ), if θ+w 2<0, z '=-z, otherwise, z '=z.
(13) make the local coordinate of summit after flexural deformation of the transitional region of calculating three-dimensional model with the following method, wherein flexural deformation angle is w 2,
1. for each the grid vertex P that belongs to bone OA in the three-dimensional model transitional region 1, from step (8), obtain the projection value l of vector on bone OA that this summit and articulation point O constitute in the step result of calculation 1. P1, from step (11), obtain the t value t on this summit in the step result of calculation 1. P1
2. if θ+w 2<0, then the preceding t value of distortion is t in the deformed region of three-dimensional model P1The increment σ=t ' of grid vertex t value after distortion MAX-(t ' MAX-t ' MIN) (t P1-t MIN)/(t MAX-t MIN)+t P1, otherwise, σ=t ' MIN+ (t ' MAX-t ' MIN) (t P1-t MIN)/(t MAX-t MIN)-t P1, if θ+w 2<0, summit P then 1T value t ' after the distortion P1=σ * (L 1-l P1)/(L 1-d)-t P1, otherwise, t ' P1=t P1+ σ * (L 1-l P1)/(L 1-d);
3. summit P 1Local coordinate is written as (x before the distortion 1, y 1, z 1), if θ+w 2<0, summit P then 1Local coordinate P after the distortion 1'=(-t ' P1, y 1,-z 1), otherwise, P 1'=(-t ' P1, y 1, z 1);
4. for each the grid vertex P that belongs to bone OB in the three-dimensional model transitional region 2, from step (8), obtain the projection value t of vector on bone OB that this summit and articulation point O constitute in the step result of calculation 2. P2, from step (11), obtain the t value t on this summit in the step result of calculation 2. P2
5. if θ+w 2<0, then the preceding t value of distortion is t in the deformed region of three-dimensional model P2The increment σ '=t ' of grid vertex t value after distortion MAX-(t ' MAX-t ' MIN) (t P2-t MIN)/(t MAX-t MIN)+t P2, otherwise, σ '=t ' MIN+ (t ' MAX-t ' MIN) (t P2-t MIN)/(t MAX-t MIN)-t P2, if θ+w 2<0, summit P then 2T value t ' after the distortion P2=σ ' * (L 2-l P2)/(L 2-d)-t P2, otherwise, t ' P2=t P2+ σ ' * (L 2-l P2)/(L 2-d);
6. if θ+w 2<0, summit P then 2Local coordinate P after the distortion 2'=(x 2', y 2' ,-z 2), otherwise, P 2'=(x 2', y 2', z 2), z wherein 2Be summit P 2Z coordinate in the local coordinate before the distortion, x 2' and y 2' from summit P 2The local coordinate P of the subpoint of distortion back on the AOB of plane 2"=(x 2', y 2', 0), P wherein 2"=l P2α '+t ' P2γ ', α '=(cos (θ '-pi/2), sin (θ '-pi/2), 0),
Figure BSA00000167066700051
C '=d α '.
(14) make the local coordinate of summit after flexural deformation in the non-deformation zone territory of calculating three-dimensional model with the following method, wherein flexural deformation angle is w 2,
For each grid vertex that belongs to bone OA in the three-dimensional model non-deformation zone territory, if θ+w 2<0, then x coordinate and the negate of z graticule ticks in its local coordinate of distortion back, otherwise its local coordinate is constant before and after distortion;
For each grid vertex that belongs to bone OB in the three-dimensional model non-deformation zone territory, local coordinate is P before its distortion, the local coordinate P ' after this vertex deformation=PR 1 T, the turning axle direction vector is written as ρ 1=(x, y, z), rotation matrix R then 1For:
R 1 = ( 1 - cos ( w ) ) x 2 + cos ( w ) ( 1 - cos ( w ) ) xy - sin ( w ) z ( 1 - cos ( w ) ) xz + sin ( w ) y ( 1 - cos ( w ) ) xy + sin ( w ) z ( 1 - cos ( w ) ) y 2 + cos ( w ) ( 1 - cos ( w ) ) yz - sin ( w ) x ( 1 - cos ( w ) ) xz - sin ( w ) y ( 1 - cos ( w ) ) yz + sin ( w ) x ( 1 - cos ( w ) ) z 2 + cos ( w )
Rotation angle w=w wherein 2, ρ 1=(0,0,1),
If θ+w 2<0, then with the x coordinate and the negate of z graticule ticks of the local coordinate of the grid vertex that calculates.
(15) make the local coordinate of calculating distortion back three-dimensional model correspondence with the following method be tied to the transformation matrix F of world coordinate system 1':
F 1' be 4 * 4 matrixes, F 1 ′ = α ′ T β ′ T γ ′ T μ o ′ T 0 0 0 1 ,
Subscript T representing matrix matrix transpose operation wherein,
And, vector Vector γ '=γ "/| γ " |,
Figure BSA00000167066700064
Vector α '=β ' * γ ', μ o' be that articulation point O is out of shape the vector representation of the coordinate in world coordinate system afterwards, A 2, O 2, B 2Be articulation point A, O, the coordinate of B distortion back in world coordinate system.
Obtained local coordinate after all grid vertexes distortion of three-dimensional model by said method, and local coordinate is tied to the transformation matrix of world coordinate system behind the three-dimensional model deformation.Be tied to the transformation matrix of world coordinate system according to local coordinate behind the local coordinate of each grid vertex of three-dimensional model and the three-dimensional model deformation, draw the three-dimensional model after the distortion.So far, finished the flexural deformation of three-dimensional model.
The contrast prior art, the beneficial effect of the inventive method is, according to the deformation characteristics of actor model, three-dimensional model is divided into distorted area, zone of transition and non-deformation zone, by the deformation method different, can improve the speed and the sense of reality of distortion to each area applications of three-dimensional model.Distorted area at three-dimensional model, by the local coordinate after obtaining the grid vertex distortion at the circular curve that uses interpolation method computing grid summit correspondence after the flexural deformation, thereby the three-dimensional model surface is in the smooth transition of articulation point near zone after the realization flexural deformation, and the stretching of three-dimensional model respective regions and compression; In flexural deformation,, the part summit in the non-deformation zone of three-dimensional model obtains the local coordinate of non-deformation zone grid vertex after distortion by being carried out corresponding European conversion; In flexural deformation,, can realize the smooth transition between three-dimensional model surface non-deformation zone and the distorted area by the grid vertex in the three-dimensional model zone of transition is carried out interpolation to the distance of bone; By the correction to distorted area, zone of transition and non-deformation zone grid vertex local coordinate computation process under the abrupt change in coordinate axis direction of local coordinate system in the deformation process, the flexural deformation of the three-dimensional model in the time of can realizing the bone angle greater than 180 °.
Description of drawings:
Fig. 1 is a synoptic diagram of three-dimensional model being divided distorted area, zone of transition and non-deformation zone.
Fig. 2 is to the synoptic diagram behind three-dimensional model division distorted area, zone of transition and the non-deformation zone of human body shank.
Embodiment:
Below in conjunction with drawings and Examples technical solution of the present invention is done further explanation, essence of the present invention is a kind of three-dimensional model to be carried out diastrophic method.
Next carrying out flexural deformation with the three-dimensional model that the shank and the pin of human body are formed is example, and the specific embodiment of the present invention is described.
The articulation point of this three-dimensional model correspondence is A, O, B, and wherein articulation point A and O connect into bone OA, and articulation point B and O connect into bone OB.
According to the technical program, it is as follows that this three-dimensional model is carried out diastrophic method:
(1) near articulation point O, selects two summit P 1, P 2, wherein articulation point O coordinate is (0.053979,0.029863 ,-0.339496), some P 1Coordinate is (0.0623082,0.0758197 ,-0.249175), some P 2Coordinate is (0.0871224,0.0691930 ,-0.263863).Calculate plane OP 1P 2Equation V=(0.0288590 ,-0.891964,0.451185,0.178254).
(2) articulation point A coordinate is (0.099197,0.543307 ,-0.151083), to each grid of three-dimensional model, judge all grid vertexes of this grid whether with articulation point A at plane OP 1P 2The same side, if then this grid belongs to bone OA, otherwise this grid belongs to bone OB.
(3) local coordinate of calculating three-dimensional model is tied to the local coordinate of each grid vertex in the transformation matrix of world coordinate system and the three-dimensional model.
(4) articulation point B coordinate in world coordinate system is (0.0890980,0.0151050 ,-0.256083), calculates the local coordinate B ' of articulation point B, B '=(x, y, z)=(0.09,0.0177,0).
(5) L is set 1=0.25, L 2=0.16, d=0.125, use following method that three-dimensional model is divided into distorted area, zone of transition and non-deformation zone:
In three-dimensional model, belong to each grid vertex of bone OA, (z), less than d, then this summit belongs to the distorted area as if y for x, y, if y is greater than L to obtain its local coordinate P= 1, then this summit belongs to non-deformation zone, if y is more than or equal to d and smaller or equal to L 1, then this summit belongs to zone of transition; In three-dimensional model, belong to each grid vertex of bone OB, obtain its local coordinate P ', calculate
Figure BSA00000167066700071
If l is less than d, then this summit belongs to the distorted area, and greater than L2, then this summit belongs to non-deformation zone as if l, if l is more than or equal to d and smaller or equal to L 2, then this summit belongs to zone of transition.Divide the result as shown in Figure 2.
(6) calculate the projection value of vector on corresponding bone of each grid vertex of three-dimensional model and articulation point O formation.
(7) calculate three-dimensional model deformation zone corresponding center of circle local coordinate O ', central angle θ and O ' to bone OA apart from r, result of calculation O '=(0.6346,0.125,0), θ=0.3890, r=0.6346.
(8), calculate t value and this summit location parameter ratio value on corresponding circular curve of this summit correspondence for each grid vertex in three-dimensional model deformation district.Obtain the maximal value t in the t value of all grid vertexes in the deformed region of three-dimensional model MAXWith minimum value t MINCalculate the t value of each grid vertex correspondence in the three-dimensional model transitional region.
(9) make the local coordinate of each grid vertex after flexural deformation in the distorted area that calculates three-dimensional model with the following method, wherein flexural deformation angle w 2=-0.523599:
From the result of calculation of step (7), obtain the θ value of three-dimensional model, from the result of calculation of step (8), obtain the t of three-dimensional model correspondence MAXAnd t MINValue; θ+w 2=-0.1346<0, sudden change has taken place in change in coordinate axis direction, the central angle θ ' after the distortion=-(θ+w 2)=0.1346, because | θ ' | ≠ | θ |, so use formula t C=d[θ cot (θ/2)-θ ' cot (θ '/2)]/(θ '-θ) calculate the t value t of the circular arc correspondence that length remains unchanged in the deformation process C, t C=0.0109; Maximal value t ' in the deformed region of calculating distortion back three-dimensional model in the t value of all grid vertexes MAXWith minimum value t ' MINCenter of circle local coordinate O behind the calculating three-dimensional model deformation " and radius r ', O "=(1.8546,0.125,0), r '=1.8546; For each grid vertex in the three-dimensional model deformation district, from the result of calculation of step (8), obtain the t value t of this grid vertex 1And the ratio value on this summit, calculate the t value t after this vertex deformation 2, calculate the local coordinate after this vertex deformation then.
(10) make the local coordinate of each grid vertex after flexural deformation in the zone of transition of calculating three-dimensional model with the following method, wherein flexural deformation angle w 2=-0.523599:
For each the grid vertex P that belongs to bone OA in the three-dimensional model transitional region 1, from the result of calculation of step (8), obtain the t value t on this summit 1', from the result of calculation of step (6), obtain the projection value l of vector on bone OA that this summit and articulation point O constitute; θ+w 2=-0.1346<0, sudden change has taken place in change in coordinate axis direction, therefore uses formula σ=t ' MAX-(t ' MAX-t ' MIN) (t 1'-t MIN)/(t MAX-t MIN)+t 1The t value is t in the ' calculating three-dimensional model deformation zone 1' the increment σ of grid vertex t value after distortion; Summit P 1T value t after the distortion 2'=σ * (L 1-l)/(L 1-d)-t 1'; Summit P 1Local coordinate P after the distortion 1'=(-t 2', y 1,-z 1), y wherein 1And z 1Be summit P 1Y coordinate and z coordinate before the distortion; For each the grid vertex P that belongs to bone OB in the three-dimensional model transitional region 2, from the result of calculation of step (8), obtain the t value t on this summit 1", from the result of calculation of step (6), obtain the projection value l ' of vector on bone OB that this summit and articulation point O constitute; θ+w 2=-0.1346<0, sudden change has taken place in change in coordinate axis direction, therefore uses formula σ '=t ' MAX-(t ' MAX-t ' MIN) (t 1" t MIN)/(t MAX-t MIN)+t 1" the t value is t in the calculating three-dimensional model deformation zone 1" the increment σ ' of grid vertex t value after distortion; Summit P 2T value t after the distortion 2"=σ ' * (L 2-l ')/(L 2-d)-t 1"; Calculate summit P 2Local coordinate P after the distortion 2'.
(11) calculate rotation matrix R, wherein rotation angle w=w 2, turning axle direction vector ρ 1=(0,0,1); For each grid vertex that belongs to bone OB in the three-dimensional model non-deformation zone territory, its local coordinate is P, the local coordinate P '=PR after this summit flexural deformation T, θ+w 2Therefore=-0.1346<0, sudden change has taken place in change in coordinate axis direction, with the x coordinate and the negate of z graticule ticks of the local coordinate of the grid vertex that calculates; θ+w 2Therefore=-0.1346<0, sudden change has taken place in change in coordinate axis direction, with the x coordinate and the negate of z graticule ticks that belong in the three-dimensional model non-deformation zone territory in the local coordinate of grid vertex of bone OA.
(12) the corresponding coordinate of articulation point in world coordinate system is A behind the three-dimensional model deformation 2=(0.1957,0.3889,0.0695), O 2=(0.054,0.0399 ,-0.3295), B 2=(0.1076 ,-0.0343 ,-0.3245) makes the local coordinate of calculating distortion back three-dimensional model correspondence with the following method be tied to the transformation matrix F of world coordinate system 1':
F 1' be 4 * 4 matrixes, F 1 ′ = α ′ T β ′ T γ ′ T μ o ′ T 0 0 0 1 ,
Subscript T representing matrix matrix transpose operation wherein,
And, vector
Figure BSA00000167066700092
Vector γ '=γ "/| γ " |,
Figure BSA00000167066700093
Vector α '=β ' * γ ', μ o' be that articulation point O is out of shape the vector representation of the coordinate in world coordinate system afterwards.
Obtained local coordinate after all grid vertexes distortion of three-dimensional model by said method, and local coordinate is tied to the transformation matrix of world coordinate system behind the three-dimensional model deformation.Be tied to the transformation matrix of world coordinate system according to local coordinate behind the local coordinate of each grid vertex of three-dimensional model and the three-dimensional model deformation, can use OPENGL to draw three-dimensional model after function and model view matrix manipulation function are drawn distortion.So far, finished the flexural deformation of three-dimensional model.
Above-described specific descriptions; purpose, technical scheme and beneficial effect to invention further describe; institute is understood that; the above only is specific embodiments of the invention; and be not intended to limit the scope of the invention; within the spirit and principles in the present invention all, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (3)

1. the three-dimensional model deformation method under the improved abrupt change in coordinate axis direction, the skeletal structure of described three-dimensional model is: articulation point A and O connect into bone OA, and articulation point B and O connect into bone OB, and bone OA and bone OB are positioned near the axis of three-dimensional model; It is characterized in that, comprise the steps:
(1) near three-dimensional model surface mesh shangguan node O, selects two summit P 1, P 2,, should make plane OP as preferably 1P 2With bone OA and bone OB angle separately about equally;
(2) obtain plane OP according to following method 1P 2Equation coefficient,
1. calculate tri-vector
Figure FSA00000167066600011
Wherein * the vectorial multiplication cross of expression;
2. n=n '/| n ' |, variable s=-n μ oμ wherein oThe vector representation of the coordinate of expression articulation point O in world coordinate system; The dot product of expression vector;
3. V=[n, s]; V has stored plane OP 1P 2Four coefficients of equation;
(3), judge its grid vertex and plane OP to each triangular mesh of three-dimensional model 1P 2Relation, if all summits of grid all with articulation point A at plane OP 1P 2The same side, judge that then this triangular mesh belongs to bone OA, otherwise judge that this triangular mesh belongs to bone OB; If all do not constitute in the master pattern, then need before judgement, regard non-triangular mesh as a plurality of triangles and form by triangular mesh;
(4) make the local coordinate of calculating the three-dimensional model correspondence with the following method be tied to the transformation matrix F of world coordinate system 1:
F 1Be 4 * 4 matrixes, F 1 = α 1 T β 1 T γ 1 T μ o T 0 0 0 1 ,
Subscript T representing matrix matrix transpose operation wherein,
And, vector
Figure FSA00000167066600013
Vector γ 11'/| γ 1' |,
Figure FSA00000167066600014
Vector α 11* γ 1
(5) make the local coordinate of calculating each grid vertex of three-dimensional model with the following method:
The local coordinate of grid vertex P is μ in the three-dimensional model P 'PF 1 -T, μ wherein PThe vector representation of the expression coordinate of summit P in world coordinate system, subscript-T represents earlier matrix is carried out matrix transpose operation again to finding the inverse matrix as a result;
(6) the local coordinate μ of articulation point B B 'BF 1 -T, μ wherein BThe vector representation of the coordinate of expression articulation point B in world coordinate system;
(7) according to following method three-dimensional model is divided into distorted area, zone of transition and non-deformation zone,
1. set the maximal projection value d of vector on bone OA and bone OB that distorted area grid vertex and articulation point O constitute;
2. set the value L of minimum projection of vector on bone OA that non-deformation zone grid vertex and articulation point O constitute 1, and the value L of the minimum projection on bone OB 2Should guarantee when being provided with that d is less than L 1, L 2Among minimum value;
3. in three-dimensional model, to belonging to each grid vertex of bone OA, its local coordinate that obtains in step (5) is written as P=, and (x, y z), less than d, judge then that this summit belongs to the distorted area as if y; If y is greater than L 1, judge that then this summit belongs to non-deformation zone; If y is more than or equal to d and smaller or equal to L 1, judge that then this summit belongs to zone of transition;
4. in three-dimensional model,, use μ to belonging to each grid vertex of bone OB P 'The local coordinate of representing this summit is calculated l PP 'μ B '/ | μ B '|, if l PLess than d, judge that then this summit belongs to the distorted area; If l PGreater than L 2, judge that then this summit belongs to non-deformation zone; If l PMore than or equal to d and smaller or equal to L 2, judge that then this summit belongs to zone of transition;
(8) according to vector the projection value on corresponding bone of following each grid vertex of method calculating three-dimensional model with articulation point O formation,
1. for each grid vertex that belongs to bone OA in the three-dimensional model, the projection value of vector on bone OA that this grid vertex and articulation point O constitute equals y, y from the local coordinate P=of this grid vertex (x, y, z);
2. for each grid vertex that belongs to bone OB in the three-dimensional model, the projection value of vector on bone OB that this grid vertex and articulation point O constitute is P 2μ B '/ | μ B '|, P wherein 2Be this grid vertex local coordinate;
(9) center of circle local coordinate O ' of the circular curve of each grid vertex correspondence of three-dimensional model=(d/cos (υ)) γ, central angle θ=π-υ * 2, the point O ' to bone OA apart from r=dtan (υ), wherein γ=γ '/| γ ' |, γ '=(α+b)/2, υ=arccos (α b)/2, and α=μ B '/ | μ B '|, b=(0,1,0);
(10) for each grid vertex in three-dimensional model deformation district, the t value of this summit correspondence The location parameter ratio value of this summit on corresponding circular curve
Figure FSA00000167066600022
Wherein P ' is the local coordinate of the subpoint of this summit on the AOB of plane, the local coordinate on this summit be written as P=(x, y, z), P '=(x, y, 0) then, vectorial χ=(1,0,0); Obtain the maximal value t in all t values MAX andMinimum value t MIN
(11) calculate the t value of each grid vertex correspondence in the three-dimensional model zone of transition according to following method,
1. for each grid vertex that belongs to bone OA in the three-dimensional model zone of transition, the t value of this summit correspondence is-x that wherein the local coordinate of this grid vertex is P 1=(x, y, z);
2. for each grid vertex that belongs to bone OB in the three-dimensional model zone of transition, the t value of this summit correspondence is
Figure FSA00000167066600023
P wherein 2' be the local coordinate of the subpoint of this summit on the AOB of plane, the local coordinate of this grid vertex is P 2=(x, y, z), P then 2'=(x, y, 0), some C coordinate is d α;
(12) make the local coordinate of summit after flexural deformation of the deformed region that calculates three-dimensional model with the following method, wherein flexural deformation angle is w 2,
1. if θ+w 2<0, at this moment, abrupt change in coordinate axis direction can take place after tying up to distortion in the local coordinate of partial model correspondence, if θ+w 2<0, the central angle θ ' after then being out of shape=-(θ+w 2), otherwise θ '=θ+w 2, if θ+w 2<0 and | θ ' |=| θ |, the corresponding t value of circular arc that then length remains unchanged in deformation process in three-dimensional model t C=-(t MAX+ t MIN)/2, otherwise, t C=d[θ cot (θ/2)-θ ' cot (θ '/2)]/(θ '-θ);
2. the minimum value t ' in the t value of all grid vertexes in the distorted area of three-dimensional model after being out of shape MIN=t C-t m, t wherein m=(t MAX-t MIN)/2;
3. if t C+ t m<[d/sin (θ '/2)] [1-cos (θ '/2)], then the maximal value t ' in the t value of all grid vertexes in the distorted area of distortion back three-dimensional model MAX=[d/sin (θ '/2)] [1-cos (θ '/2)], otherwise t ' MAX=t C+ t m
4. the center of circle local coordinate O "=(x of the circular curve of each grid vertex correspondence of three-dimensional model after being out of shape 0, y 0, 0), x wherein 0=dcot (θ '/2), y 0=d, the radius r of circular curve '=x;
5. for each grid vertex in three-dimensional model deformation district, the preceding local coordinate of this grid vertex distortion is written as P=, and (x, y z), obtain the t value t on this summit from the result of calculation of step (10) 1, if θ+w 2<0, the t value t after this vertex deformation 2=t ' MAX-(t ' MAX-t ' MIN) (t 1-t MIN)/(t MAX-t MIN), otherwise, t 2=t ' MIN+ (t ' MAX-t ' MIN) (t 1-t MIN)/(t MAX-t MIN), from the result of calculation of step (10), obtain the ratio value τ on this summit, the local coordinate P ' after this vertex deformation=(x ', y ', z '), wherein x '=x 0+ (r '+t 2) cos (π+θ ' τ), y '=y 0+ (r '+t 2) sin (π+θ ' τ), if θ+w 2<0, z '=-z, otherwise, z '=z;
(13) make the local coordinate of summit after flexural deformation of the transitional region of calculating three-dimensional model with the following method, wherein flexural deformation angle is w 2,
1. for each the grid vertex P that belongs to bone OA in the three-dimensional model transitional region 1, from step (8), obtain the projection value l of vector on bone OA that this summit and articulation point O constitute in the step result of calculation 1. P1, from step (11), obtain the t value t on this summit in the step result of calculation 1. P1
2. if θ+w 2<0, then the preceding t value of distortion is t in the deformed region of three-dimensional model P1The increment σ=t ' of grid vertex t value after distortion MAX-(t ' MAX-t ' MIN) (t P1-t MIN)/(t MAX-t MIN)+t P1, otherwise, σ=t ' MIN+ (t ' MAX-t ' MIN) (t P1-t MIN)/(t MAX-t MIN)-t P1, if θ+w 2<0, summit P then 1T value t ' after the distortion P1=σ * (L 1-l P1)/(L 1-d)-t P1, otherwise, t ' P1=t P1+ σ * (L 1-l P1)/(L 1-d);
3. summit P 1Local coordinate is written as (x before the distortion 1, y 1, z 1), if θ+w 2<0, summit P then 1Local coordinate P after the distortion 1'=(-t ' P1, y 1,-z 1), otherwise, P 1'=(-t ' P1, y 1, z 1);
4. for each the grid vertex P that belongs to bone OB in the three-dimensional model transitional region 2, from step (8), obtain the projection value t of vector on bone OB that this summit and articulation point O constitute in the step result of calculation 2. P2, from step (11), obtain the t value t on this summit in the step result of calculation 2. P2
5. if θ+w 2<0, then the preceding t value of distortion is t in the deformed region of three-dimensional model P2The increment σ '=t ' of grid vertex t value after distortion MAX-(t ' MAX-t ' MIN) (t P2-t MIN)/(t MAX-t MIN)+t P2, otherwise, σ '=t ' MIN+ (t ' MAX-t ' MIN) (t P2-t MIN)/(t MAX-t MIN)-t P2, if θ+w 2<0, summit P then 2T value t ' after the distortion P2=σ ' * (L 2-l P2)/(L 2-d)-t P2, otherwise, t ' P2=t P2+ σ ' * (L 2-l P2)/(L 2-d);
6. if θ+w 2<0, summit P then 2Local coordinate P after the distortion 2'=(x 2', y 2' ,-z 2), otherwise, P 2'=(x 2', y 2', z 2), z wherein 2Be summit P 2Z coordinate in the local coordinate before the distortion, x 2' and y 2' from summit P 2The local coordinate P of the subpoint of distortion back on the AOB of plane 2"=(x 2', y 2', 0), P wherein 2"=l P2α '+t ' P2γ ', α '=(cos (θ '-pi/2), sin (θ '-pi/2), 0),
Figure FSA00000167066600041
C '=d α ';
(14) make the local coordinate of summit after flexural deformation in the non-deformation zone territory of calculating three-dimensional model with the following method, wherein flexural deformation angle is w 2,
For each grid vertex that belongs to bone OA in the three-dimensional model non-deformation zone territory, if θ+w 2<0, then x coordinate and the negate of z graticule ticks in its local coordinate of distortion back, otherwise its local coordinate is constant before and after distortion;
For each grid vertex that belongs to bone OB in the three-dimensional model non-deformation zone territory, local coordinate is P before its distortion, the local coordinate P ' after this vertex deformation=PR 1 T, the turning axle direction vector is written as ρ 1=(x, y, z), rotation matrix R then 1For:
R 1 = ( 1 - cos ( w ) ) x 2 + cos ( w ) ( 1 - cos ( w ) ) xy - sin ( w ) z ( 1 - cos ( w ) ) xz + sin ( w ) y ( 1 - cos ( w ) ) xy + sin ( w ) z ( 1 - cos ( w ) ) y 2 + cos ( w ) ( 1 - cos ( w ) ) yz - sin ( w ) x ( 1 - cos ( w ) ) xz - sin ( w ) y ( 1 - cos ( w ) ) yz + sin ( w ) x ( 1 - cos ( w ) ) z 2 + cos ( w )
Rotation angle w=w wherein 2, ρ 1=(0,0,1),
If θ+w 2<0, then with the x coordinate and the negate of z graticule ticks of the local coordinate of the grid vertex that calculates;
(15) make the local coordinate of calculating distortion back three-dimensional model correspondence with the following method be tied to the transformation matrix F of world coordinate system 1':
F 1' be 4 * 4 matrixes, F 1 ′ = α ′ T β ′ T γ ′ T μ o ′ T 0 0 0 1 ,
Subscript T representing matrix matrix transpose operation wherein,
And, vector
Figure FSA00000167066600051
Vector γ '=γ "/| γ " |,
Figure FSA00000167066600052
Vector α '=β ' * γ ', μ o' be that articulation point O is out of shape the vector representation of the coordinate in world coordinate system afterwards, A 2, O 2, B 2Be articulation point A, O, the coordinate of B distortion back in world coordinate system;
Be tied to the transformation matrix of world coordinate system according to local coordinate behind the local coordinate of each grid vertex of three-dimensional model that obtains and the three-dimensional model deformation, draw the three-dimensional model after the distortion, finish the flexural deformation of three-dimensional model.
2. according to the three-dimensional model deformation method under the described a kind of improved abrupt change in coordinate axis direction of claim 1, it is characterized in that, near three-dimensional model surface mesh shangguan node O, select two summit P in the step (1) 1, P 2The time, as preferably, should make plane OP 1P 2With bone OA and bone OB angle separately about equally.
3. according to the three-dimensional model deformation method under the described a kind of improved abrupt change in coordinate axis direction of claim 1, it is characterized in that, judge in the step (3) that summit and articulation point A are at plane OP 1P 2The same side method be:
To a summit in the grid, the vector representation of the coordinate in world coordinate system is P, and the vector representation of the coordinate of articulation point A in world coordinate system is μ A,
Calculate f P=nP+s, f A=n μ AIf+s is f PWith f AJack per line judges that then summit P and summit A are at plane OP 1P 2The same side, otherwise judge that summit P and summit A be not at plane OP 1P 2The same side.
CN 201010216621 2010-07-02 2010-07-02 Improved three-dimensional model deformation method under abrupt change in coordinate axis direction Pending CN101872490A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010216621 CN101872490A (en) 2010-07-02 2010-07-02 Improved three-dimensional model deformation method under abrupt change in coordinate axis direction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010216621 CN101872490A (en) 2010-07-02 2010-07-02 Improved three-dimensional model deformation method under abrupt change in coordinate axis direction

Publications (1)

Publication Number Publication Date
CN101872490A true CN101872490A (en) 2010-10-27

Family

ID=42997332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010216621 Pending CN101872490A (en) 2010-07-02 2010-07-02 Improved three-dimensional model deformation method under abrupt change in coordinate axis direction

Country Status (1)

Country Link
CN (1) CN101872490A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107221002A (en) * 2017-04-12 2017-09-29 中国人民解放军信息工程大学 A kind of line feature displacement method and device converted based on Morphing
CN113033343A (en) * 2021-03-10 2021-06-25 咪咕动漫有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN117910279A (en) * 2024-03-18 2024-04-19 西北工业大学 Three-dimensional sound field rapid processing method based on space coordinate rotation transformation
CN117910279B (en) * 2024-03-18 2024-05-28 西北工业大学 Three-dimensional sound field rapid processing method based on space coordinate rotation transformation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003030254A (en) * 2001-07-17 2003-01-31 Toyota Motor Corp Method for deforming three-dimensional shape model
CN1617175A (en) * 2004-12-09 2005-05-18 上海交通大学 Human limb three-dimensional model building method based on labelling point
CN1773555A (en) * 2005-10-26 2006-05-17 浙江大学 Sparse grid-oriented three-dimensional foot type fast acquiring method based on standard foot deformation
WO2006106686A1 (en) * 2005-04-04 2006-10-12 Toyota Jidosha Kabushiki Kaisha Three-dimensional model deformation system, method and computer readable program, and computer readable storage medium storing that program
CN101383053A (en) * 2008-10-31 2009-03-11 北京理工大学 3D grid deforming method based on surface area keeping

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003030254A (en) * 2001-07-17 2003-01-31 Toyota Motor Corp Method for deforming three-dimensional shape model
CN1617175A (en) * 2004-12-09 2005-05-18 上海交通大学 Human limb three-dimensional model building method based on labelling point
WO2006106686A1 (en) * 2005-04-04 2006-10-12 Toyota Jidosha Kabushiki Kaisha Three-dimensional model deformation system, method and computer readable program, and computer readable storage medium storing that program
CN1773555A (en) * 2005-10-26 2006-05-17 浙江大学 Sparse grid-oriented three-dimensional foot type fast acquiring method based on standard foot deformation
CN101383053A (en) * 2008-10-31 2009-03-11 北京理工大学 3D grid deforming method based on surface area keeping

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS》 20080630 Han-Bing Yan等 Shape Deformation Using a Skeleton to Drive Simplex Transformations 693-706 1-3 第14卷, 第3期 2 *
《计算机应用研究》 20090731 董建军等 基于几何特征的三维模型变形与编辑 2780-2782 1-3 第26卷, 第7期 2 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107221002A (en) * 2017-04-12 2017-09-29 中国人民解放军信息工程大学 A kind of line feature displacement method and device converted based on Morphing
CN107221002B (en) * 2017-04-12 2020-06-23 中国人民解放军信息工程大学 Line element shifting method and device based on Morphing transformation
CN113033343A (en) * 2021-03-10 2021-06-25 咪咕动漫有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN113033343B (en) * 2021-03-10 2023-11-21 咪咕动漫有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN117910279A (en) * 2024-03-18 2024-04-19 西北工业大学 Three-dimensional sound field rapid processing method based on space coordinate rotation transformation
CN117910279B (en) * 2024-03-18 2024-05-28 西北工业大学 Three-dimensional sound field rapid processing method based on space coordinate rotation transformation

Similar Documents

Publication Publication Date Title
JP6961669B2 (en) Robot center of gravity position adjustment method, device, robot and data storage medium
CN104008557B (en) A kind of three-dimensional matching process of clothing and anthropometric dummy
CN102902269B (en) Redundant robot dynamic obstacle avoidance method using pre-selected minimum distance index
CN107685330A (en) A kind of Inverse Kinematics Solution method for solving of six degree of freedom wrist bias series robot
CN103699719B (en) Vehicle engine assembly suspension system interval optimum method
CN103678769B (en) Sense of reality clothing creation method based on human skeleton Yu two-dimensional deformation
CN101383053B (en) 3D grid deforming method based on surface area keeping
CN108492247A (en) A kind of eye make-up chart pasting method based on distortion of the mesh
CN106625687A (en) Kinematics modeling method for articulated robot
CN106959666A (en) A kind of space free curve approximating method based on NURBS
CN105313336A (en) Thin-shell 3D printing optimizing method
CN104821006A (en) Dynamic clothing simulation method based on human body mixed enclosing box
CN107330185B (en) The acquisition methods and device of the discrete point coordinate of cable
CN101872489A (en) Method for bending deformation of three-dimensional model on basis of circular curve
CN107818318A (en) A kind of anthropomorphic robot imitates method for evaluating similarity
CN101872490A (en) Improved three-dimensional model deformation method under abrupt change in coordinate axis direction
US20140168270A1 (en) Image deformation method and apparatus using deformation axis
CN106251281B (en) A kind of image morphing method based on shape interpolation
CN101894389A (en) Rotation angle interpolation-based three-dimensional model torsional deformation method
Song et al. A fast inverse kinematics algorithm for joint animation
CN110189413A (en) A kind of method and system generating clothes distorted pattern
CN104867172A (en) Rigid body motion realization method
CN111651894A (en) Cloth deformation real-time simulation method
CN107527384A (en) A kind of lattice simplified method of Three-Dimensional Dynamic based on motion feature and its system
CN101866494B (en) Method for carrying out segmentation on role model by utilizing grid vertexes

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20101027