CN102332175A - Flock animation method based on shape constraints - Google Patents
Flock animation method based on shape constraints Download PDFInfo
- Publication number
- CN102332175A CN102332175A CN201110301562A CN201110301562A CN102332175A CN 102332175 A CN102332175 A CN 102332175A CN 201110301562 A CN201110301562 A CN 201110301562A CN 201110301562 A CN201110301562 A CN 201110301562A CN 102332175 A CN102332175 A CN 102332175A
- Authority
- CN
- China
- Prior art keywords
- group
- individual
- individuality
- flock
- motion
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 244000144992 flock Species 0.000 title claims abstract description 17
- 230000033001 locomotion Effects 0.000 claims abstract description 45
- 238000005070 sampling Methods 0.000 claims abstract description 36
- 230000015572 biosynthetic process Effects 0.000 claims abstract description 29
- 238000004088 simulation Methods 0.000 claims abstract description 18
- 230000000694 effects Effects 0.000 claims description 15
- 238000013461 design Methods 0.000 claims description 10
- 241000270298 Boidae Species 0.000 claims description 7
- 239000002245 particle Substances 0.000 claims description 4
- 235000012364 Peperomia pellucida Nutrition 0.000 claims description 3
- 240000007711 Peperomia pellucida Species 0.000 claims description 3
- 238000005520 cutting process Methods 0.000 claims description 3
- 238000000354 decomposition reaction Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 9
- 230000006399 behavior Effects 0.000 description 26
- 230000006870 function Effects 0.000 description 10
- 238000004422 calculation algorithm Methods 0.000 description 8
- 230000008859 change Effects 0.000 description 5
- 238000001914 filtration Methods 0.000 description 5
- 238000006116 polymerization reaction Methods 0.000 description 5
- 230000003068 static effect Effects 0.000 description 5
- 230000007704 transition Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 4
- 238000012217 deletion Methods 0.000 description 4
- 230000037430 deletion Effects 0.000 description 4
- 238000009826 distribution Methods 0.000 description 4
- 238000011160 research Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 238000005457 optimization Methods 0.000 description 3
- 238000000926 separation method Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000005119 centrifugation Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005315 distribution function Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 206010057855 Hypotelorism of orbit Diseases 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000005530 etching Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000013011 mating Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000007115 recruitment Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a Flock animation method based on shape constraints. In terms of shape constraint control, a three-dimensional grid model is used for representing a to-be-maintained starting formation and termination formation of a whole flock. The outer surface of the model is uniformly sampled to obtain a point set covering the surface of an object. One-to-one correspondence is established among sampling points of a source grid and a target grid according to the relative positions of the sampling points on grids. The number of the sampling points on each grid is equal to that of flocks. The positions of each pair of sampling points correspond to the spatial positions of individuals. After the starting position of an animation simulation starting moment and the target position of an animation simulation termination moment are specified, a series of control points are inserted between the starting position of the animation simulation starting moment and the target position of the animation simulation termination moment, and interpolation is performed by using a cubic B-spline curve R(t) to calculate a global motion path of the flock. Motion paths of each individual are designed based on a global motion curve in combination with the positions of shape constraint points. By utilizing the method, the dynamically variable substantial formation of the flock and the steadiness and naturality of a moving process are ensured.
Description
Technical field
The present invention relates to the graph and image processing technical field, relate in particular to a kind of Flock animation method based on shape constraining.
Background technology
The so-called one by one group of computing machine group animation (Flock) can simply be interpreted as: be in the group or the biology that have identical purpose under the same environment, the behavior when their behavior is different from as independent part.In general, we hope to simulate true, changeful group, and can control the behavior of group with flexible way.Grand scene to make powerful and well-equipped army in the films and television programs is an example, with the grand scene of classic method this type of production, needs a large amount of utility man of recruitment, selects suitable place, commands it to drill according to the story of a play or opera.This needs human and material resources, time and the financial resources of labor.Therefore, computing machine group animation has and does not receive advantages such as space-time restriction, cost be low, profitable.It should be noted that the research contents of cluster of cartoons has comprised the correlative study of human body animation, but be not the simple popularization of single human body animation.The real behavior of the anthropomorphic this biped of the main diagnostic cast of human body animation in virtual environment.The difference of cluster of cartoons research need to be a plurality of virtual individuals of control to make multiple different behavior, from visually representing its grand outward appearance.
Cluster of cartoons research can be divided into two branches according to different purposes: one type is used for scientific research emulation purpose, and one type is used for the Digital Media show business.Comparatively speaking, the former stresses that the group of objects of being simulated is observed with reality and the matching degree of statistics, and the latter then stresses to express visual some vivid effect.Typical group application comprises military training, safe manoeuvre (disaster escape and abort escape system), virtual city pedestrian roaming, animation and game making, architectural design and city planning etc.
In recent years, along with the further investigation of computer graphics and three-dimensional animation technology, the cluster of cartoons technology has obtained significant progress and perfect.Aspect training simulation, combat exercise, models such as the dynamics of cluster of cartoons and simulation system, kinematics are combined, both can reach the purpose of pilot system reliability, again can the regulating system parameter, make system be in best running status.Especially aspect the safety manoeuvre; Can simulate people's action in case of emergency; Draw the rule of human action aspect, for example: lane formation, faster-is-slower effect, and then the crowd evacuation when instructing anti-terrorism to attack, the aspects such as design of building channel.In architectural design, the roaming that can simulate in crowd's scape on the scene reaches abundant and shows the architectural design effect, reaches purposes such as propaganda.Aspect Virtual Building, can reproduce lifelike historical sites, for example: men of old's life in the reduction ancient city, Pompeii.
Summary of the invention
For overcoming the defective of prior art, the invention provides a kind of Flock animation method based on shape constraining.
A kind of Flock animation method based on shape constraining, definition Flock group is made up of the n individuals, and abstract each individuality is used based on the mode of individuality and is simulated group's motion for having the particle of like attribute; Mainly both form by autonomous roaming behavior part and the behavior part that attracted by target in individual behavior in virtual scene; The motion under the acting in conjunction of vector field force, basic role power, three power of guiding of individuality in the design group; According to the distance between individual current position of group and target location, adjustment vector field force, basic role power, directed force three's the shared ratio of weight is controlled group steadily, move towards the target location naturally; It is characterized in that, aspect shape constraining, represent the initial formation and termination formation that the whole needs of group keep with three-dimensional grid model; Through the model outside surface is carried out uniform sampling, just obtained the point set of coverture surface; According to the relative position of sampling spot on grid, between the sampling spot of source grid and target gridding, set up man-to-man relation; Sampled point number on each grid equates with the group number, and each is to the locus corresponding to individuality, the position of sampled point; After specifying the animation simulation reference position of the zero hour, stopping target location constantly, insert a series of reference mark between the two, just calculate the global motion path of group with B-spline Curve R (t) interpolation; Be the basis with the global motion curve then, design each individual motion path in conjunction with the position of profile obligatory point.
Source object and target object surface are made up of primitive fully.At first object surfaces is converted into triangle model, makes two objects have identical triangle number, tentatively set up two triangle corresponding relations between the model through the spherical projection mode through triangle subdivision.
The discrete decomposition of taking curved path to be carried out arc length parameterized reaches the purpose of evenly cutting apart; The arc length parameterized method is: the total length in definition path is L, is the n section with the movement locus uniform discrete, promptly simulates the n step altogether; In any k step group's location in space is Rk=R (k/n), k<n; This method is implemented simple, real-time high-efficiency, can realize the pahtfinder hard planning of greater density group preferably.
In order to realize deformation effect, on the boids model based additional one " guiding behavior "; Just give each individual virtual control guide, the control guide produces guiding function to the behavior of individuality; The individual gathering forms complicated and diversified monnolithic case, and the control guide is corresponding to the sampled point of constraint shapes, and its motion is mainly controlled by position, path control function and the Kalman filter function three of goal constraint point jointly.
The beneficial effect that technical scheme of the present invention is brought: both can show the deformation effect of whole group between a series of static Three Mesh; Also can simulate the novel special efficacy of following the trail of dynamic profile; Having graceful vision and artistic effect, is that a kind of computing machine generates the economy of 3 D deformation cluster of cartoons effect and effectively trial.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is a Flock animation method frame diagram of the present invention;
Fig. 2 is the fundamental block diagram of shape constraining among the present invention;
Fig. 3 is the procedure chart of uniform sampling of the present invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
We define group and are made up of the n individuals, and abstract each is individual for having the particle of like attribute, uses based on the mode of individuality and simulates group's motion.Mainly both form by autonomous roaming behavior part and the behavior part that attracted by target in individual behavior in virtual scene.Individuality in the design group is at vector field force F
External, basic role power F
Basic, the guiding F
HomingThe acting in conjunction of three power is motion down.According to the distance between individual current position of group and target location, adjustment vector field force F
External, basic role power F
Basic, directed force F
HomingThe shared ratio of three's weight w (w>0) is controlled group steadily, move towards the target location naturally.
Aspect shape constraining control, represent the initial formation and termination formation that the whole needs of group keep with three-dimensional grid model.Through the model outside surface is carried out uniform sampling, just obtained the point set of coverture surface.According to the relative position of sampling spot on grid, between the sampling spot of source grid and target gridding, set up man-to-man relation.Sampled point number on each grid equates with the group number, and each is to the locus corresponding to individuality, the position of sampled point.After specifying the animation simulation reference position of the zero hour, stopping target location constantly, insert a series of reference mark between the two, just calculate the global motion path of group with B-spline Curve R (t) interpolation.We are the basis with the global motion curve, design each individual motion path in conjunction with the position of profile obligatory point.Method guarantees the roughly formation of colony's dynamic change and the steady naturality of moving process.Method frame figure is as shown in Figure 1.
Shape constraining is meant that the individuality in the group is assembled and forms the profile that the user sets in the motion process of virtual environment.Group does as a whole, changes carrying out the transition to the termination formation from an initial formation, or repeats this process, transition between a series of shape.In concrete implementation procedure, at first confirm the three-dimensional formation that expression group integral body will keep, the model outside surface is carried out uniform sampling.The individual number of sampled point number on each profile and group equates, the locus of the corresponding individuality in the position of each sampled point, and each individuality all has one group of corresponding sampling points.The global path that all individualities are set in accordance with the user from initial sampling point position moves to the sampling point position of termination, and whole movement tendency and profile just can show through the set of individual behavior.From the consideration on counting yield and the visual effect, in the reference position and the target location of cluster of cartoons simulation, the constraint that user's setting is satisfied in the distribution of group's monnolithic case substantially gets final product.When group's profile each to the constraint profile the intermediateness conversion time needn't strictly keep retraining profile.Specifically as shown in Figure 2.
Use three-dimensional model to represent the profile that the whole needs of group keep, this is comprising initial formation and two types of termination formation.Simulation requires the individual number of surperficial sampled point number of each formation and group to equate; The sampled point of initial formation and stop setting up relation one to one between the sampled point of formation, the sampled point on initial formation surface and the sampling point position that stops the formation surface are as motion starting point and terminal point individual in the group.In the method, source object and target object surface are made up of primitive fully.At first object surfaces is converted into triangle model, makes two objects have identical triangle number, tentatively set up two triangle corresponding relations between the model through the spherical projection mode through triangle subdivision.
The process of uniform sampling is as shown in Figure 3:
Take into account efficient and effect, we have tested is the random point method of sampling of probability and two kinds of methods of space Octree sampling of layering with the area.
With the area is the random point method of sampling of probability
Simple stochastic sampling algorithm is meant the triangular plate of selecting some at model surface, and from each point of triangular plate surface extraction of choosing, the result of sampling depends on whether the leg-of-mutton distribution of surface mesh is even.In fact the detail characteristic of model is often described through fine and closely woven triangle.This method causes at the intensive part oversampling of triangle easily, and the too sparse inhomogeneous result of area sampling who distributes at large stretch of triangle.
The stochastic sampling algorithm that with the area is probability is a kind of improved stochastic sampling algorithm.Concrete step is as follows:
Step11: the initialization that imports model;
Calculate the area S of all triangles of outside surface
i, cumulative area obtains total surface area S.
Each triangle is a preface to read in serial number, arranges along the x direction of principal axis.Triangular plate equals the size of its area in the shared length of x axle.
Step12: random series is selected sampled point;
Amass S as minimum and maximum border with value of zero and model surface, in this interval, generate one-dimensional random sequence: P
Random∈ [0, S], P
Random=(P
1, P
2..., P
n), if 0<P
m<S
i, triangular plate i is just as the sampling candidate.(correction algorithm makes each triangle be selected once at most)
Step13: each candidate's triangle i goes up the calculating sampling point.System of selection as: select leg-of-mutton barycentric coordinates as adopting data:
O=(A+B+C)/3
Perhaps the method with random floating point determines coordinate 0:
O=P
aA+P
bB+P
cC,P
a+P
b+P
c=1
The algorithm of stratified sampling point sampling guarantees each sampling optimization in original model surface, well the sampling structure complicated model.Computing specifically is divided into following three steps:
Use adaptive octree structure that the bounding box of model is carried out three-dimensional dividing;
The self-adaptation octree structure of this method is made up of square voxel (texel).The self-adaptation Octree is cut apart model effectively, compares with the Octree of even subdivision to have the advantage that search is efficient and save storage space.The triangular plate of model surface and voxel intersect, and have confirmed the triangular plate information that each voxel comprises thus.The degree of depth of Octree is big more, and the volume of each voxel is just more little, and is meticulous more to the subdivision of model, but the internal memory that consumes is also big more.Therefore, the depth capacity that should set permission is overflowed to prevent internal memory.
Step21: from each voxel of Octree, select a triangular plate, therefrom calculate a sampled point;
From voxel, select the method for sampled point to have a lot, for example from apart from sampled point of calculating the nearest triangle of voxel center.
Sampling point position and exponential distribution function F=λ e that this method is selected
-λ dRelevant.Wherein, d is that sampled point arrives the length of side of the distance of voxel center divided by voxel.The value of λ is 5 in the test of this paper, the increase of value, the distribution of sampled point concentrate on more voxel center near.
Adopt the method for iterative computation from each triangular plate, to seek a suitable point: to define a threshold value, if the area of test triangular plate is greater than this threshold value S
Min, be new summit with regard to the mid point of selecting three limits, triangle is divided into littler triangle.Iteration is divided into each new leg-of-mutton area and stops after less than threshold value.
The selected priority definition of triangular plate after one cut apart multiply by its area for distribution function F.After a triangular plate is chosen by the mode of " wheel disc ", select a point as sampled point from triangular surface randomly.
Step22: based on equally distributed purpose, weigh the distance between the sampled point, deletion each other too near sampled point
When the sampled point that obtains when last step just is positioned at the boundary vicinity of two voxel, may with adjacent sampled point hypotelorism.Equally distributed constraint requirements is avoided this type data as far as possible.Therefore we are benchmark with the voxel size of Octree leaf node, and setting needs the shortest spacing m that keeps in twos between the sampled point, cast out too near sampled point.
For any sampled point p, definition set: T (P)=q|d (p, q)<m}.When T (P) non-NULL, need the unnecessary point of deletion.The point r that at first is selected deletion is distance set T (P) center point farthest.Behind the deletion point r, upgrade relevant neighborhood, handle up to have a few all and meet the requirements.
After having calculated the sample distribution data that are used for shape constraining, need set up the sampled point of the initial formation of group and stop between the sampled point of formation corresponding relation one by one.The center of initial formation moved to the center that stops formation overlap; Mode according to globular projection will project to the surface mesh that stops formation from the sampled point that initial formation calculates; Contrast the relative position of two external form surface sampled points, corresponding one by one with the principle of mating nearby.The sampled point of initial formation and termination formation sampled point are to having specified group's individuality required initial sum final position of following in deformation process respectively.If colony changes between a series of shapes, so two adjacent shapes are retrained as a pair of profile variation, handle each with identical method confused shape is retrained.Colony keeps certain external form in the space, to move and carry out the transition in the process of target shape, only need roughly meet the results of two linear interpolation of constraint profile.Individual tightness degree of assembling is according to the difference of its attribute and difference.
This method adopts the thought of global path planning: the reference position of user's designated group animation simulation zero hour, stop target location constantly; Insert the reference mark in the centre, with B-spline Curve R (t), t ∈ [0; 1] interpolation is calculated each individual similar motion path of group.The discrete decomposition of taking curved path to be carried out arc length parameterized reaches the purpose of evenly cutting apart.The arc length parameterized method is: the total length in definition path is L, is the n section with the movement locus uniform discrete, promptly simulates the n step altogether.In any k step group's location in space is R
k=R (k/n), k<n.This method is implemented simple, real-time high-efficiency, can realize the pahtfinder hard planning of greater density group preferably.
In the real world, individual motion purpose based on oneself is independently thought deeply judgement, determines next step action of oneself.This method obtains assembling the mass motion rule that forms through simulating individual motion.In this simulation approach individual based on intelligence, the intelligence individuality in our the abstract group is a particle, gives its different parameter and expresses its physical characteristics, and it makes rich and varied motion through the guiding of constraint conditions such as rule.
In virtual scene, the individuality in the group is mainly at simulating natural environment external force F
External,, basic role power F
Basic, directed force F
HomingThree's acting in conjunction is motion down.
According to the individual current position of group, with the distance and the simulated time t adjustment vector field force F of target location
External, basic role power F
Basic, directed force F
HomingThree's weight w (w>0), w
External+ w
Basic+ w
Homing=1, realize group to the target location steadily, motion naturally.
Existing Flock simulates the boids classical model that mostly proposes based on Reynolds, and----collision is avoided, polymerization--center is drawn close, arranged--speeds match rule to advocate individual behavior in virtual scene to observe separation.Individual through the perception virtual environment, alternately individual with in the subrange on every side other, next step the behavior of finally judging self.
In general, individual autonomous roaming behavior is mainly by its initial velocity, qualitative attribute and the decision of random drive external force.
The acting force of the individual autonomous roaming of definition driving is basic role power F in this method
Basic:
F
basic=w
1×F
seperare+w
2×F
cohesion+w
3×F
arrange
w
1+w
2+w
3=1,w
1>0,w
2>0,w
3>0
F
SeperareBe rule of detachment power.Rule of detachment makes individual contiguous towards periphery individual average orientation deflection, has kept the appropriateness distance between individuality and the individuality, and individuality can be because of too crowding and collision each other;
F
CohesionBe polymeric rule power.Polymeric rule has embodied the cohesion of group for individuality, individual in the neighborhood scope all individual centers gather, tend to draw close and receive the protection of group to the center;
F
ArrangeBe queueing discipline power.Queueing discipline has been explained the unitarity of group's individual behavior, and group's individuality has roughly the same target;
In present realization, the setting value of each individual ken angular range and neighbours' radius separate, difference to some extent under the polymerization, three kinds of different situations of arrangement: neighbours' radius of separation is maximum, and polymerization is taken second place, and arranges minimum; The FOV that separates is maximum, and polymerization is taken second place, and the angle of arrangement is minimum.Before the normalization, the weight interval of polymerization is [2,6], and the weight interval of centrifugation is [8,12], and the weight interval of alignment is [2,6].
Simulate the individual behavior of group, will embody the freedom of its motion incessantly, also need give expression to group exactly has the organized kinetic characteristic of purpose.This method is the virtual pilot point of each individual appointment of group, is realizing effectively group being organized into the shape that the user sets when target is to individual guiding function.For guarantee each individuality in the group can both real-time follow-up to corresponding impact point, should avoid some individual group that breaks away from the simulation process, avoid individual again firmly attached to the stiff behavior of target location.
The whole process of individual movement is separated into n step-length in chronological order, each step interval.Setting the motion initial time is t
0, at k arbitrarily constantly, through specifying a virtual guide to guide its down t constantly for individual
0Motion of goal constraint point and the update mode of+δ t * (k+1).Virtual guide's position is by the sampling point position decision of above-mentioned global path and shape constraining.In arbitrary moment of simulation, individuality all attempts to follow the tracks of pilot point.But because the difference of individual character, the tightness degree of tracking is had nothing in common with each other.Virtual guide is with directed force F
HomingMode control individual direction of motion and speed.We are with directed force F
HomingSize restriction in the reasonable scope.Individual keeping under certain paleocinetic basis, receive directed force F
HomingEffect move to impact point, reach the balance of autokinetic movement and controlled motion.Specifically, at first according to the autonomous roaming component motion of individuality, then in directed force F in the state computation k+1 moment in the k moment
HomingEffect under find the solution acceleration a again
K+1, speed v
K+1, displacement p
K+1, it is individual at k+1 time of day constantly to obtain intelligence.To different to the guidance mode of individuality of the target of the guiding of individuality and dynamic change, this method is used two kinds of method force calculation F according to static object
Homing
Static object is to the guiding function power F of individuality
HomingCalculate:
F
homing=norm(P
leader-P
i)×V
max-V
i
Norm ()-normalized function
p
LeaderThe position at-reference mark
V
Max-individual the maximum rate that allows
P
i, V
i-individual current location and speed
Group slowly is transformed to other a kind of static profile from a kind of profile in migration course than simulation, and we find that the cluster of cartoons of following the trail of dynamic object more can show lifelike visual effect.In this case, the parameter of virtual target self is dynamic change along with the variation in time and space, can not simply use passive guide to be used for influencing individual motion to target.
Follow the trail of dynamic object-kalman filter method (Kalman Filter)
Kalman filtering is an optimized autoregression data processing algorithm, under numerous application scenarios, can reach optimum efficiency.Kalman filtering is utilized the dynamic sequence information of one group of object observing, removes The noise, obtains an estimation about target location and speed.This estimation can be the estimation (filtering) to current goal, for the estimation (prediction) of state in future, or to the estimation of past state (interpolation or level and smooth).
Use the directed force F of Kalman filtering compute optimalization
Homing, method step is following:
1, predicts individual next step behavior through the time renewal equation
Calculate k state estimation X constantly through the time renewal equation from moment k-1
K|k-1Estimate C with covariance
K|k-1, obtain k predicting the outcome of state constantly:
X
k|k-1=AX
k-1|k-1+BU
k-1
C
k|k-1=AC
k-1|k-1A
T+Q
X
K|k-1It is the optimal result of Last status
U
K-1It is the controlled quentity controlled variable of current state
Q is an error covariance.
2, combine to predict the outcome, obtain modified value via measuring renewal equation;
Collect the k measured value of state constantly,, calculate the measurement renewal equation of kalman filter method, obtain the k optimization estimated value X of state constantly in conjunction with predicting the outcome of k moment state
K|k-1:
Kg
k=C
k|k-1H
T(HP
k|k-1H
T+R)
-1
X
k|k=X
k|k-1+Kg
k(Z
k-HX
k|k-1)
C
k|k=(I-Kg
kH)P
k|k-1
Kg is Kalman's increment, Z
kThe measured value of etching system when being k; H is the parameter of measuring system, and for many measuring systems, H is a matrix; R is an error covariance; Error covariance coefficient Q in the formula and the R confidence level (the more little expression reliability forecasting of Q is high more, and R is more little, and object is the closer to the target location) with measurement result of representing respectively to predict the outcome
3, calculate final F
HomingDirected force
Preserve each individual two value relevant with the position in the group: one is the actual position in moment of being calculated by local rule, and another is the position of pilot point, and just individuality is in the k target location in the moment.
K actual position is constantly regarded the k X that predicts the outcome of state constantly as
K|k-1
K target location is constantly regarded the k measured value Z of state constantly as
k
Through the covariance parameter of adjustment Kalman filter function, the speed of control individuality is more near predicting the target location that obtains or more deferring to autonomous roaming property
With above-mentioned parameter substitution time renewal equation and measurement renewal equation, calculate the k optimization estimated value X of state constantly
K|k, use X
K|kReplace predicting the outcome X
K|k-1, counter asking puts on individual directed force F
Homing
Classical cluster of cartoons algorithm is followed the boids model that Reynolds proposes, i.e. separation, polymerization and arrangement principle.But the boids model just stresses to have described individual roaming behavior, and the motion when comparatively being fit to the individual wide of simulation position has certain limitation under the application background of complex scene.
On the basis that has combined the free behavior of group, the independent sucking action that this method algorithm compound constant target is individual to group makes and satisfies the condition of shape constraining on the whole when the individual movement aspect is followed the boids model.
Group's individuality is at vector field force F
External, basic role power F
Basic, directed force F
HomingActing in conjunction under, receive with joint efforts F=W
v* F
External+ W
b* F
Basic+ W
f* F
HomingEffect, move to the target location.
F
ExternalBe outside vector field force:
P
t=P-P
center
F
external=k×(P
t,x,0,P
tz)
P is the position vector of current individuality
P
CenterIt is the center vector of vector field
K is a constant, and this experiment gets 0.2
If vector field force F
External, basic role power F
Basic, directed force F
HomingAdopt fixing weight, individually can move rather than carry out the transition to smoothly terminal point confusedly near arriving the target location time.If come dynamically to regulate the weight w of each acting force, can guarantee that group steadily, move towards the target location naturally according to the distance of individual current location of group and target location.
In the time of group individual wide position, its behavior is mainly by basic role power F
BasicWith vector field force F
ExternalDrive, embody individual free-moving character.Along with individuality little by little near the target location of group, thereby individual cognition is drawn close the density that causes group each other and is increased.In this case, F
BasicIn the repulsive force that produces of centrifugation can individuality be pushed away impact point, depend directed force F alone
HominThe uncontrollable non-human act of drawing close to target of the effect of g.In order to make individuality carry out the transition to target location separately smoothly, progressively reduce F
BasicAnd F
ExternalWeight, correspondingly increase directed force F
HomingWeight, express of the influence of goal directed point emphatically to individual movement.
This method has proposed a kind of colony's deformation effect of novelty, can generate the cluster of cartoons that comprises thousands of members in real time.This method both can show the deformation effect of whole group between a series of static Three Mesh; Also can simulate the novel special efficacy of following the trail of dynamic profile; Having graceful vision and artistic effect, is that a kind of computing machine generates the economy of 3 D deformation cluster of cartoons effect and effectively trial.
In order to realize deformation effect, on the boids model based additional one " guiding behavior ".Just give each individual virtual control guide, the control guide produces guiding function to the behavior of individuality.The individual gathering forms complicated and diversified monnolithic case.The control guide is corresponding to the sampled point of constraint shapes, and its motion is mainly controlled by position, path control function and the Kalman filter function three of goal constraint point jointly.
When the profile of simulation group dynamic change, virtual control guide's state also changes.Use Kalman filtering; Control and other additional regulation and control in conjunction with global path; Predict with next position constantly of guide that to individual the desirable shape of the maintenance user of colony also can be controlled well even retrain in profile in the position that adjustment is individual under the fast-changing situation.More than a kind of Flock animation method based on shape constraining that the embodiment of the invention provided has been carried out detailed introduction; Used concrete example among this paper principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.
Claims (4)
1. the Flock animation method based on shape constraining defines Flock group and is made up of the n individuals, and abstract each individuality is used based on the mode of individuality and simulated group's motion for having the particle of like attribute; Mainly both form by autonomous roaming behavior part and the behavior part that attracted by target in individual behavior in virtual scene; The motion under the acting in conjunction of vector field force, basic role power, three power of guiding of individuality in the design group; According to the distance between individual current position of group and target location, adjustment vector field force, basic role power, directed force three's the shared ratio of weight is controlled group steadily, move towards the target location naturally; It is characterized in that, aspect shape constraining, represent the initial formation and termination formation that the whole needs of group keep with three-dimensional grid model; Through the model outside surface is carried out uniform sampling, just obtained the point set of coverture surface; According to the relative position of sampling spot on grid, between the sampling spot of source grid and target gridding, set up man-to-man relation; Sampled point number on each grid equates with the group number, and each is to the locus corresponding to individuality, the position of sampled point; After specifying the animation simulation reference position of the zero hour, stopping target location constantly, insert a series of reference mark between the two, just calculate the global motion path of group with B-spline Curve R (t) interpolation; Be the basis with the global motion curve then, design each individual motion path in conjunction with the position of profile obligatory point.
2. the method for claim 1 is characterized in that, source object and target object surface are made up of primitive fully.At first object surfaces is converted into triangle model, makes two objects have identical triangle number, tentatively set up two triangle corresponding relations between the model through the spherical projection mode through triangle subdivision.
3. the method for claim 1 is characterized in that, the discrete decomposition of taking curved path to be carried out arc length parameterized reaches the purpose of evenly cutting apart; The arc length parameterized method is: the total length in definition path is L, is the n section with the movement locus uniform discrete, promptly simulates the n step altogether; In any k step group's location in space is R
k=R (k/n), k<n; This method is implemented, and pahtfinder hard simple, that can realize greater density group is preferably planned.
4. the method for claim 1 is characterized in that, in order to realize deformation effect, on the boids model based additional one " guiding behavior "; Just give each individual virtual control guide, the control guide produces guiding function to the behavior of individuality; The individual gathering forms complicated and diversified monnolithic case, and the control guide is corresponding to the sampled point of constraint shapes, and its motion is mainly controlled by position, path control function and the Kalman filter function three of goal constraint point jointly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110301562A CN102332175A (en) | 2011-09-28 | 2011-09-28 | Flock animation method based on shape constraints |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110301562A CN102332175A (en) | 2011-09-28 | 2011-09-28 | Flock animation method based on shape constraints |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102332175A true CN102332175A (en) | 2012-01-25 |
Family
ID=45483937
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110301562A Pending CN102332175A (en) | 2011-09-28 | 2011-09-28 | Flock animation method based on shape constraints |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102332175A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104867142A (en) * | 2015-05-14 | 2015-08-26 | 中国科学院深圳先进技术研究院 | Navigation method based on three-dimensional scene |
CN106097416A (en) * | 2016-06-12 | 2016-11-09 | 天脉聚源(北京)教育科技有限公司 | A kind of method and device that object mobile route is set |
US10066956B2 (en) | 2015-05-14 | 2018-09-04 | Shenzhen Institutes Of Advanced Technology Chinese Academy Of Sciences | Navigation technology in three-dimensional scenes |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101344969A (en) * | 2008-08-20 | 2009-01-14 | 浙江大学 | Fuzzy control method for generating group animation |
CN101373542A (en) * | 2008-08-20 | 2009-02-25 | 浙江大学 | Global path control method suitable for cluster of cartoons |
CN101414384A (en) * | 2008-11-05 | 2009-04-22 | 浙江大学 | Control method for group set movement based on radial direction basis function |
CN101770655A (en) * | 2009-12-25 | 2010-07-07 | 电子科技大学 | Method for simplifying large-scale virtual dynamic group |
-
2011
- 2011-09-28 CN CN201110301562A patent/CN102332175A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101344969A (en) * | 2008-08-20 | 2009-01-14 | 浙江大学 | Fuzzy control method for generating group animation |
CN101373542A (en) * | 2008-08-20 | 2009-02-25 | 浙江大学 | Global path control method suitable for cluster of cartoons |
CN101414384A (en) * | 2008-11-05 | 2009-04-22 | 浙江大学 | Control method for group set movement based on radial direction basis function |
CN101770655A (en) * | 2009-12-25 | 2010-07-07 | 电子科技大学 | Method for simplifying large-scale virtual dynamic group |
Non-Patent Citations (3)
Title |
---|
《中国优秀硕士学位论文全文数据库》 20070228 沈恬 群体变形-形状约束的群体动画 , * |
沈恬: "群体变形—形状约束的群体动画", 《中国优秀硕士学位论文全文数据库》 * |
聂晶 等: "基于粒子群算法的群体路径生成方法研究与实现", 《计算机应用》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104867142A (en) * | 2015-05-14 | 2015-08-26 | 中国科学院深圳先进技术研究院 | Navigation method based on three-dimensional scene |
CN104867142B (en) * | 2015-05-14 | 2018-01-05 | 中国科学院深圳先进技术研究院 | Air navigation aid based on three-dimensional scenic |
US10066956B2 (en) | 2015-05-14 | 2018-09-04 | Shenzhen Institutes Of Advanced Technology Chinese Academy Of Sciences | Navigation technology in three-dimensional scenes |
CN106097416A (en) * | 2016-06-12 | 2016-11-09 | 天脉聚源(北京)教育科技有限公司 | A kind of method and device that object mobile route is set |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108491598B (en) | Crowd evacuation simulation method and system based on path planning | |
Shaferman et al. | Unmanned aerial vehicles cooperative tracking of moving ground target in urban environments | |
CN109144102A (en) | A kind of Path Planning for UAV based on improvement bat algorithm | |
CN113110592A (en) | Unmanned aerial vehicle obstacle avoidance and path planning method | |
Sun et al. | Crowd navigation in an unknown and dynamic environment based on deep reinforcement learning | |
CN109543285B (en) | Crowd evacuation simulation method and system integrating data driving and reinforcement learning | |
CN113848974B (en) | Aircraft trajectory planning method and system based on deep reinforcement learning | |
CN112508164B (en) | End-to-end automatic driving model pre-training method based on asynchronous supervised learning | |
Stevšić et al. | Sample efficient learning of path following and obstacle avoidance behavior for quadrotors | |
CN101188025A (en) | A high-efficiency real time group animation frame | |
CN112183288B (en) | Multi-agent reinforcement learning method based on model | |
CN115185294B (en) | QMIX-based aviation soldier multi-formation collaborative autonomous behavior decision modeling method | |
Zhang et al. | Hybrid FWPS cooperation algorithm based unmanned aerial vehicle constrained path planning | |
CN115454115A (en) | Rotor unmanned aerial vehicle path planning method based on hybrid wolf-particle swarm algorithm | |
CN113391633A (en) | Urban environment-oriented mobile robot fusion path planning method | |
CN114815891A (en) | PER-IDQN-based multi-unmanned aerial vehicle enclosure capture tactical method | |
CN102332175A (en) | Flock animation method based on shape constraints | |
CN109740192B (en) | Crowd evacuation simulation method and system based on Arnold emotion model | |
Calvo et al. | Waves in isotropic totalistic cellular automata: Application to real-time robot navigation | |
CN113110101B (en) | Production line mobile robot gathering type recovery and warehousing simulation method and system | |
Helble et al. | 3-d path planning and target trajectory prediction for the oxford aerial tracking system | |
Regier et al. | Improving navigation with the social force model by learning a neural network controller in pedestrian crowds | |
CN117150757A (en) | Simulation deduction system based on digital twin | |
Vitale et al. | Exploring ancient landscapes under lake Huron using cultural algorithms | |
CN113359852B (en) | Unmanned aerial vehicle cluster cooperative control method capable of simulating individual attribute intelligent behaviors of pigeon |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20120125 |