Jump to content
.kju

Arma 3 Particle Effects documentation

Recommended Posts

ah right

this could be multitude of things again maybe object draw distance , geoetry of object is not drwan on any object when 50 meters or something silly from a player ( so if your using a selection position as an attch point this may effect etc).

i prefer your own point that limitation of particles created at distance but then again clouds render their particles and fires quite away ? or are the furher clouds actual object planes of a different source maybe ?

Share this post


Link to post
Share on other sites

Concerning clouds, there must be a subtle transition between 2D and volumetric clouds when you go closer. Also it is probably defined at the config level, which might not share the same limitations as scripted particle effects.

My meteor fall works now (I trigger the particle effect on each client that is close enough to the meteor). But I have another strange issue: after a while, the server seems to be overwhelmed and does not broadcast the position of each meteors. This results client side in fixed meteors... This is funny because I delete every objects or particle effects created after a while and the effort made by the server should not increase like that...This has probably nothing to do with particles though.

If you have time DarkDruid, could you comment on this difference between MP and SP scripted particle effects and also explain how to use setparticleclass?

PS: for those who want the meteors: http://www.mediafire.com/?q28zq4s7f91r928

Edited by super-truite

Share this post


Link to post
Share on other sites
-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

You need to use particle effect which doesn't use any engine-based parameters (list of these parameters). These parameters are not defined in your script. For example try to use "ObjectDestructionFire1Smallx" (there is more about it), it should work fine in your script.

-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?

Particle emitter object is created globally (if you use createVehicle command), but script commands related to particles (setParticleClass, setParticleParams etc.) work only on local computer.

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.

Yes, this is correct.

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!

Limits for particles are the same for MP and SP.

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.

Issue is in using of setParticleParams command for attaching particles to a meteor object. Particle emitter stays on its original place where it was created, only particles are teleported on position of the meteor object. Particles in your mission are not created because the emitter is too far from player and engine doesn't simulate it. If you move the meteor starting point closer to the player, then the emitter is close enough and it is simulated. It should be working same way in SP and MP.

Simple solution is creating of particle emitter on position of player. This should work even if you don't move the meteor starting point close enough to the player:

//Smoke
_ps1 = "#particlesource" createVehicleLocal getpos player;
_ps1 setParticleCircle [0, [0, 0, 0]];
_ps1 setParticleRandom [5, [0.1, 0.1, 0], [0.2, 0.2, 0.5], 0.3, 0.25, [0, 0, 0, 0.1], 0, 0];
_ps1 setParticleParams [["\A3\data_f\ParticleEffects\Universal\Universal", 16, 12, 8,0], "", "Billboard", 1, 10, [0, 0, 0], [0, 0, 0.5], 0, 10.1, 7.9, 0.01, [4, 5, 6], [[0,0,0,0.7], [0,0,0,0.4], [0,0,0,0.2],[0,0,0,0.1]], [0.125], 1, 0, "", "", _object];
_ps1 setDropInterval 0.01;

but then again clouds render their particles and fires quite away ?

Clouds are not particles and fires use bigger particles. Small particles are cut sooner than bigger particles.

Edited by DarkDruid
Typo.

Share this post


Link to post
Share on other sites

Thanks a lot for all the clarifications. The fact that I saw a difference between MP and SP is still strange though... It could be because of the different video settings I was using on the server and on my personal computer but since the clients are supposed to generate their own particles, this is still fishy...

EDIT: "repaired" meteor fall: http://www.mediafire.com/?q28zq4s7f91r928

REEDIT: fully MPcompatible version (the second problem I had was due to a bad use of BIS_spawn_MP): http://www.mediafire.com/?q28zq4s7f91r928

Edited by super-truite

Share this post


Link to post
Share on other sites

I experimented with some of the new variables for Particle configs, and the explosion ones seem to not be working, specifically the projectile velocity ones. They seem to return 0 always. Are these implemented? I really want awesome airbursting rounds that take the velocity vector into account in spawning particles and this is something I suggested be implemented years ago to Dwarden. Hope to see them fully working soon!

Also, if you guys want to be REALLY awesome you could allow function call backs in the configs... ;) (I am in no way secretly trying to get a hacky version of ammo event handlers in, nope, no way... haha).

Share this post


Link to post
Share on other sites

Thanks for all the documentation DarkDruid. Could a moderator put this in the sticky threads?

On top of the links to the documentation, there are some useful informations for particle effects edition.

Share this post


Link to post
Share on other sites

New particle related features added/documented:

  • Now you can use a script command setParticleFire to let particles harm units around by fire. This feature was accessible only in config-defined particle effects so far.
  • There are new parameters available in ParticleArray, which is used by script commands setParticleParams and drop. New parameters are OnSurface, BounceOnSurface, EmissiveColor. OnSurface and BounceOnSurface were documented some time ago, I'm just not sure if it was announced.
  • There is a new parameter emissiveColor in config-defined particle effects. Now you can let particles glow at night even with no light source around.
  • Particle effects in distance are optimized by engine (size and emitter's interval). Now you can change this behaviour directly for every effect. There are new parameters and also an explanation.

Share this post


Link to post
Share on other sites

Overriding the optimization is really helpful stuff, thanks!

Also I still owe you a ticket for something related to a vector rotations for particles relating to inDir. I'll try and get around to that soon (as I am sure you are just dying to get on that haha).

Share this post


Link to post
Share on other sites

Would it be possible to get a damage parameter for particles? Incase people want to use them like shrapnel.

Share this post


Link to post
Share on other sites
Would it be possible to get a damage parameter for particles? Incase people want to use them like shrapnel.

That would kill performance. A native fragmentation system should be done on its own, not hacked into something like the particle system.

Share this post


Link to post
Share on other sites
That would kill performance. A native fragmentation system should be done on its own, not hacked into something like the particle system.

You are right about that, but it definitely kills immersion when you see a large chunk of something fly into/onto a soldier and just bounce off.

Share this post


Link to post
Share on other sites

As regards the limit of displayed at once particles, what exactly is its value/number?

Share this post


Link to post
Share on other sites
Can somebody tell me which effect is this? > http://i.imgur.com/wtnf8oV.jpg

i need that effect name or number , since i cant find it :/

The way to select a given particle in such a particle texture table is explained here:

https://community.bistudio.com/wiki/ParticleArray

From what I remember:

To isolate the particle you want, you need to specify the entries: File,Ntieth,Index,Count and Animspeed, in the particle array. You need also to specify of course the other parameters, but those are the crucial ones.

-In your case, the filename is probably: "\Ca\Data\ParticleEffects\Universal\Universal_ca" (sorry I don't have arma 3 on this computer so I cannot check if it's the right file path)

-Ntieth: number specifying the tiling of the texture (for instance, if there are 16x16 different elements in the texture files, Nieth=16; if 8x8, Nieth=8 ect.)

-Index: the row number of your particle (starts at 0).

-count: number of frames to play (usefull when you want some randomness and you have several similar particles in a row, but in your case you probably want to isolate just one, so count=1).

-animspeed: time interval between the different frames chosen with "count". In your case, you need then to put a large number (above the lifetime of the particle).

Share this post


Link to post
Share on other sites
As regards the limit of displayed at once particles, what exactly is its value/number?

  • 9 000 particles for low particle settings in video options
  • 12 000 particles for medium particle settings in video options
  • 15 000 particles for high particle settings in video options

-count: number of frames to play (usefull when you want some randomness and you have several similar particles in a row, but in your case you probably want to isolate just one, so count=1).

-animspeed: time interval between the different frames chosen with "count". In your case, you need then to put a large number (above the lifetime of the particle).

For a frame which is not the first one in a row you need to set count equal to the position of that frame in the row. It is 11 in this case. Then set loop parameter to 0 and animSpeed to some very high value (for example 1000). If you do this, animation will be played only once and after that it stops on the last frame of animation, which is your desired frame. With that high value of animSpeed you won't see any animation at all.

Edited by DarkDruid
Wrong number for low particle settings.

Share this post


Link to post
Share on other sites

Thanks, DarkDruid. My guess based on observations was close. :)

Share this post


Link to post
Share on other sites

Part of today's dev branch update are new particle modules. There is smoke, fire and plankton so far. These modules should help you to put some effects in your mission with none or very small knowledge of scripting or particle effects. It should be quick and simple now.

You can find them in Editor > Modules (F7) > Category: Effects.

  • Plankton - This module has no parameters. You just need to place it anywhere on map and plankton effect will be created around player when he goes under water.
  • Fire - There is a series of various parameters. You can set color, size, direction and even damage given to unit by fire. The effect is created on module's position.
  • Smoke - There is also a series of various parameters. You can set color, size, speed and some other parameters. The effect is also created on module's position.

These modules allows you to set only some parameters of particle effect. Some others are predefined and you can't change them. This basically means that using of particle modules should be faster and easier for user, but there is not so many possibilities as in your own particle effect created directly by scripting or in config.

Bug reports or any other feedback will be appreciated. But keep in mind, that there are technical limitations given by modules which can't be just simply changed only for particles and that we want to keep particle modules relatively simple (user-friendly). We don't want to create some very complicated monster with all parameters available in scripts/configs.

Edited by DarkDruid

Share this post


Link to post
Share on other sites

From today's dev branch changelog:

  • Fixed: setParticleParams updates existing values

This change allows you to use parameters available only in configs even in scripted particle effects. How to do it?

  1. Create particle emitter.
  2. Apply command setParticleClass on it.
  3. Apply command setParticleParams on it.

All parameters set by config class which are not present in particle array (applied by setParticleParams) stays the same. For example you can set destruction of particles on water surface via config class and then dynamically change size of these particles via script command setParticleParams.

Example:

_emitter1 setParticleClass "PointBubbles1";
_emitter1 setParticleParams [["\A3\data_f\ParticleEffects\Universal\Universal",16,13,7,0], "", "Billboard", 1, 60, [0, 0, 0], [0, 0, 0.3], 0, 1.2, 1, 0, [0.06],[[1,1,1,-2]], [1000], 0.12, 0.06, "", "", ""];
_emitter1 setDropInterval 1;

This creates underwater bubbles which will be destroyed on the water surface. Destruction on water surface is defined in config class PointBubbles1.

Edited by DarkDruid

Share this post


Link to post
Share on other sites

Thanks for the update there DarkDruid - Interesting to know.

Sounds like we can set the bare bones of the effect and then modify in game to suit needs. Will be checking this out when I get home.

Share this post


Link to post
Share on other sites

Would love to get some commands that allow to spawn instances of particle effect emitters as if they were being spawned by explosions, muzzles, etc. It'd be really helpful in more quickly building new effects since it wouldn't require a game restart (I know in the dev version you can recompile the configs, which is nice, and we used to have that in A2 at least for a couple weeks in one of the betas).

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

×