CN101604443B - Method and device for generating motion track of emitted object - Google Patents

Method and device for generating motion track of emitted object Download PDF

Info

Publication number
CN101604443B
CN101604443B CN2009101606766A CN200910160676A CN101604443B CN 101604443 B CN101604443 B CN 101604443B CN 2009101606766 A CN2009101606766 A CN 2009101606766A CN 200910160676 A CN200910160676 A CN 200910160676A CN 101604443 B CN101604443 B CN 101604443B
Authority
CN
China
Prior art keywords
texture
movement locus
pixel
length
intercepting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2009101606766A
Other languages
Chinese (zh)
Other versions
CN101604443A (en
Inventor
王彭城
姚建辉
汤闻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN2009101606766A priority Critical patent/CN101604443B/en
Publication of CN101604443A publication Critical patent/CN101604443A/en
Application granted granted Critical
Publication of CN101604443B publication Critical patent/CN101604443B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

The invention discloses a method and a device for generating the motion track of an emitted object for solving the problems that the shape of the motion track of the emitted object in a shooting game is single and that a splicing trace of the motion track of the emitted object is obvious when a control point moves. The method comprises the following steps: looking up a motion track texture corresponding to a status from a texture library according to the status of the control point in a current frame; determining the motion distance of the emitted object emitted from the current frame by the control point and intercepting the motion track texture with a corresponding length from the looked-up motion track texture according to the determined distance; and if the current frame is a first frame, taking the intercepted motion track texture as the motion track of the emitted object, or splicing the intercepted motion track texture with the motion track texture corresponding to a previous frame to generate the motion track of the emitted object, thereby flexibly generating motion tracks of different shapes and smoothly splicing the motion track textures formed before and after the control point changes when the status of the control point changes.

Description

A kind of generation method and device of motion track of emitted object
Technical field
The present invention relates to technical field of image processing, relate in particular to a kind of generation method and device of motion track of emitted object.
Background technology
Fast development along with network technology, network becomes the important amusement and leisure mode of people, people's entertainment life has been enriched in the appearance of diverse network recreation especially, for example, shooting game is generally by reference mark emission emitter, as bullet, with the object of shooting appointment, the reference mark can be the visual experience of physical form such as aircraft, tank with the increase player.
In shooting game at present, the movement locus of emitter generally all is a straight line, the shape of movement locus is single, and when the move left and right of reference mark, the movement locus of emitter also can change thereupon, and because the movement locus of emitter is a straight line, when the unexpected move left and right in reference mark, be easy to produce tangible splicing vestige, make that user's visual experience is poor.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of generation method and device of motion track of emitted object, is used for solving the tangible problem of splicing vestige of the running orbit shape running orbit single and emitter when move at the reference mark of shooting game emitter.
The embodiment of the invention is achieved through the following technical solutions:
An aspect of the embodiment of the invention provides a kind of generation method of motion track of emitted object.
The generation method of the motion track of emitted object that provides according to the embodiment of the invention comprises:
From the texture storehouse of setting up in advance, search the movement locus texture corresponding at the state of present frame according to the reference mark with described state;
Determine in the emitter of described reference mark emission distance, and from the movement locus texture that finds, intercept the movement locus texture of respective length according to the described distance of determining in the present frame motion;
If present frame is first frame, the described movement locus texture that then will intercept is as the movement locus of described emitter, otherwise the described movement locus texture that will the intercept movement locus texture splicing corresponding with previous frame generates the movement locus of described emitter.
Another aspect of the embodiment of the invention provides a kind of generating apparatus of motion track of emitted object.
The generating apparatus of the motion track of emitted object that provides according to the embodiment of the invention comprises:
Texture is searched the unit, is used for searching with described state corresponding movement locus texture at the state of present frame from the texture storehouse of setting up in advance according to the reference mark;
The texture interception unit is used to determine in the emitter of the described reference mark emission distance in the present frame motion, and searches the movement locus texture of intercepting respective length the movement locus texture that the unit finds according to the described distance of determining from described texture;
The movement locus generation unit, be used for if present frame is first frame, then with the described movement locus texture of described texture interception unit intercepting movement locus as described emitter, otherwise the movement locus of the described emitter of movement locus texture splicing generation that the described movement locus texture of described texture interception unit intercepting is corresponding with previous frame.
Above-mentioned at least one technical scheme that provides by the embodiment of the invention, the different conditions by the reference mark is set and the corresponding relation of movement locus texture, at first search corresponding movement locus texture at the state of present frame according to the reference mark, from the movement locus texture that finds, intercept the movement locus texture of respective length according to the emitter of reference mark emission in the distance of present frame motion then, the movement locus texture splicing that the movement locus texture of intercepting is corresponding with previous frame generates the movement locus of this emitter, thereby can generate the difform movement locus of emitter neatly, and when the state at the reference mark changed, movement locus texture corresponding respectively before and after changing can smoothly splice.
Other features and advantages of the present invention will be set forth in the following description, and, partly from instructions, become apparent, perhaps understand by implementing the present invention.Purpose of the present invention and other advantages can realize and obtain by specifically noted structure in the instructions of being write, claims and accompanying drawing.
Description of drawings
Accompanying drawing is used to provide further understanding of the present invention, and constitutes the part of instructions, is used from explanation the present invention with the embodiment of the invention one, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the synoptic diagram of the basic texture picture created in the embodiment of the invention;
Fig. 2 is the movement locus texture synoptic diagram that the different conditions at reference mark in the embodiment of the invention is provided with;
Fig. 3 is a synoptic diagram of determining the pixel value of each pixel in the B texture in the embodiment of the invention;
Fig. 4 is for determining the process flow diagram of pixel value respectively with the relation of R and r according to d in the embodiment of the invention;
Fig. 5 generates the process flow diagram of texture when remaining static for reference mark in the embodiment of the invention;
Fig. 6 is the synoptic diagram of reference mark stationary state time intercepting movement locus texture in the embodiment of the invention;
Fig. 7 is in the process flow diagram that generates texture when moving right state for reference mark in the embodiment of the invention;
The synoptic diagram of intercepting movement locus texture when Fig. 8 moves right state for reference mark in the embodiment of the invention;
Fig. 9 is in the process flow diagram that generates texture when being moved to the left state for reference mark in the embodiment of the invention;
The synoptic diagram one of intercepting movement locus texture when Figure 10 is moved to the left state for reference mark in the embodiment of the invention;
The synoptic diagram two of intercepting movement locus texture when Figure 11 is moved to the left state for reference mark in the embodiment of the invention;
Figure 12 is the generating apparatus synoptic diagram one of motion track of emitted object in the embodiment of the invention;
Figure 13 is the generating apparatus synoptic diagram two of motion track of emitted object in the embodiment of the invention.
Embodiment
In order to provide the implementation of flexible generation emitter movement locus and level and smooth splicing, the embodiment of the invention provides a kind of generation method and device of motion track of emitted object, below in conjunction with Figure of description the preferred embodiments of the present invention are described, be to be understood that, preferred embodiment described herein only is used for description and interpretation the present invention, and is not used in qualification the present invention.And under the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
According to the embodiment of the invention, a kind of generation method of motion track of emitted object is provided, in this method, at first from the texture storehouse of setting up in advance, search the movement locus texture corresponding at the state of present frame with this state according to the reference mark; Further determine the distance of the emitter of reference mark emission, and from the movement locus texture that finds, intercept and this movement locus texture apart from respective length according to the distance of determining in the present frame motion; If present frame is first frame, then with the movement locus texture of intercepting movement locus as this emitter, otherwise the movement locus of this emitter of movement locus texture splicing generation that the movement locus texture of intercepting is corresponding with previous frame.
At first, the process of setting up in texture storehouse is described in detail in the said method that the embodiment of the invention is provided:
The process of setting up in the texture storehouse that the embodiment of the invention provides comprises:
Create basic texture picture according to configuration information, this configuration information comprises width, the length information of basic texture picture, and alternatively, also comprises the format information of basic texture picture, then do not generate basic texture picture by this format information if do not comprise according to default form;
According to the basic texture picture of creating, and the state at default reference mark and the corresponding relation of movement locus texture shape, generate the movement locus texture corresponding respectively, and be saved in the texture storehouse with the different conditions at reference mark.
Understand for convenient, make a more detailed description below in conjunction with the constructive process of instantiation to the texture storehouse:
The first step, make basic texture picture:
In the embodiment of the invention, make the basic texture picture that is used to realize the emitter movement locus in advance according to configuration information, wherein, configuration information is set in advance by the program making personnel.As shown in Figure 1, be used to realize the required texture picture of using of banded curve emitter for what be provided with, this texture picture can be made by fine arts personnel, form can be to be with Alpha passage form arbitrarily, and the Alpha passage is one 8 a gray scale passage, and this passage comes transparence information in the document image with 256 grades of gray scales, define transparent, opaque and translucent area, wherein black expression full impregnated is bright, represents opaquely in vain, and the ash expression is translucent.Colored degree of depth standard has following several usually:
8 looks, the colored number that each pixel can show are 28 powers, i.e. 256 kinds of colors;
16 strengthen look, and 16 colours, the colored number that each pixel can show are 2 16 powers, i.e. 65536 kinds of colors;
24 true color, the colored number that each pixel can show is 24, i.e. 2 24 powers, about 1,680 ten thousand kinds of colors;
32 true color promptly increase the Alpha passage of a presentation video transparence information again on the basis of 24 true color images.
Texture picture shown in Figure 1 can adopt above-mentioned any one Alpha passage form, for example, adopts the tga form of 32 bit strip Alpha passages.When specifically creating texture picture as shown in Figure 1, the wide length of texture picture has no particular limits, but in order to intercept the convenient texture picture that 32 pixels are wide, 256 pixels are long that generally can adopt, below in the narration, the related width and the unit of length all are pixel.A special requirement when being made, texture picture shown in Figure 1 is arranged, the top and the bottom that are texture can be spliced, that is to say the top that the bottom of a texture as shown in Figure 1 is spliced to an other texture as shown in Figure 1, can not find out the vestige that splicing is arranged.If the corresponding same pixel value of all pixels does not then have this requirement in the basic texture picture.
The described technical scheme of the embodiment of the invention goes for the 2D shooting game, also be applicable to the 3D shooting game, but because all dough sheets of the texture of the movement locus correspondence of emitter are in same length, just the Z axle all is identical, so can consider and understand with the mode of 2D.Below mainly introduce the detailed implementation procedure of the embodiment of the invention from the angle of 2D.
Second step, the setting movement locus texture corresponding with the different motion state at reference mark:
According to the different motion state at reference mark, be provided with different movement locus textures, particularly, the state at reference mark can comprise stationary state, be moved to the left state and the state that moves right.The purpose that will reach according to the embodiment of the invention, promptly realize emitter movement locus flexibly, for example, banded curvilinear motion track, then when the reference mark remains static, the movement locus of the emitter of reference mark emission can be set to straight line, when the reference mark was in the state of being moved to the left or move right state, the movement locus of the emitter of reference mark emission can be set to curve, as required, the concave and convex direction of curve further is set according to the moving direction at reference mark, for example, when the reference mark is in when being moved to the left state, it is protruding to the right that curve can be set, when the reference mark is in when moving right state, it is protruding left that curve can be set.
Certainly, the state at reference mark can also comprise and moves up and move down, but since the reference mark when moving up and down to the not obviously influence of shape of the movement locus of emitter, therefore, the reference mark is in the state of being moved to the left to embodiment of the invention emphasis and the situation of the state that moves right is set forth, it is pointed out that the concave and convex direction of curve in the embodiment of the invention and the corresponding relation of reference mark direction of motion can be provided with as required flexibly.
In the specific embodiment, the movement locus texture that is provided with at the different conditions at reference mark as shown in Figure 2, Fig. 2 shows three sections movement locus textures at three kinds of motion states settings at reference mark, and wherein the A texture is the linear pattern texture, and is corresponding with the stationary state at reference mark; B texture and C texture are the shaped form texture, move right with the reference mark according to being provided with respectively that to be moved to the left state corresponding for state and reference mark.These three sections textures all are to be generated by basic texture picture shown in Figure 1.
Below in conjunction with Fig. 2, the process that generates A texture, B texture and C texture is described in detail:
At first, in program, create a width and be the W pixel, highly be that H pixel, form are the texture of 32 bit strip alpha passages, be i.e. the rectangular area that comprises A texture, B texture and C texture among Fig. 2.Preferably, the texture format of Chuan Jianing is consistent with the form of texture shown in Figure 1 herein, otherwise needs carry out the texture format conversion when according to the texture that Fig. 1 creates the pixel in A texture, B texture or the C texture being filled.
Position relation according to A texture, B texture and C texture among Fig. 2, preferably, convenient when filling for pixel, the value of W can be got the length sum that adds the B texture greater than the width of A texture, and the value of H can be got the width sum that adds the C texture greater than the length of A texture.
Be to be understood that, the position relation of A texture shown in Figure 2, B texture and C texture is only for implementing a kind of preferred mode of the embodiment of the invention, the promptly convenient pixel value of determining pixel in A texture, B texture and the C texture, in the practical application, the position relation of A texture, B texture and C texture can be provided with as required flexibly, correspondingly, the width W of the rectangular area correspondence that comprises A texture, B texture and C texture of establishment and height H can be determined flexibly according to the particular location relation of A texture, B texture and C texture.
Secondly, generate A texture, B texture and C texture respectively, detailed process is as follows:
The generative process of A texture:
At first determine its width and length information according to the configuration information of A texture correspondence, according to the length relation of the length of A texture and basic texture picture shown in Figure 1, the pixel value of getting pixel in the basic texture picture shown in Figure 1 successively is filled into the corresponding pixel points of A texture then.
Generally speaking, for making things convenient for the filler pixels point, the width of A texture is identical with the width and the length of Fig. 1 texture with length, the texture of get promptly that 32 pixels are wide, 256 pixels are long, each pixel value with texture shown in Figure 1 line by line takes out then, and (upper left corner coordinate of this rectangular area is (0 to be filled into the rectangular area of Fig. 2 correspondence, 0), lower right corner coordinate is (32,256), and the A texture was consistent with texture shown in Figure 1 after filling was finished.
Generally speaking, it is consistent with the width of texture shown in Figure 1 that the width of A texture need keep, and that the length of A texture is got is consistent with the length of texture shown in Figure 1, for pixel value is filled and follow-up splicing convenience, according to the embodiment of the invention, the length that also can get the A texture is greater than or less than the length of basic texture picture shown in Figure 1, and as if the length less than texture shown in Figure 1, then the top from texture shown in Figure 1 begins to intercept the texture picture of corresponding length as the A texture; If, then get texture shown in Figure 1, and then get part, with the texture splicing of the Fig. 1 that gets before greater than the length of texture shown in Figure 1 from the top of texture shown in Figure 1 greater than the length of texture shown in Figure 1.
The generative process of B texture:
Determine the width and the arc length of B texture according to the configuration information of B texture correspondence;
Determine the circumscribed rectangle of B texture, according to the circumscribed rectangle interior pixel of determining put the corresponding center of circle of described shaped form texture apart from d respectively with the relation of this shaped form texture respective outer diameters R and internal diameter r, determine the pixel of pixel correspondence in basic texture picture shown in Figure 1 of pixel value to be filled in the circumscribed rectangle, from basic texture picture, get this pixel corresponding pixel value and fill pixel corresponding in the B texture.
Understand for convenient, the process that generates the B texture made a more detailed description below in conjunction with instantiation:
As shown in Figure 2, the central angle θ of B texture and radius are to suppose according to the shape of the circular arc that will realize, and for example, getting θ is 30 degree.
The external diameter R of circular arc and the internal diameter r of circular arc can determine according to the length of central angle θ and circular arc, as shown in Figure 2, the center of circle is O, arc length L can set as required, preferably, arc length is got consistent with the length of texture shown in Figure 1, i.e. 256 pixels then can directly be determined internal diameter r according to central angle θ and arc length L:
r=L/θ
External diameter R just equals internal diameter r and adds the wide of texture shown in Figure 1, and promptly external diameter R just equals internal diameter r and adds 32.
For clarity, A texture and B texture part describe the process of determining the pixel value of each pixel in the B texture in the following cut-away view 2, specifically as shown in Figure 3:
At first calculate the position and the size of rectangular area among Fig. 3, this rectangular area is the minimum rectangle tangent with the B texture, according to internal diameter r, external diameter R and the central angle θ of this circular arc, can determine the wide of this rectangle and long, and concrete computing formula is as follows:
Width=the 2R*sin of rectangle (θ/2);
Length=the R-r*cos of rectangle (θ/2);
After determining the width and length of rectangular area, further determine horizontal ordinate and the ordinate of this rectangular area top left corner pixel point P, according to Fig. 3 as can be seen the P point all be the distance that some pixels are arranged apart from the right margin of coboundary, A texture, this distance can determine when the position of A texture, B texture and C texture is set, and mainly can not cross the border or be subjected to its elsewhere interference of texture in order to guarantee to get texture.
Each pixel in the calculating rectangular area line by line and the distance of center of circle O are then determined the coordinate of pixel according to the distance that calculates, and the pixel value of further getting the pixel of corresponding coordinate correspondence from Fig. 1 fills, and detailed process is as follows:
The distance of supposing pixel m and center of circle O is d, determines pixel value with the relation of R and r respectively according to d, particularly:
If d less than r or more than or equal to R, then directly skips this pixel;
If d more than or equal to r and less than R, as shown in Figure 4, comprises the steps:
Step 401, calculate the value w of R-d, the w that obtains is more than or equal to 0 and less than wide (i.e. 32 pixels) of texture shown in Figure 1;
Step 402, calculate the straight line that this pixel m and center of circle O connect into and the angle number of degrees β of Y-axis;
Step 403, judge the value of β, if β is less than-θ/2 or more than or equal to θ/2, then execution in step 404; If β is more than or equal to-θ/2 and less than θ/2, execution in step 405~step 407 then;
Step 404, skip this pixel, take off a pixel;
Step 405, calculating λ, λ=β+θ/2, the λ that obtains is more than or equal to 0 and less than θ;
Step 406, calculating h, the value=λ/θ * 256 of the length of h=λ/θ * texture shown in Figure 1;
Step 407, in texture picture shown in Figure 1, take out that (w h) locates the pixel value of pixel, utilizes this pixel value to fill current pixel point m.
According to above process, the value of having got each pixel in the rectangular area then can obtain the B texture, according to the value characteristics, the pixel value on texture left shown in Figure 1 border is filled at the inner arc place of B texture, the outer arc of B texture is filled the pixel value of the left margin of texture shown in Figure 1, fills the pixel value between texture left shown in Figure 1 border and the right margin between inner arc and the outer arc.
The generative process of C texture:
The generative process of the generative process of C texture and B texture is similar, after the generation, what the outer arc of C place texture was filled is the pixel value of the left margin of Fig. 1 texture, what inboard texture was filled is the pixel value of Fig. 1 texture right margin, what fill between inner arc and the outer arc is pixel value between Fig. 1 texture right margin and the left margin, and concrete filling process no longer is repeated in this description.
It is to be noted, when in program, creating A texture, B texture and C texture, the position relation of A texture, B texture and C texture can determine that the pixel position is that principle is provided with flexibly with convenient, and creating widely when be the texture of W pixel, long Alpha passage for the H pixel, W and H can be the flexible value of principle with convenient definite pixel position also.
The technique scheme that provides according to the embodiment of the invention, can generate the texture that is used to splice the emitter movement locus, the above is based on the process of as shown in Figure 1 texture picture explanation generation A texture, B texture and the C texture of establishment, texture picture adopts the tga form of 32 bit strip alpha passages among Fig. 1, the A texture, B texture and the C texture that generate have the color gradient effect, and the movement locus of generation is more vividly attractive in appearance.
Another aspect according to the embodiment of the invention, texture shown in Figure 1 can adopt single pixel value, be that all pixels are got identical pixel value in the basic texture picture, generating the A texture according to basic texture picture so with same pixel value, when B texture and C texture, only need be according to the A texture, the length of B texture and C texture and width, whole section intercepting texture from basic texture picture, and need not to fill at the position value of pixel one by one, promptly when generating the A texture, the pixel value of getting arbitrary pixel in the basic texture picture is filled the pixel in the A texture; When generating B texture or C texture, get the pixel value filling B texture of arbitrary pixel in the basic texture picture or the pixel in the C texture.
Behind A texture, B texture and the C texture according to the said process generation, be saved in the texture storehouse, and preserve the state at the reference mark of texture correspondence simultaneously, be the stationary state at the corresponding reference mark of A texture, the state that moves right at the corresponding reference mark of B texture, the state that is moved to the left at the corresponding reference mark of C texture.
In the recreation implementation, change along with the reference mark state, the movement locus of the emitter of its emission is also along with changing, the A texture, B texture and the C texture that generate below in conjunction with Fig. 2, respectively to the reference mark be in static, move right and be moved to the left that the generative process of movement locus describes under the state;
At first the parameter that relates in the process that generates texture is described:
1, the translational speed of emitter is v, and this value is a default, and v is big more, and emitter moves fast more, and for same emitter, this speed can be got fixed value, also can get time dependent variable.
In the practical application, the size of emitter movement speed v can the frame of reference processing power and set, and for example, if system handles speed is fast, then v can get bigger value, if system handles speed is slow, then v can get less value.
2, the changing value Δ t of time, this value is to deduct the time that the recreation previous frame refreshes by recreation this frame time of refreshing to obtain, and is exactly the frame period time, unit be second.
3, emitter is s in the distance of an intraframe motion, s=v* Δ t.
Suppose that the reference mark remains static at first frame, switch to the state that moves right at second frame, switch to the state that is moved to the left at the 3rd frame, then the generative process of three frame inner emission movement locus is as follows:
First frame:
In this frame, the player has launched emitter by the reference mark, and the reference mark remains static, and the process that dynamically generates texture comprises as shown in Figure 5:
Step 501, from the texture storehouse of setting up in advance, search movement locus texture corresponding when remaining static with the reference mark.
According to hypothesis, the A texture of the movement locus texture of correspondence for generating among Fig. 2 when the reference mark remains static.
Step 502, calculate emitter this intraframe motion apart from S1.
The S1 that step 503, basis are determined, intercepted length is the texture of S1 from the A texture.
In this step, the value of supposing S1 is 50, for convenience of description, A texture part in the cut-away view 2, specifically as shown in Figure 6, according to the displacement S1 that determines, the texture of getting in the rectangular area is the movement locus texture of emitter in first frame, according to the hypothesis of S1=50, the coordinate on four summits of this rectangular area is respectively (0,0), (0,32), (50,0), (32,50), promptly the reference position from the A texture is truncated to the position shown in Q1 and the Q2.
Second frame:
In this frame, the reference mark switches to the state of moving right by stationary state, and the process that dynamically generates texture comprises as shown in Figure 7:
Step 701, from the texture storehouse of setting up in advance, search with the reference mark and be in movement locus texture corresponding when moving right state.
According to hypothesis, the reference mark is in the B texture of movement locus texture for generating among Fig. 2 of correspondence when moving right state.
Step 702, calculate emitter this intraframe motion apart from S2.
Step 703, determining the reference position of intercepting texture according to the distance of emitter motion in the previous frame, is the texture of S2 according to reference position intercepted length from the B texture of determining.
In this step, the value of supposing S2 is 40, for convenience of description, B texture part in the cut-away view 2, specifically as shown in Figure 8, P1, P2, P3 are the point on the circular arc of B place texture internal diameter correspondence, P4, P5 are the point on the circular arc of B place texture external diameter correspondence, the length overall of this section circular arc is 256 pixels, and the texture of P2, P3, P4, rectangular area that P5 encloses is the texture that will intercept, and the concrete deterministic process of this section texture is as follows:
At first, determine the coordinate of P1 pixel, specifically comprise:
The position of A texture and B texture relation during according to program creation, be easy to determine the coordinate of P1 pixel, the pixel of being separated by between the width of the horizontal ordinate of P1 pixel=A texture+A texture and the B texture, the pixel of the ordinate of P1 pixel=B texture and coboundary.
Because the P1 pixel is the point on the B texture reference position, on definite basis, the position of B texture, the coordinate of this pixel is also determined, therefore, according to the embodiment of the invention on the other hand, the coordinate of P1 pixel can determine in the process that generates the B texture, and alternatively the coordinate information of P1 pixel is saved in the texture storehouse, or is saved in assigned address.According to this mode, when generating the movement locus texture of emitter, can directly obtain the coordinate data of the P1 pixel of preservation, and need not to determine in real time, generate the efficient of movement locus texture thereby improved, and alleviated the processing burden of system.Principle described herein also is applicable to the processing mode of special pixel point coordinate in other texture, for example, the coordinate of A texture reference position pixel, the coordinate of C texture reference position pixel, can when generating respective texture, determine and preserve, in the process of concrete generation movement locus texture,, then can directly obtain if relate to the coordinate of these pixels.
Secondly, determine specifically to comprise the coordinate of P2 pixel apart from S1 according to emitter motion in the previous frame:
According to emitter motion in the previous frame apart from S1=50, promptly get the part of length 0 to 50 in the A texture, therefore, the arc length that can determine P2 corresponding circular arc to the P1 place is 50, according to the coordinate of P1 and P2 arc length to the P1 correspondence, can be easy to determine the coordinate of P2 pixel, particularly, definite process of P2 pixel coordinate is as follows:
Because P1 pixel coordinate is known, so needing further to determine the P2 pixel here gets final product to the off-set value of P1 pixel, utilize the coordinate of P1 pixel to add that this off-set value just obtains the coordinate of P2 pixel then, particularly, the P2 pixel is as follows to definite process of the off-set value of P1 pixel:
At first determine the corresponding central angle of circular arc between P1 and the P2, be assumed to be Φ 1, then Φ 1=S1/r; Because the triangle that P1, P2, center of circle O form is an isosceles triangle, suppose line segment P1P2 and P2O angle be Φ 2, Φ 2=(∏-Φ 1)/2 then; Suppose that P2O line segment and horizontal angle are Φ 3, then Φ 3=(∏-θ)/2+ Φ 1; The angle of supposing P1P2 and perpendicular line is Φ 4, then Φ 4=Φ 2-(∏/2-Φ 3); The length of supposing line segment between the P1P2 is L, and then L=2*r*sin (Φ 1/2) has had above data, and can obtain the P2 point is L*sin (Φ 4) to the lateral excursion of P1 point off-set value, and vertical misalignment is L*cos (Φ 4).
Once more, according to emitter this intraframe motion apart from S2, determine the coordinate of P3 pixel, specifically comprise:
According to above-mentioned hypothesis, emitter is 40 this intraframe motion apart from S2, can determine that then the P3 arc length corresponding with the P2 place is 40, according to the coordinate of P2 pixel and P2 arc length to the P3 correspondence, be easy to determine the coordinate of P3 pixel, particularly, the ultimate principle of the definite process institute foundation of definite process of P3 pixel coordinate and above-mentioned P2 pixel coordinate is identical, difference is, P2 pixel coordinate is to determine according to known P1 pixel coordinate, and P3 pixel coordinate is to determine according to known P2 pixel coordinate herein.
Once more, determine the coordinate of P4 pixel and P5 pixel, specifically comprise:
The line of P4 pixel and P2 pixel is crossed the center of circle, and the line of P5 pixel and P3 pixel is crossed the center of circle, and the line of P4 and P5 is tangent with the corresponding circular arc of external diameter, according to these conditions, just is easy to determine the coordinate of P4 pixel and P5 pixel, particularly:
P4 pixel Coordinate Calculation process is as follows:
After obtaining P2 pixel coordinate according to above process, further determine the off-set value of P4 pixel to the P2 pixel, P2 pixel coordinate adds that this off-set value just obtains the coordinate of P4 pixel.Particularly, the P4 pixel is as follows to definite process of the off-set value of P2 pixel:
With reference to definite process of above P2 pixel coordinate, according to P2O line segment and horizontal angle Φ 3, can determine that the lateral excursion of the off-set value that the P4 point is ordered to P2 is: (R-r) * cos (Φ 3), vertical misalignment is: (R-r) * sin (Φ 3).
The ultimate principle of the definite process institute foundation of definite process of P5 pixel coordinate and P4 pixel coordinate is identical, no longer is repeated in this description herein.
At last, coordinate according to P2 pixel, P3 pixel, P4 pixel and the P5 pixel determined, the texture of the corresponding length of intercepting from the B texture, it is the texture in the rectangular area, as the texture of the second frame emitter movement locus, and with the texture of intercepting and the texture splicing of previous frame intercepting.During concrete the splicing, P2 and Q1 overlap, and the straight line that P2 and P4 are linked to be also will coincide with the straight line that Q1 and Q2 are linked to be.
The 3rd frame:
In this this frame, the reference mark switches to the state of being moved to the left by the state of moving right, and the process that dynamically generates texture comprises as shown in Figure 9:
Step 901, from the texture storehouse of setting up in advance, search with the reference mark and be in movement locus texture corresponding when being moved to the left state.
According to hypothesis, the reference mark is in the C texture of movement locus texture for generating among Fig. 2 of correspondence when being moved to the left state.
Step 902, calculate emitter this intraframe motion apart from S3.
Step 903, according to emitter motion in the front cross frame determine the reference position of intercepting texture apart from sum S1+S2, be the texture of S3 according to reference position intercepted length from the C texture of determining.
In this step, the value of supposing S3 is 60, for convenience of description, C texture part in the cut-away view 2, specifically as shown in figure 10, M1, M2, M3 are the point on the circular arc of C texture internal diameter correspondence, M8, M4, M5 are the point on the circular arc of C texture internal diameter correspondence, the length overall of this section circular arc is 256 pixels, and the texture of M2, M3, M4, rectangular area that M5 encloses is the texture that will intercept, and the concrete deterministic process of this section texture is as follows:
At first, determine the coordinate of M1 pixel, specifically comprise:
The position of C texture and A, B texture concerns during according to program creation, is easy to determine the coordinate of M1 pixel.
Secondly, determine specifically to comprise the coordinate of M2 pixel apart from S1+S2 according to emitter motion in the front cross frame:
According to emitter motion in the front cross frame apart from S1+S2=90, can determine that the arc length between M2 and the M1 is 90,, can be easy to determine the coordinate of M2 pixel according to the coordinate of M1 pixel and the arc length between M1 and the M2, particularly, definite process of M2 pixel coordinate is as follows:
Because M1 pixel coordinate is known, so need to determine the off-set value of M2 pixel here to the M1 pixel, utilize the coordinate of M1 pixel to add that this off-set value obtains the coordinate of M2 pixel then, particularly, the M2 pixel is as follows to definite process of the off-set value of M1 pixel:
At first determine the central angle of M1M2 circular arc correspondence, be assumed to be Φ 1, Φ 1=(S1+S2)/r then, because M1, M2, the triangle that center of circle O forms is an isosceles triangle, suppose between line segment M1M2 and the M2O angle be Φ 2, Φ 2=(∏-Φ 1)/2 then, suppose that M2O line segment and horizontal angle are Φ 3, then Φ 3=(∏-θ)/2+ Φ 1, the angle of supposing M1M2 and perpendicular line is Φ 4, Φ 4=Φ 2-(∏/2-Φ 3) then, the length of supposing line segment between the M1M2 is L, and then L=2*r*sin (Φ 1/2) has had above data, can obtain the M2 point is L*sin (Φ 4) to the lateral excursion of M1 point off-set value, and vertical misalignment is L*cos (Φ 4).
Once more, according to emitter this intraframe motion apart from S3, determine the coordinate of M3 pixel, specifically comprise:
According to above-mentioned hypothesis, emitter is 60 this intraframe motion apart from S3, can determine that then the M3 arc length corresponding with the M2 place is 60, according to the coordinate of M2 pixel and M2 arc length to the M3 correspondence, be easy to determine the coordinate of M3 pixel, particularly, the ultimate principle of the definite process institute foundation of definite process of M3 pixel coordinate and above-mentioned M2 pixel coordinate is identical, difference is, the M2 pixel is to determine according to known M1 pixel coordinate, and M3 pixel coordinate is to determine according to known M2 pixel coordinate herein.
Once more, determine the coordinate of M4 pixel and M5 pixel, specifically comprise:
The line of M4 pixel and M2 pixel is crossed the center of circle, the line of M5 pixel and M3 pixel is crossed the center of circle, and the line of M4 and M5 is tangent with the corresponding circular arc of external diameter, according to these conditions, just be easy to determine the coordinate of M4 pixel and M5 pixel, particularly:
M4 pixel Coordinate Calculation process is as follows:
After obtaining M2 pixel coordinate according to above process, further determine the off-set value of M4 pixel to the M2 pixel, M2 pixel coordinate adds that this off-set value just equals the coordinate of M4 pixel, and particularly, the M4 pixel is as follows to definite process of the skew of M2 pixel:
With reference to above M2 pixel Coordinate Calculation process, according to M2O line segment and horizontal angle Φ 3, can determine that the M4 pixel is (R-r) * cos (Φ 3) to the lateral excursion of the off-set value of M2 pixel, vertical misalignment is (R-r) * sin (Φ 3).
The ultimate principle of the definite process institute foundation of definite process of M5 pixel coordinate and M4 pixel coordinate is identical, no longer is repeated in this description herein.
At last, coordinate according to M2 pixel, M3 pixel, M4 pixel and the M5 pixel determined, the texture of the corresponding length of intercepting from the C texture, it is the texture in the rectangular area, as the texture of the 3rd frame emitter movement locus, and with the texture of intercepting and the texture splicing of previous frame intercepting.During concrete splicing, the straight line that M2 and M4 are linked to be overlaps with the straight line that P3 and P5 are linked to be, and M2 is between P3 and P5, and the length of line segment is 32 between M2 and the P3.
After having spliced each frame according to said process, need integral translation to splice good texture, the lower end of texture is overlapped with the emission port at reference mark.
Another aspect according to the embodiment of the invention, as if the texture length of the distance of moving greater than this frame inner control point motion state correspondence at a frame inner emission, then when intercepting, at first get the whole texture of this frame inner control point motion state correspondence, and then begin to intercept other parts from the starting point of this texture.For example, if in the 3rd frame, emitter motion be not 60 apart from S3, but 200, then when intercepting as shown in figure 11, divide following steps:
A, displacement S3 is split, be about to 200 length and be divided into two sections, first section length is 256-50-40=166, and second section length is 200-166=34;
The texture of B, first section correspondence is from M2 and M4, and terminal point has become M6 and M7, and the texture of second section correspondence is from M1 and M8, and terminal point is M10 and M9, and wherein, the arc length between M9 and the M1 is 34.
According to the embodiment of the invention,, and when from the movement locus texture that finds, intercepting the movement locus texture of respective length, comprising according to the distance of determining in the distance of the emitter of determining the reference mark emission in the present frame motion:
If the corresponding same pixel value of all pixels in the basic texture picture of determining, then intercepting and the movement locus texture of determining arbitrarily from the movement locus texture that finds apart from equal length;
Otherwise, determine the reference position of intercepting, and from the movement locus texture that finds, intercept and definite movement locus texture apart from equal length according to this reference position.
Particularly, when determining the reference position of intercepting, following dual mode is arranged:
Mode one:
Determine described emitter before present frame the motion of all frames apart from sum;
If emitter motion apart from sum less than the movement locus texture length of reference mark in the state correspondence of present frame, determine that then movement locus texture length deducts the difference that obtains apart from sum, and determine from the reference position of movement locus texture begin through with the arc length of the corresponding length of this difference after the reference position of pixel for intercepting, this situation illustrates in the above-described embodiments, no longer illustrates herein.
If what emitter moved equals the movement locus texture length of reference mark in the state correspondence of present frame apart from sum, then determine the reference position of the reference position of movement locus texture for intercepting.
If emitter motion apart from sum greater than the movement locus texture length of reference mark in the state correspondence of present frame, that then determines the emitter motion deducts an integral multiple difference that movement locus texture length obtains apart from sum, and determine from the reference position of movement locus texture begin through with the arc length of the corresponding length of this difference after pixel be the reference position that intercepts.For this kind situation, specifically be exemplified below:
If the motion of first frame and second frame apart from the length of sum greater than the C texture, promptly (S1+S2) is greater than the length of C texture, then S2 is divided into the multistage that is not more than C texture length, handle respectively then, suppose S2 is divided into L1 and L2, i.e. S2=L1+L2, need satisfy L1+S1 during division and equal C texture length, then according to present frame motion apart from S3 intercepting C texture the time, begin length from the section start of C texture through L2, beginning intercepted length from L2 is the arc length of S3; In like manner, if the emitter N frame that moved before the present frame, then adopt and above-mentioned essentially identical method, be about to the motion of N frame apart from the SN segmentation, as SN=SN1+SN2, and satisfy the integral multiple that S1+S2......+SN1 is a C texture length, when then intercepting the C texture, beginning the length through SN2 from the section start of C texture, is the arc length of S (N+1) from SN2 beginning intercepted length, and wherein S (N+1) is the arc length of present frame emitter motion.
Mode two:
Determine the final position of the described emitter of intercepting at former frame movement locus texture;
Determine the reference position of intercepting according to this final position; Wherein, the relative position of this final position in the movement locus texture of former frame reference mark state correspondence is identical with the relative position of this reference position in the corresponding movement locus texture of present frame reference mark state.
This kind mode is exemplified below:
The length of A texture equates with the interior arc length of B, C texture, for example, first frame has intercepted the texture at A texture 0% to 30% place, if length according to the motion of the second frame emitter, calculate second frame and need intercept 40% texture, and according to the state at reference mark, need intercepting C texture, then intercept the texture at C texture 30% to 70% place, suppose that the 3rd frame need intercept the texture of B texture 60%, then be divided into the processing of two steps, intercept the texture of B texture 70% to 100% earlier, intercept the texture of B texture 0% to 30% again.
According to the above technical scheme that the embodiment of the invention provides, can realize emitter movement locus shape flexibly, for example banded curve because the splice point pixel value is got identical value when splicing, therefore can be realized level and smooth splicing.And, generate resource that whole emitter movement locus uses seldom, just texture picture as shown in Figure 1.And set up sports-like track texture in advance, so calculate during program run simply, splicing only need be got corresponding texture, CPU is consumed less, the efficient height of operation.
Certainly, also can generate the movement locus of single pixel value according to the embodiment of the invention, be that all pixel values are got same pixel value in the basic texture picture, when splicing, can not consider the distance of previous frame emitter motion, and the distance that can only move according to this frame inner emission intercepts the texture of respective length arbitrarily from the texture of the state correspondence of this frame inner control point, therefore because each pixel value is identical, the movement locus texture that is spliced of this interception way also can not opened and is spliced vestige.
According to the embodiment of the invention, a kind of generating apparatus of motion track of emitted object also is provided, this device can be used to realize that the embodiment of the invention provides the generation method of above-mentioned motion track of emitted object.
The generating apparatus synoptic diagram of the motion track of emitted object that provides according to the embodiment of the invention is provided Figure 12, and as shown in figure 12, the generating apparatus of the motion track of emitted object that the embodiment of the invention provides mainly comprises:
Texture is searched unit 121, texture interception unit 122 and movement locus generation unit 123.
Wherein:
Texture is searched unit 121, is used for searching with this state corresponding movement locus texture at the state of present frame from the texture storehouse of setting up in advance according to the reference mark;
Texture interception unit 122 is used for determining the distance of the emitter of this reference mark emission in the present frame motion, and searches the movement locus texture of intercepting respective length the movement locus texture that unit 121 finds according to the distance of determining from texture;
Movement locus generation unit 123, be used for if present frame is first frame, then with the movement locus texture of texture interception unit 122 intercepting movement locus as this emitter, otherwise the movement locus of this emitter of movement locus texture splicing generation that the movement locus texture of texture interception unit 122 interceptings is corresponding with previous frame.
The generating apparatus of the motion track of emitted object that further embodiment of this invention provides as shown in figure 13, on the basis that comprises functional unit as shown in figure 12, comprises that also the texture storehouse sets up unit 124; Particularly, this unit is used for creating basic texture picture according to configuration information, and this configuration information comprises the width and the length information of basic texture picture; According to the basic texture picture of creating, and the state at default reference mark and the corresponding relation of movement locus texture shape, generate the movement locus texture corresponding respectively, and be saved in the texture storehouse with the different conditions at reference mark.
Among the another embodiment, unit 124 is set up when generating this movement locus texture in above-mentioned texture storehouse, comprising:
When the movement locus texture corresponding with the state at reference mark is shaped as the linear pattern texture, determine the width and the length of linear pattern texture according to the configuration information of linear pattern texture correspondence;
If the corresponding same pixel value of all pixels in the basic texture picture, the pixel value of then getting arbitrary pixel in the basic texture picture is filled the pixel in the linear pattern texture; Otherwise according to the length of linear pattern texture and the relation of the length of basic texture picture, the pixel value of getting pixel in the basic texture picture successively is filled into the corresponding pixel points of linear pattern texture.
Among the another embodiment, unit 124 is set up when generating this movement locus texture in above-mentioned texture storehouse, comprising:
When the movement locus texture corresponding with the state at reference mark is shaped as the shaped form texture, determine the width and the arc length of shaped form texture according to the configuration information of shaped form texture correspondence;
If the corresponding same pixel value of all pixels in the basic texture picture, the pixel value of then getting arbitrary pixel in the basic texture picture is filled the pixel in the shaped form texture; Otherwise, determine the circumscribed rectangle of shaped form texture, according to circumscribed rectangle interior pixel put the corresponding center of circle of shaped form texture apart from d respectively with the relation of shaped form texture respective outer diameters R and internal diameter r, determine pixel corresponding pixel in basic texture picture of pixel value to be filled in the circumscribed rectangle, capture vegetarian refreshments corresponding pixel value is filled pixel corresponding in the shaped form texture from basic texture picture.
Among the another embodiment, above-mentioned texture storehouse set up unit 124 put according to circumscribed rectangle interior pixel the corresponding center of circle of shaped form texture apart from d respectively with the relation of shaped form texture respective outer diameters R and internal diameter r, the pixel of determining pixel value to be filled in the circumscribed rectangle during corresponding pixel value, comprising in basic texture picture:
Determine apart from d more than or equal to internal diameter r and less than the angle β of the line in external diameter R, pixel and the corresponding center of circle of shaped form texture and Y-axis greater than-θ/2 and less than θ/2 o'clock, determine that this pixel is the pixel of pixel value to be filled, and the coordinate of this pixel corresponding pixel points in basic texture picture is (w, h), wherein:
w=R-d;
h=(β+θ/2)/θ*x;
Wherein, θ is the central angle of shaped form texture correspondence; X is the length of basic texture picture.
Among the another embodiment, above-mentioned texture interception unit 122 comprises when intercepting the movement locus texture of respective length according to the distance of determining from the movement locus texture that finds:
If the corresponding same pixel value of all pixels in the basic texture picture, then intercepting and the movement locus texture of determining arbitrarily from the movement locus texture that finds apart from equal length; Otherwise, according to emitter motion before the present frame determine the reference position of intercepting apart from sum, and from the movement locus texture that finds, intercept and definite movement locus texture apart from equal length according to this reference position.
Among the another embodiment, above-mentioned texture interception unit 122 before according to present frame emitter motion determine the reference position of intercepting apart from sum the time, comprising:
If emitter motion apart from the movement locus texture length of sum less than present frame state correspondence, determine that then movement locus texture length deducts the difference that obtains apart from sum, and determine from the reference position of movement locus texture begin through with the arc length of the corresponding length of this difference after the reference position of pixel for intercepting;
If emitter motion equal the movement locus texture length of present frame state correspondence apart from sum, then determine the reference position of the reference position of movement locus texture for intercepting;
If emitter motion apart from the movement locus texture length of sum greater than present frame state correspondence, that then determines the emitter motion deducts an integral multiple difference that movement locus texture length obtains apart from sum, and determine from the reference position of movement locus texture begin through with the arc length of the corresponding length of this difference after pixel be the reference position that intercepts.
The concrete correlation technique that the above-mentioned device of the present invention generates the emitter movement locus realizes that details please refer to the specific descriptions of the correlation technique realization details in the said method of the present invention, no longer gives too much to give unnecessary details here.
Above-mentioned at least one technical scheme that provides by the embodiment of the invention, the different conditions by the reference mark is set and the corresponding relation of movement locus texture, at first search corresponding movement locus texture at the state of present frame according to the reference mark, from the movement locus texture that finds, intercept the movement locus texture of respective length according to the emitter of reference mark emission in the distance of present frame motion then, the movement locus texture splicing that the movement locus texture of intercepting is corresponding with previous frame generates the movement locus of this emitter, thereby can generate the difform movement locus of emitter neatly, and when the state at the reference mark changed, movement locus texture corresponding respectively before and after changing can smoothly splice.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (15)

1. the generation method of an emitter movement locus is characterized in that, comprising:
From the texture storehouse of setting up in advance, search the movement locus texture corresponding at the state of present frame according to the reference mark with described state;
Determine in the emitter of described reference mark emission distance, and from the movement locus texture that finds, intercept the movement locus texture of respective length according to the described distance of determining in the present frame motion;
If present frame is first frame, the described movement locus texture that then will intercept is as the movement locus of described emitter, otherwise the described movement locus texture that will the intercept movement locus texture splicing corresponding with previous frame generates the movement locus of described emitter.
2. the method for claim 1 is characterized in that, the process of setting up the texture storehouse comprises:
Create basic texture picture according to configuration information, described configuration information comprises the width and the length information of described basic texture picture;
According to the described basic texture picture of creating, and the state at default reference mark and the corresponding relation of movement locus texture shape, generate the movement locus texture corresponding respectively, and be saved in the texture storehouse with the different conditions at reference mark.
3. method as claimed in claim 2 is characterized in that, when the movement locus texture corresponding with the state at reference mark is shaped as the linear pattern texture, generates this movement locus texture, comprising:
Determine the width and the length of described linear pattern texture according to the configuration information of described linear pattern texture correspondence;
If the corresponding same pixel value of all pixels in the described basic texture picture, the pixel value of then getting arbitrary pixel in the described basic texture picture is filled the pixel in the described linear pattern texture; Otherwise according to the relation of the length of the length of described linear pattern texture and described basic texture picture, the pixel value of getting pixel in the described basic texture picture is successively filled the corresponding pixel points of described linear pattern texture.
4. method as claimed in claim 2 is characterized in that, when the movement locus texture corresponding with the state at reference mark is shaped as the shaped form texture, generates this movement locus texture, comprising:
Determine the width and the arc length of described shaped form texture according to the configuration information of described shaped form texture correspondence;
If the corresponding same pixel value of all pixels in the described basic texture picture, the pixel value of then getting arbitrary pixel in the described basic texture picture is filled the pixel in the described shaped form texture; Otherwise, determine the circumscribed rectangle of described shaped form texture, according to described circumscribed rectangle interior pixel put the corresponding center of circle of described shaped form texture apart from d respectively with the relation of described shaped form texture respective outer diameters R and internal diameter r, the pixel of determining pixel value to be filled in the described circumscribed rectangle corresponding pixel in described basic texture picture is got described pixel corresponding pixel value and is filled corresponding pixel points in the described shaped form texture from described basic texture picture.
5. method as claimed in claim 4, it is characterized in that, described according to described circumscribed rectangle interior pixel put the corresponding center of circle of described shaped form texture apart from d respectively with the relation of described shaped form texture respective outer diameters R and internal diameter r, determine pixel corresponding pixel value in described basic texture picture of pixel value to be filled in the described circumscribed rectangle, comprising:
Determine described apart from d more than or equal to described internal diameter r and less than the angle β of the line in described external diameter R, described circumscribed rectangle interior pixel point and the corresponding center of circle of described shaped form texture and Y-axis greater than-θ/2 and less than θ/2 o'clock, determine the pixel of described circumscribed rectangle interior pixel point for pixel value to be filled, and the coordinate of the pixel of described pixel value to be filled corresponding pixel points in basic texture picture is (w, h), wherein:
w=R-d;
h=(β+θ/2)/θ*x;
Wherein, θ is the central angle of described shaped form texture correspondence; X is the length of described basic texture picture.
6. the method for claim 1 is characterized in that, the described distance that described basis is determined intercepts the movement locus texture of respective length from the movement locus texture that finds, comprising:
If the corresponding same pixel value of all pixels in the described basic texture picture, then intercepting and described movement locus texture arbitrarily from the movement locus texture that finds apart from equal length; Otherwise, determine the reference position of intercepting, and from the movement locus texture that finds, intercept and described movement locus texture apart from equal length according to described reference position.
7. method as claimed in claim 6 is characterized in that, the reference position of described definite intercepting comprises:
Determine described emitter before present frame the motion of all frames apart from sum;
If described apart from sum less than the movement locus texture length of reference mark in the state correspondence of present frame, determine that then described movement locus texture length deducts the described difference that obtains apart from sum, and determine from the reference position of described movement locus texture begin through with the arc length of the corresponding length of described difference after pixel be the reference position of described intercepting;
Equal the movement locus texture length of reference mark as if described apart from sum, determine that then the reference position of described movement locus texture is the reference position of described intercepting in the state correspondence of present frame;
If described apart from sum greater than the movement locus texture length of reference mark in the state correspondence of present frame, then determine describedly to deduct the difference that an integral multiple described movement locus texture length obtains apart from sum, and determine from the reference position of described movement locus texture begin through with the arc length of the corresponding length of described difference after pixel be the reference position of described intercepting.
8. method as claimed in claim 6 is characterized in that, the reference position of described definite intercepting comprises:
Determine the final position of the described emitter of intercepting at former frame movement locus texture;
Determine the reference position of described intercepting according to described final position; Wherein, the relative position of described final position in the movement locus texture of former frame reference mark state correspondence is identical with the relative position of described reference position in the corresponding movement locus texture of present frame reference mark state.
9. the generating apparatus of an emitter movement locus is characterized in that, comprising:
Texture is searched the unit, is used for searching with described state corresponding movement locus texture at the state of present frame from the texture storehouse of setting up in advance according to the reference mark;
The texture interception unit is used to determine in the emitter of the described reference mark emission distance in the present frame motion, and searches the movement locus texture of intercepting respective length the movement locus texture that the unit finds according to the described distance of determining from described texture;
The movement locus generation unit, be used for if present frame is first frame, then with the described movement locus texture of described texture interception unit intercepting movement locus as described emitter, otherwise the movement locus of the described emitter of movement locus texture splicing generation that the described movement locus texture of described texture interception unit intercepting is corresponding with previous frame.
10. device as claimed in claim 9 is characterized in that, also comprises:
The unit is set up in the texture storehouse, is used for creating basic texture picture according to configuration information, and described configuration information comprises the width and the length information of described basic texture picture; According to the described basic texture picture of creating, and the state at default reference mark and the corresponding relation of movement locus texture shape, generate the movement locus texture corresponding respectively, and be saved in the texture storehouse with the different conditions at reference mark.
11. device as claimed in claim 10 is characterized in that, described texture storehouse is set up the unit and is generated this movement locus texture, comprising:
When the movement locus texture corresponding with the state at reference mark is shaped as the linear pattern texture, determine the width and the length of described linear pattern texture according to the configuration information of described linear pattern texture correspondence;
If the corresponding same pixel value of all pixels in the described basic texture picture, the pixel value of then getting arbitrary pixel in the described basic texture picture is filled the pixel in the described linear pattern texture; Otherwise according to the relation of the length of the length of described linear pattern texture and described basic texture picture, the pixel value of getting pixel in the described basic texture picture is successively filled the corresponding pixel points of described linear pattern texture.
12. device as claimed in claim 10 is characterized in that, described texture storehouse is set up the unit and is generated this movement locus texture, comprising:
When the movement locus texture corresponding with the state at reference mark is shaped as the shaped form texture, determine the width and the arc length of described shaped form texture according to the configuration information of described shaped form texture correspondence;
If the corresponding same pixel value of all pixels in the described basic texture picture, the pixel value of then getting arbitrary pixel in the described basic texture picture is filled the pixel in the described shaped form texture; Otherwise, determine the circumscribed rectangle of described shaped form texture, according to described circumscribed rectangle interior pixel put the corresponding center of circle of described shaped form texture apart from d respectively with the relation of described shaped form texture respective outer diameters R and internal diameter r, the pixel of determining pixel value to be filled in the described circumscribed rectangle corresponding pixel in described basic texture picture is got described pixel corresponding pixel value and is filled corresponding pixel points in the described shaped form texture from described basic texture picture.
13. device as claimed in claim 9 is characterized in that, the described distance that described texture interception unit basis is determined intercepts the movement locus texture of respective length from the movement locus texture that finds, comprising:
If the corresponding same pixel value of all pixels in the described basic texture picture, then intercepting and described movement locus texture arbitrarily from the movement locus texture that finds apart from equal length; Otherwise, determine the reference position of intercepting, and from the movement locus texture that finds, intercept and described movement locus texture apart from equal length according to described reference position.
14. device as claimed in claim 13 is characterized in that, described texture interception unit is determined the reference position of intercepting, comprising:
Determine described emitter before present frame the motion of all frames apart from sum;
If described apart from sum less than the movement locus texture length of reference mark in present frame state correspondence, determine that then described movement locus texture length deducts the described difference that obtains apart from sum, and determine from the reference position of described movement locus texture begin through with the arc length of the corresponding length of described difference after pixel be the reference position of described intercepting;
Equal the movement locus texture length of reference mark as if described apart from sum, determine that then the reference position of described movement locus texture is the reference position of described intercepting in present frame state correspondence;
If described apart from sum greater than the movement locus texture length of reference mark in present frame state correspondence, then determine describedly to deduct the difference that an integral multiple described movement locus texture length obtains apart from sum, and determine from the reference position of described movement locus texture begin through with the arc length of the corresponding length of described difference after pixel be the reference position of described intercepting.
15. device as claimed in claim 13 is characterized in that, described texture interception unit is determined the reference position of intercepting, comprising:
Determine the final position of the described emitter of intercepting at former frame movement locus texture;
Determine the reference position of described intercepting according to described final position; Wherein, the relative position of described final position in the movement locus texture of former frame reference mark state correspondence is identical with the relative position of described reference position in the corresponding movement locus texture of present frame reference mark state.
CN2009101606766A 2009-07-29 2009-07-29 Method and device for generating motion track of emitted object Active CN101604443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101606766A CN101604443B (en) 2009-07-29 2009-07-29 Method and device for generating motion track of emitted object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101606766A CN101604443B (en) 2009-07-29 2009-07-29 Method and device for generating motion track of emitted object

Publications (2)

Publication Number Publication Date
CN101604443A CN101604443A (en) 2009-12-16
CN101604443B true CN101604443B (en) 2011-07-06

Family

ID=41470160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101606766A Active CN101604443B (en) 2009-07-29 2009-07-29 Method and device for generating motion track of emitted object

Country Status (1)

Country Link
CN (1) CN101604443B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112907492A (en) * 2019-12-03 2021-06-04 顺丰科技有限公司 Object motion track generation method and generation system
CN111080751A (en) * 2019-12-30 2020-04-28 北京金山安全软件有限公司 Collision rendering method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1278351A (en) * 1997-10-31 2000-12-27 惠普公司 Three-D graphics rendering apparatus and method
US6256040B1 (en) * 1996-06-21 2001-07-03 Namco, Ltd. Three-dimensional game machine and information storage medium
CN1682246A (en) * 2002-09-13 2005-10-12 皇家飞利浦电子股份有限公司 Method of analyzing and modifying a footprint
CN101320482A (en) * 2008-07-08 2008-12-10 浙江大学 Drafting method for virtual running athlete based on video texture

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6256040B1 (en) * 1996-06-21 2001-07-03 Namco, Ltd. Three-dimensional game machine and information storage medium
CN1278351A (en) * 1997-10-31 2000-12-27 惠普公司 Three-D graphics rendering apparatus and method
CN1682246A (en) * 2002-09-13 2005-10-12 皇家飞利浦电子股份有限公司 Method of analyzing and modifying a footprint
CN101320482A (en) * 2008-07-08 2008-12-10 浙江大学 Drafting method for virtual running athlete based on video texture

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2001-209825A 2001.08.03

Also Published As

Publication number Publication date
CN101604443A (en) 2009-12-16

Similar Documents

Publication Publication Date Title
CN102396003B (en) For adding the method for shade to the object in computer graphical
US6590573B1 (en) Interactive computer system for creating three-dimensional image information and for converting two-dimensional image information for three-dimensional display systems
Agrawala et al. Artistic multiprojection rendering
CN106575445B (en) Fur avatar animation
CN101178817B (en) Demonstration document realization method based on three-dimensional information in three-dimensional scene
CN108351864A (en) At recessed geometry Mi Pu
CN104123742A (en) Method and player for translating static cartoon picture into two dimensional animation
KR20220083839A (en) A method and apparatus for displaying a virtual scene, and an apparatus and storage medium
CN104182999A (en) Panoramic animation jumping method and system
CN102163340A (en) Method for labeling three-dimensional (3D) dynamic geometric figure data information in computer system
CN111462313A (en) Implementation method, device and terminal of fluff effect
CN104463838A (en) Color video processing system and method, and corresponding computer program
CN104599305A (en) Two-dimension and three-dimension combined animation generation method
CN103700134A (en) Three-dimensional vector model real-time shadow deferred shading method based on controllable texture baking
US10957090B2 (en) Eye animated expression display method and robot using the same
CN101604443B (en) Method and device for generating motion track of emitted object
CN105184843A (en) OpenSceneGraph-based three dimensional animation manufacturing method
CN102298787A (en) Control method and control system for animation object motion
Su The application of 3D technology in video games
JP2012014657A (en) Image display device and control method thereof, and program and recording medium
CN103150133A (en) Resource display method and device
CN109224448A (en) A kind of method and apparatus of streamer rendering
CN110860088B (en) Rendering method and device of small map in racing game and game terminal
CN108388465A (en) Implementation method, device and the terminal of dynamic deformation switch module
WO2023151211A1 (en) Model z-fighting prevention method and apparatus, electronic device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant