PDA

View Full Version : Tutorial 1: Adding your own first effect



FoX
9th Nov 02, 5:12 PM
****PICTURES TO ACCOMPANY THIS ARE COMING*******

Hey guys. In an effort to get people better aquainted with a couple of the tools I've put together this little tutorial on adding an effect to the melee attack of the henchman.

Part I Creating Your FX

With my fairly limited artisitic talent we are going to use the standard texture that Relic has provided us with.

First off, fire up the "FX Tool"

There are two fx types which we will be using in order to make this basic fx, rings and sprays. A quick and dirty way to explain the two are the rings are what the sprays are spraying. In order for us to have a spray, we need to first define what we want it to spray (ie the rings).

Goto "File", "New", and select "Rings".

This has loaded up the default ring which we will be using to modify. The FX tool uses the same controls in which the camera was controlled in Homeworld. "Right Click" on the screen and drag your mouse down so you can get a top down view (looking down on the checkerboard pattern). Go ahead and click "Play" in the lower left corner of the screen to watch the default ring play out. You may have to zoom in / out which can be accomplished by using your mouse wheel (you may have to click in the screen to activate it).

Now that you've had a chance to look at what the default ring does, go ahead and click stop so we can start to edit it.

The first thing we are going to edit is the color that the ring is using. Click "Color" along the right side. If you'll notice along the bottom play bar, there are two ticks, one at the beginning and one at the end. When the sequence is moved to the front the color is at red and when it is moved to the end the color is at green. For our effect we want the color to go from purple, to blue, to white. In order to add this extra color we need another key frame to edit in the middle. Move the play slider to somewhere in the middle and notice the "Add Keyframe" button becomes active. Go ahead and click "Add Keyframe". This has added an editable frame between the previous two points. You can see the color it automatically selected for this point is the color that should be between Red and Green at that point.

http://www.relicnews.com/images/impossiblecreatures/tools/Tutorial1_KeyFrame.jpg

Now that we have our three points we can go through and edit them. Drag the play slider to the starting point. Click on the Red color square and it will pop up a color pallette for you to select from. Select purple and hit "OK" to close the window. Click the "Apply" button in the lower right corner. Move the slider to the middle point and change that color to blue. Finally change the end marker color to white. Now that all those changes have been made, click "Play" to see that ring now goes from purple to blue to white.

The next thing we are going to want to change is the duration in which it takes the ring to run through its play sequence. Select "Duration" in the FX toolbar. The current duration of 5 seconds is faaaar too long for an FX tied to this units melee as its melee animation is only 1 second long. Having done some previous testing I found .5 seconds to be a good time for the ring. Put in .5 for the duration and hit "Apply"

Next, we need to edit the Radius of the ring. Click "Radius" in the toolbar on the right. At the current value of 5.0, the ring tends to completely cover our poor little henchman (once again, through trial and error). I also wanted to keep the size of the ring constant through the fx. Currently it starts from a size of 0.0 and rises to 5.0. Once again, the value is defined for each keyframe along the play bar. Go to each keyframe (3 of them) and change the value down to 0.2 and hit "Apply" for each.

Go ahead and hit play to check if everything looks to be working. It should be maintaining a constant (small) size, turning from purple to blue to white, and being down in half a second.

If everything looks to be working, go ahead and save your ring. Go to File, click "Save As" and save it as tutorial_ring. You can obviously name it whatever you like but I suggest marking it as a ring because that folder can become a mess fast if you dont know whats a ring vs whats a spray vs whats a beam, etc, etc.

Now that we have our ring, its time to make our spray!

Goto "File", "New", and select "Spray".

Go ahead and click "Play" to check out the default spray.

First thing we are going to do is load in our ring we just made. Select "Particle FX" in the right side toolbar. Select "Browse" and find your "tutorial_ring.lua" and open that.

You can click "Play" again to see our ring using the default spray (although you will have to zoom in quite a bit as we are using really small rings).

