Home   Help Search Login Register  

Author Topic: Recreating the Arma fire/smoke effect in Arma2  (Read 6435 times)

0 Members and 1 Guest are viewing this topic.

Offline zonker3210

  • Members
  • *
Recreating the Arma fire/smoke effect in Arma2
« on: 26 Jan 2010, 05:49:31 »

Hi, I'm hoping someone can point me in the right direction here. In Arma, I was able to use the following script to create the fire & smoke effect at a wrecked vehicle...

Code: [Select]
_PS1 = "#particlesource" createVehicleLocal getpos myHelo;
_PS1 setParticleCircle [0, [0, 0, 0]];
_PS1 setParticleRandom [0.2, [1, 1, 0], [0.5, 0.5, 0], 1, 0.5, [0, 0, 0, 0], 0, 0];
_PS1 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 2, 6], "", "Billboard", 1, 1, [0, 0, 0], [0, 0, 0.5], 1, 1, 0.9, 0.3, [1.5], [[1, 0.7, 0.7, 0.5]], [1], 0, 0, "", "", myHelo];
_PS1 setDropInterval 0.03;

_PS2 = "#particlesource" createVehicleLocal getpos myHelo;
_PS2 setParticleCircle [0, [0, 0, 0]];
_PS2 setParticleRandom [0, [0, 0, 0], [0.33, 0.33, 0], 0, 0.25, [0.05, 0.05, 0.05, 0.05], 0, 0];
_PS2 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 0, 1], "", "Billboard", 1, 10, [0, 0, 0.5], [0, 0, 2.9], 1, 1.275, 1, 0.066, [4, 5, 10, 10], [[0.3, 0.3, 0.3, 0.33], [0.4, 0.4, 0.4, 0.33], [0.2, 0.2, 0, 0]], [0, 1], 1, 0, "", "", myHelo];
_PS2 setDropInterval 0.5;

_PS3 = "#particlesource" createVehicleLocal getpos myHelo;
_PS3 setParticleCircle [0, [0, 0, 0]];
_PS3 setParticleRandom [0, [0, 0, 0], [0.5, 0.5, 0], 0, 0.25, [0.05, 0.05, 0.05, 0.05], 0, 0];
_PS3 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 3, 1], "", "Billboard", 1, 15, [0, 0, 0.5], [0, 0, 2.9], 1, 1.275, 1, 0.066, [4, 5, 10, 10], [[0.1, 0.1, 0.1, 0.75], [0.4, 0.4, 0.4, 0.5], [1, 1, 1, 0.2]], [0], 1, 0, "", "", myHelo];
_PS3 setDropInterval 0.25;

Unfortunately, it's not working in Arma2. The first time I run the script in a mission, I get a message about "\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d" not found or something. After that, it doesn't do anything but the Arma2.rpt file has a lot of entries like the following...

Code: [Select]
Error: Model ca\data\particleeffects\fireandsmokeanim\smokeanim.p3d cannot be used as a sprite - it has not just one LOD level
Any ideas as to what I'm doing wrong? Perhaps there is a resource for Arma2 similar to this one: http://community.bistudio.com/wiki/ParticleTemplates#BIS_Burning_Vehicle_Fire_Look-Alike

...but if so, I haven't found it yet. Any constructive suggestions would be greatly appreciated.

Thanks!
 - z

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Recreating the Arma fire/smoke effect in Arma2
« Reply #1 on: 26 Jan 2010, 06:16:11 »
It is correct 'ca\data\particleeffects\fireandsmokeanim\smokeanim.p3d' does not exist in ArmA2.

ArmA1 does have this file though.


Planck

