14712 Posts in 2613 Topics - by 7960 Members - Latest Member: Sumthanbuub

Author Topic: Tutorial: How to create basic effects and auras!  (Read 6930 times)

UnknownX

  • May 2012
  • 373 Posts
    • STEAM_0:1:3221174 STEAM_0:1:3221174
« June 22, 2013, 08:08:55 AM » #8618
This tutorial will cover the basics of the particle editor and what you need to know to get started. It will not cover any advanced techniques used by auras such as "Scan" or "Snake". If people need it then I might make a more advanced tutorial.


Table of Contents
1. Getting Started
2. Creating the Basics
3. Making It Beautiful
4. Adding the Necessities


1. Getting Started

So to get started you need to do a few things. Right click on Team Fortress 2 and go to properties.



Click on "Set Launch Options..."



Now put "-tools -nop4" in the box and click "Ok".



Now start up Team Fortress 2 and we can begin!

Hopefully it looks something like this. If it just shows up with the normal menu then you didn't put the launch options in correctly.



Now click "Tools" in the top corner and swap to the Particle Editor.



Now it should look just like it did before. Now click "File" and then "New".



2. Creating the Basics

Now click "Create" and enter a name.




You should see a new section appear. The yellow section is a list of all particle systems in a single .pcf file, clicking on one will change which particle you are editing. The blue section is not needed and is just a small box that allows you to see what you would normally see if you weren't in the editor. The green section is what we will be using to edit the particle. The red section is where you will see the particle updating as you edit it.



Now in the green section you can click the drop down menu to switch to the different function categories.



First we need to mess with the properties though. This will be the basics of the effect and what defines it. This is where you will set the max amount of particles, initial particles, and the material used for each particles.



Click on the button next to the materials and a menu will appear.



For this tutorial I used "particle_glow_01_additive.vmt". You can find it by scrolling down in the top box and selecting the "particle" category and then slightly scrolling down in the lower box.



Once you select it and click "Open" go back to the drop down menu and click on the "Emitter" category. Right click and click "Add...".



Now a box should appear. For this tutorial I used "emit_continuously", but you can use "emit_instantaneously" for basic particles too. "Emit_continuously" will emit a continuous stream of particles until the particle cap is hit or they start dying off. "Emit_instantaneously" will emit a set amount of particles at the exact same moment, but will not emit anything afterwards.



Once you click on "emit_continuously" and click "Open" you will see it appear in the list of functions. Here you can edit each function's properties. In the blue you will see the name of the property, in the red you will see what type of input each property uses. "Float" is just any number, "bool" is 1 (true) or 0 (false), "int" is any whole positive number, "vector3" is 3 numbers, and "string" is anything. In the green is where you will set the values for each property. Currently the emission rate is at 100, this is how many particles are emitted in one second.



Now you will notice that there are 1000 particles if you look at the particle viewer, but there aren't any visible particles!



To fix this, go back to the drop down menu and go to the "Render" category. Right click and add the "render_animated_sprites" function.



And now you have a big white ball!



Now we need to give it a lifespan so that it disappears. Go back to the drop down menu and go to the "Initializer" category. Right click again and add the "Lifetime Random" function.



Now you will notice different properties to edit. You will probably never need to edit anything other than "lifetime_min" and "lifetime_max". Do not make these values high. (If you want to make a "Circling X", then it needs to decay after a maximum of 2 minutes and 30 seconds (150))



Change "lifetime_min" to 2 and "lifetime_max" to 3.



You may notice that the particles still aren't dying off. This is because we haven't given them the ability to decay. Go back to the drop down menu and go to the "Operator" category. Add the "Alpha Fade and Decay" function and now your particles will start dying off and reappearing!



3. Making It Beautiful

Now lets add some random colors and sizes. Go back to the "Initializer" category and add the "Color Random" and "Radius Random" functions. Click on "Color Random". Do not worry about any property other than "color1" and "color2". The color of each particle will be a random color between these two colors. Click on one of the white boxes next to the values and a menu will show up.



Pick a color and click "Ok". Occasionally this menu will glitch and the gradient will not show any color besides red, but the color you choose will still be as if the gradient was the color you chose to the right.



For this tutorial I chose a random purple and green.



Now click on "Radius Random". This will change the size of each particle to be a random size between "radius_min" and "radius_max".



For this tutorial I used 1.5 and 2.5.



Now we need the particles to be spread out. Right click again and add the "Position Within Sphere Random" function. This will make the particles appear in a random spot within a sphere around the origin. Set the "distance_min" to 18 and "distance_max" to 25. (The player model's radius is about 15 to 18. 22 is the lowest you should make the minimum for auras.) You will notice that the particles are now popping up randomly and disappearing.




There are a bit too many particles though! We want to keep the particle count less than or around 100 for basic effects or auras. So head back over to the "Emitter" category and change "emission_rate" to a more reasonable 15.




Now go back to the "Operator" category and right click and then click "Add...". Scroll down until you see "Movement Basic" and "Movement Rotate Particle Around Axis". Both of these are good functions that can be used in multiple ways. "Movement Basic" allows the particles to move on their own and can be used to add gravity. "Movement Rotate Particle Around Axis" rotates the particles in a circle at a defined rate and direction.



For now, add the "Movement Basic" function and change the "gravity" property to "0 0 5" this will cause the particles to float up at a slow rate. This can also have negative values to cause the particles to move in the opposite directions.




Now add the "Movement Rotate Particle Around Axis" function and change the "Rotation Rate" property to 20. You can also change the "Rotation Axis" property to specify which axis you want the particles to rotate around by using 1 or 0.



4. Adding the Necessities

Now your effect is almost complete! The next thing we need to do is add the "Movement Lock to Control Point" function. This will cause the particles to stay with the player when they walk. If you want it to be a trail then you wouldn't add this, but you MUST add this if you add the "Movement Rotate Particle Around Axis" function.



Now there is one last thing we need to change. Go back to the "Properties" category and change "max_particles" to just above the number of particles the effect hovers around. This cuts down on memory usage. The number in the red box does not show the true particle cap you have set.




Now save your creation!




This tutorial only shows you the very basics. There are so many other options to explore and mess with. Now start experimenting with new functions and create bigger and better things!

This is the finished .pcf used in the tutorial: https://dl.dropboxusercontent.com/u/37303522/MoronYard%20Particle%20Effect%20Tutorial/tutorialparticle.pcf
Go here for further information on other functions or properties: https://developer.valvesoftware.com/wiki/Particle_System_Overview

« Last Edit: August 19, 2014, 10:54:39 AM by UnknownX »
x1 x1

UnknownX

  • May 2012
  • 373 Posts
    • STEAM_0:1:3221174 STEAM_0:1:3221174
« June 22, 2013, 08:26:52 AM » #8619
Q&A's
-------------------
Q: I don't have the Windows 8 window border!

A: You clearly have a virus.
----
Q: I don't have green boxes around key options or buttons!

A: See above.
----
Q: What does X do?

A: Go here for further information: https://developer.valvesoftware.com/wiki/Particle_System_Overview
----
Q: I messed with X and nothing changed on the particle viewer!

A: Some functions have no effect unless the particle is applied to specific objects or models.
----
Q: What is the radius of the player model?

A: About 15 to 18.
----
Q: How long should a single particle be allowed to live?

A: Particles should not live for more than 5 to 8 seconds unless it is a single emission particle like the heart in the circling heart rare effect which are allowed to last for a maximum of 2 minutes and 30 seconds (150 as a value).
----
Q: How can I test the effect?

A: Open the .pcf in use by the server and replace one of the particles of an item you have with your particle and then start up Garry's Mod and use the item.
----
Q: How do I copy a particle between .pcfs?

A: Click on what you want to copy and then click the "Edit" button at the top and then "Copy". Now open the other .pcf and go back to "Edit" and click "Paste".
----
Q: How do I replace an effect?

A: Delete the original or rename it by clicking on it and changing the name in the "Properties" category. The "name" function should be the very first one. After that, just rename yours to the name of the original.
----
Q: My effect didn't appear in game!

A: Sometimes a property can prevent the effect from showing up in the correct position or appearing.
----
Q: My effect doesn't look the same in game!

A: Some functions may behave differently in game.
----
Q: What do I do with the .pcf after I'm finished?

A: Upload the .pcf somewhere (somewhere does not include shady websites) and post it in the Item Submissions thread.
----
Q: Wow this is taking forever to link to all of these different .pcf's!

A: Please fit as many effects as you can into a single .pcf. It is easier to download one .pcf and open it for all 50 of your effects than it is to download 50 different .pcf's and open all 50 of them.

« Last Edit: June 22, 2013, 09:24:40 PM by UnknownX »
x2 x1 x1

Lynameep

  • This user has no personal avatar.
  • January 2012
  • 161 Posts
    • STEAM_0:1:26408318 STEAM_0:1:26408318
« June 22, 2013, 08:58:16 AM » #8620
Meanwhile everyone starts making new auras like crazy...
x1 x1

BumbleMan

  • December 2012
  • 8 Posts
    • STEAM_0:0:26380810 STEAM_0:0:26380810
« June 22, 2013, 02:09:36 PM » #8621
Thanks for this awesome tutorial!
x2 x1

CrimsonGuardian

  • November 2014
  • 83 Posts
    • STEAM_0:1:71054528 STEAM_0:1:71054528
« April 25, 2015, 07:30:43 AM » #13079
gj

« Last Edit: April 25, 2015, 07:44:17 AM by CrimsonGuardian »
THE PERSON UNDER THIS IS AN IDIOT

0 Members and 1 Guest are viewing this topic.