http://www.relicnews.com/images/impossiblecreatures/tools/Tutorial1_RingLoad.jpg

Our effect is going to have a spherical spray expand out from the center origin. As you can currently see, the spray seems to only spray directly upwards. To achieve a spray that goes out in all directions we need to edit our "Emitter Deviation". Go ahead and select "Emitter Deviation" from the toolbox. The default value is a 0 degree cone of dispersion. We want to change it to 360 degrees and click "Apply". Now when you hit play you should see it radiating out in a sphere from the center.

http://www.relicnews.com/images/impossiblecreatures/tools/Tutorial1_SphereDisperse.jpg

Once again, we want to keep the fx from going longer than the actual melee attack so we have to change the duration period. Select "Emitter Duration" in the toolbar. Drop it down to .3 seconds and select "Apply"

While we dont want the effect to last longer than the melee, we also want it to keep going if hes continuing in his melee (plus it just looks better this way, trust me). In order to do this, we need to have the spray loop the animation. Select "Emitter Loop" in the toolbar, check the check box and hit "Apply". Now the fx will continue to go as long as his melee animation is going but have far less a chance of going beyond it (as it only lasts .3 seconds)

Now we run into a new problem. There are far too many rings on the screen and its blocking our henchman (once again, this is through me testing this, for now you'll have to take my word for it ;)). We need to drop the rate at which the spray is putting out rings. Select "Emitter Rate" on the right side and drop it down to 20 and click apply. This cut the number of rings down on the screen by quite a bit.

This presents itself a new problem though. It looks like the rings are too sparse and they are flying off the screen. We need to slow these bad boys down! Not a problem. Select "Paritcle_Speed" in the toolbar and drop the value down to 1.0. This solves a few problems. The most noticeable is that it bunches up the rings a bit more and keeps them on the screen instead of having them fly off. The other thing it does though is it keeps the radius in which the fx effects much smaller. The radius of the spray is determined by the life of the ring. If the ring A) has a long life (one of the things we shortened earlier) and/or B) is moving at a fast rate away from the center, the radius in which it effects will be much greater. By making the change to the life span of the ring earlier we fix A) and by changing the rate in which they fly off we fix B).

Our (admittedly cheap) fx is now done! Go to "File", "Save As" and save the file as "tutorial_spray". With that all done...its time to put it to our henchman!

Part II Attaching your FX to the Henchman

Now that we have an fx, its time to put it to our henchman. Lets open the "Object Editor" and get going.

Go to "File", "Open", open the "Gatherers" folder, select the Henchman, and press "Open". You now should have your henchman loaded up and in front of you.

Along the right side is the monsterous list of actions and animations for the henchman. We want to attach the fx to the melee action so lets take a look at that before we get going. There are two "main" folders in the window, a "Motion List" and an "Animation List". For this tutorial we are only concrened with the "Animation List". Scroll down until you find the Animation List folder and then find "Melee1" under that. Highlight "Melee1" and click "Play" in the lower right corner. You should now see the unit doing its Melee animation.

http://www.relicnews.com/images/impossiblecreatures/tools/Tutorial1_ObjectLoad.jpg

In order to attach our fx to the melee action we need to dive into the even editor so go ahead and click the "Event Editor" tab. At first glance this looks incredibly intimidating. Dont worry though because you dont actually have to deal with any of that stuff already in there.

Click the "Add Event" button. Rename the Event to "NewMelee". There are 4 parameters we need to define in order for our fx to take hold.
anim - The name of the animation in which our fx is to take place in
animtime - At what point should our fx start in the animation
fx - The name of the fx we want to put in the animation
marker - Where on the model do we want to attach the fx

Go to the Properties drop down list for each one of those 4 parameters. For anim we want to fx to be tied to teh "Melee1" animation so select "Melee1". For animtime we are going to have our fx start the moment the animation starts so we'll set that to "0". For fx its the name you gave to the spray (most likely "tutorial_spray"). This drop down list updates automatically so it should already be there. As this units melee attack is done with his right fist, we want to attach the fx to the models hand. Within the marker drop down list there should be "bip01 r hand".

