Page 1 of 2

[Help] How to create/edit effects for BF2?

Posted: 2011-06-27 19:49
by Hulabi
So, how can you create or edit effects (explosions, screen effects (bloody screen in PR) etc)) for PR/BF2? I've tried searching for some tutorials or any info about it but can't find any.
I'd really appreciate some help or tutorial links or what ever, thanks!

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-27 20:06
by Outlawz7
I think that's two different things, one is static effects like fires, waterfalls and the other is HUD/shaders - bloody screen, suppression.

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-27 20:07
by Hulabi
Well, in that case, i'd like to learn about both :)

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-27 22:40
by Rhino
I would suggest you should try editing 3D effects first.

There isn't a tut on how to do it as such, its pretty much all trial and error until you get the hang of it. Download the BF2 editor, open up the effects and tweak them in the editor/via code and see how they change.

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 09:31
by Psyko
I havnt looked into it, but i would have thought all game effects were made in after effects and ported in, no? are you saying that everything from muzzle flash to the j-dam cloud are done by editing text? that doesnt sound very efficient. Are there files that represent these effects as objects, in the object folder?

the three essential file types are, .con .tweak and .wav
theres got to be a program that fashions these then drops them into the directory in a way BF2 understand them

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 09:39
by Rhino
particle effects are mostly code in how they behave. Here is just one effect out of the "e_exp_bomb" (.tweak) effect found in \objects\effects\impacts\explosions\e_exp_bomb\

Code: Select all

ObjectTemplate.create SpriteParticleSystem em_exp_bomb_fire2smoke
ObjectTemplate.modifiedByUser "Alex"
ObjectTemplate.createdInEditor 1
ObjectTemplate.showInFirstPerson 1
ObjectTemplate.showInThirdPerson 1
ObjectTemplate.emitPrio High
ObjectTemplate.lodDistance High
ObjectTemplate.qualityLevel Low
ObjectTemplate.emitterType Standard
ObjectTemplate.isLocalSystem 0
ObjectTemplate.emitRadius 1/0/1
ObjectTemplate.emitRangeX CRD_NONE/0/0/0
ObjectTemplate.emitRangeY CRD_NONE/0/0/0
ObjectTemplate.emitRangeZ CRD_NONE/0/0/0
ObjectTemplate.randomRadialDirection 360
ObjectTemplate.radialDirection 0
ObjectTemplate.emitFrequency 20
ObjectTemplate.preWarmTime 0
ObjectTemplate.emitTime 0.2
ObjectTemplate.emitDelay 0.08
ObjectTemplate.isLooping 0
ObjectTemplate.emitSpeed 30
ObjectTemplate.emitDirection 0/1/0
ObjectTemplate.timeToLive 0.5
ObjectTemplate.randomTimeToLive 0
ObjectTemplate.windAffectionFactor 0
ObjectTemplate.forceToWaterSurface 0
ObjectTemplate.waterSurfaceOffset 0.03
ObjectTemplate.rotationGraph 0/0/-1/1
ObjectTemplate.alignRotationToSpeed 0
ObjectTemplate.transparencyGraph 0.09/-1/-0.1/1
ObjectTemplate.gravity 1
ObjectTemplate.gravityGraph 0/0/0/1
ObjectTemplate.airResistanceGraph 0/0/0/1
ObjectTemplate.emitSpeedGraph 0/0/-0.8/1
ObjectTemplate.randomSpeed 3
ObjectTemplate.randomDirectionAngle 0/0/0
ObjectTemplate.airResistance 0.4
ObjectTemplate.collisionEnable 0
ObjectTemplate.collisionSpeedAlongNormal 0.7
ObjectTemplate.collisionSpeedAlongPlane 0.8
ObjectTemplate.randomSize 0.5
ObjectTemplate.particleMaxSize 20
ObjectTemplate.sizeGraph 0/0/0.27/0.74
ObjectTemplate.randomIntensity 0
ObjectTemplate.lightMapIntensityOffset 1
ObjectTemplate.color1 2.6/2.55294/2.27059
ObjectTemplate.color2 0.701961/0.34902/0
ObjectTemplate.colorBlendGraph 0/0/1/0
ObjectTemplate.alphaCull 0.1
ObjectTemplate.particleType Sorted
ObjectTemplate.drawOrder Back
ObjectTemplate.randomRotation 360
ObjectTemplate.randomRotationSpeed 0.5
ObjectTemplate.rotationSpeed 1.5
ObjectTemplate.pivotOffset 0/0
ObjectTemplate.selfShadowIntensity 1
ObjectTemplate.textureName objects\effects\textures\animated\anim_grenade2
ObjectTemplate.animationEnable 1
ObjectTemplate.animationSpeed 30
ObjectTemplate.animationPlayOnce 0
ObjectTemplate.setAnimationFrameWidthRelative 0.25
ObjectTemplate.setAnimationFrameHeightRelative 0.25
ObjectTemplate.animationRandomizedStartFrame 0
ObjectTemplate.animationFrameCount 8
ObjectTemplate.animationFrameCountX 4
ObjectTemplate.nearCullingEnable 1
On top of that ye you do also have textures for the effects, like that above effect uses the anim_grenade2 texture for its smoke cloud and you also have sounds as well, but how the effect behaves is mostly down to the above code.

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 09:45
by Psyko
can you play with these in the editor?

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 10:33
by Rhino
yes, like I said above its all trial and error and watching how the effect behaves in the editor to get to grips with it :p

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 15:24
by splatters
Sweet cheers! I've been drooling to get my hands on effects; even though the ones in PR are much better than vanilla and more realistic than in most games they definately could use a loving touch :mrgreen:

