CN106952329A - Particle effect edit methods and system based on Unity3D and NGUI - Google Patents
Particle effect edit methods and system based on Unity3D and NGUI Download PDFInfo
- Publication number
- CN106952329A CN106952329A CN201710094661.9A CN201710094661A CN106952329A CN 106952329 A CN106952329 A CN 106952329A CN 201710094661 A CN201710094661 A CN 201710094661A CN 106952329 A CN106952329 A CN 106952329A
- Authority
- CN
- China
- Prior art keywords
- particle
- model
- grid
- effect
- special efficacy
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
Abstract
The invention provides a kind of particle effect edit methods and system based on Unity3D and NGUI, method is:The special effect of Unity primary particals is obtained, special effect feature is extracted, sets up the geometrical model of particle effect;According to geometrical model, elementary special efficacy model is set up, and by parameters write parameters cache table;Gridding processing is carried out to geometrical model, the particle model based on grid is set up, then enters row matrix conversion, grid matrix model is formed;To grid matrix model render the division in region, the rendering objects rendered in region to division are rendered, and obtain particle renders result;The change of particle in grid matrix model is monitored, with reference to particle renders result, the dynamic special efficacy editor of particle is realized.Present invention employs carrying out the methods such as gridding, matrix conversion and Particles Moving to Unity primary particals to handle, make the special effect of particle truly various, and change efficiency high.
Description
Technical field
The present invention relates to technical field of virtual reality, more particularly to the particle effect editing side based on Unity3D and NGUI
Method and system.
Background technology
Particle effect is the making mould developed for the water in simulating reality, fire, mist, gas and other effects by various three-dimensional softwares
Block, is it is showed solid form countless single particle combinations, by controller, and script controls its overall or single
Motion, there is real effect in simulation.ParticIe system can be good at as an important branch in virtual reality technology
Irregular proper motion is simulated, the randomness of fuzzy objective motion is fully shown.The realization of particIe system occurs in that various
Different methods.A kind of a kind of proper motion of algorithm simulation since most, particle property parametric method finally, its application is more next
More extensive, effect is also more and more true to nature.Special efficacy since most in science fiction movies is rendered, and computer game scene till now is set
Put, particIe system brings more visual enjoyments for our work and life.
If however, often need to simulate a kind of natural landscape, that just removes to study a kind of particIe system realizes algorithm, must consume
When effort, its flexibility and autgmentability all receive certain limitation, can also increase the cost of realization accordingly.And particle property
Parameter setting method, although realize extension to a certain extent, can realize a variety of particle effects by a system.But its
Motion change TRAJECTORY CONTROL underaction, shows slightly not enough, it is impossible to meet requirement of the people for virtual reality in authenticity.
In addition, the research currently for particle effect in particIe system is normally based on existing special efficacy rendering engine reality
It is existing, such as Cocos2dx game engines, And Engine game engines or Unity3d game engines, otherwise it is that scholar oneself is real
A kind of existing algorithm, simulates a kind of proper motion and realizes, or being to set several particle properties, particle is controlled by parameter setting
Motion realizes that the special efficacy of particle renders change.But realize the special case method inefficiency of particle effect, particle property parameter setting method
The problem of showing slightly deficiency in authenticity again.Particle is generally carried out using the particle effect editing system based on NGUI in the prior art
The editor of special efficacy, but the particle effect effect realized is undesirable.
Therefore, defect of the prior art is, but the special effect that existing particle effect rendering intent is realized is paid no attention to
Think, inefficiency.
The content of the invention
For above-mentioned technical problem, the present invention provide a kind of particle effect edit methods based on Unity3D and NGUI and
System, employs and the method processing such as gridding, matrix conversion and Particles Moving is carried out to Unity primary particals, by primary partical
The rendering objects of grid type are subdivided into, the dynamic special efficacy editor of particle is realized, makes the special effect of particle truly various, and change
Efficiency high.
In order to solve the above technical problems, the technical scheme that the present invention is provided is:
In a first aspect, the present invention provides a kind of wireless control system of LED car lamp, including:
Step S1, based on Unity primary partical systems, obtains the special effect of the primary partical;
Step S2, according to the special effect of the primary partical, extracts special effect feature, is built by wireframe modeling method
The geometrical model of vertical particle effect;
Step S3, according to the geometrical model, elementary special efficacy model is set up by the composite surface in surface modeling method, and
By the parameters write parameters cache table of the elementary special efficacy model, entity-model parameter table of comparisons is created;
Step S4, gridding processing is carried out to the geometrical model, sets up the particle model based on grid;
Step S5, enters row matrix conversion to the particle model of the grid, forms grid-matrix model;
Step S6, to the grid-matrix model render the division in region, region is rendered to division by NGUI
In rendering objects rendered, obtain particle renders result;
Step S7, the change of particle in the grid-matrix model is monitored by Particles Moving algorithm, with reference to the particle
Rendering result, realizes the dynamic special efficacy editor of the particle, and generates particle effect rendering engine.
The particle effect edit methods based on Unity3D and NGUI that the present invention is provided, its technical scheme is:
Based on Unity primary partical systems, the special effect of the primary partical is obtained;According to the spy of the primary partical
Effect is imitated, special effect feature is extracted, the geometrical model of particle effect is set up by wireframe modeling method;According to the geometry mould
Type, elementary special efficacy model is set up by the composite surface in surface modeling method, and by the parameters of the elementary special efficacy model
Write parameters cache table, creates entity-model parameter table of comparisons;
Gridding processing is carried out to the geometrical model, the particle model based on grid is set up;To the particle of the grid
Model enters row matrix conversion, forms grid-matrix model;The grid-matrix model is carried out by NGUI to render region
Divide, the rendering objects rendered in region to division are rendered, and obtain particle renders result;Supervised by Particles Moving algorithm
Depending on the change of particle in the grid-matrix model, with reference to the particle renders result, realize that the dynamic special efficacy of the particle is compiled
Volume, and generate particle effect rendering engine.
The particle effect edit methods based on Unity3D and NGUI that the present invention is provided, are employed to Unity primary particals
The method processing such as gridding, matrix conversion and Particles Moving are carried out, primary partical is subdivided into the rendering objects of grid type, realized
The dynamic special efficacy editor of particle, makes the special effect of particle truly various, and change efficiency high, it is realized with NGUI perfect suitable
Match somebody with somebody.
Further, the step S4, be specially:
According to the special effect of the primary partical and characteristic effect feature, the grid of pre-set density is selected;
According to the grid, gridding processing is carried out to the geometrical model, the particle model based on grid is set up.
Further, the step S5, be specially:
The characteristics of analyzing each net region in the particle model of the grid, with reference to the special effect feature, to not
Handled with grid, and create region-special efficacy concordance list;
The particle model of the grid is stored in the region-special efficacy concordance list by matrix, each matrix pair
A mesh object is answered, one particle cell of each mesh object correspondence forms grid-matrix model.
Further, the step S6, be specially:
One piece is divided in internal memory where the grid-matrix model and renders region as rendering data buffer area, is set up
Rendering objects, and it is saved in the rendering data buffer area;
According to the rendering objects, foundation renders heap;
The entity-model parameter table of comparisons is traveled through, to the particle pair of each particle cell in the grid-matrix model
As attribute is initialized, initial render object is formed;
The initial render object is scanned by the heap that renders, the initial render object is rendered, grain is obtained
Sub- rendering result.
Further, the step S7, be specially:
Position of the particle in the region-special efficacy concordance list in the grid-matrix model is identified, prison is set up
Depending on object, a particle cell in the corresponding region-special efficacy concordance list of the supervision object;
By monitoring the change in location of the supervision object, the mark after the supervision object change in location is obtained;
According to the mark after the supervision object change in location, the supervision object after change in location is rendered, with reference to
The particle renders result, realizes the dynamic special efficacy editor of the particle, and generates particle effect rendering engine.
Further, after the step S7, also including step S8, particle is believed by the particle effect rendering engine
The different particles included in breath carry out particle effect editor:
Obtain particle information and describe file and special efficacy script file corresponding with the particle information, the special efficacy script text
Part is used to describe the corresponding particle effect of the particle information;
Pass through the particle effect described in special efficacy script file described in the special efficacy render engine renders;
The particle information and particle corresponding with the particle information particle information described described in file is special
Effect is shown by display interface.
Second aspect, the present invention provides a kind of particle effect editing system based on Unity3D and NGUI, including:
Primary partical special efficacy acquisition module, for based on Unity primary partical systems, obtaining the special efficacy of the primary partical
Effect;
Geometrical model sets up module, for the special effect according to the primary partical, extracts special effect feature, passes through
Wireframe modeling method sets up the geometrical model of particle effect;
Elementary special efficacy model building module, for according to the geometrical model, passing through the composite surface in surface modeling method
Elementary special efficacy model is set up, and by the parameters write parameters cache table of the elementary special efficacy model, creates entity-model ginseng
The number table of comparisons;
The particle model of grid sets up module, for carrying out gridding processing to the geometrical model, sets up and is based on grid
Particle model;
Grid-matrix model sets up module, and entering row matrix for the particle model to the grid converts, and formation grid-
Matrix model;
Particle renders module, the division for the grid-matrix model render region by NGUI, to dividing
The rendering objects rendered in region rendered, obtain particle renders result;
Particle effect rendering engine generation module, for being monitored by Particles Moving algorithm in the grid-matrix model
The change of particle, with reference to the particle renders result, realizes the dynamic special efficacy editor of the particle, and generates particle effect and render
Engine.
The particle effect editing system based on Unity3D and NGUI that the present invention is provided, its technical scheme is:By primary
Particle effect acquisition module, for based on Unity primary partical systems, obtaining the special effect of the primary partical;By several
What model building module, for the special effect according to the primary partical, extracts special effect feature, by wireframe modeling side
Method sets up the geometrical model of particle effect;By elementary special efficacy model building module, for according to the geometrical model, passing through table
Composite surface in the modeling of face sets up elementary special efficacy model, and the parameters write parameters of the elementary special efficacy model are delayed
Table is deposited, entity-model parameter table of comparisons is created;
Module is set up by the particle model of grid, for carrying out gridding processing to the geometrical model, foundation is based on
The particle model of grid;Module is set up by grid-matrix model, entering row matrix for the particle model to the grid turns
Change, form grid-matrix model;By particle renders module, for being rendered by NGUI to the grid-matrix model
The division in region, the rendering objects rendered in region to division are rendered, and obtain particle renders result;Pass through particle effect
Rendering engine generation module, the change for monitoring particle in the grid-matrix model by Particles Moving algorithm, with reference to institute
Particle renders result is stated, the dynamic special efficacy editor of the particle is realized, and generates particle effect rendering engine.
The particle effect editing system based on Unity3D and NGUI that the present invention is provided, is employed to Unity primary particals
The method processing such as gridding, matrix conversion and Particles Moving are carried out, primary partical is subdivided into the rendering objects of grid type, realized
The dynamic special efficacy editor of particle, makes the special effect of particle truly various, and change efficiency high, it is realized with NGUI perfect suitable
Match somebody with somebody.
Further, the particle model of the grid sets up module, specifically for:
According to the special effect of the primary partical and characteristic effect feature, the grid of pre-set density is selected;
According to the grid, gridding processing is carried out to the geometrical model, the particle model based on grid is set up.
Further, the grid-matrix model sets up module, specifically for:
The characteristics of analyzing each net region in the particle model of the grid, with reference to the special effect feature, to not
Handled with grid, and create region-special efficacy concordance list;
The particle model of the grid is stored in the region-special efficacy concordance list by matrix, each matrix pair
A mesh object is answered, one particle cell of each mesh object correspondence forms grid-matrix model.
Further, the particle renders module, specifically for:
One piece is divided in internal memory where the grid-matrix model and renders region as rendering data buffer area, is set up
Rendering objects, and it is saved in the rendering data buffer area;
According to the rendering objects, foundation renders heap;
The entity-model parameter table of comparisons is traveled through, to the particle pair of each particle cell in the grid-matrix model
As attribute is initialized, initial render object is formed;
The initial render object is scanned by the heap that renders, the initial render object is rendered, grain is obtained
Sub- rendering result.
Brief description of the drawings
, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical scheme of the prior art
The accompanying drawing to be used needed for embodiment or description of the prior art is briefly described.
Fig. 1 shows a kind of particle effect edit methods based on Unity3D and NGUI that the embodiment of the present invention is provided
Flow chart;
Fig. 2 shows a kind of particle effect editing system based on Unity3D and NGUI that the embodiment of the present invention is provided
Schematic diagram.
Embodiment
The embodiment of technical solution of the present invention is described in detail below in conjunction with accompanying drawing.Following examples are only used for
Clearly illustrate technical scheme, therefore be intended only as example, and the protection of the present invention can not be limited with this
Scope.
Embodiment one
Fig. 1 shows a kind of particle effect edit methods based on Unity3D and NGUI that the embodiment of the present invention is provided
Flow chart;As shown in figure 1, a kind of particle effect edit methods based on Unity3D and NGUI that embodiment one is provided, bag
Include:
Step S1, based on Unity primary partical systems, obtains the special effect of primary partical;
Step S2, according to the special effect of primary partical, extracts special effect feature, grain is set up by wireframe modeling method
The geometrical model of sub- special efficacy;
Specifically, the closing space that a loaf of bread encloses is set up by wireframe modeling method, forms regular body.Body is taken up an official post
What sufficiently small field of any should be a sealing ring of equal value in topology, i.e., the body neighborhood around the point is two-dimentional empty
Between in may make up a simply connected domain, so ensure that the reliability and machinability of geometrical model.
Step S3, according to geometrical model, elementary special efficacy model is set up by the composite surface in surface modeling method, and will be just
Etc. the parameters write parameters cache table of special efficacy model, entity-model parameter table of comparisons is created;
Wherein, elementary special efficacy model is set up by the composite surface in surface modeling method, amount of calculation is small, modeling is quick.Ginseng
Number cache table stores the parameters in elementary special efficacy model as buffer area, and parameters represent particle in elementary special efficacy model
Special effect parameter.
Step S4, gridding processing is carried out to geometrical model, sets up the particle model based on grid;
Specially:
According to the special effect of primary partical and characteristic effect feature, the grid of pre-set density is selected;
If number of particles is more, the relatively small grid of selection density is handled, and the density threshold set is small;If
The quantity of particle is few, then the grid for selecting density relatively large is handled, that is, the density threshold set is larger;It can so expire
The mesh generation demand of the different particle of foot.
According to grid, gridding processing is carried out to geometrical model, the particle model based on grid is set up.
The division of space lattice is carried out to primary partical special efficacy, the calculating of particle effect is refine to each grid cell,
So that the particle effect ultimately formed is finer, the validity rendered is improved.
Step S5, enters row matrix conversion to the particle model of grid, forms grid-matrix model;
Specially:
Different grids, with reference to special effect feature, are entered by the characteristics of analyzing each net region in the particle model of grid
Row processing, and create region-special efficacy concordance list;
The particle model of grid is stored in region-special efficacy concordance list by matrix, each matrix one net of correspondence
Lattice object, one particle cell of each mesh object correspondence, forms grid-matrix model.
The particle model of grid is transformed into matrix model, is easy to calculate, and then improve rendering efficiency.
Step S6, to grid-matrix model render the division in region, to rendering in region for division by NGUI
Rendering objects are rendered, and obtain particle renders result;
Specially:
One piece is divided in internal memory where grid-matrix model and renders region as rendering data buffer area, and foundation is rendered
Object, and it is saved in rendering data buffer area;
According to rendering objects, foundation renders heap;
Entity-model parameter table of comparisons is traveled through, the particle object properties to each particle cell in grid-matrix model are entered
Row initialization, forms initial render object;
Initial render object is scanned by rendering heap, initial render object is rendered, particle renders result is obtained.
Grid-matrix model render to the division in region, then carries out rendering processing, the effect rendered can be made more smart
Cause, more truly.
Step S7, the change of particle in grid-matrix model is monitored by Particles Moving algorithm, with reference to particle renders knot
Really, the dynamic special efficacy editor of particle is realized, and generates particle effect rendering engine.
Specially:
Position of the particle in grid-matrix model in region-special efficacy concordance list is identified, supervision object is set up,
A particle cell in supervision object corresponding region-special efficacy concordance list;
By monitoring the change in location of supervision object, the mark after supervision object change in location is obtained;
According to the mark after supervision object change in location, the supervision object after change in location is rendered, with reference to particle
Rendering result, realizes the dynamic special efficacy editor of particle, and generates particle effect rendering engine.
The particle effect edit methods based on Unity3D and NGUI that the present invention is provided, its technical scheme is:
Based on Unity primary partical systems, the special effect of primary partical is obtained;According to the special effect of primary partical,
Special effect feature is extracted, the geometrical model of particle effect is set up;It is bent by the combination in surface modeling method according to geometrical model
Elementary special efficacy model is set up in face, and by the parameters write parameters cache table of elementary special efficacy model, creates entity-model parameter
The table of comparisons;By above-mentioned steps S1 to S3, the foundation of the model for various particle effects can be completed, special efficacy feature is realized
Parameter extraction, completes the calculating of special efficacy;
Gridding processing is carried out to geometrical model, the particle model based on grid is set up;The particle model of grid is carried out
Matrix is converted, and forms grid-matrix model;To grid-matrix model render the division in region by NGUI, to division
The rendering objects rendered in region are rendered, and obtain particle renders result;Grid-matrix norm is monitored by Particles Moving algorithm
The change of particle in type, with reference to particle renders result, realizes the dynamic special efficacy editor of particle, and generates particle effect and render and draw
Hold up, i.e., synthesized the various basic special efficacys completed in above-mentioned steps, form a final special effect, and then form one
Individual particle effect rendering engine, available for the various particle effects of simulation editor.
The particle effect edit methods based on Unity3D and NGUI that the present invention is provided, are employed to Unity primary particals
Special efficacy carry out gridding, matrix conversion and the processing of the method such as Particles Moving, primary partical is subdivided into rendering pair for grid type
As carrying out particle renders processing to each grid cell, realizing the dynamic special efficacy editor of particle, make the special effect of particle true
It is various, and change efficiency high, it is realized that perfection is adapted to NGUI.
Present invention also offers a kind of particle effect editing system 10 based on Unity3D and NGUI, including:
Primary partical special efficacy acquisition module 101, for based on Unity primary partical systems, obtaining the special efficacy of primary partical
Effect;
Geometrical model sets up module 102, for the special effect according to primary partical, extracts special effect feature, passes through
Wireframe modeling method sets up the geometrical model of particle effect;
Specifically, the closing space that a loaf of bread encloses is set up by wireframe modeling method, forms regular body.Body is taken up an official post
What sufficiently small field of any should be a sealing ring of equal value in topology, i.e., the body neighborhood around the point is two-dimentional empty
Between in may make up a simply connected domain, so ensure that the reliability and machinability of geometrical model.
Elementary special efficacy model building module 103, for according to geometrical model, being built by the composite surface in surface modeling method
Elementary special efficacy model is found, and by the parameters write parameters cache table of elementary special efficacy model, creates entity-model parameter control
Table;
Wherein, elementary special efficacy model is set up by the composite surface in surface modeling method, the small modeling of amount of calculation is quick.Parameter
Cache table stores the parameters in elementary special efficacy model as buffer area, and parameters represent particle in elementary special efficacy model
The parameter of special effect.
The particle model of grid sets up module 104, for carrying out gridding processing to geometrical model, sets up based on grid
Particle model;
Specially:
According to the special effect of primary partical and characteristic effect feature, the grid of pre-set density is selected;
If number of particles is more, the relatively small grid of selection density is handled, and the density threshold set is small;If
The quantity of particle is few, then the grid for selecting density relatively large is handled, that is, the density threshold set is larger;It can so expire
The mesh generation demand of the different particle of foot.
According to grid, gridding processing is carried out to geometrical model, the particle model based on grid is set up.
The division of space lattice is carried out to primary partical special efficacy, the calculating of particle effect is refine to each grid cell,
So that the particle effect ultimately formed is finer, the validity rendered is improved.
Grid-matrix model sets up module 105, enters row matrix conversion for the particle model to grid, forms grid-square
Battle array model;
Specially:
Different grids, with reference to special effect feature, are entered by the characteristics of analyzing each net region in the particle model of grid
Row processing, and create region-special efficacy concordance list;
The particle model of grid is stored in region-special efficacy concordance list by matrix, each matrix one net of correspondence
Lattice object, one particle cell of each mesh object correspondence, forms grid-matrix model.
The particle model of grid is transformed into matrix model, is easy to calculate, and then improve rendering efficiency.
Particle renders module 106, the division for grid-matrix model render region by NGUI, to dividing
The rendering objects rendered in region rendered, obtain particle renders result;
Specially:
One piece is divided in internal memory where grid-matrix model and renders region as rendering data buffer area, and foundation is rendered
Object, and it is saved in rendering data buffer area;
According to rendering objects, foundation renders heap;
Entity-model parameter table of comparisons is traveled through, the particle object properties to each particle cell in grid-matrix model are entered
Row initialization, forms initial render object;
Initial render object is scanned by rendering heap, initial render object is rendered, particle renders result is obtained.
Grid-matrix model render to the division in region, then carries out rendering processing, the effect rendered can be made more smart
Cause, more truly.
Particle effect rendering engine generation module 107, for monitoring grain in grid-matrix model by Particles Moving algorithm
The change of son, with reference to particle renders result, realizes the dynamic special efficacy editor of particle, and generate particle effect rendering engine.
Specially:
Position of the particle in grid-matrix model in region-special efficacy concordance list is identified, supervision object is set up,
A particle cell in supervision object corresponding region-special efficacy concordance list;
By monitoring the change in location of supervision object, the mark after supervision object change in location is obtained;
According to the mark after supervision object change in location, the supervision object after change in location is rendered, with reference to particle
Rendering result, realizes the dynamic special efficacy editor of particle, and generates particle effect rendering engine.
The particle effect editing system 10 based on Unity3D and NGUI that the present invention is provided, its technical scheme is:Pass through original
Raw particle effect acquisition module 101, for based on Unity primary partical systems, obtaining the special effect of primary partical;By several
What model building module 102, for the special effect according to primary partical, extracts special effect feature, sets up particle effect
Geometrical model;By elementary special efficacy model building module 103, for according to geometrical model, passing through the combination in surface modeling method
Curved surface sets up elementary special efficacy model, and by the parameters write parameters cache table of elementary special efficacy model, creates entity-model ginseng
The number table of comparisons;By above-mentioned processing, the foundation of the model for various particle effects can be completed, the parameter of special efficacy feature is realized
Extract, complete the calculating of special efficacy;
Module 104 is set up by the particle model of grid, for carrying out gridding processing to geometrical model, sets up and is based on net
The particle model of lattice;Module 105 is set up by grid-matrix model, row matrix conversion, shape are entered for the particle model to grid
Into grid-matrix model;By particle renders module 106, for carrying out rendering region to grid-matrix model by NGUI
Divide, the rendering objects rendered in region to division are rendered, and obtain particle renders result;Rendered and drawn by particle effect
Generation module 107 is held up, the change for monitoring particle in grid-matrix model by Particles Moving algorithm, with reference to particle renders
As a result, the dynamic special efficacy editor of particle is realized, and generates particle effect rendering engine, i.e., by the various bases completed in above-mentioned steps
This special efficacy is synthesized, and forms a final special effect, and then forms a particle effect rendering engine, available for simulating
Edit various particle effects.
The particle effect editing system 10 based on Unity3D and NGUI that the present invention is provided, is employed to Unity bioblasts
The special efficacy of son carries out the method processing such as gridding, matrix conversion and Particles Moving, and primary partical is subdivided into rendering for grid type
Object, carries out particle renders processing to each grid cell, realizes the dynamic special efficacy editor of particle, make the special effect of particle true
It is real various, and change efficiency high, it is realized that perfection is adapted to NGUI, the special efficacy richness at significant increase UI interfaces and performance
Power.
Embodiment two
Based on the particle effect edit methods and system based on Unity3D and NGUI in embodiment one, with reference to specific
The application scenarios selected in the explanation of application scenarios progress particle renders, the present embodiment are the description file of Weather information, i.e. grain
Sub-information describes the description file that file is Weather information, and file is described according to different particle informations, carries out different render
Processing, meets the demand of different application scene, detailed process is as follows:
Particle effect editor is carried out to the different particles included in particle information by particle effect rendering engine:
Obtain particle information and describe file and special efficacy script file corresponding with particle information, special efficacy script file is used to retouch
State the corresponding particle effect of particle information;
Specifically, in the present embodiment, particle information describes file and describes file for Weather information;
Based on the particle renders in the particle effect edit methods and system based on Unity3D and NGUI in embodiment one
Method, obtained particle effect rendering engine, wherein for different particle effects, using different particle effects as different
Special efficacy script file is stored, when receive be that Weather information describes file when, it is corresponding to match and Weather information pair
The special efficacy script file answered, the particle effect for carrying out next step renders processing.
Pass through the particle effect described in special efficacy render engine renders special efficacy script file;
Directly invoke above-mentioned special efficacy rendering engine, you can realize that Weather information describes the special efficacy comprising particle in file and compiled
Volume, realize the dynamic edit effect of special efficacy of Weather information correspondence particle.
By particle information describe particle information and particle effect corresponding with particle information described in file pass through it is aobvious
Show interface display.
Specially:Weather information, which describes file, to be included:Weather information text describes file and Weather information audio description text
Part;Both combinations are can also be, specifically using which kind of form, can be selected by those skilled in the art, the present invention is herein
It is not especially limited.Weather information text is described to the Weather information and and grain corresponding with the Weather information described in file
Sub- special efficacy is showed in display interface, and plays the Weather information described in Weather information audio description file.
The dynamic special effect of particle most editted at last is shown in display interface, can be with vivid carry out weather letter
The displaying of breath.
Specifically, the text of described description Weather information can refer to describe specific weather in a text form
Information, for example, description weather is fine day or rained that temperature is how many, the information such as PM2.5 value, can also be included:To user
Suggestion of wearing the clothes, carwash suggestion etc..The particular content that Weather information includes, can be determined by one skilled in the art, this
More detailed explanation is not made in invention herein.Similarly, the audio file of described description Weather information can refer to audio
Form describes specific Weather information, can increase the sensory experience of user.
Specifically, special efficacy script file is used to describe the corresponding particle effect of Weather information.Described particle effect can be with
Refer to make it show solid form countless single particle combinations, water, fire, mist, gas being particularly suitable in simulating reality etc.
Effect.The present invention particle effect is borrowed at this come represent raining in reality, thunder, the dynamic effect of the weather phenomenon such as lightning.
Described particle effect can be developed by those skilled in the art according to prior art, it is for instance possible to use Lua scripts
Language develops particle effect.
In addition, special efficacy script file can be preset in server, and can be as needed by those skilled in the art
It is updated.After server obtains Weather information, it is possible to it is determined that Weather information corresponding with Weather information description text
Part and special efficacy script file corresponding with Weather information.
Therefore, the particle effect rendering engine generated in embodiment one, different grains are carried out according to different particle informations
Sub- special efficacy editor, meets the demand of different user.
Embodiment three
Based on embodiment one, during particle renders are carried out, also need to carry out coloring treatment, to make in embodiment one
Particle effect edit methods and system adaptation based on Unity3D and NGUI can make in NGUI particle tinter (Shader)
The effect that particle is presented is more rich, more truly, based on this point, carries out following improvement and handles, and the present embodiment is to pass through particle renders
Computer room thermal field effect is realized in coloring, and step is as follows:
Step 1:Write NGUI particle tinter;
Specifically, user calculates function and color mapping function by adding Parameter analysis of electrochemical function, UV, receives outside join
Number, and parsed by Parameter analysis of electrochemical function pair external parameter, the temperature value of each UV points is finally calculated, and pass through color value exhibition
The temperature value now calculated, that is, the particle tinter for completing NGUI is write.
Carrying out resolving to external parameter is:Receive parameter character string, content be multiple temperature spots, each temperature spot by
Separator branch is separated, and the data that temperature spot is included have coordinate and temperature value, are separated by comma, and NGUI particle tinter is to ginseng
Number is handled, and draws quantity, position and the temperature value of temperature spot, the temperature value to calculate each UV points.
According to the distance of each UV points and given temperature point, pass through the temperature value of each UV points of two-dimensional linear interpolation calculation.
Step 2:Set up and space identical areal model where particle;And by spatial model where areal model and particle
Overlap, by the particle tinter that the tinter attribute modification of the material of areal model is the NGUI write before.Such as particle institute
It is computer room in space, i.e., the real-time thermal field effect of three-dimensional machine room is realized by particle simulation, then sets up and three-dimensional machine room floor
Identical areal model;Areal model is overlapped with three-dimensional machine room model, makes its and position parallel with the floor of three-dimensional machine room model
On floor, by the particle tinter that the tinter attribute modification of the material of areal model is the NGUI write before.
Step 3:Write the attribute of script real time modifying NGUI particle tinter;According to different scenes, parameter is carried out
Setting, the scene in the present embodiment is computer room, therefore the thermal field based on computer room carries out the setting of parameter, such as multiple temperature spots
Parameter.
Wherein, write script, receive parameter character string, content is several given temperature points, each given temperature point by minute
Separated every symbol, separator is branch;Obtain given temperature point information, given temperature point include coordinate and temperature value, coordinate and
Temperature value is separated by comma respectively;The material object of areal model is obtained by game Object.render.material, will
The character string received transmits the particle tinter into NGUI, NGUI particle tinter operationally parameter is carried out processing and
It is corresponding to calculate.
Step 4:Real-time rendering is carried out to scene, particle coloring effect is generated.
JS or C# scripts are write, dynamic temperature data are obtained, and pass to NGUI particle tinter, embodiment is first passed through
Particle effect rendering engine in one carries out carrying out further according to tinter in real-time rendering, render process to scene (being based on particle)
The calculating and mapping of the temperature data of each UV points, ultimately generate thermal field effect.
The volume of particle effect is carried out by the innovatory algorithm of above-mentioned method combination particle effect rendering engine and tinter
Volume, the effect of particle effect is more truly enriched.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent
The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to
The technical scheme described in foregoing embodiments can so be modified, or which part or all technical characteristic are entered
Row equivalent;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology
The scope of scheme, it all should cover among the claim of the present invention and the scope of specification.
Claims (10)
1. the particle effect edit methods based on Unity3D and NGUI, it is characterised in that including:
Step S1, based on Unity primary partical systems, obtains the special effect of the primary partical;
Step S2, according to the special effect of the primary partical, extracts special effect feature, grain is set up by wireframe modeling method
The geometrical model of sub- special efficacy;
Step S3, according to the geometrical model, elementary special efficacy model is set up by the composite surface in surface modeling method, and by institute
The parameters write parameters cache table of elementary special efficacy model is stated, entity-model parameter table of comparisons is created;
Step S4, gridding processing is carried out to the geometrical model, sets up the particle model based on grid;
Step S5, enters row matrix conversion to the particle model of the grid, forms grid-matrix model;
Step S6, to the grid-matrix model render the division in region, to rendering in region for division by NGUI
Rendering objects are rendered, and obtain particle renders result;
Step S7, the change of particle in the grid-matrix model is monitored by Particles Moving algorithm, with reference to the particle renders
As a result, the dynamic special efficacy editor of the particle is realized, and generates particle effect rendering engine.
2. the particle effect edit methods according to claim 1 based on Unity3D and NGUI, it is characterised in that
The step S4, be specially:
According to the special effect of the primary partical and characteristic effect feature, the grid of pre-set density is selected;
According to the grid, gridding processing is carried out to the geometrical model, the particle model based on grid is set up.
3. the particle effect edit methods according to claim 1 based on Unity3D and NGUI, it is characterised in that
The step S5, be specially:
The characteristics of analyzing each net region in the particle model of the grid, with reference to the special effect feature, to different nets
Lattice are handled, and create region-special efficacy concordance list;
The particle model of the grid is stored in the region-special efficacy concordance list by matrix, each matrix correspondence one
Individual mesh object, one particle cell of each mesh object correspondence, forms grid-matrix model.
4. the particle effect edit methods according to claim 1 based on Unity3D and NGUI, it is characterised in that
The step S6, be specially:
One piece is divided in internal memory where the grid-matrix model and renders region as rendering data buffer area, and foundation is rendered
Object, and it is saved in the rendering data buffer area;
According to the rendering objects, foundation renders heap;
The entity-model parameter table of comparisons is traveled through, the particle object of each particle cell in the grid-matrix model is belonged to
Property initialized, formed initial render object;
The initial render object is scanned by the heap that renders, the initial render object is rendered, particle wash with watercolours is obtained
Contaminate result.
5. the particle effect edit methods according to claim 4 based on Unity3D and NGUI, it is characterised in that
The step S7, be specially:
Position of the particle in the region-special efficacy concordance list in the grid-matrix model is identified, monitoring pair is set up
As a particle cell in the supervision object correspondence region-special efficacy concordance list;
By monitoring the change in location of the supervision object, the mark after the supervision object change in location is obtained;
According to the mark after the supervision object change in location, the supervision object after change in location is rendered, with reference to described
Particle renders result, realizes the dynamic special efficacy editor of the particle, and generates particle effect rendering engine.
6. the particle effect edit methods according to claim 1 based on Unity3D and NGUI, it is characterised in that
After the step S7, also including step S8, by the particle effect rendering engine to being included not in particle information
Particle effect editor is carried out with particle:
Obtain particle information and describe file and special efficacy script file corresponding with the particle information, the special efficacy script file is used
In the corresponding particle effect of the description particle information;
Pass through the particle effect described in special efficacy script file described in the special efficacy render engine renders;
The particle information is described to particle information and particle effect corresponding with the particle information described in file to lead to
Display interface is crossed to show.
7. the particle effect editing system based on Unity3D and NGUI, it is characterised in that including:
Primary partical special efficacy acquisition module, for based on Unity primary partical systems, obtaining the special efficacy effect of the primary partical
Really;
Geometrical model sets up module, for the special effect according to the primary partical, extracts special effect feature, passes through wire frame
Modeling method sets up the geometrical model of particle effect;
Elementary special efficacy model building module, for according to the geometrical model, being set up by the composite surface in surface modeling method
Elementary special efficacy model, and by the parameters write parameters cache table of the elementary special efficacy model, create entity-model parameter pair
According to table;
The particle model of grid sets up module, for carrying out gridding processing to the geometrical model, sets up the grain based on grid
Submodel;
Grid-matrix model sets up module, enters row matrix conversion for the particle model to the grid, forms grid-matrix
Model;
Particle renders module, the division for the grid-matrix model render region by NGUI, to the wash with watercolours of division
Rendering objects in dye region are rendered, and obtain particle renders result;
Particle effect rendering engine generation module, for monitoring particle in the grid-matrix model by Particles Moving algorithm
Change, with reference to the particle renders result, realize the dynamic special efficacy editor of the particle, and generate particle effect and render and draw
Hold up.
8. the particle effect editing system according to claim 7 based on Unity3D and NGUI, it is characterised in that
The particle model of the grid sets up module, specifically for:
According to the special effect of the primary partical and characteristic effect feature, the grid of pre-set density is selected;
According to the grid, gridding processing is carried out to the geometrical model, the particle model based on grid is set up.
9. the particle effect editing system according to claim 7 based on Unity3D and NGUI, it is characterised in that
Grid-the matrix model sets up module, specifically for:
The characteristics of analyzing each net region in the particle model of the grid, with reference to the special effect feature, to different nets
Lattice are handled, and create region-special efficacy concordance list;
The particle model of the grid is stored in the region-special efficacy concordance list by matrix, each matrix correspondence one
Individual mesh object, one particle cell of each mesh object correspondence, forms grid-matrix model.
10. the particle effect editing system according to claim 7 based on Unity3D and NGUI, it is characterised in that
The particle renders module, specifically for:
One piece is divided in internal memory where the grid-matrix model and renders region as rendering data buffer area, and foundation is rendered
Object, and it is saved in the rendering data buffer area;
According to the rendering objects, foundation renders heap;
The entity-model parameter table of comparisons is traveled through, the particle object of each particle cell in the grid-matrix model is belonged to
Property initialized, formed initial render object;
The initial render object is scanned by the heap that renders, the initial render object is rendered, particle wash with watercolours is obtained
Contaminate result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710094661.9A CN106952329A (en) | 2017-02-21 | 2017-02-21 | Particle effect edit methods and system based on Unity3D and NGUI |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710094661.9A CN106952329A (en) | 2017-02-21 | 2017-02-21 | Particle effect edit methods and system based on Unity3D and NGUI |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106952329A true CN106952329A (en) | 2017-07-14 |
Family
ID=59466534
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710094661.9A Pending CN106952329A (en) | 2017-02-21 | 2017-02-21 | Particle effect edit methods and system based on Unity3D and NGUI |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106952329A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107978014A (en) * | 2017-12-21 | 2018-05-01 | 乐蜜有限公司 | A kind of particle renders method, apparatus, electronic equipment and storage medium |
CN108665531A (en) * | 2018-05-08 | 2018-10-16 | 阿里巴巴集团控股有限公司 | The transform method and device of 3D particle models |
CN109925715A (en) * | 2019-01-29 | 2019-06-25 | 腾讯科技(深圳)有限公司 | A kind of virtual waters generation method, device and terminal |
CN110533755A (en) * | 2019-08-30 | 2019-12-03 | 腾讯科技(深圳)有限公司 | A kind of method and relevant apparatus of scene rendering |
CN111061480A (en) * | 2019-12-27 | 2020-04-24 | 珠海金山网络游戏科技有限公司 | NGUI-based multi-layer material rendering method and device |
CN112037308A (en) * | 2020-09-01 | 2020-12-04 | 完美世界(北京)软件科技发展有限公司 | Weather system editing method, device, system and equipment |
CN112652044A (en) * | 2021-01-05 | 2021-04-13 | 网易(杭州)网络有限公司 | Particle special effect rendering method, device and equipment and storage medium |
CN114972595A (en) * | 2022-05-05 | 2022-08-30 | 北京领为军融科技有限公司 | Particle system rendering optimization method based on geometric information |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102682472A (en) * | 2012-05-07 | 2012-09-19 | 电子科技大学 | Particle effect visual synthesis system and method |
CN103337093A (en) * | 2013-06-07 | 2013-10-02 | 国家电网公司 | Method for realizing three-dimensional machine room real-time temperature field effect based on Unity3D shader |
US20150035830A1 (en) * | 2010-12-24 | 2015-02-05 | Xiaopeng Zhang | Method for real-time and realistic rendering of complex scenes on internet |
CN104717567A (en) * | 2015-03-30 | 2015-06-17 | 北京奇艺世纪科技有限公司 | Dynamic display method and device for weather information |
CN105354872A (en) * | 2015-11-04 | 2016-02-24 | 深圳墨麟科技股份有限公司 | Rendering engine, implementation method and producing tools for 3D web game |
-
2017
- 2017-02-21 CN CN201710094661.9A patent/CN106952329A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150035830A1 (en) * | 2010-12-24 | 2015-02-05 | Xiaopeng Zhang | Method for real-time and realistic rendering of complex scenes on internet |
CN102682472A (en) * | 2012-05-07 | 2012-09-19 | 电子科技大学 | Particle effect visual synthesis system and method |
CN103337093A (en) * | 2013-06-07 | 2013-10-02 | 国家电网公司 | Method for realizing three-dimensional machine room real-time temperature field effect based on Unity3D shader |
CN104717567A (en) * | 2015-03-30 | 2015-06-17 | 北京奇艺世纪科技有限公司 | Dynamic display method and device for weather information |
CN105354872A (en) * | 2015-11-04 | 2016-02-24 | 深圳墨麟科技股份有限公司 | Rendering engine, implementation method and producing tools for 3D web game |
Non-Patent Citations (1)
Title |
---|
王超明: ""基于Unity3D引擎的赛车手机游戏的设计与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107978014A (en) * | 2017-12-21 | 2018-05-01 | 乐蜜有限公司 | A kind of particle renders method, apparatus, electronic equipment and storage medium |
CN108665531A (en) * | 2018-05-08 | 2018-10-16 | 阿里巴巴集团控股有限公司 | The transform method and device of 3D particle models |
CN109925715A (en) * | 2019-01-29 | 2019-06-25 | 腾讯科技(深圳)有限公司 | A kind of virtual waters generation method, device and terminal |
CN109925715B (en) * | 2019-01-29 | 2021-11-16 | 腾讯科技(深圳)有限公司 | Virtual water area generation method and device and terminal |
CN110533755A (en) * | 2019-08-30 | 2019-12-03 | 腾讯科技(深圳)有限公司 | A kind of method and relevant apparatus of scene rendering |
CN110533755B (en) * | 2019-08-30 | 2021-04-06 | 腾讯科技(深圳)有限公司 | Scene rendering method and related device |
CN111061480A (en) * | 2019-12-27 | 2020-04-24 | 珠海金山网络游戏科技有限公司 | NGUI-based multi-layer material rendering method and device |
CN111061480B (en) * | 2019-12-27 | 2023-08-25 | 珠海金山数字网络科技有限公司 | Method and device for rendering multi-layer material based on NGUI |
CN112037308A (en) * | 2020-09-01 | 2020-12-04 | 完美世界(北京)软件科技发展有限公司 | Weather system editing method, device, system and equipment |
CN112652044A (en) * | 2021-01-05 | 2021-04-13 | 网易(杭州)网络有限公司 | Particle special effect rendering method, device and equipment and storage medium |
CN114972595A (en) * | 2022-05-05 | 2022-08-30 | 北京领为军融科技有限公司 | Particle system rendering optimization method based on geometric information |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106952329A (en) | Particle effect edit methods and system based on Unity3D and NGUI | |
CN106780421A (en) | Finishing effect methods of exhibiting based on panoramic platform | |
Chen et al. | A system of 3D hair style synthesis based on the wisp model | |
CN103942839B (en) | Crown fire spreads three-dimensional visualization method | |
CN100570641C (en) | Plant leaf analogy method based on physics | |
CN103310478B (en) | A kind of method that diversified virtual crowd generates | |
CN110850818A (en) | Method for realizing digital twin modeling of automatic assembly workshop of circuit breaker | |
CN105205861A (en) | Tree three-dimensional visualization model realization method based on Sphere-Board | |
CN103337093A (en) | Method for realizing three-dimensional machine room real-time temperature field effect based on Unity3D shader | |
US20080018792A1 (en) | Systems and Methods for Interactive Surround Visual Field | |
Huijser et al. | Procedural natural systems for game level design | |
Song et al. | Virtual Reality (VR) technology and landscape architecture | |
CN102682472A (en) | Particle effect visual synthesis system and method | |
CN107391881A (en) | A kind of flue gas method for visualizing based on particIe system grid | |
Favorskaya et al. | Procedural modeling of broad-leaved trees under weather conditions in 3D virtual reality | |
CN110400366A (en) | A kind of real-time flood disaster visual simulating method based on OpenGL | |
CN102800121B (en) | Method for interactively editing virtual individuals in virtual crowd scene | |
CN109829232A (en) | Layer-by-layer distribution analogy method based on random forests algorithm | |
Klein | Managing the scalability of visual exploration using game engines to analyse UHI scenarios | |
Bao et al. | Billboards for tree simplification and real-time forest rendering | |
KR101743516B1 (en) | Digital leaf authoring apparatus and method | |
Hufnagel et al. | Large-scale, realistic cloud visualization based on weather forecast data | |
Kang et al. | Animation Character Generation and Optimization Algorithm Based on Computer Aided Design and Virtual Reality | |
Dong et al. | Smoke simulation based on particle system in virtual environments | |
Zhang et al. | An improved collision detection algorithm for hair simulation study |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |