Home   Help Search Login Register  

Author Topic: man sized fire  (Read 2156 times)

0 Members and 1 Guest are viewing this topic.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
man sized fire
« on: 23 Mar 2008, 18:23:17 »
Greetings.

I need a burning man for a cut-scene, so I need a man-sized fire effect.

I've looked at CSL's clean code for a vehicle sized fire.  Here's an excerpt:

Code: [Select]
_vehicle          = _this select 0;
_vehiclePosition  = getPos _vehicle;

//fire light
_fireLight = "#lightpoint" createVehicleLocal _vehiclePosition;
_fireLight setLightColor [0.7607,0.3843,0.1098];
_fireLight setLightBrightness (0.02 * 4) + (random 0.02) - 0.01;
_fireLight setLightAmbient [0.7607,0.3843,0.1098];
_fireLight LightAttachObject [_vehicle,[0,0,0]];

_PS1 = "#particlesource" createVehicleLocal getpos _vehicle;
_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, "", "", _vehicle];
_PS1 setDropInterval 0.03;

_PS2 = "#particlesource" createVehicleLocal getpos _vehicle;
_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, "", "", _vehicle];
_PS2 setDropInterval 0.5;

_PS3 = "#particlesource" createVehicleLocal getpos _vehicle;
_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, "", "", _vehicle];
_PS3 setDropInterval 0.25;

And I've looked at the BIKI for the particle commands.  But I don't understand them very well, and am hoping someone who does will save me hours of tweaking parameters.

Again, I want a fire about .5 meter in diameter to attach to a man.

What would be even better would be if someone could tell me how to scale the size of the fire (apply some numeric scale parameter that calculates a different sized fire effect).  For OFP, General Barron had a wonderful fire effect script where you pass a simple size parameter and you could scale the fire size to any size (a cigarette, tail rotor fire, car, tank, house, etc).  That was a "fire for dummies" script that was super useful.

Thanks in advance.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: man sized fire
« Reply #1 on: 23 Mar 2008, 19:57:53 »
[1.5],  [4, 5, 10, 10] and  [4, 5, 10, 10] are respectively the sizes of the particle used. The particle engine moves from one size to the next one along the life time of the particle.

The life-times of the particles there are respectively 1, 10 and 15. Now change the sizes and life-times at will.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: man sized fire
« Reply #2 on: 25 Mar 2008, 07:16:34 »
Thanks Mandoble.  I added a multiplier variable so I can increase/decrease the size variables you pointed out via a parameter.  I also figured out where to specify the relative position to an object.

However, decreasing the size of this particular fire example does not look good.  It decreased the size of the fire particles I think, but they are still too spread out.

I would like a tight formation of fire particles for a smaller fire.  I have read about all the parameters and played with them some, but have not yet figured this out.

How do you get the particles to spawn within a smaller radius?
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: man sized fire
« Reply #3 on: 25 Mar 2008, 07:37:37 »
Set second parameter of setParticleRandom to [0.1,0.1,0]

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: man sized fire
« Reply #4 on: 25 Mar 2008, 08:03:53 »
Thanks a million mando, es perfecto!
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: man sized fire
« Reply #5 on: 11 Jun 2008, 06:26:34 »
I'm back working on this again, and the size of the fire is right, but I want it to be placed at the body's midpoint, say 1 meter high.  Currently the command below is always placing the fire at ground level:

Code: [Select]
_relpos = [0,0,1];
_PS1 = "#particlesource" createVehicleLocal _FirePos  ;
_PS1 setParticleCircle [.05, [0, 0, 0]];
_PS1 setParticleRandom [0.2, [0.1,0.1,0] , [0.5, 0.5, 0], 1, 0.05, [0, 0, 0, 0], 0, 0];
_sizeArray = [1.5 * _size];
_PS1 setParticleParams [["\Ca\Data\ParticleEffects\FireAndSmokeAnim\SmokeAnim.p3d", 8, 2, 6], "", "Billboard", 1, 1, _relpos , [0, 0, .5], 1, 1, 0.9, 0.3, _sizeArray , [[1, 0.7, 0.7, 0.5]], [1], 0, 0, "", "", _vehicle ];
_PS1 setDropInterval 0.03;

I thought where I have the _relpos parameter in the setParticleparams command would place the fire 1 meter high.

What am I doing wrong? :banghead:
« Last Edit: 12 Jun 2008, 06:48:26 by johnnyboy »
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline Rommel92

  • Members
  • *
Re: man sized fire
« Reply #6 on: 16 Jun 2008, 03:50:56 »
The smokeAnim may be 0.5m above centre point and 0.5m below it, or its centrePoint may be lower then 1M.

Try:
Code: [Select]
_relpos = [0,0,2];
If its the same, then Im not sure, haven't delved into particles too much.  :P