It's time for another tutorial, this time it's about EffectsEd for Call Of Duty 2. EffectsEd is located at root/bin/CoD2_EffectsEd.exe and is a program that lets you edit stock effects but also make your own aswell. Effects are saved as an *.efx file and are located in iw_07.iwd. An effect file is made up out of one or more effect segments, which can be any of the following primitive types:
- - CameraShake (self explanatory but doesn't show properly in the editor, the only way to see if the settings are correct is to open the *.efx file with a text editor)
- Cloud (a cloud of particles)
- Cylinder (creates a cylinder without a top or bottom, ability to change the height of it, top and bottom radiuses can vary)
- Decal (impact mark, projected onto architecture, used for bullet impacts and simmilar)
- Emmiter (an effect mostly used for throwing out chunks of models like in an explosion)
- Flash (crashes my editor when played, apparently it's a full screen flash with changable viewangles and distance in which you get flashed)
- FxRunner (stationary source for spawning other effects. Need I say more?)
- Light (dynamic light which can be turned on and off, changable colors over the course of it's life and variable size. You need dx9 enabled to see dynamic lights in-game)
- Line (a dynamic line with specified start and endpoints, can also spawn an effect)
- OrientedParticle (a sprite which can be oriented in any direction, used often for smoke effects)
- Particle (a sprite which always faces the player, like in Doom )
- Tail (comet-like primitive that will always orient the length of the line in the direction it is currently traveling in)
The first thing you do when you load EffectsEd for the first time is to locate the game path. The default game path is at C:\Program Files\Activision\Call of Duty 2. Don't worry if you don't get it right, you can always change it by going to Edit->Set Default Game Path... After you open the editor, you should see something like this:
It might be a bit overwhelming at first but it's very simple. I'll start at the top and work my way to the bottom explaining what various buttons do. Let's get started:
From left to right they are: New, Open, Save, Clone, New Segment, Delete Selected Segment, Play, Pause, Stop, Edit Playback Settings, Repeat Rate(the box and slider), Effect Orientation(X, Y, Z), Set Effect Spawn Origin.
The first three are your basic Windows buttons, Clone does exactly what it says it does, it clones your currently selected segment.
New Segment(the wand) creates a new segment - a dialog box pops up in which you have to select one of the primitives. Delete Selected Segment is self explanatory.
The playback buttons are the ones you'll be using a lot. Play plays the entire effect with the ticked segments - will get to that later. Pause pauses the effect and Stop stops all segments - terminates the effect. In the playback settings you can adjust the play mode, repeat rate and effect spawn settings.
Repeat rate is the rate in miliseconds at which the effect will play. For example if you have a light that has a life count of 1 second and if the repeat rate is 0.5 it will spawn the light twice when using continuous play.
Effect orientation buttons do exactly that, orientate the effect along the desired axis. The last button deals with setting up the spawn location of the effect.
Under these buttons there's another set of buttons and sliders which look like this:
The first slider on the left is the Playback Time Scale setting, it basically does the same thing as the timescale command in Call Of Duty, slows down/speeds up the animation of the effect. Next you have the draw axes button which draws the XYZ axes only when using wireframe mode - the 5th button from the left. Most other buttons here are obsolete because the editor uses a pre-compiled map for the ingame view. I never use them in any case.
2. Right, but how do I MAKE(and edit/tweak) effects?
Yeah yeah I'm getting to it. The best way to explain what everything does is to use an example that's already in the stock files. So go ahead and extract the contents of iw_07.iwd to root/raw. That folder is important because otherwise the editor won't be able to load any effects if it's in any other folder(even simply using root/ won't work).
You don't have to extract the entire .iwd but the fx folder is necesarry if you want to see any effects. Open an effect by pressing Open... and navigating to your fx folder. I'm going to load a fire effect located in root/raw/fx/fire/ and called ground_fire_med.efx. If everything went according to plan your effect should now be loaded.
Press the play button and see if the effect plays(I also suggest setting the playback rate to 2 seconds so the effect will properly play):
Hooray we have ourselves a fire!
Wait a minute, how the hell did you get your effect to play there? And as a matter of fact, HOW DO I MOVE AROUND THIS #$%&??
Ah yes, moving around in EffectsEd is different than in CoD2Radiant.
To rotate the camera around the effect, drag with the left mouse button in the 3D view.
To move the camera without the effect following, press and hold the alt key and drag with the left mouse button in the 3D view.
To move the camera with the effect following, press and hold the control key and drag with the left mouse button in the 3D view.
To zoom in or out, drag with the right mouse button in the 3D view.
By moving around the 3D view and holding control, the effect will automatically follow the view. Useful if there's a big model in the way or if you want to see what the effect looks like somewhere else. It can be also used to compare the size of the effect to the game world.
3. Ok got it. Now I want my fire to be HUGE and have a green flame with purple smoke that shoots out LAZORZ!
Whoa whoa slow down. I need to explain how an effect is generated before you start editing it. The right of the window is reserved for various parameters for the currently selected segment(which you choose by selecting various segments at the bottom left. You can also disable effects by unticking them.
A general tip: When there are two text boxes, color pickers, , it means that the effect will use a random value between the two numbers. The same thing applies to overlapping line charts . It is probably one of the most useful features of EffectsEd. (Adapted from Nab622's tut for Jedi Academy)
The tab that deals with spawning effects is 'Generation' so click on it and the right side of the window changes to this:
Explanation time again!
-Spawning-
- Count: Determines how many particles will be created over the course of its life. If you want to keep the value exact, use the same number in both text boxes.
- Life: How long the effect will play(in milliseconds)
- Delay: How long the effect will wait before appearing(in milliseconds)
Use Even Delay Distribution: A tickbox, if ticked it delays the particles evenly(for example if you have 10 particles spawning over 5 seconds, a delay of 1 second and the rate of play 1 second, it will spawn an effect every 1 second)
- Range: How far away you can still see the effect(in game units)
Enable Frustum Culling: A tickbox followed by a text box. When ticked, it stops the effect from playing when you look away from it. To determine how far away you have to look to stop the effect, use the text box.
-Origin-
The origin sets where your effect will appear. You can input two different values, it chooses a random one between the two values. You have control over the axes though, so you can set the boundaries of where the effect can spawn.
Relative to effect axis tickbox: If Relative to effect axis is checked, your effects will be aimed the same direction the fx_runner is. If this is unchecked, it will spawn the effect at the XYZ origins of the engine, not relative to the effect.(Adapted from Nab622's tut for Jedi Academy)
Enable special offset types: If you want your effects spawned inside a bounding sphere, an elipsis or a cylinder, you use this. You should know by now what Height and Radius/Width do.
Set effect axis to offset direction: No clue what this does, never used it.
-Misc-
Not sure what they do, haven't used them.
-Death Effects-
At the end of the effects life you can enable another effect that plays after the original effect has ended. Just load the effect using the box.
3. Yeah but that doesn't make my GIANT purple flame!
Oh so it's huge you want is that it? Well then check the 'Size' tab right next to 'Generation'. You'll see a line chart(get used to them, they're used a lot and very easy to get hang of once you understand the mechanics).
The chart is basically how you want your effect to behave over the course of its life. The important thing you have to note here is the scale of the chart: the bigger the scale the more of an effect it has on the particle. So a chart with a scale of 1 will modify the particle by 1 unit max(be it increase the size of it or move it) and a chart with a scale of 100 will do it by 100 units.
You can experiment with the chart on your own because it's not complicated. For example a chart that has its start and end points at the top will have a particle that is the same size as the scale and a chart that start at the bottom and linearly increases to the top will have a particle that increases in size from its original size to the scaled size.
The top chart represents how the particle changes in size, the middle one modifies the x and y of the particle seperately(rarely used). The bottom chart is used for lines, determines their length.
Also, you can make two charts which can be set to randomize between. Just right click on a chart and select 'chart 2'.
4. What about moving it around a bit?
If you insist. Velocity!
Velocity is basically six line charts in one. Two charts for every direction, three directions to a velocity chart, two charts to randomize between. You select other charts by right-clicking anywhere on it. It's the same principe as the size line chart, the only different thing is that this chart can have negative values aswell which represent the opposite direction.
So for the 'Up' chart the top half of it is for moving up and the bottom half for moving down. There's another velocity chart at the bottom so you can have two 3d velocity vectors each pointing in a different direction and randomized aswell.
Scale is important here, you can set seperate scales for every direction and a different scale for the other velocity. Relative to effect axis does the same thing here, if unticked it will move to the according XYZ coordinates.
5. It moves but spinning it around would be more fun!FUNFUNFUN!!
You're really starting to get on my nerve. I'm getting to it. You rotate a particle by going to the 'Rotation' tab. Basic stuff.
If you've paid attention so far you should start to get the hang of how this works. The only thing I'd like to point out here is the Initial Rotation text box: if it's set, it will spawn the particle at an angle(or randomly between two angles). Otherwise rotation is simmilar to velocity, the top half is for rotating clockwise, the bottom for counterclockwise.
6. Physics
Coming soon...
7. Ok I got my fire all big but it's still not PURPLE!
Why the hell do you want a purple fire anyway?
Um...'cause it looks awesome?
Fair enough, to change the color of the particle, go to the 'Color' tab(No, really?):
RGB Color chart:
These values are perhaps the most fun to modify, same thing as you've been doing all the time except the colors are represented by three charts: one for red, one for green and one for blue. Play around with the values and you'll achieve some interesting effects. Randomize blend between graph 1 and 2 does exactly that(as explained before)
Alpha Transparency chart:
Deals with the alpha transparency(1 is fully visible-top of chart, 0 is transparent-bottom of chart). The Modulate RGB value using alpha value tickbox is if you don't the particle to go from visible to transparent but uses the RGB value and modifies the lightness of it.
8. One tab left, hurry up I want to start making my own effects!
Sure thing. Shaders are the files that are the basis of making effects since they're simple 2d images which you then modify using EffectsEd.
You add a shader by using the little open button next to the list box. You can add multiple shaders and the engine will randomly choose between them. Any 2d image can be a shader but the ones used by EffectsEd start with the prefix gfx_*.
--
Well I hope this tutorial has helped you a bit in underst--
HEEEY one last thing.
What?
How about providing us with an example huh?
Yeah yeah, watch for my replies to this topic, I'll provide it with examples later.
Anyway, I hope this tutorial has helped you a bit in understanding the editor. As you can see yourself, it's very easy once you get the hang of what most things do. Have fun making effects!
By: Rezil