http://www.relicnews.com/images/impossiblecreatures/tools/Tutorial1_EventEditor.jpg

With those 4 fields set, click "OK" and then click the "Animation Editor" tab. The object editor doesnt seem to reset changes unless you leave the animation and come back to it so select the "Low Build" animation and then reselect the "Melee1" animation and click "Play". Your fx should now be attached to the melee animation!

http://www.relicnews.com/images/impossiblecreatures/tools/Tutorial1_Final.jpg

Now, as I said earlier, I'm no artist so its not the 'prettiest' or 'coolest' thing out there. However, after looking at it some I can see ways in order to tweak it to make it look much better. If I let it loop and play through 20 or so animations it looks to build up a cool purple/blue flaming thing on his fist. I would think with enough tweaking you could eliminate the floating rings and have just that flaming ball on his fist. You would have to tighten down the radius of the fx effect (slow down the sprays velocity maybe?). You could easily change the the color of the ring from purple/blue/white to a red/orange/white. I dont know...give it a try!

If you have any problems or dont understand anything....let me know. This is a rough draft as I wrote it as I went through and did it. Hopefully it just gives you some familiarity with the tools your first few runs through it. I will get up the pics asap so it makes it a bit easier but it will take a little bit of time ;)

Hope you enjoy!

FoX

FoX
9th Nov 02, 7:27 PM
Well, I took my own idea and went to work to try and tighten that up a bit.

Before I went and worried about chaning colors, I wanted to make sure I could tighten up the effect so it concentrated into more of a fireball. I tried turning down the speed to ridiculously slow amounts which helped to create more of a ball but I was still having particles shooting off to the side. I tried messing with all sorts of options in an attempt to condense my spray and finally...after changing pretty much every setting...I found it. I had forgotten that there was the end KeyFrame which I hadnt modified for the speed setting. So while I was able to crank down the beginning and keep an initial ball, the end speed was still set at the default 10.0, making the rings speed up and not stay in a coherent ball.

http://www.relicnews.com/images/impossiblecreatures/tools/Tutorial1_SpeedChange.jpg

After setting both speeds to 1.0 I had a nice small ball. But I needed to crank up the amount of rings being put out to give a more filled out look so I upped the "Emitter Rate" to 75.0. With all that I had a nice looking purple/blue/white flame fist going. I then decided to change it to a more "real" flame fist. I loaded up my "tutorial_ring" and changed the three KeyFrame color values to red/orange/white. Saving that and reopening my tutorial_spray I loaded in the updated tutorial_ring and viola....end result:

http://www.relicnews.com/images/impossiblecreatures/tools/Tutorial1_Final2.jpg

Siber
11th Nov 02, 5:33 PM
hi, i've done Parts One and Two, and its really pathetic on my machine. it puts out like 3 rings. so i uped the output and now it puts out a large bust at the start, then nothing. is this just my poor machine? or am i doing something wrong?

FoX
11th Nov 02, 9:43 PM
What is your "Emitter_Rate" set at? For my final output (the red/orange fireball) I had it set to 75.0

When you say "pathetic on your machine", can you tell there are some serious frame rate problems or are you just assuming that its pathetic based on the lack of ring output? I would think that even if you were having some frame rate problems that you would still get the correct output, it would just be incredibly choppy.

If you want you can send me your two .lua files (the one for the ring effect and the one for the spray) and I can take a look at them (I dont need the updated henchman file). Send them to fox@relicnews.com

Siber
11th Nov 02, 10:03 PM
no, its not chopy. i'm gona go through the steps again and see if i did anything wrong. i'll tell you what hapens. i was lazy last time and didnt do the rest of it, so i'll do that too.

Siber
11th Nov 02, 10:38 PM
ok, i've gone back and gone onto the second half, and i have to say its nice. the rings are a bit sparce on his firs ring but they fill out nice by the end of the second. now its onto the second tut.:cylon: :angel: :cylon:

FoX
13th Nov 02, 7:39 AM
Glad to see you got it working, what did you do differently to get it working?

Siber
13th Nov 02, 10:21 AM
i really dont know, i think its just the fact that i did the extra bit on the end. i've used simalar techniques to add fire breath the the komodo dragon. changing the white to black makes a nice smokey look. thanks for posting this up, i had no idea what to do with these tools beforehand except monkey with the combiner.

FoX
13th Nov 02, 1:34 PM
Well, thats kind of what I figured. I figured if people could have a foundation to work off of that they would feel more comfortable with it rather than starting out with nothing and trying to build something to tweak on their own. I know if I hadnt had the chance to work through it at ICU with someone like Craig coaching me along, the app would have looked incredibly intimidating to just dive into.

Haelix
17th Nov 02, 11:43 PM
Hmmm... I noticed that the rings can look kind of "slicey". For a particle emitter such as a firefist with smoke after effects, is it possible to use sphere particles instead of rings.
Were spheres included, or are they not viable, due to performance constraints?

Thanks,
Haelix

FoX
19th Nov 02, 7:17 AM
I'm not 100% sure on this one but I believe if you change the ring option "Billboard" to on, that should give you the desired effect. What will happen then is no matter what angle you look at the ring, it will show you a top down view and you should never see a "sliced" ring as you cant see it from a side view.

Haelix
19th Nov 02, 10:40 AM
Ah, I imagine that will make them somewhat "sprite"ish much like the explosions in HW.

Thanks, I'll be sure to check it out when I get home.

AlphaPrimate
6th Jan 03, 11:36 AM
when I try to save it gives me a file outside of all known projects. But I cant see anywhere to open a project. Good job with the tutorial btw

FoX
6th Jan 03, 12:54 PM
Hmmm... I noticed that the rings can look kind of "slicey". For a particle emitter such as a firefist with smoke after effects, is it possible to use sphere particles instead of rings.

There is an option within the rings to use a mesh. You first have to load your mesh and then one of the properties is to "use mesh" that you have to check as on. If you've ever looked at the default spray (http://www.relicnews.com/images/impossiblecreatures/tools/Tutorial5_ManyProjectiles.jpg) you'll notice that it uses a cube mesh.


when I try to save it gives me a file outside of all known projects. But I cant see anywhere to open a project. Good job with the tutorial btw

I guess I dont understand where you are having your problem. At what point are you saving where you are running into this problem?

Stoo
6th Jan 03, 1:49 PM
I ran into the same thing, I eventually got around it by saving in the same directory that the premade effects are in. Inside of data/art/FX I think, I've removed the files since...

FoX
6th Jan 03, 2:10 PM
Could be....I believe I was saving all my stuff in there by default so I may have just never run into the problem. I would definately save it in that directory

AlphaPrimate
7th Jan 03, 1:27 AM
just to let you know you do have to save it in that folder.... mine for some reason didnt load that folder at first. thanks!

eelektrik
9th Jan 03, 5:06 AM
Cool, originally I too had the problem of not saving in the right folder...but read the rest of the thread and fixed it... Ive now made my first FX, though I went and edited it a little further so it looks a little different then Fox's... Mainly becaues my Tutorial_Ring is using the texture SPLASH_RING02.TGA ... Also, I have 4 keyframes.. going Red, Orange, Very pale yellow, black...

In my opinion, that texture, pluse the black colored frame at the ned, makes for a little better fireball... though, thats just my opinion...

FoX
9th Jan 03, 9:02 AM
Oh, I have no doubt you can improve on it alot ;)

The tutorial wasnt neccesarily put in as an end all be all to this type of FX...I just wanted something out there that got you introduced to the basic concepts so everything doesnt look so intimidating (and therefore you can begin to make tweaks and tailor it to what you want to do on your own) :)

DragonTamerSage
11th Nov 04, 2:45 PM
Same problem, I tried everything you said. It did not work.