CN106204696A - A kind of specially good effect implementation method and device - Google Patents

A kind of specially good effect implementation method and device Download PDF

Info

Publication number
CN106204696A
CN106204696A CN201610537300.2A CN201610537300A CN106204696A CN 106204696 A CN106204696 A CN 106204696A CN 201610537300 A CN201610537300 A CN 201610537300A CN 106204696 A CN106204696 A CN 106204696A
Authority
CN
China
Prior art keywords
data
particle
track
specially good
good effect
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.)
Granted
Application number
CN201610537300.2A
Other languages
Chinese (zh)
Other versions
CN106204696B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201610537300.2A priority Critical patent/CN106204696B/en
Publication of CN106204696A publication Critical patent/CN106204696A/en
Application granted granted Critical
Publication of CN106204696B publication Critical patent/CN106204696B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/56Particle system, point based geometry or rendering

Abstract

The invention discloses a kind of specially good effect implementation method and device.Described specially good effect implementation method includes: receives specially good effect request instruction, and transfers special effects data according to described specially good effect request instruction;Wherein, described special effects data includes efficacy parameter and the particle track sample data in two-dimensional space of particle;Described track sample data is the track sample and movement time preset in two-dimensional space according to particle and the corresponding relation data of moment of generating and track sample coordinate;Described track sample data is converted to the data of the first track that described particle moves in three dimensions;Launch described particle from the starting point of described first track, make described particle according to the data motion of described first track to described end point;According to the efficacy parameter of described particle, in real time the summit of described particle is rendered, and the specially good effect effect produced after rendering shows.Use the embodiment of the present invention, it is possible to increase the formation efficiency of specially good effect.

Description

A kind of specially good effect implementation method and device
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of specially good effect implementation method and device.
Background technology
In 3d plays, commonly used particIe system shows some specially good effect effects, such as blast, smog, luminescence, flame Etc..ParticIe system has several functions and sets, such as speed, acceleration, frictional force, captivation, whirlpool power, turbulent flow etc., this A little functions can produce a kind of specific display effect at an ad-hoc location after setting combination.But along with specially good effect effect in game Become increasingly complex, it is also desirable to embodying interactively specially good effect, simplest interactive specially good effect is exactly the specially good effect between two positions.
In prior art, between two positions, the implementation method of specially good effect is: fine arts personnel make a specially good effect, program staff Program out the parameters such as movement locus between two positions to realize this specially good effect.Such as, the Master in game to be shown sends A lot of magic hits the specially good effect effect of enemy, and fine arts personnel need to make magic specially good effect, and program staff realizes one by one with code There is the effect moving to terminate at enemy from Master position in magic.
Summary of the invention
Although the method mentioned in background technology can realize specially good effect between two positions, but, this method needs program Personnel are programmed for each specially good effect, and the specially good effect between two positions is both needed to coding and realizes, and adds the work of program staff Measure, reduce the formation efficiency of specially good effect.
The embodiment of the present invention proposes a kind of specially good effect implementation method and device, it is possible to increase the formation efficiency of specially good effect.
The embodiment of the present invention provides a kind of specially good effect implementation method, including:
Receive specially good effect request instruction, and transfer special effects data according to described specially good effect request instruction;Wherein, described special effects data Efficacy parameter and particle track sample data in two-dimensional space including particle;Described track sample data is according to particle The corresponding relation data of track sample and the movement time preset in two-dimensional space and moment of generating and track sample coordinate;
Described track sample data is converted to the data of the first track that described particle moves in three dimensions, and makes The starting point of described first track, for presetting starting point, makes the end point of described first track for presetting end point;
Launch described particle from the starting point of described first track, make described particle transport according to the data of described first track Move described end point;
According to the efficacy parameter of described particle, in real time the summit of described particle is rendered, and produce after rendering Specially good effect effect shows.
Further, described special effects data also includes starting point transition value, end point transition value, track number of repetition, rail Mark scale value and rotation angle value;
The described data that described track sample data is converted to the first track that described particle moves in three dimensions, And make the starting point of described first track for presetting starting point, make the end point of described first track for presetting end point, specifically Including:
According to described starting point transition value, described end point transition value, described track number of repetition, described track scale value With described track sample data, calculate the data obtaining the second track that described particle moves in two-dimensional space;Described second The data of track are the corresponding relation data in moment and the second trajectory coordinates;
Coordinate, the coordinate of described default end point, the data of described second track and institute according to described default starting point State rotation angle value, the data of described second track are converted to the number of the first track that described particle moves in three dimensions According to;The data of described first track are the corresponding relation data in moment and the first trajectory coordinates.
Further, the described coordinate according to described default starting point, the coordinate of described default end point, described second rail The data of described second track are converted to what described particle moved in three dimensions by the data of mark and described rotation angle value The data of the first track, specifically include:
Coordinate according to described default starting point and the coordinate of described default end point, calculate and obtain described first track Starting point is to the direction vector of end point;
According to described direction vector and described rotation angle value, calculate the number of described second track obtained in two-dimensional space Transition matrix according to the data of described first track be converted in three dimensions;
Data according to described second track and described transition matrix, calculate the data obtaining described first track.
Further, the efficacy parameter of described particle includes particle size, texture animation pinup picture and color running parameter.
It is preferably carried out in mode at one, the described efficacy parameter according to described particle, the in real time top to described particle Point renders, and the specially good effect effect produced after rendering shows, specifically includes:
Acquisition described particle vertex data in motor process is calculated in real time according to described particle size;
Vertex data according to described particle and described color running parameter, calculate the vertex color obtaining described particle;
Vertex data, vertex color and described texture animation pinup picture according to described particle, by the summit wash with watercolours of described particle Dye is to have the texture animation pinup picture of described vertex color;
The texture animation pinup picture with described vertex color is shown.
In another is preferably carried out mode, described particle is hangover particle;The special effects data of described hangover particle is also Including particle trailing length and dough sheet precision;
The described efficacy parameter according to described particle, renders the summit of described particle in real time, and will produce after rendering Raw specially good effect effect shows, specifically includes:
According to described particle trailing length and described dough sheet precision, calculate the dough sheet number obtaining described hangover particle;
The direction of motion according to the described hangover particle each dough sheet in motor process and for shooting display scene The front of virtual camera to, calculate obtain described each dough sheet cross direction;
Cross direction according to described each dough sheet and described particle size, calculate and obtain each dough sheet in described hangover particle Vertex data;
Vertex data according to described each dough sheet and described color running parameter, calculate the top obtaining described each dough sheet Point color;
According to described texture animation pinup picture, the vertex data of described each dough sheet and vertex color, by described hangover particle The summit of each dough sheet render the texture animation pinup picture of the vertex color for its correspondence and show.
Preferably, described special effects data also includes that particle emission frequency, particle entire life, particle current age, static state are made an uproar Sound seed, quiescent noise amplitude range and dynamic noise amplitude range.
Accordingly, the embodiment of the present invention also provides for a kind of specially good effect and realizes device, including:
Data transfer module, are used for receiving specially good effect request instruction, and transfer special effects data according to described specially good effect request instruction; Wherein, described special effects data includes efficacy parameter and the particle track sample data in two-dimensional space of particle;Described track Sample data is the track sample and movement time and moment of generating and track sample preset in two-dimensional space according to particle The corresponding relation data of coordinate;
Data conversion module, for described track sample data is converted to that described particle moves in three dimensions the The data of one track, and make the starting point of described first track for presetting starting point, the end point making described first track is pre- If end point;
Transmitter module, for launching described particle from the starting point of described first track, makes described particle according to described the The data motion of one track is to described end point;And,
Rendering module, for the efficacy parameter according to described particle, renders the summit of described particle in real time, and will The specially good effect effect produced after rendering shows.
Further, described special effects data also includes starting point transition value, end point transition value, track number of repetition, rail Mark scale value and rotation angle value;
Described data conversion module specifically includes:
Track data computing unit, for according to described starting point transition value, described end point transition value, described track weight Again number, described track scale value and described track sample data, calculates obtain that described particle moves in two-dimensional space the The data of two tracks;The data of described second track are the corresponding relation data in moment and the second trajectory coordinates;And,
Track data converting unit, for the coordinate according to described default starting point, the coordinate of described default end point, institute State the data of the second track and described rotation angle value, the data of described second track are converted to described particle at three dimensions The data of the first track of middle motion;The data of described first track are the corresponding relation data in moment and the first trajectory coordinates.
Further, described track data converting unit specifically includes:
Direction vector computation subunit, for the coordinate according to described default starting point and the seat of described default end point Mark, calculates the starting point obtaining described first track to the direction vector of end point;
Transform matrix calculations subelement, for according to described direction vector and described rotation angle value, calculates and obtains two dimension The data of described second track in space are converted to the transition matrix of the data of described first track in three dimensions;With And,
Data computation subunit, for the data according to described second track and described transition matrix, calculates described in obtaining The data of the first track.
Further, the efficacy parameter of described particle includes particle size, texture animation pinup picture and color running parameter.
Being preferably carried out in mode at one, described rendering module specifically includes:
Vertex data acquiring unit, for calculating the described particle of acquisition in real time in motor process according to described particle size Vertex data;
Vertex color acquiring unit, for the vertex data according to described particle and described color running parameter, calculating obtains Obtain the vertex color of described particle;
Rendering unit, for vertex data, vertex color and described texture animation pinup picture according to described particle, by described The summit of particle renders the texture animation pinup picture for having described vertex color;And,
Display unit, for showing the texture animation pinup picture with described vertex color.
In another is preferably carried out mode, described particle is hangover particle;The special effects data of described hangover particle is also Including particle trailing length and dough sheet precision;
Described rendering module specifically includes:
Dough sheet computing unit, for according to described particle trailing length and described dough sheet precision, calculates and obtains described hangover The dough sheet number of particle;
Cross direction computing unit, for the direction of motion according to the described hangover particle each dough sheet in motor process and For shoot display scene virtual camera front to, calculate obtain described each dough sheet cross direction;
Vertex data computing unit, for the cross direction according to described each dough sheet and described particle size, calculates and obtains The vertex data of each dough sheet in described hangover particle;
Vertex color computing unit, for the vertex data according to described each dough sheet and described color running parameter, meter Calculate the vertex color obtaining described each dough sheet;And,
Render display unit, for according to described texture animation pinup picture, the vertex data of described each dough sheet and summit face Color, renders the summit of each dough sheet of described hangover particle the texture animation pinup picture of the vertex color for its correspondence and shows Show.
Preferably, described special effects data also includes that particle emission frequency, particle entire life, particle current age, static state are made an uproar Sound seed, quiescent noise amplitude range and dynamic noise amplitude range.
Implement the embodiment of the present invention, have the advantages that
The specially good effect implementation method of embodiment of the present invention offer and device, it is possible to make fine arts personnel that specially good effect number between 2 is set According to, directly transfer corresponding special effects data according to the request of program staff, and then make particle initial from presetting according to special effects data Point moves to preset end point, and renders the summit of particle in real time, thus realizes the specially good effect between 2, it is not necessary to program Personnel are programmed for each specially good effect, improve the formation efficiency of specially good effect;The various parameters of particle are set in special effects data, with Realize complicated specially good effect, improve the aesthetics of specially good effect effect.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of an embodiment of the specially good effect implementation method that the present invention provides;
Fig. 2 is the schematic diagram of first embodiment of track sample in the specially good effect implementation method that the present invention provides;
Fig. 3 is the schematic diagram of an embodiment of the first track in the specially good effect implementation method that the present invention provides;
Fig. 4 is first specially good effect effect schematic diagram in the specially good effect implementation method that the present invention provides;
Fig. 5 is second specially good effect effect schematic diagram in the specially good effect implementation method that the present invention provides;
Fig. 6 is the schematic diagram of second embodiment of track sample in the specially good effect implementation method that the present invention provides;
Fig. 7 is the 3rd specially good effect effect schematic diagram in the specially good effect implementation method that the present invention provides;
Fig. 8 is the 4th specially good effect effect schematic diagram in the specially good effect implementation method that the present invention provides;
Fig. 9 is the schematic diagram of the 3rd embodiment of track sample in the specially good effect implementation method that the present invention provides;
Figure 10 is the 5th specially good effect effect schematic diagram in the specially good effect implementation method that the present invention provides;
Figure 11 is the structural representation that the specially good effect that the present invention provides realizes an embodiment of device.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise Embodiment, broadly falls into the scope of protection of the invention.
See Fig. 1, the schematic flow sheet of an embodiment of the specially good effect implementation method that the present invention provides, including:
S1, reception specially good effect request instruction, and transfer special effects data according to described specially good effect request instruction;Wherein, described specially good effect Data include efficacy parameter and the particle track sample data in two-dimensional space of particle;Described track sample data is basis The corresponding relation of track sample and movement time that particle is preset in two-dimensional space and moment of generating and track sample coordinate Data;
S2, described track sample data is converted to the data of the first track that described particle moves in three dimensions, And make the starting point of described first track for presetting starting point, make the end point of described first track for presetting end point;
S3, launch described particle from the starting point of described first track, make described particle according to the number of described first track According to moving to described end point;
S4, efficacy parameter according to described particle, render the summit of described particle in real time, and will produce after rendering Specially good effect effect show.
It should be noted that fine arts personnel first draw the track sample that particle moves in two-dimensional space in art editor's device This, and movement time is set.Art editor's device can generate moment and track sample coordinate according to track sample and movement time Corresponding relation data.Fine arts personnel derive the data that art editor's device generates, and the efficacy parameter arranging particle preserves in the lump For special effects data.Program staff, when making specially good effect, arranges initial point position and end point position, and sends asking of required specially good effect Ask and instruct.
After receiving specially good effect request instruction, transfer corresponding special effects data.Wherein, the track sample number in special effects data According to for the data in two-dimensional space, track sample data need to be converted to the track data in three dimensions, first after conversion The starting point of track is default starting point, and the end point of the first track is default end point, to be capable of specially good effect from one Individual specified point is issued to the function that another specified point terminates.After the data obtaining the first track, send out from default starting point Radion, and control particle along the first orbiting motion to the end point preset.Wherein, after Particles Moving to end point, i.e. This particle can be deleted, but for hangover particle, when its afterbody is also without departing from starting point, need to during Particles Moving in real time The trailing length of more new particle, and keep its afterbody in starting point;When its head arrives end point, also need real-time update particle Trailing length, and keep the head of particle in end point.During Particles Moving, in real time according to the efficacy parameter pair preset The summit of particle renders, and shows rendering result, thus realizes specially good effect effect.
As in figure 2 it is shown, fine arts personnel draw out the track sample 1 of Particles Moving in art editor's device, make particle from P point Place starts to move to P point along track sample 1 and terminates, and arranges out the movement time of particle simultaneously, i.e. would know that Particles Moving Track schedule parameter.After setting up, art editor's device derives the moment of Particles Moving and the corresponding relation of track sample coordinate Data.As it is shown on figure 3, starting point A moved in three dimensions according to the particle pre-set and end point B, withFor Z Axle, builds rectangular coordinate system.Track sample 1 is converted to build rectangular coordinate system in the first track 2 so that particle from Starting point A starts to terminate along the first orbiting motion to end point B, and renders the summit of particle in real time, produces specially good effect Effect.
Further, described special effects data also includes starting point transition value, end point transition value, track number of repetition, rail Mark scale value and rotation angle value;
The described data that described track sample data is converted to the first track that described particle moves in three dimensions, And make the starting point of described first track for presetting starting point, make the end point of described first track for presetting end point, specifically Including:
According to described starting point transition value, described end point transition value, described track number of repetition, described track scale value With described track sample data, calculate the data obtaining the second track that described particle moves in two-dimensional space;Described second The data of track are the corresponding relation data in moment and the second trajectory coordinates;
Coordinate, the coordinate of described default end point, the data of described second track and institute according to described default starting point State rotation angle value, the data of described second track are converted to the number of the first track that described particle moves in three dimensions According to;The data of described first track are the corresponding relation data in moment and the first trajectory coordinates.
It should be noted that particle moves in starting point and end point need to carry out track transition, according to starting point transition value With end point transition value, use linear interpolation algorithm, particle initial transient point on the second track and knot can be calculated respectively Bundle transition point, make particle after starting point is transitioned into initial transient point, along the second orbiting motion to end transition point, then from knot Bundle transition point is transitioned into end point, to realize particle motion in two-dimensional space.It addition, the track that can arrange particle repeats secondary Number, i.e. particle is along the number of times of the second track shuttling movement, and this number of times is any arithmetic number.If track number of repetition is decimal, Can be circulated according to decimal, and without complete cycle the second track.
Such as, as shown in Figure 4, on the basis of Fig. 3, the track number of repetition arranging particle is 2, in three dimensions, Particle starts the cycle over motion from starting point A and arrives end point B twice.As it is shown in figure 5, on the basis of Fig. 3, arrange the contracting of particle Put random scope and angle random scope, when making particle starting point A in three dimensions launch, there is different track scalings Value and rotation angle value, and then the data of the first different tracks are calculated according to different tracks scale value and rotation angle value, Thus render different specially good effect effects.Further, the described coordinate according to described default starting point, described default end point Coordinate, the data of described second track and described rotation angle value, the data of described second track are converted to described particle The data of the first track moved in three dimensions, specifically include:
Coordinate according to described default starting point and the coordinate of described default end point, calculate and obtain described first track Starting point is to the direction vector of end point;
According to described direction vector and described rotation angle value, calculate the number of described second track obtained in two-dimensional space Transition matrix according to the data of described first track be converted in three dimensions;
Data according to described second track and described transition matrix, calculate the data obtaining described first track.
It should be noted that before calculating particle movement position in three dimensions, need to be to particle at two-dimensional space In movement position calculate.Assuming that presetting starting point is A, default end point is B, and particle i.e. particle entire life is from starting point Movement time to end point is life, and the particle current age i.e. current time of Particles Moving is age, first according to A, B structure The plane at the second track place of pelletize, i.e. vertical with straight line AB plane, the then expression formula of the second track in this plane For P=f (age/life).Wherein, age/life is the progress of Particles Moving, its periodic regime be [0,1), when age/life's When value is more than 1, only takes fractional part and calculate, thus realize the scheduling period of circulation.It addition, it is further assumed that track repeats Number of times is repeat, and track scale value is scale, then the expression formula of the second track that particle moves in this plane is p=f (age/life*repeat)*scale。
After the data calculating the second track, the data of the second track are converted to the first track in three dimensions Data.Assuming that rotation angle value is angle, the coordinate system constructing the second track place plane is transformed into three-dimensional coordinate system Transition matrix M.Wherein, transition matrix M is 3x3 spin matrix, and the third line data of matrix M areWhen structural matrix M, first The Z-axis direction amount (0,0,1) of unit of account matrix rotates to minimum anglesThe matrix M generated0, then calculate rotation angle angle The matrix M of degreea, thus calculate transition matrix M=M0*Ma.After calculating transition matrix M, can calculate in three dimensions The expression formula of the first track
Wherein, the circular of transition matrix M is: the third line data assuming matrix M areThen the Z-axis direction amount (0,0,1) of unit matrix rotates toAngle be θ, the Z-axis direction of unit matrix Amount (0,0,1) withThe plane normal formed is V_axis, thus calculates matrix according to angle, θ and V_axis
Wherein, c=cos (θ), s=sin (θ), t=1 c, x=V_axis.x, y=V_axis.y, z=V_axis.z, Cos θ=(0,0,1) (m20,m21,m22)/|(0,0,1)*|(m20,m21,m22) |, V_axis=(0,0,1) × (m20,m21, m22).Then, the matrix of rotation angle angle is calculatedAnd then finally draw Transition matrix M=M0*Ma
Further, the efficacy parameter of described particle includes particle size, texture animation pinup picture and color running parameter.
It is preferably carried out in mode at one, the described efficacy parameter according to described particle, the in real time top to described particle Point renders, and the specially good effect effect produced after rendering shows, specifically includes:
Acquisition described particle vertex data in motor process is calculated in real time according to described particle size;
Vertex data according to described particle and described color running parameter, calculate the vertex color obtaining described particle;
Vertex data, vertex color and described texture animation pinup picture according to described particle, by the summit wash with watercolours of described particle Dye is to have the texture animation pinup picture of described vertex color;
The texture animation pinup picture with described vertex color is shown.
It should be noted that the corresponding relation data that color running parameter is vertex position and color change.For commonly Particle, the most non-hangover particle, particle vertex data in motor process can be calculated according to particle size, and then according to grain The vertex data of son obtains rendering position and vertex color, can realize rendering of particle summit further according to texture animation pinup picture. Use color running parameter to make color that particle renders changes along with whole movement time.
In another is preferably carried out mode, described particle is hangover particle;The special effects data of described hangover particle is also Including particle trailing length and dough sheet precision;
The described efficacy parameter according to described particle, renders the summit of described particle in real time, and will produce after rendering Raw specially good effect effect shows, specifically includes:
According to described particle trailing length and described dough sheet precision, calculate the dough sheet number obtaining described hangover particle;
The direction of motion according to the described hangover particle each dough sheet in motor process and for shooting display scene The front of virtual camera to, calculate obtain described each dough sheet cross direction;
Cross direction according to described each dough sheet and described particle size, calculate and obtain each dough sheet in described hangover particle Vertex data;
Vertex data according to described each dough sheet and described color running parameter, calculate the top obtaining described each dough sheet Point color;
According to described texture animation pinup picture, the vertex data of described each dough sheet and vertex color, by described hangover particle The summit of each dough sheet render the texture animation pinup picture of the vertex color for its correspondence and show.
It should be noted that when hangover particle is rendered, need to first calculate the top of each dough sheet trailed in particle Point data.During hangover Particles Moving, the front direction vector of the direction of motion vector of each dough sheet with virtual camera is entered Row multiplication cross, normalization obtains the corresponding cross direction of each dough sheet, is i.e. perpendicularly to the direction of movement with virtual camera front to being formed The normal direction of plane, wherein, the front of virtual camera is to the direction being virtual camera shooting.And then, calculate each The upper vertex position of dough sheetAnd, the lower vertex position of each dough sheetWherein, For cross direction, b is particle size.Upper vertex position according to each dough sheet and lower vertex position can obtain the top of each dough sheet Point data, the vertex data further according to each dough sheet obtains the rendering position of each dough sheet and vertex color, moves further according to texture Draw pinup picture can realize each dough sheet is rendered.Use color running parameter that hangover particle can be made to demonstrate and different render effect Really.
As shown in Figure 6, the track sample that particle terminates from P point setting in motion to P point is set.As it is shown in fig. 7, arrange particle It is a fixed value from the transition value of starting point A to end point B, and the pinup picture that texture is a section " iron chains " of particle is set, from And according to the data in the distance of AB and particle summit, the specially good effect effect of " iron chains " continuously can be rendered.
Preferably, described special effects data also include particle emission frequency, quiescent noise seed, quiescent noise amplitude range and Dynamic noise amplitude range.
It should be noted that particle also can realize dither functions according to the quiescent noise amplitude range arranged.Particle is three The expression formula of the first track in dimension space is P_noise=f_noise (seed, age/life), and wherein, seed is that static state is made an uproar Sound seed.
As shown in Figure 8, on the basis of the track sample of Fig. 6, noise seed and the noise magnitude scope of particle is set, with Particle is made to offset on original track.Wherein, quiescent noise attribute is set and can render the effect of quiescent current, and arrange dynamic State noise attribute can render the electric current effect of constantly shake.
It addition, all special effects data of particle are configured, comprehensive specially good effect effect can be produced.As it is shown in figure 9, set Put the track sample that particle terminates from P point setting in motion to P point.As shown in Figure 10, according to the tranmitting frequency arranged, render many Individual hangover particle;According to the track number of repetition arranged, render the effect of particle repeating motion;According to the starting point mistake arranged Cross value and end point transition value, render the particle effect from starting point A transient motion to end point B;According to the particle arranged Trailing length, renders the different trailing length of different particle;According to the track scale value arranged, render different particle not With movement locus size;According to the color running parameter arranged, render the head of particle and color effects that afterbody fades out.
The specially good effect implementation method that the embodiment of the present invention provides, it is possible to make fine arts personnel that special effects data between 2, root are set Directly transfer corresponding special effects data according to the request of program staff, and then make particle move from default starting point according to special effects data To presetting end point, and in real time the summit of particle is rendered, thus realize the specially good effect between 2, it is not necessary to program staff's pin Each specially good effect is programmed, improves the formation efficiency of specially good effect;The various parameters of particle are set in special effects data, multiple to realize Miscellaneous specially good effect, improves the aesthetics of specially good effect effect.
Accordingly, the present invention also provides for a kind of specially good effect and realizes device, it is possible to realize the specially good effect realization side in above-described embodiment All flow processs of method.
See Figure 11, be the specially good effect that the present invention the provides structural representation that realizes an embodiment of device, including:
Data transfer module 41, are used for receiving specially good effect request instruction, and transfer specially good effect number according to described specially good effect request instruction According to;Wherein, described special effects data includes efficacy parameter and the particle track sample data in two-dimensional space of particle;Described rail Mark sample data is the track sample and movement time and moment of generating and track sample preset in two-dimensional space according to particle The corresponding relation data of this coordinate;
Data conversion module 42, for being converted to what described particle moved in three dimensions by described track sample data The data of the first track, and make the starting point of described first track for presetting starting point, the end point making described first track is Preset end point;
Transmitter module 43, for launching described particle from the starting point of described first track, makes described particle according to described The data motion of the first track is to described end point;And,
Rendering module 44, for the efficacy parameter according to described particle, renders the summit of described particle in real time, and The specially good effect effect produced after rendering shows.
Further, described special effects data also includes starting point transition value, end point transition value, track number of repetition, rail Mark scale value and rotation angle value;
Described data conversion module specifically includes:
Track data computing unit, for according to described starting point transition value, described end point transition value, described track weight Again number, described track scale value and described track sample data, calculates obtain that described particle moves in two-dimensional space the The data of two tracks;The data of described second track are the corresponding relation data in moment and the second trajectory coordinates;And,
Track data converting unit, for the coordinate according to described default starting point, the coordinate of described default end point, institute State the data of the second track and described rotation angle value, the data of described second track are converted to described particle at three dimensions The data of the first track of middle motion;The data of described first track are the corresponding relation data in moment and the first trajectory coordinates.
Further, described track data converting unit specifically includes:
Direction vector computation subunit, for the coordinate according to described default starting point and the seat of described default end point Mark, calculates the starting point obtaining described first track to the direction vector of end point;
Transform matrix calculations subelement, for according to described direction vector and described rotation angle value, calculates and obtains two dimension The data of described second track in space are converted to the transition matrix of the data of described first track in three dimensions;With And,
Data computation subunit, for the data according to described second track and described transition matrix, calculates described in obtaining The data of the first track.
Further, the efficacy parameter of described particle includes particle size, texture animation pinup picture and color running parameter.
Being preferably carried out in mode at one, described rendering module specifically includes:
Vertex data acquiring unit, for calculating the described particle of acquisition in real time in motor process according to described particle size Vertex data;
Vertex color acquiring unit, for the vertex data according to described particle and described color running parameter, calculating obtains Obtain the vertex color of described particle;
Rendering unit, for vertex data, vertex color and described texture animation pinup picture according to described particle, by described The summit of particle renders the texture animation pinup picture for having described vertex color;And,
Display unit, for showing the texture animation pinup picture with described vertex color.
In another is preferably carried out mode, described particle is hangover particle;The special effects data of described hangover particle is also Including particle trailing length and dough sheet precision;
Described rendering module specifically includes:
Dough sheet computing unit, for according to described particle trailing length and described dough sheet precision, calculates and obtains described hangover The dough sheet number of particle;
Cross direction computing unit, for the direction of motion according to the described hangover particle each dough sheet in motor process and For shoot display scene virtual camera front to, calculate obtain described each dough sheet cross direction;
Vertex data computing unit, for the cross direction according to described each dough sheet and described particle size, calculates and obtains The vertex data of each dough sheet in described hangover particle;
Vertex color computing unit, for the vertex data according to described each dough sheet and described color running parameter, meter Calculate the vertex color obtaining described each dough sheet;And,
Render display unit, for according to described texture animation pinup picture, the vertex data of described each dough sheet and summit face Color, renders the summit of each dough sheet of described hangover particle the texture animation pinup picture of the vertex color for its correspondence and shows Show.
Preferably, described special effects data also includes that particle emission frequency, particle entire life, particle current age, static state are made an uproar Sound seed, quiescent noise amplitude range and dynamic noise amplitude range.
The specially good effect that the embodiment of the present invention provides realizes device, it is possible to make fine arts personnel arrange special effects data between 2, root Directly transfer corresponding special effects data according to the request of program staff, and then make particle move from default starting point according to special effects data To presetting end point, and in real time the summit of particle is rendered, thus realize the specially good effect between 2, it is not necessary to program staff's pin Each specially good effect is programmed, improves the formation efficiency of specially good effect;The various parameters of particle are set in special effects data, multiple to realize Miscellaneous specially good effect, improves the aesthetics of specially good effect effect.
The above is the preferred embodiment of the present invention, it is noted that for those skilled in the art For, under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications are also considered as Protection scope of the present invention.

Claims (16)

1. a specially good effect implementation method, it is characterised in that including:
Receive specially good effect request instruction, and transfer special effects data according to described specially good effect request instruction;Wherein, described special effects data includes The efficacy parameter of particle and the particle track sample data in two-dimensional space;Described track sample data is two according to particle The corresponding relation data of track sample and the movement time preset in dimension space and moment of generating and track sample coordinate;
Described track sample data is converted to the data of the first track that described particle moves in three dimensions, and makes described The starting point of the first track, for presetting starting point, makes the end point of described first track for presetting end point;
Launch described particle from the starting point of described first track, make described particle arrive according to the data motion of described first track Described end point;
According to the efficacy parameter of described particle, in real time the summit of described particle is rendered, and the specially good effect produced after rendering Effect shows.
2. specially good effect implementation method as claimed in claim 1, it is characterised in that described special effects data also includes starting point transition Value, end point transition value, track number of repetition, track scale value and rotation angle value.
3. specially good effect implementation method as claimed in claim 2, it is characterised in that described described track sample data is converted to institute State the data of the first track that particle moves in three dimensions, and make the starting point of described first track for presetting starting point, Make the end point of described first track for presetting end point, specifically include:
According to described starting point transition value, described end point transition value, described track number of repetition, described track scale value and institute State track sample data, calculate the data obtaining the second track that described particle moves in two-dimensional space;Described second track The corresponding relation data that data are moment and the second trajectory coordinates;
Coordinate, the coordinate of described default end point, the data of described second track and described rotation according to described default starting point The data of described second track are converted to the data of the first track that described particle moves in three dimensions by corner angle value; The data of described first track are the corresponding relation data in moment and the first trajectory coordinates.
4. specially good effect implementation method as claimed in claim 3, it is characterised in that the described coordinate according to described default starting point, The coordinate of described default end point, the data of described second track and described rotation angle value, by the data of described second track Be converted to the data of the first track that described particle moves in three dimensions, specifically include:
Coordinate according to described default starting point and the coordinate of described default end point, calculate and obtain the initial of described first track Point is to the direction vector of end point;
According to described direction vector and described rotation angle value, the data calculating described second track obtained in two-dimensional space turn The transition matrix of the data of described first track being changed in three dimensions;
Data according to described second track and described transition matrix, calculate the data obtaining described first track.
5. specially good effect implementation method as claimed in claim 1, it is characterised in that the efficacy parameter of described particle includes that particle is big Little, texture animation pinup picture and color running parameter.
6. specially good effect implementation method as claimed in claim 5, it is characterised in that the described efficacy parameter according to described particle, real Time the summit of described particle is rendered, and the specially good effect effect produced after rendering shows, specifically includes:
Acquisition described particle vertex data in motor process is calculated in real time according to described particle size;
Vertex data according to described particle and described color running parameter, calculate the vertex color obtaining described particle;
Vertex data, vertex color and described texture animation pinup picture according to described particle, the summit of described particle is rendered into There is the texture animation pinup picture of described vertex color;
The texture animation pinup picture with described vertex color is shown.
7. specially good effect implementation method as claimed in claim 6, it is characterised in that described particle is hangover particle;Described hangover grain The special effects data of son also includes particle trailing length and dough sheet precision;
The described efficacy parameter according to described particle, renders the summit of described particle in real time, and produce after rendering Specially good effect effect shows, specifically includes:
According to described particle trailing length and described dough sheet precision, calculate the dough sheet number obtaining described hangover particle;
The direction of motion according to the described hangover particle each dough sheet in motor process and for shooting the virtual of display scene The front of camera to, calculate obtain described each dough sheet cross direction;
Cross direction according to described each dough sheet and described particle size, calculate and obtain the top of each dough sheet in described hangover particle Point data;
Vertex data according to described each dough sheet and described color running parameter, calculate the summit face obtaining described each dough sheet Color;
According to described texture animation pinup picture, the vertex data of described each dough sheet and vertex color, every by described hangover particle The summit of individual dough sheet renders the texture animation pinup picture of the vertex color for its correspondence and shows.
8. the specially good effect implementation method as described in any one of claim 1 to 7, it is characterised in that described special effects data also includes grain Sub-tranmitting frequency, particle entire life, particle current age, quiescent noise seed, quiescent noise amplitude range and dynamic noise width Degree scope.
9. a specially good effect realizes device, it is characterised in that including:
Data transfer module, are used for receiving specially good effect request instruction, and transfer special effects data according to described specially good effect request instruction;Its In, described special effects data includes efficacy parameter and the particle track sample data in two-dimensional space of particle;Described track sample Notebook data is the track sample and movement time preset in two-dimensional space according to particle and moment of generating sits with track sample Target corresponding relation data;
Data conversion module, for being converted to, by described track sample data, the first rail that described particle moves in three dimensions The data of mark, and make the starting point of described first track for presetting starting point, make the end point of described first track for presetting knot Spot;
Transmitter module, for launching described particle from the starting point of described first track, makes described particle according to described first rail The data motion of mark is to described end point;And,
Rendering module, for the efficacy parameter according to described particle, renders the summit of described particle in real time, and will render The specially good effect effect of rear generation shows.
10. specially good effect as claimed in claim 9 realizes device, it is characterised in that described special effects data also includes starting point transition Value, end point transition value, track number of repetition, track scale value and rotation angle value.
11. specially good effects as claimed in claim 10 realize device, it is characterised in that described data conversion module specifically includes:
Track data computing unit, for repeating secondary according to described starting point transition value, described end point transition value, described track Track scale value several, described and described track sample data, calculate and obtain the second rail that described particle moves in two-dimensional space The data of mark;The data of described second track are the corresponding relation data in moment and the second trajectory coordinates;And,
Track data converting unit, for according to the coordinate of described default starting point, the coordinate of described default end point, described the The data of described second track are converted to described particle and transport in three dimensions by the data of two tracks and described rotation angle value The data of the first dynamic track;The data of described first track are the corresponding relation data in moment and the first trajectory coordinates.
12. specially good effects as claimed in claim 11 realize device, it is characterised in that described track data converting unit is specifically wrapped Include:
Direction vector computation subunit, for the coordinate according to described default starting point and the coordinate of described default end point, meter Calculate the starting point obtaining described first track to the direction vector of end point;
Transform matrix calculations subelement, for according to described direction vector and described rotation angle value, calculates and obtains two-dimensional space In the data of described second track be converted to the transition matrix of data of described first track in three dimensions;And,
Data computation subunit, for the data according to described second track and described transition matrix, calculates and obtains described first The data of track.
13. specially good effects as claimed in claim 9 realize device, it is characterised in that the efficacy parameter of described particle includes that particle is big Little, texture animation pinup picture and color running parameter.
14. specially good effects as claimed in claim 13 realize device, it is characterised in that described rendering module specifically includes:
Vertex data acquiring unit, for calculating acquisition described particle top in motor process in real time according to described particle size Point data;
Vertex color acquiring unit, for the vertex data according to described particle and described color running parameter, calculates and obtains institute State the vertex color of particle;
Rendering unit, for vertex data, vertex color and described texture animation pinup picture according to described particle, by described particle Summit render the texture animation pinup picture for having described vertex color;And,
Display unit, for showing the texture animation pinup picture with described vertex color.
15. specially good effects as claimed in claim 13 realize device, it is characterised in that described particle is hangover particle;Described hangover The special effects data of particle also includes particle trailing length and dough sheet precision;
Described rendering module specifically includes:
Dough sheet computing unit, for according to described particle trailing length and described dough sheet precision, calculates and obtains described hangover particle Dough sheet number;
Cross direction computing unit, for the direction of motion according to the described hangover particle each dough sheet in motor process be used for Shooting display scene virtual camera front to, calculate obtain described each dough sheet cross direction;
Vertex data computing unit, for the cross direction according to described each dough sheet and described particle size, calculates described in obtaining The vertex data of each dough sheet in hangover particle;
Vertex color computing unit, for the vertex data according to described each dough sheet and described color running parameter, calculating obtains Obtain the vertex color of described each dough sheet;And,
Render display unit, be used for according to described texture animation pinup picture, the vertex data of described each dough sheet and vertex color, will The summit of each dough sheet of described hangover particle renders the texture animation pinup picture of the vertex color for its correspondence and shows.
16. specially good effects as described in any one of claim 9 to 15 realize device, it is characterised in that described special effects data also includes Particle emission frequency, particle entire life, particle current age, quiescent noise seed, quiescent noise amplitude range and dynamic noise Amplitude range.
CN201610537300.2A 2016-07-05 2016-07-05 A kind of special efficacy implementation method and device Active CN106204696B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610537300.2A CN106204696B (en) 2016-07-05 2016-07-05 A kind of special efficacy implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610537300.2A CN106204696B (en) 2016-07-05 2016-07-05 A kind of special efficacy implementation method and device

Publications (2)

Publication Number Publication Date
CN106204696A true CN106204696A (en) 2016-12-07
CN106204696B CN106204696B (en) 2019-05-28

Family

ID=57474012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610537300.2A Active CN106204696B (en) 2016-07-05 2016-07-05 A kind of special efficacy implementation method and device

Country Status (1)

Country Link
CN (1) CN106204696B (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108648260A (en) * 2018-05-17 2018-10-12 成都明镜视觉科技有限公司 A kind of particle emission method based on world space
CN108847109A (en) * 2018-06-26 2018-11-20 天津慧医谷科技有限公司 A kind of human body acupoint selection practice wire examination method and system based on three-dimensional modeling
CN108986227A (en) * 2018-06-28 2018-12-11 北京市商汤科技开发有限公司 The generation of particle effect program file packet and particle effect generation method and device
CN109559375A (en) * 2018-11-21 2019-04-02 北京像素软件科技股份有限公司 3 D motion trace analogy method and device, electronic equipment and storage medium
CN109847360A (en) * 2019-03-14 2019-06-07 网易(杭州)网络有限公司 3D effect processing method, device, electronic equipment and the medium of game item
CN109949398A (en) * 2019-04-18 2019-06-28 成都四方伟业软件股份有限公司 Particle renders method, apparatus and electronic equipment
CN110354500A (en) * 2019-07-15 2019-10-22 网易(杭州)网络有限公司 Effect processing method, device, equipment and storage medium
CN111054072A (en) * 2019-12-17 2020-04-24 米哈游科技(上海)有限公司 Role model trailing method, device, equipment and storage medium
CN111273976A (en) * 2020-01-09 2020-06-12 北京金山安全软件有限公司 Animation carousel method and device
CN111558223A (en) * 2020-04-17 2020-08-21 完美世界(北京)软件科技发展有限公司 Method and device for generating trailing special effect, storage medium and computer equipment
CN111625170A (en) * 2020-06-15 2020-09-04 北京达佳互联信息技术有限公司 Animation display method, electronic equipment and storage medium
CN112188114A (en) * 2019-07-05 2021-01-05 北京小米移动软件有限公司 Shooting method and device for displaying particle special effect
CN112700517A (en) * 2020-12-28 2021-04-23 北京字跳网络技术有限公司 Method for generating visual effect of fireworks, electronic equipment and storage medium
CN113658298A (en) * 2018-05-02 2021-11-16 北京市商汤科技开发有限公司 Method and device for generating special-effect program file package and special effect
CN114332323A (en) * 2021-12-24 2022-04-12 北京字跳网络技术有限公司 Particle effect rendering method, device, equipment and medium
WO2022142878A1 (en) * 2020-12-28 2022-07-07 北京字跳网络技术有限公司 Streak visual effect generating method, video generating method, and electronic device
WO2023140786A3 (en) * 2022-01-24 2023-09-28 脸萌有限公司 Method and apparatus for processing special effect video, and electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147928A (en) * 2011-03-16 2011-08-10 美通日用品(杭州)有限公司 Improved flame-simulation acceleration algorithm based on particle system
KR20120077324A (en) * 2010-12-30 2012-07-10 세종대학교산학협력단 An contents creating method using sketch-based interfaces
US20120274646A1 (en) * 2011-04-29 2012-11-01 Randy Johnson Laser particle projection system
CN103365622A (en) * 2013-06-28 2013-10-23 新奥特(北京)视频技术有限公司 Method and device for adjusting three-dimensional particle picture

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120077324A (en) * 2010-12-30 2012-07-10 세종대학교산학협력단 An contents creating method using sketch-based interfaces
CN102147928A (en) * 2011-03-16 2011-08-10 美通日用品(杭州)有限公司 Improved flame-simulation acceleration algorithm based on particle system
US20120274646A1 (en) * 2011-04-29 2012-11-01 Randy Johnson Laser particle projection system
CN103365622A (en) * 2013-06-28 2013-10-23 新奥特(北京)视频技术有限公司 Method and device for adjusting three-dimensional particle picture

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113658298A (en) * 2018-05-02 2021-11-16 北京市商汤科技开发有限公司 Method and device for generating special-effect program file package and special effect
CN108648260A (en) * 2018-05-17 2018-10-12 成都明镜视觉科技有限公司 A kind of particle emission method based on world space
CN108847109A (en) * 2018-06-26 2018-11-20 天津慧医谷科技有限公司 A kind of human body acupoint selection practice wire examination method and system based on three-dimensional modeling
CN108986227A (en) * 2018-06-28 2018-12-11 北京市商汤科技开发有限公司 The generation of particle effect program file packet and particle effect generation method and device
CN108986227B (en) * 2018-06-28 2022-11-29 北京市商汤科技开发有限公司 Particle special effect program file package generation method and device and particle special effect generation method and device
CN109559375A (en) * 2018-11-21 2019-04-02 北京像素软件科技股份有限公司 3 D motion trace analogy method and device, electronic equipment and storage medium
CN109847360A (en) * 2019-03-14 2019-06-07 网易(杭州)网络有限公司 3D effect processing method, device, electronic equipment and the medium of game item
CN109949398A (en) * 2019-04-18 2019-06-28 成都四方伟业软件股份有限公司 Particle renders method, apparatus and electronic equipment
CN112188114A (en) * 2019-07-05 2021-01-05 北京小米移动软件有限公司 Shooting method and device for displaying particle special effect
CN110354500A (en) * 2019-07-15 2019-10-22 网易(杭州)网络有限公司 Effect processing method, device, equipment and storage medium
CN111054072B (en) * 2019-12-17 2023-11-07 米哈游科技(上海)有限公司 Method, device, equipment and storage medium for role model tailing
CN111054072A (en) * 2019-12-17 2020-04-24 米哈游科技(上海)有限公司 Role model trailing method, device, equipment and storage medium
CN111273976A (en) * 2020-01-09 2020-06-12 北京金山安全软件有限公司 Animation carousel method and device
CN111558223A (en) * 2020-04-17 2020-08-21 完美世界(北京)软件科技发展有限公司 Method and device for generating trailing special effect, storage medium and computer equipment
CN111558223B (en) * 2020-04-17 2023-06-13 完美世界(北京)软件科技发展有限公司 Method and device for generating tailing special effects, storage medium and computer equipment
CN111625170A (en) * 2020-06-15 2020-09-04 北京达佳互联信息技术有限公司 Animation display method, electronic equipment and storage medium
WO2022142878A1 (en) * 2020-12-28 2022-07-07 北京字跳网络技术有限公司 Streak visual effect generating method, video generating method, and electronic device
CN112700517A (en) * 2020-12-28 2021-04-23 北京字跳网络技术有限公司 Method for generating visual effect of fireworks, electronic equipment and storage medium
CN114332323A (en) * 2021-12-24 2022-04-12 北京字跳网络技术有限公司 Particle effect rendering method, device, equipment and medium
WO2023140786A3 (en) * 2022-01-24 2023-09-28 脸萌有限公司 Method and apparatus for processing special effect video, and electronic device and storage medium

Also Published As

Publication number Publication date
CN106204696B (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN106204696A (en) A kind of specially good effect implementation method and device
CN105373224B (en) A kind of mixed reality games system based on general fit calculation and method
Liu et al. Target tracking of moving and rotating object by high-speed monocular active vision
CN106625687A (en) Kinematics modeling method for articulated robot
CN103955960B (en) Image viewpoint transformation method based on single input image
CN108153707A (en) A kind of arc welding robot straight line pendulum soldering method based on spatial alternation principle
CN108008817A (en) A kind of method for realizing virtual reality fusion
CN111583367A (en) Hair simulation method and system
CN102467749A (en) Three-dimensional virtual human body movement generation method based on key frames and spatiotemporal restrictions
CN105975089A (en) Virtual reality electromagnetic somatosensory scene implementation method and device
CN111773719A (en) Rendering method and device of virtual object, storage medium and electronic device
CN103426196A (en) Joint animation modeling technology in fluid environment
CN112541969B (en) Dynamic transferring and binding method for three-dimensional human body model skeleton
Andersson A real experiment in virtual environments: A virtual batting cage
CN112562050A (en) Virtual object wind animation generation method and device, storage medium and terminal
Calderon et al. A Robot soccer team as a strategy to develop educational iniciatives
Huang et al. Computational light painting and kinetic photography
CN105069829A (en) Human body animation generation method based on multi-objective video
CN109847360A (en) 3D effect processing method, device, electronic equipment and the medium of game item
Wagner et al. Path planning and tracking for robots based on cubic hermite splines in real-time
CN207253746U (en) A kind of virtual reality seat
Luo et al. Quad-tree atlas ray casting: a gpu based framework for terrain visualization and its applications
Behnke et al. Toni: A soccer playing humanoid robot
Klancar et al. Robot soccer collision modelling and validation in multi-agent simulator
Yuan et al. Layered omnidirectional walking controller for the humanoid soccer robot

Legal Events

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