I know a little about a lot, and a lot about a little.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Recreating the Arma fire/smoke effect in Arma2
« Reply #2 on: 26 Jan 2010, 12:20:17 »
Change
Code: [Select]
["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 2, 6] to for example
Code: [Select]
["\Ca\Data\ParticleEffects\Universal\Universal.p3d", 16, 3, 80] or
Code: [Select]
["\Ca\Data\ParticleEffects\Universal\Universal.p3d", 16, 1, 32] That should give you the round flame particle.


Code: [Select]
["\Ca\Data\ParticleEffects\Universal\Universal.p3d", 16, 10, 32] should give you the BIS own destroyed vehicle fire looking particle..
« Last Edit: 26 Jan 2010, 12:23:54 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Onkel Bo

  • hardboiled sissy
  • Members
  • *
    • combinedarms.de
Re: Recreating the Arma fire/smoke effect in Arma2
« Reply #3 on: 26 Jan 2010, 13:59:15 »
maybe this could help;


Code: [Select]
BIS_Effects_Burn=compile preprocessFile "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn .sqf";

 handle=[unit,intensity,time,lifecheck,fade] spawn BIS_Effects_Burn

How to use:

unit: the name of the object that the fire will be attached to

intensity: the intensity of the fire. recommended to use values between
0.7 and 10, higher values may be used if desired though. (0.7-4 is smoke only)

time: the time that the fire started. use global variable "time". this is used to keep effects synced for JIP players

lifecheck: if this is true then the unit will only burn as long as it is dead (!alive unit). set to false to burn things like buildings

fade: if true then the fire will die down over time, eventually dying
out. set to false if you want it to keep burning.

e.g.

make a gamelogic named "firepos", burn forever with a big fire:
i=[firepos,10,time,false,false] spawn BIS_Effects_Burn

Offline zonker3210

  • Members
  • *
Re: Recreating the Arma fire/smoke effect in Arma2
« Reply #4 on: 27 Jan 2010, 00:43:54 »

Thank you, h- and Onkel Bo, for the excellent suggestions!

---------------------------------------

@h- : the BI wiki contains two very handy references for creating the Arma particles...

http://community.bistudio.com/wiki/ArmA:_ParticleShape

and

http://community.bistudio.com/wiki/Image:Particles.jpg

Are you aware of some similar reference(s) for Arma2 particles? I'm curious as to how you know the appropriate settings/info for "\Ca\Data\ParticleEffects\Universal\Universal.p3d".

---------------------------------------

@Onkel Bo : That BIS script is the perfect fit for my needs.

---------------------------------------

Thanks you both once again for the assistance!
 - z

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Recreating the Arma fire/smoke effect in Arma2
« Reply #5 on: 27 Jan 2010, 08:37:45 »
Quote
I'm curious as to how you know the appropriate settings/info for "\Ca\Data\ParticleEffects\Universal\Universal.p3d".
There is a texture file in Arma2\AddOns\Ca\Data\ParticleEffects\Universal\data\universal.paa which contains all the particles used by that particle type.

The particles are set there like in the image you linked, in rows. It is similar to that image but there are lot's more frames per particle in Arma 2. I've attached the texture file as jpg..
Each part in a row is a animation frame and the game cycles through them according to the particle parameters you use. The numbers, like 16,10,32 in the example I gave are guidance on what to select from that texture and what to do with them. The numbers mean how many frames per row, row to start from and frames to play. The row count starts from 0 (zero) so in that image the first row of particles is 0.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline zonker3210

  • Members
  • *
Re: Recreating the Arma fire/smoke effect in Arma2
« Reply #6 on: 28 Jan 2010, 02:18:53 »
Again, thanks for the help, h-. I'm curious...how did you find that image? Is that something that's available here at OFPEC or is that something extracted somehow (perhaps one of the Arma2 editing tools)?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Recreating the Arma fire/smoke effect in Arma2
« Reply #7 on: 28 Jan 2010, 13:13:38 »
You just need some pbo unpacking tool, such as cpbo (found in Kegetys' ArmA Tools) and you can then unpack the pbo files the game uses and search things from them.

The texture files are in *.paa or *.pac format so you need to convert them to be more Windows friendly, I used a Photoshop plug-in that is in that above linked tool set to open the image in PS and save it as jpg.

Texture(s) for a model are usually stored in the same folder as the model itself, in another folder called data. In community made addons that might not be the case though, but with BIS stuff it usually is, so you just follow the path like in this case the \Ca\Data\ParticleEffects\Universal\Universal.p3d, open the data folder in that folder and there it is, universal_co.paa.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline zonker3210

  • Members
  • *
Re: Recreating the Arma fire/smoke effect in Arma2
« Reply #8 on: 29 Jan 2010, 05:13:37 »
I'll have to start de-pbo-ing the Arma2 files and checking out some of the internal scripts and objects. Thanks again for the helpful info! I really appreciate the advice.