CN106201510A - A kind of UE4 particIe system and the communication means of external data - Google Patents
A kind of UE4 particIe system and the communication means of external data Download PDFInfo
- Publication number
- CN106201510A CN106201510A CN201610541275.5A CN201610541275A CN106201510A CN 106201510 A CN106201510 A CN 106201510A CN 201610541275 A CN201610541275 A CN 201610541275A CN 106201510 A CN106201510 A CN 106201510A
- Authority
- CN
- China
- Prior art keywords
- particie system
- data
- function
- text
- module
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/33—Intelligent editors
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses the communication means of a kind of UE4 particIe system and external data, the invention belongs to field of virtual reality, including multiple emitters, specific particle launched by each emitter, particle one complete particIe system of composition that multiple emitters are launched jointly.Present invention achieves the communication of UE4 and external data, can be by the simulation effect of outside Data Control particIe system, the scene in simulating reality life that both can be more life-like and event, also greatly improve the real-time of simulation;In academic research, it is also possible to the data drawn by algorithm are delivered in particIe system, show in visual form, add learning value.
Description
Technical field
The invention belongs to field of virtual reality, be specifically related to the communication means of a kind of UE4 particIe system and external data.
Background technology
Unreal Engine4 (hereinafter referred to as UE4) is the illusory engine of the up-to-date release of Epic Games company, is one
The virtual reality software that money builds for three-dimensional scenic, uses this engine can make game, animation, virtual reality interior crowd
Many contents, can be used for many industries such as indoor design, military simulation equally.In visual editor, exploit person
Object in virtual scene can directly be put and the control of attribute by member freely, and is all real-time rendering.UE4 is same
Time provide absolutely open source code, exploitation staff development class can be allowed to realize the result wanted.These all make
UE4 can preferably come the scene in simulating reality life and event real-time with the external world mutual.
UE4 provides powerful particIe system simultaneously, can preferably be used for simulating such as cloud, fire, plant etc. irregular
Natural scene.The dimensional Modeling Technology that particIe system is different from the past, it resolves into many random distributions the scene of simulation
Fine particle, each particle has one's own attribute and is As time goes on continually changing, such that it is able to dynamically
Simulation natural scene change.The basic thought of particIe system is: by need simulation scene resolve into substantial amounts of some particle,
Line particle or face particle, simulate the dynamic change of scene by controlling the movement locus of a large amount of particles.The most each grain
Son has the attribute of oneself, and concrete attribute feature is determined by the scene needing simulation.The change of particle effect is through repairing
Change the parameter realization of particle.
In some particle effect that current UE 4 provides, it is possible to simulation the most true to nature most of specially good effect effect, these are special
What effect effect related to is all data transmission internal with internal for UE4, and this is inadequate to the exploitation of UE4, and some are based on UE4
The simulation of reality scene is also unable to reach real-time vivid effect.And in the research of particIe system, the irregularity such as fire, smog
The algorithm of body is research emphasis therein, and during the data obtained by algorithm are converted into real-time Simulation, communication becomes
Intermediate portions therein, if lacking the communication with external data, the researching value of this science will have a greatly reduced quality, also cannot
More real analog natural scene.
Summary of the invention
For above-mentioned technical problem present in prior art, the present invention proposes a kind of UE4 particIe system and external number
According to communication means, reasonable in design, overcome the deficiencies in the prior art, there is good promotion effect.
To achieve these goals, the present invention adopts the following technical scheme that
A kind of UE4 particIe system, including multiple emitters, specific particle launched by each emitter, and multiple emitters are altogether
With particle one the complete particIe system of composition launched.
Additionally, the present invention is it is also mentioned that a kind of UE4 particIe system and the communication means of external data, use as above
UE4 particIe system, is carried out in accordance with the following steps:
Step 1: each emitter comprises different modules, changes the dynamic, by point of particle by interpolation, removing module
Hit module and understand the data type of module intrinsic parameter, observed the change of particIe system simulation effect by the size changing parameter;
Step 2: create the particIe system of original state in the editing machine of UE4
In particIe system, add some emitters as required, add in each emitter and include Required mould
Block, Spawn module, Lifetime module, InitialSize module, InitialVelocity module, Color module are interior
Module;
Step 3: newly-built C++ class also binds the particIe system created in step 2
Step 3.1: newly-built C++ class
Step 3.1.1: open UE4 editing machine, newly-built C++ class, inherit Actor parent;
Step 3.1.2: after newly-built C++ class, UE4 automatically opens up Microsoft Visual Studio, and puts up basic
Program frame, generate class .cpp and .h file;
Step 3.2: binding particIe system
Step 3.2.1: find the path of particIe system;
Step 3.2.2: by Cast<UParticleSystem>function binding step 2 in the .cpp file of C++ class
The particIe system created;
Step 4: write the interface function of amendment particIe system parameter in Microsoft Visual Studio
Step 4.1: open the installation site of UE4, reads the source code program of particIe system, finds the operation mould of particIe system
Formula, finds the function about parameter in particIe system;
Step 4.2: write interface function
Step 4.2.1: by MyEffect-> Emitters [i] function finds emitter to be revised;
Step 4.2.2: by MyEmitter-> LODLevels [i] function finds module to be revised in emitter,
Find parameter to be revised under module, the data received in interface function are assigned to parameter to be revised, different parameters pair
Different interface functions, the data type that wherein interface function receives is answered to want consistent with the data type of the parameter of amendment;
Step 5: write function and read text data
Step 5.1: find the platform file interface of UE4
In the source code program of UE4, find the source code of IPlatformFile, and find the interface of IPlatformFile;
Step 5.2: set the form of text to be read in txt file;
Step 5.3: write text interface function: write the function reading text in .cpp file
Step 5.3.1: find the path of the text of reading, by FPlatformFileManager function binding literary composition
Presents;
Step 5.3.2: the data in text are cached by LoadFileToString function and are converted into
String format;
Step 5.4: read text data
Step 5.4.1: read each data in a line according to space;
Step 5.4.2: by Atof function, the data of reading are converted into the data type required for parameter, are assigned to grain
The parameter received in subsystem interface function;
Step 5.4.3: after having read a line, and then reads next line to the last a line;
Step 5.4.4: the final data read in complete text, it is achieved particIe system and the communication of external data.
The Advantageous Effects that the present invention is brought:
The present invention proposes the communication means of a kind of UE4 particIe system and external data, compared with prior art, the present invention
Achieve the communication of UE4 and external data, can be by the simulation effect of outside Data Control particIe system, both can be more
Scene in simulating reality life true to nature and event, also greatly improve the real-time of simulation;In academic research, it is possible to
It is delivered in particIe system with the data that algorithm is drawn, shows in visual form, add learning value.
Accompanying drawing explanation
Fig. 1 is the FB(flow block) of the present invention a kind of UE4 particIe system and the communication means of external data.
Detailed description of the invention
Below in conjunction with the accompanying drawings and the present invention is described in further detail by detailed description of the invention:
Embodiment 1:
A kind of UE4 particIe system based on text, including multiple emitters, specific grain launched by each emitter
Son, particle one complete particIe system of composition that multiple emitters are launched jointly.
Embodiment 2:
On the basis of above-described embodiment, the present invention is it is also mentioned that a kind of UE4 particIe system based on text is with outside
The communication means (as shown in Figure 1) of data, is carried out in accordance with the following steps:
Step one: add or delete the emitter of particIe system, transmitter module, changes module parameter, observes simulation effect
Really.
In the editing interface of UE4 particIe system, add or delete each of the emitter of particIe system and emitter
Module, changes parameter, observes simulation effect.ParticIe system is made up of multiple emitters, and specific particle launched by each emitter,
Particle one complete particIe system of composition launched jointly by multiple emitters.Each emitter comprises different modules.Can lead to
Cross interpolation, removing module changes the dynamic of particle.The data type of parameter can be understood in details panel after clicking on module, logical
Cross the change of the size observation particIe system simulation effect changing parameter.The base attribute of particle mainly has following several:
Material: be present in Required module, is the material applied in particle, and it is the most true to nature that material is done, particle
System simulation the most accurate.
Rate: be present in Spawn module, refers to the production rate of particle, the particle of namely particIe system transmitting per second
Quantity.By changing the Rate of particle, thus it is possible to vary the size of whole particIe system and the closeness of transmitting.
Lifetime: be present in Lifetime module, the life cycle (in seconds) of single particle, numerical value is the biggest,
The particle time-to-live is the longest.
StartSize: be present in InitialSize module, refers to the initial size of particle, by changing
The numerical value of StartSize, can change particle respectively in (x, y, z) size in three directions.
StartVelocity: be present in InitialVelocity module, refers to the initial velocity of particle, by changing
The numerical value of StartVelocity, can change particle respectively in (x, y, z) speed in three directions.
ColorOverLife: be present in Color module, refer to the color of particle in time change and change.
AlphaOverLife: be present in Color module, refer to the transparency of particle in time change and change.
Step 2: create particIe system in editing machine
In UE4 editing machine, create particIe system, be added as needed on emitter, add corresponding mould in the transmitter
Block.Target component (parameter that will be changed by interface function) sets initial value, creates the particIe system of an original state.
Step 3: the particIe system created before newly-built C++ class binding
1, newly-built C++ class
Open UE4 editing machine, newly-built C++ class, inherit Actor parent.
After creating C++ class, UE4 can automatically open up Microsoft Visual Studio (hereinafter referred to as VS), and puts up
Basic program frame, generates .cpp and the .h file of class.
2, binding particIe system
Find the path of particIe system, by Cast<UParticleSystem in the .cpp file of C++ class>
(StaticLoadObject (UParticleSystem::StaticClass (), NULL, * EffectName.ToS tring
())) function (this function finds the particIe system of establishment by path, and wherein EffectName is the path of particIe system) binding
The particIe system before created.
Step 4: write the interface function of particIe system
1, operational mode and the parametric function of particIe system are found
Binding particIe system after, open the installation site of UE4, Epic Games 4.9 Engine Source
Runtime Engine Classes Particles file finds the source code program of particIe system, find particIe system
About the function of parameter in operational mode and particIe system.
2, interface function is write
The interface function of amendment particIe system parameter is write in VS.The interface of the corresponding particIe system of each parameter
Function.Wherein interface function can receive data parameters.In interface function, pass through MyEffect-> Emitters [i] function
(emitter in position particles system) finds emitter Emitters [i] to be revised, and passes through MyEmitter-in the transmitter >
LODLevels [i] function (module in location transmitters) finds module Module to be revised, and finds and revise under module
Parameter.The data received in interface function are assigned to parameter to be revised.The corresponding different interface function of different parameters.
The data type that wherein interface function receives wants consistent with the data type of the parameter of amendment.
Step 5: write function and read text data, it is achieved external data and the communication of particIe system
1, UE4 platform file interface is found
Carrying out during file I/O operation portable so C++ java standard library can not directly be used for it in UE4, UE4 provides
IPlatformFile (platform file I/O interface).The source code program of UE4 finds the source code of IPlatformFile with
And the interface modes of IPlatformFile.
2, data form in text is set
First have to set the form of the file of reading in txt file.UE4 can be distinguished by space, line feed etc.
Data.In text, the data type of data is floating type.The data of every a line represent parameter to be revised, such as, often
First data of a line are intended to the speed of amendment, second to the fourth data initial size being intended to amendment ... every number
Separated by space according between data.
3, text interface function is write
The function reading text is write in .cpp file.First find the path of the text of reading, pass through
FPlatformFileManager::Get () .GetPlatformFile () .FileExists (* CompleteFilePath))
Function (function of management text, by path binding text, wherein CompleteFilePath is the path of text) is tied up
Determine text.Data buffer storage in text (is become word by LoadFileToString function by the data in text
The form of symbol string) cache and be converted into string format.
4, text data is read
Read each data in a line according to space (" "), data (are changed data form by Atof function
Function) it is converted into the data type required for parameter, it is assigned in particIe system interface function head the parameter received.Read one
After row, read next line to the last a line according to line feed T (" n ").Finally read the data in whole text, it is achieved
ParticIe system and the communication of external data.
Present invention achieves the communication of UE4 particIe system and external data, can be by outside Data Control particle systems
The simulation effect of system, the scene in simulating reality life that both can be more life-like and event, also greatly improve simulation
Real-time;In academic research, it is also possible to the data drawn by algorithm are delivered in particIe system, represent in visual form
Out, learning value is added.
Certainly, described above is not limitation of the present invention, and the present invention is also not limited to the example above, and this technology is led
Change that the technical staff in territory is made in the essential scope of the present invention, retrofit, add or replace, also should belong to the present invention's
Protection domain.
Claims (2)
1. a UE4 particIe system, it is characterised in that: including multiple emitter, specific particle launched by each emitter, multiple
Particle one complete particIe system of composition that emitter is launched jointly.
2. a UE4 particIe system and the communication means of external data, it is characterised in that: use as claimed in claim 1 one
Plant UE4 particIe system, carry out in accordance with the following steps:
Step 1: create the particIe system of original state in the editing machine of UE4
In particIe system, add some emitters as required, in each emitter add include Required module,
Spawn module, Lifetime module, InitialSize module, InitialVelocity module, Color module are at interior mould
Block;
Step 2: newly-built C++ class also binds the particIe system created in step 1
Step 2.1: newly-built C++ class
Step 2.1.1: open UE4 editing machine, newly-built C++ class, inherit Actor parent;
Step 2.1.2: after newly-built C++ class, UE4 automatically opens up Microsoft Visual Studio, and puts up basic journey
Sequence framework, generates .cpp and the .h file of class;
Step 2.2: binding particIe system
Step 2.2.1: find the path of particIe system;
Step 2.2.2: found in step 1 by Cast<UParticleSystem>function in the .cpp file of C++ class and create
ParticIe system and bind;
Step 3: write the interface function of amendment particIe system parameter in Microsoft Visual Studio
Step 3.1: by MyEffect-> Emitters [i] function finds emitter to be revised;
Step 3.2: by MyEmitter-> LODLevels [i] function finds module to be revised in emitter, under module
Finding parameter to be revised, the data received in interface function are assigned to parameter to be revised, different parameter correspondences is different
Interface function, the data type that wherein interface function receives wants consistent with the data type of parameter of amendment;
Step 4: write function and read text data
Step 4.1: set the form of text to be read;
Step 4.2: write the interface function reading text in .cpp file
Step 4.2.1: find the path of the text of reading, by FPlatformFileManager function management text also
Binding text;
Step 4.2.2: the data in text are cached by LoadFileToString function and are converted into character
String format;
Step 4.3: read text data
Step 4.3.1: read each data in a line;
Step 4.3.2: by Atof function, the data of reading are converted into the data type required for parameter, and are assigned to particle
The parameter received in system interface function;
Step 4.3.3: after having read a line, and then reads next line to the last a line;
Step 4.3.4: the final data read in complete text, it is achieved particIe system and the communication of external data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610541275.5A CN106201510B (en) | 2016-07-11 | 2016-07-11 | A kind of communication means of UE4 particIe system and external data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610541275.5A CN106201510B (en) | 2016-07-11 | 2016-07-11 | A kind of communication means of UE4 particIe system and external data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106201510A true CN106201510A (en) | 2016-12-07 |
CN106201510B CN106201510B (en) | 2019-03-01 |
Family
ID=57474137
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610541275.5A Active CN106201510B (en) | 2016-07-11 | 2016-07-11 | A kind of communication means of UE4 particIe system and external data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106201510B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108762617A (en) * | 2018-05-31 | 2018-11-06 | 苏州蜗牛数字科技股份有限公司 | UI interactive systems, method and storage medium in a kind of VR environment |
CN111930362A (en) * | 2020-07-23 | 2020-11-13 | 上海珀立信息科技有限公司 | Prefab development system and creation method based on UE4 platform |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104571993A (en) * | 2014-12-30 | 2015-04-29 | 北京像素软件科技股份有限公司 | Processing method of particle system, display card and mobile application platform |
CN105204988A (en) * | 2014-06-30 | 2015-12-30 | 北京安兔兔科技有限公司 | Testing method and system of electronic equipment game performance |
-
2016
- 2016-07-11 CN CN201610541275.5A patent/CN106201510B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105204988A (en) * | 2014-06-30 | 2015-12-30 | 北京安兔兔科技有限公司 | Testing method and system of electronic equipment game performance |
CN104571993A (en) * | 2014-12-30 | 2015-04-29 | 北京像素软件科技股份有限公司 | Processing method of particle system, display card and mobile application platform |
Non-Patent Citations (1)
Title |
---|
朱阅晗等: "基于虚幻4引擎的三维游戏开发实践", 《艺术科技》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108762617A (en) * | 2018-05-31 | 2018-11-06 | 苏州蜗牛数字科技股份有限公司 | UI interactive systems, method and storage medium in a kind of VR environment |
CN111930362A (en) * | 2020-07-23 | 2020-11-13 | 上海珀立信息科技有限公司 | Prefab development system and creation method based on UE4 platform |
Also Published As
Publication number | Publication date |
---|---|
CN106201510B (en) | 2019-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111815787B (en) | Petrochemical enterprise three-dimensional digital plan making system and method | |
CN109961495B (en) | VR editor and implementation method thereof | |
CA2721803C (en) | Composite assets for use in multiple simulation environments | |
CN104867176A (en) | Cryengine-based interactive virtual deduction system | |
WO2005119597A3 (en) | Terrain editor tool for rule-based procedural terrain generation | |
WO2005119598A3 (en) | Rule-based procedural terrain generation | |
CN107293182A (en) | A kind of vehicle teaching method, system and terminal device based on VR | |
CN106530400A (en) | Interactive virtual campus roaming system based on intelligent wearing device | |
CN107153744A (en) | Subsurface three-dimensional pipeline decision system | |
Song et al. | Virtual Reality (VR) technology and landscape architecture | |
CN106201510A (en) | A kind of UE4 particIe system and the communication means of external data | |
CN105512046B (en) | Android automated testing methods based on particle swarm optimization algorithm | |
CN102779215A (en) | Networked three-dimensional hoisting simulation method based on B/S (Browser/Server) framework and cache technology | |
CN117742677A (en) | XR engine low-code development platform | |
US20070159049A1 (en) | Method and system of rendering particle | |
CN110120165A (en) | Drilling well emergency drilling simulation system | |
CN105825024B (en) | A method of realizing coke-oven plant's blasting condensation workshop section cooperating type three-dimensional artificial | |
US7917535B1 (en) | Task membership and task masks | |
CN106846238A (en) | A kind of cross-platform automotive engine system of Elf3D | |
CN108921920B (en) | Method for manufacturing three-dimensional animation of hydroelectric engineering | |
CN111078782B (en) | Industrial big data visualization system and method | |
US11074740B2 (en) | Shader editing | |
CN110675509A (en) | Editable comprehensive simulation method and system based on three-dimensional modeling | |
Zhang et al. | Simulation of snow effects in visual simulation of virtual campus based on OSG | |
CN110555222B (en) | Three-dimensional visualization service platform-based method for rapidly constructing three-dimensional visualization application |
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 |