btw, I've messed around with the wind value on a local and dedicated server but it doesn't seem to do anything. is it working?

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 15:32
by Rhino
there is no such thing as wind......... in BF2 :p

There is "wind" in BF:H that has an affect on some effects, possibly in BF2142 too but not not in BF2 :p

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 15:43
by Rudd
Psykogundam wrote:can you play with these in the editor?
yea using the editor for this is best, it has a whole effect section.

Editing effects is MUCH easier than making them, the Combined arms team did a great job making the base flare effect (i.e. the flares dropped by choppers) and I did some messing around with the size and colour to what they are now (they were very large and yellow before)

Don't bother with wind, I assume its a feature that never got put in.

Look at the cistern smoke effect to see how to make it look like wind is affecting it.

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 15:47
by Adriaan
[R-DEV]Rhino wrote:there is no such thing as wind......... in BF2 :p

There is "wind" in BF:H that has an affect on some effects, possibly in BF2142 too but not not in BF2 :p
Yeah, this is a major bummer :-(

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 16:16
by Psyrus
[R-DEV]Rhino wrote:there is no such thing as wind......... in BF2 :p
How does the rotor wash on choppers that pushes smoke from smoke nades around work then? I recall ages ago it was taken out and then put back in around (0.8?). Wind is defined as
3. any stream of air, as that produced by a bellows or fan.
Wind | Define Wind at Dictionary.com
Is that an effect that can be tweaked? (not saying it could be made into wind that affected anything except smoke grenades... but yeah quite curious)

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 16:22
by splatters
[R-DEV]Rhino wrote:there is no such thing as wind......... in BF2 :p

There is "wind" in BF:H that has an affect on some effects, possibly in BF2142 too but not not in BF2 :p
ObjectTemplate.windAffectionFactor 0

rcon command for wind speed or something like that, can't remember it right now, might have to dig it up later. (also, some commands about air resistance)

Those would suggest otherwise.. And there is a value for overgrowth and undergrowth that determines how much they rock in the wind, same thing?

And oh how cool would it be to have effects affected by wind!

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 16:40
by Rhino
Psyrus wrote:How does the rotor wash on choppers that pushes smoke from smoke nades around work then? I recall ages ago it was taken out and then put back in around (0.8?). Wind is defined as


Is that an effect that can be tweaked? (not saying it could be made into wind that affected anything except smoke grenades... but yeah quite curious)
there is no "natural wind" in BF2.

The rotor wash is actually done by force and gravity and possibly a few other things, not by "wind".

splatters wrote:ObjectTemplate.windAffectionFactor 0

rcon command for wind speed or something like that, can't remember it right now, might have to dig it up later. (also, some commands about air resistance)

Those would suggest otherwise.. And there is a value for overgrowth and undergrowth that determines how much they rock in the wind, same thing?

And oh how cool would it be to have effects affected by wind!
That bit of code there is probably intended for BF:H/BF2142 and doesn't work in BF2 or is meant for something other than effects. It may work but I very much doubt it.

Also overgrowth sway is defined for every map in a certain file or part of the engine and undergrowth sway is controlled by the mapper when placing down the undergrowth and both are not in any way controlled by wind, although yes you can get overgrowth to move about a lot more when you put a rotor wash next to them but that again is an engine thing.



To put it plainly, there is no "natural wind" that you can define blowing in a certain direction and speed that affects effects in BF2.

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 16:46
by splatters
Yes, that is so.

But the little piece of code still bugs me, wonder what happens if you change the value to 1.

Oh well, I'll explore these things more after I get back from my summer (road) trips and other cool stuff 8)

Thanks for the info on effects, way easier to start off with this knowledge than from scratch!

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 17:26
by Hulabi
splatters wrote:


Thanks for the info on effects, way easier to start off with this knowledge than from scratch!
Seconded, thank you very much :)

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 17:47
by Mosquill
There IS wind in bf2, it can affect effects and overgrowth.

Here's a list of relevant commands:

Code: Select all

objectTemplate.widnBlowTime [float]
objectTemplate.windAffectionFactor [float]
objectTemplate.windAgingFactor [float]
objectTemplate.windBlowTime [float]
objectTemplate.windDirection [Vec3]
objectTemplate.windFalloff [float]
objectTemplate.windIsDynamic [bool]
objectTemplate.windRadialFalloff [float]
objectTemplate.windSpeed [float]
objectTemplate.windSpeedAgeDistance [float]
objectTemplate.windType [std::string]
particleSystemManager.affectedByWind [bool]
physics.wind [Vec3]
windManager.globalWindSpeed [float]
windManager.globalWindDirection [Vec3]

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 18:50
by Rhino
cool, never seen it used in BF2 iirc, at least not in the way I'm thinking so that all the chimney smoke for example all blows in one direction, rather than making the effect blow in a direction then trying to make all the chimney smoke on a map be at the same rotation?

Re: [Help] How to create/edit effects for BF2?

Posted: 2011-06-28 20:41
by splatters
A-Ha! :D YESS! That's pretty cool, but where do you set the parameters?

Next thing you'll tell me is it can affect projectiles and vehicles too right? :mrgreen: