Jump to content
marki980908

How to spawn Big Smoke Pillars?

Recommended Posts

I was making a mission and I noticed that smoke from destroyed vehicles is completely different than the one you can spawn. I currently am using Zeus Enhanced. It has a module that allows you to use most if not all smoke from Arma FX wiki page. However compared to destroyed vehicle smoke it is almost nothing. Anyone got any ideas how to spawn smoke on the rigth?
adaasdasd.jpg
No. 1 Is the biggest smoke you can spawn in Zeus Enhanced.
No. 2 Is destroyed T-72 from RHS.
Is there a way to spawn smoke on the right on an objects like a smoke pillar?

Share this post


Link to post
Share on other sites
37 minutes ago, sarogahtyp said:

There is a way but maybe it is rocket science.

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

 

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

 

but there is an easy way as well:

 

 

Thanks, the easy way is the same size and Zeus Enhanced smoke, which is pretty damn small

I am trying to figure out the rocket science way, and it is difficult. If anyone got any examples that I could edit let me know etc

  • Like 1

Share this post


Link to post
Share on other sites

Using particle array one may spend hours shaping "the perfect smoke", tweaking and tweaking... Addicitve. Anyway, to get tall pillars one need to prolong particle's average life, so it may climb higher, before die, or to make it raise faster, but this may be not realistic. The longer each particle live, the longer it reduces available particles limit on screen. So especially with such tall smoke columns one need to be careful, or a single source of his smoke will eat whole particles limit. 

 

Maybe this will suffice:

 

in the init.sqf etc.:

 

RYD_SmokePillar = 
	{
	params ["_pos","_size","_life"];
	
	private _smoke = "#particlesource" createVehicle _pos;

	_smoke setParticleRandom [0.9 * _life, [2.5 * _size, 2.5 * _size, 0.1], [0.4, 0.4, 0.5], 0.5, 0.5 * _size, [0.05, 0.05, 0.05, 0.2],1,0.1 * _size,360];
	private _col = [[0,0,0,0.5],[0,0,0,0]];
	_smoke setParticleParams [["\a3\Data_f\ParticleEffects\Universal\Universal", 16, 7, 48,1],"", "Billboard", 1, 0.1 * _life, [0, 0, 0],[0,0,0], 1, 1.5, 1.275, 0.45, [5 * _size,25 * _size],_col,[0.5,0.15,0.1],1,0,"","",_smoke,0];	
	_smoke setDropInterval 0.2;
	
	_smoke
	};

 

Of course, it may be tweaked further to achieve better look.

 

Executing for example:

 

_smoke = [markerPos "m1",1.5,180] call RYD_SmokePillar;

 

params: [smoke position,size coefficient,maximal particle lifetime in seconds]

 

_smoke is the source object. Use deleteVehicle _smoke; to end the effect. 

 

If I'm not mistaken, with exemplary parameters used, the cost of this effect will be decent. Looks like this:

 

 

  • Like 2

Share this post


Link to post
Share on other sites


 

7 hours ago, sarogahtyp said:

 

 

but there is an easy way as well:

 

 

 

Yes, this is a very easy way to create a large smoke pillar.

 

smoke = createVehicle ['test_EmptyObjectForSmoke',getpos nameofyourpositionhere,[],0,'can_collide']; 

 

 

Share this post


Link to post
Share on other sites

The more smoke pillars, the less FPS... And, if you multiply smoke pillars, you divide them in height.( 4 pillars are 1/4 in height compared to a unique one).

Share this post


Link to post
Share on other sites
1 hour ago, stburr91 said:


 

 

Yes, this is a very easy way to create a large smoke pillar.

 

smoke = createVehicle ['test_EmptyObjectForSmoke',getpos nameofyourpositionhere,[],0,'can_collide']; 

 

 

Ye, but that one sucks and it is actually not that big

Share this post


Link to post
Share on other sites
3 minutes ago, pierremgi said:

The more smoke pillars, the less FPS... And, if you multiply smoke pillars, you divide them in height.( 4 pillars are 1/4 in height compared to a unique one).

