Jump to content
.kju

Arma 3 Particle Effects documentation

Recommended Posts

Nice one thanks :) I see a couple of things I would like clarifying by BIS if possible :) (and a couple of minor documentation mistakes....)

Regarding complex effects:

class Example
{
   simulation = "particles";   //type of simulation - particles or light
   type = "Default";           //name of PE's class defined in CfgCloudlets or light's class defined in CfgLights
   position[] = {0, 0, 0};     //position related to the default position or memorypoint
   lifeTime = 0.05;            //life time of emitter

   qualityLevel = -1;          //effect is used when the particle quality option is -> -1 everytime, 0 low, 1 normal, 2 high
   start = 1;                  //is used only if the lifeTime parameter is defined, if value is changed from negative to positive then the effect is triggered
   enabled = 1;                //1 effect is enabled, -1 effect is disabled
};

I think I'm right in thinking they can be more complex by compounding them:

class complexEffect
{
class subEffect1
{
	simulation = "particles";   //type of simulation - particles or light
	type = "Default";           //name of PE's class defined in CfgCloudlets or light's class defined in CfgLights
	position[] = {0, 0, 0};     //position related to the default position or memorypoint
	lifeTime = 0.05;            //life time of emitter

	qualityLevel = -1;          //effect is used when the particle quality option is -> -1 everytime, 0 low, 1 normal, 2 high
	start = 1;                  //is used only if the lifeTime parameter is defined, if value is changed from negative to positive then the effect is triggered
	enabled = 1;                //1 effect is enabled, -1 effect is disabled
};
class subEffect2
{
	simulation = "particles";   //type of simulation - particles or light
	type = "Default";           //name of PE's class defined in CfgCloudlets or light's class defined in CfgLights
	position[] = {0, 0, 0};     //position related to the default position or memorypoint
	lifeTime = 0.05;            //life time of emitter

	qualityLevel = -1;          //effect is used when the particle quality option is -> -1 everytime, 0 low, 1 normal, 2 high
	start = 1;                  //is used only if the lifeTime parameter is defined, if value is changed from negative to positive then the effect is triggered
	enabled = 1;                //1 effect is enabled, -1 effect is disabled
};
};

yes?

Also, and I know I'm not the only one for more info on this... ;) the relationship between weight and volume. And the relationship between weight, volume, rotation & rubbing, and possibly other types of movement (like initial velocity etc).

Edited by DMarkwick

Share this post


Link to post
Share on other sites

Regarding complex effects - that's right. There can be more subEffect classes in a complexEffect class.

Speed of rotation depends on:

- initial rotation speed (parameters rotationVelocity and rotationVelocityVar)

- parameter rubbing (rotation is slowed more with bigger value of rubbing)

- weight (rotation is slowed less with bigger value of weight)

Speed and direction of movement depends on:

- initial speed of movement (parameters moveVelocity, moveVelocityVar and moveVelocityVarConst)

- wind/air friction (particle is more affected with bigger rubbing value, particle is less affected with bigger weight value)

- buoyancy (ratio between density of air and particle - density of particle = weight / volume)

- randomDirection parameters (randomDirectionPeriod, randomDirectionPeriodVar, randomDirectionIntensity and randomDirectionIntensityVar)

- collisions

Edited by DarkDruid
  • Like 1

Share this post


Link to post
Share on other sites

Nice one DD thanks :)

I'm seeing some amount of limitation in the relationship between weight, volume, rubbing and velocity. If I try and fiddle an extremely fast initial movement to a very "light" particle (with neutral buoyancy) and have a high rubbing, instead of a fast whoosh and a sudden stop I get no movement at all (until the wind picks it up).

I can get some sort of fast movement with sudden stop, but nothing like what I'm after, there seems to be some sort of cutoff for the relationships between them all. I'm talking like 400m velocity, 0.1275 weight, 0.1 volume (neutral buoyancy), rubbing 0.8.

For information, I'm trying to get (via a script) a cloud of particles to suddenly "poof" out from a central position to an expanded cloud, like a large explosion, but I don't want the particles to all fly away, I'd like them to stay cohesive. So I need a whoosh-stop activity :) and I just cannot get one as fast as I'm trying to.

In fact if I randomise 100 particles' velocities I can see a visual representation of this cutoff - some particles fly out to a position around the center (to form a sort of "shell") while others cluster in the middle. Weird.

*edit*

Actually, in practice I reckon the high amount of rubbing necessary would make these particle clouds too sensitive to the wind. For good explosion clouds, I need to have a sudden poof of particles, which are quite "solid". My current method is to just spawn these particles in place so that the whole cloud just appears suddenly, which looks OK for grenade-sized explosions but looks a little odd for larger explosions. Still, the above problem is rather odd :)

Edited by DMarkwick

Share this post


Link to post
Share on other sites

We know about some problems with very fast particles and this seems like some bug in the simulation. It has been reported to programmers but it is low priority issue right now. Unfortunately I'm not able to tell you anything more specific about it at this moment.

Share this post


Link to post
Share on other sites

Hey DarkDruid, im trying to create certain particle effects and apparently there is this issue where the particles wont be displayed when the center of a particle is not in within the field of view.

I am using huge (basic shape) particles, with their center way below the groundlevel (-40m) and only the tip of it over the ground level, and therefore the particles flicker or disappear a lot, which i would like to avoid!

Can you tell me if there will be any way to force render the particles, wether they are within the fov or not?

Share this post


Link to post
Share on other sites
Hey DarkDruid, im trying to create certain particle effects and apparently there is this issue where the particles wont be displayed when the center of a particle is not in within the field of view.

I am using huge (basic shape) particles, with their center way below the groundlevel (-40m) and only the tip of it over the ground level, and therefore the particles flicker or disappear a lot, which i would like to avoid!

Can you tell me if there will be any way to force render the particles, wether they are within the fov or not?

There are a few issues similar to this with particles that I would like to see fixed: the other major one as far as I'm concerned is in my sig. Particle scaling breaks down when either the particle is too near or too big. However as they (including your problem) represent optimisations in the engine suitable for default game particles, I don't suppose they will be changed.

Share this post


Link to post
Share on other sites

in this page: http://community.bistudio.com/wiki/Arma_3_Particle_Effects:_Config_Parameters, I have troubles with some points:

1) Where and how are the variables damage, acceleration ect. defined?

2) What mathematical operators can we apply to them in the config (to define values for the parameter array in CfgCloudets for instance)? For instance I tried using floor, but it seems that it doesn't work. Can we use only + - and /?

edit: We had some communication issue in my modding team :). So the third question I had is also asked here: http://forums.bistudio.com/showthread.php?156863-Dust-and-water-effect-on-vehicles-%28planes-boats%29. Sorry for the mess.

3) To make water effects under a plane, I put in the config:

memoryPointsLeftWaterEffect = "waterEffectL";
memoryPointsRightWaterEffect = "waterEffectR";
leftFastWaterEffect = "MyLWaterEffects";
rightFastWaterEffect = "MyRWaterEffects";

I tried various things, but I can't manage to make the effect appear this way (there is no problem with the effect in itself since I can make it appear if I define it as an "exhaust fume" ).

Is it broken at the moment? (I did put the memory points in my model)

Edited by super-truite

Share this post


Link to post
Share on other sites

An other question about particles:

why is there often more than one array in the color parameter line? Like this for instance:

color[] = {{ 1,1,1,0.28 },{ 1,1,1,0.3 },{ 1,1,1,0.35 },	{ 1,1,1,0.22 },{ 1,1,1,0.13 },	{ 1,1,1,0.02 }};

Share this post


Link to post
Share on other sites
1) Where and how are the variables damage, acceleration ect. defined?

They are defined directly in the engine.

2) What mathematical operators can we apply to them in the config (to define values for the parameter array in CfgCloudets for instance)? For instance I tried using floor, but it seems that it doesn't work. Can we use only + - and /?

I will add it into the documentation soon. There is a list:

 x / y
x * y
x + y
x - y
x min y
x max y
x factor [p,q]
x interpolate [p,q,r,s]
randomGen

why is there often more than one array in the color parameter line? Like this for instance:

color[] = {{ 1,1,1,0.28 },{ 1,1,1,0.3 },{ 1,1,1,0.35 },	{ 1,1,1,0.22 },{ 1,1,1,0.13 },	{ 1,1,1,0.02 }};

That defines color of a particle during its life. You can create red particle at the start and change the color to green at the end. You can change the size of particle the same way.

Share this post


Link to post
Share on other sites

Thanks, I guess there is no way to define more complex operators? The issue I am facing is that I want to make particle effects that evolve in a complex way with some parameters like speed, acceleration, height ect. and I would need for instance to define the interval between two emission or the color as a conditional function of all those parameters. I guess I'll have to do it with scripts, but I am a bit worried about performances since I get, let's say a bit "enthusiasatic", when I add particle effects :).

Also, I am planning to make a little interface to adjust the various parameters and see in real time the resulting particle effect, to make the tweaking of the parameters easier. Is it useful or will you release such a tool in the future?

Share this post


Link to post
Share on other sites
Thanks, I guess there is no way to define more complex operators? The issue I am facing is that I want to make particle effects that evolve in a complex way with some parameters like speed, acceleration, height ect. and I would need for instance to define the interval between two emission or the color as a conditional function of all those parameters. I guess I'll have to do it with scripts, but I am a bit worried about performances since I get, let's say a bit "enthusiasatic", when I add particle effects :).

We don't have more complex operators in our plans right now. But if you want something more complex, you can create a feature request via Feedback Tracker. Anyway, you should be able to change the color with current operators relatively easily. Interval between two emissions is tricky because it is usualy defined in the engine in our effects.

Also, I am planning to make a little interface to adjust the various parameters and see in real time the resulting particle effect, to make the tweaking of the parameters easier. Is it useful or will you release such a tool in the future?

There is particle editor for scripted effects for A2 somewhere on Armaholic.com. You can use it, transfer into A3 is simple. We won't probably release anything like this because community already did that. But there is no possibillity to change the parameters of a config-defined effect in real time. So I'm afraid you won't be able to create real time editor for config-defined effects.

Share this post


Link to post
Share on other sites
We don't have more complex operators in our plans right now. But if you want something more complex, you can create a feature request via Feedback Tracker. Anyway, you should be able to change the color with current operators relatively easily. Interval between two emissions is tricky because it is usualy defined in the engine in our effects.

Ok thanks, If I end up needing something that I judge interesting and that can't be done with the operators you mentioned I'll create a request in the Feedback Tracker.

There is particle editor for scripted effects for A2 somewhere on Armaholic.com. You can use it, transfer into A3 is simple. We won't probably release anything like this because community already did that. But there is no possibillity to change the parameters of a config-defined effect in real time. So I'm afraid you won't be able to create real time editor for config-defined effects.

cool, I'll look into that. I know that I can't change in real time the config parameters, but I can still make a tool to translate the script particle arrays directly into config syntax and that copy it to clipboard.

Share this post


Link to post
Share on other sites

Yes, .kju, it is the one I was considering to port to arma 3 (the only one I found for arma 2 was an executable allowing to modify the arrays and save them, but not showing the particle effects).

I made a little mission with it. It is still buggy since I didn't change some stuff that are arma 1 related yet, but it is already so much a time savior for me that I thought it would be useful to share it already:

http://forums.bistudio.com/showthread.php?157226-Particle-Editor&p=2419388#post2419388

For the moment, I just included all the .p3d present in the data_f/particleEfffect.pbo and you can copy/paste the particle parameters only in script syntax (I'll make the export to config syntax option later if I have time).

The way it works is pretty self explanatory and everything you need is in the user actions menu, but some parameters are not named like in the pardocumentation about particles yet.

The creator of the tool seems to not be active anymore so I don't know what to do if I were to release "officially" an updated version...Is it enough to just show the credits and who wrote each parts of the code?

An other curiosity question about particles: Since the smoke pass through walls in the game, I guess the particles used have no geometry LOD. Why is that and wouldn't it solve this problem if they had one?

Edited by super-truite

Share this post


Link to post
Share on other sites

im guessing they don't have any geometry LOD because they are simple 2d images, which are projected in a 3d environment to always be facing you. they aren't an actual models. just an overlayed image. that's my understanding.

its kinda like goings here is a picture of this dude, make him work properly

lemmy_arma2copy.jpg

the image doesn't function on its own you need a model.

Share this post


Link to post
Share on other sites
The creator of the tool seems to not be active anymore so I don't know what to do if I were to release "officially" an updated version...Is it enough to just show the credits and who wrote each parts of the code?

I think that should be enough. :)

An other curiosity question about particles: Since the smoke pass through walls in the game, I guess the particles used have no geometry LOD. Why is that and wouldn't it solve this problem if they had one?

Ylguf is right.

Our current particle system is not able to compute collisions between particles and objects. Particle collisions would have huge impact on performance, that's the reason. There are only collisions between particles and the ground available at this moment.

Share this post


Link to post
Share on other sites

There are going to be new parameters in scripted particle effects. It's just support of parameters which are a part of config defined particle effects for some time. You should be able to use them from next (it doesn't work right now!) dev update (probably monday).

New parameters for command setParticleParams documented on ParticleArray page:

- angle (it's in the game for a long time, but it wasn't documented before)

- onSurface

- bounceOnSurface

New parameter for command setParticleRandom:

- bounceOnSurface

Edited by DarkDruid

Share this post


Link to post
Share on other sites

Some more questions:

-How can we use the new scripting command SetParticleClass to use config defined effects? I didn't manage to make a particle effect appear in game with this

-I often have some issues with locality in MP, when I use particles. It seems that particles created via a script are local to the computer running the code while light is transferred to the other computers. Is that correct?

So If I were to create a meteor fall, I would have to create the object falling and the light effect on one computer (the position of the object and the light is broadcasted to the other computers) and I would have to create the particle effects on each computers.

To do so I use spawn BIS_fnc_MP to execute a particle effect script everywhere. For some reason it does not work and the weird part is that I yet see the particle effect on several meteors, but not all (see screenshots)... What am I missing?

In SP:

http://i.imgur.com/ZLD6Jvr.jpg

In MP with the same code:

http://i.imgur.com/VyvUIL3.jpg

Share this post


Link to post
Share on other sites

do you have any Random calculations ?

these must be done in one place and the results broadcast or (random 10 ) -5 might be 5 on your pc and -3 on mine

just a thought

Share this post


Link to post
Share on other sites
do you have any Random calculations ?

these must be done in one place and the results broadcast or (random 10 ) -5 might be 5 on your pc and -3 on mine

just a thought

Yes I have some random calculations for the position of the meteors, but they are done only server side. On each clients, the meteor impacts are at the same spot (The meteors are there, it is only the particle effects that do not show up).

Share this post


Link to post
Share on other sites

strange

maybe run a test and use the ontimer bit of the particle to position yourself where the effects should be maybe make sure there not somewhere else like [0,0,0]

i am not so good on the whole locality thing myself its a crazy situation thats why i remain SP 99.9% of my OFP life :)

only real thing beyond that is maybe BIS reduced number of particles allowed in MP or there is a server setting etc who knows could even be a server setting on particle quality the possibiulities are endless

personally i would make the meteor plane class ands setdammage 1 , this sstops need for scripts and you even get a nice crater on impact for free ;)

Share this post


Link to post
Share on other sites

Yes, I was going to go fully config anyway (to have a nice meteor model on top of liberating me from MP scripting issues), but I will need this kind of scripts later for something else which I don't want to do with a mod...

Anyway, I would like to understand this better as it is either a particle limitation in MP as you suggested or me doing again something stupid with MP scripting!

EDIT: If I put the meteor starting point closer, All the particle effects show up! There must be a sort of bug or limitation forbidding particles too far from the player in MP. This is an issue when the particle source is moving and come closer to the player. An easy way out is to trigger the particle effect only when the moving object is close to the player.

Edited by super-truite

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×