Performance issues are not a problem to me. I want to build a scene of a wrecked plane. However Zeus Enhanced smoke looks weak. And the one from T72 Looks awesome and is maybe by magnetude of a 100x bigger, but I got no way to do it. (Well I might have now, I havent had time to test Rydygier's posted stuff yet

What I would do alternatively I would destroy a vehicle, and teleport it under the map to have smoke effect, but smoke from wrecks only lasts limited amount of time.

Share this post


Link to post
Share on other sites

What I'm using:

_byFire = 4;  // or what you want
_position =  <a position>; // what you want
_dir = < a direction>;  // set it to 0 or delete _dir references
for '_i' from 1 to _byFire do {
  uiSleep 0.5;
  _fire = createVehicle ['test_EmptyObjectForFireBig',(ASLToATL _position vectorAdd [sin _dir * random 0.2 *(_i-1),cos _dir * random 0.2 *(_i-1),random 0.4 *(_i-1)]),[],0,'can_collide'];
  uisleep 0.5;
  _smoke = createVehicle ['test_EmptyObjectForSmoke',getpos _fire,[],0,'can_collide'];
};

 

in blast & fire module

 

As said, pillar's height depends on the number of pillars. Probably due to rendering during frame... With just one pillar, you can't miss it!

Share this post


Link to post
Share on other sites
14 hours ago, pierremgi said:

Probably due to rendering during frame...

 

Yes, that effect looks quite dense, like lots of paticles, so a single pillar may exhaust big part of particles limit.

 

Had few moments and since I find this rather fun, made another variant, run with same parameters, as first one: _smoke = [markerPos "m1",1.5,180] call RYD_SmokePillar;  should be still pretty "cheap" as for particles limit used, ( (180/0.6)*0.75 = ~225) while looking a bit thicker:

 

RYD_SmokePillar = 
	{
	params ["_pos","_size","_life"];
	
	private _smoke = "#particlesource" createVehicle _pos;

	_smoke setParticleRandom [0.25 * _life, [2.5 * _size, 2.5 * _size, 0.1], [1, 1, 0.2], 0.5, 0.35 * _size, [0.05, 0.05, 0.05, 0.2],0.5,0.2 * _size,45];
	private _col = [[0,0,0,0.5],[0,0,0,0.75],[0,0,0,0.7],[0,0,0,0.65],[0,0,0,0.5],[0,0,0,0.35],[0,0,0,0.2],[0,0,0,0.05],[0,0,0,0.01],[0,0,0,0]];
	private _effect = ["\a3\Data_f\ParticleEffects\Universal\Universal", 16, 7, 48,1];//["\A3\data_f\ParticleEffects\Universal\Universal_02", 8, 0, 40,1];//
	_smoke setParticleParams [_effect,"", "Billboard", 1, 0.75 * _life, [0, 0, 0],[0,0,0], 1, 1.5, 1.275, 0.45, [8 * _size,16 * _size],_col,[0.5,0.1,0.05],1,0.3,"","",_smoke,0];	
	_smoke setDropInterval 0.6;

	_smoke
	};

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

I think I am doing something wrong, I put the code into the init and executing _smoke= thingy in execute module and object init and none of them seem to work. Am I high or smth?

Share this post


Link to post
Share on other sites
2 hours ago, marki980908 said:

I think I am doing something wrong, I put the code into the init and executing _smoke= thingy in execute module and object init and none of them seem to work. Am I high or smth?

 

The code posted by Rydygier will spawn the smoke at the position of a map marker named "m1". 

 

Did you place a map marker named "m1"?

Share this post


Link to post
Share on other sites
9 minutes ago, stburr91 said:

 

The code posted by Rydygier will spawn the smoke at the position of a map marker named "m1". 

 

Did you place a map marker named "m1"?

I am an idiot, I placed an object named m1

Share this post


Link to post
Share on other sites

I am sorry for being an idiot again, but 

deleteVehicle _smoke;

doesnt seem to be working, no matter how I execute it

Share this post


Link to post
Share on other sites

Depending, how/where you do it, it may not work, since _smoke is _local _var. Try instead run the code with global var, if you wish to delete it from other places, for example:

 

smoke_1 = [markerPos "m1",1.5,180] call RYD_SmokePillar;

 

then to delete:

 

deleteVehicle smoke_1;

  • Like 2

Share this post


Link to post
Share on other sites
30 minutes ago, Rydygier said:

Depending, how/where you do it, it may not work, since _smoke is _local _var. Try instead run the code with global var, if you wish to delete it from other places, for example:

 

smoke_1 = [markerPos "m1",1.5,180] call RYD_SmokePillar;

 

then to delete:

 

deleteVehicle smoke_1;

I executed smoke using global and tried deleting it using global

Share this post


Link to post
Share on other sites

OK then, here's an example, how I do it. Compare with your way for differences. If still no luck, I can look at vanilla repro mission, if you provide one...

 

 

Share this post


Link to post
Share on other sites
22 minutes ago, Rydygier said:

OK then, here's an example, how I do it. Compare with your way for differences. If still no luck, I can look at vanilla repro mission, if you provide one...

 

 

I will try, will this work in multiplayer enviroment, seeing that this is local execute?

Share this post


Link to post
Share on other sites

Not sure about multiplayer. I'm SP guy mostly. However, if you spawn the smoke and delete it from the same machine, say a server, it should work same, as in SP, at least I guess so. Otherwise smoke_1 variable may need publicVariable. Others may be more knowledgeable/helpful than me regarding particles in MP. 

Share this post


Link to post
Share on other sites
2 minutes ago, Rydygier said:

Not sure about multiplayer. I'm SP guy mostly. However, if you spawn the smoke and delete it from the same machine, say a server, it should work same, as in SP, at least I guess so. Otherwise smoke_1 variable may need publicVariable. Others may be more knowledgeable/helpful than me regarding particles in MP. 

Fair enough I will test it with one of the members

Share this post


Link to post
Share on other sites

it has to be broadcasted to each client in multiplayer. dedicated Server does not need to execute it, machines with display have to.

JIP is also a thing here.

  • Like 1

Share this post


Link to post
Share on other sites

For MP:

I decided to create an object with createVehicle (so global) from a local PC (client) "test_EmptyObjectForFireBig"  .

This object is visible everywhere, and as BIKI says: it creates additional emitters, which are stored in "effects" variable on the object. Since Arma 3 v1.71 these emitters are automatically deleted when object is deleted

The object is global, emitters also. There is no problem for deleting all the stuff. Furthermore, as I said, there is a kind of "auto-regulation" for the rendering (probably engine limitation for the number of emitters when I create several big fires simultaneously. Smokes can even all disappear and you can see only fires in extreme case).

 

Spoiler

 

As test, I'm running in console:
[count allMissionObjects "test_EmptyObjectForBubbles", count ((allMissionObjects "test_EmptyObjectForBubbles") select {local _x})]

"test_EmptyObjectForBubbles" is the parent class for both fire and smoke test objects.

 

 

I can have 4 or 500 emitters on multiple fires coming from clients, without severe performance drop, not saying it's the best solution